# HG changeset patch # User Michiel Broek # Date 1588343851 -7200 # Node ID 4d01937ae7afa304af6880cac3a33a9208f49fb4 # Parent 9d1aa6f3a4da734e4f2d455705483fe6eefbca42# Parent 17cec1b43923b050cdae74d1682dae27230d1409 Version 0.4.10 merged with default diff -r 9d1aa6f3a4da -r 4d01937ae7af .hgignore --- a/.hgignore Fri Oct 18 13:20:35 2019 +0200 +++ b/.hgignore Fri May 01 16:37:31 2020 +0200 @@ -10,12 +10,12 @@ www/version.php www/config.php www/thermferm +www/website www/run/sequence syntax: glob *.o */filelist icons/* -tools/* www/log/* Makefile.bak diff -r 9d1aa6f3a4da -r 4d01937ae7af README.design --- a/README.design Fri Oct 18 13:20:35 2019 +0200 +++ b/README.design Fri May 01 16:37:31 2020 +0200 @@ -7,20 +7,10 @@ ----------------------------------------------------------------------------- -TODO: - -Export ingredienten naar xml. - Bug: Metingen en berekeningen met afgelezen Brix waardes kloppen niet op het eind van de vergisting. Gaat vooral fout met de Saison. - Eind SG na koken klopt niet als er suiker in de vergisting toegevoegd wordt. - In de js code is dit est_og3 en niet est_og, maar est_og3 is niet beschikbaar - in de php code. - -Wish: - Giststarter bereken gist viability. Viability zelf wordt al gebruikt. - Giststarter automatisch aantal regels aanpassen bij wijzigen van de hoeveelheden. + NOOT: experimentele wijziging is toegevoegd op 5-dec-2019. New Cubic van seanterrill. Extra: @@ -30,42 +20,36 @@ beta glucosidase Gist typen: Wild yeast, Spontaneous. -Nieuwe velden: - pofpos boolean POF+ (Phenolic Off Flavor Positive) (Ferulic acid to 4-vinyl-guaiacol) - zymocide int4 none, K1, K2, K28, Klus zymocide+ (K1,K2,K28 or Klus) (killer yeast gen) (Alleen in wijngist?) - sta1 boolean Diastatic gen - harvest_top boolean Kveik top/bottom harvest - harvest_time int16 Kveik harvest after nn hours - pitch_temperature float Kveik pitch temperature - bacteria boolean Kveik has bacteria flag - Toevoegen Barrel/Oak aging vergisting stap. Wort souring stap. -Add dry-hop toevoegen moment. - Split batch: - 1. After sparge, before boil. - 2. After boil, before primary. - 3. After primary - 4. After secondary (several dry-hops) - 5. After lagering (separated packaging) Split fields: -divide_type 0:none 1:after mash 2:after boil 3:after primary 4:after secondary 5:after tertiary +divide_type 0:none 1:after mash 2:after boil 3:after cooling 4:after primary 5:after secondary 6:after tertiary divide_size amount in liters of this part. +divide_factor factor size of this part or 1.0 divide_parts hoeveel afsplitsingen. -divide_from uuid -Via Export module dialoog maken, keuze aantal afsplitsels en grootte per stuk. 10 stuks. -Procedure: Genereer afsplitsels met uniek uuid en moeder uuid. Pas volumes aan na splitspunt. -Afsplitsels naam aanpassen, code een -n volgnummer toevoegen. -Daarna, markeer master en reduceer volume na splitspunt. +divide_part 0=hoofdbatch. -Miscs type: add wood. +Via Export module dialoog maken, keuze aantal afsplitsels en grootte per stuk. 10 stuks. Ok. +Procedure: Genereer afsplitsels in db_product. Pas alle volumes aan. Ok. +Afsplitsels naam aanpassen, code en -n volgnummer toevoegen. Ok. +Daarna, markeer master en reduceer volume. Ok. +Tot zover werkt het. Probleem, wijzig iets aan ingredienten voor het splitspunt. Alle +batches moeten dan ook bijgewerkt worden. Logic: in db_product.php test stage tegen divide_type. +Zolang we wijzigen en het splitspunt is nog niet bereikt, de overige records bijwerken met de +data tot het splitspunt. Dus check voorgaande stage in geval die ophoogt na edit. -Hop types: Extract IKE. +View - master alleen wijzigen voor splitspunt. + - splitsingen alleen wijzigen na splitspunt. + -Popups in de editors met rekenhulpjes. +Hop types: Extract IKE. Tetra hop. + +Maischen: volledig infusie en decoctie implementeren zodat ook de Hermann methode kan. + Dubbel maischen? +Stap velden: gemeten pH en SG https://github.com/beerjson/beerjson diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/Makefile --- a/bmsd/Makefile Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/Makefile Fri May 01 16:37:31 2020 +0200 @@ -1,4 +1,4 @@ -# Makefile for the mbsePi-apps/thermferm. +# Makefile for the bmsd/bmsd. include ../Makefile.global @@ -55,11 +55,13 @@ # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend -mqtt.o: bms.h xutil.h mqtt.h nodes.h fermenters.h co2meters.h +mqtt.o: bms.h xutil.h mqtt.h nodes.h fermenters.h co2meters.h ispindels.h lock.o: lock.h bms.h futil.h nodes.o: bms.h xutil.h nodes.h mysql.h futil.o: bms.h futil.h fermenters.o: bms.h xutil.h fermenters.h mysql.h +co2meters.o: bms.h xutil.h co2meters.h mysql.h +ispindels.o: bms.h xutil.h ispindels.h mysql.h nodes.h bms.o: bms.h xutil.h futil.h rdconfig.h lock.h mqtt.h mysql.h nodes.h xutil.o: bms.h xutil.h rdconfig.o: bms.h xutil.h futil.h rdconfig.h diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/bms.c --- a/bmsd/bms.c Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/bms.c Fri May 01 16:37:31 2020 +0200 @@ -32,7 +32,7 @@ int my_shutdown = FALSE; int debug = FALSE; -static pid_t pgrp, mypid; +static pid_t /*pgrp, */mypid; char *Private_Path = NULL; /* Users data path */ extern sys_config Config; @@ -133,8 +133,10 @@ while (my_shutdown == FALSE) { - usleep(100000); + usleep(4000000); nodes_check_online(); + usleep(1000000); + ispindel_mysql_check(); } if (debug) fprintf(stdout, "[main] Exit from main loop\n"); @@ -217,9 +219,9 @@ * if the child were to open a terminal, it would become * associated with that terminal as its control terminal. */ - if ((pgrp = setpgid(0, 0)) == -1) { - syslog(LOG_NOTICE, "setpgpid failed"); - } +// if ((pgrp = setpgid(0, 0)) == -1) { +// syslog(LOG_NOTICE, "setpgid failed: %s", strerror(errno)); +// } frk = fork(); switch (frk) { diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/bms.h --- a/bmsd/bms.h Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/bms.h Fri May 01 16:37:31 2020 +0200 @@ -45,7 +45,12 @@ #include #include #include +#ifdef HAVE_MYSQL_MYSQL_H #include +#endif +#ifdef HAVE_MARIADB_MYSQL_H +#include +#endif #include @@ -53,7 +58,7 @@ #define MQTT_NODE_CONTROL 0x0001 ///< Show node control - +#define LOWBATT 3.3 ///< Low battery voltage /** @@ -100,6 +105,7 @@ char *net_address; ///< IPv4 or IPv6 address char *net_ifname; ///< Interface name int net_rssi; ///< RSSI value if wireless. + int interval; ///< Update interval } sys_node_list; @@ -146,6 +152,7 @@ { ALARM_FLAG_DOOR = 0x0001, ///< Door open ALARM_FLAG_PSU = 0x0002, ///< PSU problem + ALARM_FLAG_BATTERY = 0x0004, ///< Low battery ALARM_FLAG_CHILLER = 0x0100, ///< Chiller too warm } ALARM_FLAGS; @@ -237,7 +244,7 @@ int fan_power; ///< Fan power 0 or 100 uint64_t fan_usage; ///< Fan usage counter in seconds float setpoint_low; ///< Target temperature low - float setpoint_high; ///< Tarhet temperature high + float setpoint_high; ///< Target temperature high char *mode; ///< Working mode. char *stage; ///< Fermentation stage char *event; ///< Optional event @@ -275,7 +282,7 @@ /** - * @brief Strcuture holding a co2 pressure log entry. + * @brief Structure holding a co2 pressure log entry. */ typedef struct co2meter_log { char *datetime; ///< Date/time stamp @@ -300,35 +307,25 @@ } brewer_list; -// Make it universal and make it connectable with a fermenter. +// Make it universal and make it connectable with a beer. typedef struct _ispindel_list { struct _ispindel_list *next; - char *uuid; ///< Fixed uuid string - char *name; ///< Name or description (Red iSpindle). - char *beercode; ///< Beer code if in use. - float temperature; ///< Temperature of the beer. - float gravity; ///< Measured gravity - // What nore, battery? -} ispindel_list; - - -// Hergisting meters. + char *uuid; ///< Fixed uuid string. + char *alias; ///< Alias name. + char *node; ///< Node name received. + bool online; ///< Is considered online. + char *mode; ///< Working mode OFF or ON. + uint32_t alarm; ///< Alarm flags. + char *beercode; ///< Beer unique code + char *beername; ///< Beer name being measured + char *beeruuid; ///< Beer uuid being measured + float angle; ///< Tilt angle in degrees + float temperature; ///< Temperature in C + float battery; ///< Battery voltage + float gravity; ///< Gravity in plato? + int interval; ///< Measure interval +} sys_ispindel_list; -/** - * @brief Standalone temperature loggers. (Freezers, refrigerators, chambers). - */ -typedef struct _thb_list { - struct _thb_list *next; - char *uuit; ///< Fixed uuid string - char *name; ///< Name or description - char *beercode; ///< Beer code if needed. - float temperature; ///< Temperature in Celcius - float humidity; ///< Humidity in % - float barometer; ///< Air pressure. - float gps_latitude; ///< GPS latitude - float gps_longitude; ///< GPS longitide - float gps_altitude; ///< GPS altitude -} thb_list; #endif diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/co2meters.c --- a/bmsd/co2meters.c Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/co2meters.c Fri May 01 16:37:31 2020 +0200 @@ -235,9 +235,9 @@ jobj = json_tokener_parse(payload); timestamp = time(NULL); - log->datetime = malloc(21); + log->datetime = malloc(73); mytime = localtime(×tamp); - snprintf(log->datetime, 20, "%04d-%02d-%02d %02d:%02d:%02d", + snprintf(log->datetime, 72, "%04d-%02d-%02d %02d:%02d:%02d", mytime->tm_year + 1900, mytime->tm_mon + 1, mytime->tm_mday, mytime->tm_hour, mytime->tm_min, mytime->tm_sec); if (json_object_object_get_ex(jobj, "metric", &metric)) { @@ -267,6 +267,21 @@ syslog(LOG_NOTICE, "MySQL: mysq_store_result error %u (%s))", mysql_errno(con), mysql_error(con)); } else { if ((row = mysql_fetch_row(res_set)) != NULL) { + /* + * Ignore when the beer_name or beer_code is not set. + */ + if ((int)strlen(row[0]) == 0 || (int)strlen(row[1]) == 0) { + if (log->datetime) + free(log->datetime); + if (log->uuid) + free(log->uuid); + if (log->node) + free(log->node); + if (log->alias) + free(log->alias); + free(log); + return; + } log->product_code = xstrcpy(row[0]); log->product_name = xstrcpy(row[1]); log->product_uuid = xstrcpy(row[2]); diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/fermenters.c --- a/bmsd/fermenters.c Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/fermenters.c Fri May 01 16:37:31 2020 +0200 @@ -444,9 +444,9 @@ if (json_object_object_get_ex(jobj, "timestamp", &val)) { timestamp = json_object_get_int(val); - log->datetime = malloc(21); + log->datetime = malloc(73); mytime = localtime(×tamp); - snprintf(log->datetime, 20, "%04d-%02d-%02d %02d:%02d:%02d", + snprintf(log->datetime, 73, "%04d-%02d-%02d %02d:%02d:%02d", mytime->tm_year + 1900, mytime->tm_mon + 1, mytime->tm_mday, mytime->tm_hour, mytime->tm_min, mytime->tm_sec); } diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/ispindels.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bmsd/ispindels.c Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,241 @@ +/** + * @file ispindels.c + * @brief Handle ispindels data + * @author Michiel Broek + * + * Copyright (C) 2019-2020 + * + * This file is part of the bms (Brewery Management System) + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * bms 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 ThermFerm; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + + +#include "bms.h" +#include "xutil.h" +#include "ispindels.h" +#include "mysql.h" +#include "nodes.h" + + +sys_ispindel_list *ispindels = NULL; + +extern int debug; +extern sys_config Config; +extern MYSQL *con; +extern MYSQL_RES *res_set; +extern MYSQL_ROW row; + + + +void ispindel_set(char *node, char *payload) +{ + sys_ispindel_list *ispindel, *tmpp; + struct json_object *jobj, *metric, *val; + bool new_ispindel = true; + char *datetime, buf[65], *line, *logfile; + struct tm *mytime; + time_t timestamp; + FILE *fp; + +// if (debug) +// printf("ispindel_set: %s %s\n", node, payload); + + /* + * Search ispindel record in the memory array and use it if found. + */ + if (ispindels) { + for (tmpp = ispindels; tmpp; tmpp = tmpp->next) { + if (strcmp(tmpp->node, node) == 0) { + new_ispindel = false; + ispindel = tmpp; + break; + } + } + } + +// if (debug) +// printf("new_ispindel %s\n", new_ispindel ? "true":"false"); + + /* + * Allocate new ispindel if not yet known. + */ + if (new_ispindel) { + ispindel = (sys_ispindel_list *)malloc(sizeof(sys_ispindel_list)); + memset(ispindel, 0, sizeof(sys_ispindel_list)); + ispindel->node = xstrcpy(node); + ispindel->mode = xstrcpy((char *)"OFF"); + } + + if (! ispindel->online) { + ispindel->online = true; + syslog(LOG_NOTICE, "Online ispindel %s mode %s", node, ispindel->mode); + } + + /* + * Process the JSON formatted payload. + * Update only the fields that are found in the payload. + */ + jobj = json_tokener_parse(payload); + + if (json_object_object_get_ex(jobj, "unit", &metric)) { + if (json_object_object_get_ex(metric, "uuid", &val)) { + if (ispindel->uuid) + free(ispindel->uuid); + ispindel->uuid = xstrcpy((char *)json_object_get_string(val)); + } + if (json_object_object_get_ex(metric, "alias", &val)) { + if (ispindel->alias) + free(ispindel->alias); + ispindel->alias = xstrcpy((char *)json_object_get_string(val)); + } + if (json_object_object_get_ex(metric, "alarm", &val)) { + ispindel->alarm = json_object_get_int(val); + } + if (json_object_object_get_ex(metric, "interval", &val)) { + ispindel->interval = json_object_get_int(val); + } + if (json_object_object_get_ex(metric, "angle", &val)) { + ispindel->angle = json_object_get_double(val); + } + if (json_object_object_get_ex(metric, "temperature", &val)) { + ispindel->temperature = json_object_get_double(val); + } + if (json_object_object_get_ex(metric, "battery", &val)) { + ispindel->battery = json_object_get_double(val); + } + if (json_object_object_get_ex(metric, "gravity", &val)) { + ispindel->gravity = json_object_get_double(val); + } + } + +// ispindel_dump(ispindel); + + if (new_ispindel) { + if (ispindels == NULL) { + ispindels = ispindel; + } else { + for (tmpp = ispindels; tmpp; tmpp = tmpp->next) { + if (tmpp->next == NULL) { + tmpp->next = ispindel; + break; + } + } + } + ispindel_mysql_insert(ispindel); + } else { + ispindel_mysql_update(ispindel); + } + + /* + * The data is complete, see if we can write a log entry. + */ + if (ispindel->beercode && strlen(ispindel->beercode) && ispindel->beername && strlen(ispindel->beername) && + ispindel->online && (strcmp(ispindel->mode, (char *)"ON") == 0)) { + datetime = malloc(72); + timestamp = time(NULL); + mytime = localtime(×tamp); + snprintf(datetime, 72, "%04d-%02d-%02d %02d:%02d:%02d", + mytime->tm_year + 1900, mytime->tm_mon + 1, mytime->tm_mday, mytime->tm_hour, mytime->tm_min, mytime->tm_sec); + + line = xstrcpy(datetime); + line = xstrcat(line, (char *)","); + snprintf(buf, 64, "%.4f", ispindel->temperature); + line = xstrcat(line, buf); + line = xstrcat(line, (char *)","); + snprintf(buf, 64, "%.5f", ispindel->gravity); + line = xstrcat(line, buf); + line = xstrcat(line, (char *)","); +// snprintf(buf, 64, "%.5f", 1 + (ispindel->gravity / (258.6 - ((ispindel->gravity / 258.2) * 227.1)))); + snprintf(buf, 64, "%.5f", 1.00001 + (0.0038661 * ispindel->gravity) + (1.3488e-5 * ispindel->gravity * ispindel->gravity) + + (4.3074e-8 * ispindel->gravity * ispindel->gravity * ispindel->gravity)); + line = xstrcat(line, buf); + line = xstrcat(line, (char *)","); + snprintf(buf, 64, "%.6f", ispindel->battery); + line = xstrcat(line, buf); + line = xstrcat(line, (char *)","); + snprintf(buf, 64, "%.5f", ispindel->angle); + line = xstrcat(line, buf); + line = xstrcat(line, (char *)","); + snprintf(buf, 64, "%d", ispindel->interval); + line = xstrcat(line, buf); + line = xstrcat(line, (char *)","); + line = xstrcat(line, ispindel->uuid); + + /* + * Build logfile name + */ + logfile = xstrcpy(Config.web_root); + logfile = xstrcat(logfile, (char *)"/log/ispindel/"); + logfile = xstrcat(logfile, ispindel->beercode); + logfile = xstrcat(logfile, (char *)" "); + logfile = xstrcat(logfile, ispindel->beername); + logfile = xstrcat(logfile, (char *)".log"); + + fp = fopen(logfile, "a"); + if (fp) { + fprintf(fp, "%s\n", line); + fclose(fp); + } else { + syslog(LOG_NOTICE, "cannot append to `%s'", logfile); + } + + free(logfile); + logfile = NULL; + free(line); + line = NULL; + free(datetime); + datetime = NULL; + } +} + + + +/* + * Process iSpindel MQTT message. + */ +void ispindel_birth_data(char *topic, char *payload) +{ + char *message_type, *edge_node; + + strtok(topic, "/"); // ignore namespace + strtok(NULL, "/"); + message_type = strtok(NULL, "/"); + edge_node = strtok(NULL, "/\0"); + + if (strcmp("DBIRTH", message_type) == 0) { + ispindel_set(edge_node, payload); + } +} + + + +void ispindel_dump(sys_ispindel_list *ispindel) +{ + if (debug) { + printf("node/alias %s / %s\n", ispindel->node, ispindel->alias); + printf("uuid %s\n", ispindel->uuid); + printf("online %s\n", ispindel->online ? "yes":"no"); + printf("mode %s\n", ispindel->mode); + printf("product %s / %s\n", ispindel->beercode, ispindel->beername); + printf("tilt %.5f\n", ispindel->angle); + printf("temperature %.4f\n", ispindel->temperature); + printf("battery %.6f\n", ispindel->battery); + printf("gravity %.5f\n", ispindel->gravity); + printf("interval %d\n", ispindel->interval); + } +} + + diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/ispindels.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bmsd/ispindels.h Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,22 @@ +/** + * @file ispindels.h + */ + +#ifndef _ISPINDEL_H +#define _ISPINDEL_H + +void ispindel_dump(sys_ispindel_list *ispindel); + +/** + * @brief Messages received from a iSpindel using the MQTT sender. + * A new node is created if this is the first message of the + * iSpindel, else the last seen time is updated. Then the last + * actual state is recorded. A log line is written when a beer + * is assigned. + * @param topic The MQTT topic string, contains the ispindel type and name + * @param payload The value for the selected keyword. + */ +void ispindel_birth_data(char *topic, char *payload); + + +#endif diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/mqtt.c --- a/bmsd/mqtt.c Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/mqtt.c Fri May 01 16:37:31 2020 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2017-2019 + * Copyright (C) 2017-2020 * * Michiel Broek * @@ -26,6 +26,7 @@ #include "nodes.h" #include "fermenters.h" #include "co2meters.h" +#include "ispindels.h" extern sys_config Config; @@ -102,6 +103,9 @@ topic = xstrcpy((char *)"mbv1.0/co2meters/#"); // Subscribe to co2meter messages. mosquitto_subscribe(mosq, NULL, topic, 0); free(topic); + topic = xstrcpy((char *)"mbv1.0/ispindels/#"); // Subscribe to ispindel messages. + mosquitto_subscribe(mosq, NULL, topic, 0); + free(topic); topic = NULL; mqtt_status = STATUS_CONNACK_RECVD; } else { @@ -171,6 +175,9 @@ fermenter_log(message->topic, (char *)message->payload); return; } + if (strstr(message->topic, (char *)"fermenters") && strstr(message->topic, (char *)"DCMD")) { + return; // just ignore our own commands. + } if (strstr(message->topic, (char *)"co2meters") && strstr(message->topic, (char *)"DBIRTH")) { co2meter_birth_data(message->topic, (char *)message->payload); return; @@ -179,6 +186,10 @@ co2meter_log(message->topic, (char *)message->payload); return; } + if (strstr(message->topic, (char *)"ispindels") && strstr(message->topic, (char *)"DBIRTH")) { + ispindel_birth_data(message->topic, (char *)message->payload); + return; + } syslog(LOG_NOTICE, "MQTT: message callback %s :: %d", message->topic, message->payloadlen); } else { if (strstr(message->topic, (char *)"NBIRTH")) { diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/mysql.c --- a/bmsd/mysql.c Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/mysql.c Fri May 01 16:37:31 2020 +0200 @@ -3,7 +3,7 @@ * @brief MySQL/MariaDB access. * @author Michiel Broek * - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * * This file is part of the bms (Brewery Management System) * @@ -36,6 +36,7 @@ extern sys_node_list *nodes; extern sys_fermenter_list *fermenters; extern sys_co2meter_list *co2meters; +extern sys_ispindel_list *ispindels; extern int debug; @@ -62,7 +63,8 @@ sys_node_list *node, *tmpp; sys_fermenter_list *fermenter, *tmpf; sys_co2meter_list *co2meter, *tmpc; - int ccnt = 0, ncnt = 0, fcnt = 0; + sys_ispindel_list *ispindel, *tmpi; + int icnt = 0, ccnt = 0, ncnt = 0, fcnt = 0; con = mysql_init(NULL); if (con == NULL) { @@ -97,7 +99,7 @@ node->next = NULL; node->uuid = xstrcpy(row[1]); node->node = xstrcpy(row[2]); - node->online = false; // Will be set using MQTT + node->online = atoi(row[3]); node->group_id = xstrcpy(row[4]); node->hardwaremake = xstrcpy(row[5]); node->hardwaremodel = xstrcpy(row[6]); @@ -115,6 +117,7 @@ node->net_address = xstrcpy(row[18]); node->net_ifname = xstrcpy(row[19]); node->net_rssi = atoi(row[20]); + node->interval = atoi(row[21]); if (nodes == NULL) { nodes = node; @@ -146,7 +149,7 @@ fermenter->uuid = xstrcpy(row[1]); fermenter->alias = xstrcpy(row[2]); fermenter->node = xstrcpy(row[3]); - fermenter->online = false; // Will be set later + fermenter->online = atoi(row[4]); fermenter->beercode = xstrcpy(row[5]); fermenter->beername = xstrcpy(row[6]); fermenter->beeruuid = xstrcpy(row[44]); @@ -242,7 +245,7 @@ co2meter->uuid = xstrcpy(row[1]); co2meter->alias = xstrcpy(row[2]); co2meter->node = xstrcpy(row[3]); - co2meter->online = 0; // Will be set later + co2meter->online = atoi(row[4]); co2meter->beercode = xstrcpy(row[5]); co2meter->beername = xstrcpy(row[6]); co2meter->beeruuid = xstrcpy(row[7]); @@ -272,7 +275,49 @@ } } - syslog(LOG_NOTICE, "MySQL: loaded %d nodes, %d fermenters, %d co2meters", ncnt, fcnt, ccnt); + if (mysql_query(con, "SELECT * FROM mon_ispindels")) { + syslog(LOG_NOTICE, "MySQL: SELECT * FROM mon_ispindels error %u (%s))", mysql_errno(con), mysql_error(con)); + } else { + res_set = mysql_store_result(con); + if (res_set == NULL) { + syslog(LOG_NOTICE, "MySQL: mysq_store_result error %u (%s))", mysql_errno(con), mysql_error(con)); + } else { + while ((row = mysql_fetch_row(res_set)) != NULL) { + ispindel = (sys_ispindel_list *)malloc(sizeof(sys_ispindel_list)); + memset(ispindel, 0, sizeof(sys_ispindel_list)); + ispindel->next = NULL; + ispindel->uuid = xstrcpy(row[1]); + ispindel->alias = xstrcpy(row[2]); + ispindel->node = xstrcpy(row[3]); + ispindel->online = atoi(row[4]); + ispindel->alarm = atoi(row[5]); + ispindel->beercode = xstrcpy(row[6]); + ispindel->beername = xstrcpy(row[7]); + ispindel->beeruuid = xstrcpy(row[8]); + ispindel->angle = atof(row[9]); + ispindel->temperature = atof(row[10]); + ispindel->battery = atof(row[11]); + ispindel->gravity = atof(row[12]); + ispindel->interval = atoi(row[13]); + ispindel->mode = xstrcpy(row[14]); + + if (ispindels == NULL) { + ispindels = ispindel; + } else { + for (tmpi = ispindels; tmpi; tmpi = tmpi->next) { + if (tmpi->next == NULL) { + tmpi->next = ispindel; + break; + } + } + } + icnt++; + } + mysql_free_result(res_set); + } + } + + syslog(LOG_NOTICE, "MySQL: loaded %d nodes, %d fermenters, %d co2meters %d ispindels", ncnt, fcnt, ccnt, icnt); return 0; } @@ -280,6 +325,7 @@ void bms_mysql_end(void) { + sys_ispindel_list *tmpi, *oldtmpi; sys_co2meter_list *tmpp, *oldtmpp; sys_fermenter_list *tmpf, *oldtmpf; sys_node_list *tmpn, *oldtmpn; @@ -290,6 +336,25 @@ if (debug) fprintf(stdout, "MySQL: disconnected\n"); + for (tmpi = ispindels; tmpi; tmpi = oldtmpi) { + oldtmpi = tmpi->next; + if (tmpi->uuid) + free(tmpi->uuid); + if (tmpi->alias) + free(tmpi->alias); + if (tmpi->node) + free(tmpi->node); + if (tmpi->beercode) + free(tmpi->beercode); + if (tmpi->beername) + free(tmpi->beername); + if (tmpi->beeruuid) + free(tmpi->beeruuid); + if (tmpi->mode) + free(tmpi->mode); + free(tmpi); + } + for (tmpp = co2meters; tmpp; tmpp = oldtmpp) { oldtmpp = tmpp->next; if (tmpp->uuid) @@ -397,18 +462,20 @@ int bms_mysql_query(const char *query) { int rc = mysql_query(con, query); + int err = mysql_errno(con); if (rc) { - syslog(LOG_NOTICE, "MySQL: error %u (%s)", mysql_errno(con), mysql_error(con)); + syslog(LOG_NOTICE, "MySQL: error %u (%s)", err, mysql_error(con)); syslog(LOG_NOTICE, query); } else { return 0; } /* Any error execpt server gone away */ - if (rc != 2006) + if (err != 2006) return rc; + syslog(LOG_NOTICE, "Trying to reconnect"); /* Try to reconnect and do the query again */ mysql_close(con); if (mysql_real_connect(con, Config.mysql_host, Config.mysql_user, Config.mysql_pass, Config.mysql_database, Config.mysql_port, NULL, 0) == NULL) { @@ -434,25 +501,25 @@ void node_mysql_insert(sys_node_list *node) { - char *query = malloc(1024), first[21], last[21]; + char *query = malloc(1024), first[73], last[73]; struct tm *mytime; mytime = localtime(&node->firstseen); - snprintf(first, 20, "%04d-%02d-%02d %02d:%02d:%02d", + snprintf(first, 72, "%04d-%02d-%02d %02d:%02d:%02d", mytime->tm_year + 1900, mytime->tm_mon + 1, mytime->tm_mday, mytime->tm_hour, mytime->tm_min, mytime->tm_sec); mytime = localtime(&node->lastseen); - snprintf(last, 20, "%04d-%02d-%02d %02d:%02d:%02d", + snprintf(last, 72, "%04d-%02d-%02d %02d:%02d:%02d", mytime->tm_year + 1900, mytime->tm_mon + 1, mytime->tm_mday, mytime->tm_hour, mytime->tm_min, mytime->tm_sec); snprintf(query, 1023, - "INSERT INTO mon_nodes SET uuid='%s', node='%s', online='%s', group_id='%s', " \ + "INSERT INTO mon_nodes SET uuid='%s', node='%s', online='%d', group_id='%s', " \ "hardwaremake='%s', hardwaremodel='%s', os='%s', os_version='%s', firmware='%s', firstseen='%s', lastseen='%s', " \ "temperature='%.3f', humidity='%.3f', barometer='%.3f', gps_latitude='%.8f', gps_longitude='%.8f', gps_altitude='%.8f', " \ - "net_address='%s', net_ifname='%s', net_rssi='%d'", - node->uuid, node->node, node->online ?"Y":"N", node->group_id, + "net_address='%s', net_ifname='%s', net_rssi='%d', up_interval='%d'", + node->uuid, node->node, node->online ?1:0, node->group_id, node->hardwaremake, node->hardwaremodel, node->os, node->os_version, node->firmware, first, last, node->temperature, node->humidity, node->barometer, node->gps_latitude, node->gps_longitude, node->gps_altitude, - node->net_address, node->net_ifname, node->net_rssi); + node->net_address, node->net_ifname, node->net_rssi, node->interval); if (bms_mysql_query(query) == 0) { syslog(LOG_NOTICE, "MySQL: insert new node %s", node->node); @@ -465,20 +532,20 @@ void node_mysql_update(sys_node_list *node) { - char *query = malloc(1024), last[21]; + char *query = malloc(1024), last[65]; struct tm *mytime; mytime = localtime(&node->lastseen); - snprintf(last, 20, "%04d-%02d-%02d %02d:%02d:%02d", + snprintf(last, 64, "%04d-%02d-%02d %02d:%02d:%02d", mytime->tm_year + 1900, mytime->tm_mon + 1, mytime->tm_mday, mytime->tm_hour, mytime->tm_min, mytime->tm_sec); snprintf(query, 1023, - "UPDATE mon_nodes SET online='%s', hardwaremake='%s', hardwaremodel='%s', os='%s', os_version='%s', firmware='%s', lastseen='%s', " \ + "UPDATE mon_nodes SET online='%d', hardwaremake='%s', hardwaremodel='%s', os='%s', os_version='%s', firmware='%s', lastseen='%s', " \ "temperature='%.3f', humidity='%.3f', barometer='%.3f', gps_latitude='%.8f', gps_longitude='%.8f', gps_altitude='%.8f', " \ - "net_address='%s', net_ifname='%s', net_rssi='%d' WHERE uuid='%s'", - node->online ?"Y":"N", node->hardwaremake, node->hardwaremodel, node->os, node->os_version, node->firmware, last, + "net_address='%s', net_ifname='%s', net_rssi='%d', up_interval='%d' WHERE uuid='%s'", + node->online ? 1:0, node->hardwaremake, node->hardwaremodel, node->os, node->os_version, node->firmware, last, node->temperature, node->humidity, node->barometer, node->gps_latitude, node->gps_longitude, node->gps_altitude, - node->net_address, node->net_ifname, node->net_rssi, node->uuid); + node->net_address, node->net_ifname, node->net_rssi, node->interval, node->uuid); bms_mysql_query(query); free(query); @@ -490,7 +557,7 @@ { char *query = malloc(512); - snprintf(query, 511, "UPDATE mon_nodes SET online='N' WHERE node='%s'", node); + snprintf(query, 511, "UPDATE mon_nodes SET online='0' WHERE node='%s'", node); bms_mysql_query(query); free(query); } @@ -502,7 +569,7 @@ char *query = malloc(2560); snprintf(query, 2559, - "INSERT INTO mon_fermenters SET uuid='%s', alias='%s', node='%s', online='%s', " \ + "INSERT INTO mon_fermenters SET uuid='%s', alias='%s', node='%s', online='%d', " \ "beercode='%s', beername='%s', beeruuid='%s', " \ "air_address='%s', air_state='%s', air_temperature='%.3f', " \ "beer_address='%s', beer_state='%s', beer_temperature='%.3f', " \ @@ -517,7 +584,7 @@ "profile_uuid='%s', profile_name='%s', profile_state='%s', profile_percent='%d', " \ "profile_inittemp_high='%.3f', profile_inittemp_low='%.3f', profile_steps='%s', stage='%s', " \ "yeast_lo='%.1f', yeast_hi='%.1f', webcam_url='%s', webcam_light='%d'", - fermenter->uuid, fermenter->alias, fermenter->node, fermenter->online ? "Y":"N", + fermenter->uuid, fermenter->alias, fermenter->node, fermenter->online ? 1:0, fermenter->beercode ? fermenter->beercode : "", fermenter->beername ? fermenter->beername : "", fermenter->beeruuid ? fermenter->beeruuid : "", fermenter->air_address ? fermenter->air_address : "", fermenter->air_state ? fermenter->air_state : "", fermenter->air_temperature, @@ -548,7 +615,7 @@ char *query = malloc(2560); snprintf(query, 2559, - "UPDATE mon_fermenters SET online='%s', beercode='%s', beername='%s', beeruuid='%s', " \ + "UPDATE mon_fermenters SET online='%d', beercode='%s', beername='%s', beeruuid='%s', " \ "air_address='%s', air_state='%s', air_temperature='%.3f', " \ "beer_address='%s', beer_state='%s', beer_temperature='%.3f', " \ "chiller_address='%s', chiller_state='%s', chiller_temperature='%.3f', " \ @@ -562,7 +629,7 @@ "profile_uuid='%s', profile_name='%s', profile_state='%s', profile_percent='%d', " \ "profile_inittemp_high='%.3f', profile_inittemp_low='%.3f', profile_steps='%s', stage='%s', " \ "yeast_lo='%.1f', yeast_hi='%.1f', webcam_url='%s', webcam_light='%d' WHERE uuid='%s'", - fermenter->online ? "Y":"N", fermenter->beercode ? fermenter->beercode : "", fermenter->beername ? fermenter->beername : "", + fermenter->online ? 1:0, fermenter->beercode ? fermenter->beercode : "", fermenter->beername ? fermenter->beername : "", fermenter->beeruuid ? fermenter->beeruuid : "", fermenter->air_address ? fermenter->air_address : "", fermenter->air_state ? fermenter->air_state : "", fermenter->air_temperature, fermenter->beer_address ? fermenter->beer_address : "", fermenter->beer_state ? fermenter->beer_state : "", fermenter->beer_temperature, @@ -591,9 +658,9 @@ char *query = malloc(512); if (alias) - snprintf(query, 511, "UPDATE mon_fermenters SET online='N' WHERE node='%s' and alias='%s'", node, alias); + snprintf(query, 511, "UPDATE mon_fermenters SET online='0' WHERE node='%s' and alias='%s'", node, alias); else - snprintf(query, 511, "UPDATE mon_fermenters SET online='N' WHERE node='%s'", node); + snprintf(query, 511, "UPDATE mon_fermenters SET online='0' WHERE node='%s'", node); bms_mysql_query(query); free(query); @@ -655,3 +722,111 @@ } + +void ispindel_mysql_insert(sys_ispindel_list *ispindel) +{ + char *query = malloc(2560); + + snprintf(query, 2559, + "INSERT INTO mon_ispindels SET uuid='%s', alias='%s', node='%s', online='%d', mode='%s', alarm='%d', " \ + "angle='%.5f', temperature='%.4f', battery='%.6f', gravity='%.5f', up_interval='%d', og_gravity='0.0'", + ispindel->uuid, ispindel->alias, ispindel->node, ispindel->online ? 1:0, ispindel->mode, ispindel->alarm, + ispindel->angle, ispindel->temperature, ispindel->battery, ispindel->gravity, ispindel->interval); + + if (bms_mysql_query(query) == 0) { + syslog(LOG_NOTICE, "MySQL: insert new ispindel %s", ispindel->node); + } + free(query); +} + + + +void ispindel_mysql_update(sys_ispindel_list *ispindel) +{ + char *query = malloc(2560); + + snprintf(query, 2559, + "UPDATE mon_ispindels SET online='%d', mode='%s', alarm='%d', " \ + "angle='%.5f', temperature='%.4f', battery='%.6f', gravity='%.5f', up_interval='%d', og_gravity=GREATEST(og_gravity, '%.5f') WHERE uuid='%s'", + ispindel->online ? 1:0, ispindel->mode, ispindel->alarm, + ispindel->angle, ispindel->temperature, ispindel->battery, ispindel->gravity, ispindel->interval, ispindel->gravity, ispindel->uuid); + + bms_mysql_query(query); + free(query); +} + + + +void ispindel_mysql_death(char *node) +{ + char *query = malloc(512); + + snprintf(query, 511, "UPDATE mon_ispindels SET online='0' WHERE node='%s'", node); + bms_mysql_query(query); + free(query); +} + + + +/* + * Check using a new MySQL connection because we are running from another thread. + */ +void ispindel_mysql_check(void) +{ + sys_ispindel_list *tmpp; + MYSQL *con2 = NULL; + MYSQL_RES *res_set2; + MYSQL_ROW row2; + + if (ispindels == NULL) + return; + + con2 = mysql_init(NULL); + if (con2 == NULL) { + syslog(LOG_NOTICE, "MySQL: mysql_init() failed"); + return; + } + + if (mysql_real_connect(con2, Config.mysql_host, Config.mysql_user, Config.mysql_pass, Config.mysql_database, Config.mysql_port, NULL, 0) == NULL) { + syslog(LOG_NOTICE, "MySQL: mysql_real_connect() %s", mysql_error(con2)); + return; + } + + if (mysql_query(con2, "SELECT uuid,alias,beercode,beername,beeruuid,mode FROM mon_ispindels;")) { + syslog(LOG_NOTICE, "MySQL: SELECT uuid,alias,beercode,beername,beeruuid,mode FROM mon_ispindels error %u (%s))", mysql_errno(con2), mysql_error(con2)); + } else { + res_set2 = mysql_store_result(con2); + if (res_set2 == NULL) { + syslog(LOG_NOTICE, "MySQL: mysq_store_result error %u (%s))", mysql_errno(con2), mysql_error(con2)); + } else { + while ((row2 = mysql_fetch_row(res_set2)) != NULL) { + for (tmpp = ispindels; tmpp; tmpp = tmpp->next) { + if (strcmp(tmpp->uuid, row2[0]) == 0) { + if (strcmp(tmpp->beercode, row2[2]) || strcmp(tmpp->beername, row2[3]) || strcmp(tmpp->beeruuid, row2[4])) { + syslog(LOG_NOTICE, "ispindel `%s` change beer to `%s %s`", row2[1], row2[2], row2[3]); + if (tmpp->beercode) + free(tmpp->beercode); + tmpp->beercode = xstrcpy(row2[2]); + if (tmpp->beername) + free(tmpp->beername); + tmpp->beername = xstrcpy(row2[3]); + if (tmpp->beeruuid) + free(tmpp->beeruuid); + tmpp->beeruuid = xstrcpy(row2[4]); + } + if (strcmp(tmpp->mode, row2[5])) { + syslog(LOG_NOTICE, "ispindel `%s` change mode `%s`", row2[1], row2[5]); + if (tmpp->mode) + free(tmpp->mode); + tmpp->mode = xstrcpy(row2[5]); + } + } + } + } + mysql_free_result(res_set2); + } + } + + mysql_close(con2); +} + diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/mysql.h --- a/bmsd/mysql.h Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/mysql.h Fri May 01 16:37:31 2020 +0200 @@ -41,5 +41,16 @@ void co2meter_mysql_update(sys_co2meter_list *co2meter); void co2meter_mysql_death(char *node, char *alias); +void ispindel_mysql_insert(sys_ispindel_list *ispindel); +void ispindel_mysql_update(sys_ispindel_list *ispindel); +void ispindel_mysql_death(char *alias); + +/** + * @brief Check state changes in the database for all iSpindels and + * update the internal memory array. Called every 5 seconds from + * the main server thread. + */ +void ispindel_mysql_check(void); + #endif diff -r 9d1aa6f3a4da -r 4d01937ae7af bmsd/nodes.c --- a/bmsd/nodes.c Fri Oct 18 13:20:35 2019 +0200 +++ b/bmsd/nodes.c Fri May 01 16:37:31 2020 +0200 @@ -3,7 +3,7 @@ * @brief Handle nodes status * @author Michiel Broek * - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * * This file is part of the bms (Brewery Management System) * @@ -34,7 +34,7 @@ extern int debug; extern sys_fermenter_list *fermenters; extern sys_co2meter_list *co2meters; - +extern sys_ispindel_list *ispindels; void node_birth_data(char *topic, char *payload) @@ -82,6 +82,7 @@ node->gps_latitude = node->gps_longitude = node->gps_altitude = 0.0; node->net_address = node->net_ifname = NULL; node->net_rssi = 0; + node->interval = 300; } /* @@ -111,6 +112,9 @@ free(node->uuid); node->uuid = xstrcpy((char *)json_object_get_string(val)); } + if (json_object_object_get_ex(metric, "interval", &val)) { + node->interval = json_object_get_int(val); + } if (json_object_object_get_ex(metric, "properties", &metric2)) { if (json_object_object_get_ex(metric2, "hardwaremake", &val)) { if (node->hardwaremake) @@ -214,6 +218,7 @@ printf("GPS %.5f %.5f %.5f\n", node->gps_latitude, node->gps_longitude, node->gps_altitude); printf("net %s:%s\n", node->net_ifname, node->net_address); printf("rssi %d\n", node->net_rssi); + printf("interval %d\n", node->interval); } } @@ -247,11 +252,14 @@ sys_node_list *tmpn; sys_fermenter_list *tmpf; sys_co2meter_list *tmpc; + sys_ispindel_list *tmpi; time_t now = time(NULL); for (tmpn = nodes; tmpn; tmpn = tmpn->next) { - if (tmpn->online && ((now - tmpn->lastseen) > 600)) { - syslog(LOG_NOTICE, "Timeout node `%s/%s'", tmpn->group_id, tmpn->node); +// if (debug) +// printf("%-20s online %s %ld %d\n", tmpn->node, tmpn->online ? "yes":"no ", tmpn->lastseen, tmpn->interval); + if (tmpn->online && ((now - tmpn->lastseen) > (tmpn->interval * 2 + 5))) { // 2 times interval + 5 seconds + syslog(LOG_NOTICE, "Timeout node `%s/%s' after %ld seconds", tmpn->group_id, tmpn->node, (now - tmpn->lastseen)); tmpn->online = false; node_mysql_death(tmpn->node); @@ -274,6 +282,16 @@ } } } + + for (tmpi = ispindels; tmpi; tmpi = tmpi->next) { + if (strcmp(tmpi->node, tmpn->node) == 0) { + if (tmpi->online) { + syslog(LOG_NOTICE, "Timeout ispindel %s", tmpi->node); + tmpi->online = false; + ispindel_mysql_death(tmpi->node); + } + } + } } } } diff -r 9d1aa6f3a4da -r 4d01937ae7af config.h.in --- a/config.h.in Fri Oct 18 13:20:35 2019 +0200 +++ b/config.h.in Fri May 01 16:37:31 2020 +0200 @@ -9,3 +9,9 @@ /* According to Sun we MUST define this in the source */ #define _REENTRANT 1 +/* Define if you have the header file. */ +#undef HAVE_MYSQL_MYSQL_H + +/* Define if you have the header file. */ +#undef HAVE_MARIADB_MYSQL_H + diff -r 9d1aa6f3a4da -r 4d01937ae7af config.status --- a/config.status Fri Oct 18 13:20:35 2019 +0200 +++ b/config.status Fri May 01 16:37:31 2020 +0200 @@ -619,9 +619,9 @@ S["CFLAGS"]="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline -I/usr/include/libxml2 -I/usr/include/u"\ "uid" S["CC"]="gcc" -S["CYEARS"]="2016-2019" -S["COPYRIGHT"]="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved" -S["VERSION"]="0.4.9" +S["CYEARS"]="2016-2020" +S["COPYRIGHT"]="Copyright (C) 2016-2020 Michiel Broek, All Rights Reserved" +S["VERSION"]="0.4.10" S["PACKAGE"]="bms" S["SUBDIRS"]="bmsd doc script tools www" S["target_alias"]="" @@ -710,8 +710,8 @@ D["PACKAGE_STRING"]=" \"\"" D["PACKAGE_BUGREPORT"]=" \"\"" D["PACKAGE_URL"]=" \"\"" -D["VERSION"]=" \"0.4.9\"" -D["COPYRIGHT"]=" \"Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved\"" +D["VERSION"]=" \"0.4.10\"" +D["COPYRIGHT"]=" \"Copyright (C) 2016-2020 Michiel Broek, All Rights Reserved\"" D["STDC_HEADERS"]=" 1" D["HAVE_SYS_TYPES_H"]=" 1" D["HAVE_SYS_STAT_H"]=" 1" @@ -724,7 +724,7 @@ D["HAVE_UNISTD_H"]=" 1" D["HAVE_MOSQUITTO_H"]=" 1" D["HAVE_JSON_C_JSON_H"]=" 1" -D["HAVE_MYSQL_MYSQL_H"]=" 1" +D["HAVE_MARIADB_MYSQL_H"]=" 1" D["HAVE_LIBXML_XMLMEMORY_H"]=" 1" D["HAVE_UUID_UUID_H"]=" 1" D["STDC_HEADERS"]=" 1" diff -r 9d1aa6f3a4da -r 4d01937ae7af configure --- a/configure Fri Oct 18 13:20:35 2019 +0200 +++ b/configure Fri May 01 16:37:31 2020 +0200 @@ -2043,9 +2043,9 @@ PACKAGE="bms" -VERSION="0.4.9" -COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved" -CYEARS="2016-2019" +VERSION="0.4.10" +COPYRIGHT="Copyright (C) 2016-2020 Michiel Broek, All Rights Reserved" +CYEARS="2016-2020" @@ -3652,6 +3652,18 @@ done + for ac_header in mariadb/mysql.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mariadb/mysql.h" "ac_cv_header_mariadb_mysql_h" "$ac_includes_default" +if test "x$ac_cv_header_mariadb_mysql_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MARIADB_MYSQL_H 1 +_ACEOF + +fi + +done + else as_fn_error $? "mysqlclient not found" "$LINENO" 5 fi diff -r 9d1aa6f3a4da -r 4d01937ae7af configure.ac --- a/configure.ac Fri Oct 18 13:20:35 2019 +0200 +++ b/configure.ac Fri May 01 16:37:31 2020 +0200 @@ -8,9 +8,9 @@ dnl General settings dnl After changeing the version number, run autoconf! PACKAGE="bms" -VERSION="0.4.9" -COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved" -CYEARS="2016-2019" +VERSION="0.4.10" +COPYRIGHT="Copyright (C) 2016-2020 Michiel Broek, All Rights Reserved" +CYEARS="2016-2020" AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(COPYRIGHT) @@ -66,6 +66,7 @@ if test "$result" = "yes"; then LIBS="$LIBS -lmysqlclient" AC_CHECK_HEADERS(mysql/mysql.h) + AC_CHECK_HEADERS(mariadb/mysql.h) else AC_MSG_ERROR(mysqlclient not found) fi diff -r 9d1aa6f3a4da -r 4d01937ae7af doc/bms-ch8.sgml --- a/doc/bms-ch8.sgml Fri Oct 18 13:20:35 2019 +0200 +++ b/doc/bms-ch8.sgml Fri May 01 16:37:31 2020 +0200 @@ -34,6 +34,8 @@ fermenters is voor vergisting controllers. co2meters is een drukmeter om bijvoorbeeld hergisting op de fles te monitoren. +ispindels is een electronische hydrometer die in het gistvat drijft +en de temperatuur en sg verstuurt. De volgende message_type namen zijn gedefinieerd: @@ -81,13 +83,19 @@ is de unix tijd sinds 1 januari 1970. Niet alle controllers sturen een timestamp, controllers zonder klok laten dit weg. De tijd wordt dan door bmsd ingevuld en is de tijd dat het bericht ontvangen wordt. -Het `seq' nummer wordt met ieder bericht met 1 verhoogd. +Het `seq' nummer wordt met ieder bericht met 1 verhoogd. +Ook dit nummer is niet altijd aanwezig. +In de `metric' groep is de `interval' optioneel. Dit wordt bijvoorbeeld +verstuurd door iSpindels en is de ingestelde update interval tijd in seconden. +Indien dit niet aanwezig is dan wordt 300 seconden als standaard waarde gebruikt. +Deze waarde wordt gebruikt om een apparaat als offline te markeren indien het langer +als twee maal deze tijd niet wordt gezien. { "timestamp": 1532201089, - "seq": 0, "metric": { "uuid": "b508f01c-1f82-4e8b-b0d2-d88ecfb53031", + "interval":300, "properties": { "hardwaremake": "Raspberry", "hardwaremodel": "Unknown", @@ -158,7 +166,9 @@ "product": { "uuid": "1eb0c7bf-bf06-491c-a086-ac5478d521b9", "code": "CB0001", - "name": "Hoppy Housebeer" + "name": "Hoppy Housebeer", + "yeast_lo": 18.0, + "yeast_hi": 24.0 }, "air": { "address": "70d60411-3ec8-40ab-998a-81fead83025f", @@ -207,11 +217,7 @@ "mode": "BEER", "setpoint": { "low": 21.0, - "high": 21.0 - }, - "webcam": { - "url":"https://the.webcamserver.com:8090/?action=stream", - "light": 1 + "high": 21.5 }, "alarm": 0, "profile": { @@ -223,7 +229,6 @@ "low": 17.9, "high": 18.1 }, - "fridgemode": 0, "steps": [ { "resttime": 2, @@ -273,7 +278,6 @@ { "timestamp": 1532201089, - "seq": 0, "metric": { "product": { "uuid": "1eb0c7bf-bf06-491c-a086-ac5478d521b9", @@ -304,7 +308,6 @@ "power": 100, "usage": 8273772 }, - "sg": 1.023, "event": "Something to mark", "fermenter_uuid": "48c9ae27-3f58-41c9-ae4b-1d57b249c45a" } @@ -318,36 +321,95 @@ De bestandsnamen zijn product_code\ product_name.log. Het interne formaat is: - 2014-11-15 18:39:12,BEER,PRIMARY,20.312,19.750,-1.500,20.5,18.6,18.8,35,12345,0,67890,Whatsup,Fermenter - | | | | | | | | | | | | | | | - 0 datetime + | | | | | | | | | | | | | | - 1 werkwijze ------------+ | | | | | | | | | | | | | - 2 vergisting fase ------------+ | | | | | | | | | | | | - 3 temperatuur lucht -----------------+ | | | | | | | | | | | - 4 temperatuur bier -------------------------+ | | | | | | | | | | - 5 temperatuur koeler ------------------------------+ | | | | | | | | | - 6 temperatuur ruimte -------------------------------------+ | | | | | | | | - 7 instelwaarde laag -------------------------------------------+ | | | | | | | - 8 instelwaarde hoog ------------------------------------------------+ | | | | | | - 9 verwarming vermogen --------------------------------------------------+ | | | | | -10 verwarming verbruik ------------------------------------------------------+ | | | | -11 koeler vermogen --------------------------------------------------------------+ | | | -12 koeler verbruik ------------------------------------------------------------------+ | | -13 gebeurtenis -----------------------------------------------------------------------------+ | -14 vergister uuid -----------------------------------------------------------------------------------+ +2014-11-15 18:39:12,BEER,PRIMARY,20.312,19.750,-1.500,20.5,18.6,18.8,35,12345,0,67890,Whatsup,Fermenter + | | | | | | | | | | | | | | | + 0 datetime + | | | | | | | | | | | | | | + 1 werkwijze ---------+ | | | | | | | | | | | | | + 2 vergisting fase ---------+ | | | | | | | | | | | | + 3 temperatuur lucht --------------+ | | | | | | | | | | | + 4 temperatuur bier ----------------------+ | | | | | | | | | | + 5 temperatuur koeler ---------------------------+ | | | | | | | | | + 6 temperatuur ruimte ----------------------------------+ | | | | | | | | + 7 instelwaarde laag ----------------------------------------+ | | | | | | | + 8 instelwaarde hoog ---------------------------------------------+ | | | | | | + 9 verwarming vermogen -----------------------------------------------+ | | | | | +10 verwarming verbruik ---------------------------------------------------+ | | | | +11 koeler vermogen -----------------------------------------------------------+ | | | +12 koeler verbruik ---------------------------------------------------------------+ | | +13 gebeurtenis --------------------------------------------------------------------------+ | +14 vergister uuid --------------------------------------------------------------------------------+ + + + + +Netwerk payload data formaat voor CO2 meters. + +Nog schrijven + + +{ + "seq":228196, + "metric":{ + "units":[ + { + "uuid":"c0ffeeee-dead-beef-caf0-3c71bffe4054", + "alias":"unit1", + "mode":"ON", + "alarm":0, + "temperature":{ + "state":"OK", + "address":"e001191420732a28", + "temperature":20.250 + }, + "pressure":{ + "state":"OK", + "channel":7, + "voltage":0.322, + "zero":0.110, + "bar":0.00 + } + }, + { + "uuid":"c0ffeeee-dead-beef-caf1-3c71bffe4054", + "alias":"unit2", + "mode":"OFF", + "alarm":1, + "temperature":{ + "state":"OK", + "address":"e001191420732a28", + "temperature":20.250 + }, + "pressure":{ + "state":"OK", + "channel":6, + "voltage":0.075, + "zero":0.109, + "bar":0.00 + } + } + ] + } +} Netwerk payload log formaat voor CO2 meters. -Voor iedere actieve CO2 meter wordt bij iedere systeemstart een logbericht -gestuurd. Dit is ongeveer iedere 5 minuten. Omdat de CO2 meters eenvoudige +Voor iedere actieve CO2 meter wordt bij iedere systeemstart en iedere vijf +minuten een logbericht gestuurd. Omdat de CO2 meters eenvoudige controllers zijn is er geen tijd en product informatie beschikbaar. Deze ontbrekende gegevens worden aangevuld door bmsd - +{ + "seq":228229, + "metric":{ + "uuid":"c0ffeeee-dead-beef-caf0-3c71bffe4054", + "temperature":21.125, + "pressure":0.000 + } +} De ontvangen CO2 log gegevens worden niet opgeslagen in de SQL database @@ -366,4 +428,103 @@ + + +Netwerk payload data formaat voor iSpindels. + +Iedere actieve iSpindel stuurt bij iedere systeemstart een bericht. +Daarna na iedere interval tijd in seconden een volgend bericht. +Omdat de iSpindel eenvoudige controllers zijn is er geen tijd en product +informatie beschikbaar. De instellingen voor bmsd in de iSpindel zijn: + + + +Unit of temperature: Celsius +Service Type: HTTP +Token: leeg laten +Server Address: het server IP adres +Server Port: 80 +Path / URI: /ispindel/index.php + + + +De densiteit wordt standaard door de iSpindel in graden Plato gegeven en zo worden +de gegevens ook verwerkt. Het SG wordt door de /ispindel/index.php +berekend. Dit script verzorgd de omzetting van de iSpindel POST data naar MQTT +data. + + + + + + + + +
iSpindel menu. + + + + + +
+
+
+ + +
iSpindel configuratie. + + + + + +
+
+
+
+ +
+
+ + +De ontbrekende gegevens worden aangevuld door bmsd +De volgende gegevens worden via het MQTT protocol ontvangen: + + +{ + "unit":{ + "uuid":"c0ffeeee-cafe-dead-bee0-2af236d50dc9", + "alias":"iSpindel000", + "alarm":0, + "interval":900, + "angle":42.96722, + "temperature":25.5625, + "battery":4.254432, + "gravity":9.306425 + } +} + + +De iSpindel stuurt geen aparte log informatie, alle informatie voor de logfile +wordt uit het standaard bericht gehaald. +De log gegevens worden niet opgeslagen in de SQL database +maar weggeschreven in platte tekst bestanden. Hierdoor is de gelogde informatie sneller toegankelijk. +Ieder brouw product heeft zijn eigen bestand. +De bestanden staan in www/logs/ispindel/. +De bestandsnamen zijn product_code\ product_name.log. +Het interne formaat is: + + 2020-01-05 14:01:53,19.3750,7.08093,1.02806,3.34724,38.78126,900,c0ffeeee-cafe-dead-bee0-2af236d50dc9 + | | | | | | | | + 0 datetime + | | | | | | | + 1 temperatuur -----------+ | | | | | | + 2 densiteit plato ---------------+ | | | | | + 3 densiteit SG --------------------------+ | | | | + 4 batterij voltage ------------------------------+ | | | + 5 tilt hoek ---------------------------------------------+ | | + 6 update interval ----------------------------------------------+ | + 7 ispindel uuid ------------------------------------------------------------------+ + +
+ + diff -r 9d1aa6f3a4da -r 4d01937ae7af doc/bms-ispindel-1.png Binary file doc/bms-ispindel-1.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af doc/bms-ispindel-2.png Binary file doc/bms-ispindel-2.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af doc/bms.sgml --- a/doc/bms.sgml Fri Oct 18 13:20:35 2019 +0200 +++ b/doc/bms.sgml Fri May 01 16:37:31 2020 +0200 @@ -1,4 +1,4 @@ - @@ -20,7 +20,7 @@ - 2018 + 2018-2020 M. Broek diff -r 9d1aa6f3a4da -r 4d01937ae7af doc/docbook-utils.dsl --- a/doc/docbook-utils.dsl Fri Oct 18 13:20:35 2019 +0200 +++ b/doc/docbook-utils.dsl Fri May 01 16:37:31 2020 +0200 @@ -181,7 +181,7 @@ (define %title-font-family% "Helvetica") ;;What font would you like for the body? -(define %body-font-family% "Palatino") +(define %body-font-family% "Helvetica") ;;What font would you like for mono-seq? (define %mono-font-family% "Courier New") @@ -207,13 +207,13 @@ (define %left-right-margin% 6pi) ;;How much indentation for the body? -(define %body-start-indent% 4pi) +(define %body-start-indent% 2pi) ;;How big is the left margin? (relative to physical page) -(define %left-margin% 8pi) ;white-paper-column +(define %left-margin% 6pi) ;white-paper-column ;;How big is the right margin? (relative to physical page) -(define %right-margin% 8pi) ;white-paper-column +(define %right-margin% 6pi) ;white-paper-column ;;How big do you want the margin at the top? (define %top-margin% diff -r 9d1aa6f3a4da -r 4d01937ae7af tools/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/Makefile Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,27 @@ +# Makefile for the mbsePi-apps/thermferm. + +include ../Makefile.global + +OTHER = Makefile bmsd.init + +############################################################################# + +.c.o: + ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< + +all: + + +clean: + rm -f filelist Makefile.bak + +install: + ${INSTALL} -c -g root -o root -m 0755 bmsd.init /etc/init.d/bmsd + [ -x /bin/systemctl ] && /bin/systemctl daemon-reload + +filelist: Makefile + BASE=`pwd`; \ + BASE=`basename $${BASE}`; \ + (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist + +depend: diff -r 9d1aa6f3a4da -r 4d01937ae7af tools/bmsd.init --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/bmsd.init Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,136 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bmsd +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Should-Start: mosquitto +# Should-Stop: mosquitto +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Brewery Management Daemon +# Description: This program is the central daemon to collect data +# from and control remote devices in a brewery. It is +# the production and inventory database. +### END INIT INFO + +# Author: Michiel Broek + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Brewery Management Daemon" +NAME=bmsd +DAEMON=/var/lib/bms/bin/$NAME +#DAEMON_ARGS="--options args" +PIDFILE=/var/lib/bms/.bms/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # other if daemon could not be started or a failure occured + start-stop-daemon --start --chuid brewery --exec $DAEMON +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # other if daemon could not be stopped or a failure occurred + start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff -r 9d1aa6f3a4da -r 4d01937ae7af www/Makefile --- a/www/Makefile Fri Oct 18 13:20:35 2019 +0200 +++ b/www/Makefile Fri May 01 16:37:31 2020 +0200 @@ -3,15 +3,18 @@ include ../Makefile.global -SRC = cmd_fermenter.php cmd_co2meter.php \ - config.php.dist crontasks.php favicon.ico gen_about.php \ +SRC = cmd_fermenter.php cmd_co2meter.php cmd_ispindel.php config.php.dist crontasks.php \ + export_equipments.php export_fermentables.php export_hops.php export_mashs.php \ + export_miscs.php export_styles.php export_suppliers.php export_waters.php \ + export_yeasts.php favicon.ico gen_about.php \ getbrewlog.php getco2meter.php getco2pressurelog.php getfermentablesources.php \ getfermenter.php getfermentlog.php gethopsources.php getmiscsources.php getnode.php \ - getwatersources.php getyeastsources.php import_ingredients.php index.php \ + getwatersources.php getyeastsources.php getispindel.php getispindellog.php \ + import_ingredients.php index.php \ inv_equipments.php inv_fermentables.php inv_hops.php inv_instock.php \ - inv_miscs.php inv_suppliers.php inv_waters.php inv_yeasts.php \ - log_brew.php log_co2pressure.php log_fermentation.php \ - mon_brewer.php mon_co2meter.php mon_fermenter.php mon_node.php \ + inv_miscs.php inv_suppliers.php inv_waters.php inv_yeasts.php inv_yeastlab.php \ + log_brew.php log_co2pressure.php log_fermentation.php log_ispindel.php \ + mon_brewer.php mon_co2meter.php mon_fermenter.php mon_ispindel.php mon_node.php \ prod_archive_code.php prod_archive_date.php prod_archive_name.php prod_beerxml.php \ prod_checklist.php prod_divide.php prod_duplicate.php prod_edit.php prod_export.php prod_forum.php \ prod_impbrew.php prod_inprod.php prod_new.php prod_print.php prod_torecipe.php \ @@ -27,12 +30,10 @@ includes/* fpdf/* import/* OTHER = Makefile CSS_FILES = $(filter-out %-min.css,$(wildcard css/*.css css/**/*.css )) -JS_FILES = $(filter-out %-min.js,$(wildcard js/*.js js/**/*.js )) YUI_COMPRESSOR = yui-compressor YUI_COMPRESSOR_FLAGS = --charset utf-8 --verbose CSS_MINIFIED = $(CSS_FILES:.css=-min.css) -JS_MINIFIED = $(JS_FILES:.js=-min.js) @@ -41,38 +42,34 @@ .c.o: ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< -all: minify-css minify-js +all: minify-css clean: - rm -f version.php ${CSS_MINIFIED} ${JS_MINIFIED} + rm -f version.php ${CSS_MINIFIED} minify-css: $(CSS_FILES) $(CSS_MINIFIED) -minify-js: $(JS_FILES) $(JS_MINIFIED) %-min.css: %.css @echo '==> Minifying $<' $(YUI_COMPRESSOR) $(YUI_COMPRESSOR_FLAGS) --type css $< >$@ @echo -%-min.js: %.js - @echo '==> Minifying $<' - $(YUI_COMPRESSOR) $(YUI_COMPRESSOR_FLAGS) --type js $< >$@ - @echo - - install: ${INSTALL} -d -g 314 -o 314 ${PREFIX} ${WWWDIR} ${WWWDIR}/css ${WWWDIR}/fpdf \ - ${WWWDIR}/fpdf/font \ + ${WWWDIR}/fpdf/font ${WWWDIR}/ispindel \ ${WWWDIR}/jqwidgets ${WWWDIR}/js ${WWWDIR}/images/ ${WWWDIR}/includes/ ${INSTALL} -d -g 314 -o 314 -m 0777 ${WWWDIR}/run ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/brews ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/fermentation + ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/co2pressure + ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/ispindel ${INSTALL} -g 314 -o 314 -m 0644 ${SRC} ${WWWDIR}/ ${INSTALL} -g 314 -o 314 -m 0644 version.php ${WWWDIR}/ ${INSTALL} -g 314 -o 314 -m 0644 css/* ${WWWDIR}/css/ ${INSTALL} -g 314 -o 314 -m 0644 images/* ${WWWDIR}/images/ ${INSTALL} -g 314 -o 314 -m 0644 includes/* ${WWWDIR}/includes/ + ${INSTALL} -g 314 -o 314 -m 0644 ispindel/* ${WWWDIR}/ispindel/ cp -r jqwidgets/* ${WWWDIR}/jqwidgets/ chown -R 314:314 ${WWWDIR}/jqwidgets cp -r -p fpdf/* ${WWWDIR}/fpdf/ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/cmd_ispindel.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/cmd_ispindel.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,29 @@ + diff -r 9d1aa6f3a4da -r 4d01937ae7af www/crontasks.php --- a/www/crontasks.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/crontasks.php Fri May 01 16:37:31 2020 +0200 @@ -74,9 +74,9 @@ /* - * Check fementation logs. + * Check several logs. */ -$query = "SELECT record,code,name,log_brew,log_fermentation FROM products;"; +$query = "SELECT record,code,name,log_brew,log_fermentation,log_ispindel,log_co2pressure FROM products;"; $result = mysqli_query($connect, $query); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $logfile = "log/fermentation/" . $row['code'] . " " . $row['name'] . ".log"; @@ -89,6 +89,26 @@ syslog(LOG_NOTICE, $query); $result1 = mysqli_query($connect, $query); } + $logfile = "log/ispindel/" . $row['code'] . " " . $row['name'] . ".log"; + if (file_exists($logfile)) + $ok = 1; + else + $ok = 0; + if ($ok != $row['log_ispindel']) { + $query = "UPDATE products SET log_ispindel='" . $ok . "' WHERE record='" . $row['record'] . "';"; + syslog(LOG_NOTICE, $query); + $result1 = mysqli_query($connect, $query); + } + $logfile = "log/co2pressure/" . $row['code'] . " " . $row['name'] . ".log"; + if (file_exists($logfile)) + $ok = 1; + else + $ok = 0; + if ($ok != $row['log_co2pressure']) { + $query = "UPDATE products SET log_co2pressure='" . $ok . "' WHERE record='" . $row['record'] . "';"; + syslog(LOG_NOTICE, $query); + $result1 = mysqli_query($connect, $query); + } } diff -r 9d1aa6f3a4da -r 4d01937ae7af www/css/style-min.css --- a/www/css/style-min.css Fri Oct 18 13:20:35 2019 +0200 +++ b/www/css/style-min.css Fri May 01 16:37:31 2020 +0200 @@ -1,1 +1,1 @@ -body{background:#ccc;font-family:Verdana,Arial,sans-serif;margin:0}#MainPanel,#fermenter,#co2meter{width:1278px;height:628px;border:2px solid #4297d7;background:#252526;float:left;color:#eee}#water_totals{width:960px;background:#353536;margin-top:15px;border:1px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#propagator{width:800px;background:#353536;margin-top:15px;border:1px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#export_table,#about_table{width:960px;background:#353536;margin:150px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#node_table{width:600px;background:#353536;margin:50px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_table,#co2meter_table{width:960px;height:210px;background:#252526;margin:5px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}.ebccolor{float:left;margin-left:10px;width:75px;height:23px;border:1px solid #59b4d4;border-radius:6px;moz-border-radius:6px;webkit-border-radius:6px;background:#212121}#fermenter_thermometers,#co2meter_meters{width:960px;height:390px;float:left;background-color:#252526;margin:5px;margin-top:3px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_panel_top,#co2meter_panel_top{width:290px;height:100px;float:right;margin:5px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_doorled,#fermenter_lightled,#fermenter_alarmled,#fermenter_powerled{width:50px;height:30px;float:left;text-align:center;margin-top:15px;margin-left:20px}#co2meter_alarmled,#co2meter_powerled{width:50px;height:30px;float:right;text-align:center;margin-top:15px;margin-right:20px}#co2meter_panel_display{width:290px;height:260px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_panel_display{width:290px;height:98px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_display{width:145px;height:98px;float:left;text-align:center}#fermenter_panel_control{width:290px;height:150px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_led1,#fermenter_led2,#fermenter_led3{width:96px;height:30px;float:left;text-align:center;margin-top:13px}#fermenter_toggle1{float:left;margin-left:29px;margin-top:20px}#fermenter_toggle2,#fermenter_toggle3{float:left;margin-left:60px;margin-top:20px}#fermenter_panel_buttons,#co2meter_panel_buttons{width:290px;height:227px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}.LEDred_on{margin:5px auto;width:18px;height:18px;background-color:#F40;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #C33 0 -1px 5px,#f44 0 2px 12px}.LEDred_off{margin:5px auto;width:18px;height:18px;background-color:#820;border-radius:50%;box-shadow:#400 0 0 1px 1px}.LEDyellow_on{margin:5px auto;width:18px;height:18px;background-color:#FF0;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #860 0 -1px 5px,#DD0 0 2px 12px}.LEDyellow_off{margin:5px auto;width:18px;height:18px;background-color:#A90;border-radius:50%;box-shadow:#440 0 0 1px 1px}.LEDgreen_on{margin:5px auto;width:18px;height:18px;background-color:#5E0;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #270 0 -1px 5px,#5D0 0 2px 12px}.LEDgreen_off{margin:5px auto;width:18px;height:18px;background-color:#270;border-radius:50%;box-shadow:#250 0 0 1px 1px}.LEDblue_on{margin:5px auto;width:18px;height:18px;background-color:#4AF;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #247 0 -1px 5px,#48F 0 2px 12px}.LEDblue_off{margin:5px auto;width:18px;height:18px;background-color:#137;border-radius:50%;box-shadow:#024 0 0 1px 1px}#hintBase,#hintStyle,#hintEq{float:left;margin-top:30px;margin-right:20px;padding:5px;width:600px;color:yellow}#section{margin:5px}#baseButtonsWrapper{float:right;margin-top:30px;margin-right:10px;width:160px}#styleButtonsWrapper{float:right;margin-top:30px;margin-right:10px;width:320px}#eqButtonsWrapper{float:right;margin-top:30px;margin-right:10px;width:320px}#completedButtonsWrapper{float:right;margin-right:10px;width:320px;margin-top:160px}.nextButton{float:right;margin-left:0}.backButton{float:left;margin-left:10px} \ No newline at end of file +body{background:#ccc;font-family:Verdana,Arial,sans-serif;margin:0}#MainPanel,#fermenter,#co2meter,#ispindel{width:1278px;height:628px;border:2px solid #4297d7;background:#252526;float:left;color:#eee}#water_totals{width:960px;background:#353536;margin-top:15px;border:1px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#propagator{width:800px;background:#353536;margin-top:15px;border:1px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#export_table,#about_table{width:960px;background:#353536;margin:150px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#node_table{width:600px;background:#353536;margin:50px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_table,#co2meter_table,#ispindel_table{width:960px;height:210px;background:#252526;margin:5px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}.ebccolor{float:left;margin-left:10px;width:75px;height:23px;border:1px solid #59b4d4;border-radius:6px;moz-border-radius:6px;webkit-border-radius:6px;background:#212121}#fermenter_thermometers,#co2meter_meters,#ispindel_meters{width:960px;height:390px;float:left;background-color:#252526;margin:5px;margin-top:3px;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_panel_top,#co2meter_panel_top,#ispindel_panel_top{width:290px;height:100px;float:right;margin:5px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_doorled,#fermenter_lightled,#fermenter_alarmled,#fermenter_powerled{width:50px;height:30px;float:left;text-align:center;margin-top:15px;margin-left:20px}#co2meter_alarmled,#co2meter_powerled,#ispindel_alarmled,#ispindel_powerled{width:50px;height:30px;float:right;text-align:center;margin-top:15px;margin-right:20px}#co2meter_panel_display,#ispindel_panel_display{width:290px;height:260px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_panel_display{width:290px;height:98px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_display{width:145px;height:98px;float:left;text-align:center}#fermenter_panel_control{width:290px;height:150px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}#fermenter_led1,#fermenter_led2,#fermenter_led3{width:96px;height:30px;float:left;text-align:center;margin-top:13px}#fermenter_toggle1{float:left;margin-left:29px;margin-top:20px}#fermenter_toggle2,#fermenter_toggle3{float:left;margin-left:60px;margin-top:20px}#fermenter_panel_buttons,#co2meter_panel_buttons,#ispindel_panel_buttons{width:290px;height:227px;float:right;margin:5px;margin-top:3px;background-color:#252526;border:2px solid;border-color:#59b4d4;border-radius:5px 5px 5px 5px}.LEDred_on{margin:5px auto;width:18px;height:18px;background-color:#F40;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #C33 0 -1px 5px,#f44 0 2px 12px}.LEDred_off{margin:5px auto;width:18px;height:18px;background-color:#820;border-radius:50%;box-shadow:#400 0 0 1px 1px}.LEDyellow_on{margin:5px auto;width:18px;height:18px;background-color:#FF0;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #860 0 -1px 5px,#DD0 0 2px 12px}.LEDyellow_off{margin:5px auto;width:18px;height:18px;background-color:#A90;border-radius:50%;box-shadow:#440 0 0 1px 1px}.LEDgreen_on{margin:5px auto;width:18px;height:18px;background-color:#5E0;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #270 0 -1px 5px,#5D0 0 2px 12px}.LEDgreen_off{margin:5px auto;width:18px;height:18px;background-color:#270;border-radius:50%;box-shadow:#250 0 0 1px 1px}.LEDblue_on{margin:5px auto;width:18px;height:18px;background-color:#4AF;border-radius:50%;box-shadow:#000 0 0 4px 1px,inset #247 0 -1px 5px,#48F 0 2px 12px}.LEDblue_off{margin:5px auto;width:18px;height:18px;background-color:#137;border-radius:50%;box-shadow:#024 0 0 1px 1px}#hintBase,#hintStyle,#hintEq{float:left;margin-top:30px;margin-right:20px;padding:5px;width:600px;color:yellow}#section{margin:5px}#baseButtonsWrapper{float:right;margin-top:30px;margin-right:10px;width:160px}#styleButtonsWrapper{float:right;margin-top:30px;margin-right:10px;width:320px}#eqButtonsWrapper{float:right;margin-top:30px;margin-right:10px;width:320px}#completedButtonsWrapper{float:right;margin-right:10px;width:320px;margin-top:160px}.nextButton{float:right;margin-left:0}.backButton{float:left;margin-left:10px} \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/css/style.css --- a/www/css/style.css Fri Oct 18 13:20:35 2019 +0200 +++ b/www/css/style.css Fri May 01 16:37:31 2020 +0200 @@ -10,7 +10,8 @@ #MainPanel, #fermenter, -#co2meter { +#co2meter, +#ispindel { width: 1278px; height: 628px; border: 2px solid #4297d7; @@ -65,7 +66,8 @@ #fermenter_table, -#co2meter_table { +#co2meter_table, +#ispindel_table { width: 960px; height: 210px; background: #252526; @@ -105,7 +107,8 @@ */ #fermenter_thermometers, -#co2meter_meters { +#co2meter_meters, +#ispindel_meters { width: 960px; height: 390px; float: left; @@ -140,7 +143,8 @@ * +-------------------------------+ */ #fermenter_panel_top, -#co2meter_panel_top { +#co2meter_panel_top, +#ispindel_panel_top { width: 290px; height: 100px; float: right; @@ -164,7 +168,9 @@ } #co2meter_alarmled, -#co2meter_powerled { +#co2meter_powerled, +#ispindel_alarmled, +#ispindel_powerled { width: 50px; height: 30px; float: right; @@ -173,7 +179,8 @@ margin-right: 20px; } -#co2meter_panel_display { +#co2meter_panel_display, +#ispindel_panel_display { width: 290px; height: 260px; float: right; @@ -241,7 +248,8 @@ #fermenter_panel_buttons, -#co2meter_panel_buttons { +#co2meter_panel_buttons, +#ispindel_panel_buttons { width: 290px; height: 227px; float: right; diff -r 9d1aa6f3a4da -r 4d01937ae7af www/export_equipments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/export_equipments.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,134 @@ + 1) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'TOP_UP_KETTLE'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['top_up_kettle']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'HOP_UTILIZATION'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['hop_utilization']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'LAUTER_VOLUME'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['lauter_volume']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'LAUTER_HEIGHT'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['lauter_height']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'LAUTER_DEADSPACE'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['lauter_deadspace']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'KETTLE_VOLUME'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['kettle_volume']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'KETTLE_HEIGHT'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['kettle_height']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'MASH_VOLUME'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['mash_volume']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'EFFICIENCY'); + xmlwriter_text($xw, sprintf("%.5f", floatval($row['efficiency']))); + xmlwriter_end_element($xw); + + xmlwriter_end_element($xw); // EQUIPMENT +} +xmlwriter_end_element($xw); // EQUIPMENTS + +$beerxml = xmlwriter_output_memory($xw); + +Header('Content-type: text/xml'); +header('Content-Disposition: attachment; filename="equipments.xml"'); +header('Content-Transfer-Encoding: binary'); +header('Expires: 0'); +header('Pragma: no-cache'); +header('Content-Length: '.strlen($beerxml)); +exit($beerxml); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/export_fermentables.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/export_fermentables.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,144 @@ + 1) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'ORIGIN'); + xmlwriter_text($xw, $row['origin']); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'SUPPLIER'); + xmlwriter_text($xw, $row['supplier']); + xmlwriter_end_element($xw); + + if (floatval($row['coarse_fine_diff'])) { + xmlwriter_start_element($xw, 'COARSE_FINE_DIFF'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['coarse_fine_diff']))); + xmlwriter_end_element($xw); + } + + if (floatval($row['moisture'])) { + xmlwriter_start_element($xw, 'MOISTURE'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['moisture']))); + xmlwriter_end_element($xw); + } + + if (floatval($row['diastatic_power'])) { + xmlwriter_start_element($xw, 'DIASTATIC_POWER'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['diastatic_power']))); + xmlwriter_end_element($xw); + } + + if (floatval($row['protein'])) { + xmlwriter_start_element($xw, 'PROTEIN'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['protein']))); + xmlwriter_end_element($xw); + } + + if (floatval($row['max_in_batch'])) { + xmlwriter_start_element($xw, 'MAX_IN_BATCH'); + xmlwriter_text($xw, sprintf("%.3f",floatval($row['max_in_batch']))); + xmlwriter_end_element($xw); + } + + xmlwriter_start_element($xw, 'RECOMMEND_MASH'); + ($row['recommend_mash']) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'DISPLAY_COLOR'); + xmlwriter_text($xw, sprintf("%.0f EBC",floatval($row['color']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'GRAINTYPE'); + xmlwriter_text($xw, $graintype[$row['graintype']]); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'ADDED'); + xmlwriter_text($xw, $addedtype[$row['added']]); + xmlwriter_end_element($xw); + + if (floatval($row['di_ph'])) { + xmlwriter_start_element($xw, 'DI_pH'); + xmlwriter_text($xw, sprintf("%.5f",floatval($row['di_ph']))); + xmlwriter_end_element($xw); + } + + if (floatval($row['acid_to_ph_57'])) { + xmlwriter_start_element($xw, 'ACID_TO_pH_5.7'); + xmlwriter_text($xw, sprintf("%.5f",floatval($row['acid_to_ph_57']))); + xmlwriter_end_element($xw); + } + + xmlwriter_end_element($xw); // FERMENTABLE +} +xmlwriter_end_element($xw); // FERMENTABLES + +$beerxml = xmlwriter_output_memory($xw); + +Header('Content-type: text/xml'); +header('Content-Disposition: attachment; filename="fermentables.xml"'); +header('Content-Transfer-Encoding: binary'); +header('Expires: 0'); +header('Pragma: no-cache'); +header('Content-Length: '.strlen($beerxml)); +exit($beerxml); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/export_hops.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/export_hops.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,125 @@ + 0) { + xmlwriter_start_element($xw, 'COST'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['cost']))); + xmlwriter_end_element($xw); + } + + xmlwriter_end_element($xw); // HOP +} +xmlwriter_end_element($xw); // HOPS + +$beerxml = xmlwriter_output_memory($xw); + +Header('Content-type: text/xml'); +header('Content-Disposition: attachment; filename="hops.xml"'); +header('Content-Transfer-Encoding: binary'); +header('Expires: 0'); +header('Pragma: no-cache'); +header('Content-Length: '.strlen($beerxml)); +exit($beerxml); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/export_mashs.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/export_mashs.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,100 @@ + 0) { + xmlwriter_start_element($xw, 'TIME'); + xmlwriter_text($xw, sprintf("%.3f",floatval($row['time']))); + xmlwriter_end_element($xw); + } + + if (floatval($row['cost']) > 0) { + xmlwriter_start_element($xw, 'COST'); + xmlwriter_text($xw, sprintf("%.5f",floatval($row['cost']))); + xmlwriter_end_element($xw); + } + + xmlwriter_start_element($xw, 'ALWAYS_ON_STOCK'); + ($row['always_on_stock']) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); + xmlwriter_end_element($xw); + + if (strlen($row['notes'])) { + xmlwriter_start_element($xw, 'NOTES'); + xmlwriter_text($xw, $row['notes']); + xmlwriter_end_element($xw); + } + + if (strlen($row['use_for'])) { + xmlwriter_start_element($xw, 'USE_FOR'); + xmlwriter_text($xw, $row['use_for']); + xmlwriter_end_element($xw); + } + + xmlwriter_end_element($xw); // MISC +} +xmlwriter_end_element($xw); // MISCS + +$beerxml = xmlwriter_output_memory($xw); + +Header('Content-type: text/xml'); +header('Content-Disposition: attachment; filename="miscs.xml"'); +header('Content-Transfer-Encoding: binary'); +header('Expires: 0'); +header('Pragma: no-cache'); +header('Content-Length: '.strlen($beerxml)); +exit($beerxml); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/export_styles.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/export_styles.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,151 @@ + 0) { + xmlwriter_start_element($xw, 'COST'); + xmlwriter_text($xw, sprintf("%.5f",floatval($row['cost']))); + xmlwriter_end_element($xw); + } + + if (strlen($row['notes'])) { + xmlwriter_start_element($xw, 'NOTES'); + xmlwriter_text($xw, $row['notes']); + xmlwriter_end_element($xw); + } + + xmlwriter_start_element($xw, 'CALCIUM'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['calcium']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'BICARBONATE'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['bicarbonate']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'SULFATE'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['sulfate']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'CHLORIDE'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['chloride']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'SODIUM'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['sodium']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'MAGNESIUM'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['magnesium']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'TOTAL_ALKALINITY'); + xmlwriter_text($xw, sprintf("%.4f",floatval($row['total_alkalinity']))); + xmlwriter_end_element($xw); + + xmlwriter_start_element($xw, 'PH'); + xmlwriter_text($xw, sprintf("%.5f",floatval($row['ph']))); + xmlwriter_end_element($xw); + + xmlwriter_end_element($xw); // WATER +} +xmlwriter_end_element($xw); // WATERS + +$beerxml = xmlwriter_output_memory($xw); + +Header('Content-type: text/xml'); +header('Content-Disposition: attachment; filename="waters.xml"'); +header('Content-Transfer-Encoding: binary'); +header('Expires: 0'); +header('Pragma: no-cache'); +header('Content-Length: '.strlen($beerxml)); +exit($beerxml); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/export_yeasts.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/export_yeasts.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,75 @@ + 0) + field($xw, 'COST', sprintf("%.5f",floatval($row['cost']))); + if (strlen($row['notes'])) + field($xw, 'NOTES', $row['notes']); + + xmlwriter_end_element($xw); // YEAST +} +xmlwriter_end_element($xw); // YEASTS + +$beerxml = xmlwriter_output_memory($xw); + +Header('Content-type: text/xml'); +header('Content-Disposition: attachment; filename="yeasts.xml"'); +header('Content-Transfer-Encoding: binary'); +header('Expires: 0'); +header('Pragma: no-cache'); +header('Content-Length: '.strlen($beerxml)); +exit($beerxml); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getco2pressurelog.php --- a/www/getco2pressurelog.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/getco2pressurelog.php Fri May 01 16:37:31 2020 +0200 @@ -5,15 +5,21 @@ if (isset($_GET["code"])) $code = $_GET["code"] . ' ' . $_GET["name"]; else - $code = "TB0015 Winterbier-2"; + $code = "CB0080 Op stoom"; $filename = 'log/co2pressure/' . $code . '.log'; +if (! file_exists($filename)) { + header("Content-type: application/json"); + echo '{}'; + exit; +} + + /* * From Stackoverflow, the fastest way to count the lines in a file. */ $file = new \SplFileObject($filename, 'r'); $file->seek(PHP_INT_MAX); -// $file->key() = lines in the file. define ('MAX_INTERVALS', 10); $GRAPH_INTERVAL = array ( 0, 1, 5, 15, 30, 60, 120, 240, 480, 720 ); @@ -27,7 +33,6 @@ if ($graphstep > MAX_INTERVALS) $graphstep = MAX_INTERVALS; -//echo $code . '.log lines=' . $file->key() . ' interval=' . $GRAPH_INTERVAL[$graphstep] . ' graphstep=' . $graphstep . PHP_EOL; /* * 2014-11-15 18:39:12,TEMPERATURE,PRESSURE,UUID @@ -58,34 +63,13 @@ (($graphstep == 7) && (substr($buffer, 14, 2) == '00') && (($hr % 4) == 0)) || (($graphstep == 8) && (substr($buffer, 14, 2) == '00') && (($hr % 8) == 0)) || (($graphstep == 9) && (substr($buffer, 14, 2) == '00') && (($hr % 12) == 0))) { -// echo $hr . ' ' . $row[1] . ' ' . $buffer; $lines++; - -// $heat_used = $cool_used = 0; -// if ($row[10] && ($row[10] != "NA") && ($heater_l > 0)) { -// $heat_used = round((intval($row[10]) - $heater_l) * 100 / ($GRAPH_INTERVAL[$graphstep] * 60)); -// } -// if ($row[12] && ($row[12] != "NA") && ($cooler_l > 0)) { -// $cool_used = round((intval($row[12]) - $cooler_l) * 100 / ($GRAPH_INTERVAL[$graphstep] * 60)); -// } - - -// echo $GRAPH_INTERVAL[$graphstep] . ' ' . $heat_used . ' ' . $cool_used . PHP_EOL; - -// if (($heat_used <= 100) && ($cool_used <= 100)) { $logs[] = array( 'date' => $row[0], 'temperature' => $row[1], 'pressure' => $row[2] ); -// } - -// if ($row[10] && ($row[10] != "NA")) -// $heater_l = intval($row[10]); -// if ($row[12] && ($row[12] != "NA")) -// $cooler_l = intval($row[12]); } - } if (!feof($handle)) { echo "Error: unexpected fgets() fail\n"; @@ -94,4 +78,3 @@ } header("Content-type: application/json"); echo json_encode($logs); -//echo $lines . ' lines' . PHP_EOL; diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getfermenter.php --- a/www/getfermenter.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/getfermenter.php Fri May 01 16:37:31 2020 +0200 @@ -12,10 +12,5 @@ $query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid.""; $result = $mysqli->query($query); $resultArray = $result->fetch_array(MYSQLI_ASSOC); -if ($resultArray['online'] == 'Y') { - $resultArray['online'] = 1; -} else { - $resultArray['online'] = 0; -} header("Content-type: application/json"); echo json_encode($resultArray); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getfermentlog.php --- a/www/getfermentlog.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/getfermentlog.php Fri May 01 16:37:31 2020 +0200 @@ -8,12 +8,18 @@ $code = "TB0015 Winterbier-2"; $filename = 'log/fermentation/' . $code . '.log'; +if (! file_exists($filename)) { + header("Content-type: application/json"); + echo '{}'; + exit; +} + + /* * From Stackoverflow, the fastest way to count the lines in a file. */ $file = new \SplFileObject($filename, 'r'); $file->seek(PHP_INT_MAX); -// $file->key() = lines in the file. define ('MAX_INTERVALS', 10); $GRAPH_INTERVAL = array ( 0, 1, 5, 15, 30, 60, 120, 240, 480, 720 ); @@ -27,8 +33,6 @@ if ($graphstep > MAX_INTERVALS) $graphstep = MAX_INTERVALS; -//echo $code . '.log lines=' . $file->key() . ' interval=' . $GRAPH_INTERVAL[$graphstep] . ' graphstep=' . $graphstep . PHP_EOL; - /* * 2014-11-15 18:39,BEER,PRIMARY,20.312,19.750,-1.500,20.5,18.6,18.8,35,12345,0,67890,Whatsup * | | | | | | | | | | | | | | @@ -115,4 +119,3 @@ } header("Content-type: application/json"); echo json_encode($logs); -//echo $lines . ' lines' . PHP_EOL; diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getispindel.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/getispindel.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,16 @@ +query($query); +$resultArray = $result->fetch_array(MYSQLI_ASSOC); +header("Content-type: application/json"); +echo json_encode($resultArray); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getispindellog.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/getispindellog.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,50 @@ + $row[0], + 'temperature' => $row[1], + 'plato' => $row[2], + 'sg' => $row[3], + 'battery' => $row[4] + ); + } + if (!feof($handle)) { + echo "Error: unexpected fgets() fail\n"; + } + fclose($handle); +} +header("Content-type: application/json"); +echo json_encode($logs); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getnode.php --- a/www/getnode.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/getnode.php Fri May 01 16:37:31 2020 +0200 @@ -13,10 +13,5 @@ $result = $mysqli->query($query); //Copy result into a associative array $resultArray = $result->fetch_array(MYSQLI_ASSOC); -if ($resultArray['online'] == 'Y') { - $resultArray['online'] = 1; -} else { - $resultArray['online'] = 0; -} header("Content-type: application/json"); echo json_encode($resultArray); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/getyeastsources.php --- a/www/getyeastsources.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/getyeastsources.php Fri May 01 16:37:31 2020 +0200 @@ -23,7 +23,14 @@ 'cells' => $row['cells'], 'inventory' => $row['inventory'], 'cost' => $row['cost'], - 'tolerance' => $row['tolerance'] + 'tolerance' => $row['tolerance'], + 'sta1' => $row['sta1'], + 'bacteria' => $row['bacteria'], + 'harvest_top' => $row['harvest_top'], + 'harvest_time' => $row['harvest_time'], + 'pitch_temperature' => $row['pitch_temperature'], + 'pofpos' => $row['pofpos'], + 'zymocide' => $row['zymocide'] ); } header("Content-type: application/json"); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/images/science.png Binary file www/images/science.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/constants.php --- a/www/includes/constants.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/constants.php Fri May 01 16:37:31 2020 +0200 @@ -6,6 +6,7 @@ $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' ); $coolingtype = array( '-', 'Dompelkoeler', 'Tegenstroomkoeler', 'Au bain marie', 'Laten afkoelen' ); $aerationtype = array( 'Geen', 'Lucht', 'Zuurstof' ); +$splitat = array( 'Niet', 'Na maischen', 'Na koken', 'Na koelen', 'Na hoofdgisting', 'Na nagisting', 'Na lageren' ); $added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen', 'Fust' ); $fermentabletype = array( 'Mout', 'Suiker', 'Vloeibaar extract', 'Droog extract', 'Ongemout graan' ); @@ -23,5 +24,7 @@ $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); $mashtype = array( 'Infusie', 'Verwarming', 'Decoctie' ); +$acidtype = array( 'Melkzuur', 'Zoutzuur', 'Fosforzuur', 'Zwavelzuur' ); + ?> diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/db_divides.php --- a/www/includes/db_divides.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/db_divides.php Fri May 01 16:37:31 2020 +0200 @@ -4,75 +4,418 @@ require($_SERVER['DOCUMENT_ROOT']."/version.php"); #Connect to the database -$connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); -if (! $connect) { +$link = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); +if (! $link) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } -mysqli_set_charset($connect, "utf8" ); +mysqli_set_charset($link, "utf8" ); +$escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); +$replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); +$rescapers = array("'"); +$rreplacements = array("\\'"); +$disallowed = array('visibleindex','uniqueid','boundindex','uid','h_weight','m_weight'); -if (isset($_POST['insert']) || isset($_POST['update'])) { - if (isset($_POST['insert'])) { - $sql = "INSERT INTO `divides` SET "; - } - if (isset($_POST['update'])) { - $sql = "UPDATE `divides` SET "; +/* + * Server side split batch. Parameters: + * record = original record. + * divide_type = divide moment. + * divide parts = number of divisions + * divide_data = array with { size, factor, part, name, code } where index 0 is original + * + * generate the new records and modify the original record. + * rollback if something goes wrong. + * return ok or error + */ + +if (isset($_POST['record']) && isset($_POST['divide_type']) && isset($_POST['divide_parts']) && isset($_POST['divide_data'])) { + + $rc = 0; + $record = $_POST['record']; + $divide_parts = $_POST['divide_parts']; + $divide_type = $_POST['divide_type']; + $divide_data = array_reverse($_POST['divide_data'], true); // reverse the array so the master record is last. + + syslog(LOG_NOTICE, "db_divide: record " . $record . " divide_type " . $divide_type . " parts " . $divide_parts); + + foreach ($divide_data as $index => &$split) { + syslog(LOG_NOTICE, "db_divide: index " . $index); + + foreach ($split as $key => &$value) { + syslog(LOG_NOTICE, "db_divide: index " . $index . " key " . $key . " value " . $value); } - $sql .= "divide_from='" . mysqli_real_escape_string($connect, $_POST['divide_from']); - $sql .= "', divide_type='" . $_POST['divide_type']; - $sql .= "', divide_size='" . $_POST['divide_size']; - $sql .= "', divide_part='" . $_POST['divide_part']; - $sql .= "', name='" . mysqli_real_escape_string($connect, $_POST['name']); - $sql .= "', code='" . mysqli_real_escape_string($connect, $_POST['code']); - if (isset($_POST['insert'])) { - $sql .= "';"; - } - if (isset($_POST['update'])) { - $sql .= "' WHERE record='" . $_POST['record'] . "';"; + $result = mysqli_query($link, "SELECT * FROM products WHERE record='" . $record . "'"); + if (! $result) { + syslog(LOG_NOTICE, "db_divide: result: ".mysqli_error($link)); } - syslog(LOG_NOTICE, $sql); + $row = mysqli_fetch_array($result); + $factor = floatval($split['factor']); - $result = mysqli_query($connect, $sql); - if (! $result) { - syslog(LOG_NOTICE, "db_divides: ".$sql." result: ".mysqli_error($connect)); - } else { - if (isset($_POST['update'])) { - syslog(LOG_NOTICE, "db_divides: updated record ".$_POST['record']); - } else { - $lastid = mysqli_insert_id($connect); - syslog(LOG_NOTICE, "db_divides: inserted record ".$lastid); - } - } - echo $result; + if ($index == 0) { + /* + * Update the main record + */ + $sql = "UPDATE `products` SET "; + $sql .= "brew_sparge_volume='" . sprintf("%.1f", $row['brew_sparge_volume'] * $factor); + $sql .= "', brew_sparge_est='" . sprintf("%.1f", $row['brew_sparge_est'] * $factor); + $sql .= "', brew_preboil_volume='" . sprintf("%.1f", $row['brew_preboil_volume'] * $factor); + $sql .= "', brew_aboil_volume='" . sprintf("%.1f", $row['brew_aboil_volume'] * $factor); + $sql .= "', brew_fermenter_volume='" . sprintf("%.1f", $row['brew_fermenter_volume'] * $factor); + $sql .= "', brew_fermenter_extrawater='" . sprintf("%.1f", $row['brew_fermenter_extrawater'] * $factor); + $sql .= "', brew_fermenter_tcloss='" . sprintf("%.1f", $row['brew_fermenter_tcloss'] * $factor); + $sql .= "', package_volume='" . sprintf("%.1f", $row['package_volume'] * $factor); + $sql .= "', package_infuse_amount='" . sprintf("%.1f", $row['package_infuse_amount'] * $factor); + $sql .= "', bottle_amount='" . sprintf("%.1f", $row['bottle_amount'] * $factor); + $sql .= "', bottle_priming_water='" . sprintf("%.3f", $row['bottle_priming_water'] * $factor); + $sql .= "', keg_amount='" . sprintf("%.1f", $row['keg_amount'] * $factor); + $sql .= "', keg_priming_water='" . sprintf("%.3f", $row['keg_priming_water'] * $factor); + $sql .= "', batch_size='" . sprintf("%.2f", $row['batch_size'] * $factor); + $sql .= "', boil_size='" . sprintf("%.2f", $row['boil_size'] * $factor); + $sql .= "', sparge_volume='" . sprintf("%.1f", $row['sparge_volume'] * $factor); + $sql .= "', sparge_acid_amount='" . sprintf("%.5f", $row['sparge_acid_amount'] * $factor); + $sql .= "', w1_amount='" . sprintf("%.2f", $row['w1_amount'] * $factor); + $sql .= "', w2_amount='" . sprintf("%.2f", $row['w2_amount'] * $factor); + $sql .= "', wg_amount='" . sprintf("%.2f", $row['wg_amount'] * $factor); + $sql .= "', prop1_volume='" . sprintf("%.3f", $row['prop1_volume'] * $factor); + $sql .= "', prop2_volume='" . sprintf("%.3f", $row['prop2_volume'] * $factor); + $sql .= "', prop3_volume='" . sprintf("%.3f", $row['prop3_volume'] * $factor); + $sql .= "', prop4_volume='" . sprintf("%.3f", $row['prop4_volume'] * $factor); + $sql .= "', divide_type='" . $divide_type; + $sql .= "', divide_parts='" . $divide_parts; + $sql .= "', divide_part='" . $index; + $sql .= "', divide_size='" . floatval($split['size']); + $sql .= "', divide_factor='". $factor; + syslog(LOG_NOTICE, "db_divide: index " . $index . " " . $sql); -} else if (isset($_POST['delete'])) { - // DELETE COMMAND - $sql = "DELETE FROM `divides` WHERE record='".$_POST['record']."';"; - $result = mysqli_query($connect, $sql); - if (! $result) { - syslog(LOG_NOTICE, "db_divides: ".$sql." result: ".mysqli_error($connect)); } else { - syslog(LOG_NOTICE, "db_divides: deleted record ".$_POST['record']); + /* + * Insert splitted batches + */ + $uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid')); + $sql = "INSERT INTO `products` SET "; + $sql .= "name='" . mysqli_real_escape_string($link, $split['name']); + $sql .= "', uuid='" . $uuid; + $sql .= "', code='" . mysqli_real_escape_string($link, $split['code']); + $sql .= "', birth='" . $row['birth']; + $sql .= "', stage='" . $row['stage']; + $sql .= "', notes='" . mysqli_real_escape_string($link, $row['notes']); + $sql .= "', log_brew='" . $row['log_brew']; + $sql .= "', log_fermentation='" . $row['log_fermentation']; + $sql .= "', log_ispindel='" . $row['log_ispindel']; + $sql .= "', log_co2pressure='" . $row['log_co2pressure']; + $sql .= "', inventory_reduced='" . $row['inventory_reduced'];; + $sql .= "', locked='" . $row['locked'];; + // Equipment + $sql .= "', eq_name='" . mysqli_real_escape_string($link, $row['eq_name']); + $sql .= "', eq_boil_size='" . $row['eq_boil_size']; + $sql .= "', eq_batch_size='" . $row['eq_batch_size']; + $sql .= "', eq_tun_volume='" . $row['eq_tun_volume']; + $sql .= "', eq_tun_weight='" . $row['eq_tun_weight']; + $sql .= "', eq_tun_specific_heat='" . $row['eq_tun_specific_heat']; + $sql .= "', eq_tun_material='" . $row['eq_tun_material']; + $sql .= "', eq_tun_height='" . $row['eq_tun_height']; + $sql .= "', eq_top_up_water='" . $row['eq_top_up_water']; + $sql .= "', eq_trub_chiller_loss='" . $row['eq_trub_chiller_loss']; + $sql .= "', eq_evap_rate='" . $row['eq_evap_rate']; + $sql .= "', eq_boil_time='" . $row['eq_boil_time']; + $sql .= "', eq_calc_boil_volume='" . $row['eq_calc_boil_volume']; + $sql .= "', eq_top_up_kettle='" . $row['eq_top_up_kettle']; + $sql .= "', eq_hop_utilization='" . $row['eq_hop_utilization']; + $sql .= "', eq_notes='" . mysqli_real_escape_string($link, $row['eq_notes']); + $sql .= "', eq_lauter_volume='" . $row['eq_lauter_volume']; + $sql .= "', eq_lauter_height='" . $row['eq_lauter_height']; + $sql .= "', eq_lauter_deadspace='" . $row['eq_lauter_deadspace']; + $sql .= "', eq_kettle_volume='" . $row['eq_kettle_volume']; + $sql .= "', eq_kettle_height='" . $row['eq_kettle_height']; + $sql .= "', eq_mash_volume='" . $row['eq_mash_volume']; + $sql .= "', eq_mash_max='" . $row['eq_mash_max']; + $sql .= "', eq_efficiency='" . $row['eq_efficiency']; + // brewdate + if (strlen($row['brew_date_start'])) + $sql .= "', brew_date_start='" . $row['brew_date_start'] . "'"; + else + $sql .= "', brew_date_start=NULL"; + $sql .= ", brew_mash_ph='" . $row['brew_mash_ph']; + $sql .= "', brew_mash_sg='" . $row['brew_mash_sg']; + $sql .= "', brew_mash_efficiency='" . $row['brew_mash_efficiency']; + $sql .= "', brew_sparge_temperature='" . $row['brew_sparge_temperature']; + $sql .= "', brew_sparge_volume='" . sprintf("%.1f", $row['brew_sparge_volume'] * $factor); + $sql .= "', brew_sparge_est='" . sprintf("%.1f", $row['brew_sparge_est'] * $factor); + $sql .= "', brew_sparge_ph='" . $row['brew_sparge_ph']; + $sql .= "', brew_preboil_volume='" . sprintf("%.1f", $row['brew_preboil_volume'] * $factor); + $sql .= "', brew_preboil_sg='" . $row['brew_preboil_sg']; + $sql .= "', brew_preboil_ph='" . $row['brew_preboil_ph']; + $sql .= "', brew_preboil_efficiency='" . $row['brew_preboil_efficiency']; + $sql .= "', brew_aboil_volume='" . sprintf("%.1f", $row['brew_aboil_volume'] * $factor); + $sql .= "', brew_aboil_sg='" . $row['brew_aboil_sg']; + $sql .= "', brew_aboil_ph='" . $row['brew_aboil_ph']; + $sql .= "', brew_aboil_efficiency='" . $row['brew_aboil_efficiency']; + $sql .= "', brew_cooling_method='" . $row['brew_cooling_method']; + $sql .= "', brew_cooling_time='" . $row['brew_cooling_time']; + $sql .= "', brew_cooling_to='" . $row['brew_cooling_to']; + $sql .= "', brew_whirlpool9='" . $row['brew_whirlpool9']; + $sql .= "', brew_whirlpool7='" . $row['brew_whirlpool7']; + $sql .= "', brew_whirlpool6='" . $row['brew_whirlpool6']; + $sql .= "', brew_whirlpool2='" . $row['brew_whirlpool2']; + $sql .= "', brew_aeration_time='" . $row['brew_aeration_time']; + $sql .= "', brew_aeration_speed='" . $row['brew_aeration_speed']; + $sql .= "', brew_aeration_type='" . $row['brew_aeration_type']; + $sql .= "', brew_fermenter_volume='" . sprintf("%.1f", $row['brew_fermenter_volume'] * $factor); + $sql .= "', brew_fermenter_extrawater='" . sprintf("%.1f", $row['brew_fermenter_extrawater'] * $factor); + $sql .= "', brew_fermenter_tcloss='" . sprintf("%.1f", $row['brew_fermenter_tcloss'] * $factor); + $sql .= "', brew_fermenter_sg='" . $row['brew_fermenter_sg']; + $sql .= "', brew_fermenter_ibu='" . $row['brew_fermenter_ibu']; + $sql .= "', brew_fermenter_color='" . $row['brew_fermenter_color']; + if (strlen($row['brew_date_end'])) + $sql .= "', brew_date_end='" . $row['brew_date_end'] . "'"; + else + $sql .= "', brew_date_end=NULL"; + $sql .= ", og='" . $row['og']; + $sql .= "', fg='" . $row['fg']; + $sql .= "', primary_start_temp='" . $row['primary_start_temp']; + $sql .= "', primary_max_temp='" . $row['primary_max_temp']; + $sql .= "', primary_end_temp='" . $row['primary_end_temp']; + if (strlen($row['primary_end_date'])) + $sql .= "', primary_end_date='" . $row['primary_end_date'] . "'"; + else + $sql .= "', primary_end_date=NULL"; + $sql .= ", primary_end_sg='" . $row['primary_end_sg']; + $sql .= "', secondary_temp='" . $row['secondary_temp']; + $sql .= "', secondary_end_sg='" . $row['secondary_end_sg']; + if (strlen($row['secondary_end_date'])) + $sql .= "', secondary_end_date='" . $row['secondary_end_date'] . "'"; + else + $sql .= "', secondary_end_date=NULL"; + $sql .= ", tertiary_temp='" . $row['tertiary_temp']; + if (strlen($row['package_date'])) + $sql .= "', package_date='" . $row['package_date'] . "'"; + else + $sql .= "', package_date=NULL"; + $sql .= ", package_volume='" . sprintf("%.1f", $row['package_volume'] * $factor); + $sql .= "', package_infuse_amount='" . sprintf("%.1f", $row['package_infuse_amount'] * $factor); + $sql .= "', package_infuse_abv='" . $row['package_infuse_abv']; + $sql .= "', package_infuse_notes='" . mysqli_real_escape_string($link, $row['package_infuse_notes']); + $sql .= "', package_abv='" . $row['package_abv']; + $sql .= "', package_ph='" . $row['package_ph']; + $sql .= "', bottle_amount='" . sprintf("%.1f", $row['bottle_amount'] * $factor); + $sql .= "', bottle_carbonation='" . $row['bottle_carbonation']; + $sql .= "', bottle_priming_sugar='" . $row['bottle_priming_sugar']; + $sql .= "', bottle_priming_water='" . sprintf("%.3f", $row['bottle_priming_water'] * $factor); + $sql .= "', bottle_priming_amount='" . $row['bottle_priming_amount']; + $sql .= "', bottle_carbonation_temp='" . $row['bottle_carbonation_temp']; + $sql .= "', keg_amount='" . sprintf("%.1f", $row['keg_amount'] * $factor); + $sql .= "', keg_carbonation='" . $row['keg_carbonation']; + $sql .= "', keg_priming_sugar='" . $row['keg_priming_sugar']; + $sql .= "', keg_priming_water='" . sprintf("%.3f", $row['keg_priming_water'] * $factor); + $sql .= "', keg_priming_amount='" . $row['keg_priming_amount']; + $sql .= "', keg_carbonation_temp='" . $row['keg_carbonation_temp']; + $sql .= "', keg_forced_carb='" . $row['keg_forced_carb']; + $sql .= "', keg_pressure='" . $row['keg_pressure']; + $sql .= "', taste_notes='"; + $sql .= "', taste_rate='0"; + $sql .= "', taste_date=NULL"; + $sql .= ", taste_color='"; + $sql .= "', taste_transparency='"; + $sql .= "', taste_head='"; + $sql .= "', taste_aroma='"; + $sql .= "', taste_taste='"; + $sql .= "', taste_mouthfeel='"; + $sql .= "', taste_aftertaste='"; + // Style + $sql .= "', st_name='" . mysqli_real_escape_string($link, $row['st_name']); + $sql .= "', st_letter='" . mysqli_real_escape_string($link, $row['st_letter']); + $sql .= "', st_guide='" . mysqli_real_escape_string($link, $row['st_guide']); + $sql .= "', st_type='" . $row['st_type']; + $sql .= "', st_category='" . mysqli_real_escape_string($link, $row['st_category']); + $sql .= "', st_category_number='" . $row['st_category_number']; + $sql .= "', st_og_min='" . $row['st_og_min']; + $sql .= "', st_og_max='" . $row['st_og_max']; + $sql .= "', st_fg_min='" . $row['st_fg_min']; + $sql .= "', st_fg_max='" . $row['st_fg_max']; + $sql .= "', st_ibu_min='" . $row['st_ibu_min']; + $sql .= "', st_ibu_max='" . $row['st_ibu_max']; + $sql .= "', st_color_min='" . $row['st_color_min']; + $sql .= "', st_color_max='" . $row['st_color_max']; + $sql .= "', st_carb_min='" . $row['st_carb_min']; + $sql .= "', st_carb_max='" . $row['st_carb_max']; + $sql .= "', st_abv_min='" . $row['st_abv_min']; + $sql .= "', st_abv_max='" . $row['st_abv_max']; + $sql .= "', type='" . $row['type']; + $sql .= "', batch_size='" . sprintf("%.2f", $row['batch_size'] * $factor); + $sql .= "', boil_size='" . sprintf("%.2f", $row['boil_size'] * $factor); + $sql .= "', boil_time='" . $row['boil_time']; + $sql .= "', efficiency='" . $row['efficiency']; + $sql .= "', est_og='" . $row['est_og']; + $sql .= "', est_og3='" . $row['est_og3']; + $sql .= "', est_fg='" . $row['est_fg']; + $sql .= "', est_abv='" . $row['est_abv']; + $sql .= "', est_carb='" . $row['est_carb']; + $sql .= "', est_color='" . $row['est_color']; + $sql .= "', color_method='" . $row['color_method']; + $sql .= "', est_ibu='" . $row['est_ibu']; + $sql .= "', ibu_method='" . $row['ibu_method']; + $sql .= "', sparge_volume='" . sprintf("%.1f", $row['sparge_volume'] * $factor); + $sql .= "', sparge_acid_amount='" . sprintf("%.5f", $row['sparge_acid_amount'] * $factor); + $sql .= "', sparge_temp='" . $row['sparge_temp']; + $sql .= "', sparge_ph='" . $row['sparge_ph']; + $sql .= "', sparge_source='" . $row['sparge_source']; + $sql .= "', sparge_acid_type='" . $row['sparge_acid_type']; + $sql .= "', sparge_acid_perc='" . $row['sparge_acid_perc']; + $sql .= "', mash_ph='" . $row['mash_ph']; + $sql .= "', mash_name='" . $row['mash_name']; + $sql .= "', calc_acid='" . $row['calc_acid']; + $sql .= "', w1_name='" . mysqli_real_escape_string($link, $row['w1_name']); + $sql .= "', w1_amount='" . sprintf("%.2f", $row['w1_amount'] * $factor); + $sql .= "', w1_calcium='" . $row['w1_calcium']; + $sql .= "', w1_sulfate='" . $row['w1_sulfate']; + $sql .= "', w1_chloride='" . $row['w1_chloride']; + $sql .= "', w1_sodium='" . $row['w1_sodium']; + $sql .= "', w1_magnesium='" . $row['w1_magnesium']; + $sql .= "', w1_total_alkalinity='" . $row['w1_total_alkalinity']; + $sql .= "', w1_ph='" . $row['w1_ph']; + $sql .= "', w1_cost='" . $row['w1_cost']; + $sql .= "', w2_name='" . mysqli_real_escape_string($link, $row['w2_name']); + $sql .= "', w2_amount='" . sprintf("%.2f", $row['w2_amount'] * $factor); + $sql .= "', w2_calcium='" . $row['w2_calcium']; + $sql .= "', w2_sulfate='" . $row['w2_sulfate']; + $sql .= "', w2_chloride='" . $row['w2_chloride']; + $sql .= "', w2_sodium='" . $row['w2_sodium']; + $sql .= "', w2_magnesium='" . $row['w2_magnesium']; + $sql .= "', w2_total_alkalinity='" . $row['w2_total_alkalinity']; + $sql .= "', w2_ph='" . $row['w2_ph']; + $sql .= "', w2_cost='" . $row['w2_cost']; + $sql .= "', wg_amount='" . sprintf("%.2f", $row['wg_amount'] * $factor); + $sql .= "', wg_calcium='" . $row['wg_calcium']; + $sql .= "', wg_sulfate='" . $row['wg_sulfate']; + $sql .= "', wg_chloride='" . $row['wg_chloride']; + $sql .= "', wg_sodium='" . $row['wg_sodium']; + $sql .= "', wg_magnesium='" . $row['wg_magnesium']; + $sql .= "', wg_total_alkalinity='" . $row['wg_total_alkalinity']; + $sql .= "', wg_ph='" . $row['wg_ph']; + $sql .= "', wb_calcium='" . $row['wb_calcium']; + $sql .= "', wb_sulfate='" . $row['wb_sulfate']; + $sql .= "', wb_chloride='" . $row['wb_chloride']; + $sql .= "', wb_sodium='" . $row['wb_sodium']; + $sql .= "', wb_magnesium='" . $row['wb_magnesium']; + $sql .= "', wb_total_alkalinity='" . $row['wb_total_alkalinity']; + $sql .= "', wb_ph='" . $row['wb_ph']; + $sql .= "', wa_acid_name='" . $row['wa_acid_name']; + $sql .= "', wa_acid_perc='" . $row['wa_acid_perc']; + $sql .= "', wa_base_name='" . $row['wa_base_name']; + $sql .= "', starter_enable='" . $row['starter_enable']; + $sql .= "', starter_type='" . $row['starter_type']; + $sql .= "', starter_sg='" . $row['starter_sg']; + $sql .= "', starter_viability='" . $row['starter_viability']; + $sql .= "', prop1_type='" . $row['prop1_type']; + $sql .= "', prop2_type='" . $row['prop2_type']; + $sql .= "', prop3_type='" . $row['prop3_type']; + $sql .= "', prop4_type='" . $row['prop4_type']; + $sql .= "', prop1_volume='" . sprintf("%.3f", $row['prop1_volume'] * $factor); + $sql .= "', prop2_volume='" . sprintf("%.3f", $row['prop2_volume'] * $factor); + $sql .= "', prop3_volume='" . sprintf("%.3f", $row['prop3_volume'] * $factor); + $sql .= "', prop4_volume='" . sprintf("%.3f", $row['prop4_volume'] * $factor); + $sql .= "', divide_type='" . $divide_type; + $sql .= "', divide_parts='" . $divide_parts; + $sql .= "', divide_part='" . $index; + $sql .= "', divide_size='" . floatval($split['size']); + $sql .= "', divide_factor='". $factor; + syslog(LOG_NOTICE, "db_divide: index " . $index . " " . $sql); } - echo $result; + + $fermentables = json_decode($row['json_fermentables'], true); + for ($i = 0; $i < count($fermentables); $i++) { + $fermentables[$i]['f_amount'] = sprintf("%.5f", $fermentables[$i]['f_amount'] * $factor); + } + // syslog(LOG_NOTICE, "db_divide: " . str_replace($rescapers,$rreplacements,json_encode($fermentables, JSON_UNESCAPED_UNICODE))); + $sql .= "', json_fermentables='" . str_replace($rescapers,$rreplacements,json_encode($fermentables, JSON_UNESCAPED_UNICODE)); + + $hops = json_decode($row['json_hops'], true); + for ($i = 0; $i < count($hops); $i++) { + $hops[$i]['h_amount'] = sprintf("%.5f", $hops[$i]['h_amount'] * $factor); + } + // syslog(LOG_NOTICE, "db_divide: " . str_replace($rescapers,$rreplacements,json_encode($hops, JSON_UNESCAPED_UNICODE))); + $sql .= "', json_hops='" . str_replace($rescapers,$rreplacements,json_encode($hops, JSON_UNESCAPED_UNICODE)); + + $miscs = json_decode($row['json_miscs'], true); + for ($i = 0; $i < count($miscs); $i++) { + $miscs[$i]['m_amount'] = sprintf("%.5f", $miscs[$i]['m_amount'] * $factor); + } + // syslog(LOG_NOTICE, "db_divide: " . str_replace($rescapers,$rreplacements,json_encode($miscs, JSON_UNESCAPED_UNICODE))); + $sql .= "', json_miscs='" . str_replace($rescapers,$rreplacements,json_encode($miscs, JSON_UNESCAPED_UNICODE)); + + $yeasts = json_decode($row['json_yeasts'], true); + for ($i = 0; $i < count($yeasts); $i++) { + $yeasts[$i]['y_amount'] = sprintf("%.5f", $yeasts[$i]['y_amount'] * $factor); + } + // syslog(LOG_NOTICE, "db_divide: " . str_replace($rescapers,$rreplacements,json_encode($yeasts, JSON_UNESCAPED_UNICODE))); + $sql .= "', json_yeasts='" . str_replace($rescapers,$rreplacements,json_encode($yeasts, JSON_UNESCAPED_UNICODE)); + + $mashs = json_decode($row['json_mashs'], true); + for ($i = 0; $i < count($mashs); $i++) { + $mashs[$i]['step_infuse_amount'] = sprintf("%.5f", $mashs[$i]['step_infuse_amount'] * $factor); + } + syslog(LOG_NOTICE, "db_divide: " . str_replace($rescapers,$rreplacements,json_encode($mashs, JSON_UNESCAPED_UNICODE))); + $sql .= "', json_mashs='" . str_replace($rescapers,$rreplacements,json_encode($mashs, JSON_UNESCAPED_UNICODE)); + if ($index == 0) { + $sql .= "' WHERE record='" . $record . "';"; + $result2 = mysqli_query($link, $sql); + if (! $result2) { + syslog(LOG_NOTICE, "db_divide: result: ".mysqli_error($link)); + $rc = 1; + break; + } else { + syslog(LOG_NOTICE, "db_divide: updated record ".$record." code ".$split['code']); + } + } else { + $sql .= "';"; + $result2 = mysqli_query($link, $sql); + if (! $result2) { + syslog(LOG_NOTICE, "db_divide: result: ".mysqli_error($link)); + $rc = 1; + break; + } else { + $lastid = mysqli_insert_id($link); + syslog(LOG_NOTICE, "db_divide: inserted record ".$lastid." code ".$split['code']); + /* Copy brew log records */ + if ($row['log_brew'] == '1') { + $result3 = mysqli_query($link, "SELECT * FROM log_brews WHERE code='" . $row['code'] . "'"); + if (! $result3) { + syslog(LOG_NOTICE, "db_divide: result3: ".mysqli_error($link)); + } + while ($row3 = mysqli_fetch_array($result3)) { + $sql3 = "INSERT INTO log_brews SET datetime='" . $row3['datetime']; + $sql3 .= "', version='" . $row3['version']; + $sql3 .= "', uuid='" . $uuid; + $sql3 .= "', code='" . mysqli_real_escape_string($link, $split['code']); + $sql3 .= "', name='" . mysqli_real_escape_string($link, $split['name']); + $sql3 .= "', pv_mlt='" . $row3['pv_mlt']; + $sql3 .= "', pv_hlt='" . $row3['pv_hlt']; + $sql3 .= "', pv_room='" . $row3['pv_room']; + $sql3 .= "', sp_mlt='" . $row3['sp_mlt']; + $sql3 .= "', sp_hlt='" . $row3['sp_hlt']; + $sql3 .= "', pwm_mlt='" . $row3['pwm_mlt']; + $sql3 .= "', pwm_hlt='" . $row3['pwm_hlt']; + $sql3 .= "', event='" . $row3['event'] . "';"; + $result4 = mysqli_query($link, $sql3); + if (! $result4) { + syslog(LOG_NOTICE, "db_divide: result4: ".mysqli_error($link)." ".$sql3); + } + } + } + } + } + + } + syslog(LOG_NOTICE, "db_divide: rc=".$rc); + echo $rc; } else { - // SELECT COMMAND - $query = "SELECT * FROM divides ORDER BY divide_from,divide_part"; - $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); - while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { - $divides[] = array( - 'record' => $row['record'], - 'divide_from' => $row['divide_from'], - 'divide_type' => $row['divide_type'], - 'divide_size' => $row['divide_size'], - 'divide_part' => $row['divide_part'], - 'name' => $row['name'], - 'code' => $row['code'] - ); - } - header("Content-type: application/json"); - echo json_encode($divides); + syslog(LOG_NOTICE, "db_divide: missing arguments"); + echo 1; } + + + + ?> diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/db_inventory_yeasts.php --- a/www/includes/db_inventory_yeasts.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/db_inventory_yeasts.php Fri May 01 16:37:31 2020 +0200 @@ -26,6 +26,7 @@ $sql .= "', form='" . array_search($_POST['form'], $yeastform); $sql .= "', laboratory='" . mysqli_real_escape_string($connect, $_POST['laboratory']); $sql .= "', product_id='" . mysqli_real_escape_string($connect, $_POST['product_id']); + $sql .= "', short_desc='" . mysqli_real_escape_string($connect, $_POST['short_desc']); $sql .= "', min_temperature='" . $_POST['min_temperature']; $sql .= "', max_temperature='" . $_POST['max_temperature']; $sql .= "', flocculation='" . $_POST['flocculation']; @@ -96,6 +97,7 @@ 'form' => $yeastform[$row['form']], 'laboratory' => $row['laboratory'], 'product_id' => $row['product_id'], + 'short_desc' => $row['short_desc'], 'min_temperature' => $row['min_temperature'], 'max_temperature' => $row['max_temperature'], 'flocculation' => $row['flocculation'], diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/db_product.php --- a/www/includes/db_product.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/db_product.php Fri May 01 16:37:31 2020 +0200 @@ -40,6 +40,8 @@ $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); $sql .= "', log_brew='" . $_POST['log_brew']; $sql .= "', log_fermentation='" . $_POST['log_fermentation']; + $sql .= "', log_ispindel='" . $_POST['log_ispindel']; + $sql .= "', log_co2pressure='" . $_POST['log_co2pressure']; $sql .= "', inventory_reduced='" . $_POST['inventory_reduced']; $sql .= "', locked='" . $_POST['locked']; // Equipment @@ -185,6 +187,7 @@ $sql .= "', boil_time='" . $_POST['boil_time']; $sql .= "', efficiency='" . $_POST['efficiency']; $sql .= "', est_og='" . $_POST['est_og']; + $sql .= "', est_og3='" . $_POST['est_og3']; $sql .= "', est_fg='" . $_POST['est_fg']; $sql .= "', est_abv='" . $_POST['est_abv']; $sql .= "', est_carb='" . $_POST['est_carb']; @@ -262,9 +265,15 @@ $sql .= "', prop4_type='" . $_POST['prop4_type']; $sql .= "', prop4_volume='" . $_POST['prop4_volume']; } - $sql .= "', divide_type='" . $_POST['divide_type']; - $sql .= "', divide_size='" . $_POST['divide_size']; + if ($_POST['yeast_prod_date'] == '') + $sql .= "', yeast_prod_date=NULL"; + else + $sql .= "', yeast_prod_date='" . $_POST['yeast_prod_date'] . "'"; + $sql .= ", divide_type='" . $_POST['divide_type']; + $sql .= "', divide_size='" . floatval($_POST['divide_size']); + $sql .= "', divide_factor='" . floatval($_POST['divide_factor']); $sql .= "', divide_parts='" . $_POST['divide_parts']; + $sql .= "', divide_part='" . $_POST['divide_part']; //syslog(LOG_NOTICE, $sql); $fermentables = '['; @@ -435,6 +444,13 @@ $yeast .= ',"y_tolerance":' . $item['y_tolerance']; $yeast .= ',"y_inventory":' . $item['y_inventory']; $yeast .= ',"y_use":' . $item['y_use']; + $yeast .= ',"y_sta1":' . $item['y_sta1']; + $yeast .= ',"y_bacteria":' . $item['y_bacteria']; + $yeast .= ',"y_harvest_top":' . $item['y_harvest_top']; + $yeast .= ',"y_harvest_time":' . $item['y_harvest_time']; + $yeast .= ',"y_pitch_temperature":' . $item['y_pitch_temperature']; + $yeast .= ',"y_pofpos":' . $item['y_pofpos']; + $yeast .= ',"y_zymocide":' . $item['y_zymocide']; $yeast .= ',"y_cost":' . $item['y_cost'] . '}'; //syslog(LOG_NOTICE, $yeast); $yeasts .= $yeast; @@ -535,7 +551,7 @@ * SELECT, produce a list of products that are not yet Closed. */ if (isset($_GET['select']) && ($_GET['select'] == "inprod")) { - $query = "SELECT record,name,code,birth,stage,brew_date_start,package_date FROM products WHERE stage != '11' ORDER BY birth,code;"; + $query = "SELECT record,name,code,birth,stage,brew_date_start,package_date FROM products WHERE stage != '11' ORDER BY stage,code,birth;"; $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $brews[] = array( @@ -554,7 +570,7 @@ } if (isset($_GET['select']) && ($_GET['select'] == "archname")) { - $query = "SELECT record,name,code,brew_date_start,st_name,og,fg,batch_size FROM products WHERE stage = '11' ORDER BY name,brew_date_start;"; + $query = "SELECT record,name,code,brew_date_start,st_name,brew_fermenter_sg,fg,batch_size FROM products WHERE stage = '11' ORDER BY name,brew_date_start;"; $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $brews[] = array( @@ -563,7 +579,7 @@ 'code' => $row['code'], 'date' => substr($row['brew_date_start'], 0, 10), 'style' => $row['st_name'], - 'og' => $row['og'], + 'og' => $row['brew_fermenter_sg'], 'fg' => $row['fg'], 'batch_size' => $row['batch_size'] ); @@ -574,7 +590,7 @@ } if (isset($_GET['select']) && ($_GET['select'] == "archcode")) { - $query = "SELECT record,name,code,brew_date_start,st_name,og,fg,batch_size FROM products WHERE stage = '11' ORDER BY code;"; + $query = "SELECT record,name,code,brew_date_start,st_name,brew_fermenter_sg,fg,batch_size FROM products WHERE stage = '11' ORDER BY code;"; $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $brews[] = array( @@ -583,7 +599,7 @@ 'code' => $row['code'], 'date' => substr($row['brew_date_start'], 0, 10), 'style' => $row['st_name'], - 'og' => $row['og'], + 'og' => $row['brew_fermenter_sg'], 'fg' => $row['fg'], 'batch_size' => $row['batch_size'] ); @@ -594,7 +610,7 @@ } if (isset($_GET['select']) && ($_GET['select'] == "archdate")) { - $query = "SELECT record,name,code,brew_date_start,st_name,og,fg,batch_size FROM products WHERE stage = '11' ORDER BY brew_date_start;"; + $query = "SELECT record,name,code,brew_date_start,st_name,brew_fermenter_sg,fg,batch_size FROM products WHERE stage = '11' ORDER BY brew_date_start;"; $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $brews[] = array( @@ -604,7 +620,7 @@ 'year' => substr($row['brew_date_start'], 0, 4), 'date' => substr($row['brew_date_start'], 0, 10), 'style' => $row['st_name'], - 'og' => $row['og'], + 'og' => $row['brew_fermenter_sg'], 'fg' => $row['fg'], 'batch_size' => $row['batch_size'] ); @@ -672,6 +688,8 @@ $brew .= ',"notes":"' . str_replace($escapers, $replacements, $row['notes']); $brew .= '","log_brew":' . $row['log_brew']; $brew .= ',"log_fermentation":' . $row['log_fermentation']; + $brew .= ',"log_ispindel":' . $row['log_ispindel']; + $brew .= ',"log_co2pressure":' . $row['log_co2pressure']; $brew .= ',"inventory_reduced":' . $row['inventory_reduced']; $brew .= ',"locked":' . $row['locked']; $brew .= ',"eq_name":"' . str_replace($escapers, $replacements, $row['eq_name']); @@ -795,6 +813,7 @@ $brew .= ',"boil_time":' . floatval($row['boil_time']); $brew .= ',"efficiency":' . floatval($row['efficiency']); $brew .= ',"est_og":' . floatval($row['est_og']); + $brew .= ',"est_og3":' . floatval($row['est_og3']); $brew .= ',"est_fg":' . floatval($row['est_fg']); $brew .= ',"est_abv":' . floatval($row['est_abv']); $brew .= ',"est_carb":' . floatval($row['est_carb']); @@ -854,7 +873,8 @@ $brew .= ',"starter_type":' . $row['starter_type']; $brew .= ',"starter_sg":' . $row['starter_sg']; $brew .= ',"starter_viability":' . $row['starter_viability']; - $brew .= ',"prop1_type":' . $row['prop1_type']; + $brew .= ',"yeast_prod_date":"' . $row['yeast_prod_date']; + $brew .= '","prop1_type":' . $row['prop1_type']; $brew .= ',"prop1_volume":' . $row['prop1_volume']; $brew .= ',"prop2_type":' . $row['prop2_type']; $brew .= ',"prop2_volume":' . $row['prop2_volume']; @@ -865,7 +885,9 @@ $brew .= ',"divide_type":' . $row['divide_type']; $brew .= ',"divide_size":' . floatval($row['divide_size']); + $brew .= ',"divide_factor":' . floatval($row['divide_factor']); $brew .= ',"divide_parts":' . $row['divide_parts']; + $brew .= ',"divide_part":' . $row['divide_part']; if (isset($_GET['record'])) { // Append stock information. @@ -927,7 +949,8 @@ $yeasts[$i]['y_avail'] = 0; // Ingredient not in db if (! isset($yeasts[$i]['y_tolerance'])) $yeasts[$i]['y_tolerance'] = 0; - $sql2 = "SELECT inventory,tolerance FROM inventory_yeasts "; + $sql2 = "SELECT inventory,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide "; + $sql2 .= "FROM inventory_yeasts "; $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_name'])."' AND"; $sql2 .= " form='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_form'])."' AND"; $sql2 .= " laboratory='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_laboratory'])."' AND"; @@ -936,10 +959,39 @@ if ($obj = mysqli_fetch_object($result2)) { $yeasts[$i]['y_inventory'] = floatval($obj->inventory); $yeasts[$i]['y_avail'] = 1; - if ($yeasts[$i]['y_tolerance'] == 0) { + if ($yeasts[$i]['y_tolerance'] == 0) $yeasts[$i]['y_tolerance'] = floatval($obj->tolerance); // Upgrade alcohol tolerance - } - } + // Upgrade new fields + if (! isset($yeasts[$i]['y_sta1'])) + $yeasts[$i]['y_sta1'] = intval($obj->sta1); + if (! isset($yeasts[$i]['y_bacteria'])) + $yeasts[$i]['y_bacteria'] = intval($obj->bacteria); + if (! isset($yeasts[$i]['y_harvest_top'])) + $yeasts[$i]['y_harvest_top'] = intval($obj->harvest_top); + if (! isset($yeasts[$i]['y_harvest_time'])) + $yeasts[$i]['y_harvest_time'] = intval($obj->harvest_time); + if (! isset($yeasts[$i]['y_pitch_temperature'])) + $yeasts[$i]['y_pitch_temperature'] = floatval($obj->pitch_temperature); + if (! isset($yeasts[$i]['y_pofpos'])) + $yeasts[$i]['y_pofpos'] = intval($obj->pofpos); + if (! isset($yeasts[$i]['y_zymocide'])) + $yeasts[$i]['y_zymocide'] = intval($obj->zymocide); + } else { + if (! isset($yeasts[$i]['y_sta1'])) + $yeasts[$i]['y_sta1'] = 0; + if (! isset($yeasts[$i]['y_bacteria'])) + $yeasts[$i]['y_bacteria'] = 0; + if (! isset($yeasts[$i]['y_harvest_top'])) + $yeasts[$i]['y_harvest_top'] = 0; + if (! isset($yeasts[$i]['y_harvest_time'])) + $yeasts[$i]['y_harvest_time'] = 0; + if (! isset($yeasts[$i]['y_pitch_temperature'])) + $yeasts[$i]['y_pitch_temperature'] = 0; + if (! isset($yeasts[$i]['y_pofpos'])) + $yeasts[$i]['y_pofpos'] = 0; + if (! isset($yeasts[$i]['y_zymocide'])) + $yeasts[$i]['y_zymocide'] = 0; + } mysqli_free_result($result2); } } diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/db_recipes.php --- a/www/includes/db_recipes.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/db_recipes.php Fri May 01 16:37:31 2020 +0200 @@ -285,6 +285,13 @@ $yeast .= ',"y_tolerance":' . $item['y_tolerance']; $yeast .= ',"y_inventory":' . $item['y_inventory']; $yeast .= ',"y_use":' . $item['y_use']; + $yeast .= ',"y_sta1":' . $item['y_sta1']; + $yeast .= ',"y_bacteria":' . $item['y_bacteria']; + $yeast .= ',"y_harvest_top":' . $item['y_harvest_top']; + $yeast .= ',"y_harvest_time":' . $item['y_harvest_time']; + $yeast .= ',"y_pitch_temperature":' . $item['y_pitch_temperature']; + $yeast .= ',"y_pofpos":' . $item['y_pofpos']; + $yeast .= ',"y_zymocide":' . $item['y_zymocide']; $yeast .= ',"y_cost":' . $item['y_cost'] . '}'; syslog(LOG_NOTICE, $yeast); $yeasts .= $yeast; @@ -518,7 +525,8 @@ $yeasts[$i]['y_avail'] = 0; // Ingredient not in db if (! isset($yeasts[$i]['y_tolerance'])) $yeasts[$i]['y_tolerance'] = 0; - $sql2 = "SELECT inventory,tolerance FROM inventory_yeasts "; + $sql2 = "SELECT inventory,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide "; + $sql2 .= "FROM inventory_yeasts "; $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_name'])."' AND"; $sql2 .= " form='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_form'])."' AND"; $sql2 .= " laboratory='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_laboratory'])."' AND"; @@ -527,13 +535,43 @@ if ($obj = mysqli_fetch_object($result2)) { $yeasts[$i]['y_inventory'] = floatval($obj->inventory); $yeasts[$i]['y_avail'] = 1; - if ($yeasts[$i]['y_tolerance'] == 0) { + if ($yeasts[$i]['y_tolerance'] == 0) $yeasts[$i]['y_tolerance'] = floatval($obj->tolerance); // Upgrade alcohol tolerance - } + // Upgrade new fields + if (! isset($yeasts[$i]['y_sta1'])) + $yeasts[$i]['y_sta1'] = intval($obj->sta1); + if (! isset($yeasts[$i]['y_bacteria'])) + $yeasts[$i]['y_bacteria'] = intval($obj->bacteria); + if (! isset($yeasts[$i]['y_harvest_top'])) + $yeasts[$i]['y_harvest_top'] = intval($obj->harvest_top); + if (! isset($yeasts[$i]['y_harvest_time'])) + $yeasts[$i]['y_harvest_time'] = intval($obj->harvest_time); + if (! isset($yeasts[$i]['y_pitch_temperature'])) + $yeasts[$i]['y_pitch_temperature'] = floatval($obj->pitch_temperature); + if (! isset($yeasts[$i]['y_pofpos'])) + $yeasts[$i]['y_pofpos'] = intval($obj->pofpos); + if (! isset($yeasts[$i]['y_zymocide'])) + $yeasts[$i]['y_zymocide'] = intval($obj->zymocide); + } else { + if (! isset($yeasts[$i]['y_sta1'])) + $yeasts[$i]['y_sta1'] = 0; + if (! isset($yeasts[$i]['y_bacteria'])) + $yeasts[$i]['y_bacteria'] = 0; + if (! isset($yeasts[$i]['y_harvest_top'])) + $yeasts[$i]['y_harvest_top'] = 0; + if (! isset($yeasts[$i]['y_harvest_time'])) + $yeasts[$i]['y_harvest_time'] = 0; + if (! isset($yeasts[$i]['y_pitch_temperature'])) + $yeasts[$i]['y_pitch_temperature'] = 0; + if (! isset($yeasts[$i]['y_pofpos'])) + $yeasts[$i]['y_pofpos'] = 0; + if (! isset($yeasts[$i]['y_zymocide'])) + $yeasts[$i]['y_zymocide'] = 0; } mysqli_free_result($result2); } } + syslog(LOG_NOTICE, json_encode($yeasts, JSON_UNESCAPED_UNICODE)); $recipes .= ',"yeasts":' . json_encode($yeasts, JSON_UNESCAPED_UNICODE); } else { // Just leave it. diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/db_setup.php --- a/www/includes/db_setup.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/db_setup.php Fri May 01 16:37:31 2020 +0200 @@ -34,6 +34,7 @@ $sql .= "', brix_correction='" . $_POST['brix_correction']; $sql .= "', grain_absorbtion='" . $_POST['grain_absorbtion']; $sql .= "', default_water='" . $default_water; + $sql .= "', my_yeastlab='" . $_POST['my_yeastlab']; $sql .= "' WHERE record='1';"; //syslog(LOG_NOTICE, $sql); $result = mysqli_query($connect, $sql); @@ -65,6 +66,7 @@ $data .= ',"brix_correction":' . floatval($row['brix_correction']); $data .= ',"grain_absorbtion":' . floatval($row['grain_absorbtion']); $data .= ',"default_water":"' . str_replace($escapers, $replacements, $default_water); + $data .= '","my_yeastlab":"' . str_replace($escapers, $replacements, $row['my_yeastlab']); $data .= '"}'; } header("Content-type: application/json"); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/formulas.php --- a/www/includes/formulas.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/formulas.php Fri May 01 16:37:31 2020 +0200 @@ -115,17 +115,27 @@ function sg_to_plato($sg) { - if ($sg > 0.5) - return 259 - 259 / $sg; - return 0; +// if ($sg > 0.5) +// return 259 - 259 / $sg; +// return 0; + return -668.962 + (1262.45 * $sg) - (776.43 * $sg * $sg) + (182.94 * $sg * $sg * $sg); } function plato_to_sg($plato) { - if ($plato < 259) - return 259 / (259 - $plato); - return 1.000; +// if ($plato < 259) +// return 259 / (259 - $plato); +// return 1.000; + return 1.00001 + (0.0038661 * $plato) + (1.3488e-5 * $plato * $plato) + (4.3074e-8 * $plato * $plato * $plato); +} + + + +function calc_svg($og, $fg) { + $oe = sg_to_plato($og); + $ae = sg_to_plato($fg); + return ($oe - $ae) / $oe * 100; } @@ -175,9 +185,6 @@ function abvol($og, $fg) { $factor = $og * 3157 * pow(10, -5) + 9.716 * pow(10, -2); return ($og * 1000 - $fg * 1000) * $factor; - //if ((4.749804 - $fg) <> 0) - // return 486.8693 * ($og - $fg) / (4.749804 - $fg); - //return 0; } @@ -202,7 +209,7 @@ -function calc_IBU($useat, $form, $sg, $volume, $mass, $boiltime, $alpha, $method) +function calc_IBU($useat, $form, $sg, $volume, $mass, $boiltime, $alpha, $method, $whirlpool9, $whirlpool7, $whirlpool6) { global $my_factor_mashhop; global $my_factor_fwh; @@ -234,13 +241,31 @@ $pfactor += $my_factor_cryohop / 100; } + $whirlibus = 0; + if ($useat == 3 || $useat == 4) { // Flameout or any whirlpool + if ($whirlpool9) { + $whirlibus += ($mass * ($alpha / 100) * 20) / $volume * $whirlpool9 / 50; + } else { + if ($useat == 3) // Flameout hops are 2 minutes in this range. + $whirlibus += ($mass * ($alpha / 100) * 20) / $volume * (2 / 50); + } + if ($whirlpool7) { + $whirlibus += ($mass * ($alpha / 100) * 6) / $volume * $whirlpool7 / 50; + } else { + if ($useat == 3) // Flameout hops are 4 minutes in this range. + $whirlibus += ($mass * ($alpha / 100) * 6) / $volume * (4 / 50); + } + if ($whirlpool6) + $whirlibus += ($mass * ($alpha / 100) * 2) / $volume * $whirlpool6 / 50; + } + $ibu = 0; if (($method == 0) || ($method == 3)) { // Tinseth or Garetz // For Garetz, we need the $ibu $AddedAlphaAcids = (($alpha / 100) * $mass * 1000) / $volume; $Bigness_factor = 1.65 * pow( 0.000125, $sg - 1); $BoilTime_factor = ((1 - exp(-0.04 * $boiltime)) / 4.15); $utiisation = $Bigness_factor * $BoilTime_factor; - $ibu = (round($utiisation * $AddedAlphaAcids * $fmoment * $pfactor * 10) / 10.0); + $ibu = (round(($utiisation * $AddedAlphaAcids * $fmoment * $pfactor + $whirlibus) * 10) / 10.0); } if ($method == 2) { // Daniels @@ -252,7 +277,7 @@ $sgfactor = 0; else $sgfactor = (($sg * 1000) - 1050) / 200; - $ibu = $fmoment * (($mass * $alpha * $boilfactor * 0.1) / ($volume * (1 + $sgfactor))); + $ibu = $fmoment * (($mass * $alpha * $boilfactor * 0.1) / ($volume * (1 + $sgfactor))) + $whirlibus; } if ($method == 1) { // Rager $boilfactor = $fmoment * 18.11 + 13.86 * tanh(($boiltime * 31.32) / 18.27); @@ -260,7 +285,7 @@ $sgfactor = 0; else $sgfactor = (($sg * 1000) - 1050) / 200; - $ibu = ($mass * $alpha * $boilfactor * 0.1) / ($volume * (1 + $sgfactor)); + $ibu = ($mass * $alpha * $boilfactor * 0.1) / ($volume * (1 + $sgfactor)) + $whirlibus; } if ($method == 3) { // Garetz, not in use. /* Something is wrong, late hops and dryhops give negative results. */ @@ -272,8 +297,6 @@ $tempfactor = (32.8/550)*0.02+1; $ibu = ($boilfactor * $alpha * $mass * 0.1) / ($volume * $sgfactor * $hopratefactor * $tempfactor); } - /* TODO: Noonan and Mosher */ - return $ibu; } diff -r 9d1aa6f3a4da -r 4d01937ae7af www/includes/global.inc.php --- a/www/includes/global.inc.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/includes/global.inc.php Fri May 01 16:37:31 2020 +0200 @@ -142,7 +142,7 @@ my_color_method = "", my_brix_correction = "", my_grain_absorbtion = "", my_default_water = ""; - + @@ -179,7 +179,7 @@ - + '.PHP_EOL; @@ -205,7 +205,7 @@ $connect = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); $result = mysqli_query($connect, "SELECT uuid,node,online,net_address FROM mon_nodes ORDER BY node"); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { - if ($row['online'] == "Y") + if ($row['online'] == 1) $img = "network-idle.png"; else $img = "network-error.png"; @@ -220,7 +220,7 @@ +
  • iSpindels + +
  • Productie @@ -290,6 +305,7 @@
  • Brouwwater
  • Brouw apparatuur
  • Voorraad lijst
  • +
  • Gistbank lijst
  • Instellingen diff -r 9d1aa6f3a4da -r 4d01937ae7af www/inv_waters.php --- a/www/inv_waters.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/inv_waters.php Fri May 01 16:37:31 2020 +0200 @@ -26,28 +26,37 @@   - Calcium (Ca) mg/l: + Calcium (Ca) mg/L:
    - Chloride (Cl) mg/l: + Sulfaat (CaSO4) mg/L: +
    + + + Magnesium (Mg) mg/L: +
    + Chloride (Cl) mg/L:
    - Magnesium (Mg) mg/l: -
    - Sulfaat (CaSO4) mg/l: -
    + Natrium (Na) mg/L: +
    + Bicarbonaat (HCO3) mg/L: +
    - Natrium (Na) mg/l: -
    - Bicarbonaat (HCO3) mg/l: -
    + + + Totale alkaliteit (CaCO3) mg/L: +
    + + +   Zuurgraad (pH):
    - Totale alkaliteit (CaCO3) mg/l: -
    + Ionen balans meq/L: +
      @@ -63,10 +72,10 @@
    - + - + diff -r 9d1aa6f3a4da -r 4d01937ae7af www/inv_yeastlab.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/inv_yeastlab.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,162 @@ +ProcessingTable) + $this->TableHeader(); + } + + function TableHeader() { + $this->SetFont('Helvetica','B',9); + $this->SetX($this->TableX); + $this->SetFillColor($this->HeaderColor[0],$this->HeaderColor[1],$this->HeaderColor[2]); + foreach($this->aCols as $col) + $this->Cell($col['w'],5,$col['c'],0,0,$col['a'],true); + $this->Ln(); + } + + function CalcWidths($width, $align) { + // Compute the widths of the columns + $TableWidth=0; + foreach($this->aCols as $i=>$col) { + $w=$col['w']; + if($w==-1) + $w=$width/count($this->aCols); + elseif(substr($w,-1)=='%') + $w=$w/100*$width; + $this->aCols[$i]['w']=$w; + $TableWidth+=$w; + } + // Compute the abscissa of the table + if($align=='C') + $this->TableX=max(($this->w-$TableWidth)/2,0); + elseif($align=='R') + $this->TableX=max($this->w-$this->rMargin-$TableWidth,0); + else + $this->TableX=$this->lMargin; + } + + function AddCol($width=-1, $caption='', $align='L') { + $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); + } + + function TableYeasts($link,$prop) { + global $yeasttype; + global $yeastform; + global $my_lab; + $this->AddCol( 60,'Gist','L'); + $this->AddCol( 50,'Omschrijving','L'); + $this->AddCol( 18,'Soort','L'); + $this->AddCol( 18,'Vorm','L'); + $this->AddCol( 20,'Voorraad','R'); + $this->AddCol( 25,'Datum','L'); + $prop['width']=$this->w-$this->lMargin-$this->rMargin; + $prop['align']='L'; + $cMargin=$this->cMargin; + $this->cMargin=$prop['padding']; + $this->HeaderColor=$prop['HeaderColor']; + $this->TotalColor=$prop['TotalColor']; + $this->RowColors=array($prop['color1'],$prop['color2']); + $this->CalcWidths($prop['width'],$prop['align']); + $this->TableHeader(); + $this->SetFont('Helvetica','',9); + $this->ColorIndex=0; + $this->ProcessingTable=true; + + $sql = "SELECT name,type,form,inventory,production_date,short_desc FROM inventory_yeasts "; + $sql .= "WHERE inventory > 0 AND laboratory = '".$my_lab."' ORDER BY product_id"; + $result = mysqli_query($link, $sql); + + while ($row=mysqli_fetch_array($result)) { + if ($row['form'] == 0) + $stock = floatval($row['inventory']); + else + $stock = floatval($row['inventory']) * 1000.0; + $form = array( 'pak', 'gr', 'ml', 'ml', 'ml', 'ml', 'gr' ); + + $this->SetX($this->TableX); + $ci=$this->ColorIndex; + $this->SetFillColor($this->RowColors[$ci][0],$this->RowColors[$ci][1],$this->RowColors[$ci][2]); + $this->Cell(60,5,iconv('UTF-8','windows-1252',$row['name']),0,0,'L',true); + $this->Cell(50,5,iconv('UTF-8','windows-1252',$row['short_desc']),0,0,'L',true); + $this->Cell(18,5,iconv('UTF-8','windows-1252',$yeasttype[$row['type']]),0,0,'L',true); + $this->Cell(18,5,iconv('UTF-8','windows-1252',$yeastform[$row['form']]),0,0,'L',true); + $this->Cell(20,5,sprintf("%10.1f ",$stock).$form[$row['form']],0,0,'R',true); + $this->Cell(25,5,$row['production_date'],0,0,'L',true); + $this->Ln(); + $this->ColorIndex=1-$ci; + } + + $this->ProcessingTable=false; + $this->cMargin=$cMargin; + $this->aCols=array(); + } +} + + + +class PDF extends PDF_MySQL_Table { + function Header() { + global $prdate; + global $my_brewery; + $this->Image('images/logo.png',10,6,30); + // Title + $this->SetFont('Helvetica','',18); + $this->SetX(45); + $this->Cell(0,10,'Gistbank van '.$my_brewery,0,1,'L'); + $this->Ln(1); + $this->SetFont('Helvetica','',10); + $this->SetX(45); + $this->Cell(17,5,'Datum:',0,0,'L'); + $this->Cell(0,5,$prdate,0,1,'L'); + $this->Ln(18); + // Ensure table header is printed + parent::Header(); + } +} + + +$pdf = new PDF(); +$pdf->AddPage(); +$prop = array('HeaderColor'=>array(255,150,100), 'color1'=>array(210,245,255), + 'color2'=>array(255,255,210), 'TotalColor'=>array(255,150,100), 'padding'=>2); +$pdf->TableYeasts($link,$prop); +$pdf->Output(); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/inv_yeasts.php --- a/www/inv_yeasts.php Fri Oct 18 13:20:35 2019 +0200 +++ b/www/inv_yeasts.php Fri May 01 16:37:31 2020 +0200 @@ -65,24 +65,24 @@
    + Gistbank tekst: + + Ent temperatuur °C: +
    + + POF+:
    Zymocide+:
    - Ent temperatuur °C: -
    + Oogst tijd uren: +
    STA1 (diastatic) gen:
    Oogst van boven:
    - Oogst tijd uren: -
    - - - - Bevat bacteriën:
    diff -r 9d1aa6f3a4da -r 4d01937ae7af www/ispindel/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/ispindel/index.php Fri May 01 16:37:31 2020 +0200 @@ -0,0 +1,52 @@ + diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqx-all.js --- a/www/jqwidgets/jqx-all.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqx-all.js Fri May 01 16:37:31 2020 +0200 @@ -1,18 +1,18 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -var oldBrowser=document.all&&!document.addEventListener;if(!oldBrowser){(function(bd,G){var q,an,ak=bd.document,bo=bd.location,bt=bd.navigator,ax=bd.JQXLite,X=bd.$,aR=Array.prototype.push,aD=Array.prototype.slice,aA=Array.prototype.indexOf,y=Object.prototype.toString,b=Object.prototype.hasOwnProperty,aw=String.prototype.trim,C=function(bu,bv){return new C.fn.init(bu,bv,q)},aE=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,at=/\S/,a8=/\s+/,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,aF=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,e=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,j=/^[\],:{}\s]*$/,t=/(?:^|:|,)(?:\s*\[)+/g,a5=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,K=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,au=/^-ms-/,aS=/-([\da-z])/gi,m=function(bu,bv){return(bv+"").toUpperCase()},a4=function(){if(ak.addEventListener){ak.removeEventListener("DOMContentLoaded",a4,false);C.ready()}else{if(ak.readyState==="complete"){ak.detachEvent("onreadystatechange",a4);C.ready()}}},a0={};C.fn=C.prototype={constructor:C,init:function(bu,bx,by){var bw,bz,bv,bA;if(!bu){return this}if(bu.nodeType){this.context=this[0]=bu;this.length=1;return this}if(typeof bu==="string"){if(bu.charAt(0)==="<"&&bu.charAt(bu.length-1)===">"&&bu.length>=3){bw=[null,bu,null]}else{bw=aF.exec(bu)}if(bw&&(bw[1]||!bx)){if(bw[1]){bx=bx instanceof C?bx[0]:bx;bA=(bx&&bx.nodeType?bx.ownerDocument||bx:ak);bu=C.parseHTML(bw[1],bA,true);if(e.test(bw[1])&&C.isPlainObject(bx)){this.attr.call(bu,bx,true)}return C.merge(this,bu)}else{bz=ak.getElementById(bw[2]);if(bz&&bz.parentNode){if(bz.id!==bw[2]){return by.find(bu)}this.length=1;this[0]=bz}this.context=ak;this.selector=bu;return this}}else{if(!bx||bx.jqx){return(bx||by).find(bu)}else{return this.constructor(bx).find(bu)}}}else{if(C.isFunction(bu)){return by.ready(bu)}}if(bu.selector!==G){this.selector=bu.selector;this.context=bu.context}return C.makeArray(bu,this)},selector:"",jqx:"4.5.0",length:0,size:function(){return this.length},toArray:function(){return aD.call(this)},get:function(bu){return bu==null?this.toArray():(bu<0?this[this.length+bu]:this[bu])},pushStack:function(bv,bx,bu){var bw=C.merge(this.constructor(),bv);bw.prevObject=this;bw.context=this.context;if(bx==="find"){bw.selector=this.selector+(this.selector?" ":"")+bu}else{if(bx){bw.selector=this.selector+"."+bx+"("+bu+")"}}return bw},each:function(bv,bu){return C.each(this,bv,bu)},ready:function(bu){C.ready.promise().done(bu);return this},eq:function(bu){bu=+bu;return bu===-1?this.slice(bu):this.slice(bu,bu+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(aD.apply(this,arguments),"slice",aD.call(arguments).join(","))},map:function(bu){return this.pushStack(C.map(this,function(bw,bv){return bu.call(bw,bv,bw)}))},end:function(){return this.prevObject||this.constructor(null)},push:aR,sort:[].sort,splice:[].splice};C.fn.init.prototype=C.fn;C.extend=C.fn.extend=function(){var bD,bw,bu,bv,bA,bB,bz=arguments[0]||{},by=1,bx=arguments.length,bC=false;if(typeof bz==="boolean"){bC=bz;bz=arguments[1]||{};by=2}if(typeof bz!=="object"&&!C.isFunction(bz)){bz={}}if(bx===by){bz=this;--by}for(;by0){return}an.resolveWith(ak,[C]);if(C.fn.trigger){C(ak).trigger("ready").off("ready")}},isFunction:function(bu){return C.type(bu)==="function"},isArray:Array.isArray||function(bu){return C.type(bu)==="array"},isWindow:function(bu){return bu!=null&&bu==bu.window},isNumeric:function(bu){return !isNaN(parseFloat(bu))&&isFinite(bu)},type:function(bu){return bu==null?String(bu):a0[y.call(bu)]||"object"},isPlainObject:function(bw){if(!bw||C.type(bw)!=="object"||bw.nodeType||C.isWindow(bw)){return false}try{if(bw.constructor&&!b.call(bw,"constructor")&&!b.call(bw.constructor.prototype,"isPrototypeOf")){return false}}catch(bv){return false}var bu;for(bu in bw){}return bu===G||b.call(bw,bu)},isEmptyObject:function(bv){var bu;for(bu in bv){return false}return true},error:function(bu){throw new Error(bu)},parseHTML:function(bx,bw,bu){var bv;if(!bx||typeof bx!=="string"){return null}if(typeof bw==="boolean"){bu=bw;bw=0}bw=bw||ak;if((bv=e.exec(bx))){return[bw.createElement(bv[1])]}bv=C.buildFragment([bx],bw,bu?null:[]);return C.merge([],(bv.cacheable?C.clone(bv.fragment):bv.fragment).childNodes)},parseJSON:function(bu){if(!bu||typeof bu!=="string"){return null}bu=C.trim(bu);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(bu)}if(j.test(bu.replace(a5,"@").replace(K,"]").replace(t,""))){return(new Function("return "+bu))()}C.error("Invalid JSON: "+bu)},parseXML:function(bw){var bu,bv;if(!bw||typeof bw!=="string"){return null}try{if(bd.DOMParser){bv=new DOMParser();bu=bv.parseFromString(bw,"text/xml")}else{bu=new ActiveXObject("Microsoft.XMLDOM");bu.async="false";bu.loadXML(bw)}}catch(bx){bu=G}if(!bu||!bu.documentElement||bu.getElementsByTagName("parsererror").length){C.error("Invalid XML: "+bw)}return bu},noop:function(){},globalEval:function(bu){if(bu&&at.test(bu)){(bd.execScript||function(bv){bd["eval"].call(bd,bv)})(bu)}},camelCase:function(bu){return bu.replace(au,"ms-").replace(aS,m)},nodeName:function(bv,bu){return bv.nodeName&&bv.nodeName.toLowerCase()===bu.toLowerCase()},each:function(bz,bA,bw){var bv,bx=0,by=bz.length,bu=by===G||C.isFunction(bz);if(bw){if(bu){for(bv in bz){if(bA.apply(bz[bv],bw)===false){break}}}else{for(;bx0&&bu[0]&&bu[bv-1])||bv===0||C.isArray(bu));if(bx){for(;bw-1){bB.splice(bG,1);if(by){if(bG<=bz){bz--}if(bG<=bA){bA--}}}})}return this},has:function(bF){return C.inArray(bF,bB)>-1},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=G;return this},disabled:function(){return !bB},lock:function(){bC=G;if(!bx){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){bF=bF||[];bF=[bG,bF.slice?bF.slice():bF];if(bB&&(!bu||bC)){if(by){bC.push(bF)}else{bv(bF)}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bu}};return bD};C.extend({Deferred:function(bw){var bv=[["resolve","done",C.Callbacks("once memory"),"resolved"],["reject","fail",C.Callbacks("once memory"),"rejected"],["notify","progress",C.Callbacks("memory")]],bx="pending",by={state:function(){return bx},always:function(){bu.done(arguments).fail(arguments);return this},then:function(){var bz=arguments;return C.Deferred(function(bA){C.each(bv,function(bC,bB){var bE=bB[0],bD=bz[bC];bu[bB[1]](C.isFunction(bD)?function(){var bF=bD.apply(this,arguments);if(bF&&C.isFunction(bF.promise)){bF.promise().done(bA.resolve).fail(bA.reject).progress(bA.notify)}else{bA[bE+"With"](this===bu?bA:this,[bF])}}:bA[bE])});bz=null}).promise()},promise:function(bz){return bz!=null?C.extend(bz,by):by}},bu={};by.pipe=by.then;C.each(bv,function(bA,bz){var bC=bz[2],bB=bz[3];by[bz[1]]=bC.add;if(bB){bC.add(function(){bx=bB},bv[bA^1][2].disable,bv[2][2].lock)}bu[bz[0]]=bC.fire;bu[bz[0]+"With"]=bC.fireWith});by.promise(bu);if(bw){bw.call(bu,bu)}return bu},when:function(by){var bw=0,bA=aD.call(arguments),bu=bA.length,bv=bu!==1||(by&&C.isFunction(by.promise))?bu:0,bD=bv===1?by:C.Deferred(),bx=function(bF,bG,bE){return function(bH){bG[bF]=this;bE[bF]=arguments.length>1?aD.call(arguments):bH;if(bE===bC){bD.notifyWith(bG,bE)}else{if(!(--bv)){bD.resolveWith(bG,bE)}}}},bC,bz,bB;if(bu>1){bC=new Array(bu);bz=new Array(bu);bB=new Array(bu);for(;bw
    a";bF=bv.getElementsByTagName("*");bD=bv.getElementsByTagName("a")[0];if(!bF||!bD||!bF.length){return{}}bE=ak.createElement("select");bx=bE.appendChild(ak.createElement("option"));bC=bv.getElementsByTagName("input")[0];bD.style.cssText="top:1px;float:left;opacity:.5";bG={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bD.getAttribute("style")),hrefNormalized:(bD.getAttribute("href")==="/a"),opacity:/^0.5/.test(bD.style.opacity),cssFloat:!!bD.style.cssFloat,checkOn:(bC.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!ak.createElement("form").enctype,html5Clone:ak.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:(ak.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};bC.checked=true;bG.noCloneChecked=bC.cloneNode(true).checked;bE.disabled=true;bG.optDisabled=!bx.disabled;try{delete bv.test}catch(bA){bG.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",bu=function(){bG.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick");bv.detachEvent("onclick",bu)}bC=ak.createElement("input");bC.value="t";bC.setAttribute("type","radio");bG.radioValue=bC.value==="t";bC.setAttribute("checked","checked");bC.setAttribute("name","t");bv.appendChild(bC);bB=ak.createDocumentFragment();bB.appendChild(bv.lastChild);bG.checkClone=bB.cloneNode(true).cloneNode(true).lastChild.checked;bG.appendChecked=bC.checked;bB.removeChild(bC);bB.appendChild(bv);if(bv.attachEvent){for(by in {submit:true,change:true,focusin:true}){bz="on"+by;bw=(bz in bv);if(!bw){bv.setAttribute(bz,"return;");bw=(typeof bv[bz]==="function")}bG[by+"Bubbles"]=bw}}C(function(){var bI,bM,bK,bL,bJ="padding:0;margin:0;border:0;display:block;overflow:hidden;",bH=ak.getElementsByTagName("body")[0];if(!bH){return}bI=ak.createElement("div");bI.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";bH.insertBefore(bI,bH.firstChild);bM=ak.createElement("div");bI.appendChild(bM);bM.innerHTML="
    t
    ";bK=bM.getElementsByTagName("td");bK[0].style.cssText="padding:0;margin:0;border:0;display:none";bw=(bK[0].offsetHeight===0);bK[0].style.display="";bK[1].style.display="none";bG.reliableHiddenOffsets=bw&&(bK[0].offsetHeight===0);bM.innerHTML="";bM.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%;";bG.boxSizing=(bM.offsetWidth===4);bG.doesNotIncludeMarginInBodyOffset=(bH.offsetTop!==1);if(bd.getComputedStyle){bG.pixelPosition=(bd.getComputedStyle(bM,null)||{}).top!=="1%";bG.boxSizingReliable=(bd.getComputedStyle(bM,null)||{width:"4px"}).width==="4px";bL=ak.createElement("div");bL.style.cssText=bM.style.cssText=bJ;bL.style.marginRight=bL.style.width="0";bM.style.width="1px";bM.appendChild(bL);bG.reliableMarginRight=!parseFloat((bd.getComputedStyle(bL,null)||{}).marginRight)}if(typeof bM.style.zoom!=="undefined"){bM.innerHTML="";bM.style.cssText=bJ+"width:1px;padding:1px;display:inline;zoom:1";bG.inlineBlockNeedsLayout=(bM.offsetWidth===3);bM.style.display="block";bM.style.overflow="visible";bM.innerHTML="
    ";bM.firstChild.style.width="5px";bG.shrinkWrapBlocks=(bM.offsetWidth!==3);bI.style.zoom=1}bH.removeChild(bI);bI=bM=bK=bL=null});bB.removeChild(bv);bF=bD=bE=bx=bC=bB=bv=null;return bG})();var aK=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aq=/([A-Z])/g;C.extend({cache:{},deletedIds:[],uuid:0,expando:"JQXLite"+(C.fn.jqx+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(bu){bu=bu.nodeType?C.cache[bu[C.expando]]:bu[C.expando];return !!bu&&!M(bu)},data:function(bx,bv,bz,by){if(!C.acceptData(bx)){return}var bA,bC,bD=C.expando,bB=typeof bv==="string",bE=bx.nodeType,bu=bE?C.cache:bx,bw=bE?bx[bD]:bx[bD]&&bD;if((!bw||!bu[bw]||(!by&&!bu[bw].data))&&bB&&bz===G){return}if(!bw){if(bE){bx[bD]=bw=C.deletedIds.pop()||C.guid++}else{bw=bD}}if(!bu[bw]){bu[bw]={};if(!bE){bu[bw].toJSON=C.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){bu[bw]=C.extend(bu[bw],bv)}else{bu[bw].data=C.extend(bu[bw].data,bv)}}bA=bu[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==G){bA[C.camelCase(bv)]=bz}if(bB){bC=bA[bv];if(bC==null){bC=bA[C.camelCase(bv)]}}else{bC=bA}return bC},removeData:function(bx,bv,by){if(!C.acceptData(bx)){return}var bB,bA,bz,bC=bx.nodeType,bu=bC?C.cache:bx,bw=bC?bx[C.expando]:C.expando;if(!bu[bw]){return}if(bv){bB=by?bu[bw]:bu[bw].data;if(bB){if(!C.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=C.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA1,null,false)},removeData:function(bu){return this.each(function(){C.removeData(this,bu)})}});function a9(bw,bv,bx){if(bx===G&&bw.nodeType===1){var bu="data-"+bv.replace(aq,"-$1").toLowerCase();bx=bw.getAttribute(bu);if(typeof bx==="string"){try{bx=bx==="true"?true:bx==="false"?false:bx==="null"?null:+bx+""===bx?+bx:aK.test(bx)?C.parseJSON(bx):bx}catch(by){}C.data(bw,bv,bx)}else{bx=G}}return bx}function M(bv){var bu;for(bu in bv){if(bu==="data"&&C.isEmptyObject(bv[bu])){continue}if(bu!=="toJSON"){return false}}return true}C.extend({queue:function(bw,bv,bx){var bu;if(bw){bv=(bv||"fx")+"queue";bu=C._data(bw,bv);if(bx){if(!bu||C.isArray(bx)){bu=C._data(bw,bv,C.makeArray(bx))}else{bu.push(bx)}}return bu||[]}},dequeue:function(bz,by){by=by||"fx";var bv=C.queue(bz,by),bA=bv.length,bx=bv.shift(),bu=C._queueHooks(bz,by),bw=function(){C.dequeue(bz,by)};if(bx==="inprogress"){bx=bv.shift();bA--}if(bx){if(by==="fx"){bv.unshift("inprogress")}delete bu.stop;bx.call(bz,bw,bu)}if(!bA&&bu){bu.empty.fire()}},_queueHooks:function(bw,bv){var bu=bv+"queueHooks";return C._data(bw,bu)||C._data(bw,bu,{empty:C.Callbacks("once memory").add(function(){C.removeData(bw,bv+"queue",true);C.removeData(bw,bu,true)})})}});C.fn.extend({queue:function(bu,bv){var bw=2;if(typeof bu!=="string"){bv=bu;bu="fx";bw--}if(arguments.length1)},removeAttr:function(bu){return this.each(function(){C.removeAttr(this,bu)})},prop:function(bu,bv){return C.access(this,C.prop,bu,bv,arguments.length>1)},removeProp:function(bu){bu=C.propFix[bu]||bu;return this.each(function(){try{this[bu]=G;delete this[bu]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,bu;if(C.isFunction(by)){return this.each(function(bC){C(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(a8);for(bw=0,bv=this.length;bw=0){by=by.replace(" "+bx[bB]+" "," ")}}bz.className=bA?C.trim(by):""}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,bu=typeof bv==="boolean";if(C.isFunction(bx)){return this.each(function(by){C(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=C(this),bB=bv,bC=bx.split(a8);while((bA=bC[bz++])){bB=bu?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){C._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":C._data(this,"__className__")||""}}})},hasClass:function(bu){var bx=" "+bu+" ",bw=0,bv=this.length;for(;bw=0){return true}}return false},val:function(bx){var bu,bv,by,bw=this[0];if(!arguments.length){if(bw){bu=C.valHooks[bw.type]||C.valHooks[bw.nodeName.toLowerCase()];if(bu&&"get" in bu&&(bv=bu.get(bw,"value"))!==G){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aP,""):bv==null?"":bv}return}by=C.isFunction(bx);return this.each(function(bA){var bB,bz=C(this);if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(C.isArray(bB)){bB=C.map(bB,function(bC){return bC==null?"":bC+""})}}}bu=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()];if(!bu||!("set" in bu)||bu.set(this,bB,"value")===G){this.value=bB}})}});C.extend({valHooks:{option:{get:function(bu){var bv=bu.attributes.value;return !bv||bv.specified?bu.value:bu.text}},select:{get:function(bu){var bA,bw,bC=bu.options,by=bu.selectedIndex,bx=bu.type==="select-one"||by<0,bB=bx?null:[],bz=bx?by+1:bC.length,bv=by<0?bz:bx?by:0;for(;bv=0});if(!bu.length){bv.selectedIndex=-1}return bu}}},attrFn:{},attr:function(bA,bx,bB,bz){var bw,bu,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&C.isFunction(C.fn[bx])){return C(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return C.prop(bA,bx,bB)}by=bv!==1||!C.isXMLDoc(bA);if(by){bx=bx.toLowerCase();bu=C.attrHooks[bx]||(ae.test(bx)?aT:bh)}if(bB!==G){if(bB===null){C.removeAttr(bA,bx);return}else{if(bu&&"set" in bu&&by&&(bw=bu.set(bA,bB,bx))!==G){return bw}else{bA.setAttribute(bx,bB+"");return bB}}}else{if(bu&&"get" in bu&&by&&(bw=bu.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?G:bw}}},removeAttr:function(bx,bz){var by,bA,bv,bu,bw=0;if(bz&&bx.nodeType===1){bA=bz.split(a8);for(;bw=0){bG=bG.slice(0,-1);bx=true}if(bG.indexOf(".")>=0){bw=bG.split(".");bG=bw.shift();bw.sort()}if((!bA||C.event.customEvent[bG])&&!C.event.global[bG]){return}bv=typeof bv==="object"?bv[C.expando]?bv:new C.Event(bG,bv):new C.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bx;bv.namespace=bw.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bw.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){bu=C.cache;for(bD in bu){if(bu[bD].events&&bu[bD].events[bG]){C.event.trigger(bv,bC,bu[bD].handle.elem,true)}}return}bv.result=G;if(!bv.target){bv.target=bA}bC=bC!=null?C.makeArray(bC):[];bC.unshift(bv);bF=C.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bC)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!C.isWindow(bA)){bI=bF.delegateType||bG;bH=N.test(bI+bG)?bA:bA.parentNode;for(bz=bA;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz===(bA.ownerDocument||ak)){bB.push([bz.defaultView||bz.parentWindow||bd,bI])}}for(bD=0;bD=0:C.find(bx,this,null,[bK]).length}if(bD[bx]){bC.push(bI)}}if(bC.length){bH.push({elem:bK,matches:bC})}}}}if(by.length>bz){bH.push({elem:this,matches:by.slice(bz)})}for(bB=0;bB0?this.on(bu,null,bx,bw):this.trigger(bu)};if(aH.test(bu)){C.event.fixHooks[bu]=C.event.keyHooks}if(bi.test(bu)){C.event.fixHooks[bu]=C.event.mouseHooks}}); +var oldBrowser=document.all&&!document.addEventListener;if(!oldBrowser){(function(bd,G){var q,an,ak=bd.document,bo=bd.location,bt=bd.navigator,ax=bd.JQXLite,X=bd.$,aR=Array.prototype.push,aD=Array.prototype.slice,aA=Array.prototype.indexOf,y=Object.prototype.toString,b=Object.prototype.hasOwnProperty,aw=String.prototype.trim,C=function(bu,bv){return new C.fn.init(bu,bv,q)},aE=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,at=/\S/,a8=/\s+/,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,aF=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,e=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,j=/^[\],:{}\s]*$/,t=/(?:^|:|,)(?:\s*\[)+/g,a5=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,K=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,au=/^-ms-/,aS=/-([\da-z])/gi,m=function(bu,bv){return(bv+"").toUpperCase()},a4=function(){if(ak.addEventListener){ak.removeEventListener("DOMContentLoaded",a4,false);C.ready()}else{if(ak.readyState==="complete"){ak.detachEvent("onreadystatechange",a4);C.ready()}}},a0={};C.fn=C.prototype={constructor:C,init:function(bu,bx,by){var bw,bz,bv,bA;if(!bu){return this}if(bu.nodeType){this.context=this[0]=bu;this.length=1;return this}if(typeof bu==="string"){if(bu.charAt(0)==="<"&&bu.charAt(bu.length-1)===">"&&bu.length>=3){bw=[null,bu,null]}else{bw=aF.exec(bu)}if(bw&&(bw[1]||!bx)){if(bw[1]){bx=bx instanceof C?bx[0]:bx;bA=(bx&&bx.nodeType?bx.ownerDocument||bx:ak);bu=C.parseHTML(bw[1],bA,true);if(e.test(bw[1])&&C.isPlainObject(bx)){this.attr.call(bu,bx,true)}return C.merge(this,bu)}else{bz=ak.getElementById(bw[2]);if(bz&&bz.parentNode){if(bz.id!==bw[2]){return by.find(bu)}this.length=1;this[0]=bz}this.context=ak;this.selector=bu;return this}}else{if(!bx||bx.jqx){return(bx||by).find(bu)}else{return this.constructor(bx).find(bu)}}}else{if(C.isFunction(bu)){return by.ready(bu)}}if(bu.selector!==G){this.selector=bu.selector;this.context=bu.context}return C.makeArray(bu,this)},selector:"",jqx:"4.5.0",length:0,size:function(){return this.length},toArray:function(){return aD.call(this)},get:function(bu){return bu==null?this.toArray():(bu<0?this[this.length+bu]:this[bu])},pushStack:function(bv,bx,bu){var bw=C.merge(this.constructor(),bv);bw.prevObject=this;bw.context=this.context;if(bx==="find"){bw.selector=this.selector+(this.selector?" ":"")+bu}else{if(bx){bw.selector=this.selector+"."+bx+"("+bu+")"}}return bw},each:function(bv,bu){return C.each(this,bv,bu)},ready:function(bu){C.ready.promise().done(bu);return this},eq:function(bu){bu=+bu;return bu===-1?this.slice(bu):this.slice(bu,bu+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(aD.apply(this,arguments),"slice",aD.call(arguments).join(","))},map:function(bu){return this.pushStack(C.map(this,function(bw,bv){return bu.call(bw,bv,bw)}))},end:function(){return this.prevObject||this.constructor(null)},push:aR,sort:[].sort,splice:[].splice};C.fn.init.prototype=C.fn;C.extend=C.fn.extend=function(){var bD,bw,bu,bv,bA,bB,bz=arguments[0]||{},by=1,bx=arguments.length,bC=false;if(typeof bz==="boolean"){bC=bz;bz=arguments[1]||{};by=2}if(typeof bz!=="object"&&!C.isFunction(bz)){bz={}}if(bx===by){bz=this;--by}for(;by0){return}an.resolveWith(ak,[C]);if(C.fn.trigger){C(ak).trigger("ready").off("ready")}},isFunction:function(bu){return C.type(bu)==="function"},isArray:Array.isArray||function(bu){return C.type(bu)==="array"},isWindow:function(bu){return bu!=null&&bu==bu.window},isNumeric:function(bu){return !isNaN(parseFloat(bu))&&isFinite(bu)},type:function(bu){return bu==null?String(bu):a0[y.call(bu)]||"object"},isPlainObject:function(bw){if(!bw||C.type(bw)!=="object"||bw.nodeType||C.isWindow(bw)){return false}try{if(bw.constructor&&!b.call(bw,"constructor")&&!b.call(bw.constructor.prototype,"isPrototypeOf")){return false}}catch(bv){return false}var bu;for(bu in bw){}return bu===G||b.call(bw,bu)},isEmptyObject:function(bv){var bu;for(bu in bv){return false}return true},error:function(bu){throw new Error(bu)},parseHTML:function(bx,bw,bu){var bv;if(!bx||typeof bx!=="string"){return null}if(typeof bw==="boolean"){bu=bw;bw=0}bw=bw||ak;if((bv=e.exec(bx))){return[bw.createElement(bv[1])]}bv=C.buildFragment([bx],bw,bu?null:[]);return C.merge([],(bv.cacheable?C.clone(bv.fragment):bv.fragment).childNodes)},parseJSON:function(bu){if(!bu||typeof bu!=="string"){return null}bu=C.trim(bu);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(bu)}if(j.test(bu.replace(a5,"@").replace(K,"]").replace(t,""))){return(new Function("return "+bu))()}C.error("Invalid JSON: "+bu)},parseXML:function(bw){var bu,bv;if(!bw||typeof bw!=="string"){return null}try{if(bd.DOMParser){bv=new DOMParser();bu=bv.parseFromString(bw,"text/xml")}else{bu=new ActiveXObject("Microsoft.XMLDOM");bu.async="false";bu.loadXML(bw)}}catch(bx){bu=G}if(!bu||!bu.documentElement||bu.getElementsByTagName("parsererror").length){C.error("Invalid XML: "+bw)}return bu},noop:function(){},globalEval:function(bu){if(bu&&at.test(bu)){(bd.execScript||function(bv){bd["eval"].call(bd,bv)})(bu)}},camelCase:function(bu){return bu.replace(au,"ms-").replace(aS,m)},nodeName:function(bv,bu){return bv.nodeName&&bv.nodeName.toLowerCase()===bu.toLowerCase()},each:function(bz,bA,bw){var bv,bx=0,by=bz.length,bu=by===G||C.isFunction(bz);if(bw){if(bu){for(bv in bz){if(bA.apply(bz[bv],bw)===false){break}}}else{for(;bx0&&bu[0]&&bu[bv-1])||bv===0||C.isArray(bu));if(bx){for(;bw-1){bB.splice(bG,1);if(by){if(bG<=bz){bz--}if(bG<=bA){bA--}}}})}return this},has:function(bF){return C.inArray(bF,bB)>-1},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=G;return this},disabled:function(){return !bB},lock:function(){bC=G;if(!bx){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){bF=bF||[];bF=[bG,bF.slice?bF.slice():bF];if(bB&&(!bu||bC)){if(by){bC.push(bF)}else{bv(bF)}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bu}};return bD};C.extend({Deferred:function(bw){var bv=[["resolve","done",C.Callbacks("once memory"),"resolved"],["reject","fail",C.Callbacks("once memory"),"rejected"],["notify","progress",C.Callbacks("memory")]],bx="pending",by={state:function(){return bx},always:function(){bu.done(arguments).fail(arguments);return this},then:function(){var bz=arguments;return C.Deferred(function(bA){C.each(bv,function(bC,bB){var bE=bB[0],bD=bz[bC];bu[bB[1]](C.isFunction(bD)?function(){var bF=bD.apply(this,arguments);if(bF&&C.isFunction(bF.promise)){bF.promise().done(bA.resolve).fail(bA.reject).progress(bA.notify)}else{bA[bE+"With"](this===bu?bA:this,[bF])}}:bA[bE])});bz=null}).promise()},promise:function(bz){return bz!=null?C.extend(bz,by):by}},bu={};by.pipe=by.then;C.each(bv,function(bA,bz){var bC=bz[2],bB=bz[3];by[bz[1]]=bC.add;if(bB){bC.add(function(){bx=bB},bv[bA^1][2].disable,bv[2][2].lock)}bu[bz[0]]=bC.fire;bu[bz[0]+"With"]=bC.fireWith});by.promise(bu);if(bw){bw.call(bu,bu)}return bu},when:function(by){var bw=0,bA=aD.call(arguments),bu=bA.length,bv=bu!==1||(by&&C.isFunction(by.promise))?bu:0,bD=bv===1?by:C.Deferred(),bx=function(bF,bG,bE){return function(bH){bG[bF]=this;bE[bF]=arguments.length>1?aD.call(arguments):bH;if(bE===bC){bD.notifyWith(bG,bE)}else{if(!(--bv)){bD.resolveWith(bG,bE)}}}},bC,bz,bB;if(bu>1){bC=new Array(bu);bz=new Array(bu);bB=new Array(bu);for(;bw
    a";bF=bv.getElementsByTagName("*");bD=bv.getElementsByTagName("a")[0];if(!bF||!bD||!bF.length){return{}}bE=ak.createElement("select");bx=bE.appendChild(ak.createElement("option"));bC=bv.getElementsByTagName("input")[0];bD.style.cssText="top:1px;float:left;opacity:.5";bG={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bD.getAttribute("style")),hrefNormalized:(bD.getAttribute("href")==="/a"),opacity:/^0.5/.test(bD.style.opacity),cssFloat:!!bD.style.cssFloat,checkOn:(bC.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!ak.createElement("form").enctype,html5Clone:ak.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:(ak.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};bC.checked=true;bG.noCloneChecked=bC.cloneNode(true).checked;bE.disabled=true;bG.optDisabled=!bx.disabled;try{delete bv.test}catch(bA){bG.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",bu=function(){bG.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick");bv.detachEvent("onclick",bu)}bC=ak.createElement("input");bC.value="t";bC.setAttribute("type","radio");bG.radioValue=bC.value==="t";bC.setAttribute("checked","checked");bC.setAttribute("name","t");bv.appendChild(bC);bB=ak.createDocumentFragment();bB.appendChild(bv.lastChild);bG.checkClone=bB.cloneNode(true).cloneNode(true).lastChild.checked;bG.appendChecked=bC.checked;bB.removeChild(bC);bB.appendChild(bv);if(bv.attachEvent){for(by in {submit:true,change:true,focusin:true}){bz="on"+by;bw=(bz in bv);if(!bw){bv.setAttribute(bz,"return;");bw=(typeof bv[bz]==="function")}bG[by+"Bubbles"]=bw}}C(function(){var bI,bM,bK,bL,bJ="padding:0;margin:0;border:0;display:block;overflow:hidden;",bH=ak.getElementsByTagName("body")[0];if(!bH){return}bI=ak.createElement("div");bI.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";bH.insertBefore(bI,bH.firstChild);bM=ak.createElement("div");bI.appendChild(bM);bM.innerHTML="
    t
    ";bK=bM.getElementsByTagName("td");bK[0].style.cssText="padding:0;margin:0;border:0;display:none";bw=(bK[0].offsetHeight===0);bK[0].style.display="";bK[1].style.display="none";bG.reliableHiddenOffsets=bw&&(bK[0].offsetHeight===0);bM.innerHTML="";bM.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%;";bG.boxSizing=(bM.offsetWidth===4);bG.doesNotIncludeMarginInBodyOffset=(bH.offsetTop!==1);if(bd.getComputedStyle){bG.pixelPosition=(bd.getComputedStyle(bM,null)||{}).top!=="1%";bG.boxSizingReliable=(bd.getComputedStyle(bM,null)||{width:"4px"}).width==="4px";bL=ak.createElement("div");bL.style.cssText=bM.style.cssText=bJ;bL.style.marginRight=bL.style.width="0";bM.style.width="1px";bM.appendChild(bL);bG.reliableMarginRight=!parseFloat((bd.getComputedStyle(bL,null)||{}).marginRight)}if(typeof bM.style.zoom!=="undefined"){bM.innerHTML="";bM.style.cssText=bJ+"width:1px;padding:1px;display:inline;zoom:1";bG.inlineBlockNeedsLayout=(bM.offsetWidth===3);bM.style.display="block";bM.style.overflow="visible";bM.innerHTML="
    ";bM.firstChild.style.width="5px";bG.shrinkWrapBlocks=(bM.offsetWidth!==3);bI.style.zoom=1}bH.removeChild(bI);bI=bM=bK=bL=null});bB.removeChild(bv);bF=bD=bE=bx=bC=bB=bv=null;return bG})();var aK=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aq=/([A-Z])/g;C.extend({cache:{},deletedIds:[],uuid:0,expando:"JQXLite"+(C.fn.jqx+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(bu){bu=bu.nodeType?C.cache[bu[C.expando]]:bu[C.expando];return !!bu&&!M(bu)},data:function(bx,bv,bz,by){if(!C.acceptData(bx)){return}var bA,bC,bD=C.expando,bB=typeof bv==="string",bE=bx.nodeType,bu=bE?C.cache:bx,bw=bE?bx[bD]:bx[bD]&&bD;if((!bw||!bu[bw]||(!by&&!bu[bw].data))&&bB&&bz===G){return}if(!bw){if(bE){bx[bD]=bw=C.deletedIds.pop()||C.guid++}else{bw=bD}}if(!bu[bw]){bu[bw]={};if(!bE){bu[bw].toJSON=C.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){bu[bw]=C.extend(bu[bw],bv)}else{bu[bw].data=C.extend(bu[bw].data,bv)}}bA=bu[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==G){bA[C.camelCase(bv)]=bz}if(bB){bC=bA[bv];if(bC==null){bC=bA[C.camelCase(bv)]}}else{bC=bA}return bC},removeData:function(bx,bv,by){if(!C.acceptData(bx)){return}var bB,bA,bz,bC=bx.nodeType,bu=bC?C.cache:bx,bw=bC?bx[C.expando]:C.expando;if(!bu[bw]){return}if(bv){bB=by?bu[bw]:bu[bw].data;if(bB){if(!C.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=C.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA1,null,false)},removeData:function(bu){return this.each(function(){C.removeData(this,bu)})}});function a9(bw,bv,bx){if(bx===G&&bw.nodeType===1){var bu="data-"+bv.replace(aq,"-$1").toLowerCase();bx=bw.getAttribute(bu);if(typeof bx==="string"){try{bx=bx==="true"?true:bx==="false"?false:bx==="null"?null:+bx+""===bx?+bx:aK.test(bx)?C.parseJSON(bx):bx}catch(by){}C.data(bw,bv,bx)}else{bx=G}}return bx}function M(bv){var bu;for(bu in bv){if(bu==="data"&&C.isEmptyObject(bv[bu])){continue}if(bu!=="toJSON"){return false}}return true}C.extend({queue:function(bw,bv,bx){var bu;if(bw){bv=(bv||"fx")+"queue";bu=C._data(bw,bv);if(bx){if(!bu||C.isArray(bx)){bu=C._data(bw,bv,C.makeArray(bx))}else{bu.push(bx)}}return bu||[]}},dequeue:function(bz,by){by=by||"fx";var bv=C.queue(bz,by),bA=bv.length,bx=bv.shift(),bu=C._queueHooks(bz,by),bw=function(){C.dequeue(bz,by)};if(bx==="inprogress"){bx=bv.shift();bA--}if(bx){if(by==="fx"){bv.unshift("inprogress")}delete bu.stop;bx.call(bz,bw,bu)}if(!bA&&bu){bu.empty.fire()}},_queueHooks:function(bw,bv){var bu=bv+"queueHooks";return C._data(bw,bu)||C._data(bw,bu,{empty:C.Callbacks("once memory").add(function(){C.removeData(bw,bv+"queue",true);C.removeData(bw,bu,true)})})}});C.fn.extend({queue:function(bu,bv){var bw=2;if(typeof bu!=="string"){bv=bu;bu="fx";bw--}if(arguments.length1)},removeAttr:function(bu){return this.each(function(){C.removeAttr(this,bu)})},prop:function(bu,bv){return C.access(this,C.prop,bu,bv,arguments.length>1)},removeProp:function(bu){bu=C.propFix[bu]||bu;return this.each(function(){try{this[bu]=G;delete this[bu]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,bu;if(C.isFunction(by)){return this.each(function(bC){C(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(a8);for(bw=0,bv=this.length;bw=0){by=by.replace(" "+bx[bB]+" "," ")}}bz.className=bA?C.trim(by):""}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,bu=typeof bv==="boolean";if(C.isFunction(bx)){return this.each(function(by){C(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=C(this),bB=bv,bC=bx.split(a8);while((bA=bC[bz++])){bB=bu?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){C._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":C._data(this,"__className__")||""}}})},hasClass:function(bu){var bx=" "+bu+" ",bw=0,bv=this.length;for(;bw=0){return true}}return false},val:function(bx){var bu,bv,by,bw=this[0];if(!arguments.length){if(bw){bu=C.valHooks[bw.type]||C.valHooks[bw.nodeName.toLowerCase()];if(bu&&"get" in bu&&(bv=bu.get(bw,"value"))!==G){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aP,""):bv==null?"":bv}return}by=C.isFunction(bx);return this.each(function(bA){var bB,bz=C(this);if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(C.isArray(bB)){bB=C.map(bB,function(bC){return bC==null?"":bC+""})}}}bu=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()];if(!bu||!("set" in bu)||bu.set(this,bB,"value")===G){this.value=bB}})}});C.extend({valHooks:{option:{get:function(bu){var bv=bu.attributes.value;return !bv||bv.specified?bu.value:bu.text}},select:{get:function(bu){var bA,bw,bC=bu.options,by=bu.selectedIndex,bx=bu.type==="select-one"||by<0,bB=bx?null:[],bz=bx?by+1:bC.length,bv=by<0?bz:bx?by:0;for(;bv=0});if(!bu.length){bv.selectedIndex=-1}return bu}}},attrFn:{},attr:function(bA,bx,bB,bz){var bw,bu,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&C.isFunction(C.fn[bx])){return C(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return C.prop(bA,bx,bB)}by=bv!==1||!C.isXMLDoc(bA);if(by){bx=bx.toLowerCase();bu=C.attrHooks[bx]||(ae.test(bx)?aT:bh)}if(bB!==G){if(bB===null){C.removeAttr(bA,bx);return}else{if(bu&&"set" in bu&&by&&(bw=bu.set(bA,bB,bx))!==G){return bw}else{bA.setAttribute(bx,bB+"");return bB}}}else{if(bu&&"get" in bu&&by&&(bw=bu.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?G:bw}}},removeAttr:function(bx,bz){var by,bA,bv,bu,bw=0;if(bz&&bx.nodeType===1){bA=bz.split(a8);for(;bw=0){bG=bG.slice(0,-1);bx=true}if(bG.indexOf(".")>=0){bw=bG.split(".");bG=bw.shift();bw.sort()}if((!bA||C.event.customEvent[bG])&&!C.event.global[bG]){return}bv=typeof bv==="object"?bv[C.expando]?bv:new C.Event(bG,bv):new C.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bx;bv.namespace=bw.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bw.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){bu=C.cache;for(bD in bu){if(bu[bD].events&&bu[bD].events[bG]){C.event.trigger(bv,bC,bu[bD].handle.elem,true)}}return}bv.result=G;if(!bv.target){bv.target=bA}bC=bC!=null?C.makeArray(bC):[];bC.unshift(bv);bF=C.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bC)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!C.isWindow(bA)){bI=bF.delegateType||bG;bH=N.test(bI+bG)?bA:bA.parentNode;for(bz=bA;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz===(bA.ownerDocument||ak)){bB.push([bz.defaultView||bz.parentWindow||bd,bI])}}for(bD=0;bD=0:C.find(bx,this,null,[bK]).length}if(bD[bx]){bC.push(bI)}}if(bC.length){bH.push({elem:bK,matches:bC})}}}}if(by.length>bz){bH.push({elem:this,matches:by.slice(bz)})}for(bB=0;bB0?this.on(bu,null,bx,bw):this.trigger(bu)};if(aH.test(bu)){C.event.fixHooks[bu]=C.event.keyHooks}if(bi.test(bu)){C.event.fixHooks[bu]=C.event.mouseHooks}}); /*! * Sizzle CSS Selector Engine * Copyright 2012 JQXLite Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ -(function(cn,bM){var cs,bF,cg,bv,bR,b5,bI,bL,bH,ce,bE=true,bZ="undefined",cu=("sizcache"+Math.random()).replace(".",""),bz=String,bD=cn.document,bG=bD.documentElement,bW=0,bK=0,b9=[].pop,cr=[].push,bQ=[].slice,bT=[].indexOf||function(cE){var cD=0,cC=this.length;for(;cDcg.cacheLength){delete cC[cD.shift()]}return(cC[cE+" "]=cF)},cC)},cp=cA(),cq=cA(),bS=cA(),b3="[\\x20\\t\\r\\n\\f]",bP="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",bN=bP.replace("w","w#"),cz="([*^$|!~]?=)",ck="\\["+b3+"*("+bP+")"+b3+"*(?:"+cz+b3+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+bN+")|)|)"+b3+"*\\]",cB=":("+bP+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+ck+")|[^:]|\\\\.)*|.*))\\)|)",b4=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+b3+"*((?:-\\d)?\\d*)"+b3+"*\\)|)(?=[^-]|$)",co=new RegExp("^"+b3+"+|((?:^|[^\\\\])(?:\\\\.)*)"+b3+"+$","g"),bA=new RegExp("^"+b3+"*,"+b3+"*"),cc=new RegExp("^"+b3+"*([\\x20\\t\\r\\n\\f>+~])"+b3+"*"),ch=new RegExp(cB),cj=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,b8=/^:not/,cm=/[\x20\t\r\n\f]*[+~]/,cv=/:not\($/,bX=/h\d/i,ci=/input|select|textarea|button/i,bY=/\\(?!\\)/g,cb={ID:new RegExp("^#("+bP+")"),CLASS:new RegExp("^\\.("+bP+")"),NAME:new RegExp("^\\[name=['\"]?("+bP+")['\"]?\\]"),TAG:new RegExp("^("+bP.replace("w","w*")+")"),ATTR:new RegExp("^"+ck),PSEUDO:new RegExp("^"+cB),POS:new RegExp(b4,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+b3+"*(even|odd|(([+-]|)(\\d*)n|)"+b3+"*(?:([+-]|)"+b3+"*(\\d+)|))"+b3+"*\\)|)","i"),needsContext:new RegExp("^"+b3+"*[>+~]|"+b4,"i")},cf=function(cC){var cE=bD.createElement("div");try{return cC(cE)}catch(cD){return false}finally{cE=null}},bC=cf(function(cC){cC.appendChild(bD.createComment(""));return !cC.getElementsByTagName("*").length}),b7=cf(function(cC){cC.innerHTML="";return cC.firstChild&&typeof cC.firstChild.getAttribute!==bZ&&cC.firstChild.getAttribute("href")==="#"}),bV=cf(function(cD){cD.innerHTML="";var cC=typeof cD.lastChild.getAttribute("multiple");return cC!=="boolean"&&cC!=="string"}),b6=cf(function(cC){cC.innerHTML="";if(!cC.getElementsByClassName||!cC.getElementsByClassName("e").length){return false}cC.lastChild.className="e";return cC.getElementsByClassName("e").length===2}),bu=cf(function(cD){cD.id=cu+0;cD.innerHTML="
    ";bG.insertBefore(cD,bG.firstChild);var cC=bD.getElementsByName&&bD.getElementsByName(cu).length===2+bD.getElementsByName(cu+0).length;bF=!bD.getElementById(cu);bG.removeChild(cD);return cC});try{bQ.call(bG.childNodes,0)[0].nodeType}catch(cy){bQ=function(cD){var cE,cC=[];for(;(cE=this[cD]);cD++){cC.push(cE)}return cC}}function cl(cF,cC,cH,cK){cH=cH||[];cC=cC||bD;var cI,cD,cJ,cE,cG=cC.nodeType;if(!cF||typeof cF!=="string"){return cH}if(cG!==1&&cG!==9){return[]}cJ=bR(cC);if(!cJ&&!cK){if((cI=cj.exec(cF))){if((cE=cI[1])){if(cG===9){cD=cC.getElementById(cE);if(cD&&cD.parentNode){if(cD.id===cE){cH.push(cD);return cH}}else{return cH}}else{if(cC.ownerDocument&&(cD=cC.ownerDocument.getElementById(cE))&&b5(cC,cD)&&cD.id===cE){cH.push(cD);return cH}}}else{if(cI[2]){cr.apply(cH,bQ.call(cC.getElementsByTagName(cF),0));return cH}else{if((cE=cI[3])&&b6&&cC.getElementsByClassName){cr.apply(cH,bQ.call(cC.getElementsByClassName(cE),0));return cH}}}}}return ct(cF.replace(co,"$1"),cC,cH,cK,cJ)}cl.matches=function(cD,cC){return cl(cD,null,null,cC)};cl.matchesSelector=function(cC,cD){return cl(cD,null,null,[cC]).length>0};function cd(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return cD==="input"&&cE.type===cC}}function by(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return(cD==="input"||cD==="button")&&cE.type===cC}}function ca(cC){return cw(function(cD){cD=+cD;return cw(function(cE,cI){var cG,cF=cC([],cE.length,cD),cH=cF.length;while(cH--){if(cE[(cG=cF[cH])]){cE[cG]=!(cI[cG]=cE[cG])}}})})}bv=cl.getText=function(cG){var cF,cD="",cE=0,cC=cG.nodeType;if(cC){if(cC===1||cC===9||cC===11){if(typeof cG.textContent==="string"){return cG.textContent}else{for(cG=cG.firstChild;cG;cG=cG.nextSibling){cD+=bv(cG)}}}else{if(cC===3||cC===4){return cG.nodeValue}}}else{for(;(cF=cG[cE]);cE++){cD+=bv(cF)}}return cD};bR=cl.isXML=function(cC){var cD=cC&&(cC.ownerDocument||cC).documentElement;return cD?cD.nodeName!=="HTML":false};b5=cl.contains=bG.contains?function(cD,cC){var cF=cD.nodeType===9?cD.documentElement:cD,cE=cC&&cC.parentNode;return cD===cE||!!(cE&&cE.nodeType===1&&cF.contains&&cF.contains(cE))}:bG.compareDocumentPosition?function(cD,cC){return cC&&!!(cD.compareDocumentPosition(cC)&16)}:function(cD,cC){while((cC=cC.parentNode)){if(cC===cD){return true}}return false};cl.attr=function(cE,cD){var cF,cC=bR(cE);if(!cC){cD=cD.toLowerCase()}if((cF=cg.attrHandle[cD])){return cF(cE)}if(cC||bV){return cE.getAttribute(cD)}cF=cE.getAttributeNode(cD);return cF?typeof cE[cD]==="boolean"?cE[cD]?cD:null:cF.specified?cF.value:null:null};cg=cl.selectors={cacheLength:50,createPseudo:cw,match:cb,attrHandle:b7?{}:{href:function(cC){return cC.getAttribute("href",2)},type:function(cC){return cC.getAttribute("type")}},find:{ID:bF?function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC&&cC.parentNode?[cC]:[]}}:function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC?cC.id===cF||typeof cC.getAttributeNode!==bZ&&cC.getAttributeNode("id").value===cF?[cC]:bM:[]}},TAG:bC?function(cC,cD){if(typeof cD.getElementsByTagName!==bZ){return cD.getElementsByTagName(cC)}}:function(cC,cG){var cF=cG.getElementsByTagName(cC);if(cC==="*"){var cH,cE=[],cD=0;for(;(cH=cF[cD]);cD++){if(cH.nodeType===1){cE.push(cH)}}return cE}return cF},NAME:bu&&function(cC,cD){if(typeof cD.getElementsByName!==bZ){return cD.getElementsByName(name)}},CLASS:b6&&function(cE,cD,cC){if(typeof cD.getElementsByClassName!==bZ&&!cC){return cD.getElementsByClassName(cE)}}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(cC){cC[1]=cC[1].replace(bY,"");cC[3]=(cC[4]||cC[5]||"").replace(bY,"");if(cC[2]==="~="){cC[3]=" "+cC[3]+" "}return cC.slice(0,4)},CHILD:function(cC){cC[1]=cC[1].toLowerCase();if(cC[1]==="nth"){if(!cC[2]){cl.error(cC[0])}cC[3]=+(cC[3]?cC[4]+(cC[5]||1):2*(cC[2]==="even"||cC[2]==="odd"));cC[4]=+((cC[6]+cC[7])||cC[2]==="odd")}else{if(cC[2]){cl.error(cC[0])}}return cC},PSEUDO:function(cD){var cE,cC;if(cb.CHILD.test(cD[0])){return null}if(cD[3]){cD[2]=cD[3]}else{if((cE=cD[4])){if(ch.test(cE)&&(cC=bw(cE,true))&&(cC=cE.indexOf(")",cE.length-cC)-cE.length)){cE=cE.slice(0,cC);cD[0]=cD[0].slice(0,cC)}cD[2]=cE}}return cD.slice(0,3)}},filter:{ID:bF?function(cC){cC=cC.replace(bY,"");return function(cD){return cD.getAttribute("id")===cC}}:function(cC){cC=cC.replace(bY,"");return function(cE){var cD=typeof cE.getAttributeNode!==bZ&&cE.getAttributeNode("id");return cD&&cD.value===cC}},TAG:function(cC){if(cC==="*"){return function(){return true}}cC=cC.replace(bY,"").toLowerCase();return function(cD){return cD.nodeName&&cD.nodeName.toLowerCase()===cC}},CLASS:function(cC){var cD=cp[cu][cC+" "];return cD||(cD=new RegExp("(^|"+b3+")"+cC+"("+b3+"|$)"))&&cp(cC,function(cE){return cD.test(cE.className||(typeof cE.getAttribute!==bZ&&cE.getAttribute("class"))||"")})},ATTR:function(cE,cD,cC){return function(cH,cG){var cF=cl.attr(cH,cE);if(cF==null){return cD==="!="}if(!cD){return true}cF+="";return cD==="="?cF===cC:cD==="!="?cF!==cC:cD==="^="?cC&&cF.indexOf(cC)===0:cD==="*="?cC&&cF.indexOf(cC)>-1:cD==="$="?cC&&cF.substr(cF.length-cC.length)===cC:cD==="~="?(" "+cF+" ").indexOf(cC)>-1:cD==="|="?cF===cC||cF.substr(0,cC.length+1)===cC+"-":false}},CHILD:function(cC,cE,cF,cD){if(cC==="nth"){return function(cI){var cH,cJ,cG=cI.parentNode;if(cF===1&&cD===0){return true}if(cG){cJ=0;for(cH=cG.firstChild;cH;cH=cH.nextSibling){if(cH.nodeType===1){cJ++;if(cI===cH){break}}}}cJ-=cD;return cJ===cF||(cJ%cF===0&&cJ/cF>=0)}}return function(cH){var cG=cH;switch(cC){case"only":case"first":while((cG=cG.previousSibling)){if(cG.nodeType===1){return false}}if(cC==="first"){return true}cG=cH;case"last":while((cG=cG.nextSibling)){if(cG.nodeType===1){return false}}return true}}},PSEUDO:function(cF,cE){var cC,cD=cg.pseudos[cF]||cg.setFilters[cF.toLowerCase()]||cl.error("unsupported pseudo: "+cF);if(cD[cu]){return cD(cE)}if(cD.length>1){cC=[cF,cF,"",cE];return cg.setFilters.hasOwnProperty(cF.toLowerCase())?cw(function(cI,cK){var cH,cG=cD(cI,cE),cJ=cG.length;while(cJ--){cH=bT.call(cI,cG[cJ]);cI[cH]=!(cK[cH]=cG[cJ])}}):function(cG){return cD(cG,0,cC)}}return cD}},pseudos:{not:cw(function(cC){var cD=[],cE=[],cF=bI(cC.replace(co,"$1"));return cF[cu]?cw(function(cH,cM,cK,cI){var cL,cG=cF(cH,null,cI,[]),cJ=cH.length;while(cJ--){if((cL=cG[cJ])){cH[cJ]=!(cM[cJ]=cL)}}}):function(cI,cH,cG){cD[0]=cI;cF(cD,null,cG,cE);return !cE.pop()}}),has:cw(function(cC){return function(cD){return cl(cC,cD).length>0}}),contains:cw(function(cC){return function(cD){return(cD.textContent||cD.innerText||bv(cD)).indexOf(cC)>-1}}),enabled:function(cC){return cC.disabled===false},disabled:function(cC){return cC.disabled===true},checked:function(cC){var cD=cC.nodeName.toLowerCase();return(cD==="input"&&!!cC.checked)||(cD==="option"&&!!cC.selected)},selected:function(cC){if(cC.parentNode){cC.parentNode.selectedIndex}return cC.selected===true},parent:function(cC){return !cg.pseudos.empty(cC)},empty:function(cD){var cC;cD=cD.firstChild;while(cD){if(cD.nodeName>"@"||(cC=cD.nodeType)===3||cC===4){return false}cD=cD.nextSibling}return true},header:function(cC){return bX.test(cC.nodeName)},text:function(cE){var cD,cC;return cE.nodeName.toLowerCase()==="input"&&(cD=cE.type)==="text"&&((cC=cE.getAttribute("type"))==null||cC.toLowerCase()===cD)},radio:cd("radio"),checkbox:cd("checkbox"),file:cd("file"),password:cd("password"),image:cd("image"),submit:by("submit"),reset:by("reset"),button:function(cD){var cC=cD.nodeName.toLowerCase();return cC==="input"&&cD.type==="button"||cC==="button"},input:function(cC){return ci.test(cC.nodeName)},focus:function(cC){var cD=cC.ownerDocument;return cC===cD.activeElement&&(!cD.hasFocus||cD.hasFocus())&&!!(cC.type||cC.href||~cC.tabIndex)},active:function(cC){return cC===cC.ownerDocument.activeElement},first:ca(function(){return[0]}),last:ca(function(cC,cD){return[cD-1]}),eq:ca(function(cC,cE,cD){return[cD<0?cD+cE:cD]}),even:ca(function(cC,cE){for(var cD=0;cD=0;){cC.push(cD)}return cC}),gt:ca(function(cC,cF,cE){for(var cD=cE<0?cE+cF:cE;++cD1?function(cG,cF,cD){var cE=cC.length;while(cE--){if(!cC[cE](cG,cF,cD)){return false}}return true}:cC[0]}function b0(cC,cD,cE,cF,cI){var cG,cL=[],cH=0,cJ=cC.length,cK=cD!=null;for(;cH-1){cS[cU]=!(cP[cU]=cM)}}}}else{cO=b0(cO===cP?cO.splice(cJ,cO.length):cO);if(cH){cH(null,cP,cO,cR)}else{cr.apply(cP,cO)}}})}function b2(cI){var cD,cG,cE,cH=cI.length,cL=cg.relative[cI[0].type],cM=cL||cg.relative[" "],cF=cL?1:0,cJ=b1(function(cN){return cN===cD},cM,true),cK=b1(function(cN){return bT.call(cD,cN)>-1},cM,true),cC=[function(cP,cO,cN){return(!cL&&(cN||cO!==ce))||((cD=cO).nodeType?cJ(cP,cO,cN):cK(cP,cO,cN))}];for(;cF1&&bJ(cC),cF>1&&cI.slice(0,cF-1).join("").replace(co,"$1"),cG,cF0,cG=cF.length>0,cD=function(cQ,cK,cP,cO,cW){var cL,cM,cR,cV=[],cU=0,cN="0",cH=cQ&&[],cS=cW!=null,cT=ce,cJ=cQ||cG&&cg.find.TAG("*",cW&&cK.parentNode||cK),cI=(bW+=cT==null?1:Math.E);if(cS){ce=cK!==bD&&cK;cs=cD.el}for(;(cL=cJ[cN])!=null;cN++){if(cG&&cL){for(cM=0;(cR=cF[cM]);cM++){if(cR(cL,cK,cP)){cO.push(cL);break}}if(cS){bW=cI;cs=++cD.el}}if(cC){if((cL=!cR&&cL)){cU--}if(cQ){cH.push(cL)}}}cU+=cN;if(cC&&cN!==cU){for(cM=0;(cR=cE[cM]);cM++){cR(cH,cV,cK,cP)}if(cQ){if(cU>0){while(cN--){if(!(cH[cN]||cV[cN])){cV[cN]=b9.call(cO)}}}cV=b0(cV)}cr.apply(cO,cV);if(cS&&!cQ&&cV.length>0&&(cU+cE.length)>1){cl.uniqueSort(cO)}}if(cS){bW=cI;ce=cT}return cH};cD.el=0;return cC?cw(cD):cD}bI=cl.compile=function(cC,cH){var cE,cD=[],cG=[],cF=bS[cu][cC+" "];if(!cF){if(!cH){cH=bw(cC)}cE=cH.length;while(cE--){cF=b2(cH[cE]);if(cF[cu]){cD.push(cF)}else{cG.push(cF)}}cF=bS(cC,bB(cG,cD))}return cF};function bU(cD,cG,cF){var cE=0,cC=cG.length;for(;cE2&&(cD=cN[0]).type==="ID"&&cC.nodeType===9&&!cJ&&cg.relative[cN[1].type]){cC=cg.find.ID(cD.matches[0].replace(bY,""),cC,cJ)[0];if(!cC){return cG}cE=cE.slice(cN.shift().length)}for(cH=cb.POS.test(cE)?-1:cN.length-1;cH>=0;cH--){cD=cN[cH];if(cg.relative[(cM=cD.type)]){break}if((cL=cg.find[cM])){if((cK=cL(cD.matches[0].replace(bY,""),cm.test(cN[0].type)&&cC.parentNode||cC,cJ))){cN.splice(cH,1);cE=cK.length&&cN.join("");if(!cE){cr.apply(cG,bQ.call(cK,0));return cG}break}}}}}bI(cE,cI)(cK,cC,cJ,cG,cm.test(cE));return cG}if(bD.querySelectorAll){(function(){var cH,cI=ct,cG=/'|\\/g,cE=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cD=[":focus"],cC=[":active"],cF=bG.matchesSelector||bG.mozMatchesSelector||bG.webkitMatchesSelector||bG.oMatchesSelector||bG.msMatchesSelector;cf(function(cJ){cJ.innerHTML="";if(!cJ.querySelectorAll("[selected]").length){cD.push("\\["+b3+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!cJ.querySelectorAll(":checked").length){cD.push(":checked")}});cf(function(cJ){cJ.innerHTML="

    ";if(cJ.querySelectorAll("[test^='']").length){cD.push("[*^$]="+b3+"*(?:\"\"|'')")}cJ.innerHTML="";if(!cJ.querySelectorAll(":enabled").length){cD.push(":enabled",":disabled")}});cD=new RegExp(cD.join("|"));ct=function(cP,cK,cR,cU,cT){if(!cU&&!cT&&!cD.test(cP)){var cN,cS,cM=true,cJ=cu,cL=cK,cQ=cK.nodeType===9&&cP;if(cK.nodeType===1&&cK.nodeName.toLowerCase()!=="object"){cN=bw(cP);if((cM=cK.getAttribute("id"))){cJ=cM.replace(cG,"\\$&")}else{cK.setAttribute("id",cJ)}cJ="[id='"+cJ+"'] ";cS=cN.length;while(cS--){cN[cS]=cJ+cN[cS].join("")}cL=cm.test(cP)&&cK.parentNode||cK;cQ=cN.join(",")}if(cQ){try{cr.apply(cR,bQ.call(cL.querySelectorAll(cQ),0));return cR}catch(cO){}finally{if(!cM){cK.removeAttribute("id")}}}}return cI(cP,cK,cR,cU,cT)};if(cF){cf(function(cK){cH=cF.call(cK,"div");try{cF.call(cK,"[test!='']:sizzle");cC.push("!=",cB)}catch(cJ){}});cC=new RegExp(cC.join("|"));cl.matchesSelector=function(cK,cM){cM=cM.replace(cE,"='$1']");if(!bR(cK)&&!cC.test(cM)&&!cD.test(cM)){try{var cJ=cF.call(cK,cM);if(cJ||cH||cK.document&&cK.document.nodeType!==11){return cJ}}catch(cL){}}return cl(cM,null,null,[cK]).length>0}}})()}cg.pseudos.nth=cg.pseudos.eq;function bO(){}cg.filters=bO.prototype=cg.pseudos;cg.setFilters=new bO();cl.attr=C.attr;C.find=cl;C.expr=cl.selectors;C.expr[":"]=C.expr.pseudos;C.unique=cl.uniqueSort;C.text=cl.getText;C.isXMLDoc=cl.isXML;C.contains=cl.contains})(bd);var U=/Until$/,ag=/^(?:parents|prev(?:Until|All))/,bq=/^.[^:#\[\.,]*$/,aQ=C.expr.match.needsContext,ao={children:true,contents:true,next:true,prev:true};C.fn.extend({find:function(bu){var by,bv,bA,bB,bz,bx,bw=this;if(typeof bu!=="string"){return C(bu).filter(function(){for(by=0,bv=bw.length;by0){for(bB=bA;bB=0:C.filter(bu,this).length>0:this.filter(bu).length>0)},closest:function(by,bx){var bz,bw=0,bu=this.length,bv=[],bA=aQ.test(by)||typeof by!=="string"?C(by,bx||this.context):0;for(;bw-1:C.find.matchesSelector(bz,by)){bv.push(bz);break}bz=bz.parentNode}}bv=bv.length>1?C.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(bu){if(!bu){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof bu==="string"){return C.inArray(this[0],C(bu))}return C.inArray(bu.jqx?bu[0]:bu,this)},add:function(bu,bv){var bx=typeof bu==="string"?C(bu,bv):C.makeArray(bu&&bu.nodeType?[bu]:bu),bw=C.merge(this.get(),bx);return this.pushStack(x(bx[0])||x(bw[0])?bw:C.unique(bw))},addBack:function(bu){return this.add(bu==null?this.prevObject:this.prevObject.filter(bu))}});C.fn.andSelf=C.fn.addBack;function x(bu){return !bu||!bu.parentNode||bu.parentNode.nodeType===11}function aB(bv,bu){do{bv=bv[bu]}while(bv&&bv.nodeType!==1);return bv}C.each({parent:function(bv){var bu=bv.parentNode;return bu&&bu.nodeType!==11?bu:null},parents:function(bu){return C.dir(bu,"parentNode")},parentsUntil:function(bv,bu,bw){return C.dir(bv,"parentNode",bw)},next:function(bu){return aB(bu,"nextSibling")},prev:function(bu){return aB(bu,"previousSibling")},nextAll:function(bu){return C.dir(bu,"nextSibling")},prevAll:function(bu){return C.dir(bu,"previousSibling")},nextUntil:function(bv,bu,bw){return C.dir(bv,"nextSibling",bw)},prevUntil:function(bv,bu,bw){return C.dir(bv,"previousSibling",bw)},siblings:function(bu){return C.sibling((bu.parentNode||{}).firstChild,bu)},children:function(bu){return C.sibling(bu.firstChild)},contents:function(bu){return C.nodeName(bu,"iframe")?bu.contentDocument||bu.contentWindow.document:C.merge([],bu.childNodes)}},function(bu,bv){C.fn[bu]=function(by,bw){var bx=C.map(this,bv,by);if(!U.test(bu)){bw=by}if(bw&&typeof bw==="string"){bx=C.filter(bw,bx)}bx=this.length>1&&!ao[bu]?C.unique(bx):bx;if(this.length>1&&ag.test(bu)){bx=bx.reverse()}return this.pushStack(bx,bu,aD.call(arguments).join(","))}});C.extend({filter:function(bw,bu,bv){if(bv){bw=":not("+bw+")"}return bu.length===1?C.find.matchesSelector(bu[0],bw)?[bu[0]]:[]:C.find.matches(bw,bu)},dir:function(bw,bv,by){var bu=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===G||bx.nodeType!==1||!C(bx).is(by))){if(bx.nodeType===1){bu.push(bx)}bx=bx[bv]}return bu},sibling:function(bw,bv){var bu=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){bu.push(bw)}}return bu}});function az(bx,bw,bu){bw=bw||0;if(C.isFunction(bw)){return C.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===bu})}else{if(bw.nodeType){return C.grep(bx,function(bz,by){return(bz===bw)===bu})}else{if(typeof bw==="string"){var bv=C.grep(bx,function(by){return by.nodeType===1});if(bq.test(bw)){return C.filter(bw,bv,!bu)}else{bw=C.filter(bw,bv)}}}}return C.grep(bx,function(bz,by){return(C.inArray(bz,bw)>=0)===bu})}function a(bu){var bw=aJ.split("|"),bv=bu.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aJ="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aa=/ JQXLite\d+="(?:null|\d+)"/g,ah=/^\s+/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,c=/<([\w:]+)/,v=/]","i"),R=/^(?:checkbox|radio)$/,o=/checked\s*(?:[^=]|=\s*.checked.)/i,bp=/\/(java|ecma)script/i,aG=/^\s*\s*$/g,am={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},T=a(ak),bg=T.appendChild(ak.createElement("div"));am.optgroup=am.option;am.tbody=am.tfoot=am.colgroup=am.caption=am.thead;am.th=am.td;if(!C.support.htmlSerialize){am._default=[1,"X
    ","
    "]}C.fn.extend({text:function(bu){return C.access(this,function(bv){return bv===G?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ak).createTextNode(bv))},null,bu,arguments.length)},wrapAll:function(bu){if(C.isFunction(bu)){return this.each(function(bw){C(this).wrapAll(bu.call(this,bw))})}if(this[0]){var bv=C(bu,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(bu){if(C.isFunction(bu)){return this.each(function(bv){C(this).wrapInner(bu.call(this,bv))})}return this.each(function(){var bv=C(this),bw=bv.contents();if(bw.length){bw.wrapAll(bu)}else{bv.append(bu)}})},wrap:function(bu){var bv=C.isFunction(bu);return this.each(function(bw){C(this).wrapAll(bv?bu.call(this,bw):bu)})},unwrap:function(){return this.parent().each(function(){if(!C.nodeName(this,"body")){C(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.appendChild(bu)}})},prepend:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.insertBefore(bu,this.firstChild)}})},before:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(bu,this),"before",this.selector)}},after:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(this,bu),"after",this.selector)}},remove:function(bu,bx){var bw,bv=0;for(;(bw=this[bv])!=null;bv++){if(!bu||C.filter(bu,[bw]).length){if(!bx&&bw.nodeType===1){C.cleanData(bw.getElementsByTagName("*"));C.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){var bv,bu=0;for(;(bv=this[bu])!=null;bu++){if(bv.nodeType===1){C.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,bu){bv=bv==null?false:bv;bu=bu==null?bv:bu;return this.map(function(){return C.clone(this,bv,bu)})},html:function(bu){return C.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===G){return bx.nodeType===1?bx.innerHTML.replace(aa,""):G}if(typeof by==="string"&&!W.test(by)&&(C.support.htmlSerialize||!ac.test(by))&&(C.support.leadingWhitespace||!ah.test(by))&&!am[(c.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(L,"<$1>");try{for(;bw1&&typeof bB==="string"&&o.test(bB)){return this.each(function(){C(this).domManip(bA,bE,bD)})}if(C.isFunction(bB)){return this.each(function(bG){var bF=C(this);bA[0]=bB.call(this,bG,bE?bF.html():G);bF.domManip(bA,bE,bD)})}if(this[0]){bw=C.buildFragment(bA,this,bv);bz=bw.fragment;by=bz.firstChild;if(bz.childNodes.length===1){bz=by}if(by){bE=bE&&C.nodeName(by,"tr");for(bC=bw.cacheable||bu-1;bx0?this.clone(true):this).get();C(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,bu,bC.selector)}}});function bk(bu){if(typeof bu.getElementsByTagName!=="undefined"){return bu.getElementsByTagName("*")}else{if(typeof bu.querySelectorAll!=="undefined"){return bu.querySelectorAll("*")}else{return[]}}}function al(bu){if(R.test(bu.type)){bu.defaultChecked=bu.checked}}C.extend({clone:function(by,bA,bw){var bu,bv,bx,bz;if(C.support.html5Clone||C.isXMLDoc(by)||!ac.test("<"+by.nodeName+">")){bz=by.cloneNode(true)}else{bg.innerHTML=by.outerHTML;bg.removeChild(bz=bg.firstChild)}if((!C.support.noCloneEvent||!C.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!C.isXMLDoc(by)){ab(by,bz);bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){if(bv[bx]){ab(bu[bx],bv[bx])}}}if(bA){r(by,bz);if(bw){bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){r(bu[bx],bv[bx])}}}bu=bv=null;return bz},clean:function(bH,bw,bu,bx){var bE,bD,bG,bL,bA,bK,bB,by,bv,bF,bJ,bC,bz=bw===ak&&T,bI=[];if(!bw||typeof bw.createDocumentFragment==="undefined"){bw=ak}for(bE=0;(bG=bH[bE])!=null;bE++){if(typeof bG==="number"){bG+=""}if(!bG){continue}if(typeof bG==="string"){if(!P.test(bG)){bG=bw.createTextNode(bG)}else{bz=bz||a(bw);bB=bw.createElement("div");bz.appendChild(bB);bG=bG.replace(L,"<$1>");bL=(c.exec(bG)||["",""])[1].toLowerCase();bA=am[bL]||am._default;bK=bA[0];bB.innerHTML=bA[1]+bG+bA[2];while(bK--){bB=bB.lastChild}if(!C.support.tbody){by=v.test(bG);bv=bL==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bA[1]===""&&!by?bB.childNodes:[];for(bD=bv.length-1;bD>=0;--bD){if(C.nodeName(bv[bD],"tbody")&&!bv[bD].childNodes.length){bv[bD].parentNode.removeChild(bv[bD])}}}if(!C.support.leadingWhitespace&&ah.test(bG)){bB.insertBefore(bw.createTextNode(ah.exec(bG)[0]),bB.firstChild)}bG=bB.childNodes;bB.parentNode.removeChild(bB)}}if(bG.nodeType){bI.push(bG)}else{C.merge(bI,bG)}}if(bB){bG=bB=bz=null}if(!C.support.appendChecked){for(bE=0;(bG=bI[bE])!=null;bE++){if(C.nodeName(bG,"input")){al(bG)}else{if(typeof bG.getElementsByTagName!=="undefined"){C.grep(bG.getElementsByTagName("input"),al)}}}}if(bu){bJ=function(bM){if(!bM.type||bp.test(bM.type)){return bx?bx.push(bM.parentNode?bM.parentNode.removeChild(bM):bM):bu.appendChild(bM)}};for(bE=0;(bG=bI[bE])!=null;bE++){if(!(C.nodeName(bG,"script")&&bJ(bG))){bu.appendChild(bG);if(typeof bG.getElementsByTagName!=="undefined"){bC=C.grep(C.merge([],bG.getElementsByTagName("script")),bJ);bI.splice.apply(bI,[bE+1,0].concat(bC));bE+=bC.length}}}}return bI},cleanData:function(bv,bD){var by,bw,bx,bC,bz=0,bE=C.expando,bu=C.cache,bA=C.support.deleteExpando,bB=C.event.special;for(;(bx=bv[bz])!=null;bz++){if(bD||C.acceptData(bx)){bw=bx[bE];by=bw&&bu[bw];if(by){if(by.events){for(bC in by.events){if(bB[bC]){C.event.remove(bx,bC)}else{C.removeEvent(bx,bC,by.handle)}}}if(bu[bw]){delete bu[bw];if(bA){delete bx[bE]}else{if(bx.removeAttribute){bx.removeAttribute(bE)}else{bx[bE]=null}}C.deletedIds.push(bw)}}}}}});(function(){var bu,bv;C.uaMatch=function(bx){bx=bx.toLowerCase();var bw=/(chrome)[ \/]([\w.]+)/.exec(bx)||/(webkit)[ \/]([\w.]+)/.exec(bx)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(bx)||/(msie) ([\w.]+)/.exec(bx)||bx.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(bx)||[];return{browser:bw[1]||"",version:bw[2]||"0"}};bu=C.uaMatch(bt.userAgent);bv={};if(bu.browser){bv[bu.browser]=true;bv.version=bu.version}if(bv.chrome){bv.webkit=true}else{if(bv.webkit){bv.safari=true}}C.browser=bv;C.sub=function(){function bx(bz,bA){return new bx.fn.init(bz,bA)}C.extend(true,bx,this);bx.superclass=this;bx.fn=bx.prototype=this();bx.fn.constructor=bx;bx.sub=this.sub;bx.fn.init=function by(bz,bA){if(bA&&bA instanceof C&&!(bA instanceof bx)){bA=bx(bA)}return C.fn.init.call(this,bz,bA,bw)};bx.fn.init.prototype=bx.fn;var bw=bx(ak);return bx}})();var Q,bc,l,ad=/alpha\([^)]*\)/i,aj=/opacity=([^)]*)/,w=/^(top|right|bottom|left)$/,ai=/^(none|table(?!-c[ea]).+)/,av=/^margin/,i=new RegExp("^("+aE+")(.*)$","i"),aV=new RegExp("^("+aE+")(?!px)[a-z%]+$","i"),E=new RegExp("^([-+])=("+aE+")","i"),J={BODY:"block"},ba={position:"absolute",visibility:"hidden",display:"block"},aL={letterSpacing:0,fontWeight:400},D=["Top","Right","Bottom","Left"],O=["Webkit","O","Moz","ms"],be=C.fn.toggle;function a2(bx,bv){if(bv in bx){return bv}var by=bv.charAt(0).toUpperCase()+bv.slice(1),bu=bv,bw=O.length;while(bw--){bv=O[bw]+by;if(bv in bx){return bv}}return bu}function ap(bv,bu){bv=bu||bv;return C.css(bv,"display")==="none"||!C.contains(bv.ownerDocument,bv)}function bb(bz,bu){var by,bA,bv=[],bw=0,bx=bz.length;for(;bw1)},show:function(){return bb(this,true)},hide:function(){return bb(this)},toggle:function(bw,bv){var bu=typeof bw==="boolean";if(C.isFunction(bw)&&C.isFunction(bv)){return be.apply(this,arguments)}return this.each(function(){if(bu?bw:ap(this)){C(this).show()}else{C(this).hide()}})}});C.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var bu=Q(bw,"opacity");return bu===""?"1":bu}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":C.support.cssFloat?"cssFloat":"styleFloat"},style:function(bw,bv,bC,bx){if(!bw||bw.nodeType===3||bw.nodeType===8||!bw.style){return}var bA,bB,bD,by=C.camelCase(bv),bu=bw.style;bv=C.cssProps[by]||(C.cssProps[by]=a2(bu,by));bD=C.cssHooks[bv]||C.cssHooks[by];if(bC!==G){bB=typeof bC;if(bB==="string"&&(bA=E.exec(bC))){bC=(bA[1]+1)*bA[2]+parseFloat(C.css(bw,bv));bB="number"}if(bC==null||bB==="number"&&isNaN(bC)){return}if(bB==="number"&&!C.cssNumber[by]){bC+="px"}if(!bD||!("set" in bD)||(bC=bD.set(bw,bC,bx))!==G){try{bu[bv]=bC}catch(bz){}}}else{if(bD&&"get" in bD&&(bA=bD.get(bw,false,bx))!==G){return bA}return bu[bv]}},css:function(bA,by,bz,bv){var bB,bx,bu,bw=C.camelCase(by);by=C.cssProps[bw]||(C.cssProps[bw]=a2(bA.style,bw));bu=C.cssHooks[by]||C.cssHooks[bw];if(bu&&"get" in bu){bB=bu.get(bA,true,bv)}if(bB===G){bB=Q(bA,by)}if(bB==="normal"&&by in aL){bB=aL[by]}if(bz||bv!==G){bx=parseFloat(bB);return bz||C.isNumeric(bx)?bx||0:bB}return bB},swap:function(by,bx,bz){var bw,bv,bu={};for(bv in bx){bu[bv]=by.style[bv];by.style[bv]=bx[bv]}bw=bz.call(by);for(bv in bx){by.style[bv]=bu[bv]}return bw}});if(bd.getComputedStyle){Q=function(bB,bv){var bu,by,bx,bA,bz=bd.getComputedStyle(bB,null),bw=bB.style;if(bz){bu=bz.getPropertyValue(bv)||bz[bv];if(bu===""&&!C.contains(bB.ownerDocument,bB)){bu=C.style(bB,bv)}if(aV.test(bu)&&av.test(bv)){by=bw.width;bx=bw.minWidth;bA=bw.maxWidth;bw.minWidth=bw.maxWidth=bw.width=bu;bu=bz.width;bw.width=by;bw.minWidth=bx;bw.maxWidth=bA}}return bu}}else{if(ak.documentElement.currentStyle){Q=function(by,bw){var bz,bu,bv=by.currentStyle&&by.currentStyle[bw],bx=by.style;if(bv==null&&bx&&bx[bw]){bv=bx[bw]}if(aV.test(bv)&&!w.test(bw)){bz=bx.left;bu=by.runtimeStyle&&by.runtimeStyle.left;if(bu){by.runtimeStyle.left=by.currentStyle.left}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bz;if(bu){by.runtimeStyle.left=bu}}return bv===""?"auto":bv}}}function aO(bu,bw,bx){var bv=i.exec(bw);return bv?Math.max(0,bv[1]-(bx||0))+(bv[2]||"px"):bw}function aZ(bx,bv,bu,bz){var bw=bu===(bz?"border":"content")?4:bv==="width"?1:0,by=0;for(;bw<4;bw+=2){if(bu==="margin"){by+=C.css(bx,bu+D[bw],true)}if(bz){if(bu==="content"){by-=parseFloat(Q(bx,"padding"+D[bw]))||0}if(bu!=="margin"){by-=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}else{by+=parseFloat(Q(bx,"padding"+D[bw]))||0;if(bu!=="padding"){by+=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}}return by}function Y(bx,bv,bu){var by=bv==="width"?bx.offsetWidth:bx.offsetHeight,bw=true,bz=C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box";if(by<=0||by==null){by=Q(bx,bv);if(by<0||by==null){by=bx.style[bv]}if(aV.test(by)){return by}bw=bz&&(C.support.boxSizingReliable||by===bx.style[bv]);by=parseFloat(by)||0}return(by+aZ(bx,bv,bu||(bz?"border":"content"),bw))+"px"}function aN(bw){if(J[bw]){return J[bw]}var bu=C("<"+bw+">").appendTo(ak.body),bv=bu.css("display");bu.remove();if(bv==="none"||bv===""){bc=ak.body.appendChild(bc||C.extend(ak.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!l||!bc.createElement){l=(bc.contentWindow||bc.contentDocument).document;l.write("");l.close()}bu=l.body.appendChild(l.createElement(bw));bv=Q(bu,"display");ak.body.removeChild(bc)}J[bw]=bv;return bv}C.each(["height","width"],function(bv,bu){C.cssHooks[bu]={get:function(by,bx,bw){if(bx){if(by.offsetWidth===0&&ai.test(Q(by,"display"))){return C.swap(by,ba,function(){return Y(by,bu,bw)})}else{return Y(by,bu,bw)}}},set:function(bx,by,bw){return aO(bx,by,bw?aZ(bx,bu,bw,C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box"):0)}}});if(!C.support.opacity){C.cssHooks.opacity={get:function(bv,bu){return aj.test((bu&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":bu?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,bu=C.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&C.trim(bw.replace(ad,""))===""&&bx.removeAttribute){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ad.test(bw)?bw.replace(ad,bu):bw+" "+bu}}}C(function(){if(!C.support.reliableMarginRight){C.cssHooks.marginRight={get:function(bv,bu){return C.swap(bv,{display:"inline-block"},function(){if(bu){return Q(bv,"marginRight")}})}}}if(!C.support.pixelPosition&&C.fn.position){C.each(["top","left"],function(bu,bv){C.cssHooks[bv]={get:function(by,bx){if(bx){var bw=Q(by,bv);return aV.test(bw)?C(by).position()[bv]+"px":bw}}}})}});if(C.expr&&C.expr.filters){C.expr.filters.hidden=function(bu){return(bu.offsetWidth===0&&bu.offsetHeight===0)||(!C.support.reliableHiddenOffsets&&((bu.style&&bu.style.display)||Q(bu,"display"))==="none")};C.expr.filters.visible=function(bu){return !C.expr.filters.hidden(bu)}}C.each({margin:"",padding:"",border:"Width"},function(bu,bv){C.cssHooks[bu+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[bu+D[bx]+bv]=bz[bx]||bz[bx-2]||bz[0]}return bw}};if(!av.test(bu)){C.cssHooks[bu+bv].set=aO}});var g=/%20/g,af=/\[\]$/,br=/\r?\n/g,aU=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,p=/^(?:select|textarea)/i;C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?C.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aU.test(this.type))}).map(function(bu,bv){var bw=C(this).val();return bw==null?null:C.isArray(bw)?C.map(bw,function(by,bx){return{name:bv.name,value:by.replace(br,"\r\n")}}):{name:bv.name,value:bw.replace(br,"\r\n")}}).get()}});C.param=function(bu,bw){var bx,bv=[],by=function(bz,bA){bA=C.isFunction(bA)?bA():(bA==null?"":bA);bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===G){bw=C.ajaxSettings&&C.ajaxSettings.traditional}if(C.isArray(bu)||(bu.jqx&&!C.isPlainObject(bu))){C.each(bu,function(){by(this.name,this.value)})}else{for(bx in bu){s(bx,bu[bx],bw,by)}}return bv.join("&").replace(g,"+")};function s(bw,by,bv,bx){var bu;if(C.isArray(by)){C.each(by,function(bA,bz){if(bv||af.test(bw)){bx(bw,bz)}else{s(bw+"["+(typeof bz==="object"?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&C.type(by)==="object"){for(bu in by){s(bw+"["+bu+"]",by[bu],bv,bx)}}else{bx(bw,by)}}}if(C.support.ajax){C.ajaxTransport(function(bu){if(!bu.crossDomain||C.support.cors){var bv;return{send:function(bB,bw){var bz,by,bA=bu.xhr();if(bu.username){bA.open(bu.type,bu.url,bu.async,bu.username,bu.password)}else{bA.open(bu.type,bu.url,bu.async)}if(bu.xhrFields){for(by in bu.xhrFields){bA[by]=bu.xhrFields[by]}}if(bu.mimeType&&bA.overrideMimeType){bA.overrideMimeType(bu.mimeType)}if(!bu.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((bu.hasContent&&bu.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=G;if(bz){bA.onreadystatechange=C.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}try{bI.text=bA.responseText}catch(bJ){}try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&bu.isLocal&&!bu.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!bu.async){bv()}else{if(bA.readyState===4){setTimeout(bv,0)}else{bz=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};C(bd).unload(xhrOnUnloadAbort)}xhrCallbacks[bz]=bv}bA.onreadystatechange=bv}}},abort:function(){if(bv){bv(0,1)}}}}})}var a6,a1,ar=/^(?:toggle|show|hide)$/,aM=new RegExp("^(?:([-+])=|)("+aE+")([a-z%]*)$","i"),a7=/queueHooks$/,k=[bm],H={"*":[function(bu,bB){var bx,bC,bD=this.createTween(bu,bB),by=aM.exec(bB),bz=bD.cur(),bv=+bz||0,bw=1,bA=20;if(by){bx=+by[2];bC=by[3]||(C.cssNumber[bu]?"":"px");if(bC!=="px"&&bv){bv=C.css(bD.elem,bu,true)||bx||1;do{bw=bw||".5";bv=bv/bw;C.style(bD.elem,bu,bv+bC)}while(bw!==(bw=bD.cur()/bz)&&bw!==1&&--bA)}bD.unit=bC;bD.start=bv;bD.end=by[1]?bv+(by[1]+1)*bx:bx}return bD}]};function bl(){setTimeout(function(){a6=G},0);return(a6=C.now())}function Z(bv,bu){C.each(bu,function(bA,by){var bz=(H[bA]||[]).concat(H["*"]),bw=0,bx=bz.length;for(;bw-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(bu)||0;by=parseFloat(bE)||0}if(C.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};C.fn.extend({isRendered:function(){var bv=this;var bu=this[0];if(bu.parentNode==null||(bu.offsetWidth===0||bu.offsetHeight===0)){return false}return true},getSizeFromStyle:function(){var by=this;var bx=null;var bu=null;var bw=this[0];var bv;if(bw.style.width){bx=bw.style.width}if(bw.style.height){bu=bw.style.height}if(bd.getComputedStyle){bv=getComputedStyle(bw,null)}else{bv=bw.currentStyle}if(bv){if(bv.width){bx=bv.width}if(bv.height){bu=bv.height}}if(bx==="0px"){bx=0}if(bu==="0px"){bu=0}if(bx===null){bx=0}if(bu===null){bu=0}return{width:bx,height:bu}},initAnimate:function(){},sizeStyleChanged:function(bx){var bw=this;var by;var bu=function(bz){var bA=by;if(bz&&bz[0]&&bz[0].attributeName==="style"&&bz[0].type==="attributes"){if(bA.element.offsetWidth!==bA.offsetWidth||bA.element.offsetHeight!==bA.offsetHeight){bA.offsetWidth=bA.element.offsetWidth;bA.offsetHeight=bA.element.offsetHeight;if(bw.isRendered()){bA.callback()}}}};by={element:bw[0],offsetWidth:bw[0].offsetWidth,offsetHeight:bw[0].offsetHeight,callback:bx};try{if(!bw.elementStyleObserver){bw.elementStyleObserver=new MutationObserver(bu);bw.elementStyleObserver.observe(bw[0],{attributes:true,childList:false,characterData:false})}}catch(bv){}},position:function(){if(!this[0]){return}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),bu=V.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(C.css(bw,"marginTop"))||0;bx.left-=parseFloat(C.css(bw,"marginLeft"))||0;bu.top+=parseFloat(C.css(bv[0],"borderTopWidth"))||0;bu.left+=parseFloat(C.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-bu.top,left:bx.left-bu.left}},offsetParent:function(){return this.map(function(){var bu=this.offsetParent||ak.body;while(bu&&(!V.test(bu.nodeName)&&C.css(bu,"position")==="static")){bu=bu.offsetParent}return bu||ak.body})}});C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(bw,bv){var bu=/Y/.test(bv);C.fn[bw]=function(bx){return C.access(this,function(by,bB,bA){var bz=aC(by);if(bA===G){return bz?(bv in bz)?bz[bv]:bz.document.documentElement[bB]:by[bB]}if(bz){bz.scrollTo(!bu?bA:C(bz).scrollLeft(),bu?bA:C(bz).scrollTop())}else{by[bB]=bA}},bw,bx,arguments.length,null)}});function aC(bu){return C.isWindow(bu)?bu:bu.nodeType===9?bu.defaultView||bu.parentWindow:false}C.each({Height:"height",Width:"width"},function(bu,bv){C.each({padding:"inner"+bu,content:bv,"":"outer"+bu},function(bw,bx){C.fn[bx]=function(bB,bA){var bz=arguments.length&&(bw||typeof bB!=="boolean"),by=bw||(bB===true||bA===true?"margin":"border");return C.access(this,function(bD,bC,bE){var bF;if(C.isWindow(bD)){return bD.document.documentElement["client"+bu]}if(bD.nodeType===9){bF=bD.documentElement;return Math.max(bD.body["scroll"+bu],bF["scroll"+bu],bD.body["offset"+bu],bF["offset"+bu],bF["client"+bu])}return bE===G?C.css(bD,bC,bE,by):C.style(bD,bC,bE,by)},bv,bz?bB:G,bz,null)}})});bd.JQXLite=bd.jqxHelper=C;if(typeof define==="function"&&define.amd&&define.amd.JQXLite){define("jqx",[],function(){return C})}})(window)}(function(a){if(a.jQuery){a.minQuery=a.JQXLite=a.jQuery;return}if(!a.$){a.$=a.minQuery=a.JQXLite}else{a.minQuery=a.JQXLite=a.$}})(window);JQXLite.generateID=function(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};var b="";do{b="jqx"+a()+a()+a()}while($("#"+b).length>0);return b};var jqxBaseFramework=window.jqxBaseFramework=window.minQuery||window.jQuery;(function(b){b.jqx=b.jqx||{};window.jqx=b.jqx;var a={createInstance:function(c,e,g){if(e=="jqxDataAdapter"){var f=g[0];var d=g[1]||{};return new b.jqx.dataAdapter(f,d)}b(c)[e](g||{});return b(c)[e]("getInstance")}};window.jqwidgets=a;b.jqx.define=function(c,d,e){c[d]=function(){if(this.baseType){this.base=new c[this.baseType]();this.base.defineInstance()}this.defineInstance();this.metaInfo()};c[d].prototype.defineInstance=function(){};c[d].prototype.metaInfo=function(){};c[d].prototype.base=null;c[d].prototype.baseType=undefined;if(e&&c[e]){c[d].prototype.baseType=e}};b.jqx.invoke=function(f,e){if(e.length==0){return}var g=typeof(e)==Array||e.length>0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):b({}).toArray();while(f[g]==undefined&&f.base!=null){if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}f=f.base}if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}return};b.jqx.getByPriority=function(c){var e=undefined;for(var d=0;d0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):{};while(f[g]==undefined&&f.base!=null){if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}f=f.base}if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}return false};b.jqx.isPropertySetter=function(d,c){if(c.length==1&&typeof(c[0])=="object"){return true}if(c.length==2&&typeof(c[0])=="string"&&!b.jqx.hasFunction(d,c)){return true}return false};b.jqx.validatePropertySetter=function(g,e,c){if(!b.jqx.propertySetterValidation){return true}if(e.length==1&&typeof(e[0])=="object"){for(var f in e[0]){var h=g;while(!h.hasOwnProperty(f)&&h.base){h=h.base}if(!h||!h.hasOwnProperty(f)){if(!c){var d=h.hasOwnProperty(f.toString().toLowerCase());if(!d){throw"Invalid property: "+f}else{return true}}return false}}return true}if(e.length!=2){if(!c){throw"Invalid property: "+e.length>=0?e[0]:""}return false}while(!g.hasOwnProperty(e[0])&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e[0])){if(!c){throw"Invalid property: "+e[0]}return false}return true};if(!Object.keys){Object.keys=(function(){var e=Object.prototype.hasOwnProperty,f=!({toString:null}).propertyIsEnumerable("toString"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=d.length;return function(j){if(typeof j!=="object"&&(typeof j!=="function"||j===null)){throw new TypeError("Object.keys called on non-object")}var g=[],k,h;for(k in j){if(e.call(j,k)){g.push(k)}}if(f){for(h=0;h1){var g=!f.base?f.element:f.base.element;var c=b.data(g,f.widgetName).initArgs;if(c&&JSON&&JSON.stringify&&i[0]&&c[0]){try{if(JSON.stringify(i[0])==JSON.stringify(c[0])){var h=true;b.each(i[0],function(l,m){if(f[l]!=m){h=false;return false}});if(h){return}}}catch(e){}}f.batchUpdate=i[0];var j={};var k={};b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){if(f[l]!=m){j[l]=f[l];k[l]=m;d++}}else{if(n.hasOwnProperty(l.toLowerCase())){if(f[l.toLowerCase()]!=m){j[l.toLowerCase()]=f[l.toLowerCase()];k[l.toLowerCase()]=m;d++}}}});if(d<2){f.batchUpdate=null}}b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){b.jqx.setvalueraiseevent(n,l,m)}else{if(n.hasOwnProperty(l.toLowerCase())){b.jqx.setvalueraiseevent(n,l.toLowerCase(),m)}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+l+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,j,k)}}}else{if(i.length==2){while(!f.hasOwnProperty(i[0])&&f.base){f=f.base}if(f.hasOwnProperty(i[0])){b.jqx.setvalueraiseevent(f,i[0],i[1])}else{if(f.hasOwnProperty(i[0].toLowerCase())){b.jqx.setvalueraiseevent(f,i[0].toLowerCase(),i[1])}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+i[0]+"'"}}}}}};b.jqx.setvalueraiseevent=function(d,e,f){var c=d[e];d[e]=f;if(!d.isInitialized){return}if(d.propertyChangedHandler!=undefined){d.propertyChangedHandler(d,e,c,f)}if(d.propertyChangeMap!=undefined&&d.propertyChangeMap[e]!=undefined){d.propertyChangeMap[e](d,e,c,f)}};b.jqx.get=function(f,e){if(e==undefined||e==null){return undefined}if(f.propertyMap){var d=f.propertyMap(e);if(d!=null){return d}}if(f.hasOwnProperty(e)){return f[e]}if(f.hasOwnProperty(e.toLowerCase())){return f[e.toLowerCase()]}var c=undefined;if(typeof(e)==Array){if(e.length!=1){return undefined}c=e[0]}else{if(typeof(e)=="string"){c=e}}while(!f.hasOwnProperty(c)&&f.base){f=f.base}if(f){return f[c]}return undefined};b.jqx.serialize=function(f){var c="";if(b.isArray(f)){c="[";for(var e=0;e0){c+=", "}c+=b.jqx.serialize(f[e])}c+="]"}else{if(typeof(f)=="object"){c="{";var d=0;for(var e in f){if(d++>0){c+=", "}c+=e+": "+b.jqx.serialize(f[e])}c+="}"}else{c=f.toString()}}return c};b.jqx.propertySetterValidation=true;b.jqx.jqxWidgetProxy=function(h,d,c){var e=b(d);var g=b.data(d,h);if(g==undefined){return undefined}var f=g.instance;if(b.jqx.hasFunction(f,c)){return b.jqx.invoke(f,c)}if(b.jqx.isPropertySetter(f,c)){if(b.jqx.validatePropertySetter(f,c)){b.jqx.set(f,c);return undefined}}else{if(typeof(c)=="object"&&c.length==0){return}else{if(typeof(c)=="object"&&c.length==1&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c[0])}else{if(typeof(c)=="string"&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c)}}}}throw"jqxCore: Invalid parameter '"+b.jqx.serialize(c)+"' does not exist."};b.jqx.applyWidget=function(d,f,l,m){var h=false;try{h=window.MSApp!=undefined}catch(g){}var n=b(d);if(!m){m=new b.jqx["_"+f]()}else{m.host=n;m.element=d}if(d.id==""){d.id=b.jqx.utilities.createId()}var k={host:n,element:d,instance:m,initArgs:l};m.widgetName=f;b.data(d,f,k);b.data(d,"jqxWidget",k.instance);var j=new Array();var m=k.instance;while(m){m.isInitialized=false;j.push(m);m=m.base}j.reverse();j[0].theme=b.jqx.theme||"";b.jqx.jqxWidgetProxy(f,d,l);for(var c in j){m=j[c];if(c==0){m.host=n;m.element=d;m.WinJS=h}if(m!=undefined){if(m.definedInstance){m.definedInstance()}if(m.createInstance!=null){if(h){MSApp.execUnsafeLocalFunction(function(){m.createInstance(l)})}else{m.createInstance(l)}}}}for(var c in j){if(j[c]!=undefined){j[c].isInitialized=true}}if(h){MSApp.execUnsafeLocalFunction(function(){k.instance.refresh(true)})}else{k.instance.refresh(true)}};b.jqx.jqxWidget=function(c,d,g){var j=false;try{var l=Array.prototype.slice.call(g,0)}catch(i){var l=""}try{j=window.MSApp!=undefined}catch(i){}var h=c;var m="";if(d){m="_"+d}b.jqx.define(b.jqx,"_"+h,m);var k=new Array();if(!window[h]){var f=function(n){if(n==null){return""}var e=b.type(n);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(n===null){return""}return n.toString()}var o="";b.each(n,function(q,r){var t=r;if(q>0){o+=", "}o+="[";var p=0;if(b.type(t)=="object"){for(var s in t){if(p>0){o+=", "}o+="{"+s+":"+t[s]+"}";p++}}else{if(p>0){o+=", "}o+="{"+q+":"+t+"}";p++}o+="]"});return o};a[h]=window[h]=function(e,s){var n=[];if(!s){s={}}n.push(s);var o=e;if(b.type(o)==="object"&&e[0]){o=e[0].id;if(o===""){o=e[0].id=b.jqx.utilities.createId()}}else{if(b.type(e)==="object"&&e&&e.nodeName){o=e.id;if(o===""){o=e.id=b.jqx.utilities.createId()}}}if(window.jqxWidgets&&window.jqxWidgets[o]){if(s){b.each(window.jqxWidgets[o],function(t){var u=b(this.element).data();if(u&&u.jqxWidget){b(this.element)[h](s)}})}if(window.jqxWidgets[o].length==1){var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o][0]}}var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o]}}var p=b(e);if(p.length===0){p=b("
    ");if(h==="jqxInput"||h==="jqxPasswordInput"||h==="jqxMaskedInput"){p=b("")}if(h==="jqxTextArea"){p=b("")}if(h==="jqxButton"||h==="jqxRepeatButton"||h==="jqxToggleButton"){p=b("
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(b.support.htmlSerialize||!k.test(s))&&(b.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1>");try{for(;m=0&&d.indexOf(".net4.0c")>=0){e.browser="msie";e.version="11";c[1]="msie"}if(d.indexOf("edge")>=0){e.browser="msie";e.version="12";c[1]="msie"}e[c[1]]=c[1];return e}});b.jqx.browser=b.jqx.utilities.getBrowser();b.jqx.isHidden=function(d){if(!d||!d[0]){return false}var c=d[0].offsetWidth,e=d[0].offsetHeight;if(c===0||e===0){return true}else{return false}};b.jqx.ariaEnabled=true;b.jqx.aria=function(d,f,e){if(!b.jqx.ariaEnabled){return}if(f==undefined){b.each(d.aria,function(h,i){var k=!d.base?d.host.attr(h):d.base.host.attr(h);if(k!=undefined&&!b.isFunction(k)){var j=k;switch(i.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}d[i.name]=j}else{var k=d[i.name];if(b.isFunction(k)){k=d[i.name]()}if(k==undefined){k=""}try{!d.base?d.host.attr(h,k.toString()):d.base.host.attr(h,k.toString())}catch(g){}}})}else{try{if(d.host){if(!d.base){if(d.host){if(d.element.setAttribute){d.element.setAttribute(f,e.toString())}else{d.host.attr(f,e.toString())}}else{d.attr(f,e.toString())}}else{if(d.base.host){d.base.host.attr(f,e.toString())}else{d.attr(f,e.toString())}}}else{if(d.setAttribute){d.setAttribute(f,e.toString())}}}catch(c){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d){var c=this.length;var e=Number(arguments[1])||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=c}for(;e=0||j.indexOf("WPDesktop")>=0||j.indexOf("IEMobile")>=0||j.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(j.indexOf("Touch")>=0){var c=("MSPointerDown" in window)||("pointerdown" in window);if(c){this.touchDevice=true;return true}if(j.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(l){this.touchDevice=false;return false}},getLeftPos:function(c){var d=c.offsetLeft;while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){d+=c.offsetLeft;if(document.all){d+=c.clientLeft}}}return d},getTopPos:function(d){var f=d.offsetTop;var c=b(d).coord();while((d=d.offsetParent)!=null){if(d.tagName!="HTML"){f+=(d.offsetTop-d.scrollTop);if(document.all){f+=d.clientTop}}}var e=navigator.userAgent.toLowerCase();var g=(e.indexOf("windows phone")!=-1||e.indexOf("WPDesktop")!=-1||e.indexOf("ZuneWP7")!=-1||e.indexOf("msie 9")!=-1||e.indexOf("msie 11")!=-1||e.indexOf("msie 10")!=-1)&&e.indexOf("touch")!=-1;if(g){return c.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return f}if(e.indexOf("version/7")!=-1){return c.top}if(e.indexOf("version/6")!=-1||e.indexOf("version/5")!=-1){f=f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return f+b(window).scrollTop()}return c.top}return f},isChromeMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("android")!=-1;return c},isOperaMiniMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1||d.indexOf("opera mobi")!=-1;return c},isOperaMiniBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1;return c},isNewSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/5")!=-1);return c},isSafari4MobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/4")!=-1);return c},isWindowsPhone:function(){var d=navigator.userAgent.toLowerCase();var c=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1&&d.indexOf("touch")!=-1);return c},isSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return true}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return true}var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1||d.indexOf("mobile safari")!=-1;return c},isIPadSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1;return c},isMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("android")!=-1;return c},getTouches:function(c){if(c.originalEvent){if(c.originalEvent.touches&&c.originalEvent.touches.length){return c.originalEvent.touches}else{if(c.originalEvent.changedTouches&&c.originalEvent.changedTouches.length){return c.originalEvent.changedTouches}}}if(!c.touches){c.touches=new Array();c.touches[0]=c.originalEvent!=undefined?c.originalEvent:c;if(c.originalEvent!=undefined&&c.pageX){c.touches[0]=c}if(c.type=="mousemove"){c.touches[0]=c}}return c.touches},getTouchEventName:function(c){if(this.isWindowsPhone()){var d=navigator.userAgent.toLowerCase();if(d.indexOf("windows phone 7")!=-1){if(c.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(c.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(c.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}if(c.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(c.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(c.toLowerCase().indexOf("end")!=-1){return"pointerup"}}else{return c}},dispatchMouseEvent:function(c,g,f){if(this.simulatetouches){return}var d=document.createEvent("MouseEvent");d.initMouseEvent(c,true,true,g.view,1,g.screenX,g.screenY,g.clientX,g.clientY,false,false,false,false,0,null);if(f!=null){f.dispatchEvent(d)}},getRootNode:function(c){while(c.nodeType!==1){c=c.parentNode}return c},setTouchScroll:function(c,d){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[d]=c},touchScroll:function(B,M,Z,H,x,n){if(B==null){return}var G=this;var f=0;var r=0;var g=0;var i=0;var t=0;var j=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[H]=false;var k=false;var p=b(B);var R=["select","input","textarea"];var X=0;var J=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[H]=true;var H=H;var w=this.getTouchEventName("touchstart")+".touchScroll";var D=this.getTouchEventName("touchend")+".touchScroll";var ab=this.getTouchEventName("touchmove")+".touchScroll";var l,W,z,ah,V,Y,aj,Q,aa,d,F,ad,af,O,e,v,u,S,c,E,ag,o;Q=M;var aj=0;var aa=0;var h=0;var T=0;var ai=0;var Y=x.jqxScrollBar("max");var o=325;function A(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientY}else{if(am.originalEvent&&am.originalEvent.clientY!==undefined){return am.originalEvent.clientY}else{var al=G.getTouches(am);return al[0].clientY}}}function ae(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientX}else{if(am.originalEvent&&am.originalEvent.clientX!==undefined){return am.originalEvent.clientX}else{var al=G.getTouches(am);return al[0].clientX}}}var I=function(){var ap,am,aq,ao;ap=Date.now();am=ap-v;v=ap;aq=aa-e;var an=h-ah;e=aa;ah=h;F=true;ao=1000*aq/(1+am);var al=1000*an/(1+am);af=0.8*ao+0.2*af;O=0.8*al+0.2*O};var C=false;var X=function(am){if(!G.enableScrolling[H]){return true}if(b.inArray(am.target.tagName.toLowerCase(),R)!==-1){return}aa=n.jqxScrollBar("value");h=x.jqxScrollBar("value");var an=G.getTouches(am);var ao=an[0];if(an.length==1){G.dispatchMouseEvent("mousedown",ao,G.getRootNode(ao.target))}Y=x.jqxScrollBar("max");Q=n.jqxScrollBar("max");function al(ap){C=false;F=true;d=A(ap);ag=ae(ap);af=S=O=0;e=aa;ah=h;v=Date.now();clearInterval(u);u=setInterval(I,100);T=aa;ai=h;if(aa>0&&aaQ)?Q:(amQ)?"max":(amY)?Y:(amY)?"max":(am0.5||am<-0.5){ac(c+am);requestAnimationFrame(U)}else{ac(c)}}}function N(){var al,am;if(S){al=Date.now()-v;am=-S*Math.exp(-al/o);if(am>0.5||am<-0.5){m(E+am);requestAnimationFrame(N)}else{m(E)}}}var y=function(al){if(!G.enableScrolling[H]){return true}if(!G.scrolling[H]){return true}if(C){al.preventDefault();al.stopPropagation()}var aq=G.getTouches(al);if(aq.length>1){return true}var am=aq[0].pageY;var ao=aq[0].pageX;if(G.simulatetouches){if(aq[0]._pageY!=undefined){am=aq[0]._pageY;ao=aq[0]._pageX}}var au=am-r;var av=ao-t;J=am;var at=ao;g=au-f;j=av-i;k=true;f=au;i=av;var an=x!=null?x[0].style.visibility!="hidden":true;var ar=n!=null?n[0].style.visibility!="hidden":true;function ap(ay){var aA,az,ax;if(F){aA=A(ay);ax=ae(ay);az=d-aA;V=ag-ax;var aw="value";if(az>2||az<-2){d=aA;aw=ac(aa+az,ay);I();if(aw=="min"&&T===0){return true}if(aw=="max"&&T===Q){return true}if(!ar){return true}ay.preventDefault();ay.stopPropagation();C=true;return false}else{if(V>2||V<-2){ag=ax;aw=m(h+V,ay);I();if(aw=="min"&&ai===0){return true}if(aw=="max"&&ai===Y){return true}if(!an){return true}C=true;ay.preventDefault();ay.stopPropagation();return false}}ay.preventDefault()}}if(an||ar){if((an)||(ar)){ap(al)}}};if(p.on){p.on(ab,y)}else{p.bind(ab,y)}var s=function(am){if(!G.enableScrolling[H]){return true}var an=G.getTouches(am)[0];if(!G.scrolling[H]){return true}F=false;clearInterval(u);if(af>10||af<-10){S=0.8*af;c=Math.round(aa+S);v=Date.now();requestAnimationFrame(U)}else{if(O>10||O<-10){S=0.8*O;E=Math.round(h+S);v=Date.now();requestAnimationFrame(N)}else{}}G.scrolling[H]=false;if(k){G.dispatchMouseEvent("mouseup",an,am.target)}else{var an=G.getTouches(am)[0],al=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,al);G.dispatchMouseEvent("click",an,al);return true}};if(this.simulatetouches){var q=b(window).on!=undefined||b(window).bind;var P=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};b(window).on!=undefined?b(document).on("mouseup.touchScroll",P):b(document).bind("mouseup.touchScroll",P);if(window.frameElement){if(window.top!=null){var L=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};if(window.top.document){b(window.top.document).on?b(window.top.document).on("mouseup",L):b(window.top.document).bind("mouseup",L)}}}var ak=b(document).on!=undefined||b(document).bind;var K=function(al){if(!G.scrolling[H]){return true}G.scrolling[H]=false;var an=G.getTouches(al)[0],am=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,am);G.dispatchMouseEvent("click",an,am)};b(document).on!=undefined?b(document).on("touchend",K):b(document).bind("touchend",K)}if(p.on){p.on("dragstart",function(al){al.preventDefault()});p.on("selectstart",function(al){al.preventDefault()})}p.on?p.on(D+" touchcancel.touchScroll",s):p.bind(D+" touchcancel.touchScroll",s)}});b.jqx.cookie=b.jqx.cookie||{};b.extend(b.jqx.cookie,{cookie:function(f,g,d){if(arguments.length>1&&String(g)!=="[object Object]"){d=b.extend({},d);if(g===null||g===undefined){d.expires=-1}if(typeof d.expires==="number"){var i=d.expires,e=d.expires=new Date();e.setDate(e.getDate()+i)}g=String(g);return(document.cookie=[encodeURIComponent(f),"=",d.raw?g:encodeURIComponent(g),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join(""))}d=g||{};var c,h=d.raw?function(j){return j}:decodeURIComponent;return(c=new RegExp("(?:^|; )"+encodeURIComponent(f)+"=([^;]*)").exec(document.cookie))?h(c[1]):null}});b.jqx.string=b.jqx.string||{};b.extend(b.jqx.string,{replace:function(g,e,f){if(e===f){return this}var c=g;var d=c.indexOf(e);while(d!=-1){c=c.replace(e,f);d=c.indexOf(e)}return c},contains:function(c,d){if(c==null||d==null){return false}return c.indexOf(d)!=-1},containsIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toString().toUpperCase().indexOf(d.toString().toUpperCase())!=-1},equals:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.slice(0,d.length)==d}return false},equalsIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.toUpperCase().slice(0,d.length)==d.toUpperCase()}return false},startsWith:function(c,d){if(c==null||d==null){return false}return c.slice(0,d.length)==d},startsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toUpperCase().slice(0,d.length)==d.toUpperCase()},normalize:function(c){if(c.charCodeAt(c.length-1)==65279){c=c.substring(0,c.length-1)}return c},endsWith:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.slice(-d.length)==d},endsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.toUpperCase().slice(-d.length)==d.toUpperCase()}});b.extend(b.easing,{easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e}return i/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){if(b.event&&b.event.special){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}})}if(b.fn.extend){b.fn.extend({ischildof:function(g){if(!b(this).parents){var c=g.element.contains(this.element);return c}var e=b(this).parents().get();for(var d=0;d=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}if(this[0]&&this[0].tagName.toLowerCase().indexOf("angular")>=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal&&b.fn.modal.Constructor){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(n){var e,j,i={top:0,left:0},f=this[0],l=f&&f.ownerDocument;if(!l){return}e=l.documentElement;if(!b.contains(e,f)){return i}if(typeof f.getBoundingClientRect!==undefined){i=f.getBoundingClientRect()}var d=function(o){return b.isWindow(o)?o:o.nodeType===9?o.defaultView||o.parentWindow:false};j=d(l);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var m=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(m){h=2}if(true==n){if(document.body.style.position!="static"&&document.body.style.position!=""){var k=b(document.body).coord();h=-k.left;c=-k.top}}return{top:c+i.top+(j.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+i.left+(j.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};b.jqx.ripplers=[];b.jqx.ripple=function(f,e,o){if(!e){e=f}var h=b(f);var j=false;h.append("");var p=h.find(".ink");var c=false;for(var g=0;g")}var r=d.find(".ink");r.removeClass("animate");if(!r.height()&&!r.width()){var s=Math.max(d.outerWidth(),d.outerHeight());r.css({height:s,width:s})}if(o==="checkbox"||o==="radiobutton"){if(o==="checkbox"){if(e.jqxCheckBox("disabled")){return}}if(o==="radiobutton"){if(e.jqxRadioButton("disabled")){return}}var q=d.width()/2-r.width()/2;var t=d.height()/2-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate");r.on("animationend",function(){if(b.jqx.ripple.mouseCaptured){r.removeClass("animate");r.addClass("active");f.addClass("active")}});return}var q=i.pageX-d.offset().left-r.width()/2;var t=i.pageY-d.offset().top-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate")})})}})(jqxBaseFramework); +(function(cn,bM){var cs,bF,cg,bv,bR,b5,bI,bL,bH,ce,bE=true,bZ="undefined",cu=("sizcache"+Math.random()).replace(".",""),bz=String,bD=cn.document,bG=bD.documentElement,bW=0,bK=0,b9=[].pop,cr=[].push,bQ=[].slice,bT=[].indexOf||function(cE){var cD=0,cC=this.length;for(;cDcg.cacheLength){delete cC[cD.shift()]}return(cC[cE+" "]=cF)},cC)},cp=cA(),cq=cA(),bS=cA(),b3="[\\x20\\t\\r\\n\\f]",bP="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",bN=bP.replace("w","w#"),cz="([*^$|!~]?=)",ck="\\["+b3+"*("+bP+")"+b3+"*(?:"+cz+b3+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+bN+")|)|)"+b3+"*\\]",cB=":("+bP+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+ck+")|[^:]|\\\\.)*|.*))\\)|)",b4=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+b3+"*((?:-\\d)?\\d*)"+b3+"*\\)|)(?=[^-]|$)",co=new RegExp("^"+b3+"+|((?:^|[^\\\\])(?:\\\\.)*)"+b3+"+$","g"),bA=new RegExp("^"+b3+"*,"+b3+"*"),cc=new RegExp("^"+b3+"*([\\x20\\t\\r\\n\\f>+~])"+b3+"*"),ch=new RegExp(cB),cj=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,b8=/^:not/,cm=/[\x20\t\r\n\f]*[+~]/,cv=/:not\($/,bX=/h\d/i,ci=/input|select|textarea|button/i,bY=/\\(?!\\)/g,cb={ID:new RegExp("^#("+bP+")"),CLASS:new RegExp("^\\.("+bP+")"),NAME:new RegExp("^\\[name=['\"]?("+bP+")['\"]?\\]"),TAG:new RegExp("^("+bP.replace("w","w*")+")"),ATTR:new RegExp("^"+ck),PSEUDO:new RegExp("^"+cB),POS:new RegExp(b4,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+b3+"*(even|odd|(([+-]|)(\\d*)n|)"+b3+"*(?:([+-]|)"+b3+"*(\\d+)|))"+b3+"*\\)|)","i"),needsContext:new RegExp("^"+b3+"*[>+~]|"+b4,"i")},cf=function(cC){var cE=bD.createElement("div");try{return cC(cE)}catch(cD){return false}finally{cE=null}},bC=cf(function(cC){cC.appendChild(bD.createComment(""));return !cC.getElementsByTagName("*").length}),b7=cf(function(cC){cC.innerHTML="";return cC.firstChild&&typeof cC.firstChild.getAttribute!==bZ&&cC.firstChild.getAttribute("href")==="#"}),bV=cf(function(cD){cD.innerHTML="";var cC=typeof cD.lastChild.getAttribute("multiple");return cC!=="boolean"&&cC!=="string"}),b6=cf(function(cC){cC.innerHTML="";if(!cC.getElementsByClassName||!cC.getElementsByClassName("e").length){return false}cC.lastChild.className="e";return cC.getElementsByClassName("e").length===2}),bu=cf(function(cD){cD.id=cu+0;cD.innerHTML="
    ";bG.insertBefore(cD,bG.firstChild);var cC=bD.getElementsByName&&bD.getElementsByName(cu).length===2+bD.getElementsByName(cu+0).length;bF=!bD.getElementById(cu);bG.removeChild(cD);return cC});try{bQ.call(bG.childNodes,0)[0].nodeType}catch(cy){bQ=function(cD){var cE,cC=[];for(;(cE=this[cD]);cD++){cC.push(cE)}return cC}}function cl(cF,cC,cH,cK){cH=cH||[];cC=cC||bD;var cI,cD,cJ,cE,cG=cC.nodeType;if(!cF||typeof cF!=="string"){return cH}if(cG!==1&&cG!==9){return[]}cJ=bR(cC);if(!cJ&&!cK){if((cI=cj.exec(cF))){if((cE=cI[1])){if(cG===9){cD=cC.getElementById(cE);if(cD&&cD.parentNode){if(cD.id===cE){cH.push(cD);return cH}}else{return cH}}else{if(cC.ownerDocument&&(cD=cC.ownerDocument.getElementById(cE))&&b5(cC,cD)&&cD.id===cE){cH.push(cD);return cH}}}else{if(cI[2]){cr.apply(cH,bQ.call(cC.getElementsByTagName(cF),0));return cH}else{if((cE=cI[3])&&b6&&cC.getElementsByClassName){cr.apply(cH,bQ.call(cC.getElementsByClassName(cE),0));return cH}}}}}return ct(cF.replace(co,"$1"),cC,cH,cK,cJ)}cl.matches=function(cD,cC){return cl(cD,null,null,cC)};cl.matchesSelector=function(cC,cD){return cl(cD,null,null,[cC]).length>0};function cd(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return cD==="input"&&cE.type===cC}}function by(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return(cD==="input"||cD==="button")&&cE.type===cC}}function ca(cC){return cw(function(cD){cD=+cD;return cw(function(cE,cI){var cG,cF=cC([],cE.length,cD),cH=cF.length;while(cH--){if(cE[(cG=cF[cH])]){cE[cG]=!(cI[cG]=cE[cG])}}})})}bv=cl.getText=function(cG){var cF,cD="",cE=0,cC=cG.nodeType;if(cC){if(cC===1||cC===9||cC===11){if(typeof cG.textContent==="string"){return cG.textContent}else{for(cG=cG.firstChild;cG;cG=cG.nextSibling){cD+=bv(cG)}}}else{if(cC===3||cC===4){return cG.nodeValue}}}else{for(;(cF=cG[cE]);cE++){cD+=bv(cF)}}return cD};bR=cl.isXML=function(cC){var cD=cC&&(cC.ownerDocument||cC).documentElement;return cD?cD.nodeName!=="HTML":false};b5=cl.contains=bG.contains?function(cD,cC){var cF=cD.nodeType===9?cD.documentElement:cD,cE=cC&&cC.parentNode;return cD===cE||!!(cE&&cE.nodeType===1&&cF.contains&&cF.contains(cE))}:bG.compareDocumentPosition?function(cD,cC){return cC&&!!(cD.compareDocumentPosition(cC)&16)}:function(cD,cC){while((cC=cC.parentNode)){if(cC===cD){return true}}return false};cl.attr=function(cE,cD){var cF,cC=bR(cE);if(!cC){cD=cD.toLowerCase()}if((cF=cg.attrHandle[cD])){return cF(cE)}if(cC||bV){return cE.getAttribute(cD)}cF=cE.getAttributeNode(cD);return cF?typeof cE[cD]==="boolean"?cE[cD]?cD:null:cF.specified?cF.value:null:null};cg=cl.selectors={cacheLength:50,createPseudo:cw,match:cb,attrHandle:b7?{}:{href:function(cC){return cC.getAttribute("href",2)},type:function(cC){return cC.getAttribute("type")}},find:{ID:bF?function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC&&cC.parentNode?[cC]:[]}}:function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC?cC.id===cF||typeof cC.getAttributeNode!==bZ&&cC.getAttributeNode("id").value===cF?[cC]:bM:[]}},TAG:bC?function(cC,cD){if(typeof cD.getElementsByTagName!==bZ){return cD.getElementsByTagName(cC)}}:function(cC,cG){var cF=cG.getElementsByTagName(cC);if(cC==="*"){var cH,cE=[],cD=0;for(;(cH=cF[cD]);cD++){if(cH.nodeType===1){cE.push(cH)}}return cE}return cF},NAME:bu&&function(cC,cD){if(typeof cD.getElementsByName!==bZ){return cD.getElementsByName(name)}},CLASS:b6&&function(cE,cD,cC){if(typeof cD.getElementsByClassName!==bZ&&!cC){return cD.getElementsByClassName(cE)}}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(cC){cC[1]=cC[1].replace(bY,"");cC[3]=(cC[4]||cC[5]||"").replace(bY,"");if(cC[2]==="~="){cC[3]=" "+cC[3]+" "}return cC.slice(0,4)},CHILD:function(cC){cC[1]=cC[1].toLowerCase();if(cC[1]==="nth"){if(!cC[2]){cl.error(cC[0])}cC[3]=+(cC[3]?cC[4]+(cC[5]||1):2*(cC[2]==="even"||cC[2]==="odd"));cC[4]=+((cC[6]+cC[7])||cC[2]==="odd")}else{if(cC[2]){cl.error(cC[0])}}return cC},PSEUDO:function(cD){var cE,cC;if(cb.CHILD.test(cD[0])){return null}if(cD[3]){cD[2]=cD[3]}else{if((cE=cD[4])){if(ch.test(cE)&&(cC=bw(cE,true))&&(cC=cE.indexOf(")",cE.length-cC)-cE.length)){cE=cE.slice(0,cC);cD[0]=cD[0].slice(0,cC)}cD[2]=cE}}return cD.slice(0,3)}},filter:{ID:bF?function(cC){cC=cC.replace(bY,"");return function(cD){return cD.getAttribute("id")===cC}}:function(cC){cC=cC.replace(bY,"");return function(cE){var cD=typeof cE.getAttributeNode!==bZ&&cE.getAttributeNode("id");return cD&&cD.value===cC}},TAG:function(cC){if(cC==="*"){return function(){return true}}cC=cC.replace(bY,"").toLowerCase();return function(cD){return cD.nodeName&&cD.nodeName.toLowerCase()===cC}},CLASS:function(cC){var cD=cp[cu][cC+" "];return cD||(cD=new RegExp("(^|"+b3+")"+cC+"("+b3+"|$)"))&&cp(cC,function(cE){return cD.test(cE.className||(typeof cE.getAttribute!==bZ&&cE.getAttribute("class"))||"")})},ATTR:function(cE,cD,cC){return function(cH,cG){var cF=cl.attr(cH,cE);if(cF==null){return cD==="!="}if(!cD){return true}cF+="";return cD==="="?cF===cC:cD==="!="?cF!==cC:cD==="^="?cC&&cF.indexOf(cC)===0:cD==="*="?cC&&cF.indexOf(cC)>-1:cD==="$="?cC&&cF.substr(cF.length-cC.length)===cC:cD==="~="?(" "+cF+" ").indexOf(cC)>-1:cD==="|="?cF===cC||cF.substr(0,cC.length+1)===cC+"-":false}},CHILD:function(cC,cE,cF,cD){if(cC==="nth"){return function(cI){var cH,cJ,cG=cI.parentNode;if(cF===1&&cD===0){return true}if(cG){cJ=0;for(cH=cG.firstChild;cH;cH=cH.nextSibling){if(cH.nodeType===1){cJ++;if(cI===cH){break}}}}cJ-=cD;return cJ===cF||(cJ%cF===0&&cJ/cF>=0)}}return function(cH){var cG=cH;switch(cC){case"only":case"first":while((cG=cG.previousSibling)){if(cG.nodeType===1){return false}}if(cC==="first"){return true}cG=cH;case"last":while((cG=cG.nextSibling)){if(cG.nodeType===1){return false}}return true}}},PSEUDO:function(cF,cE){var cC,cD=cg.pseudos[cF]||cg.setFilters[cF.toLowerCase()]||cl.error("unsupported pseudo: "+cF);if(cD[cu]){return cD(cE)}if(cD.length>1){cC=[cF,cF,"",cE];return cg.setFilters.hasOwnProperty(cF.toLowerCase())?cw(function(cI,cK){var cH,cG=cD(cI,cE),cJ=cG.length;while(cJ--){cH=bT.call(cI,cG[cJ]);cI[cH]=!(cK[cH]=cG[cJ])}}):function(cG){return cD(cG,0,cC)}}return cD}},pseudos:{not:cw(function(cC){var cD=[],cE=[],cF=bI(cC.replace(co,"$1"));return cF[cu]?cw(function(cH,cM,cK,cI){var cL,cG=cF(cH,null,cI,[]),cJ=cH.length;while(cJ--){if((cL=cG[cJ])){cH[cJ]=!(cM[cJ]=cL)}}}):function(cI,cH,cG){cD[0]=cI;cF(cD,null,cG,cE);return !cE.pop()}}),has:cw(function(cC){return function(cD){return cl(cC,cD).length>0}}),contains:cw(function(cC){return function(cD){return(cD.textContent||cD.innerText||bv(cD)).indexOf(cC)>-1}}),enabled:function(cC){return cC.disabled===false},disabled:function(cC){return cC.disabled===true},checked:function(cC){var cD=cC.nodeName.toLowerCase();return(cD==="input"&&!!cC.checked)||(cD==="option"&&!!cC.selected)},selected:function(cC){if(cC.parentNode){cC.parentNode.selectedIndex}return cC.selected===true},parent:function(cC){return !cg.pseudos.empty(cC)},empty:function(cD){var cC;cD=cD.firstChild;while(cD){if(cD.nodeName>"@"||(cC=cD.nodeType)===3||cC===4){return false}cD=cD.nextSibling}return true},header:function(cC){return bX.test(cC.nodeName)},text:function(cE){var cD,cC;return cE.nodeName.toLowerCase()==="input"&&(cD=cE.type)==="text"&&((cC=cE.getAttribute("type"))==null||cC.toLowerCase()===cD)},radio:cd("radio"),checkbox:cd("checkbox"),file:cd("file"),password:cd("password"),image:cd("image"),submit:by("submit"),reset:by("reset"),button:function(cD){var cC=cD.nodeName.toLowerCase();return cC==="input"&&cD.type==="button"||cC==="button"},input:function(cC){return ci.test(cC.nodeName)},focus:function(cC){var cD=cC.ownerDocument;return cC===cD.activeElement&&(!cD.hasFocus||cD.hasFocus())&&!!(cC.type||cC.href||~cC.tabIndex)},active:function(cC){return cC===cC.ownerDocument.activeElement},first:ca(function(){return[0]}),last:ca(function(cC,cD){return[cD-1]}),eq:ca(function(cC,cE,cD){return[cD<0?cD+cE:cD]}),even:ca(function(cC,cE){for(var cD=0;cD=0;){cC.push(cD)}return cC}),gt:ca(function(cC,cF,cE){for(var cD=cE<0?cE+cF:cE;++cD1?function(cG,cF,cD){var cE=cC.length;while(cE--){if(!cC[cE](cG,cF,cD)){return false}}return true}:cC[0]}function b0(cC,cD,cE,cF,cI){var cG,cL=[],cH=0,cJ=cC.length,cK=cD!=null;for(;cH-1){cS[cU]=!(cP[cU]=cM)}}}}else{cO=b0(cO===cP?cO.splice(cJ,cO.length):cO);if(cH){cH(null,cP,cO,cR)}else{cr.apply(cP,cO)}}})}function b2(cI){var cD,cG,cE,cH=cI.length,cL=cg.relative[cI[0].type],cM=cL||cg.relative[" "],cF=cL?1:0,cJ=b1(function(cN){return cN===cD},cM,true),cK=b1(function(cN){return bT.call(cD,cN)>-1},cM,true),cC=[function(cP,cO,cN){return(!cL&&(cN||cO!==ce))||((cD=cO).nodeType?cJ(cP,cO,cN):cK(cP,cO,cN))}];for(;cF1&&bJ(cC),cF>1&&cI.slice(0,cF-1).join("").replace(co,"$1"),cG,cF0,cG=cF.length>0,cD=function(cQ,cK,cP,cO,cW){var cL,cM,cR,cV=[],cU=0,cN="0",cH=cQ&&[],cS=cW!=null,cT=ce,cJ=cQ||cG&&cg.find.TAG("*",cW&&cK.parentNode||cK),cI=(bW+=cT==null?1:Math.E);if(cS){ce=cK!==bD&&cK;cs=cD.el}for(;(cL=cJ[cN])!=null;cN++){if(cG&&cL){for(cM=0;(cR=cF[cM]);cM++){if(cR(cL,cK,cP)){cO.push(cL);break}}if(cS){bW=cI;cs=++cD.el}}if(cC){if((cL=!cR&&cL)){cU--}if(cQ){cH.push(cL)}}}cU+=cN;if(cC&&cN!==cU){for(cM=0;(cR=cE[cM]);cM++){cR(cH,cV,cK,cP)}if(cQ){if(cU>0){while(cN--){if(!(cH[cN]||cV[cN])){cV[cN]=b9.call(cO)}}}cV=b0(cV)}cr.apply(cO,cV);if(cS&&!cQ&&cV.length>0&&(cU+cE.length)>1){cl.uniqueSort(cO)}}if(cS){bW=cI;ce=cT}return cH};cD.el=0;return cC?cw(cD):cD}bI=cl.compile=function(cC,cH){var cE,cD=[],cG=[],cF=bS[cu][cC+" "];if(!cF){if(!cH){cH=bw(cC)}cE=cH.length;while(cE--){cF=b2(cH[cE]);if(cF[cu]){cD.push(cF)}else{cG.push(cF)}}cF=bS(cC,bB(cG,cD))}return cF};function bU(cD,cG,cF){var cE=0,cC=cG.length;for(;cE2&&(cD=cN[0]).type==="ID"&&cC.nodeType===9&&!cJ&&cg.relative[cN[1].type]){cC=cg.find.ID(cD.matches[0].replace(bY,""),cC,cJ)[0];if(!cC){return cG}cE=cE.slice(cN.shift().length)}for(cH=cb.POS.test(cE)?-1:cN.length-1;cH>=0;cH--){cD=cN[cH];if(cg.relative[(cM=cD.type)]){break}if((cL=cg.find[cM])){if((cK=cL(cD.matches[0].replace(bY,""),cm.test(cN[0].type)&&cC.parentNode||cC,cJ))){cN.splice(cH,1);cE=cK.length&&cN.join("");if(!cE){cr.apply(cG,bQ.call(cK,0));return cG}break}}}}}bI(cE,cI)(cK,cC,cJ,cG,cm.test(cE));return cG}if(bD.querySelectorAll){(function(){var cH,cI=ct,cG=/'|\\/g,cE=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cD=[":focus"],cC=[":active"],cF=bG.matchesSelector||bG.mozMatchesSelector||bG.webkitMatchesSelector||bG.oMatchesSelector||bG.msMatchesSelector;cf(function(cJ){cJ.innerHTML="";if(!cJ.querySelectorAll("[selected]").length){cD.push("\\["+b3+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!cJ.querySelectorAll(":checked").length){cD.push(":checked")}});cf(function(cJ){cJ.innerHTML="

    ";if(cJ.querySelectorAll("[test^='']").length){cD.push("[*^$]="+b3+"*(?:\"\"|'')")}cJ.innerHTML="";if(!cJ.querySelectorAll(":enabled").length){cD.push(":enabled",":disabled")}});cD=new RegExp(cD.join("|"));ct=function(cP,cK,cR,cU,cT){if(!cU&&!cT&&!cD.test(cP)){var cN,cS,cM=true,cJ=cu,cL=cK,cQ=cK.nodeType===9&&cP;if(cK.nodeType===1&&cK.nodeName.toLowerCase()!=="object"){cN=bw(cP);if((cM=cK.getAttribute("id"))){cJ=cM.replace(cG,"\\$&")}else{cK.setAttribute("id",cJ)}cJ="[id='"+cJ+"'] ";cS=cN.length;while(cS--){cN[cS]=cJ+cN[cS].join("")}cL=cm.test(cP)&&cK.parentNode||cK;cQ=cN.join(",")}if(cQ){try{cr.apply(cR,bQ.call(cL.querySelectorAll(cQ),0));return cR}catch(cO){}finally{if(!cM){cK.removeAttribute("id")}}}}return cI(cP,cK,cR,cU,cT)};if(cF){cf(function(cK){cH=cF.call(cK,"div");try{cF.call(cK,"[test!='']:sizzle");cC.push("!=",cB)}catch(cJ){}});cC=new RegExp(cC.join("|"));cl.matchesSelector=function(cK,cM){cM=cM.replace(cE,"='$1']");if(!bR(cK)&&!cC.test(cM)&&!cD.test(cM)){try{var cJ=cF.call(cK,cM);if(cJ||cH||cK.document&&cK.document.nodeType!==11){return cJ}}catch(cL){}}return cl(cM,null,null,[cK]).length>0}}})()}cg.pseudos.nth=cg.pseudos.eq;function bO(){}cg.filters=bO.prototype=cg.pseudos;cg.setFilters=new bO();cl.attr=C.attr;C.find=cl;C.expr=cl.selectors;C.expr[":"]=C.expr.pseudos;C.unique=cl.uniqueSort;C.text=cl.getText;C.isXMLDoc=cl.isXML;C.contains=cl.contains})(bd);var U=/Until$/,ag=/^(?:parents|prev(?:Until|All))/,bq=/^.[^:#\[\.,]*$/,aQ=C.expr.match.needsContext,ao={children:true,contents:true,next:true,prev:true};C.fn.extend({find:function(bu){var by,bv,bA,bB,bz,bx,bw=this;if(typeof bu!=="string"){return C(bu).filter(function(){for(by=0,bv=bw.length;by0){for(bB=bA;bB=0:C.filter(bu,this).length>0:this.filter(bu).length>0)},closest:function(by,bx){var bz,bw=0,bu=this.length,bv=[],bA=aQ.test(by)||typeof by!=="string"?C(by,bx||this.context):0;for(;bw-1:C.find.matchesSelector(bz,by)){bv.push(bz);break}bz=bz.parentNode}}bv=bv.length>1?C.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(bu){if(!bu){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof bu==="string"){return C.inArray(this[0],C(bu))}return C.inArray(bu.jqx?bu[0]:bu,this)},add:function(bu,bv){var bx=typeof bu==="string"?C(bu,bv):C.makeArray(bu&&bu.nodeType?[bu]:bu),bw=C.merge(this.get(),bx);return this.pushStack(x(bx[0])||x(bw[0])?bw:C.unique(bw))},addBack:function(bu){return this.add(bu==null?this.prevObject:this.prevObject.filter(bu))}});C.fn.andSelf=C.fn.addBack;function x(bu){return !bu||!bu.parentNode||bu.parentNode.nodeType===11}function aB(bv,bu){do{bv=bv[bu]}while(bv&&bv.nodeType!==1);return bv}C.each({parent:function(bv){var bu=bv.parentNode;return bu&&bu.nodeType!==11?bu:null},parents:function(bu){return C.dir(bu,"parentNode")},parentsUntil:function(bv,bu,bw){return C.dir(bv,"parentNode",bw)},next:function(bu){return aB(bu,"nextSibling")},prev:function(bu){return aB(bu,"previousSibling")},nextAll:function(bu){return C.dir(bu,"nextSibling")},prevAll:function(bu){return C.dir(bu,"previousSibling")},nextUntil:function(bv,bu,bw){return C.dir(bv,"nextSibling",bw)},prevUntil:function(bv,bu,bw){return C.dir(bv,"previousSibling",bw)},siblings:function(bu){return C.sibling((bu.parentNode||{}).firstChild,bu)},children:function(bu){return C.sibling(bu.firstChild)},contents:function(bu){return C.nodeName(bu,"iframe")?bu.contentDocument||bu.contentWindow.document:C.merge([],bu.childNodes)}},function(bu,bv){C.fn[bu]=function(by,bw){var bx=C.map(this,bv,by);if(!U.test(bu)){bw=by}if(bw&&typeof bw==="string"){bx=C.filter(bw,bx)}bx=this.length>1&&!ao[bu]?C.unique(bx):bx;if(this.length>1&&ag.test(bu)){bx=bx.reverse()}return this.pushStack(bx,bu,aD.call(arguments).join(","))}});C.extend({filter:function(bw,bu,bv){if(bv){bw=":not("+bw+")"}return bu.length===1?C.find.matchesSelector(bu[0],bw)?[bu[0]]:[]:C.find.matches(bw,bu)},dir:function(bw,bv,by){var bu=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===G||bx.nodeType!==1||!C(bx).is(by))){if(bx.nodeType===1){bu.push(bx)}bx=bx[bv]}return bu},sibling:function(bw,bv){var bu=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){bu.push(bw)}}return bu}});function az(bx,bw,bu){bw=bw||0;if(C.isFunction(bw)){return C.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===bu})}else{if(bw.nodeType){return C.grep(bx,function(bz,by){return(bz===bw)===bu})}else{if(typeof bw==="string"){var bv=C.grep(bx,function(by){return by.nodeType===1});if(bq.test(bw)){return C.filter(bw,bv,!bu)}else{bw=C.filter(bw,bv)}}}}return C.grep(bx,function(bz,by){return(C.inArray(bz,bw)>=0)===bu})}function a(bu){var bw=aJ.split("|"),bv=bu.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aJ="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aa=/ JQXLite\d+="(?:null|\d+)"/g,ah=/^\s+/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,c=/<([\w:]+)/,v=/]","i"),R=/^(?:checkbox|radio)$/,o=/checked\s*(?:[^=]|=\s*.checked.)/i,bp=/\/(java|ecma)script/i,aG=/^\s*\s*$/g,am={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},T=a(ak),bg=T.appendChild(ak.createElement("div"));am.optgroup=am.option;am.tbody=am.tfoot=am.colgroup=am.caption=am.thead;am.th=am.td;if(!C.support.htmlSerialize){am._default=[1,"X
    ","
    "]}C.fn.extend({text:function(bu){return C.access(this,function(bv){return bv===G?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ak).createTextNode(bv))},null,bu,arguments.length)},wrapAll:function(bu){if(C.isFunction(bu)){return this.each(function(bw){C(this).wrapAll(bu.call(this,bw))})}if(this[0]){var bv=C(bu,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(bu){if(C.isFunction(bu)){return this.each(function(bv){C(this).wrapInner(bu.call(this,bv))})}return this.each(function(){var bv=C(this),bw=bv.contents();if(bw.length){bw.wrapAll(bu)}else{bv.append(bu)}})},wrap:function(bu){var bv=C.isFunction(bu);return this.each(function(bw){C(this).wrapAll(bv?bu.call(this,bw):bu)})},unwrap:function(){return this.parent().each(function(){if(!C.nodeName(this,"body")){C(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.appendChild(bu)}})},prepend:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.insertBefore(bu,this.firstChild)}})},before:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(bu,this),"before",this.selector)}},after:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(this,bu),"after",this.selector)}},remove:function(bu,bx){var bw,bv=0;for(;(bw=this[bv])!=null;bv++){if(!bu||C.filter(bu,[bw]).length){if(!bx&&bw.nodeType===1){C.cleanData(bw.getElementsByTagName("*"));C.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){var bv,bu=0;for(;(bv=this[bu])!=null;bu++){if(bv.nodeType===1){C.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,bu){bv=bv==null?false:bv;bu=bu==null?bv:bu;return this.map(function(){return C.clone(this,bv,bu)})},html:function(bu){return C.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===G){return bx.nodeType===1?bx.innerHTML.replace(aa,""):G}if(typeof by==="string"&&!W.test(by)&&(C.support.htmlSerialize||!ac.test(by))&&(C.support.leadingWhitespace||!ah.test(by))&&!am[(c.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(L,"<$1>");try{for(;bw1&&typeof bB==="string"&&o.test(bB)){return this.each(function(){C(this).domManip(bA,bE,bD)})}if(C.isFunction(bB)){return this.each(function(bG){var bF=C(this);bA[0]=bB.call(this,bG,bE?bF.html():G);bF.domManip(bA,bE,bD)})}if(this[0]){bw=C.buildFragment(bA,this,bv);bz=bw.fragment;by=bz.firstChild;if(bz.childNodes.length===1){bz=by}if(by){bE=bE&&C.nodeName(by,"tr");for(bC=bw.cacheable||bu-1;bx0?this.clone(true):this).get();C(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,bu,bC.selector)}}});function bk(bu){if(typeof bu.getElementsByTagName!=="undefined"){return bu.getElementsByTagName("*")}else{if(typeof bu.querySelectorAll!=="undefined"){return bu.querySelectorAll("*")}else{return[]}}}function al(bu){if(R.test(bu.type)){bu.defaultChecked=bu.checked}}C.extend({clone:function(by,bA,bw){var bu,bv,bx,bz;if(C.support.html5Clone||C.isXMLDoc(by)||!ac.test("<"+by.nodeName+">")){bz=by.cloneNode(true)}else{bg.innerHTML=by.outerHTML;bg.removeChild(bz=bg.firstChild)}if((!C.support.noCloneEvent||!C.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!C.isXMLDoc(by)){ab(by,bz);bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){if(bv[bx]){ab(bu[bx],bv[bx])}}}if(bA){r(by,bz);if(bw){bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){r(bu[bx],bv[bx])}}}bu=bv=null;return bz},clean:function(bH,bw,bu,bx){var bE,bD,bG,bL,bA,bK,bB,by,bv,bF,bJ,bC,bz=bw===ak&&T,bI=[];if(!bw||typeof bw.createDocumentFragment==="undefined"){bw=ak}for(bE=0;(bG=bH[bE])!=null;bE++){if(typeof bG==="number"){bG+=""}if(!bG){continue}if(typeof bG==="string"){if(!P.test(bG)){bG=bw.createTextNode(bG)}else{bz=bz||a(bw);bB=bw.createElement("div");bz.appendChild(bB);bG=bG.replace(L,"<$1>");bL=(c.exec(bG)||["",""])[1].toLowerCase();bA=am[bL]||am._default;bK=bA[0];bB.innerHTML=bA[1]+bG+bA[2];while(bK--){bB=bB.lastChild}if(!C.support.tbody){by=v.test(bG);bv=bL==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bA[1]===""&&!by?bB.childNodes:[];for(bD=bv.length-1;bD>=0;--bD){if(C.nodeName(bv[bD],"tbody")&&!bv[bD].childNodes.length){bv[bD].parentNode.removeChild(bv[bD])}}}if(!C.support.leadingWhitespace&&ah.test(bG)){bB.insertBefore(bw.createTextNode(ah.exec(bG)[0]),bB.firstChild)}bG=bB.childNodes;bB.parentNode.removeChild(bB)}}if(bG.nodeType){bI.push(bG)}else{C.merge(bI,bG)}}if(bB){bG=bB=bz=null}if(!C.support.appendChecked){for(bE=0;(bG=bI[bE])!=null;bE++){if(C.nodeName(bG,"input")){al(bG)}else{if(typeof bG.getElementsByTagName!=="undefined"){C.grep(bG.getElementsByTagName("input"),al)}}}}if(bu){bJ=function(bM){if(!bM.type||bp.test(bM.type)){return bx?bx.push(bM.parentNode?bM.parentNode.removeChild(bM):bM):bu.appendChild(bM)}};for(bE=0;(bG=bI[bE])!=null;bE++){if(!(C.nodeName(bG,"script")&&bJ(bG))){bu.appendChild(bG);if(typeof bG.getElementsByTagName!=="undefined"){bC=C.grep(C.merge([],bG.getElementsByTagName("script")),bJ);bI.splice.apply(bI,[bE+1,0].concat(bC));bE+=bC.length}}}}return bI},cleanData:function(bv,bD){var by,bw,bx,bC,bz=0,bE=C.expando,bu=C.cache,bA=C.support.deleteExpando,bB=C.event.special;for(;(bx=bv[bz])!=null;bz++){if(bD||C.acceptData(bx)){bw=bx[bE];by=bw&&bu[bw];if(by){if(by.events){for(bC in by.events){if(bB[bC]){C.event.remove(bx,bC)}else{C.removeEvent(bx,bC,by.handle)}}}if(bu[bw]){delete bu[bw];if(bA){delete bx[bE]}else{if(bx.removeAttribute){bx.removeAttribute(bE)}else{bx[bE]=null}}C.deletedIds.push(bw)}}}}}});(function(){var bu,bv;C.uaMatch=function(bx){bx=bx.toLowerCase();var bw=/(chrome)[ \/]([\w.]+)/.exec(bx)||/(webkit)[ \/]([\w.]+)/.exec(bx)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(bx)||/(msie) ([\w.]+)/.exec(bx)||bx.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(bx)||[];return{browser:bw[1]||"",version:bw[2]||"0"}};bu=C.uaMatch(bt.userAgent);bv={};if(bu.browser){bv[bu.browser]=true;bv.version=bu.version}if(bv.chrome){bv.webkit=true}else{if(bv.webkit){bv.safari=true}}C.browser=bv;C.sub=function(){function bx(bz,bA){return new bx.fn.init(bz,bA)}C.extend(true,bx,this);bx.superclass=this;bx.fn=bx.prototype=this();bx.fn.constructor=bx;bx.sub=this.sub;bx.fn.init=function by(bz,bA){if(bA&&bA instanceof C&&!(bA instanceof bx)){bA=bx(bA)}return C.fn.init.call(this,bz,bA,bw)};bx.fn.init.prototype=bx.fn;var bw=bx(ak);return bx}})();var Q,bc,l,ad=/alpha\([^)]*\)/i,aj=/opacity=([^)]*)/,w=/^(top|right|bottom|left)$/,ai=/^(none|table(?!-c[ea]).+)/,av=/^margin/,i=new RegExp("^("+aE+")(.*)$","i"),aV=new RegExp("^("+aE+")(?!px)[a-z%]+$","i"),E=new RegExp("^([-+])=("+aE+")","i"),J={BODY:"block"},ba={position:"absolute",visibility:"hidden",display:"block"},aL={letterSpacing:0,fontWeight:400},D=["Top","Right","Bottom","Left"],O=["Webkit","O","Moz","ms"],be=C.fn.toggle;function a2(bx,bv){if(bv in bx){return bv}var by=bv.charAt(0).toUpperCase()+bv.slice(1),bu=bv,bw=O.length;while(bw--){bv=O[bw]+by;if(bv in bx){return bv}}return bu}function ap(bv,bu){bv=bu||bv;return C.css(bv,"display")==="none"||!C.contains(bv.ownerDocument,bv)}function bb(bz,bu){var by,bA,bv=[],bw=0,bx=bz.length;for(;bw1)},show:function(){return bb(this,true)},hide:function(){return bb(this)},toggle:function(bw,bv){var bu=typeof bw==="boolean";if(C.isFunction(bw)&&C.isFunction(bv)){return be.apply(this,arguments)}return this.each(function(){if(bu?bw:ap(this)){C(this).show()}else{C(this).hide()}})}});C.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var bu=Q(bw,"opacity");return bu===""?"1":bu}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":C.support.cssFloat?"cssFloat":"styleFloat"},style:function(bw,bv,bC,bx){if(!bw||bw.nodeType===3||bw.nodeType===8||!bw.style){return}var bA,bB,bD,by=C.camelCase(bv),bu=bw.style;bv=C.cssProps[by]||(C.cssProps[by]=a2(bu,by));bD=C.cssHooks[bv]||C.cssHooks[by];if(bC!==G){bB=typeof bC;if(bB==="string"&&(bA=E.exec(bC))){bC=(bA[1]+1)*bA[2]+parseFloat(C.css(bw,bv));bB="number"}if(bC==null||bB==="number"&&isNaN(bC)){return}if(bB==="number"&&!C.cssNumber[by]){bC+="px"}if(!bD||!("set" in bD)||(bC=bD.set(bw,bC,bx))!==G){try{bu[bv]=bC}catch(bz){}}}else{if(bD&&"get" in bD&&(bA=bD.get(bw,false,bx))!==G){return bA}return bu[bv]}},css:function(bA,by,bz,bv){var bB,bx,bu,bw=C.camelCase(by);by=C.cssProps[bw]||(C.cssProps[bw]=a2(bA.style,bw));bu=C.cssHooks[by]||C.cssHooks[bw];if(bu&&"get" in bu){bB=bu.get(bA,true,bv)}if(bB===G){bB=Q(bA,by)}if(bB==="normal"&&by in aL){bB=aL[by]}if(bz||bv!==G){bx=parseFloat(bB);return bz||C.isNumeric(bx)?bx||0:bB}return bB},swap:function(by,bx,bz){var bw,bv,bu={};for(bv in bx){bu[bv]=by.style[bv];by.style[bv]=bx[bv]}bw=bz.call(by);for(bv in bx){by.style[bv]=bu[bv]}return bw}});if(bd.getComputedStyle){Q=function(bB,bv){var bu,by,bx,bA,bz=bd.getComputedStyle(bB,null),bw=bB.style;if(bz){bu=bz.getPropertyValue(bv)||bz[bv];if(bu===""&&!C.contains(bB.ownerDocument,bB)){bu=C.style(bB,bv)}if(aV.test(bu)&&av.test(bv)){by=bw.width;bx=bw.minWidth;bA=bw.maxWidth;bw.minWidth=bw.maxWidth=bw.width=bu;bu=bz.width;bw.width=by;bw.minWidth=bx;bw.maxWidth=bA}}return bu}}else{if(ak.documentElement.currentStyle){Q=function(by,bw){var bz,bu,bv=by.currentStyle&&by.currentStyle[bw],bx=by.style;if(bv==null&&bx&&bx[bw]){bv=bx[bw]}if(aV.test(bv)&&!w.test(bw)){bz=bx.left;bu=by.runtimeStyle&&by.runtimeStyle.left;if(bu){by.runtimeStyle.left=by.currentStyle.left}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bz;if(bu){by.runtimeStyle.left=bu}}return bv===""?"auto":bv}}}function aO(bu,bw,bx){var bv=i.exec(bw);return bv?Math.max(0,bv[1]-(bx||0))+(bv[2]||"px"):bw}function aZ(bx,bv,bu,bz){var bw=bu===(bz?"border":"content")?4:bv==="width"?1:0,by=0;for(;bw<4;bw+=2){if(bu==="margin"){by+=C.css(bx,bu+D[bw],true)}if(bz){if(bu==="content"){by-=parseFloat(Q(bx,"padding"+D[bw]))||0}if(bu!=="margin"){by-=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}else{by+=parseFloat(Q(bx,"padding"+D[bw]))||0;if(bu!=="padding"){by+=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}}return by}function Y(bx,bv,bu){var by=bv==="width"?bx.offsetWidth:bx.offsetHeight,bw=true,bz=C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box";if(by<=0||by==null){by=Q(bx,bv);if(by<0||by==null){by=bx.style[bv]}if(aV.test(by)){return by}bw=bz&&(C.support.boxSizingReliable||by===bx.style[bv]);by=parseFloat(by)||0}return(by+aZ(bx,bv,bu||(bz?"border":"content"),bw))+"px"}function aN(bw){if(J[bw]){return J[bw]}var bu=C("<"+bw+">").appendTo(ak.body),bv=bu.css("display");bu.remove();if(bv==="none"||bv===""){bc=ak.body.appendChild(bc||C.extend(ak.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!l||!bc.createElement){l=(bc.contentWindow||bc.contentDocument).document;l.write("");l.close()}bu=l.body.appendChild(l.createElement(bw));bv=Q(bu,"display");ak.body.removeChild(bc)}J[bw]=bv;return bv}C.each(["height","width"],function(bv,bu){C.cssHooks[bu]={get:function(by,bx,bw){if(bx){if(by.offsetWidth===0&&ai.test(Q(by,"display"))){return C.swap(by,ba,function(){return Y(by,bu,bw)})}else{return Y(by,bu,bw)}}},set:function(bx,by,bw){return aO(bx,by,bw?aZ(bx,bu,bw,C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box"):0)}}});if(!C.support.opacity){C.cssHooks.opacity={get:function(bv,bu){return aj.test((bu&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":bu?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,bu=C.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&C.trim(bw.replace(ad,""))===""&&bx.removeAttribute){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ad.test(bw)?bw.replace(ad,bu):bw+" "+bu}}}C(function(){if(!C.support.reliableMarginRight){C.cssHooks.marginRight={get:function(bv,bu){return C.swap(bv,{display:"inline-block"},function(){if(bu){return Q(bv,"marginRight")}})}}}if(!C.support.pixelPosition&&C.fn.position){C.each(["top","left"],function(bu,bv){C.cssHooks[bv]={get:function(by,bx){if(bx){var bw=Q(by,bv);return aV.test(bw)?C(by).position()[bv]+"px":bw}}}})}});if(C.expr&&C.expr.filters){C.expr.filters.hidden=function(bu){return(bu.offsetWidth===0&&bu.offsetHeight===0)||(!C.support.reliableHiddenOffsets&&((bu.style&&bu.style.display)||Q(bu,"display"))==="none")};C.expr.filters.visible=function(bu){return !C.expr.filters.hidden(bu)}}C.each({margin:"",padding:"",border:"Width"},function(bu,bv){C.cssHooks[bu+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[bu+D[bx]+bv]=bz[bx]||bz[bx-2]||bz[0]}return bw}};if(!av.test(bu)){C.cssHooks[bu+bv].set=aO}});var g=/%20/g,af=/\[\]$/,br=/\r?\n/g,aU=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,p=/^(?:select|textarea)/i;C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?C.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aU.test(this.type))}).map(function(bu,bv){var bw=C(this).val();return bw==null?null:C.isArray(bw)?C.map(bw,function(by,bx){return{name:bv.name,value:by.replace(br,"\r\n")}}):{name:bv.name,value:bw.replace(br,"\r\n")}}).get()}});C.param=function(bu,bw){var bx,bv=[],by=function(bz,bA){bA=C.isFunction(bA)?bA():(bA==null?"":bA);bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===G){bw=C.ajaxSettings&&C.ajaxSettings.traditional}if(C.isArray(bu)||(bu.jqx&&!C.isPlainObject(bu))){C.each(bu,function(){by(this.name,this.value)})}else{for(bx in bu){s(bx,bu[bx],bw,by)}}return bv.join("&").replace(g,"+")};function s(bw,by,bv,bx){var bu;if(C.isArray(by)){C.each(by,function(bA,bz){if(bv||af.test(bw)){bx(bw,bz)}else{s(bw+"["+(typeof bz==="object"?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&C.type(by)==="object"){for(bu in by){s(bw+"["+bu+"]",by[bu],bv,bx)}}else{bx(bw,by)}}}if(C.support.ajax){C.ajaxTransport(function(bu){if(!bu.crossDomain||C.support.cors){var bv;return{send:function(bB,bw){var bz,by,bA=bu.xhr();if(bu.username){bA.open(bu.type,bu.url,bu.async,bu.username,bu.password)}else{bA.open(bu.type,bu.url,bu.async)}if(bu.xhrFields){for(by in bu.xhrFields){bA[by]=bu.xhrFields[by]}}if(bu.mimeType&&bA.overrideMimeType){bA.overrideMimeType(bu.mimeType)}if(!bu.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((bu.hasContent&&bu.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=G;if(bz){bA.onreadystatechange=C.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}try{bI.text=bA.responseText}catch(bJ){}try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&bu.isLocal&&!bu.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!bu.async){bv()}else{if(bA.readyState===4){setTimeout(bv,0)}else{bz=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};C(bd).unload(xhrOnUnloadAbort)}xhrCallbacks[bz]=bv}bA.onreadystatechange=bv}}},abort:function(){if(bv){bv(0,1)}}}}})}var a6,a1,ar=/^(?:toggle|show|hide)$/,aM=new RegExp("^(?:([-+])=|)("+aE+")([a-z%]*)$","i"),a7=/queueHooks$/,k=[bm],H={"*":[function(bu,bB){var bx,bC,bD=this.createTween(bu,bB),by=aM.exec(bB),bz=bD.cur(),bv=+bz||0,bw=1,bA=20;if(by){bx=+by[2];bC=by[3]||(C.cssNumber[bu]?"":"px");if(bC!=="px"&&bv){bv=C.css(bD.elem,bu,true)||bx||1;do{bw=bw||".5";bv=bv/bw;C.style(bD.elem,bu,bv+bC)}while(bw!==(bw=bD.cur()/bz)&&bw!==1&&--bA)}bD.unit=bC;bD.start=bv;bD.end=by[1]?bv+(by[1]+1)*bx:bx}return bD}]};function bl(){setTimeout(function(){a6=G},0);return(a6=C.now())}function Z(bv,bu){C.each(bu,function(bA,by){var bz=(H[bA]||[]).concat(H["*"]),bw=0,bx=bz.length;for(;bw-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(bu)||0;by=parseFloat(bE)||0}if(C.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};C.fn.extend({isRendered:function(){var bv=this;var bu=this[0];if(bu.parentNode==null||(bu.offsetWidth===0||bu.offsetHeight===0)){return false}return true},getSizeFromStyle:function(){var by=this;var bx=null;var bu=null;var bw=this[0];var bv;if(bw.style.width){bx=bw.style.width}if(bw.style.height){bu=bw.style.height}if(bd.getComputedStyle){bv=getComputedStyle(bw,null)}else{bv=bw.currentStyle}if(bv){if(bv.width){bx=bv.width}if(bv.height){bu=bv.height}}if(bx==="0px"){bx=0}if(bu==="0px"){bu=0}if(bx===null){bx=0}if(bu===null){bu=0}return{width:bx,height:bu}},initAnimate:function(){},sizeStyleChanged:function(bx){var bw=this;var by;var bu=function(bz){var bA=by;if(bz&&bz[0]&&bz[0].attributeName==="style"&&bz[0].type==="attributes"){if(bA.element.offsetWidth!==bA.offsetWidth||bA.element.offsetHeight!==bA.offsetHeight){bA.offsetWidth=bA.element.offsetWidth;bA.offsetHeight=bA.element.offsetHeight;if(bw.isRendered()){bA.callback()}}}};by={element:bw[0],offsetWidth:bw[0].offsetWidth,offsetHeight:bw[0].offsetHeight,callback:bx};try{if(!bw.elementStyleObserver){bw.elementStyleObserver=new MutationObserver(bu);bw.elementStyleObserver.observe(bw[0],{attributes:true,childList:false,characterData:false})}}catch(bv){}},position:function(){if(!this[0]){return}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),bu=V.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(C.css(bw,"marginTop"))||0;bx.left-=parseFloat(C.css(bw,"marginLeft"))||0;bu.top+=parseFloat(C.css(bv[0],"borderTopWidth"))||0;bu.left+=parseFloat(C.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-bu.top,left:bx.left-bu.left}},offsetParent:function(){return this.map(function(){var bu=this.offsetParent||ak.body;while(bu&&(!V.test(bu.nodeName)&&C.css(bu,"position")==="static")){bu=bu.offsetParent}return bu||ak.body})}});C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(bw,bv){var bu=/Y/.test(bv);C.fn[bw]=function(bx){return C.access(this,function(by,bB,bA){var bz=aC(by);if(bA===G){return bz?(bv in bz)?bz[bv]:bz.document.documentElement[bB]:by[bB]}if(bz){bz.scrollTo(!bu?bA:C(bz).scrollLeft(),bu?bA:C(bz).scrollTop())}else{by[bB]=bA}},bw,bx,arguments.length,null)}});function aC(bu){return C.isWindow(bu)?bu:bu.nodeType===9?bu.defaultView||bu.parentWindow:false}C.each({Height:"height",Width:"width"},function(bu,bv){C.each({padding:"inner"+bu,content:bv,"":"outer"+bu},function(bw,bx){C.fn[bx]=function(bB,bA){var bz=arguments.length&&(bw||typeof bB!=="boolean"),by=bw||(bB===true||bA===true?"margin":"border");return C.access(this,function(bD,bC,bE){var bF;if(C.isWindow(bD)){return bD.document.documentElement["client"+bu]}if(bD.nodeType===9){bF=bD.documentElement;return Math.max(bD.body["scroll"+bu],bF["scroll"+bu],bD.body["offset"+bu],bF["offset"+bu],bF["client"+bu])}return bE===G?C.css(bD,bC,bE,by):C.style(bD,bC,bE,by)},bv,bz?bB:G,bz,null)}})});bd.JQXLite=bd.jqxHelper=C;if(typeof define==="function"&&define.amd&&define.amd.JQXLite){define("jqx",[],function(){return C})}})(window)}(function(a){if(a.jQuery){a.minQuery=a.JQXLite=a.jQuery;return}if(!a.$){a.$=a.minQuery=a.JQXLite}else{a.minQuery=a.JQXLite=a.$}})(window);JQXLite.generateID=function(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};var b="";do{b="jqx"+a()+a()+a()}while($("#"+b).length>0);return b};var jqxBaseFramework=window.jqxBaseFramework=window.minQuery||window.jQuery;(function(b){b.jqx=b.jqx||{};window.jqx=b.jqx;var a={createInstance:function(c,e,g){if(e=="jqxDataAdapter"){var f=g[0];var d=g[1]||{};return new b.jqx.dataAdapter(f,d)}b(c)[e](g||{});return b(c)[e]("getInstance")}};window.jqwidgets=a;b.jqx.define=function(c,d,e){c[d]=function(){if(this.baseType){this.base=new c[this.baseType]();this.base.defineInstance()}this.defineInstance();this.metaInfo()};c[d].prototype.defineInstance=function(){};c[d].prototype.metaInfo=function(){};c[d].prototype.base=null;c[d].prototype.baseType=undefined;if(e&&c[e]){c[d].prototype.baseType=e}};b.jqx.invoke=function(f,e){if(e.length==0){return}var g=typeof(e)==Array||e.length>0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):b({}).toArray();while(f[g]==undefined&&f.base!=null){if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}f=f.base}if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}return};b.jqx.getByPriority=function(c){var e=undefined;for(var d=0;d0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):{};while(f[g]==undefined&&f.base!=null){if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}f=f.base}if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}return false};b.jqx.isPropertySetter=function(d,c){if(c.length==1&&typeof(c[0])=="object"){return true}if(c.length==2&&typeof(c[0])=="string"&&!b.jqx.hasFunction(d,c)){return true}return false};b.jqx.validatePropertySetter=function(g,e,c){if(!b.jqx.propertySetterValidation){return true}if(e.length==1&&typeof(e[0])=="object"){for(var f in e[0]){var h=g;while(!h.hasOwnProperty(f)&&h.base){h=h.base}if(!h||!h.hasOwnProperty(f)){if(!c){var d=h.hasOwnProperty(f.toString().toLowerCase());if(!d){throw"Invalid property: "+f}else{return true}}return false}}return true}if(e.length!=2){if(!c){throw"Invalid property: "+e.length>=0?e[0]:""}return false}while(!g.hasOwnProperty(e[0])&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e[0])){if(!c){throw"Invalid property: "+e[0]}return false}return true};if(!Object.keys){Object.keys=(function(){var e=Object.prototype.hasOwnProperty,f=!({toString:null}).propertyIsEnumerable("toString"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=d.length;return function(j){if(typeof j!=="object"&&(typeof j!=="function"||j===null)){throw new TypeError("Object.keys called on non-object")}var g=[],k,h;for(k in j){if(e.call(j,k)){g.push(k)}}if(f){for(h=0;h1){var g=!f.base?f.element:f.base.element;var c=b.data(g,f.widgetName).initArgs;if(c&&JSON&&JSON.stringify&&i[0]&&c[0]){try{if(JSON.stringify(i[0])==JSON.stringify(c[0])){var h=true;b.each(i[0],function(l,m){if(f[l]!=m){h=false;return false}});if(h){return}}}catch(e){}}f.batchUpdate=i[0];var j={};var k={};b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){if(f[l]!=m){j[l]=f[l];k[l]=m;d++}}else{if(n.hasOwnProperty(l.toLowerCase())){if(f[l.toLowerCase()]!=m){j[l.toLowerCase()]=f[l.toLowerCase()];k[l.toLowerCase()]=m;d++}}}});if(d<2){f.batchUpdate=null}}b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){b.jqx.setvalueraiseevent(n,l,m)}else{if(n.hasOwnProperty(l.toLowerCase())){b.jqx.setvalueraiseevent(n,l.toLowerCase(),m)}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+l+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,j,k)}}}else{if(i.length==2){while(!f.hasOwnProperty(i[0])&&f.base){f=f.base}if(f.hasOwnProperty(i[0])){b.jqx.setvalueraiseevent(f,i[0],i[1])}else{if(f.hasOwnProperty(i[0].toLowerCase())){b.jqx.setvalueraiseevent(f,i[0].toLowerCase(),i[1])}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+i[0]+"'"}}}}}};b.jqx.setvalueraiseevent=function(d,e,f){var c=d[e];d[e]=f;if(!d.isInitialized){return}if(d.propertyChangedHandler!=undefined){d.propertyChangedHandler(d,e,c,f)}if(d.propertyChangeMap!=undefined&&d.propertyChangeMap[e]!=undefined){d.propertyChangeMap[e](d,e,c,f)}};b.jqx.get=function(f,e){if(e==undefined||e==null){return undefined}if(f.propertyMap){var d=f.propertyMap(e);if(d!=null){return d}}if(f.hasOwnProperty(e)){return f[e]}if(f.hasOwnProperty(e.toLowerCase())){return f[e.toLowerCase()]}var c=undefined;if(typeof(e)==Array){if(e.length!=1){return undefined}c=e[0]}else{if(typeof(e)=="string"){c=e}}while(!f.hasOwnProperty(c)&&f.base){f=f.base}if(f){return f[c]}return undefined};b.jqx.serialize=function(f){var c="";if(b.isArray(f)){c="[";for(var e=0;e0){c+=", "}c+=b.jqx.serialize(f[e])}c+="]"}else{if(typeof(f)=="object"){c="{";var d=0;for(var e in f){if(d++>0){c+=", "}c+=e+": "+b.jqx.serialize(f[e])}c+="}"}else{c=f.toString()}}return c};b.jqx.propertySetterValidation=true;b.jqx.jqxWidgetProxy=function(h,d,c){var e=b(d);var g=b.data(d,h);if(g==undefined){return undefined}var f=g.instance;if(b.jqx.hasFunction(f,c)){return b.jqx.invoke(f,c)}if(b.jqx.isPropertySetter(f,c)){if(b.jqx.validatePropertySetter(f,c)){b.jqx.set(f,c);return undefined}}else{if(typeof(c)=="object"&&c.length==0){return}else{if(typeof(c)=="object"&&c.length==1&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c[0])}else{if(typeof(c)=="string"&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c)}}}}throw"jqxCore: Invalid parameter '"+b.jqx.serialize(c)+"' does not exist."};b.jqx.applyWidget=function(d,f,l,m){var h=false;try{h=window.MSApp!=undefined}catch(g){}var n=b(d);if(!m){m=new b.jqx["_"+f]()}else{m.host=n;m.element=d}if(d.id==""){d.id=b.jqx.utilities.createId()}var k={host:n,element:d,instance:m,initArgs:l};m.widgetName=f;b.data(d,f,k);b.data(d,"jqxWidget",k.instance);var j=new Array();var m=k.instance;while(m){m.isInitialized=false;j.push(m);m=m.base}j.reverse();j[0].theme=b.jqx.theme||"";b.jqx.jqxWidgetProxy(f,d,l);for(var c in j){m=j[c];if(c==0){m.host=n;m.element=d;m.WinJS=h}if(m!=undefined){if(m.definedInstance){m.definedInstance()}if(m.createInstance!=null){if(h){MSApp.execUnsafeLocalFunction(function(){m.createInstance(l)})}else{m.createInstance(l)}}}}for(var c in j){if(j[c]!=undefined){j[c].isInitialized=true}}if(h){MSApp.execUnsafeLocalFunction(function(){k.instance.refresh(true)})}else{k.instance.refresh(true)}};b.jqx.jqxWidget=function(c,d,g){var j=false;try{var l=Array.prototype.slice.call(g,0)}catch(i){var l=""}try{j=window.MSApp!=undefined}catch(i){}var h=c;var m="";if(d){m="_"+d}b.jqx.define(b.jqx,"_"+h,m);var k=new Array();if(!window[h]){var f=function(n){if(n==null){return""}var e=b.type(n);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(n===null){return""}return n.toString()}var o="";b.each(n,function(q,r){var t=r;if(q>0){o+=", "}o+="[";var p=0;if(b.type(t)=="object"){for(var s in t){if(p>0){o+=", "}o+="{"+s+":"+t[s]+"}";p++}}else{if(p>0){o+=", "}o+="{"+q+":"+t+"}";p++}o+="]"});return o};a[h]=window[h]=function(e,s){var n=[];if(!s){s={}}n.push(s);var o=e;if(b.type(o)==="object"&&e[0]){o=e[0].id;if(o===""){o=e[0].id=b.jqx.utilities.createId()}}else{if(b.type(e)==="object"&&e&&e.nodeName){o=e.id;if(o===""){o=e.id=b.jqx.utilities.createId()}}}if(window.jqxWidgets&&window.jqxWidgets[o]){if(s){b.each(window.jqxWidgets[o],function(t){var u=b(this.element).data();if(u&&u.jqxWidget){b(this.element)[h](s)}})}if(window.jqxWidgets[o].length==1){var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o][0]}}var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o]}}var p=b(e);if(p.length===0){p=b("
    ");if(h==="jqxInput"||h==="jqxPasswordInput"||h==="jqxMaskedInput"){p=b("")}if(h==="jqxTextArea"){p=b("")}if(h==="jqxButton"||h==="jqxRepeatButton"||h==="jqxToggleButton"){p=b("
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(b.support.htmlSerialize||!k.test(s))&&(b.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1>");try{for(;m=0&&d.indexOf(".net4.0c")>=0){e.browser="msie";e.version="11";c[1]="msie"}if(d.indexOf("edge")>=0){e.browser="msie";e.version="12";c[1]="msie"}e[c[1]]=c[1];return e}});b.jqx.browser=b.jqx.utilities.getBrowser();b.jqx.isHidden=function(d){if(!d||!d[0]){return false}var c=d[0].offsetWidth,e=d[0].offsetHeight;if(c===0||e===0){return true}else{return false}};b.jqx.ariaEnabled=true;b.jqx.aria=function(d,f,e){if(!b.jqx.ariaEnabled){return}if(f==undefined){b.each(d.aria,function(h,i){var k=!d.base?d.host.attr(h):d.base.host.attr(h);if(k!=undefined&&!b.isFunction(k)){var j=k;switch(i.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}d[i.name]=j}else{var k=d[i.name];if(b.isFunction(k)){k=d[i.name]()}if(k==undefined){k=""}try{!d.base?d.host.attr(h,k.toString()):d.base.host.attr(h,k.toString())}catch(g){}}})}else{try{if(d.host){if(!d.base){if(d.host){if(d.element.setAttribute){d.element.setAttribute(f,e.toString())}else{d.host.attr(f,e.toString())}}else{d.attr(f,e.toString())}}else{if(d.base.host){d.base.host.attr(f,e.toString())}else{d.attr(f,e.toString())}}}else{if(d.setAttribute){d.setAttribute(f,e.toString())}}}catch(c){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d){var c=this.length;var e=Number(arguments[1])||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=c}for(;e=0||j.indexOf("WPDesktop")>=0||j.indexOf("IEMobile")>=0||j.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(j.indexOf("Touch")>=0){var c=("MSPointerDown" in window)||("pointerdown" in window);if(c){this.touchDevice=true;return true}if(j.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(l){this.touchDevice=false;return false}},getLeftPos:function(c){var d=c.offsetLeft;while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){d+=c.offsetLeft;if(document.all){d+=c.clientLeft}}}return d},getTopPos:function(d){var f=d.offsetTop;var c=b(d).coord();while((d=d.offsetParent)!=null){if(d.tagName!="HTML"){f+=(d.offsetTop-d.scrollTop);if(document.all){f+=d.clientTop}}}var e=navigator.userAgent.toLowerCase();var g=(e.indexOf("windows phone")!=-1||e.indexOf("WPDesktop")!=-1||e.indexOf("ZuneWP7")!=-1||e.indexOf("msie 9")!=-1||e.indexOf("msie 11")!=-1||e.indexOf("msie 10")!=-1)&&e.indexOf("touch")!=-1;if(g){return c.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return f}if(e.indexOf("version/7")!=-1){return c.top}if(e.indexOf("version/6")!=-1||e.indexOf("version/5")!=-1){f=f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return f+b(window).scrollTop()}return c.top}return f},isChromeMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("android")!=-1;return c},isOperaMiniMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1||d.indexOf("opera mobi")!=-1;return c},isOperaMiniBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1;return c},isNewSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/5")!=-1);return c},isSafari4MobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/4")!=-1);return c},isWindowsPhone:function(){var d=navigator.userAgent.toLowerCase();var c=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1&&d.indexOf("touch")!=-1);return c},isSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return true}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return true}var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1||d.indexOf("mobile safari")!=-1;return c},isIPadSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1;return c},isMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("android")!=-1;return c},getTouches:function(c){if(c.originalEvent){if(c.originalEvent.touches&&c.originalEvent.touches.length){return c.originalEvent.touches}else{if(c.originalEvent.changedTouches&&c.originalEvent.changedTouches.length){return c.originalEvent.changedTouches}}}if(!c.touches){c.touches=new Array();c.touches[0]=c.originalEvent!=undefined?c.originalEvent:c;if(c.originalEvent!=undefined&&c.pageX){c.touches[0]=c}if(c.type=="mousemove"){c.touches[0]=c}}return c.touches},getTouchEventName:function(c){if(this.isWindowsPhone()){var d=navigator.userAgent.toLowerCase();if(d.indexOf("windows phone 7")!=-1){if(c.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(c.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(c.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}if(c.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(c.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(c.toLowerCase().indexOf("end")!=-1){return"pointerup"}}else{return c}},dispatchMouseEvent:function(c,g,f){if(this.simulatetouches){return}var d=document.createEvent("MouseEvent");d.initMouseEvent(c,true,true,g.view,1,g.screenX,g.screenY,g.clientX,g.clientY,false,false,false,false,0,null);if(f!=null){f.dispatchEvent(d)}},getRootNode:function(c){while(c.nodeType!==1){c=c.parentNode}return c},setTouchScroll:function(c,d){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[d]=c},touchScroll:function(B,M,Z,H,x,n){if(B==null){return}var G=this;var f=0;var r=0;var g=0;var i=0;var t=0;var j=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[H]=false;var k=false;var p=b(B);var R=["select","input","textarea"];var X=0;var J=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[H]=true;var H=H;var w=this.getTouchEventName("touchstart")+".touchScroll";var D=this.getTouchEventName("touchend")+".touchScroll";var ab=this.getTouchEventName("touchmove")+".touchScroll";var l,W,z,ah,V,Y,aj,Q,aa,d,F,ad,af,O,e,v,u,S,c,E,ag,o;Q=M;var aj=0;var aa=0;var h=0;var T=0;var ai=0;var Y=x.jqxScrollBar("max");var o=325;function A(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientY}else{if(am.originalEvent&&am.originalEvent.clientY!==undefined){return am.originalEvent.clientY}else{var al=G.getTouches(am);return al[0].clientY}}}function ae(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientX}else{if(am.originalEvent&&am.originalEvent.clientX!==undefined){return am.originalEvent.clientX}else{var al=G.getTouches(am);return al[0].clientX}}}var I=function(){var ap,am,aq,ao;ap=Date.now();am=ap-v;v=ap;aq=aa-e;var an=h-ah;e=aa;ah=h;F=true;ao=1000*aq/(1+am);var al=1000*an/(1+am);af=0.8*ao+0.2*af;O=0.8*al+0.2*O};var C=false;var X=function(am){if(!G.enableScrolling[H]){return true}if(b.inArray(am.target.tagName.toLowerCase(),R)!==-1){return}aa=n.jqxScrollBar("value");h=x.jqxScrollBar("value");var an=G.getTouches(am);var ao=an[0];if(an.length==1){G.dispatchMouseEvent("mousedown",ao,G.getRootNode(ao.target))}Y=x.jqxScrollBar("max");Q=n.jqxScrollBar("max");function al(ap){C=false;F=true;d=A(ap);ag=ae(ap);af=S=O=0;e=aa;ah=h;v=Date.now();clearInterval(u);u=setInterval(I,100);T=aa;ai=h;if(aa>0&&aaQ)?Q:(amQ)?"max":(amY)?Y:(amY)?"max":(am0.5||am<-0.5){ac(c+am);requestAnimationFrame(U)}else{ac(c)}}}function N(){var al,am;if(S){al=Date.now()-v;am=-S*Math.exp(-al/o);if(am>0.5||am<-0.5){m(E+am);requestAnimationFrame(N)}else{m(E)}}}var y=function(al){if(!G.enableScrolling[H]){return true}if(!G.scrolling[H]){return true}if(C){al.preventDefault();al.stopPropagation()}var aq=G.getTouches(al);if(aq.length>1){return true}var am=aq[0].pageY;var ao=aq[0].pageX;if(G.simulatetouches){if(aq[0]._pageY!=undefined){am=aq[0]._pageY;ao=aq[0]._pageX}}var au=am-r;var av=ao-t;J=am;var at=ao;g=au-f;j=av-i;k=true;f=au;i=av;var an=x!=null?x[0].style.visibility!="hidden":true;var ar=n!=null?n[0].style.visibility!="hidden":true;function ap(ay){var aA,az,ax;if(F){aA=A(ay);ax=ae(ay);az=d-aA;V=ag-ax;var aw="value";if(az>2||az<-2){d=aA;aw=ac(aa+az,ay);I();if(aw=="min"&&T===0){return true}if(aw=="max"&&T===Q){return true}if(!ar){return true}ay.preventDefault();ay.stopPropagation();C=true;return false}else{if(V>2||V<-2){ag=ax;aw=m(h+V,ay);I();if(aw=="min"&&ai===0){return true}if(aw=="max"&&ai===Y){return true}if(!an){return true}C=true;ay.preventDefault();ay.stopPropagation();return false}}ay.preventDefault()}}if(an||ar){if((an)||(ar)){ap(al)}}};if(p.on){p.on(ab,y)}else{p.bind(ab,y)}var s=function(am){if(!G.enableScrolling[H]){return true}var an=G.getTouches(am)[0];if(!G.scrolling[H]){return true}F=false;clearInterval(u);if(af>10||af<-10){S=0.8*af;c=Math.round(aa+S);v=Date.now();requestAnimationFrame(U)}else{if(O>10||O<-10){S=0.8*O;E=Math.round(h+S);v=Date.now();requestAnimationFrame(N)}else{}}G.scrolling[H]=false;if(k){G.dispatchMouseEvent("mouseup",an,am.target)}else{var an=G.getTouches(am)[0],al=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,al);G.dispatchMouseEvent("click",an,al);return true}};if(this.simulatetouches){var q=b(window).on!=undefined||b(window).bind;var P=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};b(window).on!=undefined?b(document).on("mouseup.touchScroll",P):b(document).bind("mouseup.touchScroll",P);if(window.frameElement){if(window.top!=null){var L=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};if(window.top.document){b(window.top.document).on?b(window.top.document).on("mouseup",L):b(window.top.document).bind("mouseup",L)}}}var ak=b(document).on!=undefined||b(document).bind;var K=function(al){if(!G.scrolling[H]){return true}G.scrolling[H]=false;var an=G.getTouches(al)[0],am=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,am);G.dispatchMouseEvent("click",an,am)};b(document).on!=undefined?b(document).on("touchend",K):b(document).bind("touchend",K)}if(p.on){p.on("dragstart",function(al){al.preventDefault()});p.on("selectstart",function(al){al.preventDefault()})}p.on?p.on(D+" touchcancel.touchScroll",s):p.bind(D+" touchcancel.touchScroll",s)}});b.jqx.cookie=b.jqx.cookie||{};b.extend(b.jqx.cookie,{cookie:function(f,g,d){if(arguments.length>1&&String(g)!=="[object Object]"){d=b.extend({},d);if(g===null||g===undefined){d.expires=-1}if(typeof d.expires==="number"){var i=d.expires,e=d.expires=new Date();e.setDate(e.getDate()+i)}g=String(g);return(document.cookie=[encodeURIComponent(f),"=",d.raw?g:encodeURIComponent(g),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join(""))}d=g||{};var c,h=d.raw?function(j){return j}:decodeURIComponent;return(c=new RegExp("(?:^|; )"+encodeURIComponent(f)+"=([^;]*)").exec(document.cookie))?h(c[1]):null}});b.jqx.string=b.jqx.string||{};b.extend(b.jqx.string,{replace:function(g,e,f){if(e===f){return this}var c=g;var d=c.indexOf(e);while(d!=-1){c=c.replace(e,f);d=c.indexOf(e)}return c},contains:function(c,d){if(c==null||d==null){return false}return c.indexOf(d)!=-1},containsIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toString().toUpperCase().indexOf(d.toString().toUpperCase())!=-1},equals:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.slice(0,d.length)==d}return false},equalsIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.toUpperCase().slice(0,d.length)==d.toUpperCase()}return false},startsWith:function(c,d){if(c==null||d==null){return false}return c.slice(0,d.length)==d},startsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toUpperCase().slice(0,d.length)==d.toUpperCase()},normalize:function(c){if(c.charCodeAt(c.length-1)==65279){c=c.substring(0,c.length-1)}return c},endsWith:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.slice(-d.length)==d},endsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.toUpperCase().slice(-d.length)==d.toUpperCase()}});b.extend(b.easing,{easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e}return i/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){if(b.event&&b.event.special){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}})}if(b.fn.extend){b.fn.extend({ischildof:function(g){if(!b(this).parents){var c=g.element.contains(this.element);return c}var e=b(this).parents().get();for(var d=0;d=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}if(this[0]&&this[0].tagName.toLowerCase().indexOf("angular")>=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal&&b.fn.modal.Constructor){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(n){var e,j,i={top:0,left:0},f=this[0],l=f&&f.ownerDocument;if(!l){return}e=l.documentElement;if(!b.contains(e,f)){return i}if(typeof f.getBoundingClientRect!==undefined){i=f.getBoundingClientRect()}var d=function(o){return b.isWindow(o)?o:o.nodeType===9?o.defaultView||o.parentWindow:false};j=d(l);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var m=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(m){h=2}if(true==n){if(document.body.style.position!="static"&&document.body.style.position!=""){var k=b(document.body).coord();h=-k.left;c=-k.top}}return{top:c+i.top+(j.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+i.left+(j.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};b.jqx.ripplers=[];b.jqx.ripple=function(f,e,o){if(!e){e=f}var h=b(f);var j=false;h.append("");var p=h.find(".ink");var c=false;for(var g=0;g")}var r=d.find(".ink");r.removeClass("animate");if(!r.height()&&!r.width()){var s=Math.max(d.outerWidth(),d.outerHeight());r.css({height:s,width:s})}if(o==="checkbox"||o==="radiobutton"){if(o==="checkbox"){if(e.jqxCheckBox("disabled")){return}}if(o==="radiobutton"){if(e.jqxRadioButton("disabled")){return}}var q=d.width()/2-r.width()/2;var t=d.height()/2-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate");r.on("animationend",function(){if(b.jqx.ripple.mouseCaptured){r.removeClass("animate");r.addClass("active");f.addClass("active")}});return}var q=i.pageX-d.offset().left-r.width()/2;var t=i.pageY-d.offset().top-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate")})})}})(jqxBaseFramework); (function(i){i.jqx.observableArray=function(e,J){if(typeof(e)=="string"){e=i.parseJSON(e)}if(!Object.defineProperty||!(function(){try{Object.defineProperty({},"x",{});return true}catch(M){return false}}())){var L=Object.defineProperty;Object.defineProperty=function(O,P,N){if(L){try{return L(O,P,N)}catch(M){}}if(O!==Object(O)){throw TypeError("Object.defineProperty called on non-object")}if(Object.prototype.__defineGetter__&&("get" in N)){Object.prototype.__defineGetter__.call(O,P,N.get)}if(Object.prototype.__defineSetter__&&("set" in N)){Object.prototype.__defineSetter__.call(O,P,N.set)}if("value" in N){O[P]=N.value}else{if(!O[P]){O[P]=N}}return O}}if(!Array.prototype.forEach){Array.prototype.forEach=function(N){if(this===void 0||this===null){throw TypeError()}var Q=Object(this);var M=Q.length>>>0;if(typeof N!=="function"){throw TypeError()}var P=arguments[1],O;for(O=0;O=0){if(NK.length){I.push.apply(I,new Array(N-K.length))}}}else{throw new RangeError("Invalid array length")}return M}});i.jqx.observableArray.prototype.fromArray=function(O,N){var M=new i.jqx.observableArray(O,N);return M};i.jqx.observableArray.prototype.clone=function(){var M=new i.jqx.observableArray(K,J);M.observing=I.observing;M.changes=I.changes;M.notifier=I.notifier;return M};I.remove=function(N){if(N<0||N>=I.length){throw new Error("Invalid index : "+N)}if(I.hasOwnProperty(N)){var M=I[N];I[N]=undefined;K[N]=undefined;if(typeof H==="function"){H({object:I,type:"delete",index:N,name:"index",newValue:undefined,oldValue:M})}return true}return false};I.concat=function(N,P){var M=K.concat(N);var O=new i.jqx.observableArray(M,P);return O};Object.getOwnPropertyNames(Array.prototype).forEach(function(M){if(!(M in I)){var N=function(){var Q=I.observing;I.observing=false;var P=K[M];var O=P.apply(K,arguments);I.observing=Q;return O};Object.defineProperty(I,M,{configurable:false,enumerable:true,writeable:false,value:N})}});I.set=function(N,P){if(i.type(N)=="string"&&N.split(".").length>1){var M=N.split(".");var Q=I;for(var O=0;O=I.length){throw new Error("Invalid Index: "+N)}}if(O=I.length){I.push(P)}else{I[N]=P}return true};I.get=function(M){return I[M]};if(e instanceof Array){I.push.apply(I,e)}H=function(){if(!I.observing){return}if(arguments&&arguments[0]){I.changes.push(arguments[0])}if(J){J.apply(I,arguments)}if(I.notifier){I.notifier.apply(I,arguments)}};return I};i.jqx.formatDate=function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e};i.jqx.formatNumber=function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e};i.jqx.dataAdapter=function(J,e){if(J!=undefined){if(J.dataFields!==undefined){J.datafields=J.dataFields}if(J.dataType!==undefined){J.datatype=J.dataType}if(J.localData!==undefined){J.localdata=J.localData}if(J.sortColumn!==undefined){J.sortcolumn=J.sortColumn}if(J.sortDirection!==undefined){J.sortdirection=J.sortDirection}if(J.sortColumns!==undefined){J.sortcolumns=J.sortColumns}if(J.sortDirections!==undefined){J.sortdirections=J.sortDirections}if(J.sortOrder!==undefined){J.sortdirection=J.sortOrder}if(J.formatData!==undefined){J.formatdata=J.formatData}if(J.processData!==undefined){J.processdata=J.processData}if(J.pageSize!==undefined){J.pagesize=J.pageSize}if(J.pageNum!==undefined){J.pagenum=J.pageNum}if(J.updateRow!==undefined){J.updaterow=J.updateRow}if(J.addRow!==undefined){J.addrow=J.addRow}if(J.deleteRow!==undefined){J.deleterow=J.deleteRow}if(J.contentType!==undefined){J.contenttype=J.contentType}if(J.totalRecords!=undefined){J.totalrecords=J.totalRecords}if(J.loadError!=undefined){J.loadError=J.loadError}if(J.sortComparer!=undefined){J.sortcomparer=J.sortComparer}}this._source=J;this._options=e||{};if(J.beforeLoadComplete!=undefined){this._options.beforeLoadComplete=this._source.beforeLoadComplete}if(J.downloadComplete!=undefined){this._options.downloadComplete=this._source.downloadComplete}if(J.loadComplete!=undefined){this._options.loadComplete=this._source.loadComplete}if(J.autoBind!=undefined){this._options.downloadComplete=this._source.autoBind}if(J.formatData!=undefined){this._options.formatData=this._source.formatData}if(J.loadError!=undefined){this._options.loadError=this._source.loadError}if(J.beforeSend!=undefined){this._options.beforeSend=this._source.beforeSend}if(J.contentType!=undefined){this._options.contentType=this._source.contentType}if(J.async!=undefined){this._options.async=this._source.async}if(J.loadServerData!=undefined){this._options.loadServerData=this._source.loadServerData}if(J.uniqueDataFields!=undefined){this._options.uniqueDataFields=this._source.uniqueDataFields}this.records=new Array();this._downloadComplete=new Array();this._bindingUpdate=new Array();if(J!=undefined&&J.localdata!=null&&typeof J.localdata=="function"){var I=J.localdata();if(I!=null){J._localdata=J.localdata;var H=this;if(J._localdata.subscribe){H._oldlocaldata=[];J._localdata.subscribe(function(K){var L=function(M){if(i.isArray(M)){return i.makeArray(L(i(M)))}return i.extend(true,{},M)};if(H.suspendKO==false||H.suspendKO==undefined||H._oldlocaldata.length==0){H._oldlocaldata=L(K)}},J._localdata,"beforeChange");J._localdata.subscribe(function(L){if(H.suspendKO==false||H.suspendKO==undefined){var K="";H._oldrecords=H.records;if(H._oldlocaldata.length==0){J.localdata=J._localdata()}if(H._oldlocaldata.length==0){K="change"}else{if(L){if(H._oldlocaldata.length==L.length){K="update"}if(H._oldlocaldata.length>L.length){K="remove"}if(H._oldlocaldata.length0){this.callBindingUpdate("update");this._changedrecords=[]}else{this.dataBind(null,"")}}},formatDate:function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e},formatNumber:function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e},dataBind:function(R,aa){if(this.isUpdating==true){return}var W=this._source;if(!W){return}if(W.generatedfields){W.datafields=null;W.generatedfields=null}i.jqx.dataFormat.datescache=new Array();if(W.dataFields!=null){W.datafields=W.dataFields}if(W.recordstartindex==undefined){W.recordstartindex=0}if(W.recordendindex==undefined){W.recordendindex=0}if(W.loadallrecords==undefined){W.loadallrecords=true}if(W.root==undefined){W.root=""}if(W.record==undefined){W.record=""}if(W.sort!=undefined){this.sort=W.sort}if(W.filter!=undefined){this.filter=W.filter}else{this.filter=null}if(W.sortcolumn!=undefined){this.sortcolumn=W.sortcolumn}if(W.sortdirection!=undefined){this.sortdirection=W.sortdirection}if(W.sortcolumns!=undefined){this.sortcolumns=W.sortcolumns}if(W.sortdirections!=undefined){this.sortdirections=W.sortdirections}if(W.sortcomparer!=undefined){this.sortcomparer=W.sortcomparer}this.records=new Array();var K=this._options||{};this.virtualmode=K.virtualmode!=undefined?K.virtualmode:false;this.totalrecords=K.totalrecords!=undefined?K.totalrecords:0;this.pageable=K.pageable!=undefined?K.pageable:false;this.pagesize=K.pagesize!=undefined?K.pagesize:0;this.pagenum=K.pagenum!=undefined?K.pagenum:0;this.cachedrecords=K.cachedrecords!=undefined?K.cachedrecords:new Array();this.originaldata=new Array();this.recordids=new Array();this.updaterow=K.updaterow!=undefined?K.updaterow:null;this.addrow=K.addrow!=undefined?K.addrow:null;this.deleterow=K.deleterow!=undefined?K.deleterow:null;this.cache=K.cache!=undefined?K.cache:false;this.unboundmode=false;if(W.formatdata!=undefined){K.formatData=W.formatdata}if(W.data!=undefined){if(K.data==undefined){K.data={}}i.extend(K.data,W.data)}if(W.mapChar!=undefined){W.mapchar=W.mapChar}if(W.mapchar!=undefined){this.mapChar=W.mapchar?W.mapchar:">"}else{this.mapChar=K.mapChar?K.mapChar:">"}if(K.unboundmode||W.unboundmode){this.unboundmode=K.unboundmode||W.unboundmode}if(W.cache!=undefined){this.cache=W.cache}if(this.koSubscriptions){for(var ac=0;ac0){for(var Z=0;Z0){var an=ao;for(var ak=0;ak0){var aG=false;var aB=false;for(var ax=0;ax=0)){aG=true;at=aw.map;aE=aw.type;aC=aw.name;aB=true;var aF=an[ay];if(at!=null){var ar=at.split(ah.mapChar);if(ar.length>0){var az=an;for(var au=0;au0){var az=an;for(var au=0;au0){var aj=this;var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{this.uid=ak;ah.records[ah.records.length]=this}})}else{if(ad==0){var V=0;var T=new Array();i.each(W.localdata,function(al,an){var aj=new Object(this);if(typeof an==="string"){ah.records=W.localdata;return false}else{var ak=ah.getid(W.id,aj,al);if(typeof(ak)==="object"){ak=al}aj.uid=ak;if(al==0){for(var ao in this){V++;var ap=i.type(this[ao]);T.push({name:ao,type:ap})}ad=V;W.datafields=T;W.generatedfields=T}if(ad>0){var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{ah.records[ah.records.length]=aj}}})}else{i.each(W.localdata,function(al){var aj=this;var am=H(aj,ad);var ak=ah.getid(W.id,am,al);if(typeof(ak)==="object"){ak=al}var aj=new Object(am);aj.uid=ak;ah.records[ah.records.length]=aj})}}}this.originaldata=W.localdata;this.cachedrecords=this.records;this.addForeignValues(W);if(K.uniqueDataFields){var S=this.getUniqueRecords(this.records,K.uniqueDataFields);this.records=S;this.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}if(K.autoSort&&K.autoSortField){var O=Object.prototype.toString;Object.prototype.toString=(typeof field=="function")?field:function(){return this[K.autoSortField]};ah.records.sort(function(ak,aj){if(ak===undefined){ak=null}if(aj===undefined){aj=null}if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}ak=ak.toString();aj=aj.toString();if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}if(i.jqx.dataFormat.isNumber(ak)&&i.jqx.dataFormat.isNumber(aj)){if(akaj){return 1}return 0}else{if(i.jqx.dataFormat.isDate(ak)&&i.jqx.dataFormat.isDate(aj)){if(akaj){return 1}return 0}else{if(!i.jqx.dataFormat.isNumber(ak)&&!i.jqx.dataFormat.isNumber(aj)){ak=String(ak).toLowerCase();aj=String(aj).toLowerCase()}}}try{if(akaj){return 1}}catch(al){var am=al}return 0});Object.prototype.toString=O}ah.loadedData=W.localdata;ah.buildHierarchy();if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"ics":if(W.localdata!=null&&!W.url){if(i.isFunction(W.beforeprocessing)){W.beforeprocessing(W.localdata)}if(W.datatype==="xml"){ah.loadxml(W.localdata,W.localdata,W)}else{if(Q==="text"){ah.loadtext(W.localdata,W)}else{if(Q==="ics"){ah.loadics(W.localdata,W)}else{ah.loadjson(W.localdata,W.localdata,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var S=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=S;ah.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}ah.loadedData=W.localdata;ah.buildHierarchy.call(ah);if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}ah.callBindingUpdate(aa);return}var af=K.data!=undefined?K.data:{};if(W.processdata){W.processdata(af)}if(i.isFunction(K.processData)){K.processData(af)}if(i.isFunction(K.formatData)){var e=K.formatData(af);if(e!=undefined){af=e}}var ab="application/x-www-form-urlencoded";if(K.contentType){ab=K.contentType}var J="GET";if(W.type){J=W.type}if(K.type){J=K.type}var X=Q;if(Q=="ics"){X="text"}if(W.url&&W.url.length>0){if(i.isFunction(K.loadServerData)){ah._requestData(af,W,K)}else{this.xhr=i.jqx.data.ajax({dataType:X,cache:this.cache,type:J,url:W.url,async:N,timeout:W.timeout,contentType:ab,data:af,success:function(am,aj,ap){if(i.isFunction(W.beforeprocessing)){var ao=W.beforeprocessing(am,aj,ap);if(ao!=undefined){am=ao}}if(i.isFunction(K.downloadComplete)){var ao=K.downloadComplete(am,aj,ap);if(ao!=undefined){am=ao}}if(am==null){ah.records=new Array();ah.cachedrecords=new Array();ah.originaldata=new Array();ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(new Array())}return}var ak=am;if(am.records){ak=am.records}if(am.totalrecords!=undefined){W.totalrecords=am.totalrecords}else{if(am.totalRecords!=undefined){W.totalrecords=am.totalRecords}}if(W.datatype==="xml"){ah.loadxml(null,ak,W)}else{if(Q==="text"){ah.loadtext(ak,W)}else{if(Q==="ics"){ah.loadics(ak,W)}else{ah.loadjson(null,ak,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var al=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=al;ah.cachedrecords=al}if(K.beforeLoadComplete){var an=K.beforeLoadComplete(ah.records,am);if(an!=undefined){ah.records=an;ah.cachedrecords=an}}ah.loadedData=am;ah.buildHierarchy.call(ah);ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(am,aj,ap,ah.records)}},error:function(al,aj,ak){if(i.isFunction(W.loaderror)){W.loaderror(al,aj,ak)}if(i.isFunction(K.loadError)){K.loadError(al,aj,ak)}al=null;ah.callDownloadComplete()},beforeSend:function(ak,aj){if(i.isFunction(K.beforeSend)){K.beforeSend(ak,aj)}if(i.isFunction(W.beforesend)){W.beforesend(ak,aj)}}})}}else{ah.buildHierarchy(new Array());ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){if(!ai){var ai={}}K.loadComplete(ai)}}break}this.callBindingUpdate(aa)},buildHierarchy:function(K){var e=this._source;var P=new Array();if(!e.datafields){return}if(e.hierarchy&&!e.hierarchy.reservedNames){e.hierarchy.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"}}else{if(e.hierarchy){var O=e.hierarchy.reservedNames;if(!O.leaf){O.leaf="leaf"}if(!O.parent){O.parent="parent"}if(!O.expanded){O.expanded="expanded"}if(!O.checked){O.checked="checked"}if(!O.selected){O.selected="selected"}if(!O.level){O.level="level"}if(!O.data){O.data="data"}}}if(!e.hierarchy){return}var N=this;var O=e.hierarchy.reservedNames;if(e.hierarchy.root){if(e.dataType=="xml"){var P=this.getRecordsHierarchy("uid","parentuid","records",null,K);this.hierarchy=P;return P}else{this.hierarchy=this.records;var R=e.hierarchy.root;for(var L=0;L1){var W=S;for(var V=0;V0){var K=function(O){if(O){for(var P=0;P=0&&(this._source.hierarchy||I)){var L=(J._source&&J._source.hierarchy)?J._source.hierarchy.reservedNames:null;if(L==null){L=N()}H[L.level]=0;if(e=="last"){this.hierarchy.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.hierarchy.splice(e,0,H)}else{this.hierarchy.splice(0,0,H)}}}else{if(e=="last"){this.records.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.records.splice(e,0,H)}else{this.records.splice(0,0,H)}}}return true}}return false},deleteRecord:function(H){var J=this;if(this.hierarchy.length>0){var K=function(L){if(L){for(var O=0;OQ.totalrecords){M=Q.totalrecords}}else{if(Q.virtualmode){K=H.recordstartindex;M=H.recordendindex;if(M>Q.totalrecords){M=Q.totalrecords}}else{K=0;M=Q.records.length}}for(var O=K;O0){V(af+1,ae)}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}};V(0,e)}return e},bindBindingUpdate:function(H,e){this._bindingUpdate[this._bindingUpdate.length]={id:H,func:e}},unbindBindingUpdate:function(H){for(var e=0;e0){return e}else{if(N.map){try{var e=i(H).attr(N.map);if(e!=null&&e.toString().length>0){return e}else{if(i(N.map,H).length>0){return i(N.map,H).text()}else{if(i(N.name,H).length>0){return i(N.name,H).text()}}}}catch(J){return K}}}return}}if(i(N,H).length>0){return i(N,H).text()}if(N){if(N.toString().length>0){var e=i(H).attr(N);if(e!=null&&e.toString().length>0){return i.trim(e).split(" ").join("").replace(/([ #;?%&,.+*~\':"!^$[\]()=>|\/\\@])/g,"")}else{var I=N.split(this.mapChar);if(I.length>1){var M=H;for(var L=0;L1){var ab=af;for(var R=0;R0){var ab=af;for(var R=0;R0){var aa=I;for(var R=0;R0){var am=an;for(var ai=0;ai0){X=ah[0]}}}else{var ae=Q.map.substring(0,M-1);var O=Q.map.indexOf("]");var R=Q.map.substring(M+1,O);X=i(ae,I).attr(R);if(X==undefined){X=i(I).attr(R)}if(X==undefined){X=""}}if(X==""){X=i(I).attr(Q.map);if(X==undefined){X=""}}}}if(X==""){X=i(Q.name,I);if(X.length==1){X=X.text()}else{var ah=new Array();for(var ac=0;ac0){X=ah[0]}}if(X==""){X=i(I).attr(Q.name);if(X==undefined){X=""}}if(X==""){if(I.nodeName&&I.nodeName==Q.name&&I.firstChild){X=i(I.firstChild).text()}}}var W=X;X=this.getvaluebytype(X,Q);if(Q.displayname!=undefined){L[Q.displayname]=X}else{L[Q.name]=X}}if(V.recordendindex<=0||Y0){var ai=this.getid(V.id,i(I).parents(V.hierarchy.record+":first"));N.parentuid=ai}else{N.parentuid=null}}}this.records=ab;this.cachedrecords=this.records},loadics:function(N,H){if(N==null){return}var S=H.rowDelimiter||this.rowDelimiter||"\n";var R=N.split(S);var K=R.length;var Q=N.split("\r");if(K==1&&Q.length>1){R=Q;K=R.length}this.records=new Array();this.originaldata=new Array();var L=this.records;this.recordids=new Array();var I=0;var P=function(V){var T=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/;var U=T.exec(V);if(!U){throw new Error("Invalid UNTIL value: "+V)}return new Date(Date.UTC(U[1],U[2]-1,U[3],U[5]||0,U[6]||0,U[7]||0))};for(var M=0;M=0){e.SUMMARY=O.substring(O.indexOf("SUMMARY")+8);continue}if(O.indexOf("LOCATION")>=0){e.LOCATION=O.substring(O.indexOf("LOCATION")+9);continue}if(O.indexOf("DESCRIPTION")>=0){e.DESCRIPTION=O.substring(O.indexOf("DESCRIPTION")+12);continue}if(O.indexOf("RRULE")>=0){e.RRULE=O.substring(O.indexOf("RRULE")+6);continue}if(O.indexOf("EXDATE")>=0){var J=O.substring(O.indexOf("EXDATE")+7);e.EXDATE=J;continue}if(O.indexOf("DTEND")>=0){e.DTEND=P(O.substring(O.indexOf("DTEND")+6));continue}if(O.indexOf("DTSTART")>=0){e.DTSTART=P(O.substring(O.indexOf("DTSTART")+8));continue}if(O.indexOf("UID")>=0){e.uid=e.UID=O.substring(O.indexOf("UID")+4);continue}if(O.indexOf("STATUS")>=0){e.STATUS=O.substring(O.indexOf("STATUS")+7);continue}if(O=="END:VEVENT"){L.push(e);continue}}this.records=L;this.cachedrecords=this.records},loadtext:function(Y,P){if(Y==null){return}var e=P.rowDelimiter||this.rowDelimiter||"\n";var L=Y.split(e);var J=L.length;var X=Y.split("\r");if(J==1&&X.length>1){L=X;J=L.length}this.totalrecords=this.virtualmode?(P.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var U=this.records;var R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(P.loadallrecords){R=0;J=this.totalrecords}var N=0;if(this.virtualmode){R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;N=R;R=0;J=this.totalrecords}var V=P.datafields.length;var O=P.columnDelimiter||this.columnDelimiter;if(!O){O=(P.datatype==="tab"||P.datatype==="tsv")?"\t":","}for(var T=R;T=H.length){continue}var M=P.datafields[S];var Q=H[S];if(M.map&&i.isFunction(M.map)){Q=M.map(I)}if(M.type){Q=this.getvaluebytype(Q,M)}var Z=M.map||M.name||S.toString();K[Z]=Q;if(P.id!=null){if(P.id===M.name){W=Q;this.recordids[W]=I}}}if(W==null){W=T}U[N+T]=i.extend({},K);U[N+T].uid=W;this.originaldata[N+T]=i.extend({},U[T])}}this.records=U;this.cachedrecords=this.records},getvaluebytype:function(L,H){var J=L;if(L==null){return L}if(i.isArray(L)&&H.type!="array"){for(var I=0;I=L){return J}}return 0},toUpper:function(e){return e.split("\u00A0").join(" ").toUpperCase()},toUpperArray:function(e){var J=[];for(var I=0,H=e.length;I'+e+""}return''+e+""},formatemail:function(e){return''+e+""},formatNumber:function(e,I,H){return this.formatnumber(e,I,H)},formatnumber:function(T,S,O){if(O==undefined||O==null||O==""){O=this.defaultcalendar()}if(S===""||S===null){return T}if(!this.isNumber(T)){T*=1}var P;if(S.length>1){P=parseInt(S.slice(1),10)}var V={};var Q=S.charAt(0).toUpperCase();V.thousandsSeparator=O.thousandsseparator;V.decimalSeparator=O.decimalseparator;switch(Q){case"D":case"d":case"F":case"f":V.decimalPlaces=P;break;case"N":case"n":V.decimalPlaces=0;break;case"C":case"c":V.decimalPlaces=P;if(O.currencysymbolposition=="before"){V.prefix=O.currencysymbol}else{V.suffix=O.currencysymbol}break;case"P":case"p":V.suffix=O.percentsymbol;V.decimalPlaces=P;break;default:throw"Bad number format specifier: "+Q}if(this.isNumber(T)){var K=(T<0);var I=T+"";var R=(V.decimalSeparator)?V.decimalSeparator:".";var e;if(this.isNumber(V.decimalPlaces)){var L=V.decimalPlaces;var N=Math.pow(10,L);I=(T*N).toFixed(0)/N+"";e=I.lastIndexOf(".");if(L>0){if(e<0){I+=R;e=I.length-1}else{if(R!=="."){I=I.replace(".",R)}}while((I.length-1-e)0&&L==undefined){if(R!=="."){I=I.replace(".",R)}}}if(V.thousandsSeparator){var U=V.thousandsSeparator;e=I.lastIndexOf(R);e=(e>-1)?e:I.length;var J=I.substring(e);var H=-1;for(var M=e;M>0;M--){H++;if((H%3===0)&&(M!==e)&&(!K||(M>1))){J=U+J}J=I.charAt(M-1)+J}I=J}I=(V.prefix)?V.prefix+I:I;I=(V.suffix)?I+V.suffix:I;return I}else{return T}},tryparsedate:function(ak,al){if(al==undefined||al==null){al=this.defaultcalendar()}var P=this;if(ak==""){return null}if(ak!=null&&!ak.substring){ak=ak.toString()}if(ak!=null&&ak.substring(0,6)=="/Date("){var au=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var ar=new Date(+ak.replace(/\/Date\((\d+)\)\//,"$1"));if(ar=="Invalid Date"){var an=ak.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var ar=null;if(an){ar=new Date(1*an[1]+3600000*an[2]+60000*an[3])}}if(ar==null||ar=="Invalid Date"||isNaN(ar)){var Q=au.exec(ak);if(Q){var T=new Date(parseInt(Q[1]));if(Q[2]){var Z=parseInt(Q[3]);if(Q[2]==="-"){Z=-Z}var V=T.getUTCMinutes();T.setUTCMinutes(V-Z)}if(!isNaN(T.valueOf())){return T}}}return ar}var N=al.patterns;for(var S in N){ar=P.parsedate(ak,N[S],al);if(ar){if(S=="ISO"){var ac=P.parsedate(ak,N.ISO2,al);if(ac){return ac}}return ar}}if(ak!=null){var ac=null;var L=[":","/","-"];var ap=true;for(var O=0;O=0){I=ak.substring(ak.indexOf(":")-2);I=ag.trim(I);Y=ak.substring(0,ak.indexOf(":")-2)}else{if(ak.toUpperCase().indexOf("AM")>=0){I=ak.substring(ak.toUpperCase().indexOf("AM")-2);I=ag.trim(I);Y=ak.substring(0,ak.toUpperCase().indexOf("AM")-2)}else{if(ak.toUpperCase().indexOf("PM")>=0){I=ak.substring(ak.toUpperCase().indexOf("PM")-2);I=ag.trim(I);Y=ak.substring(0,ak.toUpperCase().indexOf("PM")-2)}}}var e=new Date();var aj=false;if(Y){for(var aq=0;aq=0){L=Y.split(am[aq]);break}}var H=new Array();var W=new Array();var ae=new Array();var R=null;var aw=null;for(var aq=0;aq2){aw=aq;break}}}for(var aq=0;aq0){e=ao[0];aj=true}}if(I){var ah=I.indexOf(":")>=0?I.split(":"):I;var K=ag.parsedate(I,"h:mm tt",al)||ag.parsedate(I,"h:mm:ss tt",al)||ag.parsedate(I,"HH:mm:ss.fff",al)||ag.parsedate(I,"HH:mm:ss.ff",al)||ag.parsedate(I,"HH:mm:ss.tttt",al)||ag.parsedate(I,"HH:mm:ss",al)||ag.parsedate(I,"HH:mm",al)||ag.parsedate(I,"HH",al);var X=0,J=0,aa=0,ab=0;if(K&&K.getTime()!=NaN){X=K.getHours();J=K.getMinutes();aa=K.getSeconds();ab=K.getMilliseconds()}else{if(ah.length==1){X=parseInt(ah[0])}if(ah.length==2){X=parseInt(ah[0]);J=parseInt(ah[1])}if(ah.length==3){X=parseInt(ah[0]);J=parseInt(ah[1]);if(ah[2].indexOf(".")>=0){aa=parseInt(ah[2].toString().split(".")[0]);ab=parseInt(ah[2].toString().split(".")[1])}else{aa=parseInt(ah[2])}}if(ah.length==4){X=parseInt(ah[0]);J=parseInt(ah[1]);aa=parseInt(ah[2]);ab=parseInt(ah[3])}}if(e&&!isNaN(X)&&!isNaN(J)&&!isNaN(aa)&&!isNaN(ab)){e.setHours(X,J,aa,ab);aj=true}}if(aj){return e}}return null},getparseregexp:function(e,R){var T=e._parseRegExp;if(!T){e._parseRegExp=T={}}else{var K=T[R];if(K){return K}}var Q=this.expandFormat(e,R).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),O=["^"],H=[],N=0,J=0,W=this.getTokenRegExp(),L;while((L=W.exec(Q))!==null){var V=Q.slice(N,L.index);N=W.lastIndex;J+=this.appendPreOrPostMatch(V,O);if(J%2){O.push(L[0]);continue}var I=L[0],M=I.length,S;switch(I){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":S="(\\D+)";break;case"tt":case"t":S="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":S="(\\d{"+M+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":S="(\\d\\d?)";break;case"zzz":S="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":S="([+-]?\\d\\d?)";break;case"/":S="(\\"+e["/"]+")";break;default:throw"Invalid date format pattern '"+I+"'.";break}if(S){O.push(S)}H.push(L[0])}this.appendPreOrPostMatch(Q.slice(N),O);O.push("$");var U=O.join("").replace(/\s+/g,"\\s+"),P={regExp:U,groups:H};return T[R]=P},outOfRange:function(I,e,H){return IH},expandYear:function(L,J){var H=new Date(),e=this.getEra(H);if(J<100){var I=L.twoDigitYearMax;I=typeof I==="string"?new Date().getFullYear()%100+parseInt(I,10):I;var K=this.getEraYear(H,L,e);J+=K-(K%100);if(J>I){J-=100}}return J},parsedate:function(ab,ai,W){if(W==undefined||W==null){W=this.defaultcalendar()}ab=this.trim(ab);var T=W,an=this.getparseregexp(T,ai),N=new RegExp(an.regExp).exec(ab);if(N===null){return null}var aj=an.groups,Z=null,R=null,am=null,al=null,S=null,L=0,ae,ad=0,ak=0,e=0,I=null,U=false;for(var af=0,ah=aj.length;af1&&ah.length)<[^<]*)*<\/script>/gi,d=/([?&])_=[^&]*/,h=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,t=/\s+/,F=i.fn.load,G={},C={},q=["*/"]+["*"];try{E=location.href}catch(A){E=document.createElement("a");E.href="";E=E.href}l=h.exec(E.toLowerCase())||[];function r(e){return function(K,M){if(typeof K!=="string"){M=K;K="*"}var H,N,O,J=K.toLowerCase().split(t),I=0,L=J.length;if(i.isFunction(M)){for(;I0?4:0;if(al){aj=B(Q,W,al)}if(ak>=200&&ak<300||ak===304){if(Q.ifModified){an=W.getResponseHeader("Last-Modified");if(an){i.lastModified[P]=an}an=W.getResponseHeader("Etag");if(an){i.etag[P]=an}}if(ak===304){ah="notmodified";e=true}else{e=c(Q,aj);ah=e.state;ao=e.data;am=e.error;e=!am}}else{am=ah;if(!ah||ak){ah="error";if(ak<0){ak=0}}}W.status=ak;W.statusText=(ag||ah)+"";if(e){ae.resolveWith(af,[ao,ah,W])}else{ae.rejectWith(af,[W,ah,am])}W.statusCode(N);N=undefined;if(I){T.trigger("ajax"+(e?"Success":"Error"),[W,Q,e?ao:am])}aa.fireWith(af,[W,ah]);if(I){T.trigger("ajaxComplete",[W,Q]);if(!(--i.active)){i.event.trigger("ajaxStop")}}}ae.promise(W);W.success=W.done;W.error=W.fail;W.complete=aa.add;W.statusCode=function(ag){if(ag){var e;if(L<2){for(e in ag){N[e]=[N[e],ag[e]]}}else{e=ag[W.status];W.always(e)}}return this};Q.url=((M||Q.url)+"").replace(p,"").replace(o,l[1]+"//");Q.dataTypes=i.trim(Q.dataType||"*").toLowerCase().split(t);if(Q.crossDomain==null){V=h.exec(Q.url.toLowerCase());Q.crossDomain=!!(V&&(V[1]!==l[1]||V[2]!==l[2]||(V[3]||(V[1]==="http:"?80:443))!=(l[3]||(l[1]==="http:"?80:443))))}if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=i.param(Q.data,Q.traditional)}v(G,Q,J,W);if(L===2){return W}I=Q.global;Q.type=Q.type.toUpperCase();Q.hasContent=!j.test(Q.type);if(I&&i.active++===0){i.event.trigger("ajaxStart")}if(!Q.hasContent){if(Q.data){Q.url+=(k.test(Q.url)?"&":"?")+Q.data;delete Q.data}P=Q.url;if(Q.cache===false){var H=(new Date()).getTime(),ac=Q.url.replace(d,"$1_="+H);Q.url=ac+((ac===Q.url)?(k.test(Q.url)?"&":"?")+"_="+H:"")}}if(Q.data&&Q.hasContent&&Q.contentType!==false||J.contentType){W.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){P=P||Q.url;if(i.lastModified[P]){W.setRequestHeader("If-Modified-Since",i.lastModified[P])}if(i.etag[P]){W.setRequestHeader("If-None-Match",i.etag[P])}}W.setRequestHeader("Accept",Q.dataTypes[0]&&Q.accepts[Q.dataTypes[0]]?Q.accepts[Q.dataTypes[0]]+(Q.dataTypes[0]!=="*"?", "+q+"; q=0.01":""):Q.accepts["*"]);for(X in Q.headers){W.setRequestHeader(X,Q.headers[X])}if(Q.beforeSend&&(Q.beforeSend.call(af,W,Q)===false||L===2)){return W.abort()}O="abort";for(X in {success:1,error:1,complete:1}){W[X](Q[X])}Y=v(C,Q,J,W);if(!Y){S(-1,"No Transport")}else{W.readyState=1;if(I){T.trigger("ajaxSend",[W,Q])}if(Q.async&&Q.timeout>0){R=setTimeout(function(){W.abort("timeout")},Q.timeout)}try{L=1;Y.send(U,S)}catch(Z){if(L<2){S(-1,Z)}else{throw Z}}}return W},active:0,lastModified:{},etag:{}});function B(P,O,L){var K,M,J,e,H=P.contents,N=P.dataTypes,I=P.responseFields;for(M in I){if(M in L){O[I[M]]=L[M]}}while(N[0]==="*"){N.shift();if(K===undefined){K=P.mimeType||O.getResponseHeader("content-type")}}if(K){for(M in H){if(H[M]&&H[M].test(K)){N.unshift(M);break}}}if(N[0] in L){J=N[0]}else{for(M in L){if(!N[0]||P.converters[M+" "+N[0]]){J=M;break}if(!e){e=M}}J=J||e}if(J){if(J!==N[0]){N.unshift(J)}return L[J]}}function c(R,J){var P,H,N,L,O=R.dataTypes.slice(),I=O[0],Q={},K=0;if(R.dataFilter){J=R.dataFilter(J,R.dataType)}if(O[1]){for(P in R.converters){Q[P.toLowerCase()]=R.converters[P]}}for(;(N=O[++K]);){if(N!=="*"){if(I!=="*"&&I!==N){P=Q[I+" "+N]||Q["* "+N];if(!P){for(H in Q){L=H.split(" ");if(L[1]===N){P=Q[I+" "+L[0]]||Q["* "+L[0]];if(P){if(P===true){P=Q[H]}else{if(Q[H]!==true){N=L[0];O.splice(K--,0,N)}}break}}}}if(P!==true){if(P&&R["throws"]){J=P(J)}else{try{J=P(J)}catch(M){return{state:"parsererror",error:P?M:"No conversion from "+I+" to "+N}}}}}I=N}}return{state:"success",data:J}}var y=[],n=/\?/,D=/(=)\?(?=&|$)|\?\?/,z=(new Date()).getTime();i.jqx.data.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=y.pop()||(i.expando+"_"+(z++));this[e]=true;return e}});i.jqx.data.ajaxPrefilter("json jsonp",function(Q,L,P){var O,e,N,J=Q.data,H=Q.url,I=Q.jsonp!==false,M=I&&D.test(H),K=I&&!M&&typeof J==="string"&&!(Q.contentType||"").indexOf("application/x-www-form-urlencoded")&&D.test(J);if(Q.dataTypes[0]==="jsonp"||M||K){O=Q.jsonpCallback=i.isFunction(Q.jsonpCallback)?Q.jsonpCallback():Q.jsonpCallback;e=window[O];if(M){Q.url=H.replace(D,"$1"+O)}else{if(K){Q.data=J.replace(D,"$1"+O)}else{if(I){Q.url+=(n.test(H)?"&":"?")+Q.jsonp+"="+O}}}Q.converters["script json"]=function(){if(!N){i.error(O+" was not called")}return N[0]};Q.dataTypes[0]="json";window[O]=function(){N=arguments};P.always(function(){window[O]=e;if(Q[O]){Q.jsonpCallback=L.jsonpCallback;y.push(O)}if(N&&i.isFunction(e)){e(N[0])}N=e=undefined});return"script"}});i.jqx.data.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){i.globalEval(e);return e}}});i.jqx.data.ajaxPrefilter("script",function(e){if(e.cache===undefined){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});i.jqx.data.ajaxTransport("script",function(I){if(I.crossDomain){var e,H=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(J,K){e=document.createElement("script");e.async="async";if(I.scriptCharset){e.charset=I.scriptCharset}e.src=I.url;e.onload=e.onreadystatechange=function(M,L){if(L||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(H&&e.parentNode){H.removeChild(e)}e=undefined;if(!L){K(200,"success")}}};H.insertBefore(e,H.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var w,x=window.ActiveXObject?function(){for(var e in w){w[e](0,1)}}:false,m=0;function g(){try{return new window.XMLHttpRequest()}catch(H){}}function s(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(H){}}i.jqx.data.ajaxSettings.xhr=window.ActiveXObject?function(){return !this.isLocal&&g()||s()}:g;(function(e){i.extend(i.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(i.jqx.data.ajaxSettings.xhr());if(!i.support){i.support={ajax:true}}if(i.support.ajax){i.jqx.data.ajaxTransport(function(e){if(!e.crossDomain||i.support.cors){var H;return{send:function(N,I){var L,K,M=e.xhr();if(e.username){M.open(e.type,e.url,e.async,e.username,e.password)}else{M.open(e.type,e.url,e.async)}if(e.xhrFields){for(K in e.xhrFields){M[K]=e.xhrFields[K]}}if(e.mimeType&&M.overrideMimeType){M.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!N["X-Requested-With"]){N["X-Requested-With"]="XMLHttpRequest"}try{for(K in N){M.setRequestHeader(K,N[K])}}catch(J){}M.send((e.hasContent&&e.data)||null);H=function(W,Q){var R,P,O,U,T;try{if(H&&(Q||M.readyState===4)){H=undefined;if(L){M.onreadystatechange=function(){};if(x){delete w[L]}}if(Q){if(M.readyState!==4){M.abort()}}else{R=M.status;O=M.getAllResponseHeaders();U={};T=M.responseXML;if(T&&T.documentElement){U.xml=T}try{U.text=M.responseText}catch(V){}try{P=M.statusText}catch(V){P=""}if(!R&&e.isLocal&&!e.crossDomain){R=U.text?200:404}else{if(R===1223){R=204}}}}}catch(S){if(!Q){I(-1,S)}}if(U){I(R,P,U,O)}};if(!e.async){H()}else{if(M.readyState===4){setTimeout(H,0)}else{L=++m;if(x){if(!w){w={};i(window).unload(x)}w[L]=H}M.onreadystatechange=H}}},abort:function(){if(H){H(0,1)}}}}})}i.jqx.filter=function(){this.operator="and";var M=0;var J=1;var P=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"];var R=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var S=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var L=["EQUAL","NOT_EQUAL"];var K=new Array();var Q=new Array();this.evaluate=function(X){var V=true;for(var W=0;WK.length){return null}return Q[U]};this.setoperatorat=function(V,U){if(V==undefined||V==null){return null}if(V<0||V>K.length){return null}Q[U]=U};this.getfilterat=function(U){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}return K[U]};this.setfilterat=function(U,V){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}V.key=O();K[U]=V};this.clear=function(){K=new Array();Q=new Array()};var T=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="stringfilter";this.evaluate=function(af){var ae=this.filtervalue;var al=this.comparisonoperator;if(af==null||af==undefined||af==""){if(al=="NULL"){return true}if(al=="NOT_NULL"){return false}if(al=="EQUAL"&&af==ae){return true}if(al=="NOT_EQUAL"&&af!=ae){return true}if(al!="EMPTY"){return false}else{if(af==""){return true}}}var an="";try{an=af.toString()}catch(ag){return true}var am=function(ap,ao){switch(al){case"EQUAL":return i.jqx.string.equalsIgnoreCase(ap,ao);case"EQUAL_CASE_SENSITIVE":return i.jqx.string.equals(ap,ao);case"NOT_EQUAL":return !i.jqx.string.equalsIgnoreCase(ap,ao);case"NOT_EQUAL_CASE_SENSITIVE":return !i.jqx.string.equals(ap,ao);case"CONTAINS":return i.jqx.string.containsIgnoreCase(ap,ao);case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(ap,ao);case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(ap,ao);case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(ap,ao);case"EMPTY":return ap=="";case"NOT_EMPTY":return ap!="";case"NOT_NULL":return ap!=null;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(ap,ao);case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(ap,ao);case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(ap,ao);case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(ap,ao);default:return false}};var Z=new Array();if(ae&&ae.indexO&&al!=="NOT_EQUAL"){if(ae.indexOf("|")>=0||ae.indexOf(" AND ")>=0||ae.indexOf(" OR ")>=0||ae.indexOf(" and ")>=0||ae.indexOf(" or ")>=0){var aa=am(an,ae);if(aa){return aa}var ab=ae.indexOf(" AND ")>=0?ae.split(" AND "):new Array();var Y=ae.indexOf(" OR ")>=0?ae.split(" OR "):new Array();var X=ae.indexOf(" and ")>=0?ae.split(" and "):new Array();var ac=ae.indexOf(" or ")>=0?ae.split(" or "):new Array();var W=ae.indexOf("|")>=0?ae.split("|"):new Array();if(W.length>0){for(var ak=0;ak=0?ae.split(" "):new Array();if(aj.length>0){for(var ak=0;ak0){for(var ak=0;ak=0){Z.push(ab[ak])}}}if(Y.length>0){for(var ak=0;ak=0){Z.push(Y[ak])}}}var ai=undefined;for(var ah=0;ahao;case"GREATER_THAN_OR_EQUAL":return ap>=ao;case"LESS_THAN":return ap=0||af.indexOf(" AND ")>=0||af.indexOf(" OR ")>=0||af.indexOf(" and ")>=0||af.indexOf(" or ")>=0)){var ab=am(an,af);if(ab){return ab}af=af.toString();var ac=af.indexOf(" AND ")>=0?af.split(" AND "):new Array();var Z=af.indexOf(" OR ")>=0?af.split(" OR "):new Array();var Y=af.indexOf(" and ")>=0?af.split(" and "):new Array();var ad=af.indexOf(" or ")>=0?af.split(" or "):new Array();ac=ac.concat(Y);Z=Z.concat(ad);var X=af.indexOf("|")>=0?af.split("|"):new Array();if(X.length>0){for(var ak=0;ak0){for(var ak=0;ak=0){aa.push(ac[ak])}}}if(Z.length>0){for(var ak=0;ak=0){aa.push(Z[ak])}}}var aj=undefined;for(var ai=0;ai=0){var W=ag.toString().split("..");if(W.length==2){ab=an>=W[0]&&an<=W[1]}}else{var ab=am(an,ag)}var ae=ai=0){aa=af.toString().split("..");if(aa.length==2){return an>=aa[0]&&an<=aa[1]}}return am(an,af)}};var H=function(X,V,W,ab){this.filtervalue=X;this.type="datefilter";var Z=this;if(W!=undefined&&ab!=undefined){var Y=i.jqx.dataFormat.parsedate(X,W,ab);if(Y!=null){this.filterdate=Y}else{var U=i.jqx.dataFormat.tryparsedate(X,ab);if(U!=null){this.filterdate=U}}}else{var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}if(!this.filterdate){var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}this.comparisonoperator=V;this.evaluate=function(ao){var an=this.filtervalue;var aw=this.comparisonoperator;if(ao==null||ao==undefined||ao==""){if(aw=="NOT_NULL"){return false}if(aw=="NULL"){return true}else{switch(aw){case"EQUAL":return ao==an;case"NOT_EQUAL":return ao!=an}return false}}else{if(aw=="NULL"){return false}if(aw=="NOT_NULL"){return true}}var ay=new Date();ay.setFullYear(1900,0,1);ay.setHours(12,0,0,0);try{var av=new Date(ao);if(av.toString()=="NaN"||av.toString()=="Invalid Date"){ao=i.jqx.dataFormat.tryparsedate(ao)}else{ao=av}ay=ao;var at=false;if(W!=undefined&&ab!=undefined){if(W.indexOf("t")>=0||W.indexOf("T")>=0||W.indexOf(":")>=0||W.indexOf("f")>=0){at=true;if(an&&an.toString().indexOf(":")==-1){var aj=i.jqx.dataFormat.tryparsedate(an.toString()+":00",ab);if(aj!=null){Z.filterdate=aj}}}}if(W!=undefined){if(W.indexOf("hh")>=0||W.indexOf("t")>=0){at=true}}if(!at){ay.setHours(0);ay.setMinutes(0);ay.setSeconds(0)}}catch(ap){if(ao.toString()!=""){return false}}if(Z.filterdate!=null){an=Z.filterdate}else{if(an&&an.indexOf){if(an.indexOf(":")!=-1||!isNaN(parseInt(an))){var ai=new Date(ay);ai.setHours(12,0,0,0);var ah=an.split(":");for(var au=0;auaz;case"GREATER_THAN_OR_EQUAL":return aA>=az;case"LESS_THAN":return aA=0||an.indexOf(" AND ")>=0||an.indexOf(" OR ")>=0||an.indexOf(" and ")>=0||an.indexOf(" or ")>=0){var aj=ax(ay,an);if(aj){return aj}var ak=an.indexOf(" AND ")>=0?an.split(" AND "):new Array();var af=an.indexOf(" OR ")>=0?an.split(" OR "):new Array();var ae=an.indexOf(" and ")>=0?an.split(" and "):new Array();var al=an.indexOf(" or ")>=0?an.split(" or "):new Array();ak=ak.concat(ae);af=af.concat(al);var ad=an.indexOf("|")>=0?an.split("|"):new Array();if(ad.length>0){for(var au=0;au0){for(var au=0;au=0){ag.push(ak[au])}}}if(af.length>0){for(var au=0;au=0){ag.push(af[au])}}}var ar=undefined;for(var aq=0;aq=0){var ac=ao.toString().split("..");if(ac.length==2){aj=ay>=ac[0]&&ay<=ac[1]}}else{var aj=ax(ay,ao)}var am=aq=0){ag=an.toString().split("..");if(ag.length==2){return ay>=ag[0]&&ay<=ag[1]}}return ax(ay,an)}};var e=function(V,U,W){this.filtervalue=V;this.comparisonoperator=U;this.evaluate=function(Y,X){return W(this.filtervalue,Y,this.comparisonoperator)}}}})(jqxBaseFramework); @@ -20,15 +20,15 @@ (function(b){var a=0;b.jqx.jqxWidget("jqxTouch","",{});b.extend(b.jqx._jqxTouch.prototype,{defineInstance:function(){this.swipeMin=50;this.swipeMax=500;this.swipeDelay=1000;this.tapHoldDelay=750;this.swipeMaxVerticalDisance=100;this.swipeMaxHorizontalDisance=100;this.orientationChangeEnabled=true;this._eventsMap={mousedown:b.jqx.mobile.getTouchEventName("touchstart"),mouseup:b.jqx.mobile.getTouchEventName("touchend"),mousemove:b.jqx.mobile.getTouchEventName("touchmove")};this._swipeLocked=false;this._rotationInterval=200;this._events=["tap","taphold","swipe","swipeleft","swiperight","swipetop","swipebottom","orientationchange"];this._instanceId=-1},createInstance:function(){a+=1;this._instanceId=a;this._isTouchDevice=b.jqx.mobile.isTouchDevice();this._defineRotateHandler()},refresh:function(){this._removeEventListeners();this._addEventListeners()},_defineRotateHandler:function(){var c=this;if(!this._rotateHandler){this._rotateHandler=function(){c._checkOrientation()}}},_getEvent:function(c){if(this._isTouchDevice){c=this._eventsMap[c]}return c+this._getEventNamespace()},_getEventNamespace:function(){return".swipe"+this._instanceId},_removeEventListeners:function(){clearInterval(this._rotateInterval);this.removeHandler(b(document),this._getEvent("mouseup"));this.removeHandler(this.host,this._getEvent("mousedown"));this.removeHandler(this.host,this._getEvent("mousemove"));if(window.removeEventListener){window.removeEventListener("resize",this._rotateHandler);window.removeEventListener("orientationchange",this._rotateHandler)}},_addEventListeners:function(){var c=this;this.addHandler(this.host,this._getEvent("mouseup"),function(d){c._resetSwipe();c._resetTap()});this.addHandler(this.host,this._getEvent("mousedown"),function(d){c._initSwipe(d);c._initTap(d)});this.addHandler(this.host,this._getEvent("mousemove"),function(d){c._maxSwipeVerticalDistance=Math.max(c._maxSwipeVerticalDistance,Math.abs(c._startY-c._getCoordinates(d).y));c._maxSwipeHorizontalDistance=Math.max(c._maxSwipeHorizontalDistance,Math.abs(c._startX-c._getCoordinates(d).x));c._mouseMoved=true;return c._handleSwipeEvents(d)});this._rotationListeners()},_handleSwipeEvents:function(d){var c=true;if(this._mouseDown&&!this._tapHoldFired){c=this._handleVerticalSwipeEvents(d);c=this._handleHorizontalSwipeEvents(d)}this._lastPosition=this._getCoordinates(d);return c},_handleVerticalSwipeEvents:function(f){var d,c;d=this._getCoordinates(f).y;c=d-this._startY;if(this._maxSwipeHorizontalDistance=this.swipeMin&&!this._swipeEvent&&!this._swipeLocked){this._swipeEvent=this._getSwipeEvent(d,c)}if(Math.abs(d)<=this.swipeMax){f.stopImmediatePropagation();return false}return true},_getSwipeEvent:function(e,d){var c;if(e<0){c={eventId:3+d,data:{target:this.host}}}else{c={eventId:4+d,data:{target:this.host}}}return c},_resetSwipe:function(){if(this._swipeEvent&&!this._swipeLocked){this._raiseEvent(2,this._swipeEvent.data);this._raiseEvent(this._swipeEvent.eventId,this._swipeEvent.data)}clearTimeout(this._swipeTimeout);this._mouseDown=false},_resetTap:function(){clearTimeout(this._tapHoldTimeout);if(!this._tapHoldFired&&!this._mouseMoved){this._raiseEvent(0,{target:this.host})}},_initTap:function(d){var c=this;this._mouseMoved=false;this._tapHoldFired=false;this._tapHoldTimeout=setTimeout(function(){if(!c._mouseMoved){c._raiseEvent(1,{target:this.host});c._tapHoldFired=true}},this.tapHoldDelay)},_initSwipe:function(d){var c=this;this._mouseDown=true;this._maxSwipeVerticalDistance=0;this._maxSwipeHorizontalDistance=0;this._startX=this._getCoordinates(d).x;this._startY=this._getCoordinates(d).y;this._swipeLocked=false;this._swipeEvent=null;this._swipeTimeout=setTimeout(function(){c._swipeLocked=true},this.swipeDelay)},_rotationListeners:function(){var c=this;this._previousOrientation=window.orientation;this._previousWidth=screen.width;if(this.orientationChangeEnabled){if(window.addEventListener){window.addEventListener("resize",this._rotateHandler,false);window.addEventListener("orientationchange",this._rotateHandler,false)}this._rotateInterval=setInterval(function(){c._checkOrientation()},this._rotationInterval)}},_checkOrientation:function(){var c="vertical";if(window.orientation!==this._previousOrientation||this._previousWidth!==screen.width){if(window.orientation===90||screen.width>screen.height){c="horizontal"}this._raiseEvent(7,{orientation:c})}this._previousOrientation=window.orientation;this._previousWidth=screen.width},_raiseEvent:function(d,c){var e=b.Event(this._events[d]);e.args=c;return this.host.trigger(e)},_getCoordinates:function(d){var f=b.jqx.position(d);f.x=f.left;f.y=f.top;return f},propertyChangedHandler:function(c,d,f,e){if(d==="orientationChangeEnabled"){this.refresh()}else{return}},isTouchDevice:function(){return this._isTouchDevice}})}(jqxBaseFramework)); -(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(B,A,x,z,y,v,w){this.hierarchy=y;this.exportFormat=v;this.filename=w;B.beginFile(w);n(B);k(B);B.endFile(w);return B.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(x){x.beginBody();if(this.hierarchy){var w=function(z){for(var y=0;yz.level&&x.index-10){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="https://jqwidgets.com/export_server/dataexport.php"}else{v="http://jquerygrid.net/export_server/dataexport.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(K,H,G,B){K=K.toString().toLowerCase();var D=c[K];if(typeof D==="undefined"){throw"You can't export to "+K+" format."}if(K==="pdf"&&B==undefined){var M=this.exportTo(K,H,K,"pdf");if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var L=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);L.cellInitialize();var J=b(M).find("th");var I=b(M).find("tr");var N=0;L.setFontSize(13*72/96);var F=595;switch(b.jqx.pdfExport.paperSize){case"legal":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=1008}break;case"letter":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=792}break;case"a3":var F=841;if(b.jqx.pdfExport.orientation!=="portrait"){F=1190}break;case"a4":var F=595;if(b.jqx.pdfExport.orientation!=="portrait"){F=842}break;case"a5":var F=420;if(b.jqx.pdfExport.orientation!=="portrait"){F=595}break}F-=20;var E=0;var C=[];b.each(J,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=25}var Q=P*72/96;C[O]=Q;E+=Q});if(E>F){b.each(C,function(O){C[O]=(C[O]/E)*100;C[O]=C[O]*F/100})}b.each(J,function(P){var T=C[P];var S=25*72/96;var R=L.getTextDimensions(b(this).html());var Q=b(this).html();if(R.w+3>T){var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U.length>3){Q=U.substring(0,U.length-3)+"..."}else{Q=U.substring(0,1)+"..."}var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U!=Q){Q=U}}L.cell(10,10,T,S,Q,N)});N++;b.each(I,function(V){if(V===0){return true}var P=b(this).children();var Q=P.length>J.length;if(Q){var Y=P.length-J.length;var Z="";var X=C[0];var U=25*72/96;for(var R=0;R<=Y;R++){var O=P[R].innerHTML;if(O==="+"||O==="-"){O=O+" "}if(O===" "){O=" "}Z+=O}var T=L.getTextDimensions(Z);if(T.w+3>X){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N);for(var R=Y+1;RX){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N)}N++;return true}b.each(P,function(ab){var af=C[ab];var ae=25*72/96;var ad=b(this).html();var ac=L.getTextDimensions(b(this).html());if(ac.w+3>af){var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag.length>3){ad=ag.substring(0,ag.length-3)+"..."}else{ad=ag.substring(0,1)+"..."}var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag!=ad){ad=ag}}L.cell(10,10,af,ae,ad,N)});N++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}return L}return d(D,u,q,j,H,G,B)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);if(F=="utf-8"||F=="UTF-8"){M.setFont("courier","normal")}M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;TZ){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();if(af===" "){af=" "}var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}M.save(B+".pdf");return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if((d&&d.toString()=="NaN")||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o'}else{g='\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t'}};this.beginHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t"}else{g+="\n\t\t\t\t"}}else{if(m.width){g+='\n\t\t\t\t"}else{g+='\n\t\t\t\t"}}}};this.endHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.beginBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}j=0};this.beginRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t"}else{g+="\n\t\t\t\t\t"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}}};this.endRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}};this.endBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.endFile=function(k){if(i||k==undefined){g+="\n
    '+m.text+"'+m.text+"'+m.text+"'+m.text+"'+m.text+"
    '+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"
    "}else{g+="\n\t\t\n\t\n\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='\n\t \n\t \n\t \n\t12.00 \n\t \n\t \n\t8130 \n\t15135 \n\t120 \n\t45 \n\tFalse \n\tFalse \n\t \n\t'};this.beginHeader=function(){l='\n\t\n\t\t';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q";return}l+="\n\t\t\t"};this.beginRows=function(p){l+="\n\t\t\t\t"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}l+="\n\t\t\t"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}};this.endBody=function(){l+="\n\t\t
    "};this.endFile=function(){l+="\n\t
    \n
    ";h+="\n\t"};this.getFile=function(){return h+l};function g(t,w,s,v){var r="String";var u=this.getFormat(w);if(t!=null&&t.toString().substring(0,3)=="_AG"){t=t.toString().substring(3);r="String"}else{if(u.type=="date"){var q=t;t=this.formatData(t,u.type,u.formatString,u.localization);if(t===null||t===""){t="";r="String"}else{t=q.toISOString();r="DateTime"}}if(u.type=="string"){if(t===null||t===undefined){t=""}else{if(t.toString().indexOf("&")>=0){t=t.toString().replace(/&/g,"&")}if(t.toString().indexOf(">")>=0){t=t.toString().replace(/>/g,">")}if(t.toString().indexOf("<")>=0){t=t.toString().replace(/=0){t=t.toString().replace(/"/g,""")}if(t.toString().indexOf("'")>=0){t=t.toString().replace(/'/g,"'")}}}if(s.dataType=="number"||s.dataType=="float"||s.dataType=="int"||s.dataType=="integer"){r="Number";t=parseFloat(t);if(t===null||isNaN(t)||t===""){t="";r="String"}if(t&&r!="String"&&t!=""){if(w&&w.formatString&&w.formatString.indexOf("p")>=0){t=t/100}}s.currencysymbol=w.localization.currencysymbol}}var p=f(s);if(s.merge){l+='\n\t\t\t\t'+t+""}else{l+='\n\t\t\t\t'+t+""}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='';e+="\n"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.appendBodyCell=function(j,n,g,m,h,l){var k=this.getFormat(n);j=this.formatData(j,k.type,k.formatString,k.localization);if(k.type=="string"){if(j.toString().indexOf("&")>=0){j=j.toString().replace(/&/g,"&")}if(j.toString().indexOf(">")>=0){j=j.toString().replace(/>/g,">")}if(j.toString().indexOf("<")>=0){j=j.toString().replace(/=0){j=j.toString().replace(/"/g,""")}if(j.toString().indexOf("'")>=0){j=j.toString().replace(/'/g,"'")}}if(m.level!=undefined){if(this.hierarchy){e+="\n\t\t";for(var f=0;f"+j+""}else{e+="<"+l+">"+j+""}}else{if(l!=undefined){e+="\n\t\t<"+l+">"+j+""}else{e+="\n\t\t<"+c[d]+">"+j+""}}}else{e+="\n\t\t<"+c[d]+">"+j+""}d++};this.endRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.endBody=function(){};this.endFile=function(){e+="\n
    "};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k>");ab("endobj");aA=f[aB].join("\n");w();if(av){k=[];for(ax=0;ax>8)&255,(ay>>16)&255,(ay>>24)&255])];aA="";for(ax in k){if(k.hasOwnProperty(ax)){aA+=String.fromCharCode.apply(null,k[ax])}}ab("<>")}else{ab("<>")}K(aA);ab("endobj")}D[1]=F;ab("1 0 obj");ab("<>");ab("endobj")},X=function(i){i.objectNumber=w();ab("<>");ab("endobj")},J=function(){var i;for(i in ai){if(ai.hasOwnProperty(i)){X(ai[i])}}},L=function(){G.publish("putXobjectDict")},x=function(){ab("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");ab("/Font <<");var i;for(i in ai){if(ai.hasOwnProperty(i)){ab("/"+i+" "+ai[i].objectNumber+" 0 R")}}ab(">>");ab("/XObject <<");L();ab(">>")},h=function(){J();G.publish("putResources");D[2]=F;ab("2 0 obj");ab("<<");x();ab(">>");ab("endobj");G.publish("postPutResources")},m=function(aw,k,ax){var i;if(Q[k]===i){Q[k]={}}Q[k][ax]=aw},au={},u=function(i,ax,az,aw){var ay="F"+(c(ai)+1).toString(10),k=ai[ay]={id:ay,PostScriptName:i,fontName:ax,fontStyle:az,encoding:aw,metadata:{}};m(ay,ax,az);G.publish("addFont",k);return ay},e=function(){var k="helvetica",aG="times",aI="courier",aF="normal",aE="bold",aD="italic",aH="bolditalic",ax="StandardEncoding",aA=[["Helvetica",k,aF],["Helvetica-Bold",k,aE],["Helvetica-Oblique",k,aD],["Helvetica-BoldOblique",k,aH],["Courier",aI,aF],["Courier-Bold",aI,aE],["Courier-Oblique",aI,aD],["Courier-BoldOblique",aI,aH],["Times-Roman",aG,aF],["Times-Bold",aG,aE],["Times-Italic",aG,aD],["Times-BoldItalic",aG,aH]],aC,ay,aB,az;for(aC=0,ay=aA.length;aC>8){aF=true}}aG=aw.join("")}}aC=aG.length;while(aF===az&&aC!==0){if(aG.charCodeAt(aC-1)>>8){aF=true}aC--}if(!aF){return aG}else{aw=ax.noBOM?[]:[254,255];for(aC=0,aA=aG.length;aC>8;if(aB>>8){throw new Error("Character at position "+aC.toString(10)+" of string '"+aG+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}aw.push(aB);aw.push(k-(aB<<8))}return String.fromCharCode.apply(az,aw)}},Z=function(k,i){return s(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Y=function(){ab("/Producer (pdfDataExport "+ao+")");if(O.title){ab("/Title ("+Z(O.title)+")")}if(O.subject){ab("/Subject ("+Z(O.subject)+")")}if(O.author){ab("/Author ("+Z(O.author)+")")}if(O.keywords){ab("/Keywords ("+Z(O.keywords)+")")}if(O.creator){ab("/Creator ("+Z(O.creator)+")")}var i=new Date();ab("/CreationDate (D:"+[i.getFullYear(),A(i.getMonth()+1),A(i.getDate()),A(i.getHours()),A(i.getMinutes()),A(i.getSeconds())].join("")+")")},W=function(){ab("/Type /Catalog");ab("/Pages 1 0 R");ab("/OpenAction [3 0 R /FitH null]");ab("/PageLayout /OneColumn");G.publish("putCatalog")},l=function(){ab("/Size "+(n+1));ab("/Root "+n+" 0 R");ab("/Info "+(n-1)+" 0 R")},ar=function(){g++;v=true;f[g]=[]},ah=function(){ar();ab(p(z*ak)+" w");ab(H);if(R!==0){ab(R.toString(10)+" J")}if(T!==0){ab(T.toString(10)+" j")}G.publish("addPage",{pageNumber:g})},y=function(aw,ay){var i,k;if(aw===k){aw=ai[d].fontName}if(ay===k){ay=ai[d].fontStyle}try{i=Q[aw][ay]}catch(ax){i=k}if(!i){throw new Error("Unable to look up font label for font '"+aw+"', '"+ay+"'. Refer to getFontList() for available fonts.")}return i},q=function(){v=false;t=[];D=[];ab("%PDF-"+U);aa();h();w();ab("<<");Y();ab(">>");ab("endobj");w();ab("<<");W();ab(">>");ab("endobj");var aw=F,k;ab("xref");ab("0 "+(n+1));ab("0000000000 65535 f ");for(k=1;k<=n;k++){ab(r(D[k])+" 00000 n ")}ab("trailer");ab("<<");l();ab(">>");ab("startxref");ab(aw);ab("%%EOF");v=true;return t.join("\n")},ac=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},I=function(az,aw){var ay,aB,aA,aC,ax,k;switch(az){case ay:return q();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return P.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return P.output("dataurlnewwindow")}}}aB=q();aA=aB.length;aC=new Uint8Array(new ArrayBuffer(aA));for(ax=0;axB){af=C;C=B;B=af}}else{if(E==="l"||E==="landscape"){E="l";if(B>C){af=C;C=B;B=af}}else{throw ("Invalid orientation: "+E)}}P.internal={pdfEscape:Z,getStyle:ac,getFont:function(){return ai[y.apply(P,arguments)]},getFontSize:function(){return aj},btoa:btoa,write:function(i,ax,aw,k){ab(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return p(i*ak)},getVerticalCoordinateString:function(i){return p((B-i)*ak)},collections:{},newObject:w,putStream:K,events:G,scaleFactor:ak,pageSize:{width:C,height:B},output:function(k,i){return I(k,i)}};P.addPage=function(){ah();return this};var ag=["","0","00","000","0000"];var j=function(aA,aw){var ax=["FEFF"];for(var az=0,k=aA.length,ay;az Tj\nT* <")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n<"+aB+"> Tj\nET");return this};P.text=function(aF,aE,aC,aw){var ax,aA,az,aD,k,aB,ay;if(typeof aF==="number"){aA=aC;az=aF;aD=aE;aF=aA;aE=az;aC=aD}if(typeof aF==="string"&&aF.match(/[\n\r]/)){aF=aF.split(/\r\n|\r|\n/g)}if(typeof aw==="undefined"){aw={noBOM:true,autoencode:true}}else{if(aw.noBOM===ax){aw.noBOM=true}if(aw.autoencode===ax){aw.autoencode=true}}if(typeof aF==="string"){aB=Z(aF,aw)}else{if(aF instanceof Array){k=aF.concat();for(ay=k.length-1;ay!==-1;ay--){k[ay]=Z(k[ay],aw)}aB=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n("+aB+") Tj\nET");return this};P.line=function(k,ax,i,aw){ab(p(k*ak)+" "+p((B-ax)*ak)+" m "+p(i*ak)+" "+p((B-aw)*ak)+" l S");return this};P.lines=function(k,aF,aE,aO,aK){var ay,aM,aC,aD,aB,aA,aI,aG,aN,aL,az,aJ,ax,aH,aw;if(typeof k==="number"){aM=aE;aC=k;aD=aF;k=aM;aF=aC;aE=aD}aK=ac(aK);aO=aO===ay?[1,1]:aO;ab(o(aF*ak)+" "+o((B-aE)*ak)+" m ");aB=aO[0];aA=aO[1];aG=k.length;aH=aF;aw=aE;for(aI=0;aI=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(s*2))/s))}}else{if(e&&k().ln!==u&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}}}var B=k(),r=this.getTextDimensions(p),t=1;if(B.x!==undefined&&B.ln===u){z=B.x+B.w}if(B.y!==undefined&&B.y===v){v=B.y}if(B.h!==undefined&&B.h===s){s=B.h}if(B.ln!==undefined&&B.ln===u){u=B.ln;t=0}if(e){v=s*(g()+t)}else{v=(v+(s*Math.abs(l()*f-u-l())))}this.rect(z,v,A,s);var q=/[а-яА-ЯЁё]/.test(p);if(q){this.text16(p,z+3,v+s-3)}else{this.text(p,z+3,v+s-3)}n(g()+t);d(z,v,A,s,u);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;qp){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;Ej){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;ok){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r")[0],g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;if(h.addEventListener){h.addEventListener("unload",i,false)}return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":if(console){console.log(b+": Data URIs are not supported on IE6-9.")}break;case"save":c=d;break}}})(pdfDataExport.API); +(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(C,B,x,A,y,v,w){var z=this;if(!z){z=window.jqx}z.hierarchy=y;z.exportFormat=v;z.filename=w;C.beginFile(w);n(C);k(C);C.endFile(w);return C.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(y){var x=this;if(!x){x=window.jqx}y.beginBody();if(x.hierarchy){var w=function(A){for(var z=0;zA.level&&w.index-10){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="https://jqwidgets.com/export_server/dataexport.php"}else{v="http://jquerygrid.net/export_server/dataexport.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(K,H,G,B){K=K.toString().toLowerCase();var D=c[K];if(typeof D==="undefined"){throw"You can't export to "+K+" format."}if(K==="pdf"&&B==undefined){var M=this.exportTo(K,H,K,"pdf");if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var L=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);L.cellInitialize();var J=b(M).find("th");var I=b(M).find("tr");var N=0;L.setFontSize(13*72/96);var F=595;switch(b.jqx.pdfExport.paperSize){case"legal":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=1008}break;case"letter":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=792}break;case"a3":var F=841;if(b.jqx.pdfExport.orientation!=="portrait"){F=1190}break;case"a4":var F=595;if(b.jqx.pdfExport.orientation!=="portrait"){F=842}break;case"a5":var F=420;if(b.jqx.pdfExport.orientation!=="portrait"){F=595}break}F-=20;var E=0;var C=[];b.each(J,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=25}var Q=P*72/96;C[O]=Q;E+=Q});if(J.length===0){b.each(I[0].cells,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=F/I[0].cells.length}var Q=P*72/96;C[O]=Q;E+=Q})}if(E>F){b.each(C,function(O){C[O]=(C[O]/E)*100;C[O]=C[O]*F/100})}b.each(J,function(P){var T=C[P];var S=25*72/96;var R=L.getTextDimensions(b(this).html());var Q=b(this).html();if(R.w+3>T){var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U.length>3){Q=U.substring(0,U.length-3)+"..."}else{Q=U.substring(0,1)+"..."}var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U!=Q){Q=U}}L.cell(10,10,T,S,Q,N)});N++;b.each(I,function(V){if(V===0){return true}var P=b(this).children();var Q=P.length>J.length&&J.length>0;if(Q){var Y=P.length-J.length;var Z="";var X=C[0];var U=25*72/96;for(var R=0;R<=Y;R++){var O=P[R].innerHTML;if(O==="+"||O==="-"){O=O+" "}if(O===" "){O=" "}Z+=O}var T=L.getTextDimensions(Z);if(T.w+3>X){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N);for(var R=Y+1;RX){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N)}N++;return true}b.each(P,function(ab){var af=C[ab];var ae=25*72/96;var ad=b(this).html();var ac=L.getTextDimensions(b(this).html());if(ac.w+3>af){var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag.length>3){ad=ag.substring(0,ag.length-3)+"..."}else{ad=ag.substring(0,1)+"..."}var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag!=ad){ad=ag}}L.cell(10,10,af,ae,ad,N)});N++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}return L}return d(D,u,q,j,H,G,B)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);if(F=="utf-8"||F=="UTF-8"){M.setFont("courier","normal")}M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(K.length===0){b.each(J[0].cells,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=G/J[0].cells.length}var S=R*72/96;C[Q]=S;E+=S})}if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length&&K.length>0;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;TZ){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();if(af===" "){af=" "}var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}M.save(B+".pdf");return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if((d&&d.toString()=="NaN")||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o'}else{g='\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t'}};this.beginHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t"}else{g+="\n\t\t\t\t"}}else{if(m.width){g+='\n\t\t\t\t"}else{g+='\n\t\t\t\t"}}}};this.endHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.beginBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}j=0};this.beginRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t"}else{g+="\n\t\t\t\t\t"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}}};this.endRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}};this.endBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.endFile=function(k){if(i||k==undefined){g+="\n
    '+m.text+"'+m.text+"'+m.text+"'+m.text+"'+m.text+"
    '+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"
    "}else{g+="\n\t\t\n\t\n\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='\n\t \n\t \n\t \n\t12.00 \n\t \n\t \n\t8130 \n\t15135 \n\t120 \n\t45 \n\tFalse \n\tFalse \n\t \n\t'};this.beginHeader=function(){l='\n\t\n\t\t';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q";return}l+="\n\t\t\t"};this.beginRows=function(p){l+="\n\t\t\t\t"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}l+="\n\t\t\t"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}};this.endBody=function(){l+="\n\t\t
    "};this.endFile=function(){l+="\n\t
    \n
    ";h+="\n\t"};this.getFile=function(){return h+l};function g(t,w,s,v){var r="String";var u=this.getFormat(w);if(t!=null&&t.toString().substring(0,3)=="_AG"){t=t.toString().substring(3);r="String"}else{if(u.type=="date"){var q=t;t=this.formatData(t,u.type,u.formatString,u.localization);if(t===null||t===""){t="";r="String"}else{t=q.toISOString();r="DateTime"}}if(u.type=="string"){if(t===null||t===undefined){t=""}else{if(t.toString().indexOf("&")>=0){t=t.toString().replace(/&/g,"&")}if(t.toString().indexOf(">")>=0){t=t.toString().replace(/>/g,">")}if(t.toString().indexOf("<")>=0){t=t.toString().replace(/=0){t=t.toString().replace(/"/g,""")}if(t.toString().indexOf("'")>=0){t=t.toString().replace(/'/g,"'")}}}if(s.dataType=="number"||s.dataType=="float"||s.dataType=="int"||s.dataType=="integer"){r="Number";t=parseFloat(t);if(t===null||isNaN(t)||t===""){t="";r="String"}if(t&&r!="String"&&t!=""){if(w&&w.formatString&&w.formatString.indexOf("p")>=0){t=t/100}}s.currencysymbol=w.localization.currencysymbol}}var p=f(s);if(s.merge){l+='\n\t\t\t\t'+t+""}else{l+='\n\t\t\t\t'+t+""}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='';e+="\n"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(h){var g=this;if(!g){g=window.jqx}if(h!=undefined){if(g.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.appendBodyCell=function(h,n,f,o,j,m){var k=this;if(!k){k=window.jqx}var l=this.getFormat(n);h=this.formatData(h,l.type,l.formatString,l.localization);if(l.type=="string"){if(h.toString().indexOf("&")>=0){h=h.toString().replace(/&/g,"&")}if(h.toString().indexOf(">")>=0){h=h.toString().replace(/>/g,">")}if(h.toString().indexOf("<")>=0){h=h.toString().replace(/=0){h=h.toString().replace(/"/g,""")}if(h.toString().indexOf("'")>=0){h=h.toString().replace(/'/g,"'")}}if(o.level!=undefined){if(k.hierarchy){e+="\n\t\t";for(var g=0;g"+h+""}else{e+="<"+m+">"+h+""}}else{if(m!=undefined){e+="\n\t\t<"+m+">"+h+""}else{e+="\n\t\t<"+c[d]+">"+h+""}}}else{e+="\n\t\t<"+c[d]+">"+h+""}d++};this.endRow=function(h){var g=this;if(!g){g=window.jqx}if(h!=undefined){if(g.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.endBody=function(){};this.endFile=function(){e+="\n
    "};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k>");ab("endobj");aA=f[aB].join("\n");w();if(av){k=[];for(ax=0;ax>8)&255,(ay>>16)&255,(ay>>24)&255])];aA="";for(ax in k){if(k.hasOwnProperty(ax)){aA+=String.fromCharCode.apply(null,k[ax])}}ab("<>")}else{ab("<>")}K(aA);ab("endobj")}D[1]=F;ab("1 0 obj");ab("<>");ab("endobj")},X=function(i){i.objectNumber=w();ab("<>");ab("endobj")},J=function(){var i;for(i in ai){if(ai.hasOwnProperty(i)){X(ai[i])}}},L=function(){G.publish("putXobjectDict")},x=function(){ab("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");ab("/Font <<");var i;for(i in ai){if(ai.hasOwnProperty(i)){ab("/"+i+" "+ai[i].objectNumber+" 0 R")}}ab(">>");ab("/XObject <<");L();ab(">>")},h=function(){J();G.publish("putResources");D[2]=F;ab("2 0 obj");ab("<<");x();ab(">>");ab("endobj");G.publish("postPutResources")},m=function(aw,k,ax){var i;if(Q[k]===i){Q[k]={}}Q[k][ax]=aw},au={},u=function(i,ax,az,aw){var ay="F"+(c(ai)+1).toString(10),k=ai[ay]={id:ay,PostScriptName:i,fontName:ax,fontStyle:az,encoding:aw,metadata:{}};m(ay,ax,az);G.publish("addFont",k);return ay},e=function(){var k="helvetica",aG="times",aI="courier",aF="normal",aE="bold",aD="italic",aH="bolditalic",ax="StandardEncoding",aA=[["Helvetica",k,aF],["Helvetica-Bold",k,aE],["Helvetica-Oblique",k,aD],["Helvetica-BoldOblique",k,aH],["Courier",aI,aF],["Courier-Bold",aI,aE],["Courier-Oblique",aI,aD],["Courier-BoldOblique",aI,aH],["Times-Roman",aG,aF],["Times-Bold",aG,aE],["Times-Italic",aG,aD],["Times-BoldItalic",aG,aH]],aC,ay,aB,az;for(aC=0,ay=aA.length;aC>8){aF=true}}aG=aw.join("")}}aC=aG.length;while(aF===az&&aC!==0){if(aG.charCodeAt(aC-1)>>8){aF=true}aC--}if(!aF){return aG}else{aw=ax.noBOM?[]:[254,255];for(aC=0,aA=aG.length;aC>8;if(aB>>8){throw new Error("Character at position "+aC.toString(10)+" of string '"+aG+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}aw.push(aB);aw.push(k-(aB<<8))}return String.fromCharCode.apply(az,aw)}},Z=function(k,i){return s(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Y=function(){ab("/Producer (pdfDataExport "+ao+")");if(O.title){ab("/Title ("+Z(O.title)+")")}if(O.subject){ab("/Subject ("+Z(O.subject)+")")}if(O.author){ab("/Author ("+Z(O.author)+")")}if(O.keywords){ab("/Keywords ("+Z(O.keywords)+")")}if(O.creator){ab("/Creator ("+Z(O.creator)+")")}var i=new Date();ab("/CreationDate (D:"+[i.getFullYear(),A(i.getMonth()+1),A(i.getDate()),A(i.getHours()),A(i.getMinutes()),A(i.getSeconds())].join("")+")")},W=function(){ab("/Type /Catalog");ab("/Pages 1 0 R");ab("/OpenAction [3 0 R /FitH null]");ab("/PageLayout /OneColumn");G.publish("putCatalog")},l=function(){ab("/Size "+(n+1));ab("/Root "+n+" 0 R");ab("/Info "+(n-1)+" 0 R")},ar=function(){g++;v=true;f[g]=[]},ah=function(){ar();ab(p(z*ak)+" w");ab(H);if(R!==0){ab(R.toString(10)+" J")}if(T!==0){ab(T.toString(10)+" j")}G.publish("addPage",{pageNumber:g})},y=function(aw,ay){var i,k;if(aw===k){aw=ai[d].fontName}if(ay===k){ay=ai[d].fontStyle}try{i=Q[aw][ay]}catch(ax){i=k}if(!i){throw new Error("Unable to look up font label for font '"+aw+"', '"+ay+"'. Refer to getFontList() for available fonts.")}return i},q=function(){v=false;t=[];D=[];ab("%PDF-"+U);aa();h();w();ab("<<");Y();ab(">>");ab("endobj");w();ab("<<");W();ab(">>");ab("endobj");var aw=F,k;ab("xref");ab("0 "+(n+1));ab("0000000000 65535 f ");for(k=1;k<=n;k++){ab(r(D[k])+" 00000 n ")}ab("trailer");ab("<<");l();ab(">>");ab("startxref");ab(aw);ab("%%EOF");v=true;return t.join("\n")},ac=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},I=function(az,aw){var ay,aB,aA,aC,ax,k;switch(az){case ay:return q();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return P.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return P.output("dataurlnewwindow")}}}aB=q();aA=aB.length;aC=new Uint8Array(new ArrayBuffer(aA));for(ax=0;axB){af=C;C=B;B=af}}else{if(E==="l"||E==="landscape"){E="l";if(B>C){af=C;C=B;B=af}}else{throw ("Invalid orientation: "+E)}}P.internal={pdfEscape:Z,getStyle:ac,getFont:function(){return ai[y.apply(P,arguments)]},getFontSize:function(){return aj},btoa:btoa,write:function(i,ax,aw,k){ab(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return p(i*ak)},getVerticalCoordinateString:function(i){return p((B-i)*ak)},collections:{},newObject:w,putStream:K,events:G,scaleFactor:ak,pageSize:{width:C,height:B},output:function(k,i){return I(k,i)}};P.addPage=function(){ah();return this};var ag=["","0","00","000","0000"];var j=function(aA,aw){var ax=["FEFF"];for(var az=0,k=aA.length,ay;az Tj\nT* <")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n<"+aB+"> Tj\nET");return this};P.text=function(aF,aE,aC,aw){var ax,aA,az,aD,k,aB,ay;if(typeof aF==="number"){aA=aC;az=aF;aD=aE;aF=aA;aE=az;aC=aD}if(typeof aF==="string"&&aF.match(/[\n\r]/)){aF=aF.split(/\r\n|\r|\n/g)}if(typeof aw==="undefined"){aw={noBOM:true,autoencode:true}}else{if(aw.noBOM===ax){aw.noBOM=true}if(aw.autoencode===ax){aw.autoencode=true}}if(typeof aF==="string"){aB=Z(aF,aw)}else{if(aF instanceof Array){k=aF.concat();for(ay=k.length-1;ay!==-1;ay--){k[ay]=Z(k[ay],aw)}aB=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n("+aB+") Tj\nET");return this};P.line=function(k,ax,i,aw){ab(p(k*ak)+" "+p((B-ax)*ak)+" m "+p(i*ak)+" "+p((B-aw)*ak)+" l S");return this};P.lines=function(k,aF,aE,aO,aK){var ay,aM,aC,aD,aB,aA,aI,aG,aN,aL,az,aJ,ax,aH,aw;if(typeof k==="number"){aM=aE;aC=k;aD=aF;k=aM;aF=aC;aE=aD}aK=ac(aK);aO=aO===ay?[1,1]:aO;ab(o(aF*ak)+" "+o((B-aE)*ak)+" m ");aB=aO[0];aA=aO[1];aG=k.length;aH=aF;aw=aE;for(aI=0;aI=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(s*2))/s))}}else{if(e&&k().ln!==u&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}}}var B=k(),r=this.getTextDimensions(p),t=1;if(B.x!==undefined&&B.ln===u){z=B.x+B.w}if(B.y!==undefined&&B.y===v){v=B.y}if(B.h!==undefined&&B.h===s){s=B.h}if(B.ln!==undefined&&B.ln===u){u=B.ln;t=0}if(e){v=s*(g()+t)}else{v=(v+(s*Math.abs(l()*f-u-l())))}this.rect(z,v,A,s);var q=/[а-яА-ЯЁё]/.test(p);if(q){this.text16(p,z+3,v+s-3)}else{this.text(p,z+3,v+s-3)}n(g()+t);d(z,v,A,s,u);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;qp){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;Ej){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;ok){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r")[0],g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;if(h.addEventListener){h.addEventListener("unload",i,false)}return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":if(console){console.log(b+": Data URIs are not supported on IE6-9.")}break;case"save":c=d;break}}})(pdfDataExport.API); (function($){$.jqx.jqxWidget("jqxBarGauge","",{});$.extend($.jqx._jqxBarGauge.prototype,{defineInstance:function(){var settings={animationDuration:300,backgroundColor:"#e0e0e0",barSpacing:4,baseValue:null,colorScheme:"scheme01",customColorScheme:null,endAngle:-45,disabled:false,formatFunction:null,geometry:{startAngle:225,endAngle:-45},height:400,labels:null,min:0,max:100,rendered:null,relativeInnerRadius:0.3,startAngle:225,title:null,tooltip:null,values:[],width:400,useGradient:true,_intervalArray:[],_drawnValues:[],_drawnSlices:[],_titleTemplate:{text:"",font:{color:"#232323",family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",opacity:1,size:28,weight:100},horizontalAlignment:"center",verticalAlignment:"top",placeholderSize:null,margin:{bottom:0,left:0,right:0,top:0},subtitle:{text:"",font:{color:"#232323",family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",opacity:1,size:16,weight:100}}},_labelTemplate:{connectorColor:null,connectorWidth:1,formatFunction:function(value){return value},font:{color:null,family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",size:16,weight:400},indent:20,precision:2,visible:true},_tooltipTemplate:{classname:"",formatFunction:function(value){return value},visible:false,precision:0},_colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"],_colorNames:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",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",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",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",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_dimensions:{},_ie:$.jqx.browser.msie,_oldIEbrowser:($.jqx.browser.msie&&$.jqx.browser.version<=8),_ie8:($.jqx.browser.msie&&$.jqx.browser.version==8),_ie7:($.jqx.browser.msie&&$.jqx.browser.version<8),_centerX:null,_centerY:null,_coordinatePlane:null,_geometry:{startAngle:-45,baseAngle:-45,fix:0,endAngle:225},_userValues:[],_valuesToDegrees:[],_oldValues:[],_oldValuesToDegrees:[],_temporaryValuesToDegrees:[],_temporaryValues:[],_temporaryOldAngle:[],_valuesLength:0,_oldValuesLength:0,_alignmentIE:null,_title:{},_backgroundColor:"#e0e0e0",_label:{},_tooltip:{},_renderedValues:0,_barWidth:35,_barStartAt:30,_barGaugeSlices:[],_barGaugeBackgroundSlices:[],_barGaugeSlicesStrokeWidth:0,_barGaugeLabelLines:[],_barGaugeLabelText:[],_barGaugeTitle:null,_barGaugeSubTitle:null,_barGaugeTooltip:$("
    "),_measuredText:$("
    "),_measuredTextId:"",renderer:null,_barGaugeRadius:null,_barGaugeFigureRadius:null,_labelPositioningRadius:null,_placeholderSize:50,_rendering:false,_titleLines:0,_subTitleLines:0,_initialized:false,_events:["initialized","valueChanged","tooltipOpen","tooltipClose","drawStart","drawEnd"]};if(this===$.jqx._jqxBarGauge.prototype){return settings}$.extend(true,this,settings);return settings},createInstance:function(){var that=this;that._createBarGauge()},_createBarGauge:function(){var that=this;that._getLiquidDimensions();that._addIEPolyfills();that._barGaugeTooltip.css({display:"none"});$(that.host).empty();that._attachCustomColors();that.geometry.startAngle=that.startAngle;that.geometry.endAngle=that.endAngle;that._validateGeometry();that._validateTitle();that._validateLabel();that._validateValues();that._validateTooltip();that._validateAnimationDuration();that._transformValuesToAngles();that._getColorScheme();if((that.animationDuration===0)||(that._ie8)||(that._ie7)){that._drawStaticBarGauge()}else{that._drawDynamicBarGauge()}that._raiseEvent("4");that._createTooltip();that._addCSS();if(that._ie){that._removeBarGaugeTitle();that._removeBarGaugeSubTitle();that._drawBarGaugeTitle()}that._addEventHandlers()},_initRenderer:function(host){if(!$.jqx.createRenderer){throw"jqxBarGauge: Please include a reference to jqxdraw.js"}return $.jqx.createRenderer(this,host)},_validateValues:function(){var that=this;var valuesLength,maxBarSpacing;if(that._userValues.length===0){that._userValues=that.values.slice()}if(that._oldValues.length===0){that._oldValues=that.values.slice()}that._valuesLength=that.values.length;for(var i=0;ithat.max){that.values[i]=that.max}}that._drawnValues[i]=false;that._drawnSlices[i]=false}if((that.baseValue<=that.startValue)||(that.baseValue===null)){that.baseValue=that.min}else{if(that.baseValue>that.max){that.baseValue=that.max}}if(that.relativeInnerRadius>=1){that.relativeInnerRadius=0.99}else{if(that.relativeInnerRadius<0){that.relativeInnerRadius=0}}that._calculateBarGaugeRadius();valuesLength=that._valuesLength||1;maxBarSpacing=that._barGaugeRadius*(1-that.relativeInnerRadius)/valuesLength-0.01;if(that.barSpacing>maxBarSpacing){that.barSpacing=maxBarSpacing}that._backgroundColor=that._validateColor(that.backgroundColor,that._backgroundColor)},_attachCustomColors:function(){var that=this;var colorSchemesLength=that._colorSchemes.length;var colorSchemeInSchemes=false;if((that.customColorScheme!==null)&&(that.customColorScheme.colors!==null)&&(that.customColorScheme.name!==null)){for(var i=0;ilongestValueLength){longestValue=that.values[i];longestValueLength=longestValue.toString().length}}longestValue=that._calculatePrecision(that._label.precision,longestValue);if((that._label.formatFunction!==undefined)&&(that._label.formatFunction!==null)&&(typeof that._label.formatFunction==="function")){longestValue=that._label.formatFunction(longestValue)}longestValue=longestValue.toUpperCase();return longestValue},_validateGeometry:function(){var that=this;var startAngle=parseFloat(that.geometry.startAngle);var endAngle=parseFloat(that.geometry.endAngle);if(Math.abs(startAngle)>=360){startAngle=startAngle%360}if(startAngle<0){startAngle=360+startAngle}if(Math.abs(endAngle)>=360){endAngle=endAngle%360}if(endAngle<0){endAngle=360+endAngle}that.geometry.startAngle=startAngle;that.geometry.endAngle=endAngle},_validateColor:function(color,defaultColor){var that=this;var validatedColor;if((color===undefined)||(color===null)){validatedColor=defaultColor}else{if(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(color)){validatedColor=color}else{if(/(^[0-9A-F]{6}$)|(^[0-9A-F]{3}$)/i.test(color)){validatedColor="#"+color}else{if(typeof that._colorNames[color.toLowerCase()]!=="undefined"){validatedColor=that._colorNames[color.toLowerCase()]}else{validatedColor="transparent"}}}}return validatedColor},_validateTooltip:function(){var that=this;if((that.tooltip===undefined)||(that.tooltip===null)||(typeof that.tooltip!=="object")){that._tooltip=that._tooltipTemplate}else{that._tooltip.visible=(that.tooltip.visible===false)?false:(that.tooltip.visible||that._tooltipTemplate.visible);that._tooltip.classname=that.tooltip.classname||that._tooltipTemplate.classname;if(typeof that.tooltip.formatFunction==="function"){that._tooltip.formatFunction=that.tooltip.formatFunction}else{that._tooltip.formatFunction=that._tooltipTemplate.formatFunction}if(that.tooltip.precision===null||that.tooltip.precision===undefined){that._tooltip.precision=that._tooltipTemplate.precision}else{if(parseInt(that.tooltip.precision,10)<=0){that._tooltip.precision=0}else{that._tooltip.precision=parseInt(that.tooltip.precision,10)}}}},_validateTitle:function(){var that=this;that._title=that._titleTemplate;that._measuredTextId=that.element.id+"measuredText";if(typeof that.title==="string"){that._title.text=that.title}else{if(typeof that.title==="number"){that._title.text=String(that.title)}else{if((typeof that.title==="object")&&(that.title!==undefined)&&(that.title!==null)){that._title.text=that.title.text||that._titleTemplate.text;that._title.horizontalAlignment=that.title.horizontalAlignment||that._titleTemplate.horizontalAlignment;that._title.verticalAlignment=that.title.verticalAlignment||that._titleTemplate.verticalAlignment}}}if((that.title===undefined)||(that.title===null)||(that.title.font===undefined)||(that.title.font===null)){that._title.font=that._titleTemplate.font}else{that._title.font.family=that.title.font.family||that._titleTemplate.font.family;that._title.font.opacity=that.title.font.opacity||that._titleTemplate.font.opacity;that._title.font.size=that.title.font.size||that._titleTemplate.font.size;that._title.font.weight=that.title.font.weight||that._titleTemplate.font.weight;if((that._ie7||that._ie8)&&(that._title.font.weight>100)){that._title.font.weight="bold"}that._title.font.color=that._validateColor(that.title.font.color,that._titleTemplate.font.color)}if((that.title===undefined)||(that.title===null)||(that.title.margin===undefined)||(that.title.margin===null)){that._title.margin=that._titleTemplate.margin}else{if(typeof that.title.margin!=="object"){var margin=parseInt(that.title.margin,10);that._title.margin.top=margin;that._title.margin.right=margin;that._title.margin.bottom=margin;that._title.margin.left=margin}else{that._title.margin.top=that.title.margin.top===0?0:(that.title.margin.top||that._titleTemplate.margin.top);that._title.margin.right=that.title.margin.right===0?0:(that.title.margin.right||that._titleTemplate.margin.right);that._title.margin.bottom=that.title.margin.bottom===0?0:(that.title.margin.bottom||that._titleTemplate.margin.bottom);that._title.margin.left=that.title.margin.left===0?0:(that.title.margin.left||that._titleTemplate.margin.left)}}if((that.title===undefined)||(that.title===null)||(that.title.subtitle===undefined)||(that.title.subtitle===null)){that._title.subtitle.text=that._titleTemplate.subtitle.text;that._title.subtitle.font=that._titleTemplate.subtitle.font}else{if(typeof that.title.subtitle!=="object"){that._title.subtitle.text=String(that.title.subtitle);that._title.subtitle.font=that._titleTemplate.subtitle.font}else{if((typeof that.title.subtitle.font==="undefined")||(that.title.subtitle.font===null)){that._title.subtitle.text=String(that.title.subtitle.text);that._title.subtitle.font=that._titleTemplate.subtitle.font}else{that._title.subtitle.text=String(that.title.subtitle.text);that._title.subtitle.font.color=that.title.subtitle.font.color||that._titleTemplate.subtitle.font.color;that._title.subtitle.font.family=that.title.subtitle.font.family||that._titleTemplate.subtitle.font.family;that._title.subtitle.font.opacity=that.title.subtitle.font.opacity||that._titleTemplate.subtitle.font.opacity;that._title.subtitle.font.size=that.title.subtitle.font.size||that._titleTemplate.subtitle.font.size;that._title.subtitle.font.weight=that.title.subtitle.font.weight||that._titleTemplate.subtitle.font.weight;if((that._ie7||that._ie8)&&(that._title.subtitle.font.weight>100)){that._title.subtitle.font.weight="bold"}}}}var calculatedPlaceholderSize;if(that._title.text===""){calculatedPlaceholderSize=0}else{if((that._title.subtitle.text==="")||(that._title.subtitle.text===undefined)||(that._title.subtitle.text===null)){that._titleLines=that._title.text.match(/
    /g)!==null?(that._title.text.match(/
    /g).length+1):1;calculatedPlaceholderSize=that._title.font.size*that._titleLines+that._title.margin.top+that._title.margin.bottom}else{that._titleLines=that._title.text.match(/
    /g)!==null?(that._title.text.match(/
    /g).length+1):1;that._subTitleLines=that._title.subtitle.text.match(/
    /g)!==null?(that._title.text.match(/
    /g).length+1):1;calculatedPlaceholderSize=that._title.font.size*that._titleLines+that._title.subtitle.font.size*that._subTitleLines+that._title.margin.top+that._title.margin.bottom}}if((that.title===undefined)||(that.title===null)||(that.title.placeholderSize===null)||(that.title.placeholderSize===undefined)){that._title.placeholderSize=calculatedPlaceholderSize||that.height*0.05}else{that._title.placeholderSize=that.title.placeholderSize}},_validateLabel:function(){var that=this;if((that.labels===null)||(that.labels===undefined)||(typeof that.labels!=="object")){that._label=that._labelTemplate}else{that._label.connectorColor=that._validateColor(that.labels.connectorColor,that._labelTemplate.connectorColor);that._label.connectorWidth=that.labels.connectorWidth||that._labelTemplate.connectorWidth;that._label.formatFunction=that.labels.formatFunction||that._labelTemplate.formatFunction;if((that.labels.precision===undefined)||(that.labels.precision===null)||(typeof that.labels.precision!=="number")){that._label.precision=that._labelTemplate.precision}else{that._label.precision=that.labels.precision}if(that._label.precision>15){that._label.precision=15}else{if(that._label.precision<0){that._label.precision=0}}if((that.labels.visible===undefined)||(that.labels.visible===null)){that._label.visible=that._labelTemplate.visible}else{if(that.labels.visible===false){that._label.visible=false}else{that._label.visible=true}}if(((typeof that.labels.indent!=="number")&&(typeof that.labels.indent!=="string"))||(that.labels.indent<=0)){that._label.indent=0}else{if(((typeof that.labels.indent!=="number")&&(typeof that.labels.indent!=="string"))||(that.labels.indent<=0)){that._label.indent=0}else{that._label.indent=that.labels.indent}}if((that.labels.font===null)||(that.labels.font===undefined)||(typeof that.labels.font!=="object")){that._label.font=that._labelTemplate.font}else{that._label.font={};that._label.font.color=that._validateColor(that.labels.font.color,that._labelTemplate.font.color);that._label.font.family=that.labels.font.family||that._labelTemplate.font.family;that._label.font.size=that.labels.font.size||that._labelTemplate.font.size;that._label.font.weight=that.labels.font.weight||that._labelTemplate.font.weight;if((that._ie7||that._ie8)&&(that._label.font.weight>100)){that._label.font.weight="bold"}}}},_validateAnimationDuration:function(){var that=this;var animationDurationToInt=parseInt(that.animationDuration,10);var animationDuration=animationDurationToInt>0?animationDurationToInt:0;if(that._oldIEbrowser){that.animationDuration=0}else{that.animationDuration=animationDuration}},_transformValuesToAngles:function(){var that=this;var barGaugeAngle,longestValue,textSize,barGaugeFigureRadius;that._placeholderSize=that._title.placeholderSize||that._placeholderSize;if(that.geometry.endAngle360){that._geometry.startAngle=that._geometry.startAngle+(barGaugeAngle-360)}if((that.baseValue!==undefined)&&(that.baseValue!==null)&&(that.baseValue>=that.min)&&(that.baseValue<=that.max)){that._geometry.baseAngle=((that.baseValue-that.min)*(that._geometry.endAngle-that._geometry.startAngle)/(that.max-that.min))+that._geometry.startAngle;that._geometry.fix=that.geometry.startAngle+that.geometry.endAngle-180}longestValue=that._getLongestValue();textSize=that._measureText(longestValue,that._label.font.size,that._label.font.family,that._label.font.weight);barGaugeFigureRadius=that._barGaugeRadius-that._label.indent*1.2-textSize.height*1.2;if((barGaugeFigureRadius+textSize.width+that._label.indent*1.2)>that.width/2){barGaugeFigureRadius=that._barGaugeRadius-that._label.indent*1.2-textSize.width}if(that._label.visible===false){barGaugeFigureRadius=that._barGaugeRadius}barGaugeFigureRadius=barGaugeFigureRadius*0.98;if(barGaugeFigureRadius<0){barGaugeFigureRadius=0}that._barGaugeFigureRadius=barGaugeFigureRadius;that._barWidth=barGaugeFigureRadius*(1-that.relativeInnerRadius)/that._valuesLength-that.barSpacing;that._barStartAt=barGaugeFigureRadius*that.relativeInnerRadius;that._labelPositioningRadius=that._barStartAt+that._valuesLength*(that._barWidth+that.barSpacing)-that.barSpacing+that._label.indent;for(var i=0;ithat.width/2){barGaugeFigureRadius=that._barGaugeRadius-that._label.indent*1.2-textSize.width}if(that._label.visible===false){barGaugeFigureRadius=that._barGaugeRadius}barGaugeFigureRadius=barGaugeFigureRadius*0.98;if(barGaugeFigureRadius<0){barGaugeFigureRadius=0}that._barWidth=barGaugeFigureRadius*(1-that.relativeInnerRadius)/that._valuesLength-that.barSpacing;that._barStartAt=barGaugeFigureRadius*that.relativeInnerRadius;that._labelPositioningRadius=that._barStartAt+that._valuesLength*(that._barWidth+that.barSpacing)-that.barSpacing+that._label.indent},_drawEmptyBarGauge:function(){var that=this;var emptyBarGaugeRadius,backgroundSliceId;var gaugeLayerStart=that._barStartAt;var gaugeLayerEnd=gaugeLayerStart+that._barWidth;if(that._title.text===""){emptyBarGaugeRadius=that._barGaugeRadius}else{emptyBarGaugeRadius=that._barGaugeFigureRadius}gaugeLayerStart=that.relativeInnerRadius*emptyBarGaugeRadius;gaugeLayerEnd=emptyBarGaugeRadius;that._barGaugeBackgroundSlices[0]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,that._geometry.startAngle,that._geometry.endAngle,0,{fill:that._backgroundColor,stroke:that._backgroundColor,"stroke-width":that._barGaugeSlicesStrokeWidth});backgroundSliceId=that.element.id+"BackgroundSlice0";that.renderer.attr(that._barGaugeBackgroundSlices[0],{id:backgroundSliceId});that.renderer.attr(that._barGaugeBackgroundSlices[0],{"class":"jqx-bar-gauge-background-slice"});that._rendered();that._oldValuesLength=0;that._oldValues.length=0},_drawBarGaugeLayout:function(){var that=this;var backgroundSliceId;var gaugeLayerStart=that._barStartAt;var gaugeLayerEnd=gaugeLayerStart+that._barWidth;that._barGaugeSlicesStrokeWidth=0;that._centerX=that.width/2;if(that._title.text===""){that._centerY=that.height/2}else{if(that._title.verticalAlignment==="top"){that._centerY=(that.height+that._title.placeholderSize)/2}else{that._centerY=(that.height-that._title.placeholderSize)/2}}if(that._valuesLength>0){for(var i=0;ithat._geometry.baseAngle){that._barGaugeSlices[i]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,(180-that._geometry.baseAngle+that._geometry.fix),change,0,{fill:drawColor,stroke:drawColor,"stroke-width":that._barGaugeSlicesStrokeWidth})}else{that._barGaugeSlices[i]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,change,(180-that._geometry.baseAngle+that._geometry.fix),0,{fill:drawColor,stroke:drawColor,"stroke-width":that._barGaugeSlicesStrokeWidth})}sliceId=that.element.id+"Slice"+i;that.renderer.attr(that._barGaugeSlices[i],{id:sliceId});that.renderer.attr(that._barGaugeSlices[i],{"class":"jqx-bar-gauge-slice"});that._drawnSlices[i]=true;if(that._label.visible===true){that._drawLabelsLine(gaugeLayerStart,change,i);that._drawLabelsText(change,i)}that._rendered()}else{if(that.useGradient){var stops=[[0,1.4],[100,1]];drawColor=that.renderer._toLinearGradient(drawColor,true,stops)}that._barGaugeSlices[i]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,change+0.01,change,0,{fill:drawColor,stroke:drawColor,"stroke-width":that._barGaugeSlicesStrokeWidth});sliceId=that.element.id+"Slice"+i;that.renderer.attr(that._barGaugeSlices[i],{id:sliceId});that.renderer.attr(that._barGaugeSlices[i],{"class":"jqx-bar-gauge-slice"});that._drawnSlices[i]=true}that.renderer.attr(that._barGaugeSlices[i],{id:that.element.id+"Slice"+i});that.renderer.attr(that._barGaugeSlices[i],{"class":"jqx-bar-gauge-slice"});gaugeLayerStart=gaugeLayerEnd+that.barSpacing;gaugeLayerEnd=gaugeLayerStart+that._barWidth}that._oldValues=baseValues;that._temporaryValues=baseValues.slice(0);that._oldValuesToDegrees.length=0;for(var i=0;i=that.baseValue){if(that.values[i]>that._oldValues[i]){condition="(oldAngle < newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,1,condition,i,true);rendering=true}else{if(that.values[i] newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,-1,condition,i,false);rendering=true}}}else{if(that.values[i]>that._oldValues[i]){condition="(oldAngle < newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,1,condition,i,true);rendering=true}else{if(that.values[i] newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,-1,condition,i,false);rendering=true}}}gaugeLayerStart=gaugeLayerEnd+that.barSpacing;gaugeLayerEnd=gaugeLayerStart+that._barWidth}}if(!rendering){that._rendered()}},clearIntervals:function(){var that=this;var intervalsArrayLength=that._intervalArray.length;for(var i=0;inewAngle){newCondition=true}var updateLabels=function(){that._removeLabels(valueIndex);var degrees=[];for(var m=0;m=270){koefY=-(270-angle)/180}else{if(angle<=90){koefY=(90+angle)/180}else{koefY=(270-angle)/180}}if(angle<=180){koefX=angle/180}else{koefX=(360-angle)/180}offset.y=koefY*fontSize;offset.x=koefX*textWidth;return offset},_drawCoordinatePlane:function(){var that=this;var startY,endY;if(that._title.verticalAlignment==="top"){startY=that._title.placeholderSize;endY=that.height}else{startY=0;endY=that.height-that._title.placeholderSize}if(that._coordinatePlane!==null){$("#"+that.element.id+" .jqx-bar-gauge-coordinate-plane").remove()}that._coordinatePlane={};that._coordinatePlane.x=that.renderer.line(0,that._centerY,that.width,that._centerY,{fill:"gray",stroke:"gray","stroke-width":1,"stroke-opacity":0.1});that._coordinatePlane.y=that.renderer.line(that._centerX,startY,that._centerX,endY,{fill:"gray",stroke:"gray","stroke-width":1,"stroke-opacity":0.1});that.renderer.attr(that._coordinatePlane.x,{"class":"jqx-bar-gauge-coordinate-plane"});that.renderer.attr(that._coordinatePlane.y,{"class":"jqx-bar-gauge-coordinate-plane"})},_getColorScheme:function(){var that=this;var newColorSchemeIndex,i;var colorSchemesLength=that._colorSchemes.length;var totalColors=that.values.length||1;var colorSchemesCombinations=Math.floor(totalColors/that._colorSchemes[0].colors.length);var colorSchemeIndex=0;for(i=0;i0){for(i=0;i360){angle=angle%360}}angleInRad=(360-angle)*Math.PI/180;radiusXY2=radiusXY1+that._barWidth+(that._valuesLength-valueIndex-1)*(that._barWidth+that.barSpacing)+that._label.indent;x1=that._centerX+radiusXY1*Math.cos(angleInRad);y1=that._centerY+radiusXY1*Math.sin(angleInRad);x2=that._centerX+radiusXY2*Math.cos(angleInRad);y2=that._centerY+radiusXY2*Math.sin(angleInRad);color=that._label.connectorColor||that._colors[valueIndex];if(that.formatFunction){color=that.formatFunction(that.values[valueIndex],valueIndex,color)}if(that._ie7||that._ie8){x1=parseInt(x1,10);y1=parseInt(y1,10);x2=parseInt(x2,10);y2=parseInt(y2,10)}if(that._label.visible===true&&that.disabled===false){that._barGaugeLabelLines[valueIndex]=that.renderer.line(x1,y1,x2,y2,{fill:color,stroke:color,"stroke-width":that._label.connectorWidth})}labelLineId=that.element.id+"LabelLine"+valueIndex;that.renderer.attr(that._barGaugeLabelLines[valueIndex],{id:labelLineId});that.renderer.attr(that._barGaugeLabelLines[valueIndex],{"class":"jqx-bar-gauge-label-line"})},_drawLabelsText:function(angle,valueIndex,text){var that=this;var textSize,angleInRadians,xText,yText,offset,labelId;var color=that._label.font.color||that._colors[valueIndex];if(that.formatFunction){color=that.formatFunction(that.values[valueIndex],valueIndex,color)}var value=that._calculatePrecision(that._label.precision,that.values[valueIndex]);if(text!==undefined){value=new Number(text).toFixed(that._label.precision);value=that._calculatePrecision(that._label.precision,value)}if((that._label.formatFunction!==undefined)&&(that._label.formatFunction!==null)&&(typeof that._label.formatFunction==="function")){value=that._label.formatFunction(value,valueIndex)}if(!that._cachedMeasurements){that._cachedMeasurements=[]}if(!that._cachedMeasurements[value.length]){textSize=that._measureText(value,that._label.font.size,that._label.font.family,that._label.font.weight);that._cachedMeasurements[value.length]=textSize}else{textSize=that._cachedMeasurements[value.length]}if(angle<0){angle=360+angle}else{if(angle>360){angle=angle%360}}angleInRadians=(360-angle)*Math.PI/180;xText=that._centerX+(that._labelPositioningRadius+textSize.height*0.3)*Math.cos(angleInRadians);yText=that._centerY+(that._labelPositioningRadius+textSize.height*0.3)*Math.sin(angleInRadians);offset=that._calculateLabelOffset(angle,textSize.height,textSize.width);if(that._label.visible===true&&that.disabled===false){that._barGaugeLabelText[valueIndex]=that.renderer.text(value,xText-offset.x,(yText-offset.y),undefined,undefined,0,{"class":"jqx-bargauge-label",fill:color,"font-size":that._label.font.size+"px","font-family":that._label.font.family,"font-weight":that._label.font.weight},false,"left","top","lefttop")}labelId=that.element.id+"Label"+valueIndex;that.renderer.attr(that._barGaugeLabelText[valueIndex],{id:labelId});that.renderer.attr(that._barGaugeLabelText[valueIndex],{"class":"jqx-bar-gauge-label-text"});if((that._ie7)||(that._ie8)){$("#"+labelId+" .jqx-bargauge-label").css({color:color,"white-space":"nowrap","font-size":that._label.font.size+"px","font-family":that._label.font.family,"font-weight":that._label.font.weight})}},_calculatePrecision:function(precisionBase,value){var precision;precision=precisionBase+Math.abs(value).toString().split(".")[0].length;precision=(precision>15)?15:precision;value=parseFloat(value).toPrecision(precision);return value},_createTooltip:function(){var that=this;var tooltipId=that.element.id+"tooltip";that._barGaugeTooltip.attr("id",tooltipId);$(that._barGaugeTooltip).addClass(that.toThemeProperty("jqx-bar-gauge-tooltip"));if(that._tooltip.classname.length>0){$(that._barGaugeTooltip).addClass(that.toThemeProperty(that._tooltip.classname))}$(document.body).append(that._barGaugeTooltip);if((that._tooltip.visible===true)&&(that.disabled===false)&&(that._valuesLength>0)){that._addTooltipHandlers()}},_refreshTooltipHandlers:function(){var that=this;if(that._tooltip.visible===true&&that.disabled===false){that._removeTooltipHandlers();that._addTooltipHandlers()}},_addTooltipHandlers:function(){var that=this;var id,tooltipText;that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseenter",function(){if((that._tooltip.visible===true)&&(that._valuesLength>0)){id=that.renderer.getAttr(this,"id").substr(that.element.id.length+5);tooltipText=that._calculatePrecision(that._tooltip.precision,that.values[id]);that._barGaugeTooltip.css({display:"block",color:that._colors[id],"border-color":that._colors[id]});if((that._tooltip.formatFunction!==undefined)&&(that._tooltip.formatFunction!==null)&&(typeof that._tooltip.formatFunction==="function")){tooltipText=that._tooltip.formatFunction(tooltipText,parseInt(id))}that._barGaugeTooltip.html(tooltipText);that._raiseEvent("2",{layer:id})}});that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseleave",function(){that._barGaugeTooltip.css({display:"none"});that._raiseEvent("3",{layer:id})});that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseup",function(){that._barGaugeTooltip.css({display:"none"})});if($("#"+that.element.id+" .jqx-bar-gauge-slice").length>0){that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mousemove",function(){if((that._tooltip.visible===true)&&(that._valuesLength>0)){id=that.renderer.getAttr(this,"id").substr(that.element.id.length+5);tooltipText=that._calculatePrecision(that._tooltip.precision,that.values[id]);that._barGaugeTooltip.css({display:"block",color:that._colors[id],"border-color":that._colors[id]});if((that._tooltip.formatFunction!==undefined)&&(that._tooltip.formatFunction!==null)&&(typeof that._tooltip.formatFunction==="function")){tooltipText=that._tooltip.formatFunction(tooltipText,parseInt(id))}that._barGaugeTooltip.html(tooltipText)}})}that.addHandler($(that.host),"mousemove",function(event){that._barGaugeTooltip.css({top:(event.pageY-10)+"px",left:(event.pageX+15)+"px"})})},_removeTooltipHandlers:function(){var that=this;if(that._barGaugeSlices.length>0){that.removeHandler($(that._barGaugeSlices),"mouseenter");that.removeHandler($(that._barGaugeSlices),"mouseleave");that.removeHandler($(that._barGaugeSlices),"mouseup");that.removeHandler($(that._barGaugeSlices),"mousemove");that.removeHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseenter mouseleave mouseup mousemove")}that.removeHandler($(that.host),"mousemove")},_drawBarGaugeTitle:function(){var that=this;that._alignmentIE=that._alignmentIE||that._title.horizontalAlignment;var drawn=0;var coefY=0;var titleParts,subTitleParts,titleTextSize,subTitleTextSize,subTitleText,titleText,subTitleId,titleId,i;if(that._ie7||that._ie8){that._title.horizontalAlignment="left"}if(that._titleLines>1){titleParts=that._title.text.split("
    ");for(i=0;ithat.width){titleText=titleText.slice(0,-1);titleParts[i]=titleText+"...";titleTextSize=that._measureText(titleParts[i]+"_",that._title.font.size,that._title.font.family,that._title.font.weight)}}that._title.text=titleParts.join("
    ")}else{titleTextSize=that._measureText(that._title.text+"_",that._title.font.size,that._title.font.family,that._title.font.weight);titleText=that._title.text;while(titleTextSize.width>that.width){titleText=titleText.slice(0,-1);that._title.text=titleText+"...";titleTextSize=that._measureText(that._title.text+"_",that._title.font.size,that._title.font.family,that._title.font.weight)}}if(that._title.verticalAlignment==="bottom"){coefY=that.height-that._title.placeholderSize}if((that.title!==null)&&(that.title!==undefined)&&(that._title.text!=="")){that._barGaugeTitle=that.renderer.text(that._title.text,that._title.margin.left,(coefY+that._title.margin.top),(that.width-that._title.margin.right),0,undefined,{fill:that._title.font.color,"fill-opacity":that._title.font.opacity,"font-size":that._title.font.size,"font-family":that._title.font.family,"font-weight":that._title.font.weight},false,that._title.horizontalAlignment,that._title.verticalAlignment,"centertop");titleId=that.element.id+"Title";that.renderer.attr(that._barGaugeTitle,{id:titleId});that.renderer.attr(that._barGaugeTitle,{"class":"jqx-bar-gauge-title"});if((that._ie7)||(that._ie8)){$("#"+titleId+" textbox").css({width:that.width+"px !important","padding-left":"10px",position:"relative"});var titleLeftMargin=0;if(titleTextSize.width1){subTitleParts=that._title.subtitle.text.split("
    ");for(i=0;ithat.width){subTitleText=subTitleText.slice(0,-1);subTitleParts[i]=subTitleText+"...";subTitleTextSize=that._measureText(subTitleParts[i]+"_",that._title.subtitle.font.size,that._title.subtitle.font.family,that._title.subtitle.font.weight)}}that._title.subtitle.text=subTitleParts.join("
    ")}else{subTitleTextSize=that._measureText(that._title.subtitle.text+"_",that._title.subtitle.font.size,that._title.subtitle.font.family,that._title.subtitle.font.weight);subTitleText=that._title.subtitle.text;while(subTitleTextSize.width>that.width){subTitleText=subTitleText.slice(0,-1);that._title.subtitle.text=subTitleText+"...";subTitleTextSize=that._measureText(that._title.subtitle.text+"_",that._title.subtitle.font.size,that._title.subtitle.font.family,that._title.subtitle.font.weight)}}that._barGaugeSubTitle=that.renderer.text(that._title.subtitle.text,that._title.margin.left,(coefY+that._title.font.size*that._titleLines+that._title.margin.top),that.width-that._title.margin.right,0,undefined,{fill:that._title.subtitle.font.color,"fill-opacity":that._title.subtitle.font.opacity,"font-size":that._title.subtitle.font.size,"font-family":that._title.subtitle.font.family,"font-weight":that._title.subtitle.font.weight,"margin-top":that._title.margin.top},false,that._title.horizontalAlignment,that._title.verticalAlignment,"centertop");subTitleId=that.element.id+"SubTitle";that.renderer.attr(that._barGaugeSubTitle,{id:subTitleId});that.renderer.attr(that._barGaugeSubTitle,{"class":"jqx-bar-gauge-subtitle"});if((that._ie7)||(that._ie8)){var subTitleLeftMargin=0;if(subTitleTextSize.width(that.height-that._title.placeholderSize)){that._barGaugeRadius=(that.height-that._title.placeholderSize)/2}else{that._barGaugeRadius=that.width/2}},_addCSS:function(){var that=this;$(that.host).addClass(that.toThemeProperty("jqx-widget"));$(that.host).addClass(that.toThemeProperty("jqx-bar-gauge"));$(that.host).addClass(that.toThemeProperty("jqx-widget-content"));if(that.disabled){$(that.host).addClass(that.toThemeProperty("jqx-fill-state-disabled"))}},_rendered:function(){var that=this;if((that._rendering===true)){if((that.rendered!==null)&&(typeof that.rendered==="function")){that.rendered()}that._rendering=false;that.clearIntervals();that._temporaryOldAngle.length=0;that._temporaryValuesToDegrees.length=0;that._temporaryValues.length=0;that._raiseEvent("0");that._raiseEvent("5")}},_render:function(){var that=this;that._removeAllGraphicElements();if(that.values.length>0){if((that.animationDuration===0)||(that._ie8)||(that._ie7)){that._drawStaticBarGauge()}else{that._drawDynamicBarGauge()}}else{that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);that._validateValues();that._transformValuesToAngles();that._drawStaticBarGauge()}},render:function(){var that=this;that.clearIntervals();that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);that._validateValues();that._transformValuesToAngles();that._getColorScheme();if(that._rendering!==true){that._render()}else{that._staticRefresh();that._render()}},refresh:function(initialRefresh){var that=this;if(initialRefresh!==true){that.render()}},_removeAllGraphicElements:function(){var that=this;that._removeLabels();that._removeBarGaugeSlices();that._removeBarGaugeTitle();that._removeBarGaugeSubTitle()},_drawStaticBarGauge:function(){var that=this;that._rendering=true;that._drawBarGaugeTitle();that._drawBarGaugeLayout();if(!that.disabled){that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);that._validateValues();that._measureRadius();that._drawStaticBarGaugeElementsWithBase();that._rendered()}else{that._rendered()}},_drawDynamicBarGauge:function(){var that=this;that._drawBarGaugeTitle();that._drawBarGaugeLayout();if(!that.disabled){that._drawBarGaugeElementsWithBase()}else{that._rendered()}},val:function(newValues){var that=this;if((newValues!==null)&&(newValues!==undefined)&&(typeof newValues==="object")&&(Object.keys(newValues).length>0)){that._raiseEvent("4","api");if(newValues.length!=that.values.length){that.values=newValues;that.render()}else{that._redrawWithNewValuesArray(newValues,that.values)}}else{if((newValues!==null)&&(newValues!==undefined)&&(typeof newValues==="object")&&(newValues.length===0)){that._raiseEvent("4");that._removeLabels();that._removeBarGaugeSlices();that._transformValuesToAngles();that._drawEmptyBarGauge();that._removeLabels();that.values.length=0;that._refreshTooltipHandlers()}}return that.values},_redrawWithNewValuesArray:function(newValues,oldValues){var that=this;var val,i;if(that._rendering===false){that._userValues=newValues.slice();if(!!oldValues){that._oldValues=oldValues.slice()}else{that._oldValues=that.values.slice()}that._oldValuesToDegrees=that._valuesToDegrees.slice();that._oldValuesLength=that._valuesLength;if(Object.keys(newValues).length>1){that.values=newValues.slice()}else{if((newValues[0]===null)||(newValues[0]===undefined)){that.values=[]}else{that.values=[];that.values[0]=parseFloat(newValues)}}that._lastChange=new Date()}else{if(that._rendering===true){that._userValues=newValues.slice();that._oldValues.length=0;that._oldValuesToDegrees.length=0;for(i=0;i1){that.values=newValues.slice()}else{if((newValues[0]===null)||(newValues[0]===undefined)){that.values=[]}else{that.values=[];that.values[0]=parseFloat(newValues)}}}else{if((newValues===null)||(newValues===undefined)){that.values=[]}else{if((typeof newValues==="string")||(typeof newValues==="number")){that.values=[];that.values[0]=parseFloat(newValues)}else{return that.values}}}}that._valuesLength=that.values.length;that._getColorScheme();if(that._valuesLength>that._oldValuesLength){for(var v=that._oldValuesLength;vthat.max){that.values[i]=that.max}}var res=that.values[i];if(res==0){res=0.03}val=((res-that.min)/(that.max-that.min))*(that._geometry.endAngle-that._geometry.startAngle)+that._geometry.startAngle;that._valuesToDegrees[i]=val%360}that._renderElements();that._refreshTooltipHandlers();that._raiseEvent("1")},_staticRefresh:function(){var that=this;var animationDuration=that.animationDuration;if(typeof that.width==="string"&&that.width.indexOf("%")!==-1){that._dimensions.width=that.width}if(typeof that.height==="string"&&that.height.indexOf("%")!==-1){that._dimensions.height=that.height}that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);$("#"+that.element.id+" .chartContainer").width(that.width);$("#"+that.element.id+" .chartContainer").height(that.height);that._removeBarGaugeTitle();that._removeBarGaugeSubTitle();that._validateGeometry();that._validateTitle();that._validateLabel();that._validateValues();that._validateTooltip();that._measureRadius();that.animationDuration=0;that._render();that.animationDuration=animationDuration},propertyChangedHandler:function(object,key,oldvalue,value){var that=object;var animationDuration,i;that._cachedMeasurements=[];if(object.isInitialized===undefined||object.isInitialized===null||object.isInitialized===false){return}if(!that.ie7&&object.batchUpdate&&object.batchUpdate.width&&object.batchUpdate.height&&Object.keys(object.batchUpdate).length===2){return}if((value!==oldvalue)||(key==="colorScheme"||key==="tooltip")){animationDuration=that.animationDuration;that._titleTemplate=that._title;that._labelTemplate=that._label;that._tooltipTemplate=that._tooltip;switch(key){case"width":case"height":that._staticRefresh();break;case"values":that.values=oldvalue;that.val(value);break;case"animationDuration":break;case"disabled":if(that.disabled){$(that.host).addClass(that.toThemeProperty("jqx-fill-state-disabled"))}else{$(that.host).removeClass(that.toThemeProperty("jqx-fill-state-disabled"))}that._render();break;case"geometry":case"min":case"baseValue":case"max":case"barSpacing":case"startAngle":case"endAngle":case"relativeInnerRadius":that.geometry.startAngle=that.startAngle;that.geometry.endAngle=that.endAngle;that.values=that._userValues.slice();that._validateValues();that._transformValuesToAngles();that._render();break;case"tooltip":that._validateTooltip();break;case"rendered":break;case"backgroundColor":that._backgroundColor=that._validateColor(that.backgroundColor,that._backgroundColor);if(that._ie7||that._ie8){for(i=0;i=0){isPercentage=true}if(that._dimensions.height&&that._dimensions.height.toString().indexOf("%")>=0){isPercentage=true}if(isPercentage){that._staticRefresh()}})},_removeEventHandlers:function(){var that=this;that.removeHandler($(that.host),"drawStart");that.removeHandler($(that.host),"drawEnd");that.removeHandler($(window),"resize.jqxBarGauge"+that.host[0].id)},_refreshEventHandlers:function(){var that=this;that._removeEventHandlers();that._addEventHandlers()},_raiseEvent:function(eventId,data){var that=this;var event=$.Event(that._events[eventId]);event.args=data;return that.host.trigger(event)},_getEvent:function(event){var that=this;if(that._isTouchDevice){return that._touchEvents[event]}else{return event}}})})(jqxBaseFramework); (function(a){a.jqx.jqxWidget("jqxBulletChart","",{});a.extend(a.jqx._jqxBulletChart.prototype,{defineInstance:function(){var b={width:500,height:100,barSize:"50%",ranges:[{startValue:0,endValue:50,color:"#000000",opacity:0.7},{startValue:50,endValue:80,color:"#000000",opacity:0.5},{startValue:80,endValue:100,color:"#000000",opacity:0.3}],pointer:{value:65,label:"Value",size:"25%",color:""},target:{value:85,label:"Target",size:4,color:""},ticks:{position:"far",interval:20,size:10},title:"Title",description:"Description",orientation:"horizontal",labelsFormat:null,labelsFormatFunction:null,animationDuration:400,showTooltip:true,tooltipFormatFunction:null,disabled:false,rtl:false,events:["change"]};if(this===a.jqx._jqxBulletChart.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){if(!a.jqx.dataAdapter){throw new Error("jqxBulletChart: Missing reference to the following module: 'jqxdata.js'.")}this._setDefaultValues();this.render();var c=this;a.jqx.utilities.resize(this.host,function(){if(c._timer){clearTimeout(c._timer)}c._timer=setTimeout(function(){var d=c.animationDuration;c.animationDuration=0;c.render();setTimeout(function(){c.animationDuration=d},0)},10)},false,true)},render:function(){if(this.host.children().length>0){this._removeHandlers();if(this.showTooltip==true){this.host.jqxTooltip("destroy")}this.host.empty()}this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-bulletchart"));this.host.width(this.width);this.host.height(this.height);var n=this.host.width();var d=this.host.height();var l;var j=this.rtl?"rtl":"ltr";if(this.orientation=="horizontal"){l=a("
    "+this.title+"
    "+this.description+"
    ")}else{if(this.orientation=="vertical"){l=a("
    "+this.title+"
    "+this.description+"
    ")}}this.host.append(l);var k=l.outerWidth();var g=l.outerHeight();l.remove();var e,h,i,b,o,m,f,c;if(this.orientation=="horizontal"){e="jqx-bulletchart-title-container-horizontal";h="jqx-bulletchart-chart-container-horizontal";i=this._checkPercentage(this.barSize,this.host);b=k;o=this.barSize;m=0;f=n-b;c=o;if(this.width&&this.width.toString().indexOf("%")>=0){var f=parseFloat(parseFloat(f*100)/n).toString()+"%";var b=parseFloat(parseFloat(b*100)/n).toString()+"%";this._percentageWidth=true}}else{if(this.orientation=="vertical"){e="jqx-bulletchart-title-container-vertical";h="jqx-bulletchart-chart-container-vertical";i=0;b="100%";o=g;m=this._checkPercentage(this.barSize,this.host);f=this.barSize;c=d-o}}if(this.rtl==false||(this.rtl==true&&this.orientation=="vertical")){this.host.append("
    ")}this.host.append("
    ");if(this.rtl==true&&this.orientation=="horizontal"){this.host.append("
    ")}this._titleContainer=a("#"+this.element.id+"titleContainer");this._chartContainer=a("#"+this.element.id+"ChartContainer");this._titleContainer.css({width:b,height:o});this._chartContainer.css({width:f,height:c});this._min=this.ranges[0].startValue;this._max=this.ranges[this.ranges.length-1].endValue;this._interval=this._max-this._min;this._valueToPixelsHorizontal=this._chartContainer.width()/this._interval;this._valueToPixelsVertical=this._chartContainer.height()/this._interval;this._checkValues();this._appendRanges();this._appendPointerAndTarget();this._appendTitleAndDescription();if(this.ticks.position!="none"){this._appendTicksAndLabels()}if(this.disabled==true){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this.showTooltip==true){if(this.host.jqxTooltip!=undefined){this._initializeTooltip();this.host.data().jqxWidget=this}else{throw new Error("jqxBulletChart: Missing reference to the following module: 'jqxtooltip.js'.")}}this._updateValue(this.pointer.value,0,true)},refresh:function(b){if(!b){this.render()}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.pointer.value}else{if(b>this._max){b=this._max}else{if(bthis._max){this.pointer.value=this._max}else{if(this.pointer.valuethis._max){this.target.value=this._max}else{if(this.target.value"}else{if(this.orientation=="vertical"){var b=(f.startValue-this._min)*this._valueToPixelsVertical;var k=(f.endValue-f.startValue)*this._valueToPixelsVertical;l="
    "}}e+=l}this._chartContainer.append(e)},_appendPointerAndTarget:function(){var o="";var m=this.element.id+"Pointer";var f=this.element.id+"Target";var l=this.pointer.size;var k=this.target.value;var e=this.target.size;var j=k>0?0:parseInt(e);var p=this.pointer.color.length>0?"":this.toThemeProperty("jqx-fill-state-pressed");var g=this.target.color.length>0?"":this.toThemeProperty("jqx-fill-state-pressed");if(this.orientation=="horizontal"){var c=this._normaliseValue(l);var n=this._checkPercentage(l,this._chartContainer);var d=this.rtl?"right":"left";var t=(k-this._min)*this._valueToPixelsHorizontal-j;var u=t+parseInt(e)-this._chartContainer.width();if(t<0){t=0}else{if(u>0){t-=u}}var i=this._normaliseValue(e);o+="
    ";o+="
    "}else{if(this.orientation=="vertical"){var r=this._chartContainer.width();var q=this._normaliseValue(l);var s=this._checkPercentage(l,this._chartContainer);var b=(k-this._min)*this._valueToPixelsVertical-j;var u=b+parseInt(e)-this._chartContainer.height();if(b<0){b=0}else{if(u>0){b-=u}}var h=this._normaliseValue(e);o+="
    ";o+="
    "}}this._chartContainer.append(o)},_updatePointer:function(c,i){var h=a("#"+this.element.id+"Pointer");if(c.value>this._max){this.pointer.value=this._max}else{if(c.valuethis._max){this.target.value=this._max}else{if(b.value0?0:k;if(this.orientation=="horizontal"){var i=this.rtl?"right":"left";var j=(h-this._min)*this._valueToPixelsHorizontal-c;var g=j+k-this._chartContainer.width();if(j<0){j=0}else{if(g>0){j-=g}}if(this.rtl==false){e.css("left",j)}else{e.css("right",j)}e.width(k)}else{if(this.orientation=="vertical"){var f=(h-this._min)*this._valueToPixelsVertical-c;var g=f+k-this._chartContainer.height();if(f<0){f=0}else{if(g>0){f-=g}}e.css({bottom:f,height:k})}}if(this.showTooltip==true){this._updateTooltip()}}if(b.label!=d.label){if(this.showTooltip==true){this._updateTooltip()}}if(b.color!=d.color){if(b.color==""){e.css("background-color","");e.addClass(this.toThemeProperty("jqx-fill-state-pressed"))}else{e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));e.css("background-color",b.color)}}},_appendTitleAndDescription:function(){var d;if(this.orientation=="horizontal"){if(this.rtl==true){d=this.toThemeProperty("jqx-bulletchart-title-description-rtl")}else{d=this.toThemeProperty("jqx-bulletchart-title-description-ltr")}}else{d=this.toThemeProperty("jqx-bulletchart-title-description-vertical")}var g=this.rtl?"rtl":"ltr";var b="
    "+this.title+"
    "+this.description+"
    ";var e=a("
    "+b+"
    ");this._titleContainer.append(e);var h=e.children();var c=a(h[0]).height()+a(h[1]).height();e.remove();var f;if(this.orientation=="horizontal"){if(this.rtl==false){f=this.toThemeProperty("jqx-bulletchart-title-inner-container")+" "+this.toThemeProperty("jqx-bulletchart-title-inner-container-ltr")}else{f=this.toThemeProperty("jqx-bulletchart-title-inner-container")+" "+this.toThemeProperty("jqx-bulletchart-title-inner-container-rtl")}}else{f=""}this._titleContainer.append("
    "+b+"
    ")},_appendTicksAndLabels:function(){var o=a("
    ");this._chartContainer.append(o);var j="";var e=this._min<0?true:false;var b=this.ticks.size;if(this.orientation=="horizontal"){var k=this._titleContainer.width();var r=this._chartContainer.offset().top-this.host.offset().top;if(this.ticks.position=="both"||this.ticks.position=="far"){var l=this._chartContainer.height()+r}for(var h=0;h<=this._interval;h+=this.ticks.interval){var c=h*this._valueToPixelsHorizontal+k;if(h+this.ticks.interval>this._interval){c-=1}if(e){var d=(h+this._min)==0?true:false;if(d){j+="
    ";e=false}}var n=this._labelValue(h);o.html(n);var p=c-o.width()/2;var m=this.rtl?"right":"left";if(this.ticks.position=="both"||this.ticks.position=="far"){j+="
    ";j+="
    "+n+"
    "}if(this.ticks.position=="both"||this.ticks.position=="near"){j+="
    ";j+="
    "+n+"
    "}}}else{if(this.orientation=="vertical"){var g=this._chartContainer.offset().left-this.host.offset().left;if(this.ticks.position=="both"||this.ticks.position=="far"){var q=this._chartContainer.width()}for(var h=0;h<=this._interval;h+=this.ticks.interval){var f=h*this._valueToPixelsVertical;if(h+this.ticks.interval>this._interval){f-=1}if(e){var d=(h+this._min)==0?true:false;if(d){j+="
    ";e=false}}if(this.ticks.position=="both"||this.ticks.position=="near"){j+="
    ";var n=this._labelValue(h,"near");o.html(n);var p=o.height()/2-1;j+="
    "+n+"
    "}if(this.ticks.position=="both"||this.ticks.position=="far"){j+="
    ";var n=this._labelValue(h,"far");o.html(n);var p=o.height()/2-1;j+="
    "+n+"
    "}}}}this.host.append(j);o.remove()},_labelValue:function(d,b){var e=d+this._min;var c;if(this.labelsFormatFunction){c=this.labelsFormatFunction(e,b)}else{c=a.jqx.dataFormat.formatnumber(e,this.labelsFormat)}return c},_initializeTooltip:function(){var c=this;var d=this._tooltipContent();this.host.jqxTooltip({theme:this.theme,position:"mouse",content:d,trigger:"none",autoHide:false,rtl:this.rtl});this.host.jqxTooltip("getInstance").val=a.proxy(this.val,this);var b=a("#"+this.element.id+"Pointer, #"+this.element.id+"Target");this.addHandler(b,"mouseenter.bulletchart"+this.element.id,function(e){if(c.disabled==false){c.host.jqxTooltip("open",e.pageX,e.pageY);if(e.target.id==c.element.id+"Pointer"&&c.pointer.color==""||e.target.id==c.element.id+"Target"&&c.target.color==""){a(e.target).removeClass(c.toThemeProperty("jqx-fill-state-pressed"));a(e.target).addClass(c.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(b,"mouseleave.bulletchart"+this.element.id,function(e){if(c.disabled==false){c.host.jqxTooltip("close");if(e.target.id==c.element.id+"Pointer"&&c.pointer.color==""||e.target.id==c.element.id+"Target"&&c.target.color==""){a(e.target).removeClass(c.toThemeProperty("jqx-fill-state-hover"));a(e.target).addClass(c.toThemeProperty("jqx-fill-state-pressed"))}}})},_updateTooltip:function(){this.host.jqxTooltip({content:this._tooltipContent()})},_tooltipContent:function(){var c;if(this.tooltipFormatFunction){c=this.tooltipFormatFunction(this.pointer.value,this.target.value)}else{var b=a.jqx.dataFormat.formatnumber(this.pointer.value,this.labelsFormat);var d=a.jqx.dataFormat.formatnumber(this.target.value,this.labelsFormat);c="
    "+this.pointer.label+": "+b+"
    "+this.target.label+": "+d+"
    "}return c},_updateValue:function(m,d,k){var j=this;var c=a("#"+this.element.id+"Pointer");var g,h,l,n;var f=function(p,r,q){if(j._min>=0){if(p=="vertical"){c.css("bottom",0)}else{if(j.rtl==true&&p=="horizontal"){c.css("right",0)}}g=(m-j._min)*r}else{if(m>=0){if(p=="horizontal"){if(j.rtl==true){h="right";l="left"}else{h="left"}}else{if(p=="vertical"){h="bottom";l="top"}}var o=-j._min*r}else{if(p=="horizontal"){if(j.rtl==true){h="left"}else{h="right";l="left"}}else{if(p=="vertical"){h="top"}}var o=q+j._min*r}c.css(h,o);if(l){c.css(l,"")}if(m*d<0){if(p=="horizontal"){c.width(0)}else{if(p=="vertical"){c.height(0)}}}g=Math.abs(m*r)}return g};var i=function(){if(!k){j._raiseEvent("0")}};if(this.orientation=="horizontal"){var e=f("horizontal",this._valueToPixelsHorizontal,this._chartContainer.width());setTimeout(function(){c.animate({width:e},j.animationDuration,i)},0)}else{if(this.orientation=="vertical"){var b=f("vertical",this._valueToPixelsVertical,this._chartContainer.height());setTimeout(function(){c.animate({height:b},j.animationDuration,i)},0)}}},_checkPercentage:function(f,d){var c=-1;if(f.indexOf){c=f.indexOf("%")}var g=function(h){if(!f.indexOf||f.indexOf("px")==-1){return h}else{return parseFloat(h.slice(0,f.indexOf("px")))}};var e=function(h){return parseFloat(h.slice(0,c))};if(c==-1){var b;if(this.orientation=="horizontal"){b=d.height()}else{if(this.orientation=="vertical"){b=d.width()}}return((b-g(f))/2)+"px"}else{return((100-e(f))/2)+"%"}},_normaliseValue:function(b){if(!b.indexOf||(b.indexOf("px")==-1&&b.indexOf("%")==-1)){return b+"px"}else{return b}}})})(jqxBaseFramework); -(function(a){a.jqx.jqxWidget("jqxButtonGroup","",{});a.extend(a.jqx._jqxButtonGroup.prototype,{defineInstance:function(){var b={mode:"default",roundedCorners:true,disabled:false,enableHover:false,orientation:"horizontal",width:null,height:null,_eventsMap:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend")},_events:["selected","unselected","buttonclick"],_buttonId:{},_selected:null,_pressed:null,rtl:false,template:"",_baseId:"group_button",aria:{"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxButtonGroup.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){var c=this;c._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(c);c._baseId=c._baseId+c.element.id;c.addHandler(c.host,"selectstart",function(d){if(!c.disabled){d.preventDefault()}})},refresh:function(){var b=this;if(b.width){if(b.width.toString()&&b.width.toString().indexOf("%")>=0){b.element.style.width=b.width}else{b.host.width(b.width)}}if(b.height){b.host.height(b.height)}b._refreshButtons()},render:function(){this.refresh()},resize:function(){this.refresh()},_getEvent:function(c){var b=this;if(b._isTouchDevice){var d=b._eventsMap[c]||c;d+="."+b.element.id;return d}c+="."+b.element.id;return c},_refreshButtons:function(){var f=this;if(f.lastElement){f.lastElement.remove()}f.lastElement=a("
    ");var c=f.host.children(),e=c.length,g;switch(f.mode){case"radio":f.host.attr("role","radiogroup");break;case"checkbox":case"default":f.host.attr("role","group");break}var d=new Number(100/e).toFixed(2);for(var b=0;b");return b},_removeStyles:function(b){var c=this;var d=c.toThemeProperty;c.host.removeClass("jqx-widget");c.host.removeClass("jqx-rc-all");b.removeClass(d.call(this,"jqx-fill-state-normal"));b.removeClass(d.call(this,"jqx-group-button-normal"));b.removeClass(d.call(this,"jqx-rc-tl"));b.removeClass(d.call(this,"jqx-rc-bl"));b.removeClass(d.call(this,"jqx-rc-tr"));b.removeClass(d.call(this,"jqx-rc-br"));b.css("margin-left",0)},_addStyles:function(c,b,e){var d=this;var f=this.toThemeProperty;d.host.addClass(f.call(this,"jqx-widget"));d.host.addClass(f.call(this,"jqx-rc-all"));d.host.addClass(f.call(this,"jqx-buttongroup"));c.addClass(f.call(this,"jqx-button"));c.addClass(f.call(this,"jqx-group-button-normal"));c.addClass(f.call(this,"jqx-fill-state-normal"));if(d.template){c.addClass(f.call(this,"jqx-"+d.template))}if(d.roundedCorners){if(b===0){d._addRoundedCorners(c,true)}else{if(b===e-1){d._addRoundedCorners(c,false)}}}if(d.orientation==="horizontal"){c.css("margin-left",-parseInt(c.css("border-left-width"),10))}else{c.css("margin-top",-parseInt(c.css("border-left-width"),10))}},_addRoundedCorners:function(b,d){var c=this;var e=c.toThemeProperty;if(c.orientation==="horizontal"){if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-bl"))}else{b.addClass(e.call(this,"jqx-rc-tr"));b.addClass(e.call(this,"jqx-rc-br"))}}else{if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-tr"))}else{b.addClass(e.call(this,"jqx-rc-bl"));b.addClass(e.call(this,"jqx-rc-br"))}}},_centerContent:function(c,b){c.css({"margin-top":(b.height()-c.height())/2,"margin-left":(b.width()-c.width())/2});return c},_renderFromButton:function(b){var c=b.val();if(c===""){c=b.html()}var e;var d=b[0].id;b.wrap("
    ");e=b.parent();e.attr("style",b.attr("style"));b.remove();a.jqx.utilities.html(e,c);e[0].id=d;return e},_performLayout:function(b){if(this.orientation==="horizontal"){if(this.rtl){b.css("float","right")}else{b.css("float","left")}}else{b.css("float","none")}this._centerContent(a(b.children()),b)},_mouseEnterHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-hover"));c.addClass(f.call(b,"jqx-fill-state-hover"))},_mouseLeaveHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.removeClass(f.call(b,"jqx-group-button-hover"));c.removeClass(f.call(b,"jqx-fill-state-hover"))},_mouseDownHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._pressed=c;var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-pressed"));c.addClass(f.call(b,"jqx-fill-state-pressed"))},_mouseUpHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._handleSelection(c);b._pressed=null;c=b._buttonId[c[0].id];b._raiseEvent(2,{index:c.num,button:c.btn})},_isDisabled:function(b){if(!b||!b[0]){return false}return this._buttonId[b[0].id].disabled},_documentUpHandler:function(d){var b=d.data.self,c=b._pressed;if(c&&!b._buttonId[c[0].id].selected){c.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._pressed=null}},_addButtonListeners:function(c){var e=this;var b=e.addHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler,{self:e});b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler,{self:e});b(c,d.call(e,"mousedown"),e._mouseDownHandler,{self:e});b(c,d.call(e,"mouseup"),e._mouseUpHandler,{self:e});b(a(document),d.call(e,"mouseup"),e._documentUpHandler,{self:e})},_removeButtonListeners:function(c){var e=this;var b=e.removeHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler);b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler);b(c,d.call(e,"mousedown"),e._mouseDownHandler);b(c,d.call(e,"mouseup"),e._mouseUpHandler);b(a(document),d.call(e,"mouseup"),e._documentUpHandler)},_handleSelection:function(b){var c=this;if(c.mode==="radio"){c._handleRadio(b)}else{if(c.mode==="checkbox"){c._handleCheckbox(b)}else{c._handleDefault(b)}}},_handleRadio:function(b){var d=this;var c=d._getSelectedButton();if(c&&c.btn[0].id!==b[0].id){d._unselectButton(c.btn,true)}for(var e in d._buttonId){d._buttonId[e].selected=true;d._unselectButton(d._buttonId[e].btn,false)}d._selectButton(b,true)},_handleCheckbox:function(c){var d=this;var b=d._buttonId[c[0].id];if(b.selected){d._unselectButton(b.btn,true)}else{d._selectButton(c,true)}},_handleDefault:function(b){var c=this;c._selectButton(b,false);for(var d in c._buttonId){c._buttonId[d].selected=true;c._unselectButton(c._buttonId[d].btn,false)}},_getSelectedButton:function(){var b=this;for(var c in b._buttonId){if(b._buttonId[c].selected){return b._buttonId[c]}}return null},_getSelectedButtons:function(){var c=this;var b=[];for(var d in c._buttonId){if(c._buttonId[d].selected){b.push(c._buttonId[d].num)}}return b},_getButtonByIndex:function(b){var c=this;var e;for(var d in c._buttonId){if(c._buttonId[d].num===b){return c._buttonId[d]}}return null},_selectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(b.selected){return}var f=d.toThemeProperty;b.btn.addClass(f.call(this,"jqx-group-button-pressed"));b.btn.addClass(f.call(this,"jqx-fill-state-pressed"));b.selected=true;if(e){d._raiseEvent(0,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",true)},_unselectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(!b.selected){return}var f=d.toThemeProperty;b.btn.removeClass(f.call(this,"jqx-group-button-pressed"));b.btn.removeClass(f.call(this,"jqx-fill-state-pressed"));b.selected=false;if(e){d._raiseEvent(1,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",false)},setSelection:function(b){var d=this;if(b===-1){d.clearSelection();return}if(d.mode==="checkbox"){if(typeof b==="number"){d._setSelection(b)}else{for(var c=0;c=0){b.element.style.width=b.width}else{b.host.width(b.width)}}if(b.height){b.host.height(b.height)}b._refreshButtons()},render:function(){this.refresh()},resize:function(){this.refresh()},_getEvent:function(c){var b=this;if(b._isTouchDevice){var d=b._eventsMap[c]||c;d+="."+b.element.id;return d}c+="."+b.element.id;return c},_refreshButtons:function(){var f=this;if(f.lastElement){f.lastElement.remove()}f.lastElement=a("
    ");var c=f.host.children(),e=c.length,g;switch(f.mode){case"radio":f.host.attr("role","radiogroup");break;case"checkbox":case"default":f.host.attr("role","group");break}var d=new Number(100/e).toFixed(2);for(var b=0;b");return b},_removeStyles:function(b){var c=this;var d=c.toThemeProperty;c.host.removeClass("jqx-widget");c.host.removeClass("jqx-rc-all");b.removeClass(d.call(this,"jqx-fill-state-normal"));b.removeClass(d.call(this,"jqx-group-button-normal"));b.removeClass(d.call(this,"jqx-rc-tl"));b.removeClass(d.call(this,"jqx-rc-bl"));b.removeClass(d.call(this,"jqx-rc-tr"));b.removeClass(d.call(this,"jqx-rc-br"));b.css("margin-left",0)},_addStyles:function(c,b,e){var d=this;var f=this.toThemeProperty;d.host.addClass(f.call(this,"jqx-widget"));d.host.addClass(f.call(this,"jqx-rc-all"));d.host.addClass(f.call(this,"jqx-buttongroup"));c.addClass(f.call(this,"jqx-button"));c.addClass(f.call(this,"jqx-group-button-normal"));c.addClass(f.call(this,"jqx-fill-state-normal"));if(d.template){c.addClass(f.call(this,"jqx-"+d.template))}if(d.roundedCorners){if(b===0){d._addRoundedCorners(c,true)}else{if(b===e-1){d._addRoundedCorners(c,false)}}}if(d.orientation==="horizontal"){c.css("margin-left",-parseInt(c.css("border-left-width"),10))}else{c.css("margin-top",-parseInt(c.css("border-left-width"),10))}},_addRoundedCorners:function(b,d){var c=this;var e=c.toThemeProperty;if(c.orientation==="horizontal"){if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-bl"))}else{b.addClass(e.call(this,"jqx-rc-tr"));b.addClass(e.call(this,"jqx-rc-br"))}}else{if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-tr"))}else{b.addClass(e.call(this,"jqx-rc-bl"));b.addClass(e.call(this,"jqx-rc-br"))}}},_centerContent:function(c,b){c.css({"margin-top":(b.height()-c.height())/2,"margin-left":(b.width()-c.width())/2});return c},_renderFromButton:function(b){var c=b.val();if(c===""){c=b.html()}var e;var d=b[0].id;b.wrap("
    ");e=b.parent();e.attr("style",b.attr("style"));b.remove();a.jqx.utilities.html(e,c);e[0].id=d;return e},_performLayout:function(b){if(this.orientation==="horizontal"){if(this.rtl){b.css("float","right")}else{b.css("float","left")}}else{b.css("float","none")}this._centerContent(a(b.children()),b)},_mouseEnterHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-hover"));c.addClass(f.call(b,"jqx-fill-state-hover"))},_mouseLeaveHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.removeClass(f.call(b,"jqx-group-button-hover"));c.removeClass(f.call(b,"jqx-fill-state-hover"))},_mouseDownHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._pressed=c;var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-pressed"));c.addClass(f.call(b,"jqx-fill-state-pressed"))},_mouseUpHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._handleSelection(c);b._pressed=null;c=b._buttonId[c[0].id];b._raiseEvent(2,{index:c.num,button:c.btn})},_isDisabled:function(b){if(!b||!b[0]){return false}return this._buttonId[b[0].id].disabled},_documentUpHandler:function(d){var b=d.data.self,c=b._pressed;if(c&&!b._buttonId[c[0].id].selected){c.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._pressed=null}},_addButtonListeners:function(c){var e=this;var b=e.addHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler,{self:e});b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler,{self:e});b(c,d.call(e,"mousedown"),e._mouseDownHandler,{self:e});b(c,d.call(e,"mouseup"),e._mouseUpHandler,{self:e});b(a(document),d.call(e,"mouseup"),e._documentUpHandler,{self:e})},_removeButtonListeners:function(c){var e=this;var b=e.removeHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler);b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler);b(c,d.call(e,"mousedown"),e._mouseDownHandler);b(c,d.call(e,"mouseup"),e._mouseUpHandler);b(a(document),d.call(e,"mouseup"),e._documentUpHandler)},_handleSelection:function(b){var c=this;if(c.mode==="radio"){c._handleRadio(b)}else{if(c.mode==="checkbox"){c._handleCheckbox(b)}else{c._handleDefault(b)}}},_handleRadio:function(b){var d=this;var c=d._getSelectedButton();if(c&&c.btn[0].id!==b[0].id){d._unselectButton(c.btn,true)}for(var e in d._buttonId){d._buttonId[e].selected=true;d._unselectButton(d._buttonId[e].btn,false)}d._selectButton(b,true)},_handleCheckbox:function(c){var d=this;var b=d._buttonId[c[0].id];if(b.selected){d._unselectButton(b.btn,true)}else{d._selectButton(c,true)}},_handleDefault:function(b){var c=this;c._selectButton(b,false);for(var d in c._buttonId){c._buttonId[d].selected=true;c._unselectButton(c._buttonId[d].btn,false)}},_getSelectedButton:function(){var b=this;for(var c in b._buttonId){if(b._buttonId[c].selected){return b._buttonId[c]}}return null},_getSelectedButtons:function(){var c=this;var b=[];for(var d in c._buttonId){if(c._buttonId[d].selected){b.push(c._buttonId[d].num)}}return b},_getButtonByIndex:function(b){var c=this;var e;for(var d in c._buttonId){if(c._buttonId[d].num===b){return c._buttonId[d]}}return null},_selectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(b.selected){return}var f=d.toThemeProperty;b.btn.addClass(f.call(this,"jqx-group-button-pressed"));b.btn.addClass(f.call(this,"jqx-fill-state-pressed"));b.selected=true;if(e){d._raiseEvent(0,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",true)},_unselectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(!b.selected){return}var f=d.toThemeProperty;b.btn.removeClass(f.call(this,"jqx-group-button-pressed"));b.btn.removeClass(f.call(this,"jqx-fill-state-pressed"));b.selected=false;if(e){d._raiseEvent(1,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",false)},setSelection:function(b){var d=this;if(b===-1){d.clearSelection();return}if(d.mode==="checkbox"){if(typeof b==="number"){d._setSelection(b)}else{for(var c=0;c=0)||e.value!=null){e.refresh();e._addImage("jqxButton");e.buttonObj=new a(e.element)}if(!e._ariaDisabled){e.element.setAttribute("role","button")}if(e.type!==""){e.element.setAttribute("type",e.type)}if(!e.overrideTheme){e.buttonObj.addClass(e.toThemeProperty(a.jqx.cssroundedcorners(e.roundedCorners)));if(e.enableDefault){e.buttonObj.addClass(e.toThemeProperty("jqx-button"))}e.buttonObj.addClass(e.toThemeProperty("jqx-widget"))}e.isTouchDevice=a.jqx.mobile.isTouchDevice();if(!e._ariaDisabled){a.jqx.aria(this)}if(e.cursor!="arrow"){if(!e.disabled){e.element.style.cursor=e.cursor}else{e.element.style.cursor="arrow"}}var g="mouseenter mouseleave mousedown focus blur";if(e._scrollAreaButton){var g="mousedown"}if(e.isTouchDevice){e.addHandler(e.host,a.jqx.mobile.getTouchEventName("touchstart"),function(h){e.isPressed=true;e.refresh()});e.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+e.element.id,function(h){e.isPressed=false;e.refresh()})}e.addHandler(e.host,g,function(h){switch(h.type){case"mouseenter":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=true;e.refresh()}}break;case"mouseleave":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=false;e.refresh()}}break;case"mousedown":if(!e.disabled){e.isPressed=true;e.refresh()}break;case"focus":if(!e.disabled){e.isFocused=true;e.refresh()}break;case"blur":if(!e.disabled){e.isFocused=false;e.refresh()}break}});e.mouseupfunc=function(h){if(!e.disabled){if(e.isPressed||e.isMouseOver){e.isPressed=false;e.refresh()}}};e.addHandler(document,"mouseup.button"+e.element.id,e.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.that){var f="";if(window.parent&&document.referrer){f=document.referrer}if(f.indexOf(document.location.host)!=-1){if(window.top.document){window.top.document.addEventListener("mouseup",e._topDocumentMouseupHandler)}}}}}catch(c){}e.propertyChangeMap.roundedCorners=function(h,j,i,k){h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(i)));h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(k)))};e.propertyChangeMap.disabled=function(h,j,i,k){if(i!=k){h.refresh();h.element.setAttribute("disabled",k);h.element.disabled=k;if(!k){h.element.style.cursor=h.cursor}else{h.element.style.cursor="default"}a.jqx.aria(h,"aria-disabled",h.disabled)}};e.propertyChangeMap.rtl=function(h,j,i,k){if(i!=k){h.refresh()}};e.propertyChangeMap.template=function(h,j,i,k){if(i!=k){h.buttonObj.removeClass(h.toThemeProperty("jqx-"+i));h.refresh()}};e.propertyChangeMap.theme=function(h,j,i,k){h.buttonObj.removeClass(h.element);if(i){h.buttonObj.removeClass("jqx-button-"+i);h.buttonObj.removeClass("jqx-widget-"+i);h.buttonObj.removeClass("jqx-fill-state-normal-"+i);h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners))+"-"+i)}if(h.enableDefault){h.buttonObj.addClass(h.toThemeProperty("jqx-button"))}h.buttonObj.addClass(h.toThemeProperty("jqx-widget"));if(!h.overrideTheme){h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners)))}h._oldCSSCurrent=null;h.refresh()};if(e.disabled){e.element.disabled=true;e.element.setAttribute("disabled","true")}},resize:function(c,b){this.width=c;this.height=b;this._setSize()},val:function(d){var c=this;var b=c.host.find("input");if(b.length>0){if(arguments.length==0||typeof(d)=="object"){return b.val()}b.val(d);c.refresh();return b.val()}if(arguments.length==0||typeof(d)=="object"){if(c.element.nodeName.toLowerCase()=="button"){return a(c.element).text()}return c.element.value}if(arguments.length>0&&c._text){c._text.innerHTML=arguments[0];c.refresh();return}else{if(arguments.length>0&&c.element.nodeName==="DIV"){c.element.innerHTML=arguments[0];c.refresh()}}c.element.value=arguments[0];if(c.element.nodeName.toLowerCase()=="button"){a(c.element).html(arguments[0])}c.refresh()},_setSize:function(){var d=this;var b=d.height;var c=d.width;if(b){if(!isNaN(b)){b=b+"px"}d.element.style.height=b}if(c){if(!isNaN(c)){c=c+"px"}d.element.style.width=c}},_removeHandlers:function(){var b=this;b.removeHandler(b.host,"selectstart");b.removeHandler(b.host,"click");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(b.host,"mouseenter");b.removeHandler(b.host,"mouseleave");b.removeHandler(b.host,"mousedown");b.removeHandler(a(document),"mouseup.button"+b.element.id,b.mouseupfunc);window.top.document.removeEventListener("mouseup",b._topDocumentMouseupHandler);if(b.isTouchDevice){b.removeHandler(b.host,a.jqx.mobile.getTouchEventName("touchstart"));b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+b.element.id)}b.mouseupfunc=null;delete b.mouseupfunc},focus:function(){this.host.focus()},destroy:function(){var b=this;b._removeHandlers();var c=a.data(b.element,"jqxButton");if(c){delete c.instance}b.host.removeClass();b.host.removeData();b.host.remove();delete b.set;delete b.get;delete b.call;delete b.element;delete b.host},render:function(){this.refresh()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d._setSize();d.refresh()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d==e){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c==="type"){b.element.setAttribute("type",d)}if(c=="textImageRelation"||c=="textPosition"||c=="imgPosition"){if(b._img){b._positionTextAndImage()}else{b._addImage("jqxButton")}}if(c=="imgSrc"||c=="imgWidth"||c=="imgHeight"){b._addImage("jqxButton")}if(c==="value"){b.val(d)}if(c=="width"||c=="height"){b._setSize();b.refresh()}},refresh:function(){var c=this;if(c.overrideTheme){return}var e=c.toThemeProperty("jqx-fill-state-focus");var i=c.toThemeProperty("jqx-fill-state-disabled");var b=c.toThemeProperty("jqx-fill-state-normal");if(!c.enableDefault){b=""}var h=c.toThemeProperty("jqx-fill-state-hover");var f=c.toThemeProperty("jqx-fill-state-pressed");var g=c.toThemeProperty("jqx-fill-state-pressed");if(!c.enablePressed){f=""}var d="";if(!c.host){return}c.element.disabled=c.disabled;if(c.disabled){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}d=b+" "+i;if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}c.buttonObj.addClass(d);c._oldCSSCurrent=d;return}else{if(c.isMouseOver&&!c.isTouchDevice){if(c.isPressed){d=g}else{d=h}}else{if(c.isPressed){d=f}else{d=b}}}if(c.isFocused){d+=" "+e}if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}if(d!=c._oldCSSCurrent){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}c.buttonObj.addClass(d);c._oldCSSCurrent=d}if(c.rtl){c.buttonObj.addClass(c.toThemeProperty("jqx-rtl"));c.element.style.direction="rtl"}if(c.isMaterialized()){c.host.addClass("buttonRipple")}}});a.jqx.jqxWidget("jqxLinkButton","",{});a.extend(a.jqx._jqxLinkButton.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.rtl=false;this.href=null},createInstance:function(c){var f=this;this.host.onselectstart=function(){return false};this.host.attr("role","button");var b=this.height||this.element.offsetHeight;var d=this.width||this.element.offsetWidth;this.href=this.element.getAttribute("href");this.target=this.element.getAttribute("target");this.content=this.host.text();this.element.innerHTML="";var g=document.createElement("input");g.type="button";g.className="jqx-wrapper "+this.toThemeProperty("jqx-reset");this._setSize(g,d,b);g.value=this.content;var e=new a(this.element);e.addClass(this.toThemeProperty("jqx-link"));this.element.style.color="inherit";this.element.appendChild(g);this._setSize(g,d,b);var h=c==undefined?{}:c[0]||{};a(g).jqxButton(h);this.wrapElement=g;if(this.disabled){this.element.disabled=true}this.propertyChangeMap.disabled=function(i,k,j,l){i.element.disabled=l;i.wrapElement.jqxButton({disabled:l})};this.addHandler(a(g),"click",function(i){if(!this.disabled){f.onclick(i)}return false})},_setSize:function(c,d,b){var e=this;if(b){if(!isNaN(b)){b=b+"px"}c.style.height=b}if(d){if(!isNaN(d)){d=d+"px"}c.style.width=d}},onclick:function(b){if(this.target!=null){window.open(this.href,this.target)}else{window.location=this.href}}});a.jqx.jqxWidget("jqxRepeatButton","jqxButton",{});a.extend(a.jqx._jqxRepeatButton.prototype,{defineInstance:function(){this.delay=50},createInstance:function(d){var e=this;var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var f=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.addHandler(a(document),b,function(g){if(e.timeout!=null){clearTimeout(e.timeout);e.timeout=null;e.refresh()}if(e.timer!=undefined){clearInterval(e.timer);e.timer=null;e.refresh()}});this.addHandler(this.base.host,f,function(g){if(e.timer!=null){clearInterval(e.timer)}e.timeout=setTimeout(function(){clearInterval(e.timer);e.timer=setInterval(function(h){e.ontimer(h)},e.delay)},150)});this.mousemovefunc=function(g){if(!c){if(g.which==0){if(e.timer!=null){clearInterval(e.timer);e.timer=null}}}};this.addHandler(this.base.host,"mousemove",this.mousemovefunc)},destroy:function(){var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var e=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.removeHandler(this.base.host,"mousemove",this.mousemovefunc);this.removeHandler(this.base.host,e);this.removeHandler(a(document),b);this.timer=null;delete this.mousemovefunc;delete this.timer;var d=a.data(this.base.element,"jqxRepeatButton");if(d){delete d.instance}a(this.base.element).removeData();this.base.destroy();delete this.base},stop:function(){clearInterval(this.timer);this.timer=null},ontimer:function(b){var b=new a.Event("click");if(this.base!=null&&this.base.host!=null){this.base.host.trigger(b)}}});a.jqx.jqxWidget("jqxToggleButton","jqxButton",{});a.extend(a.jqx._jqxToggleButton.prototype,{defineInstance:function(){this.toggled=false;this.uiToggle=true;this.aria={"aria-checked":{name:"toggled",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(b){var c=this;c.base.overrideTheme=true;c.isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);c.propertyChangeMap.roundedCorners=function(d,f,e,g){d.base.buttonObj.removeClass(d.toThemeProperty(a.jqx.cssroundedcorners(e)));d.base.buttonObj.addClass(d.toThemeProperty(a.jqx.cssroundedcorners(g)))};c.propertyChangeMap.toggled=function(d,f,e,g){d.refresh()};c.propertyChangeMap.disabled=function(d,f,e,g){d.base.disabled=g;d.refresh()};c.addHandler(c.base.host,"click",function(d){if(!c.base.disabled&&c.uiToggle){c.toggle()}});if(!c.isTouchDevice){c.addHandler(c.base.host,"mouseenter",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(c.base.host,"mouseleave",function(d){if(!c.base.disabled){c.refresh()}})}c.addHandler(c.base.host,"mousedown",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(a(document),"mouseup.togglebutton"+c.base.element.id,function(d){if(!c.base.disabled){c.refresh()}})},destroy:function(){this._removeHandlers();this.base.destroy()},_removeHandlers:function(){this.removeHandler(this.base.host,"click");this.removeHandler(this.base.host,"mouseenter");this.removeHandler(this.base.host,"mouseleave");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup.togglebutton"+this.base.element.id)},toggle:function(){this.toggled=!this.toggled;this.refresh();a.jqx.aria(this,"aria-checked",this.toggled)},unCheck:function(){this.toggled=false;this.refresh()},check:function(){this.toggled=true;this.refresh()},refresh:function(){var c=this;var h=c.base.toThemeProperty("jqx-fill-state-disabled");var b=c.base.toThemeProperty("jqx-fill-state-normal");if(!c.base.enableDefault){b=""}var g=c.base.toThemeProperty("jqx-fill-state-hover");var e=c.base.toThemeProperty("jqx-fill-state-pressed");var f=c.base.toThemeProperty("jqx-fill-state-pressed");var d="";c.base.element.disabled=c.base.disabled;if(c.base.disabled){d=b+" "+h;c.base.buttonObj.addClass(d);return}else{if(c.base.isMouseOver&&!c.isTouchDevice){if(c.base.isPressed||c.toggled){d=f}else{d=g}}else{if(c.base.isPressed||c.toggled){d=e}else{d=b}}}if(c.base.template!=="default"&&c.base.template!==""){d+=" jqx-"+c.base.template;if(c.base.theme!=""){d+=" jqx-"+c.template+"-"+c.base.theme}}if(c.base.buttonObj.hasClass(h)&&h!=d){c.base.buttonObj.removeClass(h)}if(c.base.buttonObj.hasClass(b)&&b!=d){c.base.buttonObj.removeClass(b)}if(c.base.buttonObj.hasClass(g)&&g!=d){c.base.buttonObj.removeClass(g)}if(c.base.buttonObj.hasClass(e)&&e!=d){c.base.buttonObj.removeClass(e)}if(c.base.buttonObj.hasClass(f)&&f!=d){c.base.buttonObj.removeClass(f)}if(!c.base.buttonObj.hasClass(d)){c.base.buttonObj.addClass(d)}},_topDocumentMouseupHandler:function(c){var b=this;b.isPressed=false;b.refresh()}})})(jqxBaseFramework); +(function(a){a.jqx.cssroundedcorners=function(b){var d={all:"jqx-rc-all",top:"jqx-rc-t",bottom:"jqx-rc-b",left:"jqx-rc-l",right:"jqx-rc-r","top-right":"jqx-rc-tr","top-left":"jqx-rc-tl","bottom-right":"jqx-rc-br","bottom-left":"jqx-rc-bl"};for(var c in d){if(!d.hasOwnProperty(c)){continue}if(b==c){return d[c]}}};a.jqx.jqxWidget("jqxButton","",{});a.extend(a.jqx._jqxButton.prototype,{defineInstance:function(){var b={type:"",cursor:"arrow",roundedCorners:"all",disabled:false,height:null,width:null,overrideTheme:false,enableHover:true,enableDefault:true,enablePressed:true,imgPosition:"center",imgSrc:"",imgWidth:16,imgHeight:16,value:null,textPosition:"",textImageRelation:"overlay",rtl:false,_ariaDisabled:false,_scrollAreaButton:false,template:"default",aria:{"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxButton.prototype){return b}a.extend(true,this,b);return b},_addImage:function(c){var g=this;if(g.element.nodeName.toLowerCase()=="input"||g.element.nodeName.toLowerCase()=="button"||g.element.nodeName.toLowerCase()=="div"){if(!g._img){g.field=g.element;if(g.field.className){g._className=g.field.className}var i={title:g.field.title};var j=null;if(g.field.getAttribute("value")){var j=g.field.getAttribute("value")}else{if(g.element.nodeName.toLowerCase()!="input"){var j=g.element.innerHTML}}if(g.value){j=g.value}if(g.field.id.length){i.id=g.field.id.replace(/[^\w]/g,"_")+"_"+c}else{i.id=a.jqx.utilities.createId()+"_"+c}var b=document.createElement("div");b.id=i.id;b.title=i.title;b.style.cssText=g.field.style.cssText;b.style.boxSizing="border-box";var f=document.createElement("img");f.setAttribute("src",g.imgSrc);f.setAttribute("width",g.imgWidth);f.setAttribute("height",g.imgHeight);b.appendChild(f);g._img=f;var l=document.createElement("span");if(j){l.innerHTML=j;g.value=j}b.appendChild(l);g._text=l;g.field.style.display="none";if(g.field.parentNode){g.field.parentNode.insertBefore(b,g.field.nextSibling)}var e=g.host.data();g.host=a(b);g.host.data(e);g.element=b;g.element.id=g.field.id;g.field.id=i.id;var k=new a(g.element);var h=new a(g.field);if(g._className){k.addClass(g._className);h.removeClass(g._className)}if(g.field.tabIndex){var d=g.field.tabIndex;g.field.tabIndex=-1;g.element.tabIndex=d}}else{g._img.setAttribute("src",g.imgSrc);g._img.setAttribute("width",g.imgWidth);g._img.setAttribute("height",g.imgHeight);g._text.innerHTML=g.value}if(!g.imgSrc){g._img.style.display="none"}else{g._img.style.display="inline"}if(!g.value){g._text.style.display="none"}else{g._text.style.display="inline"}g._positionTextAndImage()}},_positionTextAndImage:function(){var k=this;var r=k.element.offsetWidth;var q=k.element.offsetHeight;var m=k.imgWidth;var v=k.imgHeight;if(k.imgSrc==""){m=0;v=0}var f=k._text.offsetWidth;var b=k._text.offsetHeight;var i=4;var c=4;var l=4;var n=0;var u=0;switch(k.textImageRelation){case"imageBeforeText":case"textBeforeImage":n=m+f+2*l+i+2*c;u=Math.max(v,b)+2*l+i+2*c;break;case"imageAboveText":case"textAboveImage":n=Math.max(m,f)+2*l;u=v+b+i+2*l+2*c;break;case"overlay":n=Math.max(m,f)+2*l;u=Math.max(v,b)+2*l;break}if(!k.width){k.element.style.width=n+"px";r=n}if(!k.height){k.element.style.height=u+"px";q=u}k._img.style.position="absolute";k._text.style.position="absolute";k.element.style.position="relative";k.element.style.overflow="hidden";var e={};var z={};var s=function(E,D,G,C,F){if(D.width=0)||e.value!=null){e.refresh();e._addImage("jqxButton");e.buttonObj=new a(e.element)}if(!e._ariaDisabled){e.element.setAttribute("role","button")}if(e.type!==""){e.element.setAttribute("type",e.type)}if(!e.overrideTheme){e.buttonObj.addClass(e.toThemeProperty(a.jqx.cssroundedcorners(e.roundedCorners)));if(e.enableDefault){e.buttonObj.addClass(e.toThemeProperty("jqx-button"))}e.buttonObj.addClass(e.toThemeProperty("jqx-widget"))}e.isTouchDevice=a.jqx.mobile.isTouchDevice();if(!e._ariaDisabled){a.jqx.aria(this)}if(e.cursor!="arrow"){if(!e.disabled){e.element.style.cursor=e.cursor}else{e.element.style.cursor="arrow"}}var g="mouseenter mouseleave mousedown focus blur";if(e._scrollAreaButton){var g="mousedown"}if(e.isTouchDevice){e.addHandler(e.host,a.jqx.mobile.getTouchEventName("touchstart"),function(h){e.isPressed=true;e.refresh()});e.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+e.element.id,function(h){e.isPressed=false;e.refresh()})}e.addHandler(e.host,g,function(h){switch(h.type){case"mouseenter":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=true;e.refresh()}}break;case"mouseleave":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=false;e.refresh()}}break;case"mousedown":if(!e.disabled){e.isPressed=true;e.refresh()}break;case"focus":if(!e.disabled){e.isFocused=true;e.refresh()}break;case"blur":if(!e.disabled){e.isFocused=false;e.refresh()}break}});e.mouseupfunc=function(h){if(!e.disabled){if(e.isPressed||e.isMouseOver){e.isPressed=false;e.refresh()}}};e.addHandler(document,"mouseup.button"+e.element.id,e.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.that){var f="";if(window.parent&&document.referrer){f=document.referrer}if(f.indexOf(document.location.host)!=-1){if(window.top.document){window.top.document.addEventListener("mouseup",e._topDocumentMouseupHandler)}}}}}catch(c){}e.propertyChangeMap.roundedCorners=function(h,j,i,k){h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(i)));h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(k)))};e.propertyChangeMap.disabled=function(h,j,i,k){if(i!=k){h.refresh();h.element.setAttribute("disabled",k);h.element.disabled=k;if(!k){h.element.style.cursor=h.cursor}else{h.element.style.cursor="default"}a.jqx.aria(h,"aria-disabled",h.disabled)}};e.propertyChangeMap.rtl=function(h,j,i,k){if(i!=k){h.refresh()}};e.propertyChangeMap.template=function(h,j,i,k){if(i!=k){h.buttonObj.removeClass(h.toThemeProperty("jqx-"+i));h.refresh()}};e.propertyChangeMap.theme=function(h,j,i,k){h.buttonObj.removeClass(h.element);if(i){h.buttonObj.removeClass("jqx-button-"+i);h.buttonObj.removeClass("jqx-widget-"+i);h.buttonObj.removeClass("jqx-fill-state-normal-"+i);h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners))+"-"+i)}if(h.enableDefault){h.buttonObj.addClass(h.toThemeProperty("jqx-button"))}h.buttonObj.addClass(h.toThemeProperty("jqx-widget"));if(!h.overrideTheme){h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners)))}h._oldCSSCurrent=null;h.refresh()};if(e.disabled){e.element.disabled=true;e.element.setAttribute("disabled","true")}},resize:function(c,b){this.width=c;this.height=b;this._setSize()},val:function(d){var c=this;var b=c.host.find("input");if(b.length>0){if(arguments.length==0||typeof(d)=="object"){return b.val()}b.val(d);c.refresh();return b.val()}if(arguments.length==0||typeof(d)=="object"){if(c.element.nodeName.toLowerCase()=="button"){return a(c.element).text()}return c.element.value}if(arguments.length>0&&c._text){c._text.innerHTML=arguments[0];c.refresh();return}else{if(arguments.length>0&&c.element.nodeName==="DIV"){c.element.innerHTML=arguments[0];c.refresh()}}c.element.value=arguments[0];if(c.element.nodeName.toLowerCase()=="button"){a(c.element).html(arguments[0])}c.refresh()},_setSize:function(){var d=this;var b=d.height;var c=d.width;if(b){if(!isNaN(b)){b=b+"px"}d.element.style.height=b}if(c){if(!isNaN(c)){c=c+"px"}d.element.style.width=c}},_removeHandlers:function(){var b=this;b.removeHandler(b.host,"selectstart");b.removeHandler(b.host,"click");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(b.host,"mouseenter");b.removeHandler(b.host,"mouseleave");b.removeHandler(b.host,"mousedown");b.removeHandler(a(document),"mouseup.button"+b.element.id,b.mouseupfunc);if(b.isTouchDevice){b.removeHandler(b.host,a.jqx.mobile.getTouchEventName("touchstart"));b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+b.element.id)}b.mouseupfunc=null;delete b.mouseupfunc},focus:function(){this.host.focus()},destroy:function(){var b=this;b._removeHandlers();var c=a.data(b.element,"jqxButton");if(c){delete c.instance}b.host.removeClass();b.host.removeData();b.host.remove();delete b.set;delete b.get;delete b.call;delete b.element;delete b.host},render:function(){this.refresh()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d._setSize();d.refresh()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d==e){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c==="type"){b.element.setAttribute("type",d)}if(c=="textImageRelation"||c=="textPosition"||c=="imgPosition"){if(b._img){b._positionTextAndImage()}else{b._addImage("jqxButton")}}if(c=="imgSrc"||c=="imgWidth"||c=="imgHeight"){b._addImage("jqxButton")}if(c==="value"){b.val(d)}if(c=="width"||c=="height"){b._setSize();b.refresh()}},refresh:function(){var c=this;if(c.overrideTheme){return}var e=c.toThemeProperty("jqx-fill-state-focus");var i=c.toThemeProperty("jqx-fill-state-disabled");var b=c.toThemeProperty("jqx-fill-state-normal");if(!c.enableDefault){b=""}var h=c.toThemeProperty("jqx-fill-state-hover");var f=c.toThemeProperty("jqx-fill-state-pressed");var g=c.toThemeProperty("jqx-fill-state-pressed");if(!c.enablePressed){f=""}var d="";if(!c.host){return}c.element.disabled=c.disabled;if(c.disabled){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}d=b+" "+i;if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}c.buttonObj.addClass(d);c._oldCSSCurrent=d;return}else{if(c.isMouseOver&&!c.isTouchDevice){if(c.isPressed){d=g}else{d=h}}else{if(c.isPressed){d=f}else{d=b}}}if(c.isFocused){d+=" "+e}if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}if(d!=c._oldCSSCurrent){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}c.buttonObj.addClass(d);c._oldCSSCurrent=d}if(c.rtl){c.buttonObj.addClass(c.toThemeProperty("jqx-rtl"));c.element.style.direction="rtl"}if(c.isMaterialized()){c.host.addClass("buttonRipple")}}});a.jqx.jqxWidget("jqxLinkButton","",{});a.extend(a.jqx._jqxLinkButton.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.rtl=false;this.href=null},createInstance:function(c){var f=this;this.host.onselectstart=function(){return false};this.host.attr("role","button");var b=this.height||this.element.offsetHeight;var d=this.width||this.element.offsetWidth;this.href=this.element.getAttribute("href");this.target=this.element.getAttribute("target");this.content=this.host.text();this.element.innerHTML="";var g=document.createElement("input");g.type="button";g.className="jqx-wrapper "+this.toThemeProperty("jqx-reset");this._setSize(g,d,b);g.value=this.content;var e=new a(this.element);e.addClass(this.toThemeProperty("jqx-link"));this.element.style.color="inherit";this.element.appendChild(g);this._setSize(g,d,b);var h=c==undefined?{}:c[0]||{};a(g).jqxButton(h);this.wrapElement=g;if(this.disabled){this.element.disabled=true}this.propertyChangeMap.disabled=function(i,k,j,l){i.element.disabled=l;i.wrapElement.jqxButton({disabled:l})};this.addHandler(a(g),"click",function(i){if(!this.disabled){f.onclick(i)}return false})},_setSize:function(c,d,b){var e=this;if(b){if(!isNaN(b)){b=b+"px"}c.style.height=b}if(d){if(!isNaN(d)){d=d+"px"}c.style.width=d}},onclick:function(b){if(this.target!=null){window.open(this.href,this.target)}else{window.location=this.href}}});a.jqx.jqxWidget("jqxRepeatButton","jqxButton",{});a.extend(a.jqx._jqxRepeatButton.prototype,{defineInstance:function(){this.delay=50},createInstance:function(d){var e=this;var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var f=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.addHandler(a(document),b,function(g){if(e.timeout!=null){clearTimeout(e.timeout);e.timeout=null;e.refresh()}if(e.timer!=undefined){clearInterval(e.timer);e.timer=null;e.refresh()}});this.addHandler(this.base.host,f,function(g){if(e.timer!=null){clearInterval(e.timer)}e.timeout=setTimeout(function(){clearInterval(e.timer);e.timer=setInterval(function(h){e.ontimer(h)},e.delay)},150)});this.mousemovefunc=function(g){if(!c){if(g.which==0){if(e.timer!=null){clearInterval(e.timer);e.timer=null}}}};this.addHandler(this.base.host,"mousemove",this.mousemovefunc)},destroy:function(){var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var e=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.removeHandler(this.base.host,"mousemove",this.mousemovefunc);this.removeHandler(this.base.host,e);this.removeHandler(a(document),b);this.timer=null;delete this.mousemovefunc;delete this.timer;var d=a.data(this.base.element,"jqxRepeatButton");if(d){delete d.instance}a(this.base.element).removeData();this.base.destroy();delete this.base},stop:function(){clearInterval(this.timer);this.timer=null},ontimer:function(b){var b=new a.Event("click");if(this.base!=null&&this.base.host!=null){this.base.host.trigger(b)}}});a.jqx.jqxWidget("jqxToggleButton","jqxButton",{});a.extend(a.jqx._jqxToggleButton.prototype,{defineInstance:function(){this.toggled=false;this.uiToggle=true;this.aria={"aria-checked":{name:"toggled",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(b){var c=this;c.base.overrideTheme=true;c.isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);c.propertyChangeMap.roundedCorners=function(d,f,e,g){d.base.buttonObj.removeClass(d.toThemeProperty(a.jqx.cssroundedcorners(e)));d.base.buttonObj.addClass(d.toThemeProperty(a.jqx.cssroundedcorners(g)))};c.propertyChangeMap.toggled=function(d,f,e,g){d.refresh()};c.propertyChangeMap.disabled=function(d,f,e,g){d.base.disabled=g;d.refresh()};c.addHandler(c.base.host,"click",function(d){if(!c.base.disabled&&c.uiToggle){c.toggle()}});if(!c.isTouchDevice){c.addHandler(c.base.host,"mouseenter",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(c.base.host,"mouseleave",function(d){if(!c.base.disabled){c.refresh()}})}c.addHandler(c.base.host,"mousedown",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(a(document),"mouseup.togglebutton"+c.base.element.id,function(d){if(!c.base.disabled){c.refresh()}})},destroy:function(){this._removeHandlers();this.base.destroy()},_removeHandlers:function(){this.removeHandler(this.base.host,"click");this.removeHandler(this.base.host,"mouseenter");this.removeHandler(this.base.host,"mouseleave");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup.togglebutton"+this.base.element.id)},toggle:function(){this.toggled=!this.toggled;this.refresh();a.jqx.aria(this,"aria-checked",this.toggled)},unCheck:function(){this.toggled=false;this.refresh()},check:function(){this.toggled=true;this.refresh()},refresh:function(){var c=this;var h=c.base.toThemeProperty("jqx-fill-state-disabled");var b=c.base.toThemeProperty("jqx-fill-state-normal");if(!c.base.enableDefault){b=""}var g=c.base.toThemeProperty("jqx-fill-state-hover");var e=c.base.toThemeProperty("jqx-fill-state-pressed");var f=c.base.toThemeProperty("jqx-fill-state-pressed");var d="";c.base.element.disabled=c.base.disabled;if(c.base.disabled){d=b+" "+h;c.base.buttonObj.addClass(d);return}else{if(c.base.isMouseOver&&!c.isTouchDevice){if(c.base.isPressed||c.toggled){d=f}else{d=g}}else{if(c.base.isPressed||c.toggled){d=e}else{d=b}}}if(c.base.template!=="default"&&c.base.template!==""){d+=" jqx-"+c.base.template;if(c.base.theme!=""){d+=" jqx-"+c.template+"-"+c.base.theme}}if(c.base.buttonObj.hasClass(h)&&h!=d){c.base.buttonObj.removeClass(h)}if(c.base.buttonObj.hasClass(b)&&b!=d){c.base.buttonObj.removeClass(b)}if(c.base.buttonObj.hasClass(g)&&g!=d){c.base.buttonObj.removeClass(g)}if(c.base.buttonObj.hasClass(e)&&e!=d){c.base.buttonObj.removeClass(e)}if(c.base.buttonObj.hasClass(f)&&f!=d){c.base.buttonObj.removeClass(f)}if(!c.base.buttonObj.hasClass(d)){c.base.buttonObj.addClass(d)}},_topDocumentMouseupHandler:function(c){var b=this;b.isPressed=false;b.refresh()}})})(jqxBaseFramework); (function(a){a.jqx.jqxWidget("jqxCalendar","",{});a.extend(a.jqx._jqxCalendar.prototype,{defineInstance:function(){var b={disabled:false,restrictedDates:new Array(),multipleMonthRows:1,multipleMonthColumns:1,minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),navigationDelay:400,stepMonths:1,width:null,height:null,value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),firstDayOfWeek:0,showWeekNumbers:false,showDayNames:true,enableWeekend:false,enableOtherMonthDays:true,showOtherMonthDays:true,rowHeaderWidth:25,columnHeaderHeight:25,titleHeight:30,dayNameFormat:"firstTwoLetters",monthNameFormat:"default",titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],enableViews:true,readOnly:false,culture:"default",enableFastNavigation:true,enableHover:true,enableAutoNavigation:true,enableTooltips:false,backText:"Back",forwardText:"Forward",specialDates:new Array(),keyboardNavigation:true,selectionMode:"default",selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],todayString:"Today",clearString:"Clear",showFooter:false,selection:{from:null,to:null},canRender:true,_checkForHiddenParent:true,height:null,rtl:false,view:"month",views:["month","year","decade"],changing:null,change:null,localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["backButtonClick","nextButtonClick","valuechanged","cellMouseDown","cellMouseUp","cellSelected","cellUnselected","change","viewChange"]};if(this===a.jqx._jqxCalendar.prototype){return b}a.extend(true,this,b);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(0);this.minDate._setMinutes(0);this.minDate._setSeconds(0);this.minDate._setMilliseconds(0);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(0);this.maxDate._setMinutes(0);this.maxDate._setSeconds(0);this.maxDate._setMilliseconds(0);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);return b},_createFromInput:function(d){var g=this;if(g.element.nodeName.toLowerCase()=="input"){g.field=g.element;if(g.field.className){g._className=g.field.className}var f={title:g.field.title};if(g.field.value){f.value=g.field.value}if(g.field.checked){f.checked=true}if(g.field.id.length){f.id=g.field.id.replace(/[^\w]/g,"_")+"_"+d}else{f.id=a.jqx.utilities.createId()+"_"+d}if(g.field.getAttribute("min")){var e=new Date(g.field.getAttribute("min"));if(e!="Invalid Date"){g.min=e}}if(g.field.getAttribute("max")){var c=new Date(g.field.getAttribute("max"));if(c!="Invalid Date"){g.max=c}}var i=a("
    ",f);i[0].style.cssText=g.field.style.cssText;if(!g.width){g.width=a(g.field).width()}if(!g.height){g.height=a(g.field).outerHeight()}a(g.field).hide().after(i);var h=g.host.data();g.host=i;g.host.data(h);g.element=i[0];g.element.id=g.field.id;g.field.id=f.id;if(g._className){g.host.addClass(g._className);a(g.field).removeClass(g._className)}if(g.field.tabIndex){var b=g.field.tabIndex;g.field.tabIndex=-1;g.element.tabIndex=b}}},createInstance:function(i){var h=this;h._createFromInput("jqxCalendar");this.setCalendarSize();if(this.element.id===""){this.element.id=a.jqx.utilities.createId()}if(a.type(this.value)=="date"){this.value=a.jqx._jqxDateTimeInput.getDateTime(this.value)}this.element.innerHTML="";this.host.attr("data-role","calendar");var b=this.element.id;var j=this;this.propertyChangeMap.width=function(k,m,l,n){j.setCalendarSize()};this.propertyChangeMap.height=function(k,m,l,n){j.setCalendarSize()};if(a.global){a.global.preferCulture(this.culture)}if(this.culture!="default"){if(a.global){a.global.preferCulture(this.culture);this.localization.calendar=a.global.culture.calendar}else{if(window.Globalize){var d=window.Globalize.culture(this.culture);this.localization.calendar=d.calendar}}this.firstDayOfWeek=this.localization.calendar.firstDay}if(this.localization.backString!="Back"){this.backText=this.localization.backString}if(this.localization.forwardString!="Forward"){this.forwardText=this.localization.forwardString}if(this.localization.todayString!="Today"&&this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString!="Clear"&&this.localization.clearString){this.clearString=this.localization.clearString}if(this.localization.calendar&&this.localization.calendar.firstDay!=undefined&&this.culture!="default"){this.firstDayOfWeek=this.localization.calendar.firstDay}this.setMaxDate(this.max,false);this.setMinDate(this.min,false);if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.host.css("outline","none");this.host.addClass(this.toThemeProperty("jqx-calendar"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this._addInput();if(this.views.indexOf("month")==-1){this.view="year"}if(this.views.indexOf("year")==-1&&this.views.indexOf("month")==-1){this.view="decade"}this.addHandler(this.host,"keydown",function(l){var k=true;if(j.keyboardNavigation){if(j._handleKey!=undefined){k=j._handleKey(l);if(!k){if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}}}}return k});var e=false;var g=this;var f=false;if(j.width!=null&&j.width.toString().indexOf("%")!=-1){f=true}if(j.height!=null&&j.height.toString().indexOf("%")!=-1){f=true}a.jqx.utilities.resize(this.host,function(){var k=g.host.find("#View"+j.element.id);if(!e){e=true;g.render()}else{g.refreshTitle(k)}if(f){if(j.refreshTimer){clearTimeout(j.refreshTimer)}j.refreshTimer=setTimeout(function(){j.refreshControl()},1)}},false,this._checkForHiddenParent);var c="View";this.propertyChangeMap.disabled=function(k,m,l,n){if(n){k.host.addClass(j.toThemeProperty("jqx-fill-state-disabled"))}else{k.host.removeClass(j.toThemeProperty("jqx-fill-state-disabled"))}j.refreshControl()}},_addInput:function(){var b=this.host.attr("name");this.input=a("");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.getDate().toString())},setCalendarSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.css("width",this.width)}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.css("height",this.height)}},_getYearAndMonthPart:function(c){if(!c){return new Date(1900,0,1)}var b=new Date(c.getFullYear(),c.getMonth(),1);return b},_handleKey:function(p){if(this.readOnly){return true}var A=p.keyCode;var y=this;var b=this._getSelectedDate();if(b==undefined){if(this.view=="month"&&(A==37||A==38||A==39||A==40)){this.selectedDate=new Date(this.value.year,this.value.month-1,1);this._selectDate(this.selectedDate,"key");b=this.selectedDate}else{return true}}if(p.altKey){return true}if(this._animating){return false}if(this.view!="month"&&A==13){var d=this._getSelectedCell();this._setDateAndSwitchViews(d,p,"keyboard")}if(this.view=="year"){var w=b.getMonth();var j=this._getYearAndMonthPart(this.getMinDate());var m=this._getYearAndMonthPart(this.getMaxDate());switch(A){case 37:if(w==0){var h=new Date(b.getFullYear()-1,11,1);if(h>=j){this.selectedDate=h;this.navigateBackward()}else{if(this.selectedDate!=j){this.selectedDate=j;this.navigateBackward()}}}else{var h=new Date(b.getFullYear(),w-1,1);if(h>=j){this._selectDate(h,"key")}}return false;case 38:var h=new Date(b.getFullYear(),w-4,1);if(hm){h=m}if(w+4>11){this.selectedDate=h;this.navigateForward()}else{this._selectDate(h,"key")}return false;case 39:if(w==11){var h=new Date(b.getFullYear()+1,0,1);if(h<=m){this.selectedDate=h;this.navigateForward()}else{if(this.selectedDate!=m){this.selectedDate=m;this.navigateForward()}}}else{var h=new Date(b.getFullYear(),w+1,1);if(h<=m){this._selectDate(h,"key")}}return false}return true}if(this.view=="decade"){var o=this._renderStartDate.getFullYear();var k=this._renderEndDate.getFullYear();var n=b.getFullYear();var v=this.getMinDate().getFullYear();var c=this.getMaxDate().getFullYear();switch(A){case 37:if(n-1>=v){if(n<=o){this.selectedDate=new Date(n-1,b.getMonth(),1);this.navigateBackward()}else{this._selectDate(new Date(n-1,b.getMonth(),1),"key")}}return false;case 38:var x=n-4;if(n-4c){x=c}if(x>k){this.selectedDate=new Date(x,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(x,b.getMonth(),1),"key")}return false;case 39:if(n+1<=c){if(n==k){this.selectedDate=new Date(n+1,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(n+1,b.getMonth(),1),"key")}}return false}return true}var u=new a.jqx._jqxDateTimeInput.getDateTime(b);var f=this.getViewStart();var e=this.getViewEnd();var t=u;var s=a.data(this.element,"View"+this.element.id);if(s==undefined||s==null){return true}if(A==36){u._setDay(1);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");return false}if(A==35){var r=this.value._daysInMonth(this.value.year,this.value.month);u._setDay(r);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");return false}var g=1;if(p.ctrlKey){g=12}if(A==34){var z=this.navigateForward(g);if(z){u._addMonths(g);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key")}return false}if(A==33){var z=this.navigateBackward(g);if(z){u._addMonths(-g);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key")}return false}if(A==38){u._addDays(-7);if(u.dateTimethis.getMaxDate()){return false}if(u.dateTime>e){var z=this.navigateForward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q=u.dateTime){this.value.day=l.getDate();this.navigateForward();this._selectDate(u.dateTime,"key");break}}return false}}if(A==37){u._addDays(-1);if(u.dateTimethis.getMaxDate()){return false}if(this._isDisabled(u.dateTime)){return false}this.navigateBackward();this._selectDate(u.dateTime,"key");break}}return false}else{if(A==39){u._addDays(1);if(u.dateTime>this.getMaxDate()){return false}if(u.dateTime>e){var z=this.navigateForward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q=u.dateTime){if(u.dateTimethis.getMaxDate()){return false}this.navigateForward();this._selectDate(u.dateTime,"key");break}}return false}}return true},render:function(){if(!this.canRender){return}this.host.children().remove();var c=this._renderSingleCalendar("View"+this.element.id);var b=this;this.host.append(c)},addSpecialDate:function(b,c,d){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){var e=this.specialDates.length;this.specialDates[e]={Date:b,Class:c,Tooltip:d};this.refreshControl()}},refresh:function(c){var b=this;this.render();setTimeout(function(){b.refreshControl()})},invalidate:function(){this.refreshControl()},refreshControl:function(){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){this.refreshSingleCalendar("View"+this.element.id,null)}},getViewStart:function(){var c=this.getVisibleDate();var b=this.getFirstDayOfWeek(c);return b.dateTime},getViewEnd:function(){var c=this.getViewStart();var b=new a.jqx._jqxDateTimeInput.getDateTime(c);b._addDays(41);return b.dateTime},refreshSingleCalendar:function(e,l){if(!this.canRender){return}var j=this.host.find("#"+e);var f=this.getVisibleDate();var c=this.getFirstDayOfWeek(f);this.refreshCalendarCells(j,c,e);this.refreshTitle(j);this.refreshRowHeader(j,e);if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var b=parseInt(this.month.css("padding-top"));var g=this.host.height()-2*b;var k=g-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){k=this.month.height()-this.titleHeight}if(this.showFooter){k-=20}var d=j.find("#cellsTable"+e);var i=j.find("#calendarRowHeader"+e);d.height(k);i.height(k)},refreshRowHeader:function(s,m){if(!this.showWeekNumbers){return}var c=this.getVisibleDate();var h=this.getFirstDayOfWeek(c);var n=h.dayOfWeek;var t=this.getWeekOfYear(h);var f=new a.jqx._jqxDateTimeInput.getDateTime(new Date(h.dateTime));f._addDays(5);f.dayOfWeek=f.dateTime.getDay();var k=this.getWeekOfYear(f);var e=this.rowHeader.find("table");e.width(this.rowHeaderWidth);var g=h;var q=new Array();for(var p=0;p<6;p++){var o=t.toString();var b=new a.jqx._jqxCalendar.cell(g.dateTime);var l=p+1+this.element.id;var j=a(e[0].rows[p].cells[0]);b.element=j;b.row=p;b.column=0;var d=j.find("#headerCellContent"+l);d.addClass(this.toThemeProperty("jqx-calendar-row-cell"));d[0].innerHTML=t;q[p]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addWeeks(1)));t=this.getWeekOfYear(g)}var r=a.data(this.element,s[0].id);r.rowCells=q;this._refreshOtherMonthRows(r,m)},_refreshOtherMonthRows:function(f,e){if(this.showOtherMonthDays){return}this._displayLastRow(true,e);this._displayFirstRow(true,e);var d=false;var g=false;for(var c=0;c=f.cells.length-7){g=true}}}if(!d){this._displayFirstRow(false,e)}if(!g){this._displayLastRow(false,e)}},_displayLastRow:function(b,c){var g=this.host.find("#"+c);var f=g.find("#calendarRowHeader"+g[0].id).find("table");var d=null;if(this.showWeekNumbers){if(f[0].cells){var d=a(f[0].rows[5])}}var e=a(g.find("#cellTable"+g[0].id)[0].rows[5]);if(b){if(this.showWeekNumbers&&d){d.css("display","table-row")}e.css("display","table-row")}else{if(this.showWeekNumbers&&d){d.css("display","none")}e.css("display","none")}},_displayFirstRow:function(b,c){var e=this.host.find("#"+c);var d=e.find("#calendarRowHeader"+e[0].id).find("table");var f=null;if(this.showWeekNumbers){if(d[0].cells){var f=a(d[0].rows[0])}}var g=a(e.find("#cellTable"+e[0].id)[0].rows[0]);if(b){if(this.showWeekNumbers&&f){f.css("display","table-row")}g.css("display","table-row")}else{if(this.showWeekNumbers&&f){f.css("display","none")}g.css("display","none")}},_renderSingleCalendar:function(q,l){if(!this.canRender){return}var n=this.host.find("#"+q.toString());if(n!=null){n.remove()}var v=a("
    ");var b=this.getVisibleDate();var m=this.getFirstDayOfWeek(b);var e=new a.jqx._jqxDateTimeInput.getDateTime(m.dateTime);e._addMonths(1);var u=a.jqx._jqxCalendar.monthView(m,e,null,null,null,v);if(l==undefined||l==null){this.host.append(v);v[0].style.width="100%";v[0].style.height="100%"}else{l.append(v)}a.data(this.element,q,u);var t=parseInt(v.css("padding-top"));var s=this.host.height()-2*t;var r=s-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){r=s-this.titleHeight}if(this.showFooter){r-=20}if(this.rowHeaderWidth<0){this.rowHeaderWidth=0}if(this.columnHeaderHeight<0){this.columnHeaderHeight=0}if(this.titleHeight<0){this.titleHeight=0}var g=this.rowHeaderWidth;var k=this.columnHeaderHeight;if(!this.showWeekNumbers){g=0}if(!this.showDayNames){k=0}var x="
    ";var c="
    ";var p="";v[0].innerHTML=x+c+p;this.header=v.find("#calendarHeader");this.header[0].id="calendarHeader"+q;this.header.addClass(this.toThemeProperty("calendar-header"));this.columnHeader=v.find("#calendarColumnHeader");this.columnHeader[0].id="calendarColumnHeader"+q;this.table=v.find("#cellsTable");this.table[0].id="cellsTable"+q;this.rowHeader=v.find("#calendarRowHeader");this.rowHeader[0].id="calendarRowHeader"+q;this.selectCell=v.find("#selectCell");this.selectCell[0].id="selectCell"+q;this.title=v.find("#calendarTitle");this.title[0].id="calendarTitle"+q;this.leftButton=v.find("#leftNavigationArrow");this.leftButton[0].id="leftNavigationArrow"+q;this.titleHeader=v.find("#calendarTitleHeader");this.titleHeader[0].id="calendarTitleHeader"+q;this.rightButton=v.find("#rightNavigationArrow");this.rightButton[0].id="rightNavigationArrow"+q;this.footer=v.find("#calendarFooter");this._footer=v.find("#footer");this._footer[0].id="footer"+q;this.footer[0].id="calendarFooter"+q;this.todayButton=v.find("#todayButton");this.todayButton[0].id="todayButton"+q;this.doneButton=v.find("#doneButton");this.doneButton[0].id="doneButton"+q;this.title.addClass(this.toThemeProperty("jqx-calendar-title-container"));var d=20;if(this.showFooter){this._footer.css("display","block")}v.find("tr").addClass(this.toThemeProperty("jqx-reset"));v.addClass(this.toThemeProperty("jqx-widget-content"));v.addClass(this.toThemeProperty("jqx-calendar-month-container"));this.month=v;this.selectCell.addClass(this.toThemeProperty("jqx-reset"));this.selectCell.addClass(this.toThemeProperty("jqx-calendar-top-left-header"));if(this.showWeekNumbers){this._renderRowHeader(v)}else{this.table[0].colSpan=3;this.columnHeader[0].colSpan=3;this.rowHeader.css("display","none");this.selectCell.css("display","none")}if(this.showFooter){this.footer.height(20);var j=a(""+this.todayString+"");j.appendTo(this.todayButton);var i=a(""+this.clearString+"");i.appendTo(this.doneButton);i.addClass(this.toThemeProperty("jqx-calendar-footer"));j.addClass(this.toThemeProperty("jqx-calendar-footer"));var o=this;var f="mousedown";if(a.jqx.mobile.isTouchDevice()){f=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(j,f,function(){if(o.today){o.today()}else{o.setDate(new Date(),"mouse")}return false});this.addHandler(i,f,function(){if(o.clear){o.clear()}else{o.setDate(null,"mouse")}return false})}if(this.view!="month"){this.header.hide()}if(this.showDayNames&&this.view=="month"){this.renderColumnHeader(v)}this.oldView=this.view;this.renderCalendarCells(v,m,q);if(l==undefined||l==null){this.renderTitle(v)}this._refreshOtherMonthRows(u,q);v.find("tbody").css({border:"none",background:"transparent"});if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var w=this;this.addHandler(this.host,"focus",function(){w.focus()});return v},_getTitleFormat:function(){switch(this.view){case"month":return this.titleFormat[0];case"year":return this.titleFormat[1];case"decade":return this.titleFormat[2];case"centuries":return this.titleFormat[3]}},renderTitle:function(t){var k=a("
    ");var l=a("
    ");var o=this.title;o.addClass(this.toThemeProperty("jqx-reset"));o.addClass(this.toThemeProperty("jqx-widget-header"));o.addClass(this.toThemeProperty("jqx-calendar-title-header"));var e=o.find("td");if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(e.css("background-color")!="transparent"){var g=o.css("background-color");e.css("background-color",g)}if(e.css("background-image")!="transparent"){var d=o.css("background-image");var p=o.css("background-repeat");var c=o.css("background-position");e.css("background-image",d);e.css("background-repeat",p);e.css("background-position","left center scroll")}}else{e.css("background-color","transparent")}if(this.disabled){o.addClass(this.toThemeProperty("jqx-calendar-title-header-disabled"))}k.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));k.addClass(this.toThemeProperty("jqx-icon-arrow-left"));k.appendTo(this.leftButton);var m=this.leftButton;l.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));l.addClass(this.toThemeProperty("jqx-icon-arrow-right"));l.appendTo(this.rightButton);var b=this.rightButton;if(this.enableTooltips){if(a(m).jqxTooltip){a(m).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.backText});a(b).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.forwardText})}}var n=this.titleHeader;var v=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var q=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}else{if(this.view=="centuries"){var q=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}}var f=a("
    "+v+"
    ");n.append(f);f.addClass(this.toThemeProperty("jqx-calendar-title-content"));var s=parseInt(k.width());var i=t.width()-2*s;var r=n.find(".jqx-calendar-title-content").width(i);a.data(k,"navigateLeft",this);a.data(l,"navigateRight",this);var h=a.jqx.mobile.isTouchDevice();if(!this.disabled){var u=this;this.addHandler(n,"mousedown",function(A){if(u.enableViews){if(!u._viewAnimating&&!u._animating){var x=u.view;u.oldView=x;switch(u.view){case"month":u.view="year";break;case"year":u.view="decade";break}if(u.views.indexOf("year")==-1&&u.view=="year"){u.view="decade"}if(u.views.indexOf("decade")==-1&&u.view=="decade"){u.view=x}if(x!=u.view){var z="View"+u.element.id;var B=u.host.find("#"+z);var y=u.getVisibleDate();var w=u.getFirstDayOfWeek(y);u.renderCalendarCells(B,w,z,true);u.refreshTitle(B);u._raiseEvent("8")}}return false}});this.addHandler(k,"mousedown",function(x){if(!u._animating){a.data(k,"navigateLeftRepeat",true);var w=a.data(k,"navigateLeft");if(w.enableFastNavigation&&!h){w.startRepeat(w,k,true,u.navigationDelay+200)}w.navigateBackward(u.stepMonths,"arrow");x.stopPropagation();x.preventDefault();return w._raiseEvent(0,x)}else{return false}});this.addHandler(k,"mouseup",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(k,"mouseleave",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(l,"mousedown",function(x){if(!u._animating){a.data(l,"navigateRightRepeat",true);var w=a.data(l,"navigateRight");if(w.enableFastNavigation&&!h){w.startRepeat(w,l,false,u.navigationDelay+200)}w.navigateForward(u.stepMonths,"arrow");x.stopPropagation();x.preventDefault();return w._raiseEvent(1,x)}else{return false}});this.addHandler(l,"mouseup",function(w){a.data(l,"navigateRightRepeat",false)});this.addHandler(l,"mouseleave",function(w){a.data(l,"navigateRightRepeat",false)})}},refreshTitle:function(f){var g=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var d=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}else{if(this.view=="centuries"){var d=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}}var e=this.titleHeader;if(this.titleHeader){var c=e.find(".jqx-calendar-title-content");var h=a("
    "+g+"
    ");e.append(h);h.addClass(this.toThemeProperty("jqx-calendar-title-content"));if(c!=null){c.remove()}}},startRepeat:function(d,b,f,e){var c=window.setTimeout(function(){var g=a.data(b,"navigateLeftRepeat");if(!f){g=a.data(b,"navigateRightRepeat")}if(g){if(e<25){e=25}if(f){d.navigateBackward(1,"arrow");d.startRepeat(d,b,true,e)}else{d.navigateForward(1,"arrow");c=d.startRepeat(d,b,false,e)}}else{window.clearTimeout(c);return}},e)},navigateForward:function(h,g){if(h==undefined||h==null){h=this.stepMonths}var f=this.value.year;if(this.view=="decade"){f=this._renderStartDate.getFullYear()+12;if(this._renderEndDate.getFullYear()>=this.getMaxDate().getFullYear()){return}}else{if(this.view=="year"){f=this.value.year+1}else{if(this.view=="centuries"){f=this.value.year+100}}}if(this.view!="month"){var b=this.getMaxDate().getFullYear();if(bb){f=b}if(this.value.year==f){if(this.view==="decade"){if(this.value.year>this._renderEndDate.getFullYear()){this.value.year=f;this.value.month=1;this.value.day=1}else{return}}else{return}}this.value.year=f;this.value.month=1;this.value.day=1}var c=this.value.day;var i=this.value.month;if(i+h<=12){var e=this.value._daysInMonth(this.value.year,this.value.month+h);if(c>e){c=e}}if(this.view=="month"){var d=new Date(this.value.year,this.value.month-1+h,c);if(g=="arrow"&&this.selectableDays.length==7&&this.selectionMode!="range"){this.selectedDate=new Date(this.value.year,this.value.month-1+h,1)}}else{var d=new Date(this.value.year,this.value.month-1,c)}return this.navigateTo(d)},navigateBackward:function(g,f){if(g==undefined||g==null){g=this.stepMonths}var e=this.value.year;if(this.view=="decade"){e=this._renderStartDate.getFullYear()-12}else{if(this.view=="year"){e=this.value.year-1}else{if(this.view=="centuries"){e=this.value.year-100}}}if(this.view!="month"){var i=this.getMinDate().getFullYear();if(e=1){var d=this.value._daysInMonth(this.value.year,this.value.month-g);if(b>d){b=d}}if(this.view=="month"){var c=new Date(this.value.year,this.value.month-1-g,b);if(f=="arrow"&&this.selectableDays.length==7&&this.selectionMode!="range"){this.selectedDate=new Date(this.value.year,this.value.month-1-g,1)}}else{var c=new Date(this.value.year,this.value.month-1,b)}return this.navigateTo(c)},_isRestrictedRange:function(d,c){if(d>c){return true}var b=d;while(b.valueOf()<=c.valueOf()){if(this._isRestrictedDate(b)){return true}b.setDate(b.getDate()+1)}return false},_hasUnrestrictedRanges:function(d,c){if(d>c){return false}var b=d;while(b.valueOf()<=c.valueOf()){if(!this._isRestrictedDate(b)){return true}b.setDate(b.getDate()+1)}return false},_getNextUnrestrictedDay:function(d,c){if(d>c){return null}var b=d;while(b.valueOf()<=c.valueOf()){if(!this._isRestrictedDate(b)){return b}b.setDate(b.getDate()+1)}return null},_isRestrictedDate:function(d){var c=this;if(!a.isArray(c.restrictedDates)){return false}for(var g=0;g=f.valueOf()&&d.valueOf()<=e.valueOf()){return true}}else{if(b.getMonth()==d.getMonth()&&b.getDate()==d.getDate()&&b.getFullYear()==d.getFullYear()){return true}}}return false},_isDisabled:function(d){var e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var b=d.getDay();var c=e[b];if(this.selectableDays.indexOf(c)==-1){return true}if(this._isRestrictedDate(d)){return true}return false},refreshCalendarCells:function(x,f,m){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.refreshViews(x,f,m);return}var s=this.table;var q=s.find("#cellTable"+m.toString());var e=f;var c=new Array();var n=0;var u=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var p=0;p<6;p++){for(var o=0;o<7;o++){var d=p+1;var h=o;if(this.rtl){h=6-h}var t=h+1;var l="#cell"+d+t+this.element.id;var w=new Date(e.dateTime.getFullYear(),e.dateTime.getMonth(),e.dateTime.getDate());var b=new a.jqx._jqxCalendar.cell(w);var g=a(q[0].rows[p].cells[t-1]);g[0].id=l.substring(1);b.element=g;b.row=p;b.column=o;b.isVisible=true;b.isOtherMonth=false;b.isToday=false;b.isWeekend=false;b.isHighlighted=false;b.isSelected=false;if(e.month!=this.value.month){b.isOtherMonth=true;b.isVisible=this.showOtherMonthDays}if(this._isRestrictedDate(w)){b.isRestricted=true;b.isDisabled=true}if(!b.isDisabled){if(wthis.getMaxDate()||this._isDisabled(w)){b.isDisabled=true}}if(e.month==u.month&&e.day==u.day&&e.year==u.year){b.isToday=true}if(e.isWeekend()){b.isWeekend=true}a.data(this.element,"cellContent"+l.substring(1),b);a.data(this.element,l.substring(1),b);c[n]=b;n++;a.jqx.utilities.html(g,e.day);this._applyCellStyle(b,g,g);e=new a.jqx._jqxDateTimeInput.getDateTime(new Date(e._addDays(1)))}}var v=a.data(this.element,x[0].id);if(v!=undefined&&v!=null){v.cells=c}this.renderedCells=c;this._refreshOtherMonthRows(v,m)},_getDecadeAndCenturiesData:function(){var k=new Array();var p=new Array();var c=this.getMaxDate().getFullYear()-this.getMinDate().getFullYear();if(c<12){c=12}var f=this.getMinDate();var b=this.getMaxDate();var l=this.value.dateTime.getFullYear();if(this.view=="decade"){if(l+12>b.getFullYear()){l=b.getFullYear()-11}if(l=f.getFullYear()&&n.getFullYear()<=b.getFullYear()){k.push("-"+n.getFullYear()+"-"+(n.getFullYear()+9));p.push(n);if(e==0){this._renderCenturyStartDate=n}this._renderCenturyEndDate=new Date(n.getFullYear()+9,0,1)}}break}}}}return{years:k,dates:p}},refreshViews:function(A,m,s){var B=this;var c=new Array();var w=A.find("#cellTable"+s.toString());var D=this._getDecadeAndCenturiesData();var l=D.years;var C=D.dates;var t=0;var f=this.getMinDate();var n=this.getMaxDate();for(var v=0;v<3;v++){for(var u=0;u<4;u++){var d=v+1;var q=u;if(this.rtl){q=3-q}var x=q+1;var z=new Date(this.value.dateTime);z.setDate(1);z.setMonth(v*4+q);var b=new a.jqx._jqxCalendar.cell(z);var e=w[0].rows["row"+(1+v)+this.element.id];var o=a(e.cells[u]);b.isSelected=false;b.isVisible=true;b.element=o;b.row=v;b.column=u;b.index=c.length;var p="";if(this.view=="year"){var h=this.localization.calendar.months.names;var g=h[v*4+q];switch(this.monthNameFormat){case"default":g=this.localization.calendar.months.namesAbbr[v*4+q];break;case"shortest":g=this.localization.calendar.months.namesShort[v*4+q];break;case"firstTwoLetters":g=g.substring(0,2);break;case"firstLetter":g=g.substring(0,1);break}p=g}else{if(this.view=="decade"||this.view=="centuries"){p=l[v*4+q];if(undefined==p){p="2013"}b.setDate(C[v*4+q])}}var z=b.getDate();if(this.view=="year"){if(z.getMonth()==this.getDate().getMonth()&&z.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}}else{if(z.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}}if(this.view=="year"){if(this._getYearAndMonthPart(z)this._getYearAndMonthPart(n)){b.isDisabled=true}}else{if(z.getFullYear()n.getFullYear()){b.isDisabled=true}}a.jqx.utilities.html(o,p);c[t]=b;t++}}var y=a.data(this.element,A[0].id);if(y!=undefined&&y!=null){y.cells=c}this.renderedCells=c;this._applyCellStyles()},_createViewClone:function(){var b=this.host.find(".jqx-calendar-month");var c=b.clone();c.css("position","absolute");c.css("top",b.position().top);c.width(this.month.width());return c},_addCellsTable:function(h,g){var e=this;var c=this.showFooter?20:0;if(this.view!="month"){g.height(this.month.height()-this.titleHeight)}else{g.height(this.month.height()-this.titleHeight-this.columnHeaderHeight-c)}this._viewAnimating=true;var b=this.host.find(".jqx-calendar-month-container");b.css("position","relative");var d=this.host.find(".jqx-calendar-month");var f=this._createViewClone();b.append(f);if(this.view!="month"){this.header.fadeOut(0);if(this.showWeekNumbers){this.rowHeader.fadeOut(0)}if(this.showFooter){this._footer.fadeOut(0)}}else{this.header.fadeIn(this.navigationDelay+200);if(this.showWeekNumbers){this.rowHeader.fadeIn(this.navigationDelay+200)}if(this.showFooter){this._footer.fadeIn(this.navigationDelay+200)}}h.children().remove();h.append(g);this._animateViews(f,g,function(){if(!e.selectedDate&&e.selectionMode!="range"){e.selectedDate=e.renderedCells[0].getDate()}try{e.renderedCells[0].element.focus();setTimeout(function(){e.renderedCells[0].element.focus()},10)}catch(i){}e._viewAnimating=false});g.addClass(this.toThemeProperty("jqx-calendar-view"))},_animateViews:function(c,b,e){var d=this;d._viewAnimating=true;if(d.oldView==d.view){c.remove();b.fadeOut(0);b.fadeIn(0);e();return}c.fadeOut(this.navigationDelay+100,function(){c.remove()});b.fadeOut(0);b.fadeIn(this.navigationDelay+200,function(){e()})},focus:function(){if(this.disabled){return}try{if(this.renderedCells&&this.renderedCells.length>0){var d=this;var c=false;if(!d.selectedDate&&d.selectionMode!="range"){this.setDate(new Date(),"mouse")}this.element.focus()}}catch(b){}},renderViews:function(E,n,v){var F=this;var e=new Array();var z=a("
    ");var q=this.host.find(".jqx-calendar-month-container");q.css("position","relative");var A=E.find("#cellsTable"+E[0].id);A[0].style.borderColor="transparent";var I=this._getDecadeAndCenturiesData();var m=I.years;var H=I.dates;var w=0;var g=this.getMinDate();var o=this.getMaxDate();var t=new Date(this.value.dateTime);t.setDate(1);for(var y=0;y<3;y++){for(var x=0;x<4;x++){var d=y+1;var u=x;if(this.rtl){u=3-u}var B=u+1;var f=z[0].rows["row"+(1+y)+this.element.id];var D=new Date(t);D.setMonth(y*4+u);var c=new a.jqx._jqxCalendar.cell(D);var p=a(f.cells[x]);c.isVisible=true;c.element=p;c.row=y;c.column=x;c.index=e.length;c.isSelected=false;var s="";if(this.view=="year"){if(D.getMonth()==this.getDate().getMonth()&&D.getFullYear()==this.getDate().getFullYear()){c.isSelected=true}var l=this.localization.calendar.months.names;var h=l[y*4+u];switch(this.monthNameFormat){case"default":h=this.localization.calendar.months.namesAbbr[y*4+u];break;case"shortest":h=this.localization.calendar.months.namesShort[y*4+u];break;case"firstTwoLetters":h=h.substring(0,2);break;case"firstLetter":h=h.substring(0,1);break}s=h}else{if(this.view=="decade"||this.view=="centuries"){s=m[y*4+u];c.setDate(H[y*4+u]);if(c.getDate().getFullYear()==this.getDate().getFullYear()){c.isSelected=true}if(undefined==s){s="2013"}}}var D=c.getDate();if(this.view=="year"){var b=new Date(D);b.setDate(1);b.setHours(0,0,0,0);b.setMonth(D.getMonth()+1);b=new Date(b.valueOf()-1);if(this._getYearAndMonthPart(D)this._getYearAndMonthPart(o)||!this._hasUnrestrictedRanges(D,b)){c.isDisabled=true}}else{var G=new Date(D);G.setMonth(0);G.setDate(1);G.setHours(0,0,0,0);G.setFullYear(D.getFullYear()+1);G=new Date(G.valueOf()-1);if(D.getFullYear()o.getFullYear()||!this._hasUnrestrictedRanges(D,G)){c.isDisabled=true}}a.jqx.utilities.html(p,s);e[w]=c;w++}}a.each(e,function(){var j=this.element;var i=this;if(!F.disabled){F.addHandler(j,"mousedown",function(k){F._setDateAndSwitchViews(i,k,"mouse")});F.addHandler(j,"mouseover",function(r){var k=F.renderedCells[i.index];if(F.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=true;F._applyCellStyle(k,k.element,k.element)});F.addHandler(j,"mouseout",function(r){var k=F.renderedCells[i.index];if(F.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=false;F._applyCellStyle(k,k.element,k.element)})}});var C=a.data(this.element,E[0].id);if(C!=undefined&&C!=null){C.cells=e}this.renderedCells=e;this._addCellsTable(A,z);this._applyCellStyles()},_setDateAndSwitchViews:function(m,d,j){if(!this._viewAnimating&&!this._animating){var g=this.getDate();var e=this.renderedCells[m.index].getDate();var k=this.value.dateTime.getDate();var l=new Date(e);if(this.views.indexOf("month")!=-1){l.setDate(k)}else{l.setDate(1);e.setDate(1)}if(l.getMonth()==e.getMonth()){e=l}var i=this.getMinDate();var c=this.getMaxDate();if(this.view=="year"){if(this._getYearAndMonthPart(e)this._getYearAndMonthPart(c)){return}}else{if(e.getFullYear()c.getFullYear()){return}}if(this.selectionMode!="range"){this._selectDate(e,j)}this.oldView=this.view;switch(this.view){case"year":this.view="month";break;case"decade":this.view="year";break}if(this.views.indexOf("month")==-1){this.view="year"}if(this.views.indexOf("year")==-1){this.view="decade"}if(this.view=="year"){if(this._getYearAndMonthPart(e)this._getYearAndMonthPart(c)){e=c}}else{if(e.getFullYear()c.getFullYear()){e=c}}if(this.changing&&(this.selectedDate&&(this.selectedDate.getFullYear()!=e.getFullYear()||this.selectedDate.getMonth()!=e.getMonth()||this.selectedDate.getDate()!=e.getDate()))){e=this.selectedDate}this.value._setYear(e.getFullYear());this.value._setDay(e.getDate());this.value._setMonth(e.getMonth()+1);this.value._setDay(e.getDate());var h=this.getVisibleDate();var b=this.getFirstDayOfWeek(h);var f="View"+this.element.id;this.renderCalendarCells(this.month,b,f,true);this.refreshTitle(this.month);if(this.showWeekNumbers){this.refreshRowHeader(this.month,f)}if(this.views.length==3){if(this.view=="month"){if(this.selectionMode!="range"){this._selectDate(this.selectedDate,"view")}else{var n=this;a.each(this.renderedCells,function(r){var o=this;var t=o.getDate();var p=a(o.element);var q=p;if(p.length==0){return false}var s=function(v){if(v==null){return new Date()}var u=new Date();u.setHours(0,0,0,0);u.setFullYear(v.getFullYear(),v.getMonth(),v.getDate());return u};if(!o.isOtherMonth&&s(t).toString()==s(e).toString()){n.value._setMonth(e.getMonth()+1);n.value._setDay(e.getDate());n.value._setYear(e.getFullYear())}o.isSelected=false;o.isDisabled=false;if(s(t)t){o.isDisabled=true}if(n._isDisabled(t)){o.isDisabled=true}if(!o.isDisabled){if(s(t)>=s(n.selection.from)&&s(t)<=s(n.selection.to)){o.isSelected=true}}});this._applyCellStyles()}}}if(this.view!="month"){if(this.oldView=="year"||(this.views.indexOf("year")==-1&&this.view=="decade")){if(j!="keyboard"){this._raiseEvent("3")}this._raiseEvent("5",{selectionType:"mouse"})}}this._raiseEvent("8")}},renderCalendarCells:function(D,m,s,q){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.renderViews(D,m,s);return}var x=a("
    ");var y=this.table;y[0].style.borderColor="transparent";if(q==undefined){var g=y.find("#cellTable"+s.toString());if(g!=null){g.remove()}y.append(x)}var l=m;var b=this.showDayNames?1:0;var f=this.showWeekNumbers?1:0;var d=new Array();var t=0;var v=(D.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){v=(D.width()-2)/7}v=parseInt(v);var A=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var w=0;w<6;w++){for(var u=0;u<7;u++){var e=w+1;var o=u;if(this.rtl){o=6-o}var z=o+1;var p="#cell"+e+z+this.element.id;var C=new Date(l.dateTime.getFullYear(),l.dateTime.getMonth(),l.dateTime.getDate());var c=new a.jqx._jqxCalendar.cell(C);var n=a(x[0].rows[w].cells[z-1]);n[0].id=p.substring(1);c.isVisible=true;c.isDisabled=false;if(l.month!=this.value.month){c.isOtherMonth=true;c.isVisible=this.showOtherMonthDays}if(this._isRestrictedDate(C)){c.isRestricted=true;c.isDisabled=true}if(!c.isDisabled){if(Cthis.getMaxDate()||this._isDisabled(C)){c.isDisabled=true}}if(l.month==A.month&&l.day==A.day&&l.year==A.year){c.isToday=true}if(l.isWeekend()){c.isWeekend=true}c.element=n;c.row=b;c.column=f;a.jqx.utilities.html(n,l.day);l=new a.jqx._jqxDateTimeInput.getDateTime(new Date(l._addDays(1)));a.data(this.element,"cellContent"+p.substring(1),c);a.data(this.element,""+p.substring(1),c);var E=this;if(E.isMaterialized()){a(n).addClass("ripple");a.jqx.ripple(a(n))}this.addHandler(n,"mousedown",function(I){if(!E.readOnly&&!E.disabled){var H=a(I.target);var j=a.data(E.element,H[0].id);var i=E._raiseEvent(3,I);if(j!=null&&j!=undefined){var r=j.getDate();if(E.getMinDate()<=r&&r<=E.getMaxDate()){if(!j.isDisabled){if(j.isOtherMonth&&E.enableAutoNavigation){if(j.row<2){E.navigateBackward()}else{E.navigateForward()}E._selectDate(j.getDate(),"mouse",I.shiftKey)}else{var F=new Date(E.getDate());E._selectDate(j.getDate(),"mouse",I.shiftKey);E.value._setYear(r.getFullYear());E.value._setDay(1);E.value._setMonth(r.getMonth()+1);E.value._setDay(r.getDate());var G=E.host.find(".jqx-calendar-month");G.stop();G.css("margin-left","0px");var k=E.getDate();E._raiseEvent("2");if(j.isOtherMonth){E._raiseEvent("5",{selectionType:"mouse"})}}}}}return false}});if(!E.disabled){var h=function(F,j){if(!E.readOnly){var r=a(F.target);var i=a.data(E.element,r[0].id);if(i!=null&&i!=undefined){var k=i.getDate();if(E.getMinDate()<=k&&k<=E.getMaxDate()){i.isHighlighted=j;E._applyCellStyle(i,i.element,r)}}}};this.addHandler(n,"mouseenter",function(i){h(i,true);return false});this.addHandler(n,"mouseleave",function(i){h(i,false);return false})}f++;d[t]=c;t++}f=0;b++}var B=a.data(this.element,D[0].id);if(B!=undefined&&B!=null){B.cells=d}this.renderedCells=d;if(q!=undefined){this._addCellsTable(y,x)}this._applyCellStyles();this._refreshOtherMonthRows(B,s)},setMaxDate:function(b,c){if(b!=null&&typeof(b)=="string"){b=new Date(b);if(b=="Invalid Date"){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(c!==false){this.render()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b!=null&&typeof(b)=="string"){b=new Date(b);if(b=="Invalid Date"){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(c!==false){this.render()}},getMinDate:function(){if(this.minDate!=null&&this.minDate!=undefined){return this.minDate.dateTime}return null},navigateTo:function(g,i){if(this.view=="month"){var h=this.getMinDate();var d=new Date(this.getMaxDate().getFullYear(),this.getMaxDate().getMonth()+1,this.getMaxDate().getDate());if((gthis._getYearAndMonthPart(d))){return false}}else{if(g&&(g.getFullYear()this.getMaxDate().getFullYear())){return false}}if(g==null){return false}if(i==undefined){var j=this;if(this._animating){return}this._animating=true;var e=this.host.find(".jqx-calendar-month-container");var k=a("
    ");k[0].style.width="100%";k[0].style.height="100%";k[0].style.overflow="hidden";k[0].style.position="relative";k[0].style.left="0px";k[0].style.top="-100%";e.append(k);if(this._viewClone){this._viewClone.stop();this._viewClone.remove()}if(this._newViewClone){this._newViewClone.stop();this._newViewClone.remove()}var m=this.host.find(".jqx-calendar-month");m.stop();m.css("margin-left","0px");var b=m.clone();this._viewClone=b;var l=new Date(this.value.dateTime);this.value._setYear(g.getFullYear());this.value._setDay(g.getDate());this.value._setMonth(g.getMonth()+1);var c=parseInt(this.month.css("padding-top"));j.refreshControl();k.css("overflow","hidden");e.css("position","relative");e.css("overflow","hidden");b.css("position","absolute");b.css("top",m.position().top-c);k.append(b);if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.month.css("position","relative");this.month.css("overflow","hidden");this.table.css("position","relative");this.table.css("overflow","hidden")}var f=-this.month.width();if(go){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isDisabled=true;w.isRestricted=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}k._applyCellStyle(w,v,l);return true}if(r==0){if(g!="none"){if(k._clicks==undefined){k._clicks=0}k._clicks++;if(c){k._clicks++}if(k._clicks==1){k.selection={from:d,to:d}}else{var u=k.selection.from;var q=u<=d?u:d;var t=u<=d?d:u;if(q){var m=new Date(q.getFullYear(),q.getMonth(),q.getDate())}if(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59)}k.selection={from:m,to:n};k._clicks=0}}else{if(k.selection==null||k.selection.from==null){k.selection={from:d,to:d};if(k._clicks==undefined){k._clicks=0}k._clicks++;if(k._clicks==2){k._clicks=0}}}}var p=function(y){if(y==null){return new Date()}var x=new Date();x.setHours(0,0,0,0);x.setFullYear(y.getFullYear(),y.getMonth(),y.getDate());return x};if(!w.isOtherMonth&&p(o).toString()==p(d).toString()){k.value._setMonth(d.getMonth()+1);k.value._setDay(d.getDate());k.value._setYear(d.getFullYear());k._raiseEvent("2");k._raiseEvent("5",{selectionType:g})}w.isSelected=false;w.isDisabled=h;if(p(o)o){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isRestricted=true;w.isDisabled=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}if(!w.isDisabled){if(p(o)>=p(k.selection.from)&&p(o)<=p(k.selection.to)){w.isSelected=true}}else{if(!k.allowRestrictedDaysInRange&&p(o)>=p(k.selection.from)&&k.selection.to==k.selection.from){h=true}}}}}k._applyCellStyle(w,v,l)});if(k.selectionMode=="range"&&k._clicks==0){k._raiseEvent(7,{selectionType:g});return}else{if(k.selectionMode=="range"){return}}if(e!=d){k._raiseEvent(7,{selectionType:g});if(this.change){this.change(d)}}},_getSelectedDate:function(){var d=a.data(this.element,"View"+this.element.id);if(d==undefined||d==null){return}if(this.view!="month"){return this.selectedDate}for(var c=0;c0&&g.html().toLowerCase().indexOf("span")!=-1){g.css("cursor","default")}}}g.removeAttr("aria-selected");if(c.isSelected&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected");b+=" "+this.toThemeProperty("jqx-fill-state-pressed");g.attr("aria-selected",true);this.host.removeAttr("aria-activedescendant").attr("aria-activedescendant",g[0].id);var f=c.getDate();if(this._isDisabled(f)){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected-invalid")}}if(c.isHighlighted&&c.isVisible&&this.enableHover){if(!c.isDisabled){b+=" "+this.toThemeProperty("jqx-calendar-cell-hover");b+=" "+this.toThemeProperty("jqx-fill-state-hover")}}b+=" "+this.toThemeProperty("jqx-calendar-cell-"+this.view);if(c.isToday&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-today")}g[0].className=b;if(this.specialDates.length>0){var h=this;a.each(this.specialDates,function(){if(this.Class!=undefined&&this.Class!=null&&this.Class!=""){g.removeClass(this.Class)}else{g.removeClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))}var i=c.getDate();if(i.getFullYear()==this.Date.getFullYear()&&i.getMonth()==this.Date.getMonth()&&i.getDate()==this.Date.getDate()){if(c.tooltip==null&&this.Tooltip!=null){c.tooltip=this.Tooltip;if(a(g).jqxTooltip){var j=this.Class;a(g).jqxTooltip({value:{cell:c,specialDate:this.Date},name:h.element.id,content:this.Tooltip,position:"mouse",theme:h.theme,opening:function(k){if(g.hasClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))){return true}if(g.hasClass(j)){return true}return false}})}}g.removeClass(e.toThemeProperty("jqx-calendar-cell-othermonth"));g.removeClass(e.toThemeProperty("jqx-calendar-cell-weekend"));if(this.Class==undefined||this.Class==""){g.addClass(e.toThemeProperty("jqx-calendar-cell-specialDate"));return false}else{g.addClass(this.Class);return false}}})}},_applyCellStyles:function(){var f=a.data(this.element,"View"+this.element.id);if(f==undefined||f==null){return}for(var e=0;e=0?i:i+7);var c=Math.floor((j.getTime()-e.getTime()-(j.getTimezoneOffset()-e.getTimezoneOffset())*60000)/86400000)+1;var f;if(i<4){f=Math.floor((c+i-1)/7)+1;if(f>52){var g=new Date(j.getFullYear()+1,0,1);var b=g.getDay()-h;b=b>=0?b:b+7;f=b<4?1:53}}else{f=Math.floor((c+i-1)/7)}return f},renderColumnHeader:function(w){if(!this.showDayNames){return}var t=a("
    ");t.find("table").addClass(this.toThemeProperty("jqx-reset"));t.find("tr").addClass(this.toThemeProperty("jqx-reset"));t.find("td").css({background:"transparent",padding:1,margin:0,border:"none"});t.addClass(this.toThemeProperty("jqx-reset"));t.addClass(this.toThemeProperty("jqx-widget-content"));t.addClass(this.toThemeProperty("jqx-calendar-column-header"));this.columnHeader.append(t);var d=this.getVisibleDate();var h=this.getFirstDayOfWeek(d);var m=h.dayOfWeek;var x=this.getWeekOfYear(h);var q=this.firstDayOfWeek;var v=this.localization.calendar.days.names;var n=new Array();var g=h;var o=(w.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){o=(w.width()-2)/7}for(var s=0;s<7;s++){var f=v[q];if(this.rtl){f=v[6-q]}switch(this.dayNameFormat){case"default":f=this.localization.calendar.days.namesAbbr[q];if(this.rtl){f=this.localization.calendar.days.namesAbbr[6-q]}break;case"shortest":f=this.localization.calendar.days.namesShort[q];if(this.rtl){f=this.localization.calendar.days.namesShort[6-q]}break;case"firstTwoLetters":f=f.substring(0,2);break;case"firstLetter":f=f.substring(0,1);break}var b=new a.jqx._jqxCalendar.cell(g.dateTime);var k=s+1;var l=k+this.element.id;var j=a(t[0].rows[0].cells[s]);var p=s;if(this.enableTooltips){if(a(j).jqxTooltip){a(j).jqxTooltip({name:this.element.id,content:v[q],theme:this.theme,position:"mouse"})}}if(q>=6){q=0}else{q++}s=p;b.element=j;b.row=0;b.column=s+1;var e=this._textwidth(f);var c="
    "+f+"
    ";j.append(c);j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell"));j.width(o);if(this.disabled){j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell-disabled"))}if(e>0&&o>0){while(e>j.width()){if(f.length==0){break}f=f.substring(0,f.length-1);a.jqx.utilities.html(j.find("#columnCell"+l),f);e=this._textwidth(f)}}n[s]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addDays(1)))}if(parseInt(this.columnHeader.width())>parseInt(this.month.width())){this.columnHeader.width(this.month.width())}var u=a.data(this.element,w[0].id);u.columnCells=n},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}else{if(document.Globalize){window.Globalize=document.Globalize;f=true}}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){a.global.culture.calendar=this.localization.calendar;return a.global.format(d,e,this.culture)}else{if(f){try{if(window.Globalize.cultures[this.culture]){window.Globalize.cultures[this.culture].calendar=this.localization.calendar;return window.Globalize.format(d,e,this.culture)}else{return window.Globalize.format(d,e,this.culture)}}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}},_textwidth:function(d){var c=a(""+d+"");c.addClass(this.toThemeProperty("jqx-calendar-column-cell"));a(this.host).append(c);var b=c.width();c.remove();return b},_textheight:function(d){var c=a(""+d+"");a(this.host).append(c);var b=c.height();c.remove();return b},_renderRowHeader:function(k){var g=this.getVisibleDate();var c=this.getFirstDayOfWeek(g);var f=c.dayOfWeek;var s=this.getWeekOfYear(c);var o=new a.jqx._jqxDateTimeInput.getDateTime(new Date(c.dateTime));o._addDays(5);o.dayOfWeek=o.dateTime.getDay();var m=this.getWeekOfYear(o);if(53==s&&o.dateTime.getMonth()==0){s=1}var l=a("
    ");l.find("table").addClass(this.toThemeProperty("jqx-reset"));l.find("td").addClass(this.toThemeProperty("jqx-reset"));l.find("tr").addClass(this.toThemeProperty("jqx-reset"));l.addClass(this.toThemeProperty("jqx-calendar-row-header"));l.width(this.rowHeaderWidth);this.rowHeader.append(l);var d=c;var r=new Array();for(var h=0;h<6;h++){var e=s.toString();var q=new a.jqx._jqxCalendar.cell(d.dateTime);var j=h+1+this.element.id;var p=a(l[0].rows[h].cells[0]);q.element=p;q.row=h;q.column=0;var b="
    "+e+"
    ";p.append(b);p.find("#headerCellContent"+j).addClass(this.toThemeProperty("jqx-calendar-row-cell"));r[h]=q;d=new a.jqx._jqxDateTimeInput.getDateTime(new Date(d._addWeeks(1)));s=this.getWeekOfYear(d)}var n=a.data(this.element,k[0].id);n.rowCells=r},getFirstDayOfWeek:function(e){var d=e;if(this.firstDayOfWeek<0||this.firstDayOfWeek>6){this.firstDayOfWeek=6}var c=d.dayOfWeek-this.firstDayOfWeek;if(c<=0){c+=7}var b=a.jqx._jqxDateTimeInput.getDateTime(d._addDays(-c));return b},getVisibleDate:function(){var c=new a.jqx._jqxDateTimeInput.getDateTime(new Date(this.value.dateTime));if(cthis.maxDate){this.visibleDate=this.maxDate}c.dateTime.setHours(0);var d=c.day;var b=a.jqx._jqxDateTimeInput.getDateTime(c._addDays(-d+1));c=b;return c},destroy:function(b){a.jqx.utilities.resize(this.host,null,true);this.host.removeClass();if(b!=false){this.host.remove()}},_raiseEvent:function(d,i){if(i==undefined){i={owner:null}}var h=this.events[d];var g=i?i:{};g.owner=this;var c=new a.Event(h);c.owner=this;c.args=g;if(d==0||d==1||d==2||d==3||d==4||d==5||d==6||d==7||d==8){c.args.date=c.args.selectedDate=this.getDate();c.args.range=this.getRange();var e=this.getViewStart();var f=this.getViewEnd();c.args.view={from:e,to:f}}if(d==7){var b=g.selectionType;if(!b){b=null}if(b=="key"){b="keyboard"}if(b=="none"){b=null}g.type=b}var j=this.host.trigger(c);if(d==0||d==1){j=false}return j},propertyMap:function(b){if(b=="value"){if(this.selectionMode!="range"){return this.getDate()}else{return this.getRange()}}return null},_setSize:function(){var d=this.host.find("#View"+this.element.id);if(d.length>0){this.setCalendarSize();d[0].style.height="100%";d[0].style.width="100%";var c=this.month.height()-this.titleHeight-this.columnHeaderHeight;var b="View"+this.element.id;d.find("#cellsTable"+b).height(c);d.find("#calendarRowHeader"+b).height(c);this.refreshControl()}},resize:function(){this._setSize()},clear:function(){if(this.selectionMode=="range"){this._clicks=1;this.setRange(null,null);this._raiseEvent(7)}else{this.setDate(null,"mouse")}this._clicks=0;this.selection={from:null,to:null}},today:function(){if(this.selectionMode=="range"){this.setRange(new Date(),new Date())}else{this.setDate(new Date(),"mouse")}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(d,e,g,f){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d.batchUpdate&&d.batchUpdate.width&&d.batchUpdate.height&&Object.keys(d.batchUpdate).length==2){return}if(e=="enableHover"){return}if(e=="keyboardNavigation"){return}if(e=="localization"){if(this.localization){if(this.localization.backString){this.backText=this.localization.backString}if(this.localization.forwardString){this.forwardText=this.localization.forwardString}if(this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString){this.clearString=this.localization.clearString}this.firstDayOfWeek=this.localization.calendar.firstDay}}if(e=="culture"){try{if(a.global){a.global.preferCulture(d.culture);d.localization.calendar=a.global.culture.calendar}else{if(window.Globalize){var b=window.Globalize.culture(d.culture);d.localization.calendar=b.calendar}}if(d.localization.calendar&&d.localization.calendar.firstDay!=undefined&&d.culture!="default"){d.firstDayOfWeek=d.localization.calendar.firstDay}}catch(c){}}if(e=="views"){if(d.views.indexOf("month")==-1){d.view="year"}if(d.views.indexOf("year")==-1&&d.views.indexOf("month")==-1){d.view="decade"}d.render();return}if(e=="showFooter"){d.render()}if(e=="width"||e=="height"){d._setSize();return}else{if(e=="theme"){a.jqx.utilities.setTheme(g,f,d.host)}else{if(e=="rowHeaderWidth"||e=="showWeekNumbers"){d.render()}else{d.view="month";d.render();d.refreshControl()}}}if(e==="firstDayOfWeek"){d.refreshControl()}}})})(jqxBaseFramework);(function(a){a.jqx._jqxCalendar.cell=function(c){var b={dateTime:new a.jqx._jqxDateTimeInput.getDateTime(c),_date:c,getDate:function(){return this._date},setDate:function(d){this.dateTime=new a.jqx._jqxDateTimeInput.getDateTime(d);this._date=d},isToday:false,isWeekend:false,isOtherMonth:false,isVisible:true,isSelected:false,isHighlighted:false,element:null,row:-1,column:-1,tooltip:null};return b};a.jqx._jqxCalendar.monthView=function(c,h,d,b,f,e){var g={start:c,end:h,cells:d,rowCells:b,columnCells:f,element:e};return g}})(jqxBaseFramework); @@ -42,7 +42,7 @@ (function(a){a.extend(a.jqx._jqxChart.prototype,{_moduleWaterfall:true,_isSummary:function(e,c){var f=this.seriesGroups[e];for(var d=0;d
    ",l);if(h){b.append(e);var i=a(""+a(e).text()+"");i.appendTo(a(document.body));k+=i.width();i.remove()}b[0].style.cssText=j.field.style.cssText;if(!j.width){j.width=a(j.field).width()+k+10}if(!j.height){j.height=a(j.field).outerHeight()+10}a(j.field).hide().after(b);var g=j.host.data();j.host=b;j.host.data(g);j.element=b[0];j.element.id=j.field.id;j.field.id=l.id;if(j._className){j.host.addClass(j._className);a(j.field).removeClass(j._className)}if(j.field.tabIndex){var d=j.field.tabIndex;j.field.tabIndex=-1;j.element.tabIndex=d}}},_addInput:function(){if(this.hasInput){if(this.input){this.input.remove()}var b=this.host.attr("name");this.input=a("");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.checked);this.host.attr("role","checkbox");a.jqx.aria(this)}},render:function(){this.init=true;var d=this;this.setSize();this.propertyChangeMap.width=function(h,j,i,k){d.setSize()};this.propertyChangeMap.height=function(h,j,i,k){d.setSize()};this._removeHandlers();if(!this.width){this.host.css("overflow-x","visible")}if(!this.height){this.host.css("overflow-y","visible")}if(this.checkbox){this.checkbox.remove();this.checkbox=null}if(this.checkMark){this.checkMark.remove();this.checkMark=null}if(this.box){this.box.remove();this.box=null}if(this.clear){this.clear.remove();this.clear=null}if(this.boxSize==null){this.boxSize=16}var g=parseInt(this.boxSize)+"px";var f="16px";var e=Math.floor((parseInt(this.boxSize)-16)/2);var b=e;e+="px";b+="px";if(parseInt(this.boxSize)!=16){this.checkbox=a('
    ')}else{this.checkbox=a('
    ')}this.host.prepend(this.checkbox);if(!this.disabledContainer){if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.clear=a('
    ');this.host.append(this.clear)}this.checkMark=a(this.checkbox[0].firstChild.firstChild);this.box=this.checkbox;this.box.addClass(this.toThemeProperty("jqx-checkbox-default")+" "+this.toThemeProperty("jqx-fill-state-normal")+" "+this.toThemeProperty("jqx-rc-all"));if(this.disabled){this.disable()}if(!this.disabledContainer){this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-checkbox"))}if(this.locked&&!this.disabledContainer){this.host.css("cursor","auto")}var c=this.element.getAttribute("checked");if(c=="checked"||c=="true"||c==true){this.checked=true}this._addInput();this._render();this._addHandlers();this.init=false;this._centerBox();if(this.isMaterialized()){a(this.checkbox).addClass("ripple");a.jqx.ripple(a(this.checkbox),this.host,"checkbox")}},_centerBox:function(){if(this.height&&this.height.toString().indexOf("%")==-1&&this.box){var b=parseInt(this.height);this.host.css("line-height",b+"px");var c=b-parseInt(this.boxSize)-1;c/=2;this.box.css("margin-top",parseInt(c))}},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},setSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.element.style.width=this.width}}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.element.style.height=this.height}}}this._centerBox()},_addHandlers:function(){var d=this;var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.box,b,function(e){if(!d.disabled&&!d.enableContainerClick&&!d.locked){d.changeType="mouse";d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}});if(!this.disabledContainer){this.addHandler(this.host,"keydown",function(e){if(!d.disabled&&!d.locked&&d.keyboardCheck){if(e.keyCode==32){if(!d._canFocus){return true}d.changeType="keyboard";d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}}});this.addHandler(this.host,b,function(e){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.clickTime=new Date();d.changeType="mouse";d.toggle();if(e.preventDefault){e.preventDefault()}if(d._canFocus){d.focus()}return false}});this.addHandler(this.host,"selectstart",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}return false}});this.addHandler(this.host,"mouseup",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}}});this.addHandler(this.host,"focus",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.addClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}a(d.checkbox).removeClass("active");if(!d.clickTime||(d.clickTime&&(new Date()-d.clickTime>300))){a(d.checkbox).addClass("active")}d.hovered=true;return false}});this.addHandler(this.host,"blur",function(e){a(d.checkbox).removeClass("active");if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}});this.addHandler(this.host,"mouseenter",function(e){if(d.locked){d.host.css("cursor","arrow")}if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}}});this.addHandler(this.host,"mouseleave",function(e){if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}}});this.addHandler(this.box,"mouseenter",function(){if(d.locked){return}if(!d.disabled&&!d.enableContainerClick){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!d.disabled&&!d.enableContainerClick){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}})}},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b="touchend"}if(this.box){this.removeHandler(this.box,b);this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave")}this.removeHandler(this.host,b);this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus")},_render:function(){if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{if(!this.init){this.host.css("cursor","auto")}}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-checkbox-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates();this.host.attr("checked",this.checked)},_setState:function(c,b){if(this.checked!=c){this.checked=c;if(this.checked){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-checked")}else{if(this.checked==null){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-indeterminate")}else{this.checkMark[0].className=""}}}if(b===false||b===true){this.locked=b}if(c){this.element.setAttribute("checked",true)}else{this.element.removeAttribute("checked")}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},check:function(){this.checked=true;var c=this;this.checkMark.removeClass();this.element.setAttribute("checked",true);if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(this.groupName!=null&&this.groupName.length>0){var d=a.find(this.toThemeProperty(".jqx-checkbox",true));a.each(d,function(){var e=a(this).jqxCheckBox("groupName");if(e==c.groupName&&this!=c.element){a(this).jqxCheckBox("uncheck")}})}var b=this.changeType;this._raiseEvent("0",true);this.changeType=b;this._raiseEvent("3",{checked:true});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked);this.host.attr("checked",this.checked)}},uncheck:function(){this.checked=false;var c=this;this.element.removeAttribute("checked");if(a.jqx.browser.msie||this.animationHideDelay==0){if(c.checkMark[0].className!=""){c.checkMark[0].className=""}}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){if(c.checkMark[0].className!=""){c.checkMark[0].className=""}})}var b=this.changeType;this._raiseEvent("1");this.changeType=b;this._raiseEvent("3",{checked:false});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked);this.host.attr("checked",this.checked)}},indeterminate:function(){this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}var b=this.changeType;this._raiseEvent("2");this._raiseEvent("3",{checked:null});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined");this.host.attr("checked","undefined")}},toggle:function(){if(this.disabled){return}if(this.locked){return}if(this.groupName!=null&&this.groupName.length>0){if(this.checked!=true){this.checked=true;this.updateStates()}return}this.oldChecked=this.checked;if(this.checked==true){this.checked=this.hasThreeStates?null:false}else{this.checked=this.checked!=null}this.updateStates();if(this.input!=undefined){this.input.val(this.checked)}},updateStates:function(){if(this.checked){this.check()}else{if(this.checked==false){this.uncheck()}else{if(this.checked==null){this.indeterminate()}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.addClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this.host.remove()},_raiseEvent:function(g,e){if(this.init){return}var c=this.events[g];var f=new a.Event(c);f.owner=this;if(!e){e={}}e.type=this.changeType;this.changeType=null;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b.setSize()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c=="enableContainerClick"&&!b.disabled&&!b.locked){if(d){b.host.css("cursor","pointer")}else{b.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="boxSize"){b.render()}if(c=="theme"){a.jqx.utilities.setTheme(e,d,b.host)}if(c=="checked"){if(d!=e){switch(d){case true:b.check();break;case false:b.uncheck();break;case null:b.indeterminate();break}}}if(c=="disabled"){if(d!=e){if(d){b.disable()}else{b.enable()}}}}})})(jqxBaseFramework); +(function(a){a.jqx.jqxWidget("jqxCheckBox","",{});a.extend(a.jqx._jqxCheckBox.prototype,{defineInstance:function(){var b={animationShowDelay:300,animationHideDelay:300,width:null,height:null,boxSize:"16px",checked:false,hasThreeStates:false,disabled:false,enableContainerClick:true,locked:false,groupName:"",keyboardCheck:true,enableHover:true,hasInput:true,rtl:false,updated:null,disabledContainer:false,changeType:null,_canFocus:true,aria:{"aria-checked":{name:"checked",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}},events:["checked","unchecked","indeterminate","change"]};if(this===a.jqx._jqxCheckBox.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){var c=this;c._createFromInput("CheckBox");c.render()},_createFromInput:function(c){var j=this;if(j.element.nodeName.toLowerCase()=="input"){j.field=j.element;if(j.field.className){j._className=j.field.className}var l={title:j.field.title};if(j.field.value){l.value=j.field.value}if(j.field.checked){l.checked=true}if(j.field.id.length){l.id=j.field.id.replace(/[^\w]/g,"_")+"_"+c}else{l.id=a.jqx.utilities.createId()+"_"+c}var e=j.element.nextSibling;var h=false;if(e&&(e.nodeName=="#text"||e.nodeName=="span")){h=true}var k=0;var b=a("
    ",l);if(h){b.append(e);var i=a(""+a(e).text()+"");i.appendTo(a(document.body));k+=i.width();i.remove()}b[0].style.cssText=j.field.style.cssText;if(!j.width){j.width=a(j.field).width()+k+10}if(!j.height){j.height=a(j.field).outerHeight()+10}a(j.field).hide().after(b);var g=j.host.data();j.host=b;j.host.data(g);j.element=b[0];j.element.id=j.field.id;j.field.id=l.id;if(j._className){j.host.addClass(j._className);a(j.field).removeClass(j._className)}if(j.field.tabIndex){var d=j.field.tabIndex;j.field.tabIndex=-1;j.element.tabIndex=d}}},_addInput:function(){if(this.hasInput){if(this.input){this.input.remove()}var b=this.host.attr("name");this.input=a("");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.checked);this.host.attr("role","checkbox");a.jqx.aria(this)}},render:function(){this.init=true;var d=this;this.setSize();this.propertyChangeMap.width=function(h,j,i,k){d.setSize()};this.propertyChangeMap.height=function(h,j,i,k){d.setSize()};this._removeHandlers();if(!this.width){this.host.css("overflow-x","visible")}if(!this.height){this.host.css("overflow-y","visible")}if(this.checkbox){this.checkbox.remove();this.checkbox=null}if(this.checkMark){this.checkMark.remove();this.checkMark=null}if(this.box){this.box.remove();this.box=null}if(this.clear){this.clear.remove();this.clear=null}if(this.boxSize==null){this.boxSize=16}var g=parseInt(this.boxSize)+"px";var f="16px";var e=Math.floor((parseInt(this.boxSize)-16)/2);var b=e;e+="px";b+="px";if(parseInt(this.boxSize)!=16){this.checkbox=a('
    ')}else{this.checkbox=a('
    ')}this.host.prepend(this.checkbox);if(!this.disabledContainer){if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.clear=a('
    ');this.host.append(this.clear)}this.checkMark=a(this.checkbox[0].firstChild.firstChild);this.box=this.checkbox;this.box.addClass(this.toThemeProperty("jqx-checkbox-default")+" "+this.toThemeProperty("jqx-fill-state-normal")+" "+this.toThemeProperty("jqx-rc-all"));if(this.disabled){this.disable()}if(!this.disabledContainer){this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-checkbox"))}if(this.locked&&!this.disabledContainer){this.host.css("cursor","auto")}var c=this.element.getAttribute("checked");if(c=="checked"||c=="true"||c==true){this.checked=true}this._addInput();this._render();this._addHandlers();this.init=false;this._centerBox();if(this.isMaterialized()){a(this.checkbox).addClass("ripple");a.jqx.ripple(a(this.checkbox),this.host,"checkbox")}},_centerBox:function(){if(this.height&&this.height.toString().indexOf("%")==-1&&this.box){var b=parseInt(this.height);this.host.css("line-height",b+"px");var c=b-parseInt(this.boxSize)-1;c/=2;this.box.css("margin-top",parseInt(c))}},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},setSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.element.style.width=this.width}}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.element.style.height=this.height}}}this._centerBox()},_addHandlers:function(){var d=this;var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.box,b,function(e){if(!d.disabled&&!d.enableContainerClick&&!d.locked){d.changeType="mouse";d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}});if(!this.disabledContainer){this.addHandler(this.host,"keydown",function(e){if(!d.disabled&&!d.locked&&d.keyboardCheck){if(e.keyCode==32){if(!d._canFocus){return true}d.changeType="keyboard";d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}}});this.addHandler(this.host,b,function(e){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.clickTime=new Date();d.changeType="mouse";d.toggle();if(e.preventDefault){e.preventDefault()}if(d._canFocus){d.focus()}return false}});this.addHandler(this.host,"selectstart",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}return false}});this.addHandler(this.host,"mouseup",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}}});this.addHandler(this.host,"focus",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.addClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}a(d.checkbox).removeClass("active");if(!d.clickTime||(d.clickTime&&(new Date()-d.clickTime>300))){a(d.checkbox).addClass("active")}d.hovered=true;return false}});this.addHandler(this.host,"blur",function(e){a(d.checkbox).removeClass("active");if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}});this.addHandler(this.host,"mouseenter",function(e){if(d.locked){d.host.css("cursor","arrow")}if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}}});this.addHandler(this.host,"mouseleave",function(e){if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}}});this.addHandler(this.box,"mouseenter",function(){if(d.locked){return}if(!d.disabled&&!d.enableContainerClick){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!d.disabled&&!d.enableContainerClick){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}})}},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b="touchend"}if(this.box){this.removeHandler(this.box,b);this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave")}this.removeHandler(this.host,b);this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus")},_render:function(){if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{if(!this.init){this.host.css("cursor","auto")}}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-checkbox-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates();this.host.attr("checked",this.checked)},_setState:function(c,b){if(this.checked!=c){this.checked=c;if(this.checked){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-checked")}else{if(this.checked==null){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-indeterminate")}else{this.checkMark[0].className=""}}}if(b===false||b===true){this.locked=b}if(c){this.element.setAttribute("checked",true)}else{this.element.removeAttribute("checked")}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},check:function(){this.checked=true;var c=this;this.checkMark.removeClass();this.element.setAttribute("checked",true);if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(this.groupName!=null&&this.groupName.length>0){var d=a.find(this.toThemeProperty(".jqx-checkbox",true));a.each(d,function(){var e=a(this).jqxCheckBox("groupName");if(e==c.groupName&&this!=c.element){a(this).jqxCheckBox("uncheck")}})}var b=this.changeType;this._raiseEvent("0",{checked:true});this.changeType=b;this._raiseEvent("3",{checked:true});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked);this.host.attr("checked",this.checked)}},uncheck:function(){this.checked=false;var c=this;this.element.removeAttribute("checked");if(a.jqx.browser.msie||this.animationHideDelay==0){if(c.checkMark[0].className!=""){c.checkMark[0].className=""}}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){if(c.checkMark[0].className!=""){c.checkMark[0].className=""}})}var b=this.changeType;this._raiseEvent("1");this.changeType=b;this._raiseEvent("3",{checked:false});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked);this.host.attr("checked",this.checked)}},indeterminate:function(){this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}var b=this.changeType;this._raiseEvent("2");this._raiseEvent("3",{checked:null});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined");this.host.attr("checked","undefined")}},toggle:function(){if(this.disabled){return}if(this.locked){return}if(this.groupName!=null&&this.groupName.length>0){if(this.checked!=true){this.checked=true;this.updateStates()}return}this.oldChecked=this.checked;if(this.checked==true){this.checked=this.hasThreeStates?null:false}else{this.checked=this.checked!=null}this.updateStates();if(this.input!=undefined){this.input.val(this.checked)}},updateStates:function(){if(this.checked){this.check()}else{if(this.checked==false){this.uncheck()}else{if(this.checked==null){this.indeterminate()}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.addClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this.host.remove()},_raiseEvent:function(g,e){if(this.init){return}var c=this.events[g];var f=new a.Event(c);f.owner=this;if(!e){e={}}e.type=this.changeType;this.changeType=null;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b.setSize()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c=="enableContainerClick"&&!b.disabled&&!b.locked){if(d){b.host.css("cursor","pointer")}else{b.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="boxSize"){b.render()}if(c=="theme"){a.jqx.utilities.setTheme(e,d,b.host)}if(c=="checked"){if(d!=e){switch(d){case true:b.check();break;case false:b.uncheck();break;case null:b.indeterminate();break}}}if(c=="disabled"){if(d!=e){if(d){b.disable()}else{b.enable()}}}}})})(jqxBaseFramework); (function(a){a.jqx.jqxWidget("jqxColorPicker","",{});a.extend(a.jqx._jqxColorPicker.prototype,{defineInstance:function(){var b={disabled:false,height:null,width:null,color:new a.jqx.color({hex:"ff0000"}),redString:"R:",greenString:"G:",blueString:"B:",showTransparent:false,colorMode:"saturation",_delayLoading:false,events:["colorchange"]};if(this===a.jqx._jqxColorPicker.prototype){return b}a.extend(true,this,b);return b},_createFromInput:function(c){var e=this;if(e.element.nodeName.toLowerCase()=="input"){e.field=e.element;if(e.field.className){e._className=e.field.className}var d={title:e.field.title};if(e.field.getAttribute("value")){var g=e.field.getAttribute("value");e.color=new a.jqx.color({hex:g})}if(e.field.id.length){d.id=e.field.id.replace(/[^\w]/g,"_")+"_"+c}else{d.id=a.jqx.utilities.createId()+"_"+c}var h=a("
    ",d);h[0].style.cssText=e.field.style.cssText;if(!e.width){e.width=a(e.field).width()}if(!e.height){e.height=a(e.field).outerHeight()}a(e.field).hide().after(h);var f=e.host.data();e.host=h;e.host.data(f);e.element=h[0];e.element.id=e.field.id;e.field.id=d.id;if(e._className){e.host.addClass(e._className);a(e.field).removeClass(e._className)}if(e.field.tabIndex){var b=e.field.tabIndex;e.field.tabIndex=-1;e.element.tabIndex=b}}},createInstance:function(c){this._createFromInput("jqxColorPicker");this.render();var b=this;a.jqx.utilities.resize(this.host,function(){b._setSize();b.refresh()},false,!this._delayLoading)},render:function(){this.element.innerHTML="";var b=this;this._isTouchDevice=a.jqx.mobile.isTouchDevice();if(typeof this.color=="string"){this.color=new a.jqx.color({hex:this.color})}this._setSize();this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-reset"));this.host.addClass(this.toThemeProperty("jqx-color-picker"));this.container=a("
    ");this.container.appendTo(this.host);this.colorMap=a("
    ");this.colorMap.appendTo(this.container);this.colorBar=a("
    ");this.colorBar.appendTo(this.container);this.colorPanel=a("
    ");this.colorPanel.appendTo(this.container);this.hexPanel=a("
    ");this.hexPanel.appendTo(this.colorPanel);this.hexPanel.append('#');this.hex=a("");this.hex.addClass(this.toThemeProperty("jqx-input"));this.hex.addClass(this.toThemeProperty("jqx-widget-content"));this.hex.appendTo(this.hexPanel);this.colorPanel.append('
    ');this.rgb=a("
    ");this.rgb.appendTo(this.colorPanel);this.red=a("");this.red.addClass(this.toThemeProperty("jqx-input"));this.red.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.redString+"");this.red.appendTo(this.rgb);this.green=a("");this.green.addClass(this.toThemeProperty("jqx-input"));this.green.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.greenString+"");this.green.appendTo(this.rgb);this.colorPanel.addClass(this.toThemeProperty("jqx-color-picker-map-overlay"));this._mapImageOverlayURL=this._getImageUrl(this.colorPanel);this.colorPanel.removeClass(this.toThemeProperty("jqx-color-picker-map-overlay"));this.blue=a("");this.blue.addClass(this.toThemeProperty("jqx-input"));this.blue.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.blueString+"");this.blue.appendTo(this.rgb);this.preview=a("
    ");this.preview.addClass(this.toThemeProperty("jqx-widget-content"));this.preview.appendTo(this.colorPanel);this.colorBarPointer=a("
    ");this.colorBarPointer.addClass(this.toThemeProperty("jqx-color-picker-bar-pointer"));this.colorMapPointer=a("
    ");this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer"));this.transparent=a("");if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.element.disabled=true}this._addHandlers()},val:function(b){if(arguments.length==0){return"#"+this.color.hex}this.setColor(b);return this.color.hex},_setPositionFromValue:function(){var d=this;var c=d.color.h;var i=100-d.color.v;var b=d.colorMap.height();var e=d.colorMap.width();var h=c*e/360;var g=i*b/100;if(this.colorMode=="saturation"){var f=100-d.color.s;f=f*b/100;d._saturation=100-d.color.s;d.colorMapPointer.css("margin-left",h-8);d.colorMapPointer.css("margin-top",g-8);d.colorBarPointer.css("margin-top",f-8);d.colorMapImageOverlay.css("opacity",(100-d.color.s)/100)}else{var c=d.color.s;var h=c*e/100;var g=i*b/100;var f=360-d.color.h;f=f*b/360;d._hue=d.color.h;d.colorMapPointer.css("margin-left",h-8);d.colorMapPointer.css("margin-top",g-8);d.colorBarPointer.css("margin-top",f-8)}},updateRGB:function(){var b=this;b.color.setRgb(b.red.val(),b.green.val(),b.blue.val());b._updateUI();b._raiseEvent("0",{color:b.color});b.color.transparent=false},_setPosition:function(f,c,h){var e=parseInt(f.pageX);var g=parseInt(c.offset().left);var b=parseInt(f.pageY);var d=parseInt(c.offset().top);if(this._isTouchDevice){var i=a.jqx.position(f);e=i.left;b=i.top}if(h[0].className.indexOf("jqx-color-picker-bar")==-1){h.css("margin-left",e-8-g)}if(b>=d&&b<=d+c.height()){h.css("margin-top",b-8-d)}},_handleKeyInput:function(c,d,b){if(c.disabled){return}if(!c._validateKey(d)){return d}b.val(c._setValueInRange(b.val(),0,255));this.updateRGB();this._setPositionFromValue()},_addHandlers:function(){var d=this;this.addHandler(this.colorMapPointer,"dragStart",function(j){j.preventDefault();return false});this.addHandler(this.colorBarPointer,"dragStart",function(j){j.preventDefault();return false});this.addHandler(this.transparent,"click",function(j){d._raiseEvent("0",{color:"transparent"});j.preventDefault();d.color.transparent=true});this.addHandler(this.host,"selectionstart",function(j){j.preventDefault();return false});this.addHandler(this.blue,"keyup blur",function(j){d._handleKeyInput(d,j,d.blue)});this.addHandler(this.green,"keyup blur",function(j){d._handleKeyInput(d,j,d.green)});this.addHandler(this.red,"keyup blur",function(j){d._handleKeyInput(d,j,d.red)});this.addHandler(this.hex,"keyup blur",function(j){if(d.disabled){return}if(!d._validateKey(j)){return j}if(d.hex.val().toString().length==6){d.hex.val(d.color.validateHex(d.hex.val()));d.color.setHex(d.hex.val());d._updateUI();d._setPositionFromValue();d._raiseEvent("0",{color:d.color})}});this.addHandler(this.colorMap,"dragstart",function(j){j.preventDefault();return false});var f=function(k){d._setPosition(k,d.colorMap,d.colorMapPointer);if(d.colorMode=="saturation"){var j=d._valuesFromMouse(k,d.colorMap,360,100);if(j.x>360){j.x=360}d.color.setHsv(j.x,d._saturation!=null?100-d._saturation:100,100-j.y)}else{var j=d._valuesFromMouse(k,d.colorMap,100,100);if(j.x>100){j.x=100}d.color.setHsv(d._hue!=null?d._hue:360,j.x,100-j.y)}d._updateUI();d._raiseEvent("0",{color:d.color});d.color.transparent=false};var c="mousedown.picker"+this.element.id;if(this._isTouchDevice){c=a.jqx.mobile.getTouchEventName("touchstart")+".picker"+this.element.id}this.addHandler(this.colorMap,c,function(j){if(d.disabled){return}d.beginDrag=true;f(j)});var b="mousemove.picker"+this.element.id;if(this._isTouchDevice){b=a.jqx.mobile.getTouchEventName("touchmove")+".picker"+this.element.id}this.addHandler(a(document),b,function(j){if(d.disabled){return}if(d.beginDrag==true){f(j);if(d._isTouchDevice){j.preventDefault()}}});if(!this._isTouchDevice){this.addHandler(this.colorBar,"dragstart",function(j){j.preventDefault();return false})}var e=function(k){d._setPosition(k,d.colorBar,d.colorBarPointer);if(d.colorMode=="saturation"){var j=d._valuesFromMouse(k,d.colorBar,100,100);d.color.s=j.y;d._saturation=j.y;d.colorMapImageOverlay.css("opacity",(d.color.s)/100);d.color.setHsv(d.color.h,100-d.color.s,d.color.v)}else{var j=d._valuesFromMouse(k,d.colorBar,100,360);d.color.h=360-j.y;d._hue=d.color.h;d.color.setHsv(d.color.h,d.color.s,d.color.v)}d._updateUI();d._raiseEvent("0",{color:d.color});d.color.transparent=false};var h="mousemove.colorBar"+this.element.id;var g="mousedown.colorBar"+this.element.id;var i="mouseup.colorBar"+this.element.id;if(this._isTouchDevice){h=a.jqx.mobile.getTouchEventName("touchmove")+".colorBar"+this.element.id;g=a.jqx.mobile.getTouchEventName("touchstart")+".colorBar"+this.element.id;i=a.jqx.mobile.getTouchEventName("touchend")+".colorBar"+this.element.id}this.addHandler(this.colorBar,g,function(j){if(d.disabled){return}d.beginDragBar=true;e(j)});this.addHandler(a(document),h,function(j){if(d.disabled){return}if(d.beginDragBar==true){e(j);if(d._isTouchDevice){j.preventDefault()}}});this.addHandler(a(document),i,function(j){if(d.disabled){return}d.beginDrag=false;d.beginDragBar=false})},_removeHandlers:function(){this.removeHandler(this.transparent,"click");this.removeHandler(this.host,"selectionstart");this.removeHandler(this.blue,"keyup blur");this.removeHandler(this.green,"keyup blur");this.removeHandler(this.red,"keyup blur");this.removeHandler(this.hex,"keyup blur");this.removeHandler(this.colorMap,"dragstart");this.removeHandler(this.colorBar,"dragstart");this.removeHandler(this.colorMapPointer,"dragStart");this.removeHandler(this.colorBarPointer,"dragStart");var g=this.element.id;var e="mousemove.colorBar"+g;var d="mousedown.colorBar"+g;var f="mouseup.colorBar"+g;var c="mousedown.picker"+g;var b="mousemove.picker"+g;if(this._isTouchDevice){e=a.jqx.mobile.getTouchEventName("touchmove")+".colorBar"+g;d=a.jqx.mobile.getTouchEventName("touchstart")+".colorBar"+g;f=a.jqx.mobile.getTouchEventName("touchend")+".colorBar"+g;c=a.jqx.mobile.getTouchEventName("touchstart")+".picker"+g;b=a.jqx.mobile.getTouchEventName("touchmove")+".picker"+g}this.removeHandler(this.colorMap,c);this.removeHandler(this.colorMap,b);this.removeHandler(this.colorBar,d);this.removeHandler(this.colorBar,e);this.removeHandler(a(document),b);this.removeHandler(a(document),e);this.removeHandler(a(document),f)},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c?c:{};e.owner=this;var f=new a.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);return b},setColor:function(b){if(!b){return}if(b=="transparent"){this.color.transparent=true;this.color.hex="000";this.color.r=0;this.color.g=0;this.color.b=0}else{if(b.r){this.color=new a.jqx.color({rgb:b})}else{if(b.substring(0,1)=="#"){this.color=new a.jqx.color({hex:b.substring(1)})}else{this.color=new a.jqx.color({hex:b})}}}this._updateUI();this._setPositionFromValue();this._raiseEvent("0",{color:this.color})},getColor:function(){return this.color},resize:function(c,b){this.width=c;this.height=b;this._setSize();this.refresh()},propertyChangedHandler:function(b,c,e,d){if(b.isInitialized==undefined||b.isInitialized==false){return}if(c=="colorMode"){b.refresh()}if(c=="color"){b._updateUI();b._setPositionFromValue();b._raiseEvent("0",{color:d})}if(c=="width"||c=="height"){b._setSize();b.refresh()}if(c=="showTransparent"){b.refresh()}if(c=="disabled"){this.element.disabled=d;if(d){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}else{b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}}},_valuesFromMouse:function(j,g,c,b){var k=0;var i=0;var f=g.offset();var p=g.height();var d=g.width();var n=j.pageX;var m=j.pageY;if(this._isTouchDevice){var l=a.jqx.position(j);n=l.left;m=l.top}if(nf.left+d){k=d}else{k=n-f.left+1}}if(mf.top+p){i=p}else{i=m-f.top+1}}var h=parseInt(k/d*c);var o=parseInt(i/p*b);return{x:h,y:o}},_validateKey:function(b){if(b.keyCode==9||b.keyCode==16||b.keyCode==38||b.keyCode==29||b.keyCode==40||b.keyCode==17||b.keyCode==37||(b.ctrlKey&&(b.keyCode=="c".charCodeAt()||b.keyCode=="v".charCodeAt()))||(b.ctrlKey&&(b.keyCode=="C".charCodeAt()||b.keyCode=="V".charCodeAt()))){return false}if(b.ctrlKey||b.shiftKey){return false}return true},_setValueInRange:function(d,c,b){if(d==""||isNaN(d)){return c}d=parseInt(d);if(d>b){return b}if(d0){this.blue.width(f/3);this.green.width(f/3);this.red.width(f/3);return}},_getColorPointer:function(){var b=a("
    ");b.addClass(this.toThemeProperty("jqx-color-picker-pointer"));return b},_getImageUrl:function(c){var b=c.css("backgroundImage");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},refresh:function(){if(this._delayLoading){return}this._saturation=null;this._hue=null;this.colorMap.removeClass();this.colorBar.removeClass();this.colorMap.addClass(this.toThemeProperty("jqx-disableselect"));this.colorBar.addClass(this.toThemeProperty("jqx-disableselect"));this.colorPanel.addClass(this.toThemeProperty("jqx-color-picker-panel"));this.colorBar.css("background-image","");this.colorMap.css("background-image","");if(this.colorMode=="saturation"){this.colorMap.addClass(this.toThemeProperty("jqx-color-picker-map"));this.colorBar.addClass(this.toThemeProperty("jqx-color-picker-bar"))}else{this.colorMap.addClass(this.toThemeProperty("jqx-color-picker-map-hue"));this.colorBar.addClass(this.toThemeProperty("jqx-color-picker-bar-hue"))}this._barImageURL=this._getImageUrl(this.colorBar);this._mapImageURL=this._getImageUrl(this.colorMap);this._arrange();this.colorBar.children().remove();this.colorBarImageContainer=a("
    ");this.colorBarImageContainer.width(this.colorBar.width());this.colorBarImageContainer.height(this.colorBar.height());this.colorBarImageContainer.appendTo(this.colorBar);this.colorBarImage=a("");this.colorBarImage.appendTo(this.colorBarImageContainer);this.colorBarImage.attr("src",this._barImageURL);this.colorBar.css("background-image","none");this.colorBarImage.attr("width",this.colorBar.width());this.colorBarImage.attr("height",this.colorBar.height());this.colorBarPointer.appendTo(this.colorBar);this.colorMap.children().remove();this.colorMapImage=a("");this.colorMapImage.appendTo(this.colorMap);this.colorMapImage.attr("src",this._mapImageURL);this.colorMap.css("background-image","none");this.colorMapImage.attr("width",this.colorMap.width());this.colorMapImage.attr("height",this.colorMap.height());this.colorMapImageOverlay=a("");this.colorMapImageOverlay.prependTo(this.colorMap);this.colorMapImageOverlay.attr("src",this._mapImageOverlayURL);this.colorMapImageOverlay.attr("width",this.colorMap.width());this.colorMapImageOverlay.attr("height",this.colorMap.height());this.colorMapImageOverlay.css("opacity",0);this.colorMapPointer.appendTo(this.colorMap);if(this.showTransparent){this.transparent.appendTo(this.colorPanel)}this._updateUI();this._setPositionFromValue()}});a.jqx.color=function(d){var b={r:0,g:0,b:0,h:0,s:0,v:0,hex:"",hexToRgb:function(i){i=this.validateHex(i);var h="00",f="00",e="00";if(i.length==6){h=i.substring(0,2);f=i.substring(2,4);e=i.substring(4,6)}else{if(i.length>4){h=i.substring(4,i.length);i=i.substring(0,4)}if(i.length>2){f=i.substring(2,i.length);i=i.substring(0,2)}if(i.length>0){e=i.substring(0,i.length)}}return{r:this.hexToInt(h),g:this.hexToInt(f),b:this.hexToInt(e)}},validateHex:function(e){e=new String(e).toUpperCase();e=e.replace(/[^A-F0-9]/g,"0");if(e.length>6){e=e.substring(0,6)}return e},webSafeDec:function(e){e=Math.round(e/51);e*=51;return e},hexToWebSafe:function(i){var h,f,e;if(i.length==3){h=i.substring(0,1);f=i.substring(1,1);e=i.substring(2,1)}else{h=i.substring(0,2);f=i.substring(2,4);e=i.substring(4,6)}return this.intToHex(this.webSafeDec(this.hexToInt(h)))+this.intToHex(this.webSafeDec(this.hexToInt(f)))+this.intToHex(this.webSafeDec(this.hexToInt(e)))},rgbToWebSafe:function(e){return{r:this.webSafeDec(e.r),g:this.webSafeDec(e.g),b:this.webSafeDec(e.b)}},rgbToHex:function(e){return this.intToHex(e.r)+this.intToHex(e.g)+this.intToHex(e.b)},intToHex:function(f){var e=(parseInt(f).toString(16));if(e.length==1){e=("0"+e)}return e.toUpperCase()},hexToInt:function(e){return(parseInt(e,16))},hslToRgb:function(v){var n=parseInt(v.h)/360;var w=parseInt(v.s)/100;var k=parseInt(v.l)/100;if(k<=0.5){var f=k*(1+w)}else{var f=k+w-(k*w)}var i=2*k-f;var t=n+(1/3);var j=n;var m=n-(1/3);var e=Math.round(this.hueToRgb(i,f,t)*255);var o=Math.round(this.hueToRgb(i,f,j)*255);var u=Math.round(this.hueToRgb(i,f,m)*255);return{r:e,g:o,b:u}},hueToRgb:function(g,f,e){if(e<0){e+=1}else{if(e>1){e-=1}}if((e*6)<1){return g+(f-g)*e*6}else{if((e*2)<1){return f}else{if((e*3)<2){return g+(f-g)*((2/3)-e)*6}else{return g}}}},rgbToHsv:function(i){var l=i.r/255;var k=i.g/255;var f=i.b/255;var h={h:0,s:0,v:0};var j=0;var e=0;if(l>=k&&l>=f){e=l;j=(k>f)?f:k}else{if(k>=f&&k>=l){e=k;j=(l>f)?f:l}else{e=f;j=(k>l)?l:k}}h.v=e;h.s=(e)?((e-j)/e):0;if(!h.s){h.h=0}else{var m=e-j;if(l==e){h.h=(k-f)/m}else{if(k==e){h.h=2+(f-l)/m}else{h.h=4+(l-k)/m}}h.h=parseInt(h.h*60);if(h.h<0){h.h+=360}}h.s=parseInt(h.s*100);h.v=parseInt(h.v*100);return h},hsvToRgb:function(l){var n={r:0,g:0,b:0};var k=l.h;var u=l.s;var o=l.v;if(u==0){if(o==0){n.r=n.g=n.b=0}else{n.r=n.g=n.b=parseInt(o*255/100)}}else{if(k==360){k=0}k/=60;u=u/100;o=o/100;var j=parseInt(k);var m=k-j;var g=o*(1-u);var e=o*(1-(u*m));var r=o*(1-(u*(1-m)));switch(j){case 0:n.r=o;n.g=r;n.b=g;break;case 1:n.r=e;n.g=o;n.b=g;break;case 2:n.r=g;n.g=o;n.b=r;break;case 3:n.r=g;n.g=e;n.b=o;break;case 4:n.r=r;n.g=g;n.b=o;break;case 5:n.r=o;n.g=g;n.b=e;break}n.r=parseInt(n.r*255);n.g=parseInt(n.g*255);n.b=parseInt(n.b*255)}return n},setRgb:function(h,f,e){var j=function(g){if(g<0||g>255){return 0}if(isNaN(parseInt(g))){return 0}return g};this.r=j(h);this.g=j(f);this.b=j(e);var i=this.rgbToHsv(this);this.h=i.h;this.s=i.s;this.v=i.v;this.hex=this.rgbToHex(this)},setHsl:function(g,f,e){this.h=g;this.s=f;this.l=e;var i=this.hslToRgb(this);this.r=i.r;this.g=i.g;this.b=i.b;this.hex=this.rgbToHex(i)},setHsv:function(g,f,e){this.h=g;this.s=f;this.v=e;var i=this.hsvToRgb(this);this.r=i.r;this.g=i.g;this.b=i.b;this.hex=this.rgbToHex(i)},setHex:function(e){this.hex=e;var g=this.hexToRgb(this.hex);this.r=g.r;this.g=g.g;this.b=g.b;var f=this.rgbToHsv(g);this.h=f.h;this.s=f.s;this.v=f.v}};if(d){if(d.hex){var c=b.validateHex(d.hex);b.setHex(c)}else{if(d.r){b.setRgb(d.r,d.g,d.b)}else{if(d.h){b.setHsv(d.h,d.s,d.v)}else{if(d.rgb){b.setRgb(d.rgb.r,d.rgb.g,d.rgb.b)}}}}}return b}})(jqxBaseFramework);(function(a){a.jqx.jqxWidget("jqxMaterialColorPicker","",{});a.extend(a.jqx._jqxMaterialColorPicker.prototype,{defineInstance:function(){var b={events:["colorchange"]};if(this===a.jqx._jqxMaterialColorPicker.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;b._renderGrid();b._addHandlers()},_renderGrid:function(){var c=this;var b=document.createElement("div");c._renderShades();c._renderColorPalette();c._renderColorLabels();b.classList="jqx-labels-and-palette";b.appendChild(c._colorLabelsContainer);b.appendChild(c._paletteContainer);c.element.appendChild(b)},_renderColorPalette:function(){var h=this;var b=[["#ffebee","#ffcdd2","#ef9a9a","#e57373","#ef5350","#f44336","#e53935","#d32f2f","#c62828","#b71c1c","#ff8a80","#ff5252","#ff1744","#d50000"],["#fce4ec","#f8bbd0","#f48fb1","#f06292","#ec407a","#e91e63","#d81b60","#c2185b","#ad1457","#880e4f","#ff80ab","#ff4081","#f50057","#c51162"],["#f3e5f5","#e1bee7","#ce93d8","#ba68c8","#ab47bc","#9c27b0","#8e24aa","#7b1fa2","#6a1b9a","#4a148c","#ea80fc","#e040fb","#d500f9","#aa00ff"],["#ede7f6","#d1c4e9","#b39ddb","#9575cd","#7e57c2","#673ab7","#5e35b1","#512da8","#4527a0","#311b92","#b388ff","#7c4dff","#651fff","#6200ea"],["#e8eaf6","#c5cae9","#9fa8da","#7986cb","#5c6bc0","#3f51b5","#3949ab","#303f9f","#283593","#1a237e","#8c9eff","#536dfe","#3d5afe","#304ffe"],["#e3f2fd","#bbdefb","#90caf9","#64b5f6","#42a5f5","#2196f3","#1e88e5","#1976d2","#1565c0","#0d47a1","#82b1ff","#448aff","#2979ff","#2962ff"],["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b","#80d8ff","#40c4ff","#00b0ff","#0091ea"],["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064","#84ffff","#18ffff","#00e5ff","#00b8d4"],["#e0f2f1","#b2dfdb","#80cbc4","#4db6ac","#26a69a","#009688","#00897b","#00796b","#00695c","#004d40","#a7ffeb","#64ffda","#1de9b6","#00bfa5"],["#e8f5e9","#c8e6c9","#a5d6a7","#81c784","#66bb6a","#4caf50","#43a047","#388e3c","#2e7d32","#1b5e20","#b9f6ca","#69f0ae","#00e676","#00c853"],["#f1f8e9","#dcedc8","#c5e1a5","#aed581","#9ccc65","#8bc34a","#7cb342","#689f38","#558b2f","#33691e","#ccff90","#b2ff59","#76ff03","#64dd17"],["#f9fbe7","#f0f4c3","#e6ee9c","#dce775","#d4e157","#cddc39","#c0ca33","#afb42b","#9e9d24","#827717","#f4ff81","#eeff41","#c6ff00","#aeea00"],["#fffde7","#fff9c4","#fff59d","#fff176","#ffee58","#ffeb3b","#fdd835","#fbc02d","#f9a825","#f57f17","#ffff8d","#ffff00","#ffea00","#ffd600"],["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00","#ffe57f","#ffd740","#ffc400","#ffab00"],["#fff3e0","#ffe0b2","#ffcc80","#ffb74d","#ffa726","#ff9800","#fb8c00","#f57c00","#ef6c00","#e65100","#ffd180","#ffab40","#ff9100","#ff6d00"],["#fbe9e7","#ffccbc","#ffab91","#ff8a65","#ff7043","#ff5722","#f4511e","#e64a19","#d84315","#bf360c","#ff9e80","#ff6e40","#ff3d00","#dd2c00"],["#efebe9","#d7ccc8","#bcaaa4","#a1887f","#8d6e63","#795548","#6d4c41","#5d4037","#4e342e","#3e2723"],["#fafafa","#f5f5f5","#eeeeee","#e0e0e0","#bdbdbd","#9e9e9e","#757575","#616161","#424242","#212121"],["#eceff1","#cfd8dc","#b0bec5","#90a4ae","#78909c","#607d8b","#546e7a","#455a64","#37474f","#263238"],];var g=document.createElement("div");for(var d=0,f=b.length;d");f.addClass(e.toThemeProperty("jqx-input-bar"));if(e.element.nodeName.toUpperCase()==="INPUT"){var l=a("
    ");l.addClass(e.toThemeProperty("jqx-input-group jqx-complex-input-group"));this.host.after(l);var j=this.element;var d=this.host.data();l.append(j);l.append(i);l.append(f)}else{this.host.append(i);this.host.append(f);this.host.addClass(e.toThemeProperty("jqx-input-group jqx-complex-input-group"));f.css("top",6+this.element.offsetHeight)}e.bar=f;e.label=i}if(e.element.nodeName.toUpperCase()==="DIV"){e.baseHost=e.host;var d=e.host.data();e.host=e.baseHost.children("input");e.element=e.host[0];e.host.data(d)}if(e.spinButtons===true){if(!e.baseHost){throw new Error("jqxComplexInput: Invalid HTML structure. Please initialize the complex input from a div with an input and another div inside.")}e._appendSpinButtons()}e._addClasses();e._setSize();e._removeHandlers();e._addHandlers();if(e.decimalNotation==="exponential"&&e.value.toLowerCase().indexOf("e")!==-1){var g=e._exponentialToDecimal(e.value);var h=g.realPart;var c=g.imaginaryPart;var b=c<0?"-":"+";var k=h+" "+b+" "+Math.abs(c)+"i";e._currentNumber={value:k,realPart:h,imaginaryPart:c}}else{e._currentNumber={value:e.value,realPart:e._getReal(e.value),imaginaryPart:e._getImaginary(e.value)}}if(e.decimalNotation==="default"){e.element.value=e.value}else{e._setNotation()}e._refreshPlaceHolder()},refresh:function(b){if(b!==true){this.render()}},destroy:function(){var b=this;b._removeHandlers();b.host.destroy()},val:function(e){var d=this;if(typeof e==="string"||typeof e==="object"&&a.isEmptyObject(e)===false){var h,c;if(typeof e==="string"){e=e.toLowerCase();if(e.indexOf("e")===-1){h=d._getReal(e);c=d._getImaginary(e)}else{var g=d._exponentialToDecimal(e);h=g.realPart*1;c=g.imaginaryPart*1}}else{if(typeof e==="object"&&a.isEmptyObject(e)===false){h=e.real;c=e.imaginary}}var b=c>=0?"+":"-";var f=h+" "+b+" "+Math.abs(c)+"i";if(f!==d._currentNumber.value){d.element.value=f;d._onChange(d.value);if(d.decimalNotation!=="default"){d._setNotation()}}}else{return d.element.value}},getReal:function(){return this._currentNumber.realPart},_getReal:function(f){if(!f||(typeof f==="object"&&a.isEmptyObject(f)===true)){f=this.element.value}var c=a.trim(f),e="";if((f.match(/i/g)||[]).length===0){return parseFloat(c)}if(f.charAt(0)==="+"){c=c.slice(1,f.length)}else{if(f.charAt(0)==="-"){c=c.slice(1,f.length);e="-"}}function g(h){c=c.slice(0,h);c=a.trim(c);return parseFloat(e+""+c)}var b=c.indexOf("+");if(b!==-1){return g(b)}var d=c.indexOf("-");if(d!==-1){return g(d)}return 0},getImaginary:function(){return this._currentNumber.imaginaryPart},_getImaginary:function(f){if(!f||(typeof f==="object"&&a.isEmptyObject(f)===true)){f=this.element.value}if((f.match(/i/g)||[]).length===0){return 0}var e=a.trim(f),d="";if(e.charAt(0)==="-"||e.charAt(0)==="+"){d=e.charAt(0)==="-"?"-":"+";e=a.trim(e.slice(1,f.length))}function g(i,h){e=e.slice(i+1,e.indexOf("i"));e=a.trim(e);if(e===""){e=1}return parseFloat(h+""+e)}var b=e.indexOf("+");if(b!==-1){return g(b,"+")}var c=e.indexOf("-");if(c!==-1){return g(c,"-")}e=d+""+e.slice(0,e.indexOf("i"));if(e===""||e==="+"){return 1}else{if(e==="-"){return -1}else{return parseFloat(e)}}},getDecimalNotation:function(f,c){var e=this;function d(k){var j=k.indexOf("e");var i=k.slice(j+1);var h=k.slice(0,j+1);h=h.replace("e","×10");h+=e._toSuperScript(i);h=h.replace("+","");return h}function b(n){var m=n.indexOf("e");var l=n.slice(m+1);var j=n.slice(0,m);var k=parseInt(l,10)%3;j=j*Math.pow(10,k);var i=n.slice(0,m).length-k-2;if(i>=0){j=j.toFixed(i)}var h=j+"×10"+e._toSuperScript((parseInt(l,10)-k).toString());return h}if(f==="real"){f=e._currentNumber.realPart}else{if(f==="imaginary"){f=e._currentNumber.imaginaryPart}}var g=f.toExponential();if(c==="scientific"){return d(g)}else{if(c==="engineering"){return b(g)}else{return g}}},propertyChangedHandler:function(e,j,d,h){var g=this;if(h!==d){switch(j){case"template":if(e.template){e._upbutton.removeClass(g.toThemeProperty("jqx-"+d));e._downbutton.removeClass(g.toThemeProperty("jqx-"+d));e._upbutton.addClass(g.toThemeProperty("jqx-"+e.template));e._downbutton.addClass(g.toThemeProperty("jqx-"+e.template))}break;case"width":case"height":e._setSize();break;case"decimalNotation":if(h==="default"){e.element.value=e._currentNumber.value}else{e._setNotation()}break;case"value":e.element.value=h;e._onChange(d);break;case"spinButtons":var l=function(){e.host.removeClass(e.toThemeProperty("jqx-rc-all"));if(e.rtl===false){e.host.addClass(e.toThemeProperty("jqx-rc-l"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-rc-r"))}else{e.host.addClass(e.toThemeProperty("jqx-rc-r"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-rc-l"))}};if(e._spinButtonsContainer){var k=e.host.width();var i=e._spinButtonsContainer.outerWidth();if(h===false){e.host.width(k+i);e._spinButtonsContainer.hide();e.host.addClass(e.toThemeProperty("jqx-rc-all"))}else{e.host.width(k-i);e._spinButtonsContainer.show();l()}}else{if(h===true){var m=a("
    ");if(e.baseHost){e.host.after(m);e.render()}else{var c=e.element.id;e.host.removeAttr("id");e.host.wrap('
    ');var b=a("#"+c);b.append(m);var f=e.host.data();f.jqxComplexInput.host=b;f.jqxComplexInput.element=b[0];e.baseHost=b;e.baseHost.data(f);e.render()}l()}}break;case"placeHolder":e._refreshPlaceHolder(d);break;case"roundedCorners":if(e._spinButtonsContainer){if(h===true){if(e.rtl===false){e.host.addClass(e.toThemeProperty("jqx-rc-l"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-rc-r"))}else{e.host.addClass(e.toThemeProperty("jqx-rc-r"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-rc-l"))}}else{if(e.rtl===false){e.host.removeClass(e.toThemeProperty("jqx-rc-l"));e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-rc-r"))}else{e.host.removeClass(e.toThemeProperty("jqx-rc-r"));e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-rc-l"))}}}else{if(h===true){e.host.addClass(e.toThemeProperty("jqx-rc-all"))}else{e.host.removeClass(e.toThemeProperty("jqx-rc-all"))}}break;case"disabled":if(h===true){e.host.attr("disabled",true);e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled jqx-input-disabled"));if(e._spinButtonsContainer){e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}}else{e.host.removeAttr("disabled");e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled jqx-input-disabled"));if(e._spinButtonsContainer){e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))}}break;case"rtl":if(e._spinButtonsContainer){if(h===true){e.host.addClass(e.toThemeProperty("jqx-complex-input-child-rtl"));e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-complex-input-spin-buttons-container-ltr"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-complex-input-child-rtl jqx-complex-input-spin-buttons-container-rtl"));if(e.roundedCorners===true){e.host.removeClass(e.toThemeProperty("jqx-rc-l"));e.host.addClass(e.toThemeProperty("jqx-rc-r"));e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-rc-r"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-rc-l"))}}else{e.host.removeClass(e.toThemeProperty("jqx-complex-input-child-rtl"));e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-complex-input-child-rtl jqx-complex-input-spin-buttons-container-rtl"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-complex-input-spin-buttons-container-ltr"));if(e.roundedCorners===true){e.host.removeClass(e.toThemeProperty("jqx-rc-r"));e.host.addClass(e.toThemeProperty("jqx-rc-l"));e._spinButtonsContainer.removeClass(e.toThemeProperty("jqx-rc-l"));e._spinButtonsContainer.addClass(e.toThemeProperty("jqx-rc-r"))}}}break;case"theme":a.jqx.utilities.setTheme(d,h,e.host);break}}},_raiseEvent:function(f,c){if(c===undefined){c={owner:null}}var d=this.events[f];c.owner=this;var e=new a.Event(d);e.owner=this;c.type=this.changeType;this.changeType=null;e.args=c;if(e.preventDefault){e.preventDefault()}var b=this.host.trigger(e);return b},_appendSpinButtons:function(){var b=this;b._spinButtonsContainer=a(b.baseHost.children("div"));b._spinButtonsContainer.attr("unselectable","on");b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-fill-state-normal jqx-complex-input-child jqx-formatted-input-spin-buttons-container jqx-complex-input-spin-buttons-container"));if(b.rtl===false){b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-complex-input-spin-buttons-container-ltr"))}else{b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-complex-input-child-rtl jqx-complex-input-spin-buttons-container-rtl"))}var c='
    ';b._upbutton=a(c);b._spinButtonsContainer.append(b._upbutton);b._downbutton=a(c);b._spinButtonsContainer.append(b._downbutton);b._upArrow=b._upbutton.find("div");b._upArrow.addClass(b.toThemeProperty("jqx-icon-arrow-up"));b._downArrow=b._downbutton.find("div");b._downArrow.addClass(b.toThemeProperty("jqx-icon-arrow-down"));b._upArrow.add(b._downArrow).attr("unselectable","on");if(b.template){b._upbutton.addClass(b.toThemeProperty("jqx-"+b.template));b._downbutton.addClass(b.toThemeProperty("jqx-"+b.template))}},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-widget jqx-input jqx-complex-input jqx-widget-content"));if(b.baseHost){b.baseHost.addClass(b.toThemeProperty("jqx-widget jqx-complex-input-parent"));b.host.addClass(b.toThemeProperty("jqx-complex-input-child"))}if(b.roundedCorners===true){if(b._spinButtonsContainer){if(b.rtl===false){b.host.addClass(b.toThemeProperty("jqx-rc-l"));b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-rc-r"))}else{b.host.addClass(b.toThemeProperty("jqx-rc-r"));b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-rc-l"))}}else{b.host.addClass(b.toThemeProperty("jqx-rc-all"))}}if(b.disabled===true){b.host.attr("disabled",true);b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled jqx-input-disabled"));if(b._spinButtonsContainer){b._spinButtonsContainer.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}}if(b.rtl===true){b.host.add(b._spinButtonsContainer).addClass(b.toThemeProperty("jqx-complex-input-child-rtl"))}},_refreshPlaceHolder:function(c){var b=this;if("placeholder" in b.element){b.host.attr("placeHolder",b.placeHolder)}else{if(b.element.value===""||b.element.value===c){b.element.value=b.placeHolder}}},_setSize:function(){var d=this;function b(){var h=d.baseHost.height();var e=parseInt(d.host.css("border-left-width"),10)+parseInt(d.host.css("border-right-width"),10)+parseInt(d.host.css("padding-left"),10)+parseInt(d.host.css("padding-right"),10);var f=0;if(a.jqx.browser.msie&&a.jqx.browser.version<8){f=e;d.host.height(d.baseHost.height()-(parseInt(d.host.css("border-top-width"),10)+parseInt(d.host.css("border-bottom-width"),10)+parseInt(d.host.css("padding-top"),10)+parseInt(d.host.css("padding-bottom"),10))*2)}if(d._spinButtonsContainer){var g=typeof d.width==="string"&&d.width.charAt(d.width.length-1)==="%"?1:0;d.host.width(d.baseHost.width()-e-d._spinButtonsContainer.outerWidth()-f-g);if(a.jqx.browser.msie&&a.jqx.browser.version<8){d._spinButtonsContainer.height(h-(parseInt(d._spinButtonsContainer.css("border-top-width"),10)+parseInt(d._spinButtonsContainer.css("border-bottom-width"),10)+parseInt(d._spinButtonsContainer.css("padding-top"),10)+parseInt(d._spinButtonsContainer.css("padding-bottom"),10))*2)}}else{d.host.width(d.baseHost.width()-e-f)}}if(d.baseHost){d.baseHost.width(d.width);d.baseHost.height(d.height);b()}else{d.host.width(d.width);d.host.height(d.height)}if(a.jqx.browser.msie&&a.jqx.browser.version<9){d.host.css("line-height",d.host.height()+"px")}var c=d.baseHost||d.host;a.jqx.utilities.resize(c,function(){b();if((a.jqx.browser.msie&&a.jqx.browser.version<9||!a.jqx.browser.msie)&&typeof d.height==="string"&&d.height.charAt(d.height.length-1)==="%"){d.host.css("line-height",d.host.height()+"px")}})},_addHandlers:function(){var d=this,e;if(d.baseHost){e=d.baseHost[0].id}else{e=d.element.id}var b=[8,9,13,32,35,36,37,38,39,40,46];d.addHandler(d.host,"focus.jqxComplexInput"+e,function(){d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"));if(d._spinButtonsContainer){d._spinButtonsContainer.addClass(d.toThemeProperty("jqx-fill-state-focus"))}if(d.bar){d.bar.addClass("focused")}if(d.label){d.label.addClass("focused")}if(!("placeholder" in d.element)&&(d.element.value===d.placeHolder)){d.element.value=""}if(d.decimalNotation!=="default"){var f=d._getCaretPosition();d.element.value=d._currentNumber.value;d._setCaretPosition(f)}});d.addHandler(d.host,"blur.jqxComplexInput"+e,function(){d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(d._spinButtonsContainer){d._spinButtonsContainer.removeClass(d.toThemeProperty("jqx-fill-state-focus"))}if(d.bar){d.bar.removeClass("focused")}if(d.label){d.label.removeClass("focused")}if(d.element.value!==d.value||(("placeholder" in d.element)||(!("placeholder" in d.element)&&d.element.value===""))){d._onChange(d.value)}if(!("placeholder" in d.element)&&(d.element.value===""||d.element.value===d.placeHolder)){d.element.value=d.placeHolder}if(d.decimalNotation!=="default"){d._setNotation()}});d.addHandler(d.host,"keydown.jqxComplexInput"+e,function(h){var i=!h.charCode?h.which:h.charCode;d.changeType="keyboard";if(h.ctrlKey===true&&(i===67||i===86||i===88)){return}var g=String.fromCharCode(i);if(i>=96&&i<=105){g=(i-96).toString();i=i-48}if((!d._firefox&&i===187||d._firefox&&i===61)&&h.shiftKey===true){g="+"}else{if((!d._firefox&&i===189||d._firefox&&i===173)&&h.shiftKey===false){g="-"}else{if(i===190&&h.shiftKey===false){g="."}}}var k=d._allowedCharacters.test(g);if(k===true){if(g==="+"||g==="-"){var f=(d.element.value.match(/-/g)||[]).length+(d.element.value.match(/\+/g)||[]).length;if(f>1){return false}}else{if(g==="."){var j=(d.element.value.match(/\./g)||[]).length;if(j>1){return false}}else{if(g.toLowerCase()==="i"){if(d.element.value.indexOf(g.toLowerCase())!==-1){return false}}}}}else{if(b.indexOf(i)!==-1){return}else{return false}}});d.addHandler(d.host,"keypress.jqxComplexInput"+e,function(f){var g=!f.charCode?f.which:f.charCode;if(g===13){if(d.element.value!==d.value){d._onChange(d.value)}}});if(d._spinButtonsContainer){var c=d._upbutton.add(d._downbutton);d.addHandler(d._upbutton,"mousedown.jqxComplexInputSpinButtonUp"+e,function(){if(!d.disabled&&d.value!==""&&d.value!==null){d._upbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d.changeType="mouse";d._incrementOrDecrement(true)}});d.addHandler(d._upbutton,"mouseup.jqxComplexInputSpinButtonUp"+e,function(){if(!d.disabled&&d.value!==""&&d.value!==null){d._upbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"))}});d.addHandler(d._downbutton,"mousedown.jqxComplexInputSpinButtonDown"+e,function(){if(!d.disabled&&d.value!==""&&d.value!==null){d._downbutton.addClass(d.toThemeProperty("jqx-fill-state-pressed"));d.changeType="mouse";d._incrementOrDecrement(false)}});d.addHandler(d._downbutton,"mouseup.jqxComplexInputSpinButtonDown"+e,function(){if(!d.disabled&&d.value!==""&&d.value!==null){d._downbutton.removeClass(d.toThemeProperty("jqx-fill-state-pressed"))}});d.addHandler(c,"mouseenter.jqxComplexInputSpinButtons"+e,function(g){if(!d.disabled&&d.value!==""&&d.value!==null){var f=a(g.target);if(f.hasClass("jqx-icon-arrow-up")||f.children().hasClass("jqx-icon-arrow-up")){d._upbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.addClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))}else{d._downbutton.addClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.addClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))}}});d.addHandler(c,"mouseleave.jqxComplexInputSpinButtons"+e,function(g){if(!d.disabled&&d.value!==""&&d.value!==null){var f=a(g.target);if(f.hasClass("jqx-icon-arrow-up")||f.children().hasClass("jqx-icon-arrow-up")){d._upbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._upArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-up-hover"))}else{d._downbutton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));d._downArrow.removeClass(d.toThemeProperty("jqx-icon-arrow-down-hover"))}}});d.addHandler(a("body"),"mouseup.jqxComplexInputSpinButtons"+e,function(){d._upbutton.add(d._downbutton).removeClass(d.toThemeProperty("jqx-fill-state-pressed"))})}},_removeHandlers:function(){var c=this,d;if(c.baseHost){d=c.baseHost[0].id}else{d=c.element.id}c.removeHandler(c.host,"focus.jqxComplexInput"+d);c.removeHandler(c.host,"blur.jqxComplexInput"+d);c.removeHandler(c.host,"keydown.jqxComplexInput"+d);c.removeHandler(c.host,"keypress.jqxComplexInput"+d);if(c._spinButtonsContainer){var b=c._upbutton.add(c._downbutton);c.removeHandler(c._upbutton,"mousedown.jqxComplexInputSpinButtonUp"+d);c.removeHandler(c._upbutton,"mouseup.jqxComplexInputSpinButtonUp"+d);c.removeHandler(c._downbutton,"mousedown.jqxComplexInputSpinButtonDown"+d);c.removeHandler(c._downbutton,"mouseup.jqxComplexInputSpinButtonDown"+d);c.removeHandler(b,"mouseenter.jqxComplexInputSpinButtons"+d);c.removeHandler(b,"mouseleave.jqxComplexInputSpinButtons"+d);c.removeHandler(a("body"),"mouseup.jqxComplexInputSpinButtons"+d)}},_onChange:function(c){var l=this,k,o;var n=l.element.value.toLowerCase();if(a.trim(n)!==""&&a.trim(n)!==l.placeHolder){if(n.indexOf("++")!==-1||n.indexOf("+-")!==-1){var f=n.indexOf("+");n=n.slice(0,f+1)+""+n.slice(f+2,n.length)}else{if(n.indexOf("--")!==-1||n.indexOf("-+")!==-1){var j=n.indexOf("-");n=n.slice(0,j+1)+""+n.slice(j+2,n.length)}}if(n.indexOf("..")!==-1){var d=n.indexOf(".");n=n.slice(0,d+1)+""+n.slice(d+2,n.length)}var m=l._getReal(n);var g=l._getImaginary(n);var b=" ";var e=g>=0?"+":"-";var h="i";k=m;o=g;if(isNaN(k)||isNaN(o)){l.element.value=c;return}l.element.value=m+""+b+""+e+""+b+""+Math.abs(g)+""+h;l.value=l.element.value}else{k=0;o=0;l.value=""}if(l.value!==c){l._currentNumber={value:l.value,realPart:k,imaginaryPart:o};l._raiseEvent("0",{value:l.value,oldValue:c,realPart:k,imaginaryPart:o})}},_incrementOrDecrement:function(j){var e=this,g,l,h=e.host.is(":focus"),k=e.element.value,i=e._currentNumber.realPart,d=e._currentNumber.imaginaryPart;if(h){g=e._getCaretPosition()}if(d>=0){l=k.indexOf("+")}else{if(k.charAt(0)==="-"){k=k.slice(1,k.length)}l=k.indexOf("-")}function f(o){var m=o.toString(),r=m.indexOf("."),q,p,n;if(r!==-1){p=parseInt(m.slice(0,r),10);n=m.slice(m.indexOf(".")+1);q="."}else{p=o;n="";q=""}if(j===true){o=p+e.spinButtonsStep}else{o=p-e.spinButtonsStep}o=parseFloat(o+""+q+""+n);return o}if(g===undefined||g<=l){i=f(i)}else{d=f(d)}var c=d>=0?"+":"-";var b=i+" "+c+" "+Math.abs(d)+"i";e.element.value=b;e._onChange(e.value);if(h){e._setCaretPosition(g)}else{if(e.decimalNotation!=="default"){e._setNotation()}}},_getCaretPosition:function(){var c=this.element;if("selectionStart" in c){return c.selectionStart}else{if(document.selection){c.focus();var d=document.selection.createRange();var b=document.selection.createRange().text.length;d.moveStart("character",-c.value.length);return d.text.length-b}}},_setCaretPosition:function(c){var b=this.element;setTimeout(function(){if("selectionStart" in b){b.focus();b.setSelectionRange(c,c)}else{var d=b.createTextRange();d.collapse(true);d.moveEnd("character",c);d.moveStart("character",c);d.select()}},10)},_exponentialToDecimal:function(h){var f=h.indexOf("e")+2;var e=h.slice(f);var b=e.indexOf("+");var g=e.indexOf("-");if(b!==-1&&(b=0?"+":"-";d.element.value=e+" "+b+" "+c+"i"},_toSuperScript:function(h,g){var f="-0123456789";var d="⁻⁰¹²³⁴⁵⁶⁷⁸⁹";var c="";for(var e=0;e0){var n=l.host.find("tbody tr");var d=l.host.find("th");var w=new Array();if(d.length===0){d=n[0];n.splice(0,1)}if(l.localizestrings){l.localizestrings();if(l.localization!=null){l.localizestrings(l.localization,false)}}var z=[];for(var u=0;u
    ");var m=l.host.parent();var q=l.host.data();q.jqxDataTable.host=m;q.jqxDataTable.element=m[0];l.host.parent()[0].id=l.element.id;try{l.host.parent()[0].style=l.element.style}catch(r){}l.element=m[0];l.host=m;l.host.data(q);var o={dataFields:w,localdata:z,datatype:"array"};var y=new b.jqx.dataAdapter(o);l.source=y}if(l.source&&!l.source.dataBind){l.source=new b.jqx.dataAdapter(l.source)}var x=l.source._source.datafields;if(x&&x.length>0){l._camelCase=l.source._source.dataFields!==undefined;l.selectionMode=l.selectionMode.toLowerCase()}if(l.host.attr("tabindex")==null){l.host.attr("tabindex","0")}l.host.attr("role","grid");l.host.attr("align","left");l.host.addClass(l.toTP("jqx-grid"));l.host.addClass(l.toTP("jqx-reset"));l.host.addClass(l.toTP("jqx-rc-all"));l.host.addClass(l.toTP("jqx-widget"));l.host.addClass(l.toTP("jqx-widget-content"));if(l._testmodules()){return}l.render(true);b.jqx.utilities.resize(l.host,function(){var A=b(window).width();var i=b(window).height();var j=l.host.width();var B=l.host.height();if(l._lastHostWidth!=j||l._lastHostHeight!=B){l._updatesize(l._lastHostWidth!=j,l._lastHostHeight!=B)}l._lastWidth=A;l._lastHeight=i;l._lastHostWidth=j;l._lastHostHeight=B})},getvaluebytype:function(h,d){var f=h;if(h==null){return h}if(this.gridlocalization.decimalseparator==","){if(h.indexOf(this.gridlocalization.decimalseparator)>=0){h=h.replace(this.gridlocalization.decimalseparator,".")}}if(h.indexOf(this.gridlocalization.currencysymbol)>=0){h=h.replace(this.gridlocalization.currencysymbol,"")}if(h.indexOf(this.gridlocalization.percentagesymbol)>=0){h=h.replace(this.gridlocalization.percentagesymbol,"")}if(b.isArray(h)&&d.type!="array"){for(var e=0;e');var d=b('
    '+this.gridlocalization.loadtext+"
    ");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var c=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){c=true}}if(c){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var e=false;if(this.width==="auto"||this.width===null||this.autoWidth){e=true}if(e){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(d){var c=b("measure Text");c.addClass(this.toTP("jqx-widget"));b(document.body).append(c);if(d=="cell"){this._cellheight=c.height()}else{this._columnheight=c.height()}c.remove()},_testmodules:function(){var g="";var e=this;var c=function(){if(g.length!=""){g+=","}};if(!this.host.jqxScrollBar){c();g+=" jqxscrollbar.js"}if(!this.host.jqxButton){c();g+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){c();g+=" jqxdata.js"}if(g!=""||this.editable||this.filterable||this.pageable){var d=[];var f=function(h){switch(h){case"checkbox":if(!e.host.jqxCheckBox&&!d.checkbox){d.checkbox=true;c();g+=" jqxcheckbox.js"}break;case"dropdownlist":if(!e.host.jqxDropDownList&&!d.dropdownlist){c();d.dropdownlist=true;g+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!e.host.jqxListBox&&!d.listbox){c();d.listbox=true;g+=" jqxlistbox.js"}}break}};if((this.filterable&&this.filterMode!="simple")||(this.pagerMode=="advanced"&&this.pageable)){f("dropdownlist")}if(g!=""){throw new Error("jqxDataTable: Missing references to the following module(s): "+g);this.host.remove();return true}}return false},focus:function(){try{this.wrapper.focus();this.host.focus();var d=this;setTimeout(function(){d.wrapper.focus();d.host.focus()},25);this.focused=true}catch(c){}},hiddenParent:function(){return b.jqx.isHidden(this.host)},isBindingCompleted:function(){return !this._loading},_updatesize:function(i,h){if(this._loading){return}var f=this;var g=f.host.width();var e=f.host.height();if(!f._oldWidth){f._oldWidth=g}if(!f._oldHeight){f._oldHeight=e}if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer);f._resizeTimer=null}var d=300;var c=function(){if(f._resizeTimer){clearTimeout(f._resizeTimer)}f.resizingGrid=true;if(b.jqx.isHidden(f.host)){return}f._updatecolumnwidths();f.refresh();f._oldWidth=g;f._oldHeight=e;f.resizingGrid=false};c();f._resizeTimer=setTimeout(function(){var k=f.host.width();var j=f.host.height();if(f._oldWidth!=k||f._oldHeight!=j){c()}},d)},resize:function(d,c){if(d!=undefined){this.width=d}if(c!=undefined){this.height=c}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c=b.jqx.mobile.isTouchDevice();this.touchDevice=c;if(this.touchmode==true){c=true;b.jqx.mobile.setMobileSimulator(this.table[0]);this.touchDevice=c}else{if(this.touchmode==false){c=false}}if(c){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return c},toTP:function(c){return this.toThemeProperty(c)},localizestrings:function(c,f){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(c!=null){for(var h in c){if(h.toLowerCase()!==h){c[h.toLowerCase()]=c[h]}}var j=["pagergotopagestring","pagershowrowsstring","pagerrangestring","pagernextbuttonstring","pagerpreviousbuttonstring","pagerfirstbuttonstring","pagerlastbuttonstring","toppagerstring","firstDay","days","months","AM","PM","patterns","percentsymbol","currencysymbol","currencysymbolposition","decimalseparator","thousandsseparator","filterapplystring","filteraddnew","filtercancelstring","filterclearstring","filterstring","filterstringcomparisonoperators","filternumericcomparisonoperators","filterdatecomparisonoperators","filterbooleancomparisonoperators","emptydatastring","filterselectstring","todaystring","clearstring","validationstring","loadtext","filtersearchstring","loadingErrorMessage"];var g=this;for(var e=0;eg&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}else{this.vScrollBar[0].style.visibility="hidden"}if((h!=this.vScrollBar[0].style.visibility)){this._updatecolumnwidths();var i=this.table.height();if(j!=i){j=i;if(!q&&j>g&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}}}if(this.scrollBarSize==0){n=0}var o=this.table?this.table.width():0;if(o>3){o-=3}var c=parseInt(this.host.css("border-left-width"))+parseInt(this.host.css("border-right-width"));var r=c+this.host.width()-n;if(o>r&&!p){this.hScrollBar[0].style.visibility=e;this.hScrollBar.jqxScrollBar({max:o-r});n=4+parseInt(d);if(d==0){n=0}if(!q){if(j>g-n+4&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.hScrollBar.jqxScrollBar({max:c+o-r});var f=this.vScrollBar[0].style.visibility==="hidden";this.vScrollBar[0].style.visibility=e;this._updatecolumnwidths();if(f){this.hScrollBar.jqxScrollBar({max:o-r+n+c})}var k=this.table?this.table.width():0;if(k>3){k-=3}if(k!=o){if(k"+e+"");d.addClass(this.toTP("jqx-widget"));d.addClass(this.toTP("jqx-grid"));d.addClass(this.toTP("jqx-grid-column-header"));d.addClass(this.toTP("jqx-widget-header"));b(document.body).append(d);var c=d.outerWidth()+20;d.remove();return c},_arrangeAutoHeight:function(e){if(!e){e=0}if(this.height==="auto"||this.height===null||this.autoheight){var h=this.table.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:-1}else{g+=this.showHeader?this.columnsheader.height():-1}g+=this.showstatusbar?this.statusBarHeight:0;g+=this.showAggregates?this.aggregatesHeight:0;g+=this.showtoolbar?this.toolbarHeight:0;g+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){g+=this.pageable?this.pagerHeight:0}g+=h;if(this.filterable){var f=this.filter.find(".filterrow");var c=this.filter.find(".filterrow-hidden");var d=1;if(c.length>0){d=0}g+=this.filterHeight-1+this.filterHeight*f.length*d}if(g+e>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(g+e)}return true}return false},_arrangeAutoWidth:function(e){if(!e){e=0}if(this.width==="auto"||this.width===null||this.autowidth){var d=0;for(var f=0;fthis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(g+e)}return true}return false},_measureTopAndHeight:function(){var d=this.host.height();var h=0;if(this.showtoolbar){h+=this.toolbarHeight;d-=parseInt(this.toolbarHeight)}if(this.filterable){var g=this.filter.find(".filterrow");var e=this.filter.find(".filterrow-hidden");var f=1;if(e.length>0){f=0}h+=this.filterHeight;d-=parseInt(this.filterHeight);var c=f==1?g.length:0;h+=this.filterHeight*c;d-=this.filterHeight*c}if(this.pageable&&this.pagerPosition!="bottom"){h+=parseInt(this.pagerHeight)+1;if(d>this.pagerHeight&&this.pagerPosition==="both"){d-=parseInt(this.pagerHeight)}}return{top:h,height:d}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var v=this.host.width();var r=this.host.height();var j=r;var i=this;if(this.pageable){if(this.pagerPosition==="bottom"){this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="both"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="top"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="hidden"}}}}else{this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="hidden"}var q=0;if(this.showtoolbar){this.toolbar.width(v);this.toolbar.height(this.toolbarHeight-1);this.toolbar.css("top",0);q+=this.toolbarHeight;r-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.filterable){this.filter.width(v);this.filter.css("top",q);var t=this.filter.find(".filterrow");var h=this.filter.find(".filterrow-hidden");var A=1;if(h.length>0){A=0}this.filter.height(this.filterHeight-1+this.filterHeight*t.length*A);q+=this.filterHeight;r-=parseInt(this.filterHeight);var x=A==1?t.length:0;q+=this.filterHeight*x;r-=this.filterHeight*x}if(this.showstatusbar){this.statusbar.width(!this.table?v:Math.max(v,this.table.width()));this.statusbar.height(this.statusBarHeight-1)}else{this.statusbar[0].style.height="0px"}if(this.showAggregates){this.aggregates.height(this.aggregatesHeight-1)}else{this.aggregates[0].style.height="0px"}if(this.pageable&&this.pagerPosition!="bottom"){this.toppager[0].style.width=v+"px";this.toppager[0].style.height=parseInt(this.pagerHeight)+"px";this.toppager[0].style.top=parseInt(q)+"px";q+=parseInt(this.pagerHeight)+1;if(r>this.pagerHeight){r-=parseInt(this.pagerHeight)}}else{if(this.toppager[0].style.width!=v+"px"){this.toppager[0].style.width=parseInt(v)+"px"}if(this.toppager[0].style.height!=this.pagerHeight+"px"){this.toppager[0].style.height=parseInt(this.pagerHeight)+"px"}if(this.toppager[0].style.top!=q+"px"){this.toppager[0].style.top=q+"px"}var y=this.pagerPosition!="bottom"?this.pagerHeight:0;var d=q+y+"px";if(this.content[0].style.top!=d){this.content[0].style.top=q+this.pagerHeight+"px"}}this._updateScrollbars(j);var c=parseInt(this.scrollBarSize);var n=4;var e=2;var f=0;if(this.vScrollBar[0].style.visibility!="hidden"){f=c+n}if(this.hScrollBar[0].style.visibility!="hidden"){e=c+n+2}if(c==0){f=0;e=0}if(this.showAggregates){if(this.hScrollBar[0].style.visibility==="hidden"){this.aggregates.width(!this.table?v:Math.max(v,this.table.width())+4)}else{this.aggregates.width("auto")}}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var w=this._arrangeAutoHeight(e-2);var s=this._arrangeAutoWidth(f+1);if(w||s){var v=this.host.width();this.toppager[0].style.width=parseInt(v)+"px";this.toolbar[0].style.width=parseInt(v)+"px";this.statusbar[0].style.width=parseInt(v)+"px";this.filter[0].style.width=parseInt(v)+"px"}if(w){var B=this._measureTopAndHeight();q=B.top;r=B.height}}var m=0;if(this.pageable){m=this.pagerHeight;if(this.pagerPosition!="top"){e+=this.pagerHeight}}if(this.showAggregates){e+=this.aggregatesHeight;m+=this.aggregatesHeight}if(this.showstatusbar){e+=this.statusBarHeight;m+=this.statusBarHeight}if(this.hScrollBar[0].style.height!=c+"px"){this.hScrollBar[0].style.height=parseInt(c)+"px"}if(this.hScrollBar[0].style.top!=q+r-n-c-m+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=q+r-n-c-m-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var g=false;var z=false;if(f==0){if(l!=(v-2)+"px"){this.hScrollBar[0].style.width=(v-2)+"px";g=true}}else{if(l!=(v-c-n)+"px"){this.hScrollBar[0].style.width=(v-c-n+"px");g=true}}if(this.vScrollBar[0].style.width!=c+"px"){this.vScrollBar[0].style.width=c+"px";z=true}if(this.vScrollBar[0].style.height!=parseInt(r)-e+"px"){this.vScrollBar[0].style.height=(parseInt(r)-e+"px");z=true}if(this.vScrollBar[0].style.left!=parseInt(v)-parseInt(c)-n+"px"||this.vScrollBar[0].style.top!=q+"px"){this.vScrollBar[0].style.top=q+"px";this.vScrollBar[0].style.left=parseInt(v)-parseInt(c)-n+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:q});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:c+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var u=this.hScrollInstance;u.disabled=this.disabled;if(g){u.refresh()}if(z){k.refresh()}var o=function(C){if((C.vScrollBar[0].style.visibility!="hidden")&&(C.hScrollBar[0].style.visibility!="hidden")){C.bottomRight[0].style.visibility="inherit";C.bottomRight[0].style.left=1+parseInt(C.vScrollBar.css("left"))+"px";C.bottomRight[0].style.top=parseInt(C.hScrollBar.css("top"))+"px";if(C.rtl){C.bottomRight.css("left","0px")}C.bottomRight[0].style.width=parseInt(c)+3+"px";C.bottomRight[0].style.height=parseInt(c)+4+"px";if(C.showAggregates){C.bottomRight.css("z-index",99);C.bottomRight.height(parseInt(c)+4+C.aggregatesHeight);C.bottomRight.css({top:parseInt(C.hScrollBar.css("top"))-C.aggregatesHeight})}}else{C.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=v-f+"px"){this.content[0].style.width=v-f+"px"}if(this.content[0].style.height!=r-e+3+"px"){this.content[0].style.height=r-e+3+"px"}if(this.content[0].style.top!=q+"px"){this.content[0].style.top=parseInt(q)+"px"}if(this.rtl){this.content.css("left",f);if(this.filter&&(this.filter.children().length>0)){b(this.filter.children()).css("left",f)}if(this.table){var p=this.table.width();if(p0)){b(this.filter.children()).css("left",v-p+2)}}}}if(this.showAggregates){this.aggregates.css("top",q+r-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0));if(this.rtl){this.aggregates.css("left","0px")}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({top:q+r-n-c-m+this.aggregatesHeight+"px"});this.aggregates.css("top",1+q+r-c-5-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0))}o(this)}if(this.showstatusbar){this.statusbar.css("top",q+r-this.statusBarHeight-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.statusbar.css("left",this.content.css("left"))}else{this.statusbar.css("left","0px")}}}if(this.pageable){this.pager[0].style.width=v+"px";this.pager[0].style.height=this.pagerHeight+"px";this.pager[0].style.top=parseInt(q)+parseInt(r)-parseInt(this.pagerHeight)-1+"px"}else{this.pager[0].style.height="0px"}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(v!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(r!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostwidth=v},scrollOffset:function(e,d){if(arguments.length==0||(e!=null&&typeof(e)=="object"&&!e.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(e!=null&&typeof(e)=="object"){var d=e.left;var c=e.top;var e=c}if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(c){if(c==null||c==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",c)}},scrolltop:function(c){if(c==null||c==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",c)}},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(c){this._updating=false;if(c===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(h,j,c){if(this.loadingstate===true){return}var d=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){b(this.dataloadelement).css("visibility","visible");b(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none")}}var g=this;if(h==null){h={}}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataView();this.dataview.pageable=this.pageable;this.dataview.grid=this;if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pageSize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pageSize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}}this._loading=true;this.dataview.update=function(y){g._loading=false;g.rowsByKey=new Array();var C=g.source._source.datafields;if(g.groups&&g.groups.length>0){var s=Object.prototype.toString;var m=g.groups[0];Object.prototype.toString=(typeof m=="function")?m:function(){return this[m]};if(!g.source.records.sort){var u=new Array();var q=0;var E=0;var D={};b.each(D,function(){u[E+q++]=this});D=u}g.source.records.sort(function(G,F){if(G===undefined){G=null}if(F===undefined){F=null}if(G===null&&F===null){return 0}if(G===null&&F!==null){return -1}if(G!==null&&F===null){return 1}var J=0;var I=0;if(G&&G.uid){J=G.uid}if(F&&F.uid){I=F.uid}G=G.toString();F=F.toString();if(b.jqx.dataFormat.isNumber(G)&&b.jqx.dataFormat.isNumber(F)){if(GF){return 1}return 0}else{if(b.jqx.dataFormat.isDate(G)&&b.jqx.dataFormat.isDate(F)){if(GF){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(G)&&!b.jqx.dataFormat.isNumber(F)){G=String(G).toLowerCase();F=String(F).toLowerCase()}}}try{if(GF){return 1}}catch(H){var K=H}if(typeof(J)=="number"){if(JI){return 1}}return 0});Object.prototype.toString=s}for(var A=0;A0){var t=function(F){for(var G=0;G0){t(F[G].records)}}};t(p.records)}if(A===0){var n=false;if(C){for(var z=0;z-1||l.toString().indexOf(g.gridlocalization.percentsymbol)>-1){var v=l.toString().split(" ").length;var k=new Number(g._toNumber(l.toString()));if(!isNaN(k)&&v==1){C[z].type="number"}}if(b.jqx.dataFormat.isNumber(l)||(!isNaN(parseFloat(l))&&isFinite(l))){C[z].type="number"}if(b.jqx.dataFormat.isDate(l)){C[z].type="date"}}}}if(n){for(var z=0;zg-c){this.hScrollBar.jqxScrollBar("setPosition",g-c)}else{if(g>e){this.hScrollBar.jqxScrollBar("setPosition",h+g-e)}}}},ensurerowvisiblebykey:function(o){if(this.vScrollBar[0].style.visibility==="hidden"){return false}var p=this._getuirow(o);if(!p){return}var m=this.vScrollBar.jqxScrollBar("value");var e=this.host.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:0}else{g+=this.showHeader?this.columnsheader.height():0}if(this.filterable){g+=this.filter.height()}if(this.pageable){if(this.pagerPosition==="top"){g+=this.pagerHeight}}if(this.showtoolbar){g+=this.toolbarHeight}e-=g;if(this.pageable&&this.pagerPosition!=="top"){e-=this.pagerHeight}if(this.showstatusbar){e-=this.statusBarHeight}if(this.showAggregates){e-=this.aggregatesHeight}if(this.hScrollBar.css("visibility")!="hidden"){e-=20}var n=this.host.coord().top+g;var f=m;var c=e+f;var i=p.coord().top+m-n;i=Math.round(i);var l=i+p.outerHeight();l=Math.round(l);if(Math.round(p.position().top)===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var j=b(this._table.children()[1]).children().length-1;var d=this._getuikey(j);var k=this._getuirow(d);if(k){if(k[0]===p[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}}if(ic){return this.vScrollBar.jqxScrollBar("setPosition",4+l-e)}},ensureRowVisible:function(c){var d=this._getkey(c);this.ensurerowvisiblebykey(d)},getColumn:function(c){var d=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==c||this.displayfield==c){d=this;return false}})}return d},_setcolumnproperty:function(e,g,h){if(e==null||g==null||h==null){return null}var d=g;g=g.toLowerCase();var f=this.getColumn(e);if(f==null){return}var i=f[g];f[g]=h;f[d]=h;var c=this.getColumn(e);if(c!=null){c[g]=h}switch(g){case"filteritems":case"text":case"editable":case"resizable":case"draggable":case"hidden":case"hideable":case"renderer":case"cellsrenderer":case"align":case"aggregates":case"cellsalign":case"cellsformat":case"pinned":case"contenttype":case"filterable":case"groupable":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(g=="align"){this._rendercolumnheaders();this.refresh()}else{if(g=="text"||g=="class"||g=="hidden"||g=="pinned"||g=="resizable"||g=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(g=="width"||g=="maxwidth"||g=="minwidth"){f._width=null;f._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(c,e){if(c==null||e==null){return null}e=e.toLowerCase();var d=this.getColumn(c);return d[e]},setColumnProperty:function(c,d,e){this._setcolumnproperty(c,d,e)},hideColumn:function(c){this._setcolumnproperty(c,"hidden",true)},showColumn:function(c){this._setcolumnproperty(c,"hidden",false)},updateBoundData:function(d,c){this.databind(this.source,d,c)},refresh:function(c){if(c!=true){if(b.jqx.isHidden(this.host)){return}this.vScrollInstance.setPosition(0);this._renderrows();this.updatepagerdetails();this._arrange();if(this._arrangeFilterRow){this._arrangeFilterRow()}this._renderhorizontalscroll();this._showicons();if(this.showAggregates){this._updateaggregates()}this._updateTouchScrolling()}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var d="www.jqwidgets.com";if(location.hostname.indexOf(d.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var e=String.fromCharCode(83,80,65,78);var c=String.fromCharCode(72,84,84,80,58,47,47);var f=document.createElement(e);f.id=b.jqx.utilities.createId();f.innerHTML=d;f.style.position="absolute";f.style.right="5px";f.style.bottom="5px";f.style.color="#909090";f.style.cursor="pointer";f.style.zIndex="999999";f.style.display="none";f.style.fontSize="9px";f.onmousedown=function(){open(c+d)};this.content[0].appendChild(f);this._gridRenderElement=f}}},_updateTouchScrolling:function(){var d=this.that;if(d.isTouchDevice()){var f=b.jqx.mobile.getTouchEventName("touchstart");var e=b.jqx.mobile.getTouchEventName("touchend");var c=b.jqx.mobile.getTouchEventName("touchmove");if(d.table){d.removeHandler(d.table,f+".touchScroll");d.removeHandler(d.table,c+".touchScroll");d.removeHandler(d.table,e+".touchScroll");d.removeHandler(d.table,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(d.table[0],Math.max(d.vScrollInstance.max,d.hScrollInstance.max),function(i,h){if(h!=null&&d.vScrollBar.css("visibility")!="hidden"){var g=d.vScrollInstance.value;d.vScrollInstance.setPosition(h)}if(i!=null&&d.hScrollBar.css("visibility")!="hidden"){var g=d.hScrollInstance.value;d.hScrollInstance.setPosition(i)}d.scrolled=new Date();d.vScrollInstance.thumbCapture=true},this.element.id,this.hScrollBar,this.vScrollBar)}}},_showicons:function(){if(!this.table){return}for(var e=0;e0){c.css("margin-right",4+h+"px")}else{c.css("margin-right","4px")}}else{if(h>0){c.css("margin-left",4+h+"px")}else{c.css("margin-left","4px")}}}}},render:function(j){var f="
    ";this.element.innerText="";this.element.innerHTML=f;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var h=this.host.find("#verticalScrollBar"+this.element.id);var l=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=h.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=l.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=b.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=b.data(this.hScrollBar[0],"jqxScrollBar").instance;this.filter=this.host.find("#filter");this.filter[0].id="filter"+this.element.id;this.filter.addClass(this.toTP("jqx-widget-header"));this.filter.addClass(this.toTP("jqx-grid-toolbar"));this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-grid-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.aggregates=this.host.find("#aggregates");this.aggregates[0].id="aggregates"+this.element.id;this.aggregates.addClass(this.toTP("jqx-grid-statusbar"));this.aggregates.addClass(this.toTP("jqx-widget-header"));this.statusbar=this.host.find("#statusbar");this.statusbar[0].id="statusbar"+this.element.id;this.statusbar.addClass(this.toTP("jqx-grid-statusbar"));this.statusbar.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.toppager=this.host.find("#toppager");this.toppager.addClass(this.toTP("jqx-grid-pager-top"));this.toppager.addClass(this.toTP("jqx-widget-header"));this.gridtable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var c=this.source.datafields;if(c==null&&this.source._source){c=this.source._source.datafields}if(c){for(var d=0;d2){for(var k=0;k
    ');e.columnsheader.remove();e.columnsheader.addClass(e.toTP("jqx-widget-header"));e.columnsheader.addClass(e.toTP("jqx-grid-header"));if(!e.showHeader){e.columnsheader.css("display","none")}else{if(e.columnsheader){e.columnsheader.css("display","block")}}e.gridcontent=e.gridcontent||b('
    ');e.gridcontent.remove();var d=e.columnsHeight;d=e._preparecolumnGroups();e.columnsheader.height(d);e.content.append(e.columnsheader);e.content.append(e.gridcontent);e._rendercolumnheaders();e.tableheight=null;e.gridcontent.find("#contenttable"+e.element.id).remove();if(e.table!=null){e.table.remove();e.table=null}e.table=b('
    ');e.gridcontent.addClass(e.toTP("jqx-grid-content"));e.gridcontent.addClass(e.toTP("jqx-widget-content"));e.gridcontent.append(e.table);e._renderrows();if(e.filterable){e._renderfilter()}if(e.pageable){e._initpager()}e._arrange();if(e.renderStatusBar){e.renderStatusBar(e.statusbar)}if(e.rendertoolbar){e.rendertoolbar(e.toolbar)}if(e.showAggregates){e._updateaggregates()}if(e.disabled){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}e._renderhorizontalscroll();e._showicons();e._addHandlers()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},_initpager:function(){var g=this;var c=this.gridlocalization.pagergotopagestring;var i=this.gridlocalization.pagerrangestring;var d=this.gridlocalization.pagershowrowsstring;var h=(this.pagerHeight-28)/2;this.pagerdiv=this.pagerdiv||b('
    ');this.toppagerdiv=this.toppagerdiv||b('
    ');if(!this.pageable){this.pagerdiv.remove();this.toppagerdiv.remove();return}if(!this.pagerRenderer){this.pagerdiv.css("top",h);this.toppagerdiv.css("top",h);var f=function(s,E){var n=this;var r=b('
    ');var D=b('
    ');var t=b('
    ');var j=b('
    ');var m=b('
    ');var q=b('
    ');var z=b('
    ');var x=b('
    ');var p=b('
    ');r.attr("disabled",n.disabled);var A=b('
    ');A[0].id="gridpagerlist"+E+n.element.id;n.removeHandler(t,"mousedown");n.removeHandler(t,"mouseup");n.removeHandler(t,"click");n.removeHandler(j,"mousedown");n.removeHandler(j,"mouseup");n.removeHandler(j,"click");n.removeHandler(m,"mousedown");n.removeHandler(m,"mouseup");n.removeHandler(m,"click");n.removeHandler(q,"mousedown");n.removeHandler(q,"mouseup");n.removeHandler(q,"click");if(!n.rtl){j.attr("title",n.gridlocalization.pagerpreviousbuttonstring);t.attr("title",n.gridlocalization.pagernextbuttonstring)}else{t.attr("title",n.gridlocalization.pagerpreviousbuttonstring);j.attr("title",n.gridlocalization.pagernextbuttonstring)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){p.css("padding-top","3px")}this["pagerfirst"+E]=m;this["pagerlast"+E]=q;this["pagernext"+E]=t;this["pagerprevious"+E]=j;this["pagergotoinput"+E]=r;this["pagerdetails"+E]=z;this["pagershowrows"+E]=x;this["pagergotolabel"+E]=D;this["pagershowrowscombo"+E]=A;this["pagerbuttons"+E]=p;if(n.pagerMode=="default"){if(!n.rtl){m.attr("title",n.gridlocalization.pagerfirstbuttonstring);q.attr("title",n.gridlocalization.pagerlastbuttonstring)}else{q.attr("title",n.gridlocalization.pagerfirstbuttonstring);m.attr("title",n.gridlocalization.pagerlastbuttonstring)}var v=b("
    ");v.addClass(n.toThemeProperty("jqx-icon-arrow-first"));m.wrapInner(v);var o=b("
    ");o.addClass(n.toThemeProperty("jqx-icon-arrow-last"));q.wrapInner(o);if(!n.rtl){s.append(m);s.append(j);s.append(p);s.append(t);s.append(q)}else{s.append(q);s.append(t);s.append(p);s.append(j);s.append(m)}q.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});m.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var C=!n.rtl?"left":"right";p.css("float",C);q.css("float",C);m.css("float",C);t.css("float",C);j.css("float",C);z.css("float",n.rtl?"left":"right");if(n.rtl){z.css("margin-left","7px");z.css("margin-right","0px")}else{z.css("margin-left","0px");z.css("margin-right","7px")}}else{if(!n.rtl){s.append(t);s.append(j)}}t.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});j.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var k=b("
    ");k.addClass(n.toThemeProperty("jqx-icon-arrow-left"));j.wrapInner(k);var l=b("
    ");l.addClass(n.toThemeProperty("jqx-icon-arrow-right"));t.wrapInner(l);if(!n.rtl){s.append(z)}if(n.pagerMode!="default"){if(!n.rtl){s.append(A);s.append(x);s.append(r);s.append(D)}else{s.append(D);s.append(r);s.append(x);s.append(A);s.append(z);s.append(t);s.append(j)}var u=n.pageSizeOptions;A.jqxDropDownList({_checkForHiddenParent:false,rtl:n.rtl,disabled:n.disabled,source:u,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:28,theme:n.theme});var B=0;for(var y=0;y=u[y]){B=y}}D[0].innerHTML=c;A.jqxDropDownList({selectedIndex:B});var w=r.find("input");w.addClass(n.toThemeProperty("jqx-input"));w.addClass(n.toThemeProperty("jqx-widget-content"));if(this.rtl){w.css("direction","rtl")}var n=this;this.removeHandler(A,"select");this.addHandler(A,"select",function(K){if(K.args){if(n.vScrollInstance){n.vScrollInstance.setPosition(0)}var I=K.args.index;n.pagershowrowscombotop.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.renderSelection("mouse");n.pagershowrowscombotop.data().jqxDropDownList.instance.renderSelection("mouse");var L=n.dataview.pagenum*n.dataview.pagesize;var H=u[I];var J=n.pageSize;n.pageSize=parseInt(H);if(isNaN(n.pageSize)){n.pageSize=10}if(H>=100){n.pagershowrowscombotop.jqxDropDownList({width:55});n.pagershowrowscombobottom.jqxDropDownList({width:55})}else{n.pagershowrowscombotop.jqxDropDownList({width:44});n.pagershowrowscombobottom.jqxDropDownList({width:44})}n.dataview.pagesize=n.pageSize;var G=Math.floor(L/n.dataview.pagesize);if(G!==n.dataview.pagenum||parseInt(H)!==parseInt(J)){n._raiseEvent("pageSizeChanged",{pagenum:G,oldpageSize:J,pageSize:n.dataview.pagesize});var F=n.goToPage(G);if(!F){if(!n.serverProcessing){n.refresh()}else{n.updateBoundData("pager")}}}}});var r=r.find("input");r.addClass(n.toThemeProperty("jqx-grid-pager-input"));r.addClass(n.toThemeProperty("jqx-rc-all"));this.removeHandler(r,"keydown");this.removeHandler(r,"change");n.addHandler(r,"keydown",function(F){if(F.keyCode>=65&&F.keyCode<=90){return false}if(F.keyCode=="13"){var G=r.val();G=parseInt(G);if(!isNaN(G)){n.goToPage(G-1)}return false}});n.addHandler(r,"change",function(){var F=r.val();F=parseInt(F);if(!isNaN(F)){n.goToPage(F-1)}})}x[0].innerHTML=d;n.addHandler(t,"mouseenter",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseenter",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mouseleave",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseleave",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mousedown",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(t,"mouseup",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(j,"mousedown",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});n.addHandler(j,"mouseup",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});if(n.pagerMode==="default"){n.addHandler(q,"mouseenter",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseenter",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mouseleave",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseleave",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mousedown",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mousedown",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))});n.addHandler(q,"mouseup",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mouseup",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))})}n.addHandler(b(document),"mouseup.pagerbuttons"+E+this.element.id,function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"));k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"));if(o){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"));v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))}});n.addHandler(t,"click",function(){if(!t.jqxButton("disabled")){if(!n.rtl){n.goToNextPage()}else{n.goToPrevPage()}}});n.addHandler(j,"click",function(){if(!j.jqxButton("disabled")){if(!n.rtl){n.goToPrevPage()}else{n.goToNextPage()}}});if(this.pagerMode==="default"){n.addHandler(m,"click",function(){if(!m.jqxButton("disabled")){if(!n.rtl){n.goToPage(0)}else{var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}}});n.addHandler(q,"click",function(){if(!q.jqxButton("disabled")){if(!n.rtl){var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}else{n.goToPage(0)}}})}};this.pagerdiv.children().remove();this.toppagerdiv.children().remove();f.call(this,this.pagerdiv,"bottom");f.call(this,this.toppagerdiv,"top");this.pager.append(this.pagerdiv);this.toppager.append(this.toppagerdiv);this.updatepagerdetails()}else{this.pagerdiv.children().remove();this.toppager.children().remove();var e=this.pagerRenderer();if(e!=null){this.pagerdiv.append(b(e))}this.pager.append(this.pagerdiv);var e=this.pagerRenderer();if(e!=null){this.toppagerdiv.append(b(e))}this.toppager.append(this.toppagerdiv)}},_updatepagertheme:function(){},goToPage:function(f,h){if(this._loading){return false}if(this.editKey!=undefined){if(this.editSettings.saveOnPageChange){var e=this.endroweditbykey(this.editKey);if(!e){return false}}else{return false}}if(f==null||f==undefined){f=0}if(f==-1){f=0}if(f<0){return false}var d=this.dataview.totalrecords;var g=this.dataview.pagenum;var c=Math.ceil(d/this.pageSize);if(f>=c){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(f>0){f=c-1}}if(this.dataview.pagenum!=f){if(this.pageable){this.dataview.pagenum=f;this._raiseEvent("pageChanged",{pagenum:f,oldpagenum:g,pageSize:this.dataview.pagesize})}if(!this.serverProcessing){this.refresh();if(h){if(b.isFunction(h)){h()}}}else{this.updateBoundData("pager",h)}return true}return false},goToPrevPage:function(e){if(this.dataview.pagenum>0){return this.goToPage(this.dataview.pagenum-1,e)}else{if(this.pagerMode!="default"&&this.pagerMode!="advanced"){var d=this.dataview.totalrecords;var c=Math.ceil(d/this.pageSize);return this.goToPage(c-1,e)}}return false},goToNextPage:function(e){var d=this.dataview.totalrecords;if(this.summaryrows){d+=this.summaryrows.length}var c=Math.ceil(d/this.pageSize);if(this.dataview.pagenum=this.dataview.totalrecords){u=this.dataview.totalrecords}var v=this.dataview.totalrecords;d++;var t=Math.ceil(v/this.dataview.pagesize);if(t>=1){t--}t++;if(this.pageSizeMode=="root"){t=Math.ceil(this.rootRecordsLength/this.dataview.pagesize);if(t>=1){t--}t++;v=this.rootRecordsLength;this.dataview.totalrecords=this.rootRecordsLength}if(this.pagerMode!="default"){if(this["pagergotoinputbottom"]){var k=this["pagergotoinputbottom"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t);k=this["pagergotoinputtop"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t)}}else{var o="";var n=this.pagerButtonsCount;if(n==0||!n){n=5}var s=0;if(this.rtl){s=n-1}while((this.rtl&&s>=0)||(!this.rtl&&st&&!this.rtl){break}else{if(this.rtl&&e>t){s--;continue}}if(!this.rtl){if(s==0&&e>n){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){o+=""+e+"";if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}}else{if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}o+=""+e+""}if(this.rtl){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(s==0&&e>n){o+="..."}}if(!this.rtl){s++}else{s--}}if(!this["pagerbuttonsbottom"]){return}var h=this["pagerbuttonsbottom"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");var h=this["pagerbuttonstop"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");this["pagerbuttonsbottom"][0].innerHTML=o;this["pagerbuttonstop"][0].innerHTML=o;if(this.disabled){this.host.find(".jqx-grid-pager-number").css("cursor","default")}var q=function(){h.click(function(i){if(j.disabled){return}var w=b(i.target).attr("data-page");j.goToPage(parseInt(w)-1)});h.mouseenter(function(i){if(j.disabled){return}b(i.target).addClass(j.toTP("jqx-fill-state-hover"))});h.mouseleave(function(i){if(j.disabled){return}b(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};if(this.pagerPosition==="both"||this.pagerPosition==="bottom"){var h=this["pagerbuttonsbottom"].find("a");q(h)}if(this.pagerPosition==="both"||this.pagerPosition==="top"){var h=this["pagerbuttonstop"].find("a");q(h)}}if(u==0&&uu){this.goToPrevPage()}},_preparecolumnGroups:function(){var o=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var m=this;for(var g=0;gi){return 1}return 0});for(var k=1;k0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){return true}}if(undefined==f.editKey){return false}});this.addHandler(b(window),"jqxReady."+this.element.id,function(){f._updatecolumnwidths();f.refresh()});if(this.editable){this.addHandler(b(document),"mousedown.gridedit"+this.element.id,function(k){if(f.editable&&f.editSettings.saveOnBlur){if(f.editKey!=null){if(!f.vScrollInstance.isScrolling()&&!f.vScrollInstance.isScrolling()){var s=f.host.coord();var p=f.host.width();var l=f.host.height();var u=false;var j=false;var t=false;if(k.pageYs.top+l){u=true;j=true}if(k.pageXs.left+p){u=true;t=true}if(u){var m=function(y){var x=b(y.children()[0]).data();if(x&&!x.jqxWidget){x=y.data()}if(!x){x=y.data()}if(x.jqxWidget&&x.jqxWidget.container&&x.jqxWidget.container[0].style.display=="block"){var i=x.jqxWidget;var z=i.container.coord().top;var w=i.container.coord().top+i.container.height();if(j&&(k.pageYw)){u=true;i.close();return true}else{return false}}};var r=f._editors;if(r){for(var n=0;n0){var k=f._pinnedTable[0].rows[f.hoveredRow[0].rowIndex].cells;i(k)}}f.hoveredRow=null};this.addHandler(this.table,"mouseleave",function(i){c();if(f.wrapper){f.wrapper.parent().removeAttr("tabindex",0);f.wrapper.removeAttr("tabindex",1);f.content.removeAttr("tabindex",2)}});var g=function(o){if(!f.enableHover){return true}f.hoveredRow=o;if(!o){return true}var l=o[0].cells;var n=f.rowDetails&&!f.treeGrid;var q=n&&!f.treeGrid?1:0;var k=0;if(q>0&&f.rtl){q=0;k=1}for(var m=q;m=0){if(!l.expanded){f.showdetailsbykey(F)}else{f.hidedetailsbykey(F)}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("jqx-grid-group")>=0&&f.treeGrid){if(!l.expanded){f.treeGrid.expandRow(F)}else{f.treeGrid.collapseRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}if(B.preventDefault){B.preventDefault()}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("checkbox")>=0&&f.treeGrid){if(!l.checked){f.treeGrid.checkRow(F)}else{f.treeGrid.uncheckRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}}else{var m=b(q).index();var k=f.columns.records[m];if(B.stopPropagation){B.stopPropagation()}if(f.editable&&f.editKey==null){if(f._lastSelectedKey==F&&f.editSettings.editOnDoubleClick&&A){var u=f.beginroweditbykey(F,k);return true}}if(f.isTouchDevice()){if(f.scrolled&&new Date()-f.scrolled<500){if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return false}}if(f.selectionMode==="singlerow"&&f.selectionMode!=="custom"){f.selectrowbykey(F,"mouse",false);f._lastSelectedKey=F;f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}else{if(f.selectionMode!=="custom"){if(!B.ctrlKey&&!B.metaKey){f.clearSelection(false)}if(B.shiftKey){if(f._lastSelectedKey){var l=f.rowinfo[f._lastSelectedKey];f._doSelection(f._lastSelectedKey,true,false);var j=b(f._table.children()[1]).children(("[data-key="+f._lastSelectedKey+"]"));var n=j.index();var z=p.index();f._selectRange(z,n);f.selectrowbykey(F,"mouse",false);f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}}}f._lastSelectedKey=F;f.clickTime=new Date();if(f.selectionMode!=="custom"){if(l){if(l.selected){f.unselectrowbykey(F,"mouse",false)}else{f.selectrowbykey(F,"mouse",false)}v()}}else{return true}f._updateSelection();if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return true}}}}}})},_updateSelection:function(){var l=this;var r=b(l._table.children()[1]).children();var n=l._pinnedTable?b(l._pinnedTable.children()[1]).children():null;var e=l.rowDetails&&!l.treeGrid;var d=e?1:0;var f=0;if(d>0&&l.rtl){d=0;f=1}for(var h=0;he){var h=e;var d=c;while(hf){var d=d.prev();var g=d.attr("data-key");this._doSelection(g,true,false);h--}}}},_getuikey:function(d,g){var f=null;var e=b(this._table.children()[1]).children();f=b(e[d]).attr("data-key");if(b(e[d]).attr("data-role")){var c=b(e[d]);if(g=="next"){while(c){c=c.next();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}else{if(g=="prev"){while(c){c=c.prev();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}}return null}return f},getRows:function(){return this.source.records},getView:function(){var d=this;var e=this._names();var f=new Array();var c=function(k,h){if(!h){return}for(var j=0;j0){g.records=new Array();c(g.records,h[j].records)}}}}};c(f,this.dataViewRecords);return f},getKeys:function(){var d=new Array();var e=this.source.records;for(var c=0;c0){var h=0;for(var j=0;j0){continue}if(h===n+e){k=o.attr("data-key");return k}h++}return k}if(this.rowDetails){var h=0;for(var j=0;j0){return c}}catch(e){var d=b(this._table.children()[1]).children();for(var f=0;f0){return c}}catch(e){var d=b(this._pinnedTable.children()[1]).children();for(var f=0;f=33&&s<=40))){var z=-1;if(!this._searchString){this._searchString=""}if((s==8||s==46)&&this._searchString.length>=1){this._searchString=this._searchString.substr(0,this._searchString.length-1)}var e=String.fromCharCode(s);var H=(!isNaN(parseInt(e)));var J=false;if((s>=65&&s<=97)||H||s==8||s==32||s==46){if(!X.shiftKey){e=e.toLocaleLowerCase()}if(s!=8&&s!=32&&s!=46){if(!(this._searchString.length>0&&this._searchString.substr(0,1)==e)){this._searchString+=e}}if(s==32){this._searchString+=" "}this._searchTime=new Date();var n=this.getSelection();if(n.length>=1){var t=n[0].uid;var C=-1;for(var S=0;S0&&B[0]==t)){var B=this._getMatches(this._searchString)}}else{var B=this._getMatches(this._searchString)}if(B.length>0){var n=this.getSelection();if(n.length>=1){var c=B.indexOf(n[0].uid);if(c==-1){this.clearSelection(false);this.selectrowbykey(B[0])}else{var h=c+1;if(h>=B.length){h=0}this.clearSelection(false);this.selectrowbykey(B[h])}}else{this.clearSelection(false);this.selectrowbykey(B[0])}this._lastSearchString=this._searchString}}if(this._searchTimer!=undefined){clearTimeout(this._searchTimer)}if(s==27||s==13){this._searchString="";this._lastSearchString=""}this._searchTimer=setTimeout(function(){I._searchString="";I._lastSearchString=""},500);if(z>=0){return}if(J){return false}}}if(this.editKey!=undefined){if(s===27&&this.editSettings.cancelOnEsc){this.endroweditbykey(this.editKey,true)}else{if(s===13&&this.editSettings.saveOnEnter){if(X.target&&X.target.nodeName.toLowerCase()!="div"&&X.target.nodeName.toLowerCase()!="input"){return true}this.endroweditbykey(this.editKey,false)}else{if(this.editSettings.editSingleCell){if(this.editColumn){var P=this.columns.records.indexOf(this.editColumn);if(s==9&&P0){var M=this.editKey;var E=null;for(var S=P-1;S>=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){E=this.columns.records[S];break}}if(E){this.endroweditbykey(this.editKey,false);this.beginroweditbykey(M,E)}}}if(s==9){var o=this.rowinfo[this.editKey];var C=this.getrowindex(o);var v=this._getuirow(this.editKey);if(!X.shiftKey&&!y){var N=null;for(var S=0;S=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){N=this.columns.records[S];break}}if(N){while(v){v=v.prev();if(v){var D=v.attr("data-role");if(!D){var F=v.attr("data-key");break}}}if(F){this.clearSelection(false);this._lastSelectedKey=F;var o=this.rowsByKey[F];var C=this.getrowindex(o);var L=this.getrowdisplayindex(o);this._raiseEvent("rowSelect",{key:F,index:L,boundIndex:C,row:this.rowsByKey[F]});this.endroweditbykey(this.editKey,false);this._doSelection(F,true,true);this.beginroweditbykey(F,N)}}}}return false}}}}}return true}if(X.ctrlKey||X.metaKey){var f=String.fromCharCode(s).toLowerCase();if(f=="c"||f=="x"){var n=this.getSelection();if(n.length>=1){var w="";for(var K=0;K');O.val(w);b("body").append(O);O.select();setTimeout(function(){document.designMode="off";O.select();O.remove()},100)}}}}if(s===32&&this.treeGrid){if(this.treeGrid.checkboxes){var n=this.getSelection();if(n.length>1){for(var S=0;S0){if(this.dataview.filters.length>0){var m=this.rowinfo[t].row.records;for(var S=0;S0){while(this._getuirow(t)==null&&this.dataview.pagenum>0){this.goToPrevPage()}}}else{if(s==39){var v=this._getuirow(t);var U=null;if(v){var D=v.attr("data-role");if(!D){U=v.attr("data-key")}}if(this.pageable&&U==null){this.goToNextPage()}}}}return false}},_selection:function(c){if("selectionStart" in c[0]){var h=c[0];var i=h.selectionEnd-h.selectionStart;return{start:h.selectionStart,end:h.selectionEnd,length:i,text:h.value}}else{var f=document.selection.createRange();if(f==null){return{start:0,end:h.value.length,length:0}}var d=c[0].createTextRange();var g=d.duplicate();d.moveToBookmark(f.getBookmark());g.setEndPoint("EndToStart",d);var i=f.text.length;return{start:g.text.length,end:g.text.length+f.text.length,length:i,text:f.text}}},_doSelection:function(c,e,d){if(c==null){this.clearSelection();return}if(this.selectionMode==="singlerow"){this.clearSelection(false)}var f=this.rowinfo[c];if(f){f.selected=e;this.ensurerowvisiblebykey(c)}else{this.ensurerowvisiblebykey(c);var f=this.rowinfo[c];if(f){f.selected=e}else{this.rowinfo[c]={selected:e}}}if(this.selectionMode!="none"){if(d!==false){this._renderrows()}}},clearSelection:function(e){if(this.rowinfo){var f=this.getRows();for(var h in this.rowinfo){var g=this.rowinfo[h];if(g.selected){g.selected=false;var d=f.indexOf(g.row);var c=this.getrowdisplayindex(g.row);this._raiseEvent("rowUnselect",{key:h,index:c,boundIndex:d,row:g.row})}}}if(e!==false){this._renderrows()}},exportData:function(t){if(!b.jqx.dataAdapter.ArrayExporter){if(!this.treeGrid){throw"jqxDataTable: Missing reference to jqxdata.export.js!"}throw"jqxTreeGrid: Missing reference to jqxdata.export.js!"}var h=this.exportSettings.columnsHeader;if(h==undefined){h=true}var w=this.exportSettings.hiddenColumns;if(w==undefined){w=false}var P=this.exportSettings.serverURL;var I=this.exportSettings.characterSet;var ac=this.exportSettings.collapsedRecords;if(ac==undefined){ac=false}var F=this.exportSettings.fileName;if(F===undefined){F=this.treeGrid?"jqxTreeGrid_Data":"jqxDataTable_Data"}var s=this;var Y=this.getRows();if(this.exportSettings.recordsInView==true){Y=this.getView()}if(this.treeGrid&&this.treeGrid.virtualModeCreateRecords){var Y=this.treeGrid.getRows()}if(this.groups&&this.groups.length>0){var k=this.source.getGroupedRecords(this.groups,"records","label",null,"data",null,"parent",Y);var m=function(o,ae){for(var ag=0;ag0){var ah=m(j.records,new Array());for(var af=0;af0){if(p.length>0){var aa=this._names();for(var X=0;X0&&o){d(ae[af].records)}}};d(L);if(t!="xml"&&t!="json"){var u=p.length;for(var X=0;X0){o["Level"+o[aa.level]]=ae?"-":"+"}else{o["Level"+o[aa.level]]=""}}else{o["Level"+o[aa.level]]=""}if(o[aa.leaf]){o["Level"+o[aa.level]]=""}for(var ag=o[aa.level]+1;ag=g){aj=p.length-g-1}else{if(g>0&&ag1){var j=b(s._table[0].rows[1].cells[aj]);if(j.length==0){var j=b(s._table[0].rows[1].cells[0])}}if(ak.length==0){var ak=b(s._table[0].rows[0].cells[0])}var af=this;var ah=function(an){var ap=s.toThemeProperty;an.removeClass(ap("jqx-cell"));an.removeClass(ap("jqx-grid-cell-selected"));an.removeClass(ap("jqx-fill-state-pressed"));an.removeClass(ap("jqx-grid-cell-hover"));an.removeClass(ap("jqx-fill-state-hover"));if(af.customCellStyles){for(var ao in af.customCellStyles){an.removeClass(af.customCellStyles[ao])}}};ah(ak);if(j){ah(j)}if(this.displayfield==null){return true}if(s.showAggregates){if(s.getcolumnaggregateddata){if(s.treeGrid){var am=function(an,ao){for(var ap=0;ap500){Z[this.displayfield].width=500}Z[this.displayfield].formatString=this.cellsFormat;Z[this.displayfield].localization=s.gridlocalization;Z[this.displayfield].type=ai;Z[this.displayfield].cellsAlign=this.cellsalign;Z[this.displayfield].hidden=!h;Z[this.displayfield].index=aj;Z[this.displayfield].maxIndex=p.length}E="cell"+B;var al=this.element;if(t!="json"&&t!="xml"){K="column"+z;var i=function(o,av,au,an,at,ap,ao,aq,ar){C[o]={index:1+ao,maxIndex:p.length};if(ap.rtl){C[o].index=p.length-ao}if(t=="html"||t=="xls"||t=="pdf"){if(av){C[o]["font-size"]=av.css("font-size");C[o]["font-weight"]=av.css("font-weight");C[o]["font-style"]=av.css("font-style");C[o]["background-color"]=ap._getexportcolor(av.css("background-color"));C[o]["color"]=ap._getexportcolor(av.css("color"));C[o]["border-color"]=ap._getexportcolor(av.css("border-top-color"))}if(au){C[o]["text-align"]=at.align}else{C[o]["text-align"]=at.cellsalign;C[o]["formatString"]=at.cellsFormat;C[o]["dataType"]=ai}if(t=="html"||t=="pdf"){C[o]["border-top-width"]="0px";if(!ap.rtl){C[o]["border-left-width"]="0px";C[o]["border-right-width"]="1px"}else{C[o]["border-left-width"]="1px";C[o]["border-right-width"]="0px";if(ao==p.length-g-1&&au){C[o]["border-right-width"]="1px"}}C[o]["border-bottom-width"]="1px";if(av){C[o]["border-top-style"]=av.css("border-top-style");C[o]["border-left-style"]=av.css("border-left-style");C[o]["border-right-style"]=av.css("border-right-style");C[o]["border-bottom-style"]=av.css("border-bottom-style")}if(au){if(ao==0&&!ap.rtl){C[o]["border-left-width"]="1px"}else{if(ao==p.length-1&&ap.rtl){C[o]["border-right-width"]="1px"}}if(av){C[o]["border-top-width"]="1px";C[o]["border-bottom-width"]=av.css("border-bottom-width")}}else{if(ao==0&&!ap.rtl){C[o]["border-left-width"]="1px"}else{if(ao==p.length-1&&ap.rtl){C[o]["border-right-width"]="1px"}}}if(av){C[o]["height"]=av.css("height")}if(ap.treeGrid&&!au){if(C[o].index-10&&this.treeGrid){var ab=g+1;if(this.rtl){ab=p.length-g}if(C["column"+ab]){var e=C["column"+ab];e.merge=g;e["border-left-width"]="1px";var H=C["cell"+ab];for(var X=0;X0){b.each(p,function(j){if(this.aggregates){for(var ae=0;ae0){var c=l;for(var v=0;v0){var c=this.getRows();for(var e=0;e0){var n=this.rowsByKey[H];if(this.treeGrid){var n=this.treeGrid.getRow(H)}if(n.level0){for(var z=0;z";var s=this.getCellTextByKey(H,h.displayfield);d.innerHTML=e;var f=b(d.firstChild);switch(h.columntype){case"textbox":case"default":var k=b("").appendTo(f);if(this.rtl){k.css("direction","rtl")}k.addClass(this.toThemeProperty("jqx-input"));k.addClass(this.toThemeProperty("jqx-widget-content"));k.addClass(this.toThemeProperty("jqx-cell-editor"));k[0].onfocus=function(i){setTimeout(function(){if(i){var I=b(i.target).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}else{var I=b(document.activeElement).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}if(p.content){p.content[0].scrollTop=0;p.content[0].scrollLeft=0}if(p.gridcontent){p.gridcontent[0].scrollLeft=0;p.gridcontent[0].scrollTop=0}},10)};if(!h.editable){k.attr("disabled",true);k.attr("readOnly",true);k.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{if(!q){q=true;var g=b.jqx.browser.msie&&b.jqx.browser.version>10;if(!g){k.focus()}var c=k;setTimeout(function(){var J=c.val().length;if(!g){c.focus()}try{if("selectionStart" in c[0]){c[0].setSelectionRange(0,J)}else{var i=c[0].createTextRange();i.collapse(true);i.moveEnd("character",J);i.moveStart("character",0);i.select()}}catch(I){var K=I}},10)}}k.width(x);k.height(u);if(b.jqx.browser.msie&&b.jqx.browser.version<9){k.css("line-height",parseInt(u)+"px")}k.css("text-align",h.cellsalign);if(s===null){s=""}if(s==undefined){s=""}k.val(s);if(h.createeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.createeditor(!this.treeGrid?o:H,s,k,C,x,u)}this._editors.push({column:h,editor:k});if(h.cellsFormat!=""){if(h.cellsFormat.indexOf("p")!=-1||h.cellsFormat.indexOf("c")!=-1||h.cellsFormat.indexOf("n")!=-1||h.cellsFormat.indexOf("f")!=-1){k.keydown(function(I){var O=I.charCode?I.charCode:I.keyCode?I.keyCode:0;var L=String.fromCharCode(O);var M=parseInt(L);if(isNaN(M)){return true}if(p._selection(k).length>0){return true}var K="";var J=k.val();if(h.cellsFormat.length>1){var N=parseInt(h.cellsFormat.substring(1));if(isNaN(N)){N=0}}else{var N=0}if(N>0){if(J.indexOf(p.gridlocalization.decimalseparator)!=-1){if(p._selection(k).start>J.indexOf(p.gridlocalization.decimalseparator)){return true}}}for(var P=0;P=11){return false}})}}if(h.initeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.initeditor(!this.treeGrid?o:H,s,k,C,x,u)}break;case"custom":case"template":if(!this.editorsCache){this.editorsCache=new Array()}var l=b("
    ").appendTo(f);var y=b.trim(h.datafield).split(" ").join("");if(y.indexOf(".")!=-1){y=y.replace(".","")}var A=this.editorsCache["templateeditor_"+y];if(h.columntype=="custom"){var A=this.editorsCache["customeditor_"+y+"_"+H]}var C=s;var s=this.getCellValueByKey(H,h.displayfield);if(!A){var k=b("
    ");k.width(v);k.height(u);A=k;if(s===null){s=""}if(h.columntype!="custom"){this.editorsCache["templateeditor_"+y]=k}else{this.editorsCache["customeditor_"+y+"_"+H]=k}k.appendTo(l);if(h.createeditor){h.createeditor(!this.treeGrid?o:H,s,k,C,v,u)}}else{var k=A;k.width(v);k.height(u);k.appendTo(l)}if(h.initeditor){h.initeditor(!this.treeGrid?o:H,s,k,C,v,u)}this._editors.push({column:h,editor:k});break}}}this.editKey=H;this.beginUpdate();var G=this.getrowdisplayindex(n);this._raiseEvent("rowBeginEdit",{key:H,index:G,boundIndex:o,row:this.rowsByKey[H]});if(F){var n=this.rowsByKey[H];var w=null;var m=null;if(n){w=n[r.datafield];m=n[r.displayfield]}this._raiseEvent("cellBeginEdit",{value:w,displayValue:m,key:H,index:G,dataField:r.datafield,displayField:r.displayfield,boundIndex:o,row:this.rowsByKey[H]})}this.endUpdate(false)},_toNumber:function(f){if(!f.indexOf&&f!=undefined){f=f.toString()}if(f.indexOf(this.gridlocalization.currencysymbol)>-1){f=f.replace(this.gridlocalization.currencysymbol,"")}var c=function(l,j,k){var h=l;if(j==k){return l}var i=h.indexOf(j);while(i!=-1){h=h.replace(j,k);i=h.indexOf(j)}return h};f=c(f,this.gridlocalization.thousandsseparator,"");f=f.replace(this.gridlocalization.decimalseparator,".");if(f.indexOf(this.gridlocalization.percentsymbol)>-1){f=f.replace(this.gridlocalization.percentsymbol,"")}var g="";for(var d=0;d1){if(b.jqx.dataFormat){m=b.jqx.dataFormat.parsedate(e,h.cellsFormat,this.gridlocalization)}if(m=="Invalid Date"||m==null){m=""}}}}if(h.displayfield!=h.datafield){m={label:m,value:m}}break}}if(h.geteditorvalue){var c=this.getCellValueByKey(d,h.displayfield);m=h.geteditorvalue(!this.treeGrid?k:d,c,j)}}return m},_validateEditors:function(c){var k=this;var d=true;var s=k.rowsByKey[c];var l=k.getrowindex(s);var m=k._editors;var c=k.editKey;var p=k._getuirow(c);for(var h=0;h=0||G.indexOf("datetimeinput")>=0||G.indexOf("combobox")>=0||G.indexOf("menu")>=0){if(i.jqxWidget.isOpened){var F=i.jqxWidget.isOpened();if(F){i.jqxWidget.close()}}}}};var z="customeditor_"+v.displayfield+"_"+p;var y="templateeditor_"+v.displayfield;if(k.editorsCache[z]){var w=b(k.editorsCache[z]).data();var A=k.editorsCache[z];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w);k.editorsCache[z].detach()}if(k.editorsCache[y]){k.editorsCache[y].detach();var w=b(k.editorsCache[y]).data();var A=k.editorsCache[y];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w)}}if(C!=u){k.beginUpdate();k._raiseEvent("cellValueChanged",{value:C,oldValue:u,dataField:v.datafield,displayField:v.displayfield,key:p,index:l,row:t});k.endUpdate(false)}}};k.updaterowbykey(k.editKey,h,false,s)}}if(!d){return false}}k._detachEditors(e);return true},_detachEditors:function(l){var g=this;var m=g.rowsByKey[l];var i=g.getrowindex(m);if(g.editorsCache){for(var h in g.editorsCache){var f=b(g.editorsCache[h]).data();if(f&&f.jqxWidget){var c=f.jqxWidget.element.className;if(c.indexOf("dropdownlist")>=0||c.indexOf("datetimeinput")>=0||c.indexOf("combobox")>=0||c.indexOf("menu")>=0){if(f.jqxWidget.isOpened){var e=f.jqxWidget.isOpened();if(e){f.jqxWidget.close()}}}}b(g.editorsCache[h]).detach()}}g.beginUpdate();var d=g.getrowdisplayindex(m);if(g.editSettings.editSingleCell){var m=g.rowsByKey[l];var k=null;var j=null;if(m){k=m[g.editColumn.datafield];j=m[g.editColumn.displayfield]}g._raiseEvent("cellEndEdit",{value:k,displayValue:j,key:l,index:d,dataField:g.editColumn.datafield,displayField:g.editColumn.displayfield,boundIndex:i,row:g.rowsByKey[l]})}g._raiseEvent("rowEndEdit",{key:l,index:d,boundIndex:i,row:g.rowsByKey[l]});g.endUpdate(false);g.editColumn=null;g.editKey=null;g._renderrows();g._renderhorizontalscroll();g.host.focus();setTimeout(function(){g.host.focus()},10)},_showvalidationpopup:function(r,e,s,m){if(s==undefined){var s=this.gridlocalization.validationstring}m.addClass(this.toThemeProperty("jqx-grid-validation-label"));var p=b("
    ");var o=b("
    ");p.html(s);o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));p.addClass(this.toThemeProperty("jqx-grid-validation"));p.addClass(this.toThemeProperty("jqx-rc-all"));p.hide();o.hide();p.prependTo(this.table);o.prependTo(this.table);var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);var l=this.getColumn(e).uielement;if(!r){return}var k=r;p.css("top",parseInt(k.position().top)+30+"px");var c=parseInt(p.css("top"));o.css("top",c-11);o.removeClass();o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var f=false;if(c>=this._table.height()){o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));c=parseInt(k.position().top)-k.outerHeight()-5;if(c<0){c=0;o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}p.css("top",c+"px");o.css("top",c+p.outerHeight()-9)}var n=-g+parseInt(b(l).position().left);var q=parseInt(this._table.css("left"));if(isNaN(q)){q=0}if(q!=0){g=0}o.css("left",g+n+30);var d=p.width();if(d+n>this.host.width()-20){var i=d+n-this.host.width()+40;n-=i}if(!f){p.css("left",g+n)}else{p.css("left",g+parseInt(b(l).position().left)-p.outerWidth())}m.mouseenter(function(){if(m.hasClass("jqx-grid-validation-label")){p.show();o.show()}});m.mouseleave(function(){p.hide();o.hide()});if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:p,validationrow:o}},addRow:function(d,p,j,n){if(p!=undefined){this._datachanged=true;if(j==undefined){j="last"}var o=false;var k=this.that;if(d==null){var f=this.dataview.filters&&this.dataview.filters.length>0;var m=!f?this.dataview.totalrecords:this.source.records.length;if(!this.pageable){if(this.source._source.totalrecords){this.dataview.totalrecords=this.source._source.totalrecords}else{if(this.source._source.totalRecords){this.dataview.totalrecords=this.source._source.totalRecords}else{if(this.source.hierarchy.length!==0){this.dataview.totalrecords=this.source.hierarchy.length}else{this.dataview.totalrecords=this.source.records.length}}}var m=!f?this.dataview.totalrecords:this.source.records.length}if(!b.isArray(p)){d=this.dataview.getid(this.dataview.source.id,p,m);if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{var c=new Array();b.each(p,function(e,q){var r=k.dataview.getid(k.dataview.source.id,p[e],m+e);c.push(r);if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}});d=c}}else{if(!b.isArray(p)){if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{b.each(p,function(e,q){var r=d[e];if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}})}}var i=this.treeGrid?(this.treeGrid.virtualModeCreateRecords?true:false):false;var g=function(v,q,A,t){if(v._loading){throw new Error("jqxDataTable: "+v.loadingErrorMessage);return false}var r=v.vScrollInstance.value;var z=false;if(!b.isArray(A)){A.uid=q;v.rowsByKey[q]=A;if(q==n){n=null}z=v.source.addRecord(A,t,n,i)}else{b.each(A,function(B,C){var D=null;if(q!=null&&q[B]!=null){D=q[B]}this.uid=D;v.rowsByKey[D]=this;if(q==n){n=null}z=v.source.addRecord(this,t,n,i)})}if(v.groups&&v.groups.length>0){var w=Object.prototype.toString;var y=v.groups[0];Object.prototype.toString=(typeof y=="function")?y:function(){return this[y]};if(!v.source.records.sort){var x=new Array();var u=0;var e=0;var s=[];b.each(s,function(){x[e+u++]=this});s=x}v.source.records.sort(function(C,B){if(C===undefined){C=null}if(B===undefined){B=null}if(C===null&&B===null){return 0}if(C===null&&B!==null){return -1}if(C!==null&&B===null){return 1}var F=0;var E=0;if(C&&C.uid){F=C.uid}if(B&&B.uid){E=B.uid}C=C.toString();B=B.toString();if(b.jqx.dataFormat.isNumber(C)&&b.jqx.dataFormat.isNumber(B)){if(CB){return 1}return 0}else{if(b.jqx.dataFormat.isDate(C)&&b.jqx.dataFormat.isDate(B)){if(CB){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(C)&&!b.jqx.dataFormat.isNumber(B)){C=String(C).toLowerCase();B=String(B).toLowerCase()}}}try{if(CB){return 1}}catch(D){var G=D}if(typeof(F)=="number"){if(FE){return 1}}return 0});Object.prototype.toString=w}v.dataview._filteredData=null;v.dataview._sortData=null;v.dataview._sortHierarchyData=null;if(v._updating==undefined||v._updating==false){v.refresh()}if(v.source&&v.source._knockoutdatasource&&!v._updateFromAdapter&&v.autokoupdates){if(v.source._source._localdata){v.source.suspendKO=true;v.source._source._localdata.push(A);v.source.suspendKO=false}}v.vScrollInstance.setPosition(r);return z};if(this.source.addrow){var h=function(e,q){if(e==true||e==undefined){if(q!=undefined){d=q}g(k,d,p,j)}};try{if(!k.treeGrid){o=this.source.addrow(d,p,j,h)}else{o=this.source.addrow(d,p,j,n,h)}if(o==undefined){o=true}}catch(l){o=false}if(o==false){return false}}else{g(this,d,p,j)}return o}return false},deleteRow:function(c){var d=this._getkey(c);this.deleterowbykey(d)},deleterowbykey:function(g){if(g!=undefined){this._datachanged=true;var h=false;var f=this.that;var d=function(m,l){if(m._loading){throw new Error("jqxDataTable: "+m.loadingErrorMessage);return false}m.dataview._filteredData=null;m.dataview._sortData=null;m.dataview._sortHierarchyData=null;var o=false;var p=m.vScrollInstance.value;if(!b.isArray(l)){var o=false;if(m.rowsByKey[l]){o=true;if(m.rowinfo[l]&&m.rowinfo[l].selected){m.unselectrowbykey(l,false)}if(m.treeGrid){var n=m._names();var k=m.rowsByKey[l][n.parent]}delete m.rowsByKey[l];if(m.treeGrid){if(m.rowinfo[l]){var i=m.rowinfo[l].row.records;var j=function(q){for(var r=0;r0&&v.originalRecord){v.originalRecord[o.columns.records[u].datafield]=t[o.columns.records[u].datafield]}}r=true}};s(n);if(o.treeGrid){n=o.treeGrid.getRow(l);s(n)}}else{b.each(l,function(w,x){var v=o.rowsByKey[this];var u=function(z,y){if(!v){r=false}else{v[this]=t[w]}r=true};u(this,v);if(o.treeGrid){v=o.treeGrid.getRow(this);u(this,v)}})}var m=o.vScrollInstance.value;if(g==undefined||g==true){if(o._updating==undefined||o._updating==false){o._renderrows()}}if(o.showAggregates&&o._updatecolumnsaggregates){o._updatecolumnsaggregates()}if(o.source&&o.source._knockoutdatasource&&!o._updateFromAdapter&&o.autokoupdates){if(o.source._source._localdata){var n=o.rowsByKey[l];var p=o.getrowindex(n);var q=o.source._source._localdata()[p];o.source.suspendKO=true;o.source._source._localdata.replace(q,b.extend({},n));o.source.suspendKO=false}}o.vScrollInstance.setPosition(m);return r};if(this.source.updaterow){var e=function(l){if(l==true||l==undefined){d(f,c,k);if(i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}};try{j=this.source.updaterow(c,k,e);if(j==undefined){j=true}}catch(h){j=false}}else{j=d(f,c,k);if(j&&i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}return j}return false},lockRow:function(c){var d=this._getkey(c);this.lockrowbykey(d)},unlockRow:function(c){var d=this._getkey(c);this.unlockrowbykey(d)},lockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=true}else{this.rowinfo[c]={locked:true}}this._renderrows()},unlockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=false}else{this.rowinfo[c]={locked:false}}this._renderrows()},selectRow:function(c){var d=this._getkey(c);this.selectrowbykey(d)},unselectRow:function(c){var d=this._getkey(c);this.unselectrowbykey(d)},selectrowbykey:function(e,h,f){if(h!="keyboard"&&h!="mouse"){this._lastSelectedKey=e}var g=f!==false?true:false;this._doSelection(e,true,g);var i=this.rowsByKey[e];var d=this.getrowindex(i);var c=this.getrowdisplayindex(i);this._raiseEvent("rowSelect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},unselectrowbykey:function(e,f){var g=f!==false?true:false;this._doSelection(e,false,g);var h=this.rowsByKey[e];var d=this.getrowindex(h);var c=this.getrowdisplayindex(h);this._raiseEvent("rowUnselect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},getSelection:function(){var c=new Array();if(this.rowinfo){for(var e in this.rowinfo){var d=this.rowinfo[e];if(d.selected){c.push(d.row)}}}return c},showdetailsbykey:function(k){if(!this.rowDetails){return}var l=this.rowinfo[k];if(l){l.expanded=true;var f=b(this._table.children()[1]).children(("[data-key="+k+"]"));var i=b(this._pinnedTable.children()[1]).children(("[data-key="+k+"]"));if(f){var c=i.children();var h=b(c[0]);if(this.rtl){var h=b(c[c.length-1])}if(!this.rtl){h.removeClass(this.toThemeProperty("jqx-grid-group-collapse"));h.addClass(this.toThemeProperty("jqx-grid-group-expand"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{h.removeClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));h.addClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}f.next().show();var d=i.next();d.show();if(b.jqx.browser.msie&&b.jqx.browser.version<8){f.next().children().show();i.next().children().show()}if(!l.initialized){var j=l.detailsHeight;var m=this.initRowDetails(k,l.row,b(b(d).children().children().children()[0]),l);l.details=b(d).children().children().children()[0];l.initialized=true;if(m===false||l.detailsHeight!=j){if(m===false){l.expanded=false;l.nodetails=true;d.hide()}this._renderrows()}}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var g=this.getrowindex(l.row);var e=this.getrowdisplayindex(l.row);this._raiseEvent("rowExpand",{row:l.row,index:e,boundIndex:g,rowKey:k})}}},hidedetailsbykey:function(h){if(!this.rowDetails){return}var j=this.rowinfo[h];if(j){j.expanded=false;var d=b(this._table.children()[1]).children(("[data-key="+h+"]"));var e=b(this._pinnedTable.children()[1]).children(("[data-key="+h+"]"));if(d){var g=e.children();var i=b(g[0]);if(this.rtl){var i=b(g[g.length-1])}if(!this.rtl){i.addClass(this.toThemeProperty("jqx-grid-group-collapse"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand"));i.addClass(this.toThemeProperty("jqx-icon-arrow-right"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{i.addClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));i.addClass(this.toThemeProperty("jqx-icon-arrow-left"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}d.next().hide();e.next().hide();if(b.jqx.browser.msie&&b.jqx.browser.version<8){d.next().children().hide();e.next().children().hide()}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var f=this.getrowindex(j.row);var c=this.getrowdisplayindex(j.row);this._raiseEvent("rowCollapse",{row:j.row,index:c,boundIndex:f,rowKey:h})}}},_getvirtualcolumnsindexes:function(d,l,h,k,c){if(this.rowDetails||this.rtl||this.editcell||(this.width&&this.width.toString().indexOf("%")>=0)||this.exporting){return{start:0,end:h+k}}var e=0;var i=-1;var f=h+k;if(this.autorowheight){return{start:0,end:h+k}}if(!c){for(var g=0;g=d&&i==-1){i=g}if(e>l+d){f=g;break}}}f++;if(f>h+k){f=h+k}if(i==-1){i=0}return{start:i,end:f}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var h=parseInt(u);if(this.table==null){return}var q=this.columnsrow;var r=0;var i=this.columns.records.length-r;var e=this.columns.records;var l=this.source.records.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){h=t.max-h}}if(l&&!this._haspinned){this.table[0].style.left=-h+"px";q[0].style.marginLeft=-h+"px"}else{if(this._haspinned||this._haspinned==undefined){for(var w=0;w0:false;if(this.columns&&this.columns.records){for(var e=0;e0){if(h==="stringfilter"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}}}},applyFilters:function(){if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this.serverProcessing){this.dataview.pagenum=0;this.updateBoundData("filter")}else{this.goToPage(0);this.refresh()}if(arguments&&arguments.length>0){if(this._updateSimpleFilter){if(this.filtercolumnsList){var d=this.filtercolumnsList.jqxDropDownList("getSelectedItem").value;this._updateSimpleFilter(d)}}if(this._updateFilterRow){this._updateFilterRow()}}this._raiseEvent("filter",{filters:this.dataview.filters})},sortBy:function(d,g){this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}if(d==null){g=null;d=this.sortcolumn}if(d){var f=this;var e;if(g=="a"||g=="asc"||g=="ascending"||g==true){e=true}else{e=false}if(g!=null){f.sortdirection={ascending:e,descending:!e}}else{f.sortdirection={ascending:false,descending:false}}if(g!=null){f.sortcolumn=d}else{f.sortcolumn=null}if(f.source.sort){f.dataview.sortfield=d;if(g==null){f.dataview.sortfielddirection=""}else{f.dataview.sortfielddirection=e?"asc":"desc"}if(f.source.sort&&!this._loading){f.source.sort(d,g)}}f.dataview.sortBy(d,g);f._raiseEvent("sort",{sortcolumn:this.sortcolumn,sortdirection:this.sortdirection})}if(!this.serverProcessing){this.refresh()}else{this.updateBoundData("sort")}},_togglesort:function(d){var f=this;if(this.disabled){return}if(d.sortable&&f.sortable){var c={sortcolumn:this.sortcolumn,sortdirection:this.sortdirection};var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(e==true){e=false}else{e=null}}else{e=true}f.sortBy(d.displayfield,e)}},_renderfilter:function(){var h=this;var j=b("
    ");j.height(22);var o=j.find("input");var g=j.find("div:first");j.addClass(this.toThemeProperty("jqx-rc-all"));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-input-group"));o.addClass(this.toThemeProperty("jqx-input"));o.addClass(this.toThemeProperty("jqx-rc-l"));o.addClass(this.toThemeProperty("jqx-input-group-addon"));o.addClass(this.toThemeProperty("jqx-widget"));o.addClass(this.toThemeProperty("jqx-widget-content"));g.addClass(this.toThemeProperty("jqx-fill-state-normal"));g.addClass(this.toThemeProperty("jqx-rc-r"));g.addClass(this.toThemeProperty("jqx-input-group-addon"));g.find("div").addClass(this.toThemeProperty("jqx-icon-search"));if(this.rtl){o.addClass(this.toThemeProperty("jqx-rtl"));o.css("direction","rtl")}this.filter.children().remove();this.filterbutton=g;var d=new Array();for(var f=0;f"+this.gridlocalization.filtersearchstring+"");this.filter.append(l);var c=b("
    ");this.filter.append(c);if(c.jqxDropDownList){c.jqxDropDownList({theme:this.theme,enableBrowserBoundsDetection:true,autoDropDownHeight:p,rtl:h.rtl,dropDownWidth:220,selectedIndex:0,width:"auto",height:20,source:d,displayMember:"label",valueMember:"value"})}this.filtercolumnsList=c;var n=function(q){h.filterinput.val("");for(var r=0;r=0){x=x.replace(h.gridlocalization.decimalseparator,".")}}if(x.indexOf(h.gridlocalization.currencysymbol)>=0){x=x.replace(h.gridlocalization.currencysymbol,"")}if(x.indexOf(h.gridlocalization.percentagesymbol)>=0){x=x.replace(h.gridlocalization.percentagesymbol,"")}}var y=A.createfilter(C,x,"EQUAL",null,B.cellsFormat,h.gridlocalization)}else{var y=A.createfilter(C,x,"CONTAINS")}}A.operator=i;A.addfilter(0,y);return A};if(h.filterMode!=="simple"){if(u){var v=u.value;var t=h.getColumn(v);var s=w(t,r,"and");if(r.length>0){h.removeFilter(v);h.addFilter(v,s);h.applyFilters()}else{h.removeFilter(v);h.applyFilters()}if(h.filterMode==="advanced"){if(h._updateFilterRow){h._updateFilterRow(true)}}}}else{h.clearFilters(false,false);if(r.length>0){for(var q=0;q"+this.gridlocalization.filterstring+"");j.append(e);this.addHandler(e,"click",function(q){var i=function(u){if(h.filterrow){for(var x=0;x");k.attr("title",h.gridlocalization.filterclearstring);k.addClass(h.toThemeProperty("jqx-icon-close"));j.append(k);k.hide();h.filtericon=k;k.click(function(){h.clearFilters();h.filtericon.fadeOut(200)});if(h.dataview.filters.length>0){if(h.filterMode!="advanced"){n(h.dataview.filters[0].datafield)}else{if(h._updateFilterRow){h._updateFilterRow()}}}},_renderadvancedfilter:function(){var h=this;var c=function(){h.clearFilters(false,false);var n=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var p=h.filterinput.val();for(var m=0;m0||(w.length==0&&k=="NOT_NULL")||(w.length==0&&k=="NOT_EMPTY")||(w.length==0&&k=="EMPTY")||(w.length==0&&k=="NULL")){var s=l.displayfield;var x=new b.jqx.filter();if(q=="numericfilter"){if(h.gridlocalization.decimalseparator==","){if(w.indexOf(h.gridlocalization.decimalseparator)>=0){w=w.replace(h.gridlocalization.decimalseparator,".")}}if(w.indexOf(h.gridlocalization.currencysymbol)>=0){w=w.replace(h.gridlocalization.currencysymbol,"")}if(w.indexOf(h.gridlocalization.percentagesymbol)>=0){w=w.replace(h.gridlocalization.percentagesymbol,"")}}var j=x.createfilter(q,w,k,null,l.cellsFormat,h.gridlocalization);x.addfilter(0,j);h.addFilter(s,x)}}if(h.dataview.filters.length>0){h.applyFilters()}else{h.clearFilters()}if(h.dataview.filters.length==0){h.filtericon.fadeOut(200)}else{h.filtericon.fadeIn(200)}};var e=function(){var m=b("
    ").appendTo(h.filter);h.filterrow=m;m[0].cells=new Array();m.height(24);m.width(h.table.width());var k=0;var j=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var l=h.filterinput.val();b.each(h.columns.records,function(){var p=this;var n=b("
    ").appendTo(m);n.css("position","absolute");n.css("left",k+parseInt(p.uielement[0].style.left));if(p.pinned){n.css("z-index",h.tableZIndex+h.columns.records.length);n.addClass(h.toThemeProperty("jqx-widget-header"))}m[0].cells.push(n[0]);if(!this.filterable){return true}var o=b("").appendTo(n);o.keydown(function(r){if(r.keyCode===13){c()}});if(p.displayfield===j){o.val(l)}o.addClass(h.toThemeProperty("jqx-input"));o.addClass(h.toThemeProperty("jqx-rc-all"));o.addClass(h.toThemeProperty("jqx-widget"));o.addClass(h.toThemeProperty("jqx-widget-content"));var q=b("
    ").appendTo(n);q.append(b("
    "));o.focus(function(){h.ensureColumnVisible(p.displayfield);h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield);setTimeout(function(){h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield)},10)});q.click(function(){var u=b("
    ");u.insertAfter(q);q.remove();var s=h.getcolumntypebydatafield(p);var t=h._getfiltersbytype(s);var r;if(s==="string"){r=2}else{r=0}u.jqxDropDownList({theme:h.theme,enableBrowserBoundsDetection:true,renderMode:"simple",arrowSize:0,selectedIndex:r,rtl:h.rtl,dropDownWidth:230,dropDownHeight:180,width:20,height:20,source:t,selectionRenderer:function(){return"
    "}});h.addHandler(u,"close",function(v){o.focus();setTimeout(function(){o.focus()},10)});u.removeAttr("tabindex");u.find("div").removeAttr("tabindex");u.jqxDropDownList("open")});o[0].style.width=p.width-6-22+"px"});b("
    ").appendTo(m)};e();var i=b("
    ").appendTo(h.filter);var f=b("").appendTo(i);var g=b("").appendTo(i);var d=0;f.css("left",d);g.css("left",d);f.css("top","4px");g.css("top","4px");f.jqxButton({theme:h.theme});g.jqxButton({theme:h.theme});g.click(function(){h.filtercolumnsList.jqxDropDownList({disabled:false});h.filterinput.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filterinput.attr("disabled",false);h.filterbutton.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filter.find(".filterrow").addClass("filterrow-hidden");h.filter.find(".filterrow").hide();h._arrange()});f.click(function(){c()});h._renderhorizontalscroll()},_getfiltertype:function(c){var d="stringfilter";switch(c){case"number":case"int":case"float":case"decimal":d="numericfilter";break;case"boolean":case"bool":d="booleanfilter";break;case"date":case"time":d="datefilter";break;case"string":d="stringfilter";break}return d},getcolumntypebydatafield:function(e){var f=this;var d="string";var c=f.source.datafields||((f.source._source)?f.source._source.datafields:null);if(c){var g="";b.each(c,function(){if(this.name==e.displayfield){if(this.type){g=this.type}return false}});if(g){return g}}return d},_getfiltersbytype:function(c){var d=this;var e="";switch(c){case"number":case"float":case"int":e=d.gridlocalization.filternumericcomparisonoperators;break;case"date":e=d.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":e=d.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:e=d.gridlocalization.filterstringcomparisonoperators;break}return e},_getcellvalue:function(c,e){var d=null;d=e[c.datafield];if(c.displayfield!=null){d=e[c.displayfield]}if(d==null){d=""}return d},_renderrows:function(ap){if(this.editable){if(this.editKey!=null){if(ap!==false){var M=this.endroweditbykey(this.editKey)}}}if(this.treeGrid){this.treeGrid._renderrows();return}if(this._loading){return}if(this._updating){return}if(this.rendering){this.rendering()}var ab=this;var T=0;this.table[0].rows=new Array();var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-widget-content");if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var K=this.columns.records.length;var ao=b.jqx.browser.msie&&b.jqx.browser.version<8;if(ao){this.host.attr("hideFocus","true")}var R=ab.groups.length;var ai=new Array();var k=this.source.records;k=this.dataview.evaluate(k);this.dataViewRecords=k;if(this.dataview.pagesize=="all"||!this.pageable||this.serverProcessing){var u=k;if(this.pageable&&this.serverProcessing&&k.length>this.dataview.pagesize){var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}}else{var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}if(ab.groups&&ab.groups.length>0){var P=this.pageable?this.dataview.pagesize*this.dataview.pagenum:0;var z=function(w){var au=0;var i=new Array();for(var c=0;cab.dataview.pagesize*ab.dataview.pagenum&&au<=ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){i.push(j)}if(au>ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){break}}return i};if(this.pageSizeMode==="root"){var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",k,0);ab.rootRecordsLength=v.length;v=z(v)}else{var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",u,P)}var y=function(j,w){for(var av=0;av0){var aw=y(c.records,new Array());for(var au=0;auZ.maxwidth){e=Z.maxwidth}var l=b('
    ');b(document.body).append(l);var n=l.find("td");aq=1+parseInt(n.css("padding-left"))+parseInt(n.css("padding-right"));l.remove();break}}var ak=this.rtl?" "+this.toTP("jqx-grid-table-rtl"):"";var B="";var ar="
    ";var I=0;var s=K;for(var al=0;alZ.maxwidth){e=Z.maxwidth}e-=aq;if(e<0){e=0}if(ao){var ac=e;if(al==I){ac++}if(Z.rowDetailscolumn){var ac=ac+4;ar+="";B+=""}else{ar+="";B+=""}}else{ar+="";B+=""}aa+=e}B+="";ar+="";this._hiddencolumns=false;var g=false;if(this.rowDetails&&this._pinnedTable){this._pinnedTable.find("[data-role=details]").detach();this._table.find("[data-role=details]").detach()}if(U===0){var o='';var m=this.host.height();if(this.pageable){m-=this.pagerHeight;if(this.pagerPosition==="both"){m-=this.pagerHeight}}m-=this.columnsHeight;if(this.filterable){var ag=this.filter.find(".filterrow");var D=this.filter.find(".filterrow-hidden");var C=1;if(D.length>0){C=0}m-=this.filterHeight+this.filterHeight*ag.length*C}if(this.showstatusbar){m-=this.statusBarHeight}if(this.showAggregates){m-=this.aggregatesHeight}if(m<25){m=25}if(this.hScrollBar[0].style.visibility!="hidden"){m-=this.hScrollBar.outerHeight()}if(this.height==="auto"||this.height===null||this.autoheight){m=300}var l='";o+=l;B+=o;ar+=o;this.table[0].style.width=aa+2+"px";T=aa}var q=this.getRows();var x=new Array();for(var am=0;am';var E='';if(R>0){if(G.level';var E=''}}var p=0;var S=0;for(var al=0;alae.maxwidth){e=ae.maxwidth}e-=aq;if(e<0){e=0}var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(ae.pinned){H+=" "+this.toTP("jqx-grid-cell-pinned")}if(this.sortcolumn===ae.displayfield){H+=" "+this.toTP("jqx-grid-cell-sort")}if(this.altRows&&am%2!=0){H+=" "+this.toTP("jqx-grid-cell-alt")}if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var O="";if(R>0){if(G.levelat.maxwidth){e=at.maxwidth}A-=aq;if(A<0){A=0}if(!at.hidden){ac+=A}}e=ac}else{H+=" "+this.toTP("jqx-grid-cell-pinned")}}}var l='";af+='" class="'+H+'">';af+=aj;af+="";if(!ae.pinned){o+=l;if(g){E+=af}}else{E+=l;o+=l}if(R>0&&!ao){if(G.level";E+="";B+=o;ar+=E;if(!this.rowinfo[G.uid]){this.rowinfo[G.uid]={group:Y,row:G,details:null,detailsHeight:200,initialized:false,expanded:false}}else{if(!("group" in this.rowinfo[G.uid])){this.rowinfo[G.uid].group=Y}if(!("row" in this.rowinfo[G.uid])){this.rowinfo[G.uid].row=G}if(!("details" in this.rowinfo[G.uid])){this.rowinfo[G.uid].details=null}if(!("detailsHeight" in this.rowinfo[G.uid])){this.rowinfo[G.uid].detailsHeight=200}if(!("initialized" in this.rowinfo[G.uid])){this.rowinfo[G.uid].initialized=false}if(!("expanded" in this.rowinfo[G.uid])){this.rowinfo[G.uid].expanded=false}}if(this.serverProcessing){this.rowinfo[G.uid].row=G}if(this.rowDetails){var F=this.rowinfo[G.uid].detailsHeight;if(this.rowinfo[G.uid]){if(this.rowinfo[G.uid].expanded){var ah='';B+=ah;ar+=ah}}B+="
    ';l+=this.gridlocalization.emptydatastring;l+="
    0){if(G.level0&&ao&&Y&&al>=R){l+="font-size: 1px; border-color: transparent; color: transparent;";af+="font-size: 1px; border-color: transparent; color: transparent;"}if(ae.pinned){l+="pointer-events: auto;";af+="pointer-events: auto;"}if(!Y&&ae.rowDetailscolumn){if(this.rowinfo[G.uid]){if(!this.rowinfo[G.uid].nodetails){if(this.rowinfo[G.uid].expanded){if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-expand")}else{H+=" "+this.toTP("jqx-grid-group-expand-rtl")}H+=" "+this.toTP("jqx-icon-arrow-down")}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}if(!this.autoRowHeight||(this.autoRowHeight&&!ae.autoCellHeight)){H+=" "+this.toTP("jqx-grid-cell-nowrap ")}var aj=ab._getcellvalue(ae,G);var f=ae.cellsFormat;if(R>0){if(G.level=0||aj.indexOf(" ng-")>=0)){x.push({rowKey:G.uid,row:d,column:ae.datafield,value:aj,columnIndex:al})}}}else{if(this.groupsRenderer){aj=this.groupsRenderer(aj,G,G.level)}}l+='" class="'+H+'">';l+=aj;l+="
    ";ar+="";if(g){if(ab.WinJS){MSApp.execUnsafeLocalFunction(function(){ab.table.html(ar+B)})}else{ab.table[0].innerHTML=ar+B}var W=this.table.find("#table"+this.element.id);var X=this.table.find("#pinnedtable"+this.element.id);X.css("float","left");X.css("pointer-events","none");W.css("float","left");X[0].style.position="absolute";W[0].style.position="relative";W[0].style.zIndex=V-10;X[0].style.zIndex=V+10;this._table=W;this._table[0].style.left="0px";this._pinnedTable=X;this._pinnedTable[0].style.left="0px";this._pinnedTable[0].style.width=T+"px";this._table[0].style.width=T+"px";if(this.rtl){if(T>parseInt(this.element.style.width)&&this._haspinned){this._pinnedTable[0].style.left=3-T+parseInt(this.element.style.width)+"px"}}if(this.rowDetails){for(var am=0;am0){var an=this._table[0].rows;b.each(x,function(){var w=this.row;var au=this.rowKey;var j=this.column;var i=this.columnIndex;var t=ab._getuirow(au);if(t){var c=t[0].cells[i];if(b.jqx.angularCompile){b.jqx.angularCompile(c,"
    "+c.innerHTML+"
    ")}}})}if(this.rendered){this.rendered()}},getcolumnindex:function(c){var d=this.getColumn(c);var e=this.columns.records.indexOf(d);return e},setcolumnindex:function(e,i,j){var h=this.getColumn(e);if(h.pinned){return}if(h.hidden){return}if(h.checkboxcolumn){return}if(h.grouped){return}var l=this.columns.records.indexOf(h);this.columns.records.splice(l,1);this.columns.records.splice(i,0,h);var f=0;var n=this.headerZIndex;this.columnsrow.children().detach();var k=this.toThemeProperty("jqx-grid-cell");k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");k+=" "+this.toThemeProperty("jqx-item");var m=this;var c=null;if(m.filterrow!=undefined){var c=b(m.filterrow.children()[0])}this.columnsrow[0].cells=[];var g=false;b.each(this.columns.records,function(p,s){var q=this.uielement;m.columnsrow.append(q);if(!m.rtl){q.css("z-index",n--)}else{q.css("z-index",n++)}var o=!m.rtl?250+n-1:250+n+1;if(this.pinned){q.css("z-index",o)}var r=this.width;q.css("left",f);m.columnsrow[0].cells[m.columnsrow[0].cells.length]=q[0];if(this.hidden){g=true}if(!(this.hidden&&this.hideable)){f+=r}});if(this.groupable){var d=this.groups.length;if(d>0){if(l-d>=0){l-=d;i-=d}}}if(this.rowDetails){if(l-1>=0){l--;i--}}if(this.selectionMode=="checkbox"){if(l-1>=0){l--;i--}}var h=this._columns[l];this._columns.splice(l,1);this._columns.splice(i,0,h);this.resize();this._rendercolumnGroups();this._raiseEvent("columnReordered",{dataField:h.datafield,oldIndex:l,newIndex:i})},_pinnedColumnsLength:function(){var c=0;b.each(this.columns.records,function(){if(this.pinned){c++}if(this.grouped){c++}});if(this.rowDetails){c++}if(this.selectionMode=="checkbox"){c++}return c},_handlecolumnsReorder:function(){var g=this;var h=-1;var d=false;if(!g.columnsReorder){return}var f="mousemove.reorder"+this.element.id;var e="mousedown.reorder"+this.element.id;var i="mouseup.reorder"+this.element.id;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true;f=b.jqx.mobile.getTouchEventName("touchmove")+".reorder"+this.element.id;e=b.jqx.mobile.getTouchEventName("touchstart")+".reorder"+this.element.id;i=b.jqx.mobile.getTouchEventName("touchend")+".reorder"+this.element.id}this.removeHandler(b(document),f);this.addHandler(b(document),f,function(x){if(g.resizing){return true}if(g.reordercolumn!=null){var m=parseInt(x.pageX);var u=parseInt(x.pageY);if(c){var t=g.getTouches(x);var p=t[0];if(p!=undefined){m=parseInt(p.pageX);u=parseInt(p.pageY)}}var j=g.host.coord();var w=parseInt(j.left);var k=parseInt(j.top);if(g.dragmousedownoffset==undefined||g.dragmousedownoffset==null){g.dragmousedownoffset={left:0,top:0}}var B=parseInt(m)-parseInt(g.dragmousedownoffset.left);var s=parseInt(u)-parseInt(g.dragmousedownoffset.top);g.reordercolumn.css({left:B+"px",top:s+"px"});d=false;if(m>=w&&m<=w+g.host.width()){if(u>=k&&u<=k+g.host.height()){d=true}}h=-1;if(d){g.reordercolumnicon.removeClass(g.toThemeProperty("jqx-grid-dragcancel-icon"));g.reordercolumnicon.addClass(g.toThemeProperty("jqx-grid-drag-icon"));var n=g.columnsheader.coord();var q=n.top+g.columnsheader.height();if(g.columnsdropline!=null){if(u>=n.top&&u<=q){h=g._handlereordercolumnsdroplines(m);if(g.columnGroups){if(h!=-1){var l=0;l+=g._pinnedColumnsLength();var o=h.index;if(o>=l){var y=g.columns.records[o];if(y!=undefined){var v=g.columns.records.indexOf(g.getColumn(y.datafield));if(y.datafield==null){var v=g.columns.records.indexOf(g.getcolumnbytext(y.text))}var r=b.data(g.reordercolumn[0],"reorderrecord");var A=g.columns.records.indexOf(g.getColumn(r));var z=y;if(A=p){var s=g.columns.records[q];if(s!=undefined){var u=g.columns.records.indexOf(g.getColumn(s.datafield));if(s.datafield==null){var u=g.columns.records.indexOf(g.getcolumnbytext(s.text))}if(g.columnGroups){var r=s;if(xu){g.setcolumnindex(k,u)}}}}}}if(g.columnsdropline!=null){g.columnsdropline.remove();g.columnsdropline=null}}}})},getcolumnbytext:function(d){var c=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.text==d){c=this;return false}})}return c},_handlereordercolumnsdroplines:function(i){var c=this;var h=-1;var e=c._pinnedColumnsLength();var g=parseInt(c.host.coord().left);var d=g+c.host.width();var f=c.vScrollBar.css("visibility")!="hidden"?19:0;if(!c.rtl){f=0}b.each(c.columnsbounds,function(j){if(j>=e){if(this.width==0){return true}if(i<=this.left+this.width/2){if(i>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+parseInt(this.left)+"px");c.columnsdropline.css("top",parseInt(this.top)+"px");c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"before"};return false}else{if(i>=this.left+this.width/2){if(this.left+this.width>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+1+this.left+this.width);c.columnsdropline.css("top",this.top);c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"after"}}}}});return h},_createreordercolumn:function(d,f,i){var h=this;var g=f;if(h.reordercolumn){h.reordercolumn.remove()}if(h.columnsdropline){h.columnsdropline.remove()}h.reordercolumn=b("
    ");var k=d.clone();h.reordercolumn.css("z-index",999999);k.css("border-width","1px");k.css("opacity","0.4");var j=b(k.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(j.length>0){j.css("display","none")}var c=b(k.find(".jqx-icon-close"));if(c.length>0){c.css("display","none")}h.reordercolumnicon=b('
    ');h.reordercolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.reordercolumn.css("float","left");h.reordercolumn.css("position","absolute");var e=h.host.coord();k.width(d.width()+16);h.reordercolumn.append(k);h.reordercolumn.height(d.height());h.reordercolumn.width(k.width());h.reordercolumn.append(h.reordercolumnicon);b(document.body).append(h.reordercolumn);k.css("margin-left",0);k.css("left",0);k.css("top",0);h.reordercolumn.css("left",g.left+h.dragmousedown.left);h.reordercolumn.css("top",g.top+h.dragmousedown.top);if(i!=undefined&&i){h.columnsdropline=b('
    ');h.columnsdropline.width(2);h.columnsdropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));b(document.body).append(h.columnsdropline)}},_handlecolumnsdragreorder:function(d,g){if(this.reordercolumn){this.reordercolumn.remove()}if(this.columnsdropline){this.columnsdropline.remove()}this.dragmousedown=null;this.dragmousedownoffset=null;this.columndragstarted=false;this.reordercolumn=null;var h=this;var f;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true}var e="mousedown.drag";var f="mousemove.drag";if(c){e=b.jqx.mobile.getTouchEventName("touchstart")+".drag";f=b.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(g,"dragstart",function(i){return false})}this.addHandler(g,e,function(k){if(false==d.draggable){return true}if(h.resizing){return true}h.__drag=true;var j=k.pageX;var i=k.pageY;if(c){var l=h.getTouches(k);var n=l[0];j=n.pageX;i=n.pageY}h.dragmousedown={left:j,top:i};var m=b(k.target).coord();h.dragmousedownoffset={left:parseInt(j)-parseInt(m.left),top:parseInt(i-m.top)};if(k.preventDefault){k.preventDefault()}return true});this.addHandler(g,f,function(k){if(!d.draggable){return true}if(undefined==d.datafield){return true}if(d.pinned){return true}if(h.resizing){return true}if(h.dragmousedown){var j=k.pageX;var i=k.pageY;if(c){var m=h.getTouches(k);var o=m[0];if(o!=undefined){j=o.pageX;i=o.pageY}}f={left:j,top:i};if(!h.columndragstarted&&h.reordercolumn==null){var l=Math.abs(f.left-h.dragmousedown.left);var n=Math.abs(f.top-h.dragmousedown.top);if(l>3||n>3){h._createreordercolumn(g,f,true);b(document.body).addClass("jqx-disableselect");b.data(h.reordercolumn[0],"reorderrecord",d.datafield)}}}})},getTouches:function(c){return b.jqx.mobile.getTouches(c)},_handlecolumnsResize:function(){var i=this;if(this.columnsResize){var k=false;if(i.isTouchDevice()){k=true}var g="mousemove.resize"+this.element.id;var d="mousedown.resize"+this.element.id;var e="mouseup.resize"+this.element.id;if(k){var g=b.jqx.mobile.getTouchEventName("touchmove")+".resize"+this.element.id;var d=b.jqx.mobile.getTouchEventName("touchstart")+".resize"+this.element.id;var e=b.jqx.mobile.getTouchEventName("touchend")+".resize"+this.element.id}this.removeHandler(b(document),g);this.addHandler(b(document),g,function(n){if(i.resizablecolumn!=null&&!i.disabled&&i.resizing){if(i.resizeline!=null){var s=i.resizablecolumn.columnelement;var p=i.host.coord();var v=parseInt(i.resizestartline.coord().left);var l=v-i._startcolumnwidth;var w=i.resizablecolumn.column.minwidth;if(w=="auto"){w=0}else{w=parseInt(w)}var m=i.resizablecolumn.column.maxwidth;if(m=="auto"){m=0}else{m=parseInt(m)}var q=n.pageX;if(k){var t=b.jqx.mobile.getTouches(n);var r=t[0];q=r.pageX}l+=w;var u=m>0?v+m:0;var o=m==0?true:i._startcolumnwidth+q-v=p.left&&q>=l){if(u!=0&&n.pageX=p.left&&q<=p.left+i.host.width()){i.resizeline.css("left",q);if(k){return false}}}}}}if(!k&&i.resizablecolumn!=null){return false}});this.removeHandler(b(document),d);this.addHandler(b(document),d,function(m){if(i.resizablecolumn!=null&&!i.disabled){var l=i.resizablecolumn.columnelement;if(l.coord().top+l.height()+5m.pageY){i.resizablecolumn=null;return}i._startcolumnwidth=i.resizablecolumn.column.width;i.resizablecolumn.column._width=null;b(document.body).addClass("jqx-disableselect");b(document.body).addClass("jqx-position-reset");i._mouseDownResize=new Date();i.resizing=true;i._resizecolumn=i.resizablecolumn.column;i.resizeline=i.resizeline||b('
    ');i.resizestartline=i.resizestartline||b('
    ');i.resizebackground=i.resizebackground||b('
    ');i.resizebackground.css("opacity",0.01);i.resizebackground.css("cursor","col-resize");i.resizeline.css("cursor","col-resize");i.resizestartline.css("cursor","col-resize");i.resizeline.addClass(i.toThemeProperty("jqx-grid-column-resizeline"));i.resizestartline.addClass(i.toThemeProperty("jqx-grid-column-resizestartline"));b(document.body).append(i.resizeline);b(document.body).append(i.resizestartline);b(document.body).append(i.resizebackground);var n=i.resizablecolumn.columnelement.coord();i.resizebackground.css("left",i.host.coord().left);i.resizebackground.css("top",i.host.coord().top);i.resizebackground.width(i.host.width());i.resizebackground.height(i.host.height());i.resizebackground.css("z-index",999999999);var o=function(q){if(!i.rtl){q.css("left",parseInt(n.left)+i._startcolumnwidth)}else{q.css("left",parseInt(n.left))}var s=0;var t=i.showtoolbar?i.toolbarHeight:0;s+=t;var v=i.showstatusbar?i.statusBarHeight:0;s+=v;var r=i.showAggregates?i.aggregatesHeight:0;s+=r;if(i.pageable&&i.pagerPosition!="bottom"){s+=i.pagerHeight}if(i.filterable){s+=i.filter.height()}var p=0;if(i.pageable&&i.pagerPosition!="top"){p=i.pagerHeight}var u=i.hScrollBar.css("visibility")!="hidden"?i.scrollBarSize:0;q.css("top",parseInt(n.top));q.css("z-index",9999999999);if(i.columnGroups){q.height(i.host.height()+i.resizablecolumn.columnelement.height()-p-s-u-i.columnGroupslevel*i.columnsHeight)}else{q.height(i.host.height()-p-s-u)}q.show("fast")};o(i.resizeline);o(i.resizestartline);i.dragmousedown=null}});var f=function(){b(document.body).removeClass("jqx-disableselect");b(document.body).removeClass("jqx-position-reset");if(!i.resizing){return}i._mouseUpResize=new Date();var t=i._mouseUpResize-i._mouseDownResize;if(t<200){i.resizing=false;if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){i._resizecolumn=null;i.resizeline.hide();i.resizestartline.hide();i.resizebackground.remove()}return}i.resizing=false;if(i.disabled){return}var n=i.host.width();if(i.vScrollBar[0].style.visibility!="hidden"){n-=20}if(n<0){n=0}if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){var u=parseInt(i.resizeline.css("left"));var o=parseInt(i.resizestartline.css("left"));var s=i._startcolumnwidth+u-o;if(i.rtl){var s=i._startcolumnwidth-u+o}var r=i._resizecolumn.width;i._resizecolumn.width=s;if(i._resizecolumn._percentagewidth!=undefined){i._resizecolumn._percentagewidth=(s/n)*100}for(var q=0;q0){k-=parseInt(this.scrollBarSize)+6;c=k}var j="";if(this.columns==undefined||this.columns.records==undefined){return}var i=this;var h=false;b.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=i.vScrollBar[0].style.visibility=="hidden"?0:i.scrollBarSize+5;if(i.scrollBarSize==0){n=0}m=parseFloat(this.width)*c/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(c)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}k-=Math.round(m)}else{if(this.width!="auto"&&!this._width){k-=this.width}else{j+=this.text}}}});var f=this.columnsheader.find("#columntable"+this.element.id);if(f.length==0){return}var d=0;var g=f.find(".jqx-grid-column-header");var e=0;b.each(this.columns.records,function(n,q){var m=b(g[n]);var t=false;var s=this.width;var o=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){s=parseFloat(this._percentagewidth)*c/100}else{s=parseFloat(this.width)*c/100}s=Math.round(s);t=true}if(this.width!="auto"&&!this._width&&!t){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(t){if(sthis.maxwidth&&this.maxwidth!="auto"){s=this.maxwidth;this.width=s}if(parseInt(m[0].style.width)!=s){m.width(s);this.width=s}}else{var l=Math.floor(k*(this.text.length/j.length));if(isNaN(l)){l=this.minwidth}var p=(k*(this.text.length/j.length))-l;d+=p;if(d>=1){d-=1;l++}if(d>=0.5&&n==i.columns.records.length-1){l++}if(l<0){var r=b(""+this.text+"");b(document.body).append(r);l=10+r.width();r.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=l;m.width(this.width)}}if(parseInt(m[0].style.left)!=e){m.css("left",e)}if(!(this.hidden)){e+=this.width}this._requirewidthupdate=true;if(o!==this.width){h=true}});this.columnsheader.width(2+e);f.width(this.columnsheader.width());this._resizecolumnGroups();if(h){this._renderrows()}if(this.showAggregates){this._refreshcolumnsaggregates()}},_rendercolumnheaders:function(){var r=this;if(this._updating){return}if(r.columns.records.length>r.headerZIndex){r.headerZIndex=r.columns.records.length+10}this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var g=b('
    ');g[0].cells=new Array();var l=0;var h=0;var s="";var u=this.host.width();var f=u;var w=new Array();var t=new Array();b.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){u-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*f/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}u-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}u-=this.width}}}}else{s+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(r._haspinned){this.pinned=true}w[w.length]=this}else{t[t.length]=this}});if(!this.rtl){for(var o=0;o=this.columns.records.length-w.length;o--){this.columns.replace(o,w[e++])}for(var m=0;m
    ');if(r.rtl&&K===0){x[0].style.borderLeftColor="transparent"}if(r.columnGroups){x[0].style.height=n+"px";x[0].style.bottom="0px";if(this.pinned){x[0].style.zIndex=L}}this.uielement=x;this.element=x;if(this.classname!=""&&this.classname){x.addClass(this.classname)}var C=this.width;var D=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){C=parseFloat(this._percentagewidth)*f/100}else{C=parseFloat(this.width)*f/100}C=Math.round(C);D=true}if(this.width!="auto"&&!this._width&&!D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}x[0].style.width=parseInt(C)+"px"}else{if(D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}x.width(C);this.width=C}else{var H=Math.floor(u*(this.text.length/s.length));var E=(u*(this.text.length/s.length))-H;c+=E;if(c>=1){c-=1;H++}if(c>=0.5&&K==r.columns.records.length-1){H++}if(isNaN(H)){H=this.minwidth}if(H<0){var F=b(""+this.text+"");b(document.body).append(F);H=10+F.width();F.remove()}if(Hthis.maxwidth){H=this.maxwidth}this._width="auto";this.width=parseInt(H);C=this.width;x.width(this.width)}}if(this.hidden){x.css("display","none")}var k=b(x.children()[0]);g[0].cells[K]=x[0];var p=false;var J=false;var z=this.renderer!=null?this.renderer(this.text,this.align,n):r._rendercolumnheader(this.text,this.align,n,r);if(z==null){z=r._rendercolumnheader(this.text,this.align,n,r)}if(this.renderer!=null){z=b(z)}p=true;if(r.WinJS){MSApp.execUnsafeLocalFunction(function(){k.append(b(z))})}else{if(this.renderer){k.append(b(z))}else{if(z){k[0].innerHTML=z}}}if(z!=null){var B=b('
    ');k.append(B);var O=B.children();this.sortasc=O[1];this.sortdesc=O[2];this.filtericon=O[0];this.iconscontainer=B;if(r.rtl){B.css("margin-left","0px");B.css("left","0px");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}}g.append(x);if(r.columnsReorder&&this.draggable&&r._handlecolumnsdragreorder){r._handlecolumnsdragreorder(this,x)}var M=this;r.addHandler(x,"click",function(i){if(M.checkboxcolumn){return true}if(r._togglesort){if(!r._loading){r._togglesort(M)}}i.preventDefault()});if(r.columnsResize&&!J){var y=false;var j="mousemove";if(r.isTouchDevice()){y=true;j=b.jqx.mobile.getTouchEventName("touchstart")}r.addHandler(x,j,function(P){if(!M.resizable){r.resizablecolumn=null;return true}var i=parseInt(P.pageX);var R=5;var U=parseInt(x.coord().left);if(r.hasTransform){U=b.jqx.utilities.getOffset(x).left}if(r._handlecolumnsResize){if(y){var Q=b.jqx.mobile.getTouches(P);var T=Q[0];i=T.pageX;R=40;if(i>=U+M.width-R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize")}else{x.css("cursor","");r.resizablecolumn=null}return true}var S=M.width;if(r.rtl){S=0}if(i>=U+S-R){if(i<=U+S+R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize");return false}else{x.css("cursor","");r.resizablecolumn=null}}else{x.css("cursor","");if(i0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}this.columnsrow=g;r.columnsheader.append(g);g.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsReorder){this._handlecolumnsReorder()}if(this._handlecolumnsResize){this._handlecolumnsResize()}if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var o=0;for(var l=0;l');var k=b(this._rendercolumnheader(q.text,q.align,this.columnsHeight,this));f.append(k);f[0].style.left=d+"px";if(d===0){f[0].style.borderLeftColor="transparent"}f[0].style.top=p+"px";f[0].style.height=r+"px";f[0].style.width=-1+q.width+"px";e.append(f);q.element=f}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var d=0;d0){d.removeHandler(c,"mouseenter");d.removeHandler(c,"mouseleave");var e=b(f.filtericon);d.removeHandler(e,"mousedown");d.removeHandler(e,"click");d.removeHandler(c,"click")}},_calculateaggregate:function(k,o,d,h){if(!k.datafield){return null}var e=k.aggregates;if(!e){e=o}if(e){var f=new Array();for(var n=0;n0){r(u[t].records)}}};r(h);h=q}if(this.treeGrid&&this.filterable&&this.dataview.filters.length>0){var p=new Array();for(var n=0;n=g){if(m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e,formatStrings:f}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}}return m}else{var m=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,h,c);if(this.treeGrid&&m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var g=this.source._source.hierarchy&&this.source._source.hierarchy.groupingDataFields?this.source._source.hierarchy.groupingDataFields.length:0;if(g==0||c>=g){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}return m}}}return null},getcolumnaggregateddata:function(d,h,i,e){var f=this.getColumn(d);if(!f){return""}var k=(i==undefined||i==false)?false:i;if(h==null){return""}var c=f.aggregates;f.aggregates=null;var j=this._calculateaggregate(f,h,k,e);var g={};if(j){g=j[d];f.aggregates=c}return g},_updatecolumnaggregates:function(e,h,c){var f=this;if(!h){c.children().remove();c.html("");if(e.aggregatesRenderer){var g={};if(e.aggregates){g=this.getcolumnaggregateddata(e.datafield,e.aggregates)}var d=e.aggregatesRenderer({},e,c,null);c.html(d)}return}c.children().remove();c.html("");if(e.aggregatesRenderer){if(h){var d=e.aggregatesRenderer(h[e.datafield],e,c,this.getcolumnaggregateddata(e.datafield,e.aggregates),"aggregates");c.html(d)}}else{b.each(h,function(){var j=this;for(g in j){var k=b('
    ');var i=g;i=f._getaggregatename(i);k.html(i+":"+j[g]);if(f.rtl){k.addClass(f.toThemeProperty("jqx-rtl"))}c.append(k)}})}},_getaggregatetype:function(d){switch(d){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return d}var c=d;for(var e in d){c=e;break}return c},_getaggregatename:function(d){var c=d;switch(d){case"min":c="Min";break;case"max":c="Max";break;case"count":c="Count";break;case"avg":c="Avg";break;case"product":c="Product";break;case"var":c="Var";break;case"stdevp":c="StDevP";break;case"stdev":c="StDev";break;case"varp":c="VarP";case"sum":c="Sum";break}if(d===c&&typeof(c)!="string"){for(var e in d){c=e;break}}return c},_updatecolumnsaggregates:function(){var g=this.getRows();if(this.dataViewRecords){g=this.dataViewRecords}var c=this.columns.records.length;if(undefined!=this.aggregates[0].cells){for(var f=0;f');var f=0;var m=this.columns.records.length;var l=this.toThemeProperty("jqx-grid-cell");if(this.rtl){l+=" "+this.toThemeProperty("jqx-grid-cell-rtl");f=0;c.css("border-left-width","0px");this.aggregates.css("border-left-color","transparent")}l+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var n=m+10;var o=new Array();this.aggregates[0].cells=o;for(var h=0;hg.maxwidth){d=g.maxwidth}var e=l;if(g.cellsalign){e+=" "+this.toThemeProperty("jqx-"+g.cellsalign+"-align")}var k=b('
    ');c.append(k);k.css("left",f);if(!this.rtl){k.css("z-index",n--)}else{k.css("z-index",n++);if(h==0){k.css("border-left-width","0px")}}k.width(d);k[0].style.left=f+"px";if(!(g.hidden&&g.hideable)){f+=d}else{k.css("display","none")}o[o.length]=k[0];this._updatecolumnaggregates(g,i,k)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){c.css("z-index",n--)}c.width(parseInt(f)+2);c.height(this.aggregatesHeight);this.aggregates.children().remove();this.aggregates.append(c);this.aggregates.removeClass(this.toThemeProperty("jqx-widget-header"));this.aggregates.addClass(l);this.aggregates.css("border-bottom-color","transparent");this.aggregates.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}},destroy:function(){var h=this;if(h.columns&&h.columns.records){for(var f=0;f0){j.jqxDropDownList("destroy")}}}if(h.filtercolumnsList){h.filtercolumnsList.jqxDropDownList("destroy")}}if(h.pageable){if(h.pagershowrowscombotop&&h.pagershowrowscombotop.jqxDropDownList){h.pagershowrowscombotop.jqxDropDownList("destroy")}if(h.pagershowrowscombobottom&&h.pagershowrowscombobottom.jqxDropDownList){h.pagershowrowscombobottom.jqxDropDownList("destroy")}var l=h.pagerbuttonsbottom.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();var l=h.pagerbuttonstop.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();if(h.pagernexttop){h.pagernexttop.jqxButton("destroy");h.pagerprevioustop.jqxButton("destroy");h.pagernextbottom.jqxButton("destroy");h.pagerpreviousbottom.jqxButton("destroy");h.pagerfirsttop.jqxButton("destroy");h.pagerfirstbottom.jqxButton("destroy");h.pagerlasttop.jqxButton("destroy");h.pagerlastbottom.jqxButton("destroy")}}h._removeHandlers();h.vScrollBar.jqxScrollBar("destroy");h.hScrollBar.jqxScrollBar("destroy");delete h.vScrollBar;delete h.hScrollBar;delete h._mousewheelfunc;b.jqx.utilities.resize(h.host,null,true);h.host.remove()},propertiesChangedHandler:function(c,d,e){if(e.width&&e.height&&Object.keys(e).length==2){c.refresh()}},propertyChangedHandler:function(e,l,d,k){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(k!==d){if(l=="filterable"){e._render()}else{if(l==="height"){e.host.height(e.height);e.host.width(e.width);e._updatesize(false,true)}else{if(l==="width"){e.host.height(e.height);e.host.width(e.width);e._updatesize(true,false)}else{if(l==="source"){e.updateBoundData()}else{if(l==="columns"||l==="columnGroups"){e._columns=null;e._render()}else{if(l==="rtl"){e.content.css("left","");e.columns=e._columns;e.vScrollBar.jqxScrollBar({rtl:k});e.hScrollBar.jqxScrollBar({rtl:k});e._render()}else{if(l==="pagerMode"){e.pagerMode=k;e._initpager()}else{if(l=="pageSizeOptions"){e._initpager();var j=false;for(var f=0;f0){c.jqxDropDownList({theme:e.theme})}if(e.filtercolumnsList){e.filtercolumnsList.jqxDropDownList({theme:e.theme})}}e.refresh()}else{e.refresh()}}}}}}}}}}}}}}}}}},_rendercolumnheader:function(f,g,c,d){var e="4px";if(d.columnGroups){e=(c/2-this._columnheight/2);if(e<0){e=4}e+="px"}else{if(this.columnsHeight!=25){e=(this.columnsHeight/2-this._columnheight/2);if(e<0){e=4}e+="px"}}return'
    '+f+"
    "}});function a(c,d){this.owner=c;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.aggregates=null;this.aggregatesRenderer=null;this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(e,f){if(this[e]){var g=this[e];this[e]=f;this.owner._columnPropertyChanged(this,e,f,g)}else{if(this[e.toLowerCase()]){var g=this[e.toLowerCase()];this[e.toLowerCase()]=f;this.owner._columnPropertyChanged(this,e.toLowerCase(),f,g)}}};this._initfields=function(f){if(f!=null){var e=this;if(b.jqx.hasProperty(f,"dataField")){this.datafield=b.jqx.get(f,"dataField")}if(b.jqx.hasProperty(f,"displayField")){this.displayfield=b.jqx.get(f,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"validation")){this.validation=b.jqx.get(f,"validation")}if(b.jqx.hasProperty(f,"autoCellHeight")){this.autoCellHeight=b.jqx.get(f,"autoCellHeight")}if(b.jqx.hasProperty(f,"text")){this.text=b.jqx.get(f,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(f,"sortable")){this.sortable=b.jqx.get(f,"sortable")}if(b.jqx.hasProperty(f,"hidden")){this.hidden=b.jqx.get(f,"hidden")}if(b.jqx.hasProperty(f,"groupable")){this.groupable=b.jqx.get(f,"groupable")}if(b.jqx.hasProperty(f,"renderer")){this.renderer=b.jqx.get(f,"renderer")}if(b.jqx.hasProperty(f,"align")){this.align=b.jqx.get(f,"align")}if(b.jqx.hasProperty(f,"cellsAlign")){this.cellsalign=b.jqx.get(f,"cellsAlign")}if(b.jqx.hasProperty(f,"cellsFormat")){this.cellsFormat=b.jqx.get(f,"cellsFormat")}if(b.jqx.hasProperty(f,"width")){this.width=b.jqx.get(f,"width")}if(b.jqx.hasProperty(f,"minWidth")){this.minwidth=b.jqx.get(f,"minWidth")}if(b.jqx.hasProperty(f,"maxWidth")){this.maxwidth=b.jqx.get(f,"maxWidth")}if(b.jqx.hasProperty(f,"cellsRenderer")){this.cellsRenderer=b.jqx.get(f,"cellsRenderer")}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"pinned")){this.pinned=b.jqx.get(f,"pinned")}if(b.jqx.hasProperty(f,"filterable")){this.filterable=b.jqx.get(f,"filterable")}if(b.jqx.hasProperty(f,"filter")){this.filter=b.jqx.get(f,"filter")}if(b.jqx.hasProperty(f,"resizable")){this.resizable=b.jqx.get(f,"resizable")}if(b.jqx.hasProperty(f,"draggable")){this.draggable=b.jqx.get(f,"draggable")}if(b.jqx.hasProperty(f,"editable")){this.editable=b.jqx.get(f,"editable")}if(b.jqx.hasProperty(f,"initEditor")){this.initeditor=b.jqx.get(f,"initEditor")}if(b.jqx.hasProperty(f,"createEditor")){this.createeditor=b.jqx.get(f,"createEditor")}if(b.jqx.hasProperty(f,"destroyEditor")){this.destroyeditor=b.jqx.get(f,"destroyEditor")}if(b.jqx.hasProperty(f,"getEditorValue")){this.geteditorvalue=b.jqx.get(f,"getEditorValue")}if(b.jqx.hasProperty(f,"className")){this.classname=b.jqx.get(f,"className")}if(b.jqx.hasProperty(f,"cellClassName")){this.cellclassname=b.jqx.get(f,"cellClassName")}if(b.jqx.hasProperty(f,"aggregates")){this.aggregates=b.jqx.get(f,"aggregates")}if(b.jqx.hasProperty(f,"aggregatesRenderer")){this.aggregatesRenderer=b.jqx.get(f,"aggregatesRenderer")}if(b.jqx.hasProperty(f,"rendered")){this.rendered=b.jqx.get(f,"rendered")}if(b.jqx.hasProperty(f,"exportable")){this.exportable=b.jqx.get(f,"exportable")}if(b.jqx.hasProperty(f,"nullable")){this.nullable=b.jqx.get(f,"nullable")}if(b.jqx.hasProperty(f,"columnGroup")){this.columngroup=b.jqx.get(f,"columnGroup")}if(!f instanceof String&&!(typeof f=="string")){for(var g in f){if(!e.hasOwnProperty(g)){if(!e.hasOwnProperty(g.toLowerCase())){c.host.remove();throw new Error("jqxDataTable: Invalid property name - "+g+".")}}}}}};this._initfields(d);return this}b.jqx.dataCollection=function(c){this.records=new Array();this.owner=c;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(e,d){this.records[e]=d};this.isempty=function(d){if(this.records[d]==undefined){return true}return false};this.initialize=function(d){if(d<1){d=1}this.records[d-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(d){return this.records.indexOf(d)};this.add=function(d){if(d==null){return false}this.records[this.records.length]=d;return true};this.insertAt=function(e,d){if(e==null||e==undefined){return false}if(d==null){return false}if(e>=0){if(e0){for(var s=0;sc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(b.jqx.dataFormat.isNumber(d)&&b.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(b.jqx.dataFormat.isDate(d)&&b.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(d)&&!b.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(p){if(this.grid.serverProcessing){if(p){if(this.grid.source._source.id==""||this.grid.source._source.id==null){if(this.grid.pageable){var c=this.grid.pageSize*this.pagenum;this.grid.rowsByKey=new Array();var h=this;b.each(p,function(i){this.uid=c;h.grid.rowsByKey[this.uid]=this;c++})}}}return p}var d=new Array();if(this.filters.length){var j=new Array();var o=function(s,w){for(var u=0;u0)){var n=new Array();var k=function(r,s){for(var q=0;q0){k(t,t.records)}}};k(null,p);o.call(this,n,d);for(var e=0;e0)){var h=this;var l=new Array();this._sortData=null;var f=function(t,q){h._sortData=null;var r=null;if(h.source.hierarchy.groupingDataFields){if(q&&q.length>0&&q[0].level0){return b(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=b(d).attr(j);if(c!=null&&c.toString().length>0){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.grid.rowsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.grid.rowsByKey["jqx"+f];if(!g){var g=this.grid.rowsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); +(function(b){b.jqx.jqxWidget("jqxDataTable","",{});b.extend(b.jqx._jqxDataTable.prototype,{defineInstance:function(){var c={altRows:false,aggregatesHeight:34,autoShowLoadElement:true,autoRowHeight:true,columnsHeight:30,columns:[],columnGroups:null,columnsResize:false,columnsReorder:false,dataview:null,disabled:false,editable:false,editSettings:{saveOnPageChange:true,saveOnBlur:true,saveOnSelectionChange:true,cancelOnEsc:true,saveOnEnter:true,editSingleCell:false,editOnDoubleClick:true,editOnF2:true},enableHover:true,enableBrowserSelection:false,filterHeight:35,filterable:false,filterMode:"default",groupsRenderer:null,groups:new Array(),headerZIndex:359,height:null,handleKeyboardNavigation:null,indentWidth:25,initRowDetails:false,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxDataTable raises the 'bindingComplete' event when the binding is completed.",localization:null,pagerHeight:40,pageSize:10,pageSizeOptions:["5","10","20"],pageable:false,pagerPosition:"bottom",pagerMode:"default",pageSizeMode:"default",pagerButtonsCount:5,pagerRenderer:null,ready:null,rendertoolbar:null,rowDetails:false,renderStatusBar:null,rendered:null,rendering:null,rtl:false,sortable:false,showtoolbar:false,showstatusbar:false,statusBarHeight:34,serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:b.jqx.utilities.scrollBarSize,touchScrollBarSize:b.jqx.utilities.touchScrollBarSize,showAggregates:false,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,beginEdit:null,endEdit:null,autokoupdates:true,columnsVirtualization:false,exportSettings:{columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,recordsInView:true,fileName:"jqxDataTable"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},toolbarHeight:34,tableZIndex:369,_updating:false,touchmode:"auto",width:null,that:this,incrementalSearch:true,events:["bindingComplete","sort","filter","pageChanged","pageSizeChanged","rowClick","rowDoubleClick","cellValueChanged","rowBeginEdit","rowEndEdit","rowSelect","rowUnselect","rowCheck","rowUncheck","columnResized","columnReordered","rowExpand","rowCollapse","cellBeginEdit","cellEndEdit"]};if(this===b.jqx._jqxDataTable.prototype){return c}b.extend(true,this,c);this.that=this;return c},createInstance:function(e){var l=this;if(b.jqx.utilities.scrollBarSize!=13){l.scrollBarSize=b.jqx.utilities.scrollBarSize}if((l.element.nodeName.toLowerCase()=="table")||b(l.element).children("table").length>0){var n=l.host.find("tbody tr");var d=l.host.find("th");var w=new Array();if(d.length===0){d=n[0];n.splice(0,1)}if(l.localizestrings){l.localizestrings();if(l.localization!=null){l.localizestrings(l.localization,false)}}var z=[];for(var u=0;u");var m=l.host.parent();var q=l.host.data();q.jqxDataTable.host=m;q.jqxDataTable.element=m[0];l.host.parent()[0].id=l.element.id;try{l.host.parent()[0].style=l.element.style}catch(r){}l.element=m[0];l.host=m;l.host.data(q);var o={dataFields:w,localdata:z,datatype:"array"};var y=new b.jqx.dataAdapter(o);l.source=y}if(l.source&&!l.source.dataBind){l.source=new b.jqx.dataAdapter(l.source)}var x=l.source._source.datafields;if(x&&x.length>0){l._camelCase=l.source._source.dataFields!==undefined;l.selectionMode=l.selectionMode.toLowerCase()}if(l.host.attr("tabindex")==null){l.host.attr("tabindex","0")}l.host.attr("role","grid");l.host.attr("align","left");l.host.addClass(l.toTP("jqx-grid"));l.host.addClass(l.toTP("jqx-reset"));l.host.addClass(l.toTP("jqx-rc-all"));l.host.addClass(l.toTP("jqx-widget"));l.host.addClass(l.toTP("jqx-widget-content"));if(l._testmodules()){return}l.render(true);b.jqx.utilities.resize(l.host,function(){var A=b(window).width();var i=b(window).height();var j=l.host.width();var B=l.host.height();if(l._lastHostWidth!=j||l._lastHostHeight!=B){l._updatesize(l._lastHostWidth!=j,l._lastHostHeight!=B)}l._lastWidth=A;l._lastHeight=i;l._lastHostWidth=j;l._lastHostHeight=B})},getvaluebytype:function(h,d){var f=h;if(h==null){return h}if(this.gridlocalization.decimalseparator==","){if(h.indexOf(this.gridlocalization.decimalseparator)>=0){h=h.replace(this.gridlocalization.decimalseparator,".")}}if(h.indexOf(this.gridlocalization.currencysymbol)>=0){h=h.replace(this.gridlocalization.currencysymbol,"")}if(h.indexOf(this.gridlocalization.percentagesymbol)>=0){h=h.replace(this.gridlocalization.percentagesymbol,"")}if(b.isArray(h)&&d.type!="array"){for(var e=0;e');var d=b('
    '+this.gridlocalization.loadtext+"
    ");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var c=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){c=true}}if(c){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var e=false;if(this.width==="auto"||this.width===null||this.autoWidth){e=true}if(e){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(d){var c=b("measure Text");c.addClass(this.toTP("jqx-widget"));b(document.body).append(c);if(d=="cell"){this._cellheight=c.height()}else{this._columnheight=c.height()}c.remove()},_testmodules:function(){var g="";var e=this;var c=function(){if(g.length!=""){g+=","}};if(!this.host.jqxScrollBar){c();g+=" jqxscrollbar.js"}if(!this.host.jqxButton){c();g+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){c();g+=" jqxdata.js"}if(g!=""||this.editable||this.filterable||this.pageable){var d=[];var f=function(h){switch(h){case"checkbox":if(!e.host.jqxCheckBox&&!d.checkbox){d.checkbox=true;c();g+=" jqxcheckbox.js"}break;case"dropdownlist":if(!e.host.jqxDropDownList&&!d.dropdownlist){c();d.dropdownlist=true;g+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!e.host.jqxListBox&&!d.listbox){c();d.listbox=true;g+=" jqxlistbox.js"}}break}};if((this.filterable&&this.filterMode!="simple")||(this.pagerMode=="advanced"&&this.pageable)){f("dropdownlist")}if(g!=""){throw new Error("jqxDataTable: Missing references to the following module(s): "+g);this.host.remove();return true}}return false},focus:function(){try{this.wrapper.focus();this.host.focus();var d=this;setTimeout(function(){d.wrapper.focus();d.host.focus()},25);this.focused=true}catch(c){}},hiddenParent:function(){return b.jqx.isHidden(this.host)},isBindingCompleted:function(){return !this._loading},_updatesize:function(i,h){if(this._loading){return}var f=this;var g=f.host.width();var e=f.host.height();if(!f._oldWidth){f._oldWidth=g}if(!f._oldHeight){f._oldHeight=e}if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer);f._resizeTimer=null}var d=300;var c=function(){if(f._resizeTimer){clearTimeout(f._resizeTimer)}f.resizingGrid=true;if(b.jqx.isHidden(f.host)){return}f._updatecolumnwidths();f.refresh();f._oldWidth=g;f._oldHeight=e;f.resizingGrid=false};c();f._resizeTimer=setTimeout(function(){var k=f.host.width();var j=f.host.height();if(f._oldWidth!=k||f._oldHeight!=j){c()}},d)},resize:function(d,c){if(d!=undefined){this.width=d}if(c!=undefined){this.height=c}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c=b.jqx.mobile.isTouchDevice();this.touchDevice=c;if(this.touchmode==true){c=true;b.jqx.mobile.setMobileSimulator(this.table[0]);this.touchDevice=c}else{if(this.touchmode==false){c=false}}if(c){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return c},toTP:function(c){return this.toThemeProperty(c)},localizestrings:function(c,f){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(c!=null){for(var h in c){if(h.toLowerCase()!==h){c[h.toLowerCase()]=c[h]}}var j=["pagergotopagestring","pagershowrowsstring","pagerrangestring","pagernextbuttonstring","pagerpreviousbuttonstring","pagerfirstbuttonstring","pagerlastbuttonstring","toppagerstring","firstDay","days","months","AM","PM","patterns","percentsymbol","currencysymbol","currencysymbolposition","decimalseparator","thousandsseparator","filterapplystring","filteraddnew","filtercancelstring","filterclearstring","filterstring","filterstringcomparisonoperators","filternumericcomparisonoperators","filterdatecomparisonoperators","filterbooleancomparisonoperators","emptydatastring","filterselectstring","todaystring","clearstring","validationstring","loadtext","filtersearchstring","loadingErrorMessage"];var g=this;for(var e=0;eg&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}else{this.vScrollBar[0].style.visibility="hidden"}if((h!=this.vScrollBar[0].style.visibility)){this._updatecolumnwidths();var i=this.table.height();if(j!=i){j=i;if(!q&&j>g&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}}}if(this.scrollBarSize==0){n=0}var o=this.table?this.table.width():0;if(o>3){o-=3}var c=parseInt(this.host.css("border-left-width"))+parseInt(this.host.css("border-right-width"));var r=c+this.host.width()-n;if(o>r&&!p){this.hScrollBar[0].style.visibility=e;this.hScrollBar.jqxScrollBar({max:o-r});n=4+parseInt(d);if(d==0){n=0}if(!q){if(j>g-n+4&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.hScrollBar.jqxScrollBar({max:c+o-r});var f=this.vScrollBar[0].style.visibility==="hidden";this.vScrollBar[0].style.visibility=e;this._updatecolumnwidths();if(f){this.hScrollBar.jqxScrollBar({max:o-r+n+c})}var k=this.table?this.table.width():0;if(k>3){k-=3}if(k!=o){if(k"+e+"");d.addClass(this.toTP("jqx-widget"));d.addClass(this.toTP("jqx-grid"));d.addClass(this.toTP("jqx-grid-column-header"));d.addClass(this.toTP("jqx-widget-header"));b(document.body).append(d);var c=d.outerWidth()+20;d.remove();return c},_arrangeAutoHeight:function(e){if(!e){e=0}if(this.height==="auto"||this.height===null||this.autoheight){var h=this.table.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:-1}else{g+=this.showHeader?this.columnsheader.height():-1}g+=this.showstatusbar?this.statusBarHeight:0;g+=this.showAggregates?this.aggregatesHeight:0;g+=this.showtoolbar?this.toolbarHeight:0;g+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){g+=this.pageable?this.pagerHeight:0}g+=h;if(this.filterable){var f=this.filter.find(".filterrow");var c=this.filter.find(".filterrow-hidden");var d=1;if(c.length>0){d=0}g+=this.filterHeight-1+this.filterHeight*f.length*d}if(g+e>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(g+e)}return true}return false},_arrangeAutoWidth:function(e){if(!e){e=0}if(this.width==="auto"||this.width===null||this.autowidth){var d=0;for(var f=0;fthis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(g+e)}return true}return false},_measureTopAndHeight:function(){var d=this.host.height();var h=0;if(this.showtoolbar){h+=this.toolbarHeight;d-=parseInt(this.toolbarHeight)}if(this.filterable){var g=this.filter.find(".filterrow");var e=this.filter.find(".filterrow-hidden");var f=1;if(e.length>0){f=0}h+=this.filterHeight;d-=parseInt(this.filterHeight);var c=f==1?g.length:0;h+=this.filterHeight*c;d-=this.filterHeight*c}if(this.pageable&&this.pagerPosition!="bottom"){h+=parseInt(this.pagerHeight)+1;if(d>this.pagerHeight&&this.pagerPosition==="both"){d-=parseInt(this.pagerHeight)}}return{top:h,height:d}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var v=this.host.width();var r=this.host.height();var j=r;var i=this;if(this.pageable){if(this.pagerPosition==="bottom"){this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="both"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="top"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="hidden"}}}}else{this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="hidden"}var q=0;if(this.showtoolbar){this.toolbar.width(v);this.toolbar.height(this.toolbarHeight-1);this.toolbar.css("top",0);q+=this.toolbarHeight;r-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.filterable){this.filter.width(v);this.filter.css("top",q);var t=this.filter.find(".filterrow");var h=this.filter.find(".filterrow-hidden");var A=1;if(h.length>0){A=0}this.filter.height(this.filterHeight-1+this.filterHeight*t.length*A);q+=this.filterHeight;r-=parseInt(this.filterHeight);var x=A==1?t.length:0;q+=this.filterHeight*x;r-=this.filterHeight*x}if(this.showstatusbar){this.statusbar.width(!this.table?v:Math.max(v,this.table.width()));this.statusbar.height(this.statusBarHeight-1)}else{this.statusbar[0].style.height="0px"}if(this.showAggregates){this.aggregates.height(this.aggregatesHeight-1)}else{this.aggregates[0].style.height="0px"}if(this.pageable&&this.pagerPosition!="bottom"){this.toppager[0].style.width=v+"px";this.toppager[0].style.height=parseInt(this.pagerHeight)+"px";this.toppager[0].style.top=parseInt(q)+"px";q+=parseInt(this.pagerHeight)+1;if(r>this.pagerHeight){r-=parseInt(this.pagerHeight)}}else{if(this.toppager[0].style.width!=v+"px"){this.toppager[0].style.width=parseInt(v)+"px"}if(this.toppager[0].style.height!=this.pagerHeight+"px"){this.toppager[0].style.height=parseInt(this.pagerHeight)+"px"}if(this.toppager[0].style.top!=q+"px"){this.toppager[0].style.top=q+"px"}var y=this.pagerPosition!="bottom"?this.pagerHeight:0;var d=q+y+"px";if(this.content[0].style.top!=d){this.content[0].style.top=q+this.pagerHeight+"px"}}this._updateScrollbars(j);var c=parseInt(this.scrollBarSize);var n=4;var e=2;var f=0;if(this.vScrollBar[0].style.visibility!="hidden"){f=c+n}if(this.hScrollBar[0].style.visibility!="hidden"){e=c+n+2}if(c==0){f=0;e=0}if(this.showAggregates){if(this.hScrollBar[0].style.visibility==="hidden"){this.aggregates.width(!this.table?v:Math.max(v,this.table.width())+4)}else{this.aggregates.width("auto")}}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var w=this._arrangeAutoHeight(e-2);var s=this._arrangeAutoWidth(f+1);if(w||s){var v=this.host.width();this.toppager[0].style.width=parseInt(v)+"px";this.toolbar[0].style.width=parseInt(v)+"px";this.statusbar[0].style.width=parseInt(v)+"px";this.filter[0].style.width=parseInt(v)+"px"}if(w){var B=this._measureTopAndHeight();q=B.top;r=B.height}}var m=0;if(this.pageable){m=this.pagerHeight;if(this.pagerPosition!="top"){e+=this.pagerHeight}}if(this.showAggregates){e+=this.aggregatesHeight;m+=this.aggregatesHeight}if(this.showstatusbar){e+=this.statusBarHeight;m+=this.statusBarHeight}if(this.hScrollBar[0].style.height!=c+"px"){this.hScrollBar[0].style.height=parseInt(c)+"px"}if(this.hScrollBar[0].style.top!=q+r-n-c-m+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=q+r-n-c-m-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var g=false;var z=false;if(f==0){if(l!=(v-2)+"px"){this.hScrollBar[0].style.width=(v-2)+"px";g=true}}else{if(l!=(v-c-n)+"px"){this.hScrollBar[0].style.width=(v-c-n+"px");g=true}}if(this.vScrollBar[0].style.width!=c+"px"){this.vScrollBar[0].style.width=c+"px";z=true}if(this.vScrollBar[0].style.height!=parseInt(r)-e+"px"){this.vScrollBar[0].style.height=(parseInt(r)-e+"px");z=true}if(this.vScrollBar[0].style.left!=parseInt(v)-parseInt(c)-n+"px"||this.vScrollBar[0].style.top!=q+"px"){this.vScrollBar[0].style.top=q+"px";this.vScrollBar[0].style.left=parseInt(v)-parseInt(c)-n+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:q});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:c+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var u=this.hScrollInstance;u.disabled=this.disabled;if(g){u.refresh()}if(z){k.refresh()}var o=function(C){if((C.vScrollBar[0].style.visibility!="hidden")&&(C.hScrollBar[0].style.visibility!="hidden")){C.bottomRight[0].style.visibility="inherit";C.bottomRight[0].style.left=1+parseInt(C.vScrollBar.css("left"))+"px";C.bottomRight[0].style.top=parseInt(C.hScrollBar.css("top"))+"px";if(C.rtl){C.bottomRight.css("left","0px")}C.bottomRight[0].style.width=parseInt(c)+3+"px";C.bottomRight[0].style.height=parseInt(c)+4+"px";if(C.showAggregates){C.bottomRight.css("z-index",99);C.bottomRight.height(parseInt(c)+4+C.aggregatesHeight);C.bottomRight.css({top:parseInt(C.hScrollBar.css("top"))-C.aggregatesHeight})}}else{C.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=v-f+"px"){this.content[0].style.width=v-f+"px"}if(this.content[0].style.height!=r-e+3+"px"){this.content[0].style.height=r-e+3+"px"}if(this.content[0].style.top!=q+"px"){this.content[0].style.top=parseInt(q)+"px"}if(this.rtl){this.content.css("left",f);if(this.filter&&(this.filter.children().length>0)){b(this.filter.children()).css("left",f)}if(this.table){var p=this.table.width();if(p0)){b(this.filter.children()).css("left",v-p+2)}}}}if(this.showAggregates){this.aggregates.css("top",q+r-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0));if(this.rtl){this.aggregates.css("left","0px")}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({top:q+r-n-c-m+this.aggregatesHeight+"px"});this.aggregates.css("top",1+q+r-c-5-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0))}o(this)}if(this.showstatusbar){this.statusbar.css("top",q+r-this.statusBarHeight-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.statusbar.css("left",this.content.css("left"))}else{this.statusbar.css("left","0px")}}}if(this.pageable){this.pager[0].style.width=v+"px";this.pager[0].style.height=this.pagerHeight+"px";this.pager[0].style.top=parseInt(q)+parseInt(r)-parseInt(this.pagerHeight)-1+"px"}else{this.pager[0].style.height="0px"}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(v!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(r!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostwidth=v},scrollOffset:function(e,d){if(arguments.length==0||(e!=null&&typeof(e)=="object"&&!e.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(e!=null&&typeof(e)=="object"){var d=e.left;var c=e.top;var e=c}if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(c){if(c==null||c==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",c)}},scrolltop:function(c){if(c==null||c==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",c)}},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(c){this._updating=false;if(c===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(h,j,c){if(this.loadingstate===true){return}var d=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){b(this.dataloadelement).css("visibility","visible");b(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none")}}var g=this;if(h==null){h={}}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataView();this.dataview.pageable=this.pageable;this.dataview.grid=this;if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pageSize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pageSize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}}this._loading=true;this.dataview.update=function(y){g._loading=false;g.rowsByKey=new Array();var C=g.source._source.datafields;if(g.groups&&g.groups.length>0){var s=Object.prototype.toString;var m=g.groups[0];Object.prototype.toString=(typeof m=="function")?m:function(){return this[m]};if(!g.source.records.sort){var u=new Array();var q=0;var E=0;var D={};b.each(D,function(){u[E+q++]=this});D=u}g.source.records.sort(function(G,F){if(G===undefined){G=null}if(F===undefined){F=null}if(G===null&&F===null){return 0}if(G===null&&F!==null){return -1}if(G!==null&&F===null){return 1}var J=0;var I=0;if(G&&G.uid){J=G.uid}if(F&&F.uid){I=F.uid}G=G.toString();F=F.toString();if(b.jqx.dataFormat.isNumber(G)&&b.jqx.dataFormat.isNumber(F)){if(GF){return 1}return 0}else{if(b.jqx.dataFormat.isDate(G)&&b.jqx.dataFormat.isDate(F)){if(GF){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(G)&&!b.jqx.dataFormat.isNumber(F)){G=String(G).toLowerCase();F=String(F).toLowerCase()}}}try{if(GF){return 1}}catch(H){var K=H}if(typeof(J)=="number"){if(JI){return 1}}return 0});Object.prototype.toString=s}for(var A=0;A0){var t=function(F){for(var G=0;G0){t(F[G].records)}}};t(p.records)}if(A===0){var n=false;if(C){for(var z=0;z-1||l.toString().indexOf(g.gridlocalization.percentsymbol)>-1){var v=l.toString().split(" ").length;var k=new Number(g._toNumber(l.toString()));if(!isNaN(k)&&v==1){C[z].type="number"}}if(b.jqx.dataFormat.isNumber(l)||(!isNaN(parseFloat(l))&&isFinite(l))){C[z].type="number"}if(b.jqx.dataFormat.isDate(l)){C[z].type="date"}}}}if(n){for(var z=0;zg-c){this.hScrollBar.jqxScrollBar("setPosition",g-c)}else{if(g>e){this.hScrollBar.jqxScrollBar("setPosition",h+g-e)}}}},ensurerowvisiblebykey:function(o){if(this.vScrollBar[0].style.visibility==="hidden"){return false}var p=this._getuirow(o);if(!p){return}var m=this.vScrollBar.jqxScrollBar("value");var e=this.host.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:0}else{g+=this.showHeader?this.columnsheader.height():0}if(this.filterable){g+=this.filter.height()}if(this.pageable){if(this.pagerPosition==="top"){g+=this.pagerHeight}}if(this.showtoolbar){g+=this.toolbarHeight}e-=g;if(this.pageable&&this.pagerPosition!=="top"){e-=this.pagerHeight}if(this.showstatusbar){e-=this.statusBarHeight}if(this.showAggregates){e-=this.aggregatesHeight}if(this.hScrollBar.css("visibility")!="hidden"){e-=20}var n=this.host.coord().top+g;var f=m;var c=e+f;var i=p.coord().top+m-n;i=Math.round(i);var l=i+p.outerHeight();l=Math.round(l);if(Math.round(p.position().top)===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var j=b(this._table.children()[1]).children().length-1;var d=this._getuikey(j);var k=this._getuirow(d);if(k){if(k[0]===p[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}}if(ic){return this.vScrollBar.jqxScrollBar("setPosition",4+l-e)}},ensureRowVisible:function(c){var d=this._getkey(c);this.ensurerowvisiblebykey(d)},getColumn:function(c){var d=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==c||this.displayfield==c){d=this;return false}})}return d},_setcolumnproperty:function(e,g,h){if(e==null||g==null||h==null){return null}var d=g;g=g.toLowerCase();var f=this.getColumn(e);if(f==null){return}var i=f[g];f[g]=h;f[d]=h;var c=this.getColumn(e);if(c!=null){c[g]=h}switch(g){case"filteritems":case"text":case"editable":case"resizable":case"draggable":case"hidden":case"hideable":case"renderer":case"cellsrenderer":case"align":case"aggregates":case"cellsalign":case"cellsformat":case"pinned":case"contenttype":case"filterable":case"groupable":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(g=="align"){this._rendercolumnheaders();this.refresh()}else{if(g=="text"||g=="class"||g=="hidden"||g=="pinned"||g=="resizable"||g=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(g=="width"||g=="maxwidth"||g=="minwidth"){f._width=null;f._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(c,e){if(c==null||e==null){return null}e=e.toLowerCase();var d=this.getColumn(c);return d[e]},setColumnProperty:function(c,d,e){this._setcolumnproperty(c,d,e)},hideColumn:function(c){this._setcolumnproperty(c,"hidden",true)},showColumn:function(c){this._setcolumnproperty(c,"hidden",false)},updateBoundData:function(d,c){this.databind(this.source,d,c)},refresh:function(c){if(c!=true){if(b.jqx.isHidden(this.host)){return}this.vScrollInstance.setPosition(0);this._renderrows();this.updatepagerdetails();this._arrange();if(this._arrangeFilterRow){this._arrangeFilterRow()}this._renderhorizontalscroll();this._showicons();if(this.showAggregates){this._updateaggregates()}this._updateTouchScrolling()}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var d="www.jqwidgets.com";if(location.hostname.indexOf(d.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var e=String.fromCharCode(83,80,65,78);var c=String.fromCharCode(72,84,84,80,58,47,47);var f=document.createElement(e);f.id=b.jqx.utilities.createId();f.innerHTML=d;f.style.position="absolute";f.style.right="5px";f.style.bottom="5px";f.style.color="#909090";f.style.cursor="pointer";f.style.zIndex="999999";f.style.display="none";f.style.fontSize="9px";f.onmousedown=function(){open(c+d)};this.content[0].appendChild(f);this._gridRenderElement=f}}},_updateTouchScrolling:function(){var d=this.that;if(d.isTouchDevice()){var f=b.jqx.mobile.getTouchEventName("touchstart");var e=b.jqx.mobile.getTouchEventName("touchend");var c=b.jqx.mobile.getTouchEventName("touchmove");if(d.table){d.removeHandler(d.table,f+".touchScroll");d.removeHandler(d.table,c+".touchScroll");d.removeHandler(d.table,e+".touchScroll");d.removeHandler(d.table,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(d.table[0],Math.max(d.vScrollInstance.max,d.hScrollInstance.max),function(i,h){if(h!=null&&d.vScrollBar.css("visibility")!="hidden"){var g=d.vScrollInstance.value;d.vScrollInstance.setPosition(h)}if(i!=null&&d.hScrollBar.css("visibility")!="hidden"){var g=d.hScrollInstance.value;d.hScrollInstance.setPosition(i)}d.scrolled=new Date();d.vScrollInstance.thumbCapture=true},this.element.id,this.hScrollBar,this.vScrollBar)}}},_showicons:function(){if(!this.table){return}for(var e=0;e0){c.css("margin-right",4+h+"px")}else{c.css("margin-right","4px")}}else{if(h>0){c.css("margin-left",4+h+"px")}else{c.css("margin-left","4px")}}}}},render:function(j){var f="
    ";this.element.innerText="";this.element.innerHTML=f;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var h=this.host.find("#verticalScrollBar"+this.element.id);var l=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=h.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=l.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=b.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=b.data(this.hScrollBar[0],"jqxScrollBar").instance;this.filter=this.host.find("#filter");this.filter[0].id="filter"+this.element.id;this.filter.addClass(this.toTP("jqx-widget-header"));this.filter.addClass(this.toTP("jqx-grid-toolbar"));this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-grid-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.aggregates=this.host.find("#aggregates");this.aggregates[0].id="aggregates"+this.element.id;this.aggregates.addClass(this.toTP("jqx-grid-statusbar"));this.aggregates.addClass(this.toTP("jqx-widget-header"));this.statusbar=this.host.find("#statusbar");this.statusbar[0].id="statusbar"+this.element.id;this.statusbar.addClass(this.toTP("jqx-grid-statusbar"));this.statusbar.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.toppager=this.host.find("#toppager");this.toppager.addClass(this.toTP("jqx-grid-pager-top"));this.toppager.addClass(this.toTP("jqx-widget-header"));this.gridtable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var c=this.source.datafields;if(c==null&&this.source._source){c=this.source._source.datafields}if(c){for(var d=0;d2){for(var k=0;k
    ');e.columnsheader.remove();e.columnsheader.addClass(e.toTP("jqx-widget-header"));e.columnsheader.addClass(e.toTP("jqx-grid-header"));if(!e.showHeader){e.columnsheader.css("display","none")}else{if(e.columnsheader){e.columnsheader.css("display","block")}}e.gridcontent=e.gridcontent||b('
    ');e.gridcontent.remove();var d=e.columnsHeight;d=e._preparecolumnGroups();e.columnsheader.height(d);e.content.append(e.columnsheader);e.content.append(e.gridcontent);e._rendercolumnheaders();e.tableheight=null;e.gridcontent.find("#contenttable"+e.element.id).remove();if(e.table!=null){e.table.remove();e.table=null}e.table=b('
    ');e.gridcontent.addClass(e.toTP("jqx-grid-content"));e.gridcontent.addClass(e.toTP("jqx-widget-content"));e.gridcontent.append(e.table);e._renderrows();if(e.filterable){e._renderfilter()}if(e.pageable){e._initpager()}e._arrange();if(e.renderStatusBar){e.renderStatusBar(e.statusbar)}if(e.rendertoolbar){e.rendertoolbar(e.toolbar)}if(e.showAggregates){e._updateaggregates()}if(e.disabled){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}e._renderhorizontalscroll();e._showicons();e._addHandlers()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},_initpager:function(){var g=this;var c=this.gridlocalization.pagergotopagestring;var i=this.gridlocalization.pagerrangestring;var d=this.gridlocalization.pagershowrowsstring;var h=(this.pagerHeight-28)/2;this.pagerdiv=this.pagerdiv||b('
    ');this.toppagerdiv=this.toppagerdiv||b('
    ');if(!this.pageable){this.pagerdiv.remove();this.toppagerdiv.remove();return}if(!this.pagerRenderer){this.pagerdiv.css("top",h);this.toppagerdiv.css("top",h);var f=function(s,E){var n=this;var r=b('
    ');var D=b('
    ');var t=b('
    ');var j=b('
    ');var m=b('
    ');var q=b('
    ');var z=b('
    ');var x=b('
    ');var p=b('
    ');r.attr("disabled",n.disabled);var A=b('
    ');A[0].id="gridpagerlist"+E+n.element.id;n.removeHandler(t,"mousedown");n.removeHandler(t,"mouseup");n.removeHandler(t,"click");n.removeHandler(j,"mousedown");n.removeHandler(j,"mouseup");n.removeHandler(j,"click");n.removeHandler(m,"mousedown");n.removeHandler(m,"mouseup");n.removeHandler(m,"click");n.removeHandler(q,"mousedown");n.removeHandler(q,"mouseup");n.removeHandler(q,"click");if(!n.rtl){j.attr("title",n.gridlocalization.pagerpreviousbuttonstring);t.attr("title",n.gridlocalization.pagernextbuttonstring)}else{t.attr("title",n.gridlocalization.pagerpreviousbuttonstring);j.attr("title",n.gridlocalization.pagernextbuttonstring)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){p.css("padding-top","3px")}this["pagerfirst"+E]=m;this["pagerlast"+E]=q;this["pagernext"+E]=t;this["pagerprevious"+E]=j;this["pagergotoinput"+E]=r;this["pagerdetails"+E]=z;this["pagershowrows"+E]=x;this["pagergotolabel"+E]=D;this["pagershowrowscombo"+E]=A;this["pagerbuttons"+E]=p;if(n.pagerMode=="default"){if(!n.rtl){m.attr("title",n.gridlocalization.pagerfirstbuttonstring);q.attr("title",n.gridlocalization.pagerlastbuttonstring)}else{q.attr("title",n.gridlocalization.pagerfirstbuttonstring);m.attr("title",n.gridlocalization.pagerlastbuttonstring)}var v=b("
    ");v.addClass(n.toThemeProperty("jqx-icon-arrow-first"));m.wrapInner(v);var o=b("
    ");o.addClass(n.toThemeProperty("jqx-icon-arrow-last"));q.wrapInner(o);if(!n.rtl){s.append(m);s.append(j);s.append(p);s.append(t);s.append(q)}else{s.append(q);s.append(t);s.append(p);s.append(j);s.append(m)}q.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});m.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var C=!n.rtl?"left":"right";p.css("float",C);q.css("float",C);m.css("float",C);t.css("float",C);j.css("float",C);z.css("float",n.rtl?"left":"right");if(n.rtl){z.css("margin-left","7px");z.css("margin-right","0px")}else{z.css("margin-left","0px");z.css("margin-right","7px")}}else{if(!n.rtl){s.append(t);s.append(j)}}t.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});j.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var k=b("
    ");k.addClass(n.toThemeProperty("jqx-icon-arrow-left"));j.wrapInner(k);var l=b("
    ");l.addClass(n.toThemeProperty("jqx-icon-arrow-right"));t.wrapInner(l);if(!n.rtl){s.append(z)}if(n.pagerMode!="default"){if(!n.rtl){s.append(A);s.append(x);s.append(r);s.append(D)}else{s.append(D);s.append(r);s.append(x);s.append(A);s.append(z);s.append(t);s.append(j)}var u=n.pageSizeOptions;A.jqxDropDownList({_checkForHiddenParent:false,rtl:n.rtl,disabled:n.disabled,source:u,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:28,theme:n.theme});var B=0;for(var y=0;y=u[y]){B=y}}D[0].innerHTML=c;A.jqxDropDownList({selectedIndex:B});var w=r.find("input");w.addClass(n.toThemeProperty("jqx-input"));w.addClass(n.toThemeProperty("jqx-widget-content"));if(this.rtl){w.css("direction","rtl")}var n=this;this.removeHandler(A,"select");this.addHandler(A,"select",function(K){if(K.args){if(n.vScrollInstance){n.vScrollInstance.setPosition(0)}var I=K.args.index;n.pagershowrowscombotop.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.renderSelection("mouse");n.pagershowrowscombotop.data().jqxDropDownList.instance.renderSelection("mouse");var L=n.dataview.pagenum*n.dataview.pagesize;var H=u[I];var J=n.pageSize;n.pageSize=parseInt(H);if(isNaN(n.pageSize)){n.pageSize=10}if(H>=100){n.pagershowrowscombotop.jqxDropDownList({width:55});n.pagershowrowscombobottom.jqxDropDownList({width:55})}else{n.pagershowrowscombotop.jqxDropDownList({width:44});n.pagershowrowscombobottom.jqxDropDownList({width:44})}n.dataview.pagesize=n.pageSize;var G=Math.floor(L/n.dataview.pagesize);if(G!==n.dataview.pagenum||parseInt(H)!==parseInt(J)){n._raiseEvent("pageSizeChanged",{pagenum:G,oldpageSize:J,pageSize:n.dataview.pagesize});var F=n.goToPage(G);if(!F){if(!n.serverProcessing){n.refresh()}else{n.updateBoundData("pager")}}}}});var r=r.find("input");r.addClass(n.toThemeProperty("jqx-grid-pager-input"));r.addClass(n.toThemeProperty("jqx-rc-all"));this.removeHandler(r,"keydown");this.removeHandler(r,"change");n.addHandler(r,"keydown",function(F){if(F.keyCode>=65&&F.keyCode<=90){return false}if(F.keyCode=="13"){var G=r.val();G=parseInt(G);if(!isNaN(G)){n.goToPage(G-1)}return false}});n.addHandler(r,"change",function(){var F=r.val();F=parseInt(F);if(!isNaN(F)){n.goToPage(F-1)}})}x[0].innerHTML=d;n.addHandler(t,"mouseenter",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseenter",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mouseleave",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseleave",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mousedown",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(t,"mouseup",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(j,"mousedown",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});n.addHandler(j,"mouseup",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});if(n.pagerMode==="default"){n.addHandler(q,"mouseenter",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseenter",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mouseleave",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseleave",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mousedown",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mousedown",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))});n.addHandler(q,"mouseup",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mouseup",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))})}n.addHandler(b(document),"mouseup.pagerbuttons"+E+this.element.id,function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"));k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"));if(o){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"));v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))}});n.addHandler(t,"click",function(){if(!t.jqxButton("disabled")){if(!n.rtl){n.goToNextPage()}else{n.goToPrevPage()}}});n.addHandler(j,"click",function(){if(!j.jqxButton("disabled")){if(!n.rtl){n.goToPrevPage()}else{n.goToNextPage()}}});if(this.pagerMode==="default"){n.addHandler(m,"click",function(){if(!m.jqxButton("disabled")){if(!n.rtl){n.goToPage(0)}else{var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}}});n.addHandler(q,"click",function(){if(!q.jqxButton("disabled")){if(!n.rtl){var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}else{n.goToPage(0)}}})}};this.pagerdiv.children().remove();this.toppagerdiv.children().remove();f.call(this,this.pagerdiv,"bottom");f.call(this,this.toppagerdiv,"top");this.pager.append(this.pagerdiv);this.toppager.append(this.toppagerdiv);this.updatepagerdetails()}else{this.pagerdiv.children().remove();this.toppager.children().remove();var e=this.pagerRenderer();if(e!=null){this.pagerdiv.append(b(e))}this.pager.append(this.pagerdiv);var e=this.pagerRenderer();if(e!=null){this.toppagerdiv.append(b(e))}this.toppager.append(this.toppagerdiv)}},_updatepagertheme:function(){},goToPage:function(f,h){if(this._loading){return false}if(this.editKey!=undefined){if(this.editSettings.saveOnPageChange){var e=this.endroweditbykey(this.editKey);if(!e){return false}}else{return false}}if(f==null||f==undefined){f=0}if(f==-1){f=0}if(f<0){return false}var d=this.dataview.totalrecords;var g=this.dataview.pagenum;var c=Math.ceil(d/this.pageSize);if(f>=c){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(f>0){f=c-1}}if(this.dataview.pagenum!=f){if(this.pageable){this.dataview.pagenum=f;this._raiseEvent("pageChanged",{pagenum:f,oldpagenum:g,pageSize:this.dataview.pagesize})}if(!this.serverProcessing){this.refresh();if(h){if(b.isFunction(h)){h()}}}else{this.updateBoundData("pager",h)}return true}return false},goToPrevPage:function(e){if(this.dataview.pagenum>0){return this.goToPage(this.dataview.pagenum-1,e)}else{if(this.pagerMode!="default"&&this.pagerMode!="advanced"){var d=this.dataview.totalrecords;var c=Math.ceil(d/this.pageSize);return this.goToPage(c-1,e)}}return false},goToNextPage:function(e){var d=this.dataview.totalrecords;if(this.summaryrows){d+=this.summaryrows.length}var c=Math.ceil(d/this.pageSize);if(this.dataview.pagenum=this.dataview.totalrecords){u=this.dataview.totalrecords}var v=this.dataview.totalrecords;d++;var t=Math.ceil(v/this.dataview.pagesize);if(t>=1){t--}t++;if(this.pageSizeMode=="root"){t=Math.ceil(this.rootRecordsLength/this.dataview.pagesize);if(t>=1){t--}t++;v=this.rootRecordsLength;this.dataview.totalrecords=this.rootRecordsLength}if(this.pagerMode!="default"){if(this["pagergotoinputbottom"]){var k=this["pagergotoinputbottom"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t);k=this["pagergotoinputtop"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t)}}else{var o="";var n=this.pagerButtonsCount;if(n==0||!n){n=5}var s=0;if(this.rtl){s=n-1}while((this.rtl&&s>=0)||(!this.rtl&&st&&!this.rtl){break}else{if(this.rtl&&e>t){s--;continue}}if(!this.rtl){if(s==0&&e>n){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){o+=""+e+"";if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}}else{if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}o+=""+e+""}if(this.rtl){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(s==0&&e>n){o+="..."}}if(!this.rtl){s++}else{s--}}if(!this["pagerbuttonsbottom"]){return}var h=this["pagerbuttonsbottom"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");var h=this["pagerbuttonstop"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");this["pagerbuttonsbottom"][0].innerHTML=o;this["pagerbuttonstop"][0].innerHTML=o;if(this.disabled){this.host.find(".jqx-grid-pager-number").css("cursor","default")}var q=function(){h.click(function(i){if(j.disabled){return}var w=b(i.target).attr("data-page");j.goToPage(parseInt(w)-1)});h.mouseenter(function(i){if(j.disabled){return}b(i.target).addClass(j.toTP("jqx-fill-state-hover"))});h.mouseleave(function(i){if(j.disabled){return}b(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};if(this.pagerPosition==="both"||this.pagerPosition==="bottom"){var h=this["pagerbuttonsbottom"].find("a");q(h)}if(this.pagerPosition==="both"||this.pagerPosition==="top"){var h=this["pagerbuttonstop"].find("a");q(h)}}if(u==0&&uu){this.goToPrevPage()}},_preparecolumnGroups:function(){var o=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var m=this;for(var g=0;gi){return 1}return 0});for(var k=1;k0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){return true}}if(undefined==f.editKey){return false}});this.addHandler(b(window),"jqxReady."+this.element.id,function(){f._updatecolumnwidths();f.refresh()});if(this.editable){this.addHandler(b(document),"mousedown.gridedit"+this.element.id,function(k){if(f.editable&&f.editSettings.saveOnBlur){if(f.editKey!=null){if(!f.vScrollInstance.isScrolling()&&!f.vScrollInstance.isScrolling()){var s=f.host.coord();var p=f.host.width();var l=f.host.height();var u=false;var j=false;var t=false;if(k.pageYs.top+l){u=true;j=true}if(k.pageXs.left+p){u=true;t=true}if(u){var m=function(y){var x=b(y.children()[0]).data();if(x&&!x.jqxWidget){x=y.data()}if(!x){x=y.data()}if(x.jqxWidget&&x.jqxWidget.container&&x.jqxWidget.container[0].style.display=="block"){var i=x.jqxWidget;var z=i.container.coord().top;var w=i.container.coord().top+i.container.height();if(j&&(k.pageYw)){u=true;i.close();return true}else{return false}}};var r=f._editors;if(r){for(var n=0;n0){var k=f._pinnedTable[0].rows[f.hoveredRow[0].rowIndex].cells;i(k)}}f.hoveredRow=null};this.addHandler(this.table,"mouseleave",function(i){c();if(f.wrapper){f.wrapper.parent().removeAttr("tabindex",0);f.wrapper.removeAttr("tabindex",1);f.content.removeAttr("tabindex",2)}});var g=function(o){if(!f.enableHover){return true}f.hoveredRow=o;if(!o){return true}var l=o[0].cells;var n=f.rowDetails&&!f.treeGrid;var q=n&&!f.treeGrid?1:0;var k=0;if(q>0&&f.rtl){q=0;k=1}for(var m=q;m=0){if(!l.expanded){f.showdetailsbykey(F)}else{f.hidedetailsbykey(F)}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("jqx-grid-group")>=0&&f.treeGrid){if(!l.expanded){f.treeGrid.expandRow(F)}else{f.treeGrid.collapseRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}if(B.preventDefault){B.preventDefault()}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("checkbox")>=0&&f.treeGrid){if(!l.checked){f.treeGrid.checkRow(F)}else{f.treeGrid.uncheckRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}}else{var m=b(q).index();var k=f.columns.records[m];if(B.stopPropagation){B.stopPropagation()}if(f.editable&&f.editKey==null){if(f._lastSelectedKey==F&&f.editSettings.editOnDoubleClick&&A){var u=f.beginroweditbykey(F,k);return true}}if(f.isTouchDevice()){if(f.scrolled&&new Date()-f.scrolled<500){if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return false}}if(f.selectionMode==="singlerow"&&f.selectionMode!=="custom"){f.selectrowbykey(F,"mouse",false);f._lastSelectedKey=F;f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}else{if(f.selectionMode!=="custom"){if(!B.ctrlKey&&!B.metaKey){f.clearSelection(false)}if(B.shiftKey){if(f._lastSelectedKey){var l=f.rowinfo[f._lastSelectedKey];f._doSelection(f._lastSelectedKey,true,false);var j=b(f._table.children()[1]).children(("[data-key="+f._lastSelectedKey+"]"));var n=j.index();var z=p.index();f._selectRange(z,n);f.selectrowbykey(F,"mouse",false);f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}}}f._lastSelectedKey=F;f.clickTime=new Date();if(f.selectionMode!=="custom"){if(l){if(l.selected){f.unselectrowbykey(F,"mouse",false)}else{f.selectrowbykey(F,"mouse",false)}v()}}else{return true}f._updateSelection();if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return true}}}}}})},_updateSelection:function(){var l=this;var r=b(l._table.children()[1]).children();var n=l._pinnedTable?b(l._pinnedTable.children()[1]).children():null;var e=l.rowDetails&&!l.treeGrid;var d=e?1:0;var f=0;if(d>0&&l.rtl){d=0;f=1}for(var h=0;he){var h=e;var d=c;while(hf){var d=d.prev();var g=d.attr("data-key");this._doSelection(g,true,false);h--}}}},_getuikey:function(d,g){var f=null;var e=b(this._table.children()[1]).children();f=b(e[d]).attr("data-key");if(b(e[d]).attr("data-role")){var c=b(e[d]);if(g=="next"){while(c){c=c.next();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}else{if(g=="prev"){while(c){c=c.prev();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}}return null}return f},getRows:function(){return this.source.records},getView:function(){var d=this;var e=this._names();var f=new Array();var c=function(k,h){if(!h){return}for(var j=0;j0){g.records=new Array();c(g.records,h[j].records)}}}}};c(f,this.dataViewRecords);return f},getKeys:function(){var d=new Array();var e=this.source.records;for(var c=0;c0){var h=0;for(var j=0;j0){continue}if(h===n+e){k=o.attr("data-key");return k}h++}return k}if(this.rowDetails){var h=0;for(var j=0;j0){return c}}catch(e){var d=b(this._table.children()[1]).children();for(var f=0;f0){return c}}catch(e){var d=b(this._pinnedTable.children()[1]).children();for(var f=0;f=33&&s<=40))){var z=-1;if(!this._searchString){this._searchString=""}if((s==8||s==46)&&this._searchString.length>=1){this._searchString=this._searchString.substr(0,this._searchString.length-1)}var e=String.fromCharCode(s);var H=(!isNaN(parseInt(e)));var J=false;if((s>=65&&s<=97)||H||s==8||s==32||s==46){if(!X.shiftKey){e=e.toLocaleLowerCase()}if(s!=8&&s!=32&&s!=46){if(!(this._searchString.length>0&&this._searchString.substr(0,1)==e)){this._searchString+=e}}if(s==32){this._searchString+=" "}this._searchTime=new Date();var n=this.getSelection();if(n.length>=1){var t=n[0].uid;var C=-1;for(var S=0;S0&&B[0]==t)){var B=this._getMatches(this._searchString)}}else{var B=this._getMatches(this._searchString)}if(B.length>0){var n=this.getSelection();if(n.length>=1){var c=B.indexOf(n[0].uid);if(c==-1){this.clearSelection(false);this.selectrowbykey(B[0])}else{var h=c+1;if(h>=B.length){h=0}this.clearSelection(false);this.selectrowbykey(B[h])}}else{this.clearSelection(false);this.selectrowbykey(B[0])}this._lastSearchString=this._searchString}}if(this._searchTimer!=undefined){clearTimeout(this._searchTimer)}if(s==27||s==13){this._searchString="";this._lastSearchString=""}this._searchTimer=setTimeout(function(){I._searchString="";I._lastSearchString=""},500);if(z>=0){return}if(J){return false}}}if(this.editKey!=undefined){if(s===27&&this.editSettings.cancelOnEsc){this.endroweditbykey(this.editKey,true)}else{if(s===13&&this.editSettings.saveOnEnter){if(X.target&&X.target.nodeName.toLowerCase()!="div"&&X.target.nodeName.toLowerCase()!="input"){return true}this.endroweditbykey(this.editKey,false)}else{if(this.editSettings.editSingleCell){if(this.editColumn){var P=this.columns.records.indexOf(this.editColumn);if(s==9&&P0){var M=this.editKey;var E=null;for(var S=P-1;S>=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){E=this.columns.records[S];break}}if(E){this.endroweditbykey(this.editKey,false);this.beginroweditbykey(M,E)}}}if(s==9){var o=this.rowinfo[this.editKey];var C=this.getrowindex(o);var v=this._getuirow(this.editKey);if(!X.shiftKey&&!y){var N=null;for(var S=0;S=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){N=this.columns.records[S];break}}if(N){while(v){v=v.prev();if(v){var D=v.attr("data-role");if(!D){var F=v.attr("data-key");break}}}if(F){this.clearSelection(false);this._lastSelectedKey=F;var o=this.rowsByKey[F];var C=this.getrowindex(o);var L=this.getrowdisplayindex(o);this._raiseEvent("rowSelect",{key:F,index:L,boundIndex:C,row:this.rowsByKey[F]});this.endroweditbykey(this.editKey,false);this._doSelection(F,true,true);this.beginroweditbykey(F,N)}}}}return false}}}}}return true}if(X.ctrlKey||X.metaKey){var f=String.fromCharCode(s).toLowerCase();if(f=="c"||f=="x"){var n=this.getSelection();if(n.length>=1){var w="";for(var K=0;K');O.val(w);b("body").append(O);O.select();setTimeout(function(){document.designMode="off";O.select();O.remove()},100)}}}}if(s===32&&this.treeGrid){if(this.treeGrid.checkboxes){var n=this.getSelection();if(n.length>1){for(var S=0;S0){if(this.dataview.filters.length>0){var m=this.rowinfo[t].row.records;for(var S=0;S0){while(this._getuirow(t)==null&&this.dataview.pagenum>0){this.goToPrevPage()}}}else{if(s==39){var v=this._getuirow(t);var U=null;if(v){var D=v.attr("data-role");if(!D){U=v.attr("data-key")}}if(this.pageable&&U==null){this.goToNextPage()}}}}return false}},_selection:function(c){if("selectionStart" in c[0]){var h=c[0];var i=h.selectionEnd-h.selectionStart;return{start:h.selectionStart,end:h.selectionEnd,length:i,text:h.value}}else{var f=document.selection.createRange();if(f==null){return{start:0,end:h.value.length,length:0}}var d=c[0].createTextRange();var g=d.duplicate();d.moveToBookmark(f.getBookmark());g.setEndPoint("EndToStart",d);var i=f.text.length;return{start:g.text.length,end:g.text.length+f.text.length,length:i,text:f.text}}},_doSelection:function(c,e,d){if(c==null){this.clearSelection();return}if(this.selectionMode==="singlerow"){this.clearSelection(false)}var f=this.rowinfo[c];if(f){f.selected=e;this.ensurerowvisiblebykey(c)}else{this.ensurerowvisiblebykey(c);var f=this.rowinfo[c];if(f){f.selected=e}else{this.rowinfo[c]={selected:e}}}if(this.selectionMode!="none"){if(d!==false){this._renderrows()}}},clearSelection:function(e){if(this.rowinfo){var f=this.getRows();for(var h in this.rowinfo){var g=this.rowinfo[h];if(g.selected){g.selected=false;var d=f.indexOf(g.row);var c=this.getrowdisplayindex(g.row);this._raiseEvent("rowUnselect",{key:h,index:c,boundIndex:d,row:g.row})}}}if(e!==false){this._renderrows()}},exportData:function(t){if(!b.jqx.dataAdapter.ArrayExporter){if(!this.treeGrid){throw"jqxDataTable: Missing reference to jqxdata.export.js!"}throw"jqxTreeGrid: Missing reference to jqxdata.export.js!"}var h=this.exportSettings.columnsHeader;if(h==undefined){h=true}var w=this.exportSettings.hiddenColumns;if(w==undefined){w=false}var P=this.exportSettings.serverURL;var I=this.exportSettings.characterSet;var ac=this.exportSettings.collapsedRecords;if(ac==undefined){ac=false}var F=this.exportSettings.fileName;if(F===undefined){F=this.treeGrid?"jqxTreeGrid_Data":"jqxDataTable_Data"}var s=this;var Y=this.getRows();if(this.exportSettings.recordsInView==true){Y=this.getView()}if(this.treeGrid&&this.treeGrid.virtualModeCreateRecords){var Y=this.treeGrid.getRows()}if(this.groups&&this.groups.length>0){var k=this.source.getGroupedRecords(this.groups,"records","label",null,"data",null,"parent",Y);var m=function(o,ad){for(var af=0;af0){var ag=m(j.records,new Array());for(var ae=0;ae0){if(p.length>0){var aa=this._names();for(var X=0;X0&&o){d(ad[ae].records)}}};d(L);if(t!="xml"&&t!="json"){var u=p.length;for(var X=0;X0){o["Level"+o[aa.level]]=ad?"-":"+"}else{o["Level"+o[aa.level]]=""}}else{o["Level"+o[aa.level]]=""}if(o[aa.leaf]){o["Level"+o[aa.level]]=""}for(var af=o[aa.level]+1;af=g){ai=p.length-g-1}else{if(g>0&&af1){var j=b(s._table[0].rows[1].cells[ai]);if(j.length==0){var j=b(s._table[0].rows[1].cells[0])}}if(aj.length==0){var aj=b(s._table[0].rows[0].cells[0])}var ae=this;var ag=function(am){am.removeClass(K.toThemeProperty("jqx-cell"));am.removeClass(K.toThemeProperty("jqx-grid-cell-selected"));am.removeClass(K.toThemeProperty("jqx-fill-state-pressed"));am.removeClass(K.toThemeProperty("jqx-grid-cell-hover"));am.removeClass(K.toThemeProperty("jqx-fill-state-hover"));if(ae.customCellStyles){for(var an in ae.customCellStyles){am.removeClass(ae.customCellStyles[an])}}};ag(aj);if(j){ag(j)}if(this.displayfield==null){return true}if(s.showAggregates){if(s.getcolumnaggregateddata){if(s.treeGrid){var al=function(am,an){for(var ao=0;ao500){Z[this.displayfield].width=500}Z[this.displayfield].formatString=this.cellsFormat;Z[this.displayfield].localization=s.gridlocalization;Z[this.displayfield].type=ah;Z[this.displayfield].cellsAlign=this.cellsalign;Z[this.displayfield].hidden=!h;Z[this.displayfield].index=ai;Z[this.displayfield].maxIndex=p.length}E="cell"+B;var ak=this.element;if(t!="json"&&t!="xml"){J="column"+z;var i=function(o,au,at,am,ar,ao,an,ap,aq){C[o]={index:1+an,maxIndex:p.length};if(ao.rtl){C[o].index=p.length-an}if(t=="html"||t=="xls"||t=="pdf"){if(au){C[o]["font-size"]=au.css("font-size");C[o]["font-weight"]=au.css("font-weight");C[o]["font-style"]=au.css("font-style");C[o]["background-color"]=ao._getexportcolor(au.css("background-color"));C[o]["color"]=ao._getexportcolor(au.css("color"));C[o]["border-color"]=ao._getexportcolor(au.css("border-top-color"))}if(at){C[o]["text-align"]=ar.align}else{C[o]["text-align"]=ar.cellsalign;C[o]["formatString"]=ar.cellsFormat;C[o]["dataType"]=ah}if(t=="html"||t=="pdf"){C[o]["border-top-width"]="0px";if(!ao.rtl){C[o]["border-left-width"]="0px";C[o]["border-right-width"]="1px"}else{C[o]["border-left-width"]="1px";C[o]["border-right-width"]="0px";if(an==p.length-g-1&&at){C[o]["border-right-width"]="1px"}}C[o]["border-bottom-width"]="1px";if(au){C[o]["border-top-style"]=au.css("border-top-style");C[o]["border-left-style"]=au.css("border-left-style");C[o]["border-right-style"]=au.css("border-right-style");C[o]["border-bottom-style"]=au.css("border-bottom-style")}if(at){if(an==0&&!ao.rtl){C[o]["border-left-width"]="1px"}else{if(an==p.length-1&&ao.rtl){C[o]["border-right-width"]="1px"}}if(au){C[o]["border-top-width"]="1px";C[o]["border-bottom-width"]=au.css("border-bottom-width")}}else{if(an==0&&!ao.rtl){C[o]["border-left-width"]="1px"}else{if(an==p.length-1&&ao.rtl){C[o]["border-right-width"]="1px"}}}if(au){C[o]["height"]=au.css("height")}if(ao.treeGrid&&!at){if(C[o].index-10&&this.treeGrid){var ab=g+1;if(this.rtl){ab=p.length-g}if(C["column"+ab]){var e=C["column"+ab];e.merge=g;e["border-left-width"]="1px";var H=C["cell"+ab];for(var X=0;X0){b.each(p,function(j){if(this.aggregates){for(var ad=0;ad0){var c=l;for(var v=0;v0){var c=this.getRows();for(var e=0;e0){var n=this.rowsByKey[H];if(this.treeGrid){var n=this.treeGrid.getRow(H)}if(n.level0){for(var z=0;z";var s=this.getCellTextByKey(H,h.displayfield);d.innerHTML=e;var f=b(d.firstChild);switch(h.columntype){case"textbox":case"default":var k=b("").appendTo(f);if(this.rtl){k.css("direction","rtl")}k.addClass(this.toThemeProperty("jqx-input"));k.addClass(this.toThemeProperty("jqx-widget-content"));k.addClass(this.toThemeProperty("jqx-cell-editor"));k[0].onfocus=function(i){setTimeout(function(){if(i){var I=b(i.target).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}else{var I=b(document.activeElement).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}if(p.content){p.content[0].scrollTop=0;p.content[0].scrollLeft=0}if(p.gridcontent){p.gridcontent[0].scrollLeft=0;p.gridcontent[0].scrollTop=0}},10)};if(!h.editable){k.attr("disabled",true);k.attr("readOnly",true);k.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{if(!q){q=true;var g=b.jqx.browser.msie&&b.jqx.browser.version>10;if(!g){k.focus()}var c=k;setTimeout(function(){var J=c.val().length;if(!g){c.focus()}try{if("selectionStart" in c[0]){c[0].setSelectionRange(0,J)}else{var i=c[0].createTextRange();i.collapse(true);i.moveEnd("character",J);i.moveStart("character",0);i.select()}}catch(I){var K=I}},10)}}k.width(x);k.height(u);if(b.jqx.browser.msie&&b.jqx.browser.version<9){k.css("line-height",parseInt(u)+"px")}k.css("text-align",h.cellsalign);if(s===null){s=""}if(s==undefined){s=""}k.val(s);if(h.createeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.createeditor(!this.treeGrid?o:H,s,k,C,x,u)}this._editors.push({column:h,editor:k});if(h.cellsFormat!=""){if(h.cellsFormat.indexOf("p")!=-1||h.cellsFormat.indexOf("c")!=-1||h.cellsFormat.indexOf("n")!=-1||h.cellsFormat.indexOf("f")!=-1){k.keydown(function(I){var O=I.charCode?I.charCode:I.keyCode?I.keyCode:0;var L=String.fromCharCode(O);var M=parseInt(L);if(isNaN(M)){return true}if(p._selection(k).length>0){return true}var K="";var J=k.val();if(h.cellsFormat.length>1){var N=parseInt(h.cellsFormat.substring(1));if(isNaN(N)){N=0}}else{var N=0}if(N>0){if(J.indexOf(p.gridlocalization.decimalseparator)!=-1){if(p._selection(k).start>J.indexOf(p.gridlocalization.decimalseparator)){return true}}}for(var P=0;P=11){return false}})}}if(h.initeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.initeditor(!this.treeGrid?o:H,s,k,C,x,u)}break;case"custom":case"template":if(!this.editorsCache){this.editorsCache=new Array()}var l=b("
    ").appendTo(f);var y=b.trim(h.datafield).split(" ").join("");if(y.indexOf(".")!=-1){y=y.replace(".","")}var A=this.editorsCache["templateeditor_"+y];if(h.columntype=="custom"){var A=this.editorsCache["customeditor_"+y+"_"+H]}var C=s;var s=this.getCellValueByKey(H,h.displayfield);if(!A){var k=b("
    ");k.width(v);k.height(u);A=k;if(s===null){s=""}if(h.columntype!="custom"){this.editorsCache["templateeditor_"+y]=k}else{this.editorsCache["customeditor_"+y+"_"+H]=k}k.appendTo(l);if(h.createeditor){h.createeditor(!this.treeGrid?o:H,s,k,C,v,u)}}else{var k=A;k.width(v);k.height(u);k.appendTo(l)}if(h.initeditor){h.initeditor(!this.treeGrid?o:H,s,k,C,v,u)}this._editors.push({column:h,editor:k});break}}}this.editKey=H;this.beginUpdate();var G=this.getrowdisplayindex(n);this._raiseEvent("rowBeginEdit",{key:H,index:G,boundIndex:o,row:this.rowsByKey[H]});if(F){var n=this.rowsByKey[H];var w=null;var m=null;if(n){w=n[r.datafield];m=n[r.displayfield]}this._raiseEvent("cellBeginEdit",{value:w,displayValue:m,key:H,index:G,dataField:r.datafield,displayField:r.displayfield,boundIndex:o,row:this.rowsByKey[H]})}this.endUpdate(false)},_toNumber:function(f){if(!f.indexOf&&f!=undefined){f=f.toString()}if(f.indexOf(this.gridlocalization.currencysymbol)>-1){f=f.replace(this.gridlocalization.currencysymbol,"")}var c=function(l,j,k){var h=l;if(j==k){return l}var i=h.indexOf(j);while(i!=-1){h=h.replace(j,k);i=h.indexOf(j)}return h};f=c(f,this.gridlocalization.thousandsseparator,"");f=f.replace(this.gridlocalization.decimalseparator,".");if(f.indexOf(this.gridlocalization.percentsymbol)>-1){f=f.replace(this.gridlocalization.percentsymbol,"")}var g="";for(var d=0;d1){if(b.jqx.dataFormat){m=b.jqx.dataFormat.parsedate(e,h.cellsFormat,this.gridlocalization)}if(m=="Invalid Date"||m==null){m=""}}}}if(h.displayfield!=h.datafield){m={label:m,value:m}}break}}if(h.geteditorvalue){var c=this.getCellValueByKey(d,h.displayfield);m=h.geteditorvalue(!this.treeGrid?k:d,c,j)}}return m},_validateEditors:function(c){var k=this;var d=true;var s=k.rowsByKey[c];var l=k.getrowindex(s);var m=k._editors;var c=k.editKey;var p=k._getuirow(c);for(var h=0;h=0||G.indexOf("datetimeinput")>=0||G.indexOf("combobox")>=0||G.indexOf("menu")>=0){if(i.jqxWidget.isOpened){var F=i.jqxWidget.isOpened();if(F){i.jqxWidget.close()}}}}};var z="customeditor_"+v.displayfield+"_"+p;var y="templateeditor_"+v.displayfield;if(k.editorsCache[z]){var w=b(k.editorsCache[z]).data();var A=k.editorsCache[z];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w);k.editorsCache[z].detach()}if(k.editorsCache[y]){k.editorsCache[y].detach();var w=b(k.editorsCache[y]).data();var A=k.editorsCache[y];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w)}}if(C!=u){k.beginUpdate();k._raiseEvent("cellValueChanged",{value:C,oldValue:u,dataField:v.datafield,displayField:v.displayfield,key:p,index:l,row:t});k.endUpdate(false)}}};k.updaterowbykey(k.editKey,h,false,s)}}if(!d){return false}}k._detachEditors(e);return true},_detachEditors:function(l){var g=this;var m=g.rowsByKey[l];var i=g.getrowindex(m);if(g.editorsCache){for(var h in g.editorsCache){var f=b(g.editorsCache[h]).data();if(f&&f.jqxWidget){var c=f.jqxWidget.element.className;if(c.indexOf("dropdownlist")>=0||c.indexOf("datetimeinput")>=0||c.indexOf("combobox")>=0||c.indexOf("menu")>=0){if(f.jqxWidget.isOpened){var e=f.jqxWidget.isOpened();if(e){f.jqxWidget.close()}}}}b(g.editorsCache[h]).detach()}}g.beginUpdate();var d=g.getrowdisplayindex(m);if(g.editSettings.editSingleCell){var m=g.rowsByKey[l];var k=null;var j=null;if(m){k=m[g.editColumn.datafield];j=m[g.editColumn.displayfield]}g._raiseEvent("cellEndEdit",{value:k,displayValue:j,key:l,index:d,dataField:g.editColumn.datafield,displayField:g.editColumn.displayfield,boundIndex:i,row:g.rowsByKey[l]})}g._raiseEvent("rowEndEdit",{key:l,index:d,boundIndex:i,row:g.rowsByKey[l]});g.endUpdate(false);g.editColumn=null;g.editKey=null;g._renderrows();g._renderhorizontalscroll();g.host.focus();setTimeout(function(){g.host.focus()},10)},_showvalidationpopup:function(r,e,s,m){if(s==undefined){var s=this.gridlocalization.validationstring}m.addClass(this.toThemeProperty("jqx-grid-validation-label"));var p=b("
    ");var o=b("
    ");p.html(s);o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));p.addClass(this.toThemeProperty("jqx-grid-validation"));p.addClass(this.toThemeProperty("jqx-rc-all"));p.hide();o.hide();p.prependTo(this.table);o.prependTo(this.table);var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);var l=this.getColumn(e).uielement;if(!r){return}var k=r;p.css("top",parseInt(k.position().top)+30+"px");var c=parseInt(p.css("top"));o.css("top",c-11);o.removeClass();o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var f=false;if(c>=this._table.height()){o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));c=parseInt(k.position().top)-k.outerHeight()-5;if(c<0){c=0;o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}p.css("top",c+"px");o.css("top",c+p.outerHeight()-9)}var n=-g+parseInt(b(l).position().left);var q=parseInt(this._table.css("left"));if(isNaN(q)){q=0}if(q!=0){g=0}o.css("left",g+n+30);var d=p.width();if(d+n>this.host.width()-20){var i=d+n-this.host.width()+40;n-=i}if(!f){p.css("left",g+n)}else{p.css("left",g+parseInt(b(l).position().left)-p.outerWidth())}m.mouseenter(function(){if(m.hasClass("jqx-grid-validation-label")){p.show();o.show()}});m.mouseleave(function(){p.hide();o.hide()});if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:p,validationrow:o}},addRow:function(d,p,j,n){if(p!=undefined){this._datachanged=true;if(j==undefined){j="last"}var o=false;var k=this.that;if(d==null){var f=this.dataview.filters&&this.dataview.filters.length>0;var m=!f?this.dataview.totalrecords:this.source.records.length;if(!this.pageable){if(this.source._source.totalrecords){this.dataview.totalrecords=this.source._source.totalrecords}else{if(this.source._source.totalRecords){this.dataview.totalrecords=this.source._source.totalRecords}else{if(this.source.hierarchy.length!==0){this.dataview.totalrecords=this.source.hierarchy.length}else{this.dataview.totalrecords=this.source.records.length}}}var m=!f?this.dataview.totalrecords:this.source.records.length}if(!b.isArray(p)){d=this.dataview.getid(this.dataview.source.id,p,m);if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{var c=new Array();b.each(p,function(e,q){var r=k.dataview.getid(k.dataview.source.id,p[e],m+e);c.push(r);if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}});d=c}}else{if(!b.isArray(p)){if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{b.each(p,function(e,q){var r=d[e];if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}})}}var i=this.treeGrid?(this.treeGrid.virtualModeCreateRecords?true:false):false;var g=function(v,q,A,t){if(v._loading){throw new Error("jqxDataTable: "+v.loadingErrorMessage);return false}var r=v.vScrollInstance.value;var z=false;if(!b.isArray(A)){A.uid=q;v.rowsByKey[q]=A;if(q==n){n=null}z=v.source.addRecord(A,t,n,i)}else{b.each(A,function(B,C){var D=null;if(q!=null&&q[B]!=null){D=q[B]}this.uid=D;v.rowsByKey[D]=this;if(q==n){n=null}z=v.source.addRecord(this,t,n,i)})}if(v.groups&&v.groups.length>0){var w=Object.prototype.toString;var y=v.groups[0];Object.prototype.toString=(typeof y=="function")?y:function(){return this[y]};if(!v.source.records.sort){var x=new Array();var u=0;var e=0;var s=[];b.each(s,function(){x[e+u++]=this});s=x}v.source.records.sort(function(C,B){if(C===undefined){C=null}if(B===undefined){B=null}if(C===null&&B===null){return 0}if(C===null&&B!==null){return -1}if(C!==null&&B===null){return 1}var F=0;var E=0;if(C&&C.uid){F=C.uid}if(B&&B.uid){E=B.uid}C=C.toString();B=B.toString();if(b.jqx.dataFormat.isNumber(C)&&b.jqx.dataFormat.isNumber(B)){if(CB){return 1}return 0}else{if(b.jqx.dataFormat.isDate(C)&&b.jqx.dataFormat.isDate(B)){if(CB){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(C)&&!b.jqx.dataFormat.isNumber(B)){C=String(C).toLowerCase();B=String(B).toLowerCase()}}}try{if(CB){return 1}}catch(D){var G=D}if(typeof(F)=="number"){if(FE){return 1}}return 0});Object.prototype.toString=w}v.dataview._filteredData=null;v.dataview._sortData=null;v.dataview._sortHierarchyData=null;if(v._updating==undefined||v._updating==false){v.refresh()}if(v.source&&v.source._knockoutdatasource&&!v._updateFromAdapter&&v.autokoupdates){if(v.source._source._localdata){v.source.suspendKO=true;v.source._source._localdata.push(A);v.source.suspendKO=false}}v.vScrollInstance.setPosition(r);return z};if(this.source.addrow){var h=function(e,q){if(e==true||e==undefined){if(q!=undefined){d=q}g(k,d,p,j)}};try{if(!k.treeGrid){o=this.source.addrow(d,p,j,h)}else{o=this.source.addrow(d,p,j,n,h)}if(o==undefined){o=true}}catch(l){o=false}if(o==false){return false}}else{g(this,d,p,j)}return o}return false},deleteRow:function(c){var d=this._getkey(c);this.deleterowbykey(d)},deleterowbykey:function(g){if(g!=undefined){this._datachanged=true;var h=false;var f=this.that;var d=function(m,l){if(m._loading){throw new Error("jqxDataTable: "+m.loadingErrorMessage);return false}m.dataview._filteredData=null;m.dataview._sortData=null;m.dataview._sortHierarchyData=null;var o=false;var p=m.vScrollInstance.value;if(!b.isArray(l)){var o=false;if(m.rowsByKey[l]){o=true;if(m.rowinfo[l]&&m.rowinfo[l].selected){m.unselectrowbykey(l,false)}if(m.treeGrid){var n=m._names();var k=m.rowsByKey[l][n.parent]}delete m.rowsByKey[l];if(m.treeGrid){if(m.rowinfo[l]){var i=m.rowinfo[l].row.records;var j=function(q){for(var r=0;r0&&v.originalRecord){v.originalRecord[o.columns.records[u].datafield]=t[o.columns.records[u].datafield]}}r=true}};s(n);if(o.treeGrid){n=o.treeGrid.getRow(l);s(n)}}else{b.each(l,function(w,x){var v=o.rowsByKey[this];var u=function(z,y){if(!v){r=false}else{v[this]=t[w]}r=true};u(this,v);if(o.treeGrid){v=o.treeGrid.getRow(this);u(this,v)}})}var m=o.vScrollInstance.value;if(g==undefined||g==true){if(o._updating==undefined||o._updating==false){o._renderrows()}}if(o.showAggregates&&o._updatecolumnsaggregates){o._updatecolumnsaggregates()}if(o.source&&o.source._knockoutdatasource&&!o._updateFromAdapter&&o.autokoupdates){if(o.source._source._localdata){var n=o.rowsByKey[l];var p=o.getrowindex(n);var q=o.source._source._localdata()[p];o.source.suspendKO=true;o.source._source._localdata.replace(q,b.extend({},n));o.source.suspendKO=false}}o.vScrollInstance.setPosition(m);return r};if(this.source.updaterow){var e=function(l){if(l==true||l==undefined){d(f,c,k);if(i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}};try{j=this.source.updaterow(c,k,e);if(j==undefined){j=true}}catch(h){j=false}}else{j=d(f,c,k);if(j&&i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}return j}return false},lockRow:function(c){var d=this._getkey(c);this.lockrowbykey(d)},unlockRow:function(c){var d=this._getkey(c);this.unlockrowbykey(d)},lockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=true}else{this.rowinfo[c]={locked:true}}this._renderrows()},unlockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=false}else{this.rowinfo[c]={locked:false}}this._renderrows()},selectRow:function(c){var d=this._getkey(c);this.selectrowbykey(d)},unselectRow:function(c){var d=this._getkey(c);this.unselectrowbykey(d)},selectrowbykey:function(e,h,f){if(h!="keyboard"&&h!="mouse"){this._lastSelectedKey=e}var g=f!==false?true:false;this._doSelection(e,true,g);var i=this.rowsByKey[e];var d=this.getrowindex(i);var c=this.getrowdisplayindex(i);this._raiseEvent("rowSelect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},unselectrowbykey:function(e,f){var g=f!==false?true:false;this._doSelection(e,false,g);var h=this.rowsByKey[e];var d=this.getrowindex(h);var c=this.getrowdisplayindex(h);this._raiseEvent("rowUnselect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},getSelection:function(){var c=new Array();if(this.rowinfo){for(var e in this.rowinfo){var d=this.rowinfo[e];if(d.selected){c.push(d.row)}}}return c},showdetailsbykey:function(k){if(!this.rowDetails){return}var l=this.rowinfo[k];if(l){l.expanded=true;var f=b(this._table.children()[1]).children(("[data-key="+k+"]"));var i=b(this._pinnedTable.children()[1]).children(("[data-key="+k+"]"));if(f){var c=i.children();var h=b(c[0]);if(this.rtl){var h=b(c[c.length-1])}if(!this.rtl){h.removeClass(this.toThemeProperty("jqx-grid-group-collapse"));h.addClass(this.toThemeProperty("jqx-grid-group-expand"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{h.removeClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));h.addClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}f.next().show();var d=i.next();d.show();if(b.jqx.browser.msie&&b.jqx.browser.version<8){f.next().children().show();i.next().children().show()}if(!l.initialized){var j=l.detailsHeight;var m=this.initRowDetails(k,l.row,b(b(d).children().children().children()[0]),l);l.details=b(d).children().children().children()[0];l.initialized=true;if(m===false||l.detailsHeight!=j){if(m===false){l.expanded=false;l.nodetails=true;d.hide()}this._renderrows()}}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var g=this.getrowindex(l.row);var e=this.getrowdisplayindex(l.row);this._raiseEvent("rowExpand",{row:l.row,index:e,boundIndex:g,rowKey:k})}}},hidedetailsbykey:function(h){if(!this.rowDetails){return}var j=this.rowinfo[h];if(j){j.expanded=false;var d=b(this._table.children()[1]).children(("[data-key="+h+"]"));var e=b(this._pinnedTable.children()[1]).children(("[data-key="+h+"]"));if(d){var g=e.children();var i=b(g[0]);if(this.rtl){var i=b(g[g.length-1])}if(!this.rtl){i.addClass(this.toThemeProperty("jqx-grid-group-collapse"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand"));i.addClass(this.toThemeProperty("jqx-icon-arrow-right"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{i.addClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));i.addClass(this.toThemeProperty("jqx-icon-arrow-left"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}d.next().hide();e.next().hide();if(b.jqx.browser.msie&&b.jqx.browser.version<8){d.next().children().hide();e.next().children().hide()}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var f=this.getrowindex(j.row);var c=this.getrowdisplayindex(j.row);this._raiseEvent("rowCollapse",{row:j.row,index:c,boundIndex:f,rowKey:h})}}},_getvirtualcolumnsindexes:function(d,l,h,k,c){if(this.rowDetails||this.rtl||this.editcell||(this.width&&this.width.toString().indexOf("%")>=0)||this.exporting){return{start:0,end:h+k}}var e=0;var i=-1;var f=h+k;if(this.autorowheight){return{start:0,end:h+k}}if(!c){for(var g=0;g=d&&i==-1){i=g}if(e>l+d){f=g;break}}}f++;if(f>h+k){f=h+k}if(i==-1){i=0}return{start:i,end:f}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var h=parseInt(u);if(this.table==null){return}var q=this.columnsrow;var r=0;var i=this.columns.records.length-r;var e=this.columns.records;var l=this.source.records.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){h=t.max-h}}if(l&&!this._haspinned){this.table[0].style.left=-h+"px";q[0].style.marginLeft=-h+"px"}else{if(this._haspinned||this._haspinned==undefined){for(var w=0;w0:false;if(this.columns&&this.columns.records){for(var e=0;e0){if(h==="stringfilter"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}}}},applyFilters:function(){if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this.serverProcessing){this.dataview.pagenum=0;this.updateBoundData("filter")}else{this.goToPage(0);this.refresh()}if(arguments&&arguments.length>0){if(this._updateSimpleFilter){if(this.filtercolumnsList){var d=this.filtercolumnsList.jqxDropDownList("getSelectedItem").value;this._updateSimpleFilter(d)}}if(this._updateFilterRow){this._updateFilterRow()}}this._raiseEvent("filter",{filters:this.dataview.filters})},sortBy:function(d,g){this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}if(d==null){g=null;d=this.sortcolumn}if(d){var f=this;var e;if(g=="a"||g=="asc"||g=="ascending"||g==true){e=true}else{e=false}if(g!=null){f.sortdirection={ascending:e,descending:!e}}else{f.sortdirection={ascending:false,descending:false}}if(g!=null){f.sortcolumn=d}else{f.sortcolumn=null}if(f.source.sort){f.dataview.sortfield=d;if(g==null){f.dataview.sortfielddirection=""}else{f.dataview.sortfielddirection=e?"asc":"desc"}if(f.source.sort&&!this._loading){f.source.sort(d,g)}}f.dataview.sortBy(d,g);f._raiseEvent("sort",{sortcolumn:this.sortcolumn,sortdirection:this.sortdirection})}if(!this.serverProcessing){this.refresh()}else{this.updateBoundData("sort")}},_togglesort:function(d){var f=this;if(this.disabled){return}if(d.sortable&&f.sortable){var c={sortcolumn:this.sortcolumn,sortdirection:this.sortdirection};var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(e==true){e=false}else{e=null}}else{e=true}f.sortBy(d.displayfield,e)}},_renderfilter:function(){var h=this;var j=b("
    ");j.height(22);var o=j.find("input");var g=j.find("div:first");j.addClass(this.toThemeProperty("jqx-rc-all"));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-input-group"));o.addClass(this.toThemeProperty("jqx-input"));o.addClass(this.toThemeProperty("jqx-rc-l"));o.addClass(this.toThemeProperty("jqx-input-group-addon"));o.addClass(this.toThemeProperty("jqx-widget"));o.addClass(this.toThemeProperty("jqx-widget-content"));g.addClass(this.toThemeProperty("jqx-fill-state-normal"));g.addClass(this.toThemeProperty("jqx-rc-r"));g.addClass(this.toThemeProperty("jqx-input-group-addon"));g.find("div").addClass(this.toThemeProperty("jqx-icon-search"));if(this.rtl){o.addClass(this.toThemeProperty("jqx-rtl"));o.css("direction","rtl")}this.filter.children().remove();this.filterbutton=g;var d=new Array();for(var f=0;f"+this.gridlocalization.filtersearchstring+"");this.filter.append(l);var c=b("
    ");this.filter.append(c);if(c.jqxDropDownList){c.jqxDropDownList({theme:this.theme,enableBrowserBoundsDetection:true,autoDropDownHeight:p,rtl:h.rtl,dropDownWidth:220,selectedIndex:0,width:"auto",height:20,source:d,displayMember:"label",valueMember:"value"})}this.filtercolumnsList=c;var n=function(q){h.filterinput.val("");for(var r=0;r=0){x=x.replace(h.gridlocalization.decimalseparator,".")}}if(x.indexOf(h.gridlocalization.currencysymbol)>=0){x=x.replace(h.gridlocalization.currencysymbol,"")}if(x.indexOf(h.gridlocalization.percentagesymbol)>=0){x=x.replace(h.gridlocalization.percentagesymbol,"")}}var y=A.createfilter(C,x,"EQUAL",null,B.cellsFormat,h.gridlocalization)}else{var y=A.createfilter(C,x,"CONTAINS")}}A.operator=i;A.addfilter(0,y);return A};if(h.filterMode!=="simple"){if(u){var v=u.value;var t=h.getColumn(v);var s=w(t,r,"and");if(r.length>0){h.removeFilter(v);h.addFilter(v,s);h.applyFilters()}else{h.removeFilter(v);h.applyFilters()}if(h.filterMode==="advanced"){if(h._updateFilterRow){h._updateFilterRow(true)}}}}else{h.clearFilters(false,false);if(r.length>0){for(var q=0;q"+this.gridlocalization.filterstring+"");j.append(e);this.addHandler(e,"click",function(q){var i=function(u){if(h.filterrow){for(var x=0;x");k.attr("title",h.gridlocalization.filterclearstring);k.addClass(h.toThemeProperty("jqx-icon-close"));j.append(k);k.hide();h.filtericon=k;k.click(function(){h.clearFilters();h.filtericon.fadeOut(200)});if(h.dataview.filters.length>0){if(h.filterMode!="advanced"){n(h.dataview.filters[0].datafield)}else{if(h._updateFilterRow){h._updateFilterRow()}}}},_renderadvancedfilter:function(){var h=this;var c=function(){h.clearFilters(false,false);var n=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var p=h.filterinput.val();for(var m=0;m0||(w.length==0&&k=="NOT_NULL")||(w.length==0&&k=="NOT_EMPTY")||(w.length==0&&k=="EMPTY")||(w.length==0&&k=="NULL")){var s=l.displayfield;var x=new b.jqx.filter();if(q=="numericfilter"){if(h.gridlocalization.decimalseparator==","){if(w.indexOf(h.gridlocalization.decimalseparator)>=0){w=w.replace(h.gridlocalization.decimalseparator,".")}}if(w.indexOf(h.gridlocalization.currencysymbol)>=0){w=w.replace(h.gridlocalization.currencysymbol,"")}if(w.indexOf(h.gridlocalization.percentagesymbol)>=0){w=w.replace(h.gridlocalization.percentagesymbol,"")}}var j=x.createfilter(q,w,k,null,l.cellsFormat,h.gridlocalization);x.addfilter(0,j);h.addFilter(s,x)}}if(h.dataview.filters.length>0){h.applyFilters()}else{h.clearFilters()}if(h.dataview.filters.length==0){h.filtericon.fadeOut(200)}else{h.filtericon.fadeIn(200)}};var e=function(){var m=b("
    ").appendTo(h.filter);h.filterrow=m;m[0].cells=new Array();m.height(24);m.width(h.table.width());var k=0;var j=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var l=h.filterinput.val();b.each(h.columns.records,function(){var p=this;var n=b("
    ").appendTo(m);n.css("position","absolute");n.css("left",k+parseInt(p.uielement[0].style.left));if(p.pinned){n.css("z-index",h.tableZIndex+h.columns.records.length);n.addClass(h.toThemeProperty("jqx-widget-header"))}m[0].cells.push(n[0]);if(!this.filterable){return true}var o=b("").appendTo(n);o.keydown(function(r){if(r.keyCode===13){c()}});if(p.displayfield===j){o.val(l)}o.addClass(h.toThemeProperty("jqx-input"));o.addClass(h.toThemeProperty("jqx-rc-all"));o.addClass(h.toThemeProperty("jqx-widget"));o.addClass(h.toThemeProperty("jqx-widget-content"));var q=b("
    ").appendTo(n);q.append(b("
    "));o.focus(function(){h.ensureColumnVisible(p.displayfield);h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield);setTimeout(function(){h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield)},10)});q.click(function(){var u=b("
    ");u.insertAfter(q);q.remove();var s=h.getcolumntypebydatafield(p);var t=h._getfiltersbytype(s);var r;if(s==="string"){r=2}else{r=0}u.jqxDropDownList({theme:h.theme,enableBrowserBoundsDetection:true,renderMode:"simple",arrowSize:0,selectedIndex:r,rtl:h.rtl,dropDownWidth:230,dropDownHeight:180,width:20,height:20,source:t,selectionRenderer:function(){return"
    "}});h.addHandler(u,"close",function(v){o.focus();setTimeout(function(){o.focus()},10)});u.removeAttr("tabindex");u.find("div").removeAttr("tabindex");u.jqxDropDownList("open")});o[0].style.width=p.width-6-22+"px"});b("
    ").appendTo(m)};e();var i=b("
    ").appendTo(h.filter);var f=b("").appendTo(i);var g=b("").appendTo(i);var d=0;f.css("left",d);g.css("left",d);f.css("top","4px");g.css("top","4px");f.jqxButton({theme:h.theme});g.jqxButton({theme:h.theme});g.click(function(){h.filtercolumnsList.jqxDropDownList({disabled:false});h.filterinput.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filterinput.attr("disabled",false);h.filterbutton.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filter.find(".filterrow").addClass("filterrow-hidden");h.filter.find(".filterrow").hide();h._arrange()});f.click(function(){c()});h._renderhorizontalscroll()},_getfiltertype:function(c){var d="stringfilter";switch(c){case"number":case"int":case"float":case"decimal":d="numericfilter";break;case"boolean":case"bool":d="booleanfilter";break;case"date":case"time":d="datefilter";break;case"string":d="stringfilter";break}return d},getcolumntypebydatafield:function(e){var f=this;var d="string";var c=f.source.datafields||((f.source._source)?f.source._source.datafields:null);if(c){var g="";b.each(c,function(){if(this.name==e.displayfield){if(this.type){g=this.type}return false}});if(g){return g}}return d},_getfiltersbytype:function(c){var d=this;var e="";switch(c){case"number":case"float":case"int":e=d.gridlocalization.filternumericcomparisonoperators;break;case"date":e=d.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":e=d.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:e=d.gridlocalization.filterstringcomparisonoperators;break}return e},_getcellvalue:function(c,e){var d=null;d=e[c.datafield];if(c.displayfield!=null){d=e[c.displayfield]}if(d==null){d=""}return d},_renderrows:function(ap){if(this.editable){if(this.editKey!=null){if(ap!==false){var M=this.endroweditbykey(this.editKey)}}}if(this.treeGrid){this.treeGrid._renderrows();return}if(this._loading){return}if(this._updating){return}if(this.rendering){this.rendering()}var ab=this;var T=0;this.table[0].rows=new Array();var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-widget-content");if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var K=this.columns.records.length;var ao=b.jqx.browser.msie&&b.jqx.browser.version<8;if(ao){this.host.attr("hideFocus","true")}var R=ab.groups.length;var ai=new Array();var k=this.source.records;k=this.dataview.evaluate(k);this.dataViewRecords=k;if(this.dataview.pagesize=="all"||!this.pageable||this.serverProcessing){var u=k;if(this.pageable&&this.serverProcessing&&k.length>this.dataview.pagesize){var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}}else{var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}if(ab.groups&&ab.groups.length>0){var P=this.pageable?this.dataview.pagesize*this.dataview.pagenum:0;var z=function(w){var au=0;var i=new Array();for(var c=0;cab.dataview.pagesize*ab.dataview.pagenum&&au<=ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){i.push(j)}if(au>ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){break}}return i};if(this.pageSizeMode==="root"){var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",k,0);ab.rootRecordsLength=v.length;v=z(v)}else{var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",u,P)}var y=function(j,w){for(var av=0;av0){var aw=y(c.records,new Array());for(var au=0;auZ.maxwidth){e=Z.maxwidth}var l=b('
    ');b(document.body).append(l);var n=l.find("td");aq=1+parseInt(n.css("padding-left"))+parseInt(n.css("padding-right"));l.remove();break}}var ak=this.rtl?" "+this.toTP("jqx-grid-table-rtl"):"";var B="";var ar="
    ";var I=0;var s=K;for(var al=0;alZ.maxwidth){e=Z.maxwidth}e-=aq;if(e<0){e=0}if(ao){var ac=e;if(al==I){ac++}if(Z.rowDetailscolumn){var ac=ac+4;ar+="";B+=""}else{ar+="";B+=""}}else{ar+="";B+=""}aa+=e}B+="";ar+="";this._hiddencolumns=false;var g=false;if(this.rowDetails&&this._pinnedTable){this._pinnedTable.find("[data-role=details]").detach();this._table.find("[data-role=details]").detach()}if(U===0){var o='';var m=this.host.height();if(this.pageable){m-=this.pagerHeight;if(this.pagerPosition==="both"){m-=this.pagerHeight}}m-=this.columnsHeight;if(this.filterable){var ag=this.filter.find(".filterrow");var D=this.filter.find(".filterrow-hidden");var C=1;if(D.length>0){C=0}m-=this.filterHeight+this.filterHeight*ag.length*C}if(this.showstatusbar){m-=this.statusBarHeight}if(this.showAggregates){m-=this.aggregatesHeight}if(m<25){m=25}if(this.hScrollBar[0].style.visibility!="hidden"){m-=this.hScrollBar.outerHeight()}if(this.height==="auto"||this.height===null||this.autoheight){m=300}var l='";o+=l;B+=o;ar+=o;this.table[0].style.width=aa+2+"px";T=aa}var q=this.getRows();var x=new Array();for(var am=0;am';var E='';if(R>0){if(G.level';var E=''}}var p=0;var S=0;for(var al=0;alae.maxwidth){e=ae.maxwidth}e-=aq;if(e<0){e=0}var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(ae.pinned){H+=" "+this.toTP("jqx-grid-cell-pinned")}if(this.sortcolumn===ae.displayfield){H+=" "+this.toTP("jqx-grid-cell-sort")}if(this.altRows&&am%2!=0){H+=" "+this.toTP("jqx-grid-cell-alt")}if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var O="";if(R>0){if(G.levelat.maxwidth){e=at.maxwidth}A-=aq;if(A<0){A=0}if(!at.hidden){ac+=A}}e=ac}else{H+=" "+this.toTP("jqx-grid-cell-pinned")}}}var l='";af+='" class="'+H+'">';af+=aj;af+="";if(!ae.pinned){o+=l;if(g){E+=af}}else{E+=l;o+=l}if(R>0&&!ao){if(G.level";E+="";B+=o;ar+=E;if(!this.rowinfo[G.uid]){this.rowinfo[G.uid]={group:Y,row:G,details:null,detailsHeight:200,initialized:false,expanded:false}}else{if(!("group" in this.rowinfo[G.uid])){this.rowinfo[G.uid].group=Y}if(!("row" in this.rowinfo[G.uid])){this.rowinfo[G.uid].row=G}if(!("details" in this.rowinfo[G.uid])){this.rowinfo[G.uid].details=null}if(!("detailsHeight" in this.rowinfo[G.uid])){this.rowinfo[G.uid].detailsHeight=200}if(!("initialized" in this.rowinfo[G.uid])){this.rowinfo[G.uid].initialized=false}if(!("expanded" in this.rowinfo[G.uid])){this.rowinfo[G.uid].expanded=false}}if(this.serverProcessing){this.rowinfo[G.uid].row=G}if(this.rowDetails){var F=this.rowinfo[G.uid].detailsHeight;if(this.rowinfo[G.uid]){if(this.rowinfo[G.uid].expanded){var ah='';B+=ah;ar+=ah}}B+="
    ';l+=this.gridlocalization.emptydatastring;l+="
    0){if(G.level0&&ao&&Y&&al>=R){l+="font-size: 1px; border-color: transparent; color: transparent;";af+="font-size: 1px; border-color: transparent; color: transparent;"}if(ae.pinned){l+="pointer-events: auto;";af+="pointer-events: auto;"}if(!Y&&ae.rowDetailscolumn){if(this.rowinfo[G.uid]){if(!this.rowinfo[G.uid].nodetails){if(this.rowinfo[G.uid].expanded){if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-expand")}else{H+=" "+this.toTP("jqx-grid-group-expand-rtl")}H+=" "+this.toTP("jqx-icon-arrow-down")}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}if(!this.autoRowHeight||(this.autoRowHeight&&!ae.autoCellHeight)){H+=" "+this.toTP("jqx-grid-cell-nowrap ")}var aj=ab._getcellvalue(ae,G);var f=ae.cellsFormat;if(R>0){if(G.level=0||aj.indexOf(" ng-")>=0)){x.push({rowKey:G.uid,row:d,column:ae.datafield,value:aj,columnIndex:al})}}}else{if(this.groupsRenderer){aj=this.groupsRenderer(aj,G,G.level)}}l+='" class="'+H+'">';l+=aj;l+="
    ";ar+="";if(g){if(ab.WinJS){MSApp.execUnsafeLocalFunction(function(){ab.table.html(ar+B)})}else{ab.table[0].innerHTML=ar+B}var W=this.table.find("#table"+this.element.id);var X=this.table.find("#pinnedtable"+this.element.id);X.css("float","left");X.css("pointer-events","none");W.css("float","left");X[0].style.position="absolute";W[0].style.position="relative";W[0].style.zIndex=V-10;X[0].style.zIndex=V+10;this._table=W;this._table[0].style.left="0px";this._pinnedTable=X;this._pinnedTable[0].style.left="0px";this._pinnedTable[0].style.width=T+"px";this._table[0].style.width=T+"px";if(this.rtl){if(T>parseInt(this.element.style.width)&&this._haspinned){this._pinnedTable[0].style.left=3-T+parseInt(this.element.style.width)+"px"}}if(this.rowDetails){for(var am=0;am0){var an=this._table[0].rows;b.each(x,function(){var w=this.row;var au=this.rowKey;var j=this.column;var i=this.columnIndex;var t=ab._getuirow(au);if(t){var c=t[0].cells[i];if(b.jqx.angularCompile){b.jqx.angularCompile(c,"
    "+c.innerHTML+"
    ")}}})}if(this.rendered){this.rendered()}},getcolumnindex:function(c){var d=this.getColumn(c);var e=this.columns.records.indexOf(d);return e},setcolumnindex:function(e,i,j){var h=this.getColumn(e);if(h.pinned){return}if(h.hidden){return}if(h.checkboxcolumn){return}if(h.grouped){return}var l=this.columns.records.indexOf(h);this.columns.records.splice(l,1);this.columns.records.splice(i,0,h);var f=0;var n=this.headerZIndex;this.columnsrow.children().detach();var k=this.toThemeProperty("jqx-grid-cell");k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");k+=" "+this.toThemeProperty("jqx-item");var m=this;var c=null;if(m.filterrow!=undefined){var c=b(m.filterrow.children()[0])}this.columnsrow[0].cells=[];var g=false;b.each(this.columns.records,function(p,s){var q=this.uielement;m.columnsrow.append(q);if(!m.rtl){q.css("z-index",n--)}else{q.css("z-index",n++)}var o=!m.rtl?250+n-1:250+n+1;if(this.pinned){q.css("z-index",o)}var r=this.width;q.css("left",f);m.columnsrow[0].cells[m.columnsrow[0].cells.length]=q[0];if(this.hidden){g=true}if(!(this.hidden&&this.hideable)){f+=r}});if(this.groupable){var d=this.groups.length;if(d>0){if(l-d>=0){l-=d;i-=d}}}if(this.rowDetails){if(l-1>=0){l--;i--}}if(this.selectionMode=="checkbox"){if(l-1>=0){l--;i--}}var h=this._columns[l];this._columns.splice(l,1);this._columns.splice(i,0,h);this.resize();this._rendercolumnGroups();this._raiseEvent("columnReordered",{dataField:h.datafield,oldIndex:l,newIndex:i})},_pinnedColumnsLength:function(){var c=0;b.each(this.columns.records,function(){if(this.pinned){c++}if(this.grouped){c++}});if(this.rowDetails){c++}if(this.selectionMode=="checkbox"){c++}return c},_handlecolumnsReorder:function(){var g=this;var h=-1;var d=false;if(!g.columnsReorder){return}var f="mousemove.reorder"+this.element.id;var e="mousedown.reorder"+this.element.id;var i="mouseup.reorder"+this.element.id;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true;f=b.jqx.mobile.getTouchEventName("touchmove")+".reorder"+this.element.id;e=b.jqx.mobile.getTouchEventName("touchstart")+".reorder"+this.element.id;i=b.jqx.mobile.getTouchEventName("touchend")+".reorder"+this.element.id}this.removeHandler(b(document),f);this.addHandler(b(document),f,function(x){if(g.resizing){return true}if(g.reordercolumn!=null){var m=parseInt(x.pageX);var u=parseInt(x.pageY);if(c){var t=g.getTouches(x);var p=t[0];if(p!=undefined){m=parseInt(p.pageX);u=parseInt(p.pageY)}}var j=g.host.coord();var w=parseInt(j.left);var k=parseInt(j.top);if(g.dragmousedownoffset==undefined||g.dragmousedownoffset==null){g.dragmousedownoffset={left:0,top:0}}var B=parseInt(m)-parseInt(g.dragmousedownoffset.left);var s=parseInt(u)-parseInt(g.dragmousedownoffset.top);g.reordercolumn.css({left:B+"px",top:s+"px"});d=false;if(m>=w&&m<=w+g.host.width()){if(u>=k&&u<=k+g.host.height()){d=true}}h=-1;if(d){g.reordercolumnicon.removeClass(g.toThemeProperty("jqx-grid-dragcancel-icon"));g.reordercolumnicon.addClass(g.toThemeProperty("jqx-grid-drag-icon"));var n=g.columnsheader.coord();var q=n.top+g.columnsheader.height();if(g.columnsdropline!=null){if(u>=n.top&&u<=q){h=g._handlereordercolumnsdroplines(m);if(g.columnGroups){if(h!=-1){var l=0;l+=g._pinnedColumnsLength();var o=h.index;if(o>=l){var y=g.columns.records[o];if(y!=undefined){var v=g.columns.records.indexOf(g.getColumn(y.datafield));if(y.datafield==null){var v=g.columns.records.indexOf(g.getcolumnbytext(y.text))}var r=b.data(g.reordercolumn[0],"reorderrecord");var A=g.columns.records.indexOf(g.getColumn(r));var z=y;if(A=p){var s=g.columns.records[q];if(s!=undefined){var u=g.columns.records.indexOf(g.getColumn(s.datafield));if(s.datafield==null){var u=g.columns.records.indexOf(g.getcolumnbytext(s.text))}if(g.columnGroups){var r=s;if(xu){g.setcolumnindex(k,u)}}}}}}if(g.columnsdropline!=null){g.columnsdropline.remove();g.columnsdropline=null}}}})},getcolumnbytext:function(d){var c=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.text==d){c=this;return false}})}return c},_handlereordercolumnsdroplines:function(i){var c=this;var h=-1;var e=c._pinnedColumnsLength();var g=parseInt(c.host.coord().left);var d=g+c.host.width();var f=c.vScrollBar.css("visibility")!="hidden"?19:0;if(!c.rtl){f=0}b.each(c.columnsbounds,function(j){if(j>=e){if(this.width==0){return true}if(i<=this.left+this.width/2){if(i>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+parseInt(this.left)+"px");c.columnsdropline.css("top",parseInt(this.top)+"px");c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"before"};return false}else{if(i>=this.left+this.width/2){if(this.left+this.width>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+1+this.left+this.width);c.columnsdropline.css("top",this.top);c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"after"}}}}});return h},_createreordercolumn:function(d,f,i){var h=this;var g=f;if(h.reordercolumn){h.reordercolumn.remove()}if(h.columnsdropline){h.columnsdropline.remove()}h.reordercolumn=b("
    ");var k=d.clone();h.reordercolumn.css("z-index",999999);k.css("border-width","1px");k.css("opacity","0.4");var j=b(k.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(j.length>0){j.css("display","none")}var c=b(k.find(".jqx-icon-close"));if(c.length>0){c.css("display","none")}h.reordercolumnicon=b('
    ');h.reordercolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.reordercolumn.css("float","left");h.reordercolumn.css("position","absolute");var e=h.host.coord();k.width(d.width()+16);h.reordercolumn.append(k);h.reordercolumn.height(d.height());h.reordercolumn.width(k.width());h.reordercolumn.append(h.reordercolumnicon);b(document.body).append(h.reordercolumn);k.css("margin-left",0);k.css("left",0);k.css("top",0);h.reordercolumn.css("left",g.left+h.dragmousedown.left);h.reordercolumn.css("top",g.top+h.dragmousedown.top);if(i!=undefined&&i){h.columnsdropline=b('
    ');h.columnsdropline.width(2);h.columnsdropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));b(document.body).append(h.columnsdropline)}},_handlecolumnsdragreorder:function(d,g){if(this.reordercolumn){this.reordercolumn.remove()}if(this.columnsdropline){this.columnsdropline.remove()}this.dragmousedown=null;this.dragmousedownoffset=null;this.columndragstarted=false;this.reordercolumn=null;var h=this;var f;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true}var e="mousedown.drag";var f="mousemove.drag";if(c){e=b.jqx.mobile.getTouchEventName("touchstart")+".drag";f=b.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(g,"dragstart",function(i){return false})}this.addHandler(g,e,function(k){if(false==d.draggable){return true}if(h.resizing){return true}h.__drag=true;var j=k.pageX;var i=k.pageY;if(c){var l=h.getTouches(k);var n=l[0];j=n.pageX;i=n.pageY}h.dragmousedown={left:j,top:i};var m=b(k.target).coord();h.dragmousedownoffset={left:parseInt(j)-parseInt(m.left),top:parseInt(i-m.top)};if(k.preventDefault){k.preventDefault()}return true});this.addHandler(g,f,function(k){if(!d.draggable){return true}if(undefined==d.datafield){return true}if(d.pinned){return true}if(h.resizing){return true}if(h.dragmousedown){var j=k.pageX;var i=k.pageY;if(c){var m=h.getTouches(k);var o=m[0];if(o!=undefined){j=o.pageX;i=o.pageY}}f={left:j,top:i};if(!h.columndragstarted&&h.reordercolumn==null){var l=Math.abs(f.left-h.dragmousedown.left);var n=Math.abs(f.top-h.dragmousedown.top);if(l>3||n>3){h._createreordercolumn(g,f,true);b(document.body).addClass("jqx-disableselect");b.data(h.reordercolumn[0],"reorderrecord",d.datafield)}}}})},getTouches:function(c){return b.jqx.mobile.getTouches(c)},_handlecolumnsResize:function(){var i=this;if(this.columnsResize){var k=false;if(i.isTouchDevice()){k=true}var g="mousemove.resize"+this.element.id;var d="mousedown.resize"+this.element.id;var e="mouseup.resize"+this.element.id;if(k){var g=b.jqx.mobile.getTouchEventName("touchmove")+".resize"+this.element.id;var d=b.jqx.mobile.getTouchEventName("touchstart")+".resize"+this.element.id;var e=b.jqx.mobile.getTouchEventName("touchend")+".resize"+this.element.id}this.removeHandler(b(document),g);this.addHandler(b(document),g,function(n){if(i.resizablecolumn!=null&&!i.disabled&&i.resizing){if(i.resizeline!=null){var s=i.resizablecolumn.columnelement;var p=i.host.coord();var v=parseInt(i.resizestartline.coord().left);var l=v-i._startcolumnwidth;var w=i.resizablecolumn.column.minwidth;if(w=="auto"){w=0}else{w=parseInt(w)}var m=i.resizablecolumn.column.maxwidth;if(m=="auto"){m=0}else{m=parseInt(m)}var q=n.pageX;if(k){var t=b.jqx.mobile.getTouches(n);var r=t[0];q=r.pageX}l+=w;var u=m>0?v+m:0;var o=m==0?true:i._startcolumnwidth+q-v=p.left&&q>=l){if(u!=0&&n.pageX=p.left&&q<=p.left+i.host.width()){i.resizeline.css("left",q);if(k){return false}}}}}}if(!k&&i.resizablecolumn!=null){return false}});this.removeHandler(b(document),d);this.addHandler(b(document),d,function(m){if(i.resizablecolumn!=null&&!i.disabled){var l=i.resizablecolumn.columnelement;if(l.coord().top+l.height()+5m.pageY){i.resizablecolumn=null;return}i._startcolumnwidth=i.resizablecolumn.column.width;i.resizablecolumn.column._width=null;b(document.body).addClass("jqx-disableselect");b(document.body).addClass("jqx-position-reset");i._mouseDownResize=new Date();i.resizing=true;i._resizecolumn=i.resizablecolumn.column;i.resizeline=i.resizeline||b('
    ');i.resizestartline=i.resizestartline||b('
    ');i.resizebackground=i.resizebackground||b('
    ');i.resizebackground.css("opacity",0.01);i.resizebackground.css("cursor","col-resize");i.resizeline.css("cursor","col-resize");i.resizestartline.css("cursor","col-resize");i.resizeline.addClass(i.toThemeProperty("jqx-grid-column-resizeline"));i.resizestartline.addClass(i.toThemeProperty("jqx-grid-column-resizestartline"));b(document.body).append(i.resizeline);b(document.body).append(i.resizestartline);b(document.body).append(i.resizebackground);var n=i.resizablecolumn.columnelement.coord();i.resizebackground.css("left",i.host.coord().left);i.resizebackground.css("top",i.host.coord().top);i.resizebackground.width(i.host.width());i.resizebackground.height(i.host.height());i.resizebackground.css("z-index",999999999);var o=function(q){if(!i.rtl){q.css("left",parseInt(n.left)+i._startcolumnwidth)}else{q.css("left",parseInt(n.left))}var s=0;var t=i.showtoolbar?i.toolbarHeight:0;s+=t;var v=i.showstatusbar?i.statusBarHeight:0;s+=v;var r=i.showAggregates?i.aggregatesHeight:0;s+=r;if(i.pageable&&i.pagerPosition!="bottom"){s+=i.pagerHeight}if(i.filterable){s+=i.filter.height()}var p=0;if(i.pageable&&i.pagerPosition!="top"){p=i.pagerHeight}var u=i.hScrollBar.css("visibility")!="hidden"?i.scrollBarSize:0;q.css("top",parseInt(n.top));q.css("z-index",9999999999);if(i.columnGroups){q.height(i.host.height()+i.resizablecolumn.columnelement.height()-p-s-u-i.columnGroupslevel*i.columnsHeight)}else{q.height(i.host.height()-p-s-u)}q.show("fast")};o(i.resizeline);o(i.resizestartline);i.dragmousedown=null}});var f=function(){b(document.body).removeClass("jqx-disableselect");b(document.body).removeClass("jqx-position-reset");if(!i.resizing){return}i._mouseUpResize=new Date();var t=i._mouseUpResize-i._mouseDownResize;if(t<200){i.resizing=false;if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){i._resizecolumn=null;i.resizeline.hide();i.resizestartline.hide();i.resizebackground.remove()}return}i.resizing=false;if(i.disabled){return}var n=i.host.width();if(i.vScrollBar[0].style.visibility!="hidden"){n-=20}if(n<0){n=0}if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){var u=parseInt(i.resizeline.css("left"));var o=parseInt(i.resizestartline.css("left"));var s=i._startcolumnwidth+u-o;if(i.rtl){var s=i._startcolumnwidth-u+o}var r=i._resizecolumn.width;i._resizecolumn.width=s;if(i._resizecolumn._percentagewidth!=undefined){i._resizecolumn._percentagewidth=(s/n)*100}for(var q=0;q0){k-=parseInt(this.scrollBarSize)+6;c=k}var j="";if(this.columns==undefined||this.columns.records==undefined){return}var i=this;var h=false;b.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=i.vScrollBar[0].style.visibility=="hidden"?0:i.scrollBarSize+5;if(i.scrollBarSize==0){n=0}m=parseFloat(this.width)*c/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(c)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}k-=Math.round(m)}else{if(this.width!="auto"&&!this._width){k-=this.width}else{j+=this.text}}}});var f=this.columnsheader.find("#columntable"+this.element.id);if(f.length==0){return}var d=0;var g=f.find(".jqx-grid-column-header");var e=0;b.each(this.columns.records,function(n,q){var m=b(g[n]);var t=false;var s=this.width;var o=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){s=parseFloat(this._percentagewidth)*c/100}else{s=parseFloat(this.width)*c/100}s=Math.round(s);t=true}if(this.width!="auto"&&!this._width&&!t){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(t){if(sthis.maxwidth&&this.maxwidth!="auto"){s=this.maxwidth;this.width=s}if(parseInt(m[0].style.width)!=s){m.width(s);this.width=s}}else{var l=Math.floor(k*(this.text.length/j.length));if(isNaN(l)){l=this.minwidth}var p=(k*(this.text.length/j.length))-l;d+=p;if(d>=1){d-=1;l++}if(d>=0.5&&n==i.columns.records.length-1){l++}if(l<0){var r=b(""+this.text+"");b(document.body).append(r);l=10+r.width();r.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=l;m.width(this.width)}}if(parseInt(m[0].style.left)!=e){m.css("left",e)}if(!(this.hidden)){e+=this.width}this._requirewidthupdate=true;if(o!==this.width){h=true}});this.columnsheader.width(2+e);f.width(this.columnsheader.width());this._resizecolumnGroups();if(h){this._renderrows()}if(this.showAggregates){this._refreshcolumnsaggregates()}},_rendercolumnheaders:function(){var r=this;if(this._updating){return}if(r.columns.records.length>r.headerZIndex){r.headerZIndex=r.columns.records.length+10}this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var g=b('
    ');g[0].cells=new Array();var l=0;var h=0;var s="";var u=this.host.width();var f=u;var w=new Array();var t=new Array();b.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){u-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*f/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}u-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}u-=this.width}}}}else{s+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(r._haspinned){this.pinned=true}w[w.length]=this}else{t[t.length]=this}});if(!this.rtl){for(var o=0;o=this.columns.records.length-w.length;o--){this.columns.replace(o,w[e++])}for(var m=0;m
    ');if(r.rtl&&K===0){x[0].style.borderLeftColor="transparent"}if(r.columnGroups){x[0].style.height=n+"px";x[0].style.bottom="0px";if(this.pinned){x[0].style.zIndex=L}}this.uielement=x;this.element=x;if(this.classname!=""&&this.classname){x.addClass(this.classname)}var C=this.width;var D=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){C=parseFloat(this._percentagewidth)*f/100}else{C=parseFloat(this.width)*f/100}C=Math.round(C);D=true}if(this.width!="auto"&&!this._width&&!D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}x[0].style.width=parseInt(C)+"px"}else{if(D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}x.width(C);this.width=C}else{var H=Math.floor(u*(this.text.length/s.length));var E=(u*(this.text.length/s.length))-H;c+=E;if(c>=1){c-=1;H++}if(c>=0.5&&K==r.columns.records.length-1){H++}if(isNaN(H)){H=this.minwidth}if(H<0){var F=b(""+this.text+"");b(document.body).append(F);H=10+F.width();F.remove()}if(Hthis.maxwidth){H=this.maxwidth}this._width="auto";this.width=parseInt(H);C=this.width;x.width(this.width)}}if(this.hidden){x.css("display","none")}var k=b(x.children()[0]);g[0].cells[K]=x[0];var p=false;var J=false;var z=this.renderer!=null?this.renderer(this.text,this.align,n):r._rendercolumnheader(this.text,this.align,n,r);if(z==null){z=r._rendercolumnheader(this.text,this.align,n,r)}if(this.renderer!=null){z=b(z)}p=true;if(r.WinJS){MSApp.execUnsafeLocalFunction(function(){k.append(b(z))})}else{if(this.renderer){k.append(b(z))}else{if(z){k[0].innerHTML=z}}}if(z!=null){var B=b('
    ');k.append(B);var O=B.children();this.sortasc=O[1];this.sortdesc=O[2];this.filtericon=O[0];this.iconscontainer=B;if(r.rtl){B.css("margin-left","0px");B.css("left","0px");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}}g.append(x);if(r.columnsReorder&&this.draggable&&r._handlecolumnsdragreorder){r._handlecolumnsdragreorder(this,x)}var M=this;r.addHandler(x,"click",function(i){if(M.checkboxcolumn){return true}if(r._togglesort){if(!r._loading){r._togglesort(M)}}i.preventDefault()});if(r.columnsResize&&!J){var y=false;var j="mousemove";if(r.isTouchDevice()){y=true;j=b.jqx.mobile.getTouchEventName("touchstart")}r.addHandler(x,j,function(P){if(!M.resizable){r.resizablecolumn=null;return true}var i=parseInt(P.pageX);var R=5;var U=parseInt(x.coord().left);if(r.hasTransform){U=b.jqx.utilities.getOffset(x).left}if(r._handlecolumnsResize){if(y){var Q=b.jqx.mobile.getTouches(P);var T=Q[0];i=T.pageX;R=40;if(i>=U+M.width-R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize")}else{x.css("cursor","");r.resizablecolumn=null}return true}var S=M.width;if(r.rtl){S=0}if(i>=U+S-R){if(i<=U+S+R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize");return false}else{x.css("cursor","");r.resizablecolumn=null}}else{x.css("cursor","");if(i0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}this.columnsrow=g;r.columnsheader.append(g);g.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsReorder){this._handlecolumnsReorder()}if(this._handlecolumnsResize){this._handlecolumnsResize()}if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var o=0;for(var l=0;l');var k=b(this._rendercolumnheader(q.text,q.align,this.columnsHeight,this));f.append(k);f[0].style.left=d+"px";if(d===0){f[0].style.borderLeftColor="transparent"}f[0].style.top=p+"px";f[0].style.height=r+"px";f[0].style.width=-1+q.width+"px";e.append(f);q.element=f}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var d=0;d0){d.removeHandler(c,"mouseenter");d.removeHandler(c,"mouseleave");var e=b(f.filtericon);d.removeHandler(e,"mousedown");d.removeHandler(e,"click");d.removeHandler(c,"click")}},_calculateaggregate:function(k,o,d,h){if(!k.datafield){return null}var e=k.aggregates;if(!e){e=o}if(e){var f=new Array();for(var n=0;n0){r(u[t].records)}}};r(h);h=q}if(this.treeGrid&&this.filterable&&this.dataview.filters.length>0){var p=new Array();for(var n=0;n=g){if(m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e,formatStrings:f}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}}return m}else{var m=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,h,c);if(this.treeGrid&&m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var g=this.source._source.hierarchy&&this.source._source.hierarchy.groupingDataFields?this.source._source.hierarchy.groupingDataFields.length:0;if(g==0||c>=g){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}return m}}}return null},getcolumnaggregateddata:function(d,h,i,e){var f=this.getColumn(d);if(!f){return""}var k=(i==undefined||i==false)?false:i;if(h==null){return""}var c=f.aggregates;f.aggregates=null;var j=this._calculateaggregate(f,h,k,e);var g={};if(j){g=j[d];f.aggregates=c}return g},_updatecolumnaggregates:function(e,h,c){var f=this;if(!h){c.children().remove();c.html("");if(e.aggregatesRenderer){var g={};if(e.aggregates){g=this.getcolumnaggregateddata(e.datafield,e.aggregates)}var d=e.aggregatesRenderer({},e,c,null);c.html(d)}return}c.children().remove();c.html("");if(e.aggregatesRenderer){if(h){var d=e.aggregatesRenderer(h[e.datafield],e,c,this.getcolumnaggregateddata(e.datafield,e.aggregates),"aggregates");c.html(d)}}else{b.each(h,function(){var j=this;for(g in j){var k=b('
    ');var i=g;i=f._getaggregatename(i);k.html(i+":"+j[g]);if(f.rtl){k.addClass(f.toThemeProperty("jqx-rtl"))}c.append(k)}})}},_getaggregatetype:function(d){switch(d){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return d}var c=d;for(var e in d){c=e;break}return c},_getaggregatename:function(d){var c=d;switch(d){case"min":c="Min";break;case"max":c="Max";break;case"count":c="Count";break;case"avg":c="Avg";break;case"product":c="Product";break;case"var":c="Var";break;case"stdevp":c="StDevP";break;case"stdev":c="StDev";break;case"varp":c="VarP";case"sum":c="Sum";break}if(d===c&&typeof(c)!="string"){for(var e in d){c=e;break}}return c},_updatecolumnsaggregates:function(){var g=this.getRows();if(this.dataViewRecords){g=this.dataViewRecords}var c=this.columns.records.length;if(undefined!=this.aggregates[0].cells){for(var f=0;f');var f=0;var m=this.columns.records.length;var l=this.toThemeProperty("jqx-grid-cell");if(this.rtl){l+=" "+this.toThemeProperty("jqx-grid-cell-rtl");f=0;c.css("border-left-width","0px");this.aggregates.css("border-left-color","transparent")}l+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var n=m+10;var o=new Array();this.aggregates[0].cells=o;for(var h=0;hg.maxwidth){d=g.maxwidth}var e=l;if(g.cellsalign){e+=" "+this.toThemeProperty("jqx-"+g.cellsalign+"-align")}var k=b('
    ');c.append(k);k.css("left",f);if(!this.rtl){k.css("z-index",n--)}else{k.css("z-index",n++);if(h==0){k.css("border-left-width","0px")}}k.width(d);k[0].style.left=f+"px";if(!(g.hidden&&g.hideable)){f+=d}else{k.css("display","none")}o[o.length]=k[0];this._updatecolumnaggregates(g,i,k)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){c.css("z-index",n--)}c.width(parseInt(f)+2);c.height(this.aggregatesHeight);this.aggregates.children().remove();this.aggregates.append(c);this.aggregates.removeClass(this.toThemeProperty("jqx-widget-header"));this.aggregates.addClass(l);this.aggregates.css("border-bottom-color","transparent");this.aggregates.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}},destroy:function(){var h=this;if(h.columns&&h.columns.records){for(var f=0;f0){j.jqxDropDownList("destroy")}}}if(h.filtercolumnsList){h.filtercolumnsList.jqxDropDownList("destroy")}}if(h.pageable){if(h.pagershowrowscombotop&&h.pagershowrowscombotop.jqxDropDownList){h.pagershowrowscombotop.jqxDropDownList("destroy")}if(h.pagershowrowscombobottom&&h.pagershowrowscombobottom.jqxDropDownList){h.pagershowrowscombobottom.jqxDropDownList("destroy")}var l=h.pagerbuttonsbottom.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();var l=h.pagerbuttonstop.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();if(h.pagernexttop){h.pagernexttop.jqxButton("destroy");h.pagerprevioustop.jqxButton("destroy");h.pagernextbottom.jqxButton("destroy");h.pagerpreviousbottom.jqxButton("destroy");h.pagerfirsttop.jqxButton("destroy");h.pagerfirstbottom.jqxButton("destroy");h.pagerlasttop.jqxButton("destroy");h.pagerlastbottom.jqxButton("destroy")}}h._removeHandlers();h.vScrollBar.jqxScrollBar("destroy");h.hScrollBar.jqxScrollBar("destroy");delete h.vScrollBar;delete h.hScrollBar;delete h._mousewheelfunc;b.jqx.utilities.resize(h.host,null,true);h.host.remove()},propertiesChangedHandler:function(c,d,e){if(e.width&&e.height&&Object.keys(e).length==2){c.refresh()}},propertyChangedHandler:function(e,l,d,k){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(k!==d){if(l=="filterable"){e._render()}else{if(l==="height"){e.host.height(e.height);e.host.width(e.width);e._updatesize(false,true)}else{if(l==="width"){e.host.height(e.height);e.host.width(e.width);e._updatesize(true,false)}else{if(l==="source"){e.updateBoundData()}else{if(l==="columnGroups"){e._render()}else{if(l==="columns"){e._columns=null;e._render()}else{if(l==="rtl"){e.content.css("left","");e.columns=e._columns;e.vScrollBar.jqxScrollBar({rtl:k});e.hScrollBar.jqxScrollBar({rtl:k});e._render()}else{if(l==="pagerMode"){e.pagerMode=k;e._initpager()}else{if(l=="pageSizeOptions"){e._initpager();var j=false;for(var f=0;f0){c.jqxDropDownList({theme:e.theme})}if(e.filtercolumnsList){e.filtercolumnsList.jqxDropDownList({theme:e.theme})}}e.refresh()}else{e.refresh()}}}}}}}}}}}}}}}}}}},_rendercolumnheader:function(f,g,c,d){var e="4px";if(d.columnGroups){e=(c/2-this._columnheight/2);if(e<0){e=4}e+="px"}else{if(this.columnsHeight!=25){e=(this.columnsHeight/2-this._columnheight/2);if(e<0){e=4}e+="px"}}return'
    '+f+"
    "}});function a(c,d){this.owner=c;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.aggregates=null;this.aggregatesRenderer=null;this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(e,f){if(this[e]){var g=this[e];this[e]=f;this.owner._columnPropertyChanged(this,e,f,g)}else{if(this[e.toLowerCase()]){var g=this[e.toLowerCase()];this[e.toLowerCase()]=f;this.owner._columnPropertyChanged(this,e.toLowerCase(),f,g)}}};this._initfields=function(f){if(f!=null){var e=this;if(b.jqx.hasProperty(f,"dataField")){this.datafield=b.jqx.get(f,"dataField")}if(b.jqx.hasProperty(f,"displayField")){this.displayfield=b.jqx.get(f,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"validation")){this.validation=b.jqx.get(f,"validation")}if(b.jqx.hasProperty(f,"autoCellHeight")){this.autoCellHeight=b.jqx.get(f,"autoCellHeight")}if(b.jqx.hasProperty(f,"text")){this.text=b.jqx.get(f,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(f,"sortable")){this.sortable=b.jqx.get(f,"sortable")}if(b.jqx.hasProperty(f,"hidden")){this.hidden=b.jqx.get(f,"hidden")}if(b.jqx.hasProperty(f,"groupable")){this.groupable=b.jqx.get(f,"groupable")}if(b.jqx.hasProperty(f,"renderer")){this.renderer=b.jqx.get(f,"renderer")}if(b.jqx.hasProperty(f,"align")){this.align=b.jqx.get(f,"align")}if(b.jqx.hasProperty(f,"cellsAlign")){this.cellsalign=b.jqx.get(f,"cellsAlign")}if(b.jqx.hasProperty(f,"cellsFormat")){this.cellsFormat=b.jqx.get(f,"cellsFormat")}if(b.jqx.hasProperty(f,"width")){this.width=b.jqx.get(f,"width")}if(b.jqx.hasProperty(f,"minWidth")){this.minwidth=b.jqx.get(f,"minWidth")}if(b.jqx.hasProperty(f,"maxWidth")){this.maxwidth=b.jqx.get(f,"maxWidth")}if(b.jqx.hasProperty(f,"cellsRenderer")){this.cellsRenderer=b.jqx.get(f,"cellsRenderer")}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"pinned")){this.pinned=b.jqx.get(f,"pinned")}if(b.jqx.hasProperty(f,"filterable")){this.filterable=b.jqx.get(f,"filterable")}if(b.jqx.hasProperty(f,"filter")){this.filter=b.jqx.get(f,"filter")}if(b.jqx.hasProperty(f,"resizable")){this.resizable=b.jqx.get(f,"resizable")}if(b.jqx.hasProperty(f,"draggable")){this.draggable=b.jqx.get(f,"draggable")}if(b.jqx.hasProperty(f,"editable")){this.editable=b.jqx.get(f,"editable")}if(b.jqx.hasProperty(f,"initEditor")){this.initeditor=b.jqx.get(f,"initEditor")}if(b.jqx.hasProperty(f,"createEditor")){this.createeditor=b.jqx.get(f,"createEditor")}if(b.jqx.hasProperty(f,"destroyEditor")){this.destroyeditor=b.jqx.get(f,"destroyEditor")}if(b.jqx.hasProperty(f,"getEditorValue")){this.geteditorvalue=b.jqx.get(f,"getEditorValue")}if(b.jqx.hasProperty(f,"className")){this.classname=b.jqx.get(f,"className")}if(b.jqx.hasProperty(f,"cellClassName")){this.cellclassname=b.jqx.get(f,"cellClassName")}if(b.jqx.hasProperty(f,"aggregates")){this.aggregates=b.jqx.get(f,"aggregates")}if(b.jqx.hasProperty(f,"aggregatesRenderer")){this.aggregatesRenderer=b.jqx.get(f,"aggregatesRenderer")}if(b.jqx.hasProperty(f,"rendered")){this.rendered=b.jqx.get(f,"rendered")}if(b.jqx.hasProperty(f,"exportable")){this.exportable=b.jqx.get(f,"exportable")}if(b.jqx.hasProperty(f,"nullable")){this.nullable=b.jqx.get(f,"nullable")}if(b.jqx.hasProperty(f,"columnGroup")){this.columngroup=b.jqx.get(f,"columnGroup")}if(!f instanceof String&&!(typeof f=="string")){for(var g in f){if(!e.hasOwnProperty(g)){if(!e.hasOwnProperty(g.toLowerCase())){c.host.remove();throw new Error("jqxDataTable: Invalid property name - "+g+".")}}}}}};this._initfields(d);return this}b.jqx.dataCollection=function(c){this.records=new Array();this.owner=c;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(e,d){this.records[e]=d};this.isempty=function(d){if(this.records[d]==undefined){return true}return false};this.initialize=function(d){if(d<1){d=1}this.records[d-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(d){return this.records.indexOf(d)};this.add=function(d){if(d==null){return false}this.records[this.records.length]=d;return true};this.insertAt=function(e,d){if(e==null||e==undefined){return false}if(d==null){return false}if(e>=0){if(e0){for(var s=0;sc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(b.jqx.dataFormat.isNumber(d)&&b.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(b.jqx.dataFormat.isDate(d)&&b.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(d)&&!b.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(p){if(this.grid.serverProcessing){if(p){if(this.grid.source._source.id==""||this.grid.source._source.id==null){if(this.grid.pageable){var c=this.grid.pageSize*this.pagenum;this.grid.rowsByKey=new Array();var h=this;b.each(p,function(i){this.uid=c;h.grid.rowsByKey[this.uid]=this;c++})}}}return p}var d=new Array();if(this.filters.length){var j=new Array();var o=function(s,w){for(var u=0;u0)){var n=new Array();var k=function(r,s){for(var q=0;q0){k(t,t.records)}}};k(null,p);o.call(this,n,d);for(var e=0;e0)){var h=this;var l=new Array();this._sortData=null;var f=function(t,q){h._sortData=null;var r=null;if(h.source.hierarchy.groupingDataFields){if(q&&q.length>0&&q[0].level0){return b(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=b(d).attr(j);if(c!=null&&c.toString().length>0){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.grid.rowsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.grid.rowsByKey["jqx"+f];if(!g){var g=this.grid.rowsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); -(function(a){a.jqx.jqxWidget("jqxDateTimeInput","",{});a.extend(a.jqx._jqxDateTimeInput.prototype,{defineInstance:function(){var b={value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),rowHeaderWidth:25,enableViews:true,views:["month","year","decade"],selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],change:null,changing:null,titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],template:"default",columnHeaderHeight:20,titleHeight:30,firstDayOfWeek:0,showWeekNumbers:false,showTimeButton:false,cookies:false,cookieoptions:null,showFooter:false,formatString:"dd/MM/yyyy",width:200,height:25,dayNameFormat:"firstTwoLetters",textAlign:"left",readonly:false,culture:"default",activeEditor:null,showCalendarButton:true,openDelay:250,closeDelay:300,closeCalendarAfterSelection:true,isEditing:false,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",dropDownVerticalAlignment:"bottom",enableAbsoluteSelection:false,disabled:false,buttonSize:21,animationType:"slide",dropDownWidth:"200px",restrictedDates:new Array(),dropDownHeight:"205px",dropDownContainer:"default",selectionMode:"default",renderMode:"full",rtl:false,timeRange:null,_editor:false,todayString:"Today",clearString:"Clear",popupZIndex:2000,allowNullDate:true,changeType:null,placeHolder:"",enableHover:true,hint:true,allowKeyboardDelete:true,localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","open","close","change"],aria:{"aria-valuenow":{name:"getDate",type:"date"},"aria-valuetext":{name:"getText",type:"string"},"aria-valuemin":{name:"min",type:"date"},"aria-valuemax":{name:"max",type:"date"},"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxDateTimeInput.prototype){return b}a.extend(true,this,b);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(1);this.minDate._setMinutes(1);this.minDate._setSeconds(1);this.minDate._setMilliseconds(1);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(1);this.maxDate._setMinutes(1);this.maxDate._setSeconds(1);this.maxDate._setMilliseconds(1);this.defaultMinDate=this.minDate;this.defaultMaxDate=this.maxDate;return b},createInstance:function(d){var l="";var k=this;if(!k.host.jqxCalendar){throw new Error("jqxDateTimeInput: Missing reference to jqxcalendar.js.")}if(k.formatString!="dd/MM/yyyy"){var g=k.formatString.split(" ");if(g&&g.length>1){var c="";for(var q=0;q",j);f[0].style.cssText=k.field.style.cssText;if(!k.width){k.width=a(k.field).width()}if(!k.height){k.height=a(k.field).outerHeight()}a(k.field).hide().after(f);var u=k.host.data();k.host=f;k.host.data(u);k.element=f[0];k.element.id=k.field.id;k.field.id=j.id;if(k._className){k.host.addClass(k._className);a(k.field).removeClass(k._className)}if(k.field.tabIndex){var e=k.field.tabIndex;k.field.tabIndex=-1;k.element.tabIndex=e}}if(k.host.attr("value")){l=true;var v=k.host.attr("value");if(k.selectionMode!="range"){var r=new Date(v);if(r!=undefined&&!isNaN(r)){k.value=a.jqx._jqxDateTimeInput.getDateTime(r)}}}if(k.value!=null&&k.value instanceof Date){k.value=a.jqx._jqxDateTimeInput.getDateTime(k.value)}else{if(k.value!=null&&typeof(k.value)=="string"){var r=new Date(k.value);if(r!=undefined&&!isNaN(r)){k.value=a.jqx._jqxDateTimeInput.getDateTime(r)}else{if(k.value.indexOf(",")>=0){k.value=k.value.replace(/\,/g,"/");var r=new Date(k.value);if(r!=undefined&&!isNaN(r)){k.value=a.jqx._jqxDateTimeInput.getDateTime(r)}}}}}this._initTimeRange();this._validateTimeRange();k.host.attr("data-role","input");k.render();a.jqx.aria(this);if(k.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+k.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}if(k.minDate!==k.defaultMinDate){k.min=k.minDate}if(k.maxDate!==k.defaultMaxDate){k.max=k.maxDate}k.setMaxDate(k.max,false);k.setMinDate(k.min,false);if(k.selectionMode!=="range"&&k.value&&k.value.dateTime&&k.min&&k.max&&(k.value.dateTimek.max)){if(k.value.dateTimek.max){k.value.dateTime=k.max}k._updateText()}if(k.selectionMode=="range"){if(l){var v=k.host.attr("value");var t=v.substring(0,v.indexOf("-"));var s=v.substring(v.indexOf("-")+1);var o=new Date(t);var b=new Date(s);if(o!=undefined&&!isNaN(o)){if(b!=undefined&&!isNaN(b)){k.setRange(o,b)}}}else{if(k.getDate()!=null){k.setRange(k.getDate(),k.getDate())}}}},_validateTimeRange:function(){if(this.timeRange){var b=this.value.dateTime.getHours();var c=this.value.dateTime.getMinutes();if(b<=this.timeRange.minHour){this.value._setHours(this.timeRange.minHour);if(c=this.timeRange.maxHour){this.value._setHours(this.timeRange.maxHour);if(c>this.timeRange.maxMinute){this.value._setMinutes(this.timeRange.maxMinute);this._updateEditorsValue()}else{this._updateEditorsValue()}}}},_initTimeRange:function(){if(this.timeRange){if(this.timeRange.min){var c=null;if(this.timeRange.min.indexOf("AM")>=0||this.timeRange.min.indexOf("PM")>=0){c=this.timeRange.min.indexOf("AM")>=0?"AM":"PM"}var d=this.timeRange.min.split(":");var b=parseInt(d[0]);var f=parseInt(d[1]);if(c){this.timeRange.minDefaultHour=b;this.timeRange.minMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.minHour=b;this.timeRange.minMinute=f}if(this.timeRange.max){var c=null;if(this.timeRange.max.indexOf("AM")>=0||this.timeRange.max.indexOf("PM")>=0){c=this.timeRange.max.indexOf("AM")>=0?"AM":"PM"}var e=this.timeRange.max.split(":");var b=parseInt(e[0]);var f=parseInt(e[1]);if(c){this.timeRange.maxDefaultHour=b;this.timeRange.maxMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.maxHour=b;this.timeRange.maxMinute=f}}},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}if(document.Globalize){window.Globalize=document.Globalize;f=true}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){return a.global.format(d,e,this.culture)}else{if(f){try{var e=window.Globalize.format(d,e,this.culture);return e}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){if(d instanceof Date){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}else{if(typeof d==="number"){return a.jqx.dataFormat.formatnumber(d,e,this.localization.calendar)}else{return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}else{throw new Error("jqxDateTimeInput: Missing reference to globalize.js.")}}}},render:function(){var k=this;k._removeHandlers();k.element.innerHTML="";k.host.attr({role:"textbox"});k.id=a.jqx.utilities.createId();var f=a.jqx.utilities.createId();var j=a.jqx.utilities.createId();k._setSize();if(k.width==null){k.width=k.host.width();k.host.width(k.width)}k.touch=a.jqx.mobile.isTouchDevice();var c=a("
    ").appendTo(k.host);k.dateTimeInput=a("").appendTo(c);k.dateTimeInput.addClass(k.toThemeProperty("jqx-reset"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-clear"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-widget-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-rc-all"));if(!k.isMaterialized()){k.dateTimeInput.attr("placeHolder",k.placeHolder)}if(k.renderMode!="full"){k.dateTimeInput.remove()}var d=k.host.attr("name");if(d){k.dateTimeInput.attr("name",d)}if(k.host.attr("tabindex")){k.dateTimeInput.attr("tabindex",k.host.attr("tabindex"));k.host.removeAttr("tabindex")}if(k.rtl){k.dateTimeInput.css("direction","rtl");k.dateTimeInput.addClass("jqx-rtl")}k.calendarButton=a("
    ").appendTo(c);if(!k.rtl){k.calendarButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.calendarButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.calendarButtonIcon=a(k.calendarButton.children()[0]);k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon-calendar"));k.calendarButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){if(!k.showTimeButton){k.calendarButton.addClass(k.toThemeProperty("jqx-rc-r"))}}else{k.calendarButton.addClass(k.toThemeProperty("jqx-rc-l"))}k.timeButton=a("
    ").appendTo(c);if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.timeButtonIcon=a(k.timeButton.children()[0]);k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon-time"));k.timeButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-rc-r"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-rc-l"))}var m=this;k._arrange();if(a.jqx._jqxCalendar!=null&&a.jqx._jqxCalendar!=undefined){try{var i="calendar"+k.id;var h=a(a.find("#"+i));if(h.length>0){h.remove()}a.jqx.aria(this,"aria-owns",i);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-readonly",k.selectionMode=="range"?true:false);var b=a("
    ");if(a.jqx.utilities.getBrowser().browser=="opera"){b.hide()}if(k.dropDownContainer=="element"){b.appendTo(k.host)}else{b.appendTo(document.body)}k.container=b;k.calendarContainer=a(a.find("#innerCalendar"+k.id)).jqxCalendar({titleFormat:this.titleFormat,restrictedDates:this.restrictedDates,changing:k.changing,change:k.change,enableViews:k.enableViews,selectableDays:k.selectableDays,views:k.views,rowHeaderWidth:k.rowHeaderWidth,titleHeight:k.titleHeight,columnHeaderHeight:k.columnHeaderHeight,_checkForHiddenParent:false,enableAutoNavigation:false,canRender:false,localization:k.localization,todayString:k.todayString,clearString:k.clearString,dayNameFormat:k.dayNameFormat,rtl:k.rtl,culture:k.culture,showFooter:k.showFooter,selectionMode:k.selectionMode,firstDayOfWeek:k.firstDayOfWeek,showWeekNumbers:k.showWeekNumbers,width:k.dropDownWidth,height:k.dropDownHeight,theme:k.theme});if(k.dropDownContainer=="element"){k.calendarContainer.css({position:"absolute",top:0,left:0})}else{k.calendarContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0})}k.calendarContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.calendarContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k.timeContainer=a(a.find("#innerTime"+k.id));k.timeContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0});k.timeContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.timeContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k._calendar=a.data(k.calendarContainer[0],"jqxCalendar").instance;var m=this;k._calendar.today=function(){m.today()};k._calendar.clear=function(){m.clear()};if(a.jqx.utilities.getBrowser().browser=="opera"){b.show()}b.height(parseInt(k.calendarContainer.height())+25);b.width(parseInt(k.calendarContainer.width())+25);if(k.selectionMode=="range"){k.readonly=true}if(k.animationType=="none"){k.container.css("display","none")}else{k.container.hide()}}catch(l){}}if(a.global){a.global.preferCulture(k.culture)}k.selectedText="";k._addHandlers();k.self=this;k.oldValue=k.getDate();k.items=new Array();k.editors=new Array();k._loadItems();k.editorText="";if(k.readonly==true){k.dateTimeInput.css("readonly",k.readonly)}k.dateTimeInput.css("text-align",k.textAlign);k.host.addClass(k.toThemeProperty("jqx-widget"));k.host.addClass(k.toThemeProperty("jqx-datetimeinput"));k.host.addClass(k.toThemeProperty("jqx-input"));k.host.addClass(k.toThemeProperty("jqx-overflow-hidden"));k.host.addClass(k.toThemeProperty("jqx-rc-all"));k.host.addClass(k.toThemeProperty("jqx-reset"));k.host.addClass(k.toThemeProperty("jqx-clear"));k.host.addClass(k.toThemeProperty("jqx-widget-content"));k.propertyChangeMap.disabled=function(e,p,o,q){if(q){e.host.addClass(m.toThemeProperty("jqx-input-disabled"));e.host.addClass(m.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(m.toThemeProperty("jqx-fill-state-disabled"));e.host.removeClass(m.toThemeProperty("jqx-input-disabled"))}a.jqx.aria(e,"aria-disabled",q)};if(k.disabled){k.host.addClass(k.toThemeProperty("jqx-input-disabled"));k.host.addClass(k.toThemeProperty("jqx-fill-state-disabled"));k.dateTimeInput.attr("disabled",true)}if(k.host.parents("form").length>0){k.addHandler(k.host.parents("form"),"reset",function(){setTimeout(function(){m.setDate(new Date())},10)})}if(k.cookies){var g=a.jqx.cookie.cookie("jqxDateTimeInput"+k.element.id);if(g!=null){k.setDate(new Date(g))}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(k.host.parents(".jqx-window").length>0){var n=k.host.parents(".jqx-window").css("z-index");k.container.css("z-index",n+10);k.calendarContainer.css("z-index",n+10)}}if(k.culture!="default"){k._applyCulture()}if(k.value){if(k.calendarContainer.jqxCalendar("_isDisabled",k.value.dateTime)){k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-invalid"))}else{k.dateTimeInput.removeClass(k.toThemeProperty("jqx-input-invalid"))}}this._addBarAndLabel(this.dateTimeInput);this._updateHint(true);if(k.template){k.bar.addClass(k.toThemeProperty("jqx-"+k.template));k.label.addClass(k.toThemeProperty("jqx-"+k.template));k.timeButton.addClass(k.toThemeProperty("jqx-"+k.template));k.calendarButton.addClass(k.toThemeProperty("jqx-"+k.template))}this._setSize();this._arrange()},val:function(c){var b=this;if(arguments.length!=0){if(c==null){b.setDate(null)}if(b.selectionMode=="range"){b.setRange(arguments[0],arguments[1]);return b.getText()}if(c instanceof Date){b.setDate(c)}if(typeof(c)=="string"){if(c=="date"){return b.getDate()}b.setDate(c)}if(b._calendar.getDate()!=b.getDate()){b._calendar.setDate(b.getDate())}}return b.getText()},_setSize:function(){var b=window.getComputedStyle(this.element);var c=parseInt(b.borderLeftWidth)*2;var h=b.boxSizing;if(this.element.offsetWidth===0){c=2}if(h==="border-box"||isNaN(c)){c=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=parseInt(this.width)-c+"px"}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=parseInt(this.width)-c+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=parseInt(this.height)-c+"px"}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=parseInt(this.height)-c+"px"}}var g=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){g=true;this.host.width(this.width);if(c>0){this.host.css("box-sizing","border-box")}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){g=true;this.host.height(this.height)}var e=this;var f=function(){if(e.calendarContainer){e._arrange()}};if(g){if(this.calendarContainer){this._arrange();var d=this.host.width();if(this.dropDownWidth!="auto"){d=this.dropDownWidth}this.calendarContainer.jqxCalendar({width:d});this.container.width(parseInt(d)+25)}}a.jqx.utilities.resize(this.host,function(){f()})},_arrange:function(){if(this.height==null){this.height=27;this.host.height(27)}var e=parseInt(this.host.width());var m=parseInt(this.host.height());var i=window.getComputedStyle(this.element);var g=parseInt(i.borderLeftWidth)*2;var f=i.boxSizing;if(f==="border-box"||isNaN(g)){g=0}var k=this.buttonSize;var h=2;if(!this.showCalendarButton&&!this.showTimeButton){k=0;var l=0;this.calendarButton.hide();h=0}if(!this.showCalendarButton){this.calendarButton.hide()}else{this.calendarButton.show()}if(!this.showTimeButton){this.timeButton.hide()}else{this.timeButton.show()}var b=e-k-1*h;if(this.showTimeButton&&this.showCalendarButton){var b=e-2*k-1*h}else{if(this.showTimeButton||this.showCalendarButton){var b=e-k-1*h}}if(b>0){this.dateTimeInput[0].style.width=b+"px"}if(this.rtl){this.dateTimeInput[0].style.width=(-1+b+"px")}this.dateTimeInput[0].style.left="0px";this.dateTimeInput[0].style.top="0px";this.calendarButton[0].style.width=k+1+"px";this.calendarButton[0].style.left=1+b+"px";this.timeButton[0].style.width=k+1+"px";if(this.showCalendarButton){this.timeButton[0].style.left=1+this.calendarButton.width()+b+"px"}else{this.timeButton[0].style.left=1+b+"px"}if(this.renderMode!="full"){this.calendarButton[0].style.width="100%";this.calendarButton[0].style.left="0px";this.calendarButton.css("border","none");this.timeButton[0].style.width="100%";this.timeButton[0].style.left="0px";this.timeButton.css("border","none")}var d=this.dateTimeInput.height();if(d==0&&this.renderMode!="full"){d=parseInt(this.dateTimeInput.css("font-size"))+3;this.calendarButton.addClass(this.toThemeProperty("jqx-rc-all"));this.timeButton.addClass(this.toThemeProperty("jqx-rc-all"))}else{d=17}if(this.dateTimeInput[0].className.indexOf("jqx-rc-all")==-1){this.dateTimeInput.addClass(this.toThemeProperty("jqx-rc-all"))}var j=parseInt(m)/2-parseInt(d)/2;if(j>0){var n=this.dateTimeInput.css("font-size");if(""==n){n=13}var j=m-2-parseInt(n)-2;if(isNaN(j)){j=0}if(j<0){j=0}var c=j/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){c=j/4}this.dateTimeInput[0].style.paddingTop=Math.round(c)+"px";this.dateTimeInput[0].style.paddingBottom=Math.round(c)+"px"}if(this.rtl){this.calendarButton[0].style.width=k+"px";this.timeButton[0].style.width=k+"px";this.calendarButton.css("left","0px");if(this.showCalendarButton){this.timeButton.css("left",k+"px")}else{this.timeButton.css("left","0px")}this.dateTimeInput.css("left",this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",this.timeButton.width()+this.calendarButton.width())}if(a.jqx.browser.msie&&a.jqx.browser.version<=8){this.dateTimeInput.css("left",1+this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",1+this.timeButton.width()+this.calendarButton.width())}}}},_removeHandlers:function(){var b=this;this.removeHandler(a(document),"mousedown."+this.id);if(this.dateTimeInput){this.removeHandler(this.dateTimeInput,"keydown."+this.id);this.removeHandler(this.dateTimeInput,"blur");this.removeHandler(this.dateTimeInput,"focus");this.removeHandler(this.host,"focus");this.removeHandler(this.dateTimeInput,"mousedown");this.removeHandler(this.dateTimeInput,"mouseup");this.removeHandler(this.dateTimeInput,"keydown");this.removeHandler(this.dateTimeInput,"keyup");this.removeHandler(this.dateTimeInput,"keypress")}if(this.calendarButton!=null){this.removeHandler(this.calendarButton,"mousedown")}if(this.timeButton!=null){this.removeHandler(this.timeButton,"mousedown")}if(this.calendarContainer!=null){this.removeHandler(this.calendarContainer,"cellSelected");this.removeHandler(this.calendarContainer,"cellMouseDown")}this.removeHandler(a(window),"resize."+this.id)},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXCalendar"+this.id);if(b!=null&&b==c.calendarContainer){return true}return false},wheel:function(d,c){if(!c.isEditing){return}c.changeType="mouse";var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(!b){if(d.preventDefault){d.preventDefault()}d.returnValue=false;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return false},focus:function(){try{var c=this;c._firstFocusDate=c.getDate();this._setSelectionStart(0);this._selectGroup(-1);this.dateTimeInput.focus();setTimeout(function(){c._setSelectionStart(0);c._selectGroup(-1);c.dateTimeInput.focus()},25)}catch(b){}},_addHandlers:function(){var e=this.element.id;var c=this.element;var d=this;if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.datetimeinput"+this.element.id,function(f){var g=d.isOpened();if(g){d.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!d.disabled&&d.enableHover){var f=true;d.calendarButtonIcon.addClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.addClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.addClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mouseleave",function(){if(!d.disabled&&d.enableHover){d.calendarButtonIcon.removeClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.removeClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mousewheel",function(f){d.wheel(f,d)});this.addHandler(a(document),"mousedown."+this.id,this._closeOpenedCalendar,{me:this});if(a.jqx.mobile.isTouchDevice()){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,this._closeOpenedCalendar,{me:this})}this.addHandler(this.dateTimeInput,"keydown."+this.id,function(h){var g=a.data(document.body,"openedJQXCalendar"+d.id);if(g!=null&&g==d.calendarContainer){var f=d.handleCalendarKey(h,d);return f}});if(this.calendarContainer!=null){this.addHandler(this.calendarContainer,"keydown",function(f){if(f.keyCode==13){if(d.isOpened()){if(!d._calendar._viewAnimating&&d._calendar.view=="month"){d.hideCalendar("selected","keyboard");d.dateTimeInput.focus();return false}}return true}else{if(f.keyCode==9){if(d.isOpened()){d.hideCalendar("selected","keyboard");return true}}else{if(f.keyCode==27){if(d.isOpened()){d.hideCalendar(null,"keyboard");d.dateTimeInput.focus();return false}return true}}}d.timePopup=false;if(f.keyCode==84){d.timePopup=true}if(f.keyCode==115){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}else{if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}if(f.altKey){if(f.keyCode==38){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}else{if(f.keyCode==40){if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}}});this.addHandler(this.calendarContainer,"cellSelected",function(g){if(d.closeCalendarAfterSelection){var f=a.data(document.body,"openedJQXCalendarValue");if(g.args.selectionType=="mouse"){if(d.selectionMode!="range"){d.hideCalendar("selected","mouse")}else{if(d._calendar._clicks==0){d.hideCalendar("selected","mouse")}}}}});this.addHandler(this.calendarContainer,"cellMouseDown",function(f){if(d.closeCalendarAfterSelection){if(d._calendar.value){a.data(document.body,"openedJQXCalendarValue",new a.jqx._jqxDateTimeInput.getDateTime(d._calendar.value.dateTime))}}})}this.addHandler(this.dateTimeInput,"blur",function(h){d.bar.removeClass("focused");d.label.removeClass("focused");if(d.value!=null){d.isEditing=false;var g=d.value.dateTime.getDay();var f=d._oldDT;d._validateValue(true);if(h.stopPropagation){h.stopPropagation()}d._updateText();d._raiseEvent(9,h)}if(!d.isOpened()){d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this.host,"focus",function(f){d.focus()});this.addHandler(this.dateTimeInput,"focus",function(f){d._firstFocusDate=d.getDate();if(d.value!=null){if(d.selectionMode!="range"){d._oldDT=new Date(d.value.dateTime)}else{d._oldDT=d.getRange()}setTimeout(function(){var g=d._selection();d.isEditing=true;d._validateValue();d._updateText();d._setSelectionStart(0);d._selectGroup(-1,g);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))})}else{d._setSelectionStart(0);d._selectGroup(-1);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))}if(f.stopPropagation){f.stopPropagation()}d.bar.addClass("focused");d.label.addClass("focused");if(f.preventDefault){f.preventDefault();return false}});var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(this.calendarButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=false;d.calendarPopup=true;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar();return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.timeButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=true;d.calendarPopup=false;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar("mouse","mouse");return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.dateTimeInput,"mousedown",function(f){return d._raiseEvent(2,f)});this.addHandler(this.dateTimeInput,"mouseup",function(f){return d._raiseEvent(3,f)});this.addHandler(this.dateTimeInput,"keydown",function(f){return d._raiseEvent(4,f)});this.addHandler(this.dateTimeInput,"keyup",function(f){return d._raiseEvent(5,f)});this.addHandler(this.dateTimeInput,"keypress",function(f){return d._raiseEvent(6,f)})},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;return"dateTimeInput"+b},setMaxDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMaxDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()>b){this.setDate(b)}a.jqx.aria(this,"aria-valuemax",b);this._refreshValue();this._updateText()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMinDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()=0){d=d.replace(/\,/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}}if(d.toString().indexOf("-")>=0){d=d.replace(/\-/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}}if(d!=""){var c=d;if(window.Globalize!=undefined){d=window.Globalize.parseDate(c,this.formatString,this.culture)}else{if(a.jqx.dataFormat){d=a.jqx.dataFormat.parsedate(c,this.formatString,this.localization.calendar)}else{d=new Date(d)}}if(d===null&&c!==null){if(this._isValidDate(c)){d=c}}if(!this._isValidDate(d)){return}}}if(d==null||d=="null"||d=="undefined"){if(!this.allowNullDate){d=this.min}}if(!this._isValidDate(d)){d=null}if(d==null||d=="null"||d=="undefined"||d===""){if(this.value!=null){this.value=null;this._calendar.setDate(null);this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}this._setSelectionStart(0);this._selectGroup(-1);this._raiseEvent("0",d,e);this._raiseEvent("9",d,e)}return}if(dthis.getMaxDate()){return}if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}if(d.getFullYear){this.value._setYear(d.getFullYear());this.value._setDay(1);this.value._setMonth(d.getMonth()+1);this.value._setHours(d.getHours());this.value._setMinutes(d.getMinutes());this.value._setSeconds(d.getSeconds());this.value._setMilliseconds(d.getMilliseconds());this.value._setDay(d.getDate())}this._validateTimeRange();this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}var b=this.getDate();var g=(b-e);if(g!=0){this._raiseEvent("0",d,e);this._raiseEvent("9",d,e);return true}},getDate:function(){if(this.value==undefined){return null}return new Date(this.value.dateTime)},getText:function(){return this.dateTimeInput.val()},setRange:function(d,c){if(typeof(d)=="object"&&!this._isValidDate(d)){d=null}if(typeof(c)=="object"&&!this._isValidDate(c)){c=null}if(d!=null&&typeof(d)=="string"){d=new Date(d);if(!this._isValidDate(d)){return}}if(c!=null&&typeof(c)=="string"){c=new Date(c);if(!this._isValidDate(c)){return}}if(d&&isNaN(d)&&d.toString()=="NaN"&&typeof(d)!="string"){return}if(c&&isNaN(c)&&c.toString()=="NaN"&&typeof(c)!="string"){return}this._calendar.setRange(d,c);if(c&&d&&(c.valueOf()!=d.valueOf())){this._range={from:d,to:c}}else{this._range=this._calendar.getRange()}var b=d;if(b!=null&&b.getFullYear){if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}this.value._setYear(b.getFullYear());this.value._setMonth(b.getMonth()+1);this.value._setHours(b.getHours());this.value._setMinutes(b.getMinutes());this.value._setSeconds(b.getSeconds());this.value._setMilliseconds(b.getMilliseconds());this.value._setDay(b.getDate())}this._refreshValue();if(this.value){this._raiseEvent("0",this.value.dateTime)}else{this._raiseEvent("0",null)}},getRange:function(){var b=this._calendar.getRange();if(this._range){var d=this._range.from;var c=this._range.to;if(c&&d&&(c.valueOf()!=d.valueOf())){if(b.from){b.from.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds())}if(b.to){b.to.setHours(c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())}}}return b},_validateValue:function(e){var b=false;for(var d=0;d1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>999){c=999}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(this.editors[d].value!=c){this.editors[d].value=c;b=true}}this.updateValue(e);if(this.value!=null&&e===true){if(this.value.dateTime>this.maxDate.dateTime){this._internalSetValue(this.maxDate);this._updateEditorsValue()}else{if(this.value.dateTime=0){this._selectGroup(e)}},spinDown:function(){var d=this.value;if(d==null){return}if(this.activeEditor!=null){var b=this.editors.indexOf(this.activeEditor);if(b==-1){return}if(this.items[b].type=="Day"){if(this.value!=null){this.activeEditor.maxValue=this.value._daysInMonth(this.value.year,this.value.month)}}var c=this.activeEditor.positions;this.activeEditor.decreaseValue(this.enableAbsoluteSelection);this.activeEditor.positions=c}if(this.isEditing){this.isEditing=false}this.updateValue();this.isEditing=true;this._updateText();var e=this.editors.indexOf(this.activeEditor);if(e>=0){this._selectGroup(e)}},_passKeyToCalendar:function(c){if(c.keyCode==13||c.keyCode==9){this.hideCalendar("selected","keyboard");return true}else{if(c.keyCode==27){var e=this.calendarContainer;var d=this._calendar;var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;d.setDate(this.value.dateTime);this.closeCalendarAfterSelection=f;this.hideCalendar()}}var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;var b=this._calendar._handleKey(c);this.closeCalendarAfterSelection=f;return b},handleCalendarKey:function(f,e){var c=a(f.target);var d=a.data(document.body,"openedJQXCalendar"+this.id);if(d!=null){if(d.length>0){var b=e._passKeyToCalendar(f);return b}}return true},_findPos:function(c){if(c==null){return}while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}var b=a(c).coord(true);return[b.left,b.top]},testOffset:function(h,f,c){var g=h.outerWidth();var j=h.outerHeight();var i=a(window).width()+a(window).scrollLeft();var e=a(window).height()+a(window).scrollTop();if(f.left+g>i){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}f.top-=Math.min(f.top,(f.top+j>e&&e>j)?Math.abs(j+c+23):0);return f},open:function(b){if(b=="time"){this.timePopup=true}else{this.timePopup=false}this.showCalendar()},close:function(b){this.hideCalendar()},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},initTimePopup:function(){this.timePopupElement=a("
    ").appendTo(this.timeContainer);this.timePopupElement.addClass(this.toThemeProperty("jqx-widget-content jqx-widget jqx-date-time-input-popup"));var s="";s+="
     
     
     
     
    ::: 
     
    ";var l=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){this.timePopupElement[0].innerHTML=s}else{this.timePopupElement[0].innerHTML="
    "+s+"-"+s+"
    "}this.timePopupElement.find(".jqx-icon-down").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-down"));this.timePopupElement.find(".jqx-icon-up").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-up"));var g=this.timePopupElement.find("input");g.addClass(this.toThemeProperty("jqx-input"));g.addClass(this.toThemeProperty("jqx-rc-all"));this.addHandler(g,"mousedown",function(u){u.stopPropagation()});var e=function(u){if(u.target.className.indexOf("hour")>=0){m._decrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._decrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._decrementMeridian(a(u.target))}};var k=function(u){if(u.target.className.indexOf("hour")>=0){m._incrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._incrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._incrementMeridian(a(u.target))}};var r=function(v,u){if(!u.isEditing){return}var w=0;if(!v){v=window.event}if(v.originalEvent&&v.originalEvent.wheelDelta){v.wheelDelta=v.originalEvent.wheelDelta}if(v.originalEvent&&v.originalEvent.deltaY!=undefined){w=-v.originalEvent.deltaY}if(v.wheelDelta){w=v.wheelDelta/120}else{if(v.detail){w=-v.detail/3}}if(w){if(document.activeElement==v.target&&v.target.nodeName.toLowerCase()=="input"){if(w<0){e(v)}else{k(v)}}if(v.preventDefault){v.preventDefault()}v.returnValue=false}if(v.preventDefault){v.preventDefault()}v.returnValue=false};this.addHandler(g,"wheel",function(u){r(u,m)});this.addHandler(g,"keydown",function(v){var u=a(v.target);if(v.ctrlKey){if(v.keyCode==38){if(m.isOpened()){m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}else{if(v.keyCode==40){if(!m.isOpened()){m.showCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}}}if(v.keyCode==40){e(v);v.preventDefault()}else{if(v.keyCode==38){k(v);v.preventDefault()}else{if(v.keyCode==13){v.preventDefault();m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus()}else{if(v.keyCode==27){v.preventDefault();m.hideCalendar("cancel");m.dateTimeInput.focus()}}}}});this.hourInput=a(g[0]);this.minuteInput=a(g[1]);this.secondInput=a(g[2]);this.mssecondInput=a(g[3]);this.meridianInput=a(g[4]);this.hourInput2=a(g[5]);this.minuteInput2=a(g[6]);this.secondInput2=a(g[7]);this.mssecondInput2=a(g[8]);this.meridianInput2=a(g[9]);var m=this;var o=this.timePopupElement.find(".increment-hour-column");this.hourIncrement=a(o[0]);this.hourIncrement2=a(o[1]);this.addHandler(g,"change",function(v){var u=a(v.target);if(u.val().length<=1){u.val("0"+a(v.target).val())}if(v.target.className.indexOf("hour")>=0){var w=parseInt(a(v.target).val());if(l.indexOf("HH")>=0){while(w>24){w=w-24}}else{while(w>12){w=w-12}}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}if(v.target.className.indexOf("minute")>=0||v.target.className.indexOf("second")>=0){var w=parseInt(a(v.target).val());while(w>59){w--}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}});this._incrementHour=function(u){var v=parseInt(u.val());v++;if(l.indexOf("HH")>=0){if(v>23){v=0}}else{if(v>12){v=1}}if(v<10){v="0"+v}u.val(v)};this._incrementMinuteSecond=function(u){var v=parseInt(u.val());v++;if(v>59){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMillisecond=function(u){var v=parseInt(u.val());v++;if(v>999){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this._decrementHour=function(u){var v=parseInt(u.val());v--;if(l.indexOf("HH")>=0){if(v<0){v=23}}else{if(v<1){v=12}}if(v<10){v="0"+v}u.val(v)};this._decrementMinuteSecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=59}if(v<10){v="0"+v}u.val(v)};this._decrementMillisecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=999}if(v<10){v="0"+v}u.val(v)};this._decrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this.addHandler(this.hourIncrement,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput)});this.addHandler(this.hourIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput2)});var p=this.timePopupElement.find(".increment-minute-column");this.minuteIncrement=a(p[0]);this.minuteIncrement2=a(p[1]);this.addHandler(this.minuteIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput2)});var c=this.timePopupElement.find(".increment-second-column");this.secondIncrement=a(c[0]);this.secondIncrement2=a(c[1]);this.addHandler(this.secondIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput)});this.addHandler(this.secondIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput2)});var d=this.timePopupElement.find(".increment-millisecond-column");this.millisecondsIncrement=a(d[0]);this.millisecondsIncrement2=a(d[1]);this.addHandler(this.millisecondsIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput2)});var i=this.timePopupElement.find(".increment-meridian-column");this.meridianIncrement=a(i[0]);this.meridianIncrement2=a(i[1]);this.addHandler(this.meridianIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput)});this.addHandler(this.meridianIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput2)});var n=this.timePopupElement.find(".decrement-hour-column");this.hourDecrement=a(n[0]);this.hourDecrement2=a(n[1]);this.addHandler(this.hourDecrement,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput)});this.addHandler(this.hourDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput2)});var j=this.timePopupElement.find(".decrement-minute-column");this.minuteDecrement=a(j[0]);this.minuteDecrement2=a(j[1]);this.addHandler(this.minuteDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput2)});var t=this.timePopupElement.find(".decrement-second-column");this.secondDecrement=a(t[0]);this.secondDecrement2=a(t[1]);this.addHandler(this.secondDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput)});this.addHandler(this.secondDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput2)});var b=this.timePopupElement.find(".decrement-millisecond-column");this.millisecondsDecrement=a(b[0]);this.millisecondsDecrement2=a(b[1]);this.addHandler(this.millisecondsDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput2)});var f=this.timePopupElement.find(".decrement-meridian-column");this.meridianDecrement=a(f[0]);this.meridianDecrement2=a(f[1]);this.addHandler(this.meridianDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput)});this.addHandler(this.meridianDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput2)});var q=this.timePopupElement.find("table");this.addHandler(this.timePopupElement,"mousedown",function(u){u.stopPropagation()});var h=function(u){var v=u.find("tr");if(l.indexOf("mm")==-1){m.minuteInput.hide();m.minuteInput2.hide();a(a(v[0]).children()[1]).hide();a(a(v[0]).children()[2]).hide();a(a(v[1]).children()[1]).hide();a(a(v[1]).children()[2]).hide();a(a(v[2]).children()[1]).hide();a(a(v[2]).children()[2]).hide()}if(l.indexOf("ss")==-1){m.secondInput.hide();m.secondInput2.hide();a(a(v[0]).children()[3]).hide();a(a(v[0]).children()[4]).hide();a(a(v[1]).children()[3]).hide();a(a(v[1]).children()[4]).hide();a(a(v[2]).children()[3]).hide();a(a(v[2]).children()[4]).hide()}if(l.indexOf("tt")==-1&&l.indexOf("hh")==-1){m.meridianInput.hide();m.meridianInput2.hide();a(a(v[0]).children()[7]).hide();a(a(v[0]).children()[8]).hide();a(a(v[1]).children()[7]).hide();a(a(v[1]).children()[8]).hide();a(a(v[2]).children()[7]).hide();a(a(v[2]).children()[8]).hide()}if(l.indexOf("zz")==-1){m.mssecondInput.hide();m.mssecondInput2.hide();a(a(v[0]).children()[5]).hide();a(a(v[0]).children()[6]).hide();a(a(v[1]).children()[5]).hide();a(a(v[1]).children()[6]).hide();a(a(v[2]).children()[5]).hide();a(a(v[2]).children()[6]).hide()}};if(q.length==1){h(q)}else{h(a(a(q)[1]));h(a(a(q)[2]))}},updateTimePopup:function(){var b=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){var f=this.getDate();if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}}else{var f=this.getRange().from;if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}var f=this.getRange().to;if(this.hourInput2){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput2.val(c);this.minuteInput2.val(h);this.secondInput2.val(e);this.mssecondInput2.val(d);this.meridianInput2.val(g)}}},showCalendar:function(){var o=this.calendarContainer;var s=this._calendar;a.jqx.aria(this,"aria-expanded",true);if(this.showTimeButton){if(this.timePopup){if(!this.timePopupElement){this.initTimePopup()}this.calendarContainer.css("visibility","hidden");this.timeContainer.css("visibility","visible");this.updateTimePopup();var d=this.timeContainer.find("input");var v=0;for(var z=0;zthis.host.width()){var f=23;this.container.css("left",f+parseInt(Math.round(u))-x+"px")}else{this.container.css("left",25+parseInt(Math.round(u))+x+"px")}}if(this.dropDownVerticalAlignment=="top"){var y=o.height();if(this.timePopup){this.timeContainer.css("top",this.container.height()-75)}b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"));var n=parseInt(this.host.outerHeight());var m=parseInt(p)-Math.abs(y+n+23);this.container.css("top",m)}if(this.enableBrowserBoundsDetection){var j=this.testOffset(o,{left:parseInt(this.container.css("left")),top:parseInt(p)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=j.top){b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"))}else{o.css("top",0)}this.container.css("top",j.top);if(parseInt(this.container.css("left"))!=j.left){this.container.css("left",j.left)}}this._raiseEvent(7,o);if(this.animationType!="none"){this.container.css("display","block");var q=parseInt(o.outerHeight());o.stop();this.isanimating=true;this.opening=true;if(this.animationType=="fade"){o.css("margin-top",0);o.css("opacity",0);o.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()});if(this.timePopup){this.timeContainer.css("margin-top",0);this.timeContainer.css("opacity",0);this.timeContainer.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}}else{o.css("opacity",1);if(this.timePopup){this.timeContainer.css("opacity",1)}if(b){o.css("margin-top",q)}else{o.css("margin-top",-q)}if(this.timePopup){if(b){this.timeContainer.css("margin-top",q)}else{this.timeContainer.css("margin-top",-q)}this.timeContainer.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}o.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()})}}else{o.stop();r.isanimating=false;r.opening=false;o.css("opacity",1);o.css("margin-top",0);this.container.css("display","block");a.data(document.body,"openedJQXCalendar"+r.id,o);this.calendarContainer.focus();if(this.timePopup){this.timeContainer.stop();this.timeContainer.css("opacity",1);this.timeContainer.css("margin-top",0);this.timeContainer.focus()}}if(this.value==null){if(this._calendar&&this._calendar._getSelectedCell()){this._calendar._getSelectedCell().isSelected=false}}if(this.timePopup){this.timeButtonIcon.addClass(this.toThemeProperty("jqx-icon-time-pressed"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.timeContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{this.calendarButtonIcon.addClass(this.toThemeProperty("jqx-icon-calendar-pressed"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.calendarContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"))},hideCalendar:function(j,o){if(o){this.changeType=o}var h=this.calendarContainer;var b=this.container;var p=this;a.jqx.aria(this,"aria-expanded",false);if(this.showTimeButton){if(this.timeContainer.css("visibility")!="hidden"&&j!="cancel"){if(this.selectionMode!="range"&&this.hourInput){var e=this.getDate();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}if(!e){e=new Date()}e.setHours(g,f,c,q);this.setDate(e)}else{if(this.hourInput&&j!="selected"){var i=this.getRange();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var l=i.from;if(!l){l=new Date()}l.setHours(g,f,c,q);var g=parseInt(this.hourInput2.val());var f=parseInt(this.minuteInput2.val());var c=parseInt(this.secondInput2.val());var q=parseInt(this.mssecondInput2.val());var d=this.meridianInput2.val();if(f==""){f=0}if(c==""){c=0}if(q==""){q=0}if(this.meridianInput2.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var k=i.to;if(!k){k=new Date()}k.setHours(g,f,c,q);if(k.valueOf()0){var h=j[0].id.toString();var f=h.toString().substring(13);var i=a(document).find("#"+f);var n=b.data.me.hideCalendar();if(n!==false){a.data(document.body,"openedJQXCalendar"+b.data.me.id,null)}}}},_loadItems:function(){if(this.value!=null){this.items=new Array();var d=this._getFormatValue(this.formatString);this.items=this._parseFormatValue(d);this.editors=new Array();for(var b=0;b=1){f=d.format(d.value,0,d.items.length)}var b=d.dateTimeInput.val();if(b!=f){d._raiseEvent(1,d.value)}}if(d.selectionMode=="range"){var c=d.getRange();var i=d.format(d.value,0,d.items.length);if(c.to){var h=a.jqx._jqxDateTimeInput.getDateTime(c.from);i=d.format(h,0,d.items.length);var g=a.jqx._jqxDateTimeInput.getDateTime(c.to);var e=d.format(g,0,d.items.length);var f=i+" - "+e;if(f==" - "){f=""}}else{f=""}}d.dateTimeInput.val(f)},format:function(g,h,f){var b="";for(var e=h;e2;if(this.items[e].type=="FORMAT_AMPM"){d=true;if(this.editors[e].value==0){c=this.editors[e].amString}else{c=this.editors[e].pmString}}if(!d){c=this.items[e].dateParserInEditMode(new Number(this.editors[e].value),"d"+this.editors[e].maxEditPositions,this);while(c.length0){var d=this._getFormatValueGroupLength(f);var g=null;switch(f.substring(0,1)){case":":case"/":d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break;case'"':case"'":var b=f.indexOf(f[0],1);g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1+Math.max(1,b-1)),"ReadOnly",this.culture);d=Math.max(1,b+1);break;case"\\":if(f.length>=2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1),"ReadOnly",this.culture);d=2}break;case"d":case"D":if(d>2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}break;case"f":case"F":if(d>7){d=7}if(d>3){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Millisecond",this.culture)}break;case"g":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;case"h":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_hh",this.culture);break;case"H":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_HH",this.culture);break;case"m":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Minute",this.culture);break;case"M":if(d>4){d=4}g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Month",this.culture);break;case"s":case"S":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Second",this.culture);break;case"t":case"T":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_AMPM",this.culture);break;case"y":case"Y":if(d>1){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Year",this.culture)}else{d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),null,"ReadOnly",this.culture)}break;case"z":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;default:d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break}c[e]=a.extend(true,{},g);f=f.substring(d);e++}return c},_getFormatValue:function(b){if(b==null||b.length==0){b="d"}if(b.length==1){switch(b.substring(0,1)){case"d":return this.localization.calendar.patterns.d;case"D":return this.localization.calendar.patterns.D;case"t":return this.localization.calendar.patterns.t;case"T":return this.localization.calendar.patterns.T;case"f":return this.localization.calendar.patterns.f;case"F":return this.localization.calendar.patterns.F;case"M":return this.localization.calendar.patterns.M;case"Y":return this.localization.calendar.patterns.Y;case"S":return this.localization.calendar.patterns.S}}if(b.length==2&&b.substring(0,1)=="%"){b=b.substring(1)}return b},_updateEditorsValue:function(){var j=this.value;if(j==null){return}var g=j.year;var h=j.day;var d=j.hour;var l=j.millisecond;var b=j.second;var c=j.minute;var f=j.month;if(this.items==null){return}for(var e=0;e=0&&d<12){this.editors[e].value=0}else{this.editors[e].value=1}break;case"Day":this.editors[e].value=h;break;case"FORMAT_hh":var k=d%12;if(k==0){k=12}this.editors[e].value=k;break;case"FORMAT_HH":this.editors[e].value=d;break;case"Millisecond":this.editors[e].value=l;break;case"Minute":this.editors[e].value=c;break;case"Month":this.editors[e].value=f;break;case"Second":this.editors[e].value=b;break;case"Year":this.editors[e].value=g;break}}},updateValue:function(z){if(this.isEditing){return}if(this.items&&this.items.length==0){return}var o=0;var s=1;var C=1;var l=0;var d=0;var J=0;var u=0;var I=1;var h=0;var m=false;var r=false;var D=false;var c=false;var b=false;var q=false;var x=false;var t=new Array();var e=null;var y=0;for(var B=0;B0&&I>0&&C>0&&u>=0&&l>=0&&J>=0&&d>=0){var K=this.value;if(K!=null){if(!m){s=K.year}if(!r){I=K.month}if(!D){C=K.day}}try{if(I>12){I=12}if(I<1){I=1}if(z&&K._daysInMonth(s,I)<=C){C=K._daysInMonth(s,I);if(t!=null&&t.length>0){for(B=0;B=12){l-=12}}else{if(l+12<24){l+=12}}}var g=this.value.dateTime.getDate();this.value._setYear(parseInt(s));this.value._setDay(C);this.value._setMonth(I);if(c){this.value._setHours(l)}if(b){this.value._setMinutes(u)}if(q){this.value._setSeconds(J)}if(x){this.value._setMilliseconds(d)}this._validateTimeRange()}catch(j){this.value=K}if(G!=null){var A=this.value.dateTime.getFullYear()==G.getFullYear()&&this.value.dateTime.getDate()==G.getDate()&&this.value.dateTime.getMonth()==G.getMonth()&&this.value.dateTime.getHours()==G.getHours()&&this.value.dateTime.getMinutes()==G.getMinutes()&&this.value.dateTime.getSeconds()==G.getSeconds();if(!A){if(this.changing){var n=this.changing(G,this.value.dateTime);if(n){this.value=a.jqx._jqxDateTimeInput.getDateTime(n)}}this._raiseEvent("0",this.value.dateTime);if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}if(this.change){this.change(this.value.dateTime)}}}}var f=this.editors.indexOf(this.activeEditor);var p=this.items[f];if(this.value){if(this.calendarContainer.jqxCalendar("_isDisabled",this.value.dateTime)){this.dateTimeInput.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.dateTimeInput.removeClass(this.toThemeProperty("jqx-input-invalid"))}}},_internalSetValue:function(b){this.value._setYear(parseInt(b.year));this.value._setDay(b.day);this.value._setMonth(b.month);this.value._setHours(b.hour);this.value._setMinutes(b.minute);this.value._setSeconds(b.second);this.value._setMilliseconds(b.milisecond)},_raiseEvent:function(c,n,f){var m=this.events[c];var g={};g.owner=this;if(n==null){n={}}if(f==null){f=n}var l=n.charCode?n.charCode:n.keyCode?n.keyCode:0;var o=true;var k=this.readonly;var b=new a.Event(m);b.owner=this;b.args=g;b.args.date=this.getDate();if(c==9){b.args.type=this.changeType;this.changeType=null}this.element.value=this.dateTimeInput.val();if(c==9&&this.selectionMode!="range"){var d=b.args.date;if(this._oldDT){if(d!=null){if(!(d.getFullYear()!=this._oldDT.getFullYear()||d.getMonth()!=this._oldDT.getMonth()||d.getDate()!=this._oldDT.getDate()||d.getHours()!=this._oldDT.getHours()||d.getMinutes()!=this._oldDT.getMinutes()||d.getSeconds()!=this._oldDT.getSeconds())){return true}}a.jqx.aria(this,"aria-valuenow",this.getDate());a.jqx.aria(this,"aria-valuetext",this.getText());if(this.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+this.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.selectionMode=="range"){b.args.date=this.getRange();if(this._oldDT){var d=b.args.date.from;if(c==9){var j=false;var i=false;var e=this._oldDT.from;if(d!=null&&e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){j=true}}var d=b.args.date.to;if(d!=null){e=this._oldDT.to;if(e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){i=true}}}if(j&&i){return true}var j=b.args.date.from;if(j==null){j=""}else{j=j.toString()}var i=b.args.date.to;if(i==null){i=""}else{i=i.toString()}a.jqx.aria(this,"aria-valuenow",j+"-"+i);a.jqx.aria(this,"aria-valuetext",this.getText());if(j&&i){a.jqx.aria(this,"aria-label","Current focused range is "+j.toLocaleString()+"-"+i.toLocaleString())}}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.host.css("display")=="none"){return true}if(c!=2&&c!=3&&c!=4&&c!=5&&c!=6){o=this.host.trigger(b);if(b.stopPropagation){b.stopPropagation()}}var h=this;if(!k){if(c==2&&!this.disabled){setTimeout(function(){h.isEditing=true;if(this.selectionMode=="range"){h._selectGroup(-1)}else{h._selectGroup(-1)}},25)}}if(c==4){if(k||this.disabled){if(l==8||l==46){this.isEditing=false;if(this.allowKeyboardDelete){if(this.allowNullDate){this.setDate(null)}else{if(this.selectionMode!="range"){this.setDate(this.getMinDate())}else{this.setRange(this.getMinDate(),this.getMinDate())}}}}if(l==9){return true}if(!n.altKey){return false}}o=this._handleKeyDown(n,l)}else{if(c==5){if(l==9){return true}if(k||this.disabled){return false}}else{if(c==6){if(l==9){return true}if(k||this.disabled){return false}o=this._handleKeyPress(n,l)}}}return o},_doLeftKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions>0){this.activeEditor.positions--;this._selectGroup(e);return}}while(e>0){this.activeEditor=this.editors[--e];this._selectGroup(e);if(this.items[e].type!="ReadOnly"){d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&b!=this.activeEditor){if(this.items[e].type!="ReadOnly"){if(this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_doRightKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions2){break}d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&this.activeEditor!=b){if(this.items[e].type!="ReadOnly"){this.activeEditor.positions=0}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_saveSelectedText:function(){var c=this._selection();var e="";var d=this.dateTimeInput.val();if(c.start>0||c.length>0){for(var b=c.start;b1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>99){c=99}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(d.value!=c){b=true}if(!b){this.isEditing=false;this._validateValue();this._updateText();this.isEditing=true;this._doRightKey();return true}return false}}},_handleKeyPress:function(j,n){var m=this._selection();var b=this;var d=j.ctrlKey||j.metaKey;if((d&&n==97)||(d&&n==65)){return true}if(n==8){if(m.start>0){b._setSelectionStart(m.start)}return false}if(n==46){if(m.start=0){this.changeType="keyboard";var f=String.fromCharCode(n);var k=parseInt(f);if(f=="p"||f=="a"||f=="A"||f=="P"){if(this.activeEditor&&this.activeEditor.item.type=="FORMAT_AMPM"){if(this.activeEditor.value==0&&(f=="p"||f=="P")){this.spinUp()}else{if(this.activeEditor.value==1&&(f=="a"||f=="A")){this.spinDown()}}}}if(!isNaN(k)){if(this.container.css("display")=="block"){this.hideCalendar()}this.updateValue();this._updateText();var h=false;var i=this.editors.indexOf(this.activeEditor);var c=null;this.isEditing=true;if(i.type!="ReadOnly"){c=this.activeEditor}if(c!=null&&c.positions==0){this.editorText=""}if(this.activeEditor==null){this.activeEditor=this.editors[0]}if(this.activeEditor==null){return false}this.activeEditor.insert(f);if(c!=null&&this.editorText.length>=c.maxEditPositions){this.editorText=""}this.editorText+=f;var o=this._selectWithAdvancePattern();if(this.activeEditor.positions==this.activeEditor.maxEditPositions){var g=this._getLastEditableEditorIndex();if(this.editors.indexOf(this.activeEditor)==g&&o&&this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}h=true;this.updateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return false}}var l=this._isSpecialKey(n);return l},_getLastEditableEditorIndex:function(){var b=0;var d=this;for(var c=this.items.length-1;c>=0;c--){if(this.items[c].type!="ReadOnly"){return c}}return -1},_handleKeyDown:function(i,o){var h=this;this.timePopup=false;if(o==84){this.timePopup=true}if(i.keyCode==115){if(h.isOpened()){h.hideCalendar("keyboard","keyboard");return false}else{if(!h.isOpened()){h.showCalendar("keyboard","keyboard");return false}}}if(i.altKey){if(i.keyCode==38){if(h.isOpened()){if(h.showTimeButton&&!h.showCalendarButton){h.timePopup=true}h.hideCalendar("keyboard","keyboard");return false}}else{if(i.keyCode==40){if(!h.isOpened()){if(h.showTimeButton&&!h.showCalendarButton){h.timePopup=true}h.showCalendar("keyboard","keyboard");return false}}}}else{if(i.ctrlKey){this.timePopup=true;if(i.keyCode==38){if(h.isOpened()){h.hideCalendar("keyboard","keyboard");return false}}else{if(i.keyCode==40){if(!h.isOpened()){h.showCalendar("keyboard","keyboard");return false}}}}}if(h.isOpened()){if(i.keyCode==9){h.hideCalendar("selected","keyboard");return true}return}var m=h._selection();var b=i.ctrlKey||i.metaKey;if((b&&o==99)||(b&&o==67)){h._saveSelectedText(i);return true}if((b&&o==122)||(b&&o==90)){return false}if((b&&o==118)||(b&&o==86)||(i.shiftKey&&o==45)){var l=h.val();var j=this;var c=a('").appendTo(O);D.jqxInput({rtl:m.rtl,height:40,width:"100%",theme:m.theme});D.css("box-sizing","border-box");m.editDialogFields.description=D;m.editDialogFields.descriptionLabel=aA;m.editDialogFields.descriptionContainer=K;var ac=a("
    ");H.append(ac);var aD=a("
    "+m.schedulerLocalization.editDialogColorString+"
    ").appendTo(ac);var Q=a("
    ").appendTo(ac);var F=a("
    ").appendTo(Q);var I=function(aE){if(aE==-1){return""}var i=m.colors[aE];var aF="";var aF="";aF+="
    ";return aF};var an=function(aG,aE){if(aE<0){aG.css("top","4px");aG.css("position","relative");return aG[0].outerHTML}var i=m.colors[aE];var aF="";aF+="
    ";return aF};F.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:-1,placeHolder:m.schedulerLocalization.editDialogColorPlaceHolderString,selectionRenderer:an,renderer:I,source:m.colors,width:"100%",theme:m.theme});m.editDialogFields.color=F;m.editDialogFields.colorLabel=aD;m.editDialogFields.colorContainer=ac;var ah=a("
    ");H.append(ah);var az=a("
    "+m.schedulerLocalization.editDialogStatusString+"
    ").appendTo(ah);var N=a("
    ").appendTo(ah);var B=a("
    ").appendTo(N);B.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:2,autoDropDownHeight:true,source:m.schedulerLocalization.editDialogStatuses,width:"100%",theme:m.theme});m.editDialogFields.status=B;m.editDialogFields.statusLabel=az;m.editDialogFields.statusContainer=ah;var ag=a("
    ");H.append(ag);var M=a("
    "+m.schedulerLocalization.editDialogResourceIdString+"
    ").appendTo(ag);var am=a("
    ").appendTo(ag);var ab=a("
    ").appendTo(am);var E=new Array();for(var aw=0;aw10){v=false}ab.jqxDropDownList({height:27,rtl:m.rtl,source:E,selectedIndex:0,autoDropDownHeight:v,width:"100%",theme:m.theme});m.editDialogFields.resource=ab;m.editDialogFields.resourceLabel=M;m.editDialogFields.resourceContainer=ag;if(E.length==0){ag.hide()}if(!b&&k){m.editDialogFields.resource.val(k.resourceId)}var ae=a("
    ");H.append(ae);var al=a("
    ").appendTo(ae);var ap=a("").appendTo(al);var aj=a("").appendTo(al);var ak=a("").appendTo(al);var J=a("").appendTo(al);var aa=a("").appendTo(al);var aB=a("").appendTo(al);var s=a("").appendTo(al);var ax=25;if(m.isTouchDevice()){ax=null}aj.jqxButton({rtl:m.rtl,theme:m.theme});ak.jqxButton({rtl:m.rtl,theme:m.theme});J.jqxButton({rtl:m.rtl,theme:m.theme});aa.jqxButton({rtl:m.rtl,theme:m.theme});ap.jqxButton({rtl:m.rtl,theme:m.theme});aB.jqxButton({rtl:m.rtl,theme:m.theme});s.jqxButton({rtl:m.rtl,theme:m.theme});aB.hide();s.hide();m.editDialogFields.saveOccurrenceButton=s;m.editDialogFields.saveSeriesButton=aB;m.editDialogFields.saveButton=aa;m.editDialogFields.cancelButton=ap;m.editDialogFields.deleteButton=aj;m.editDialogFields.deleteSeriesButton=ak;m.editDialogFields.deleteExceptionsButton=J;m.editDialogFields.buttons=al;m.addHandler(aj,"click",function(){q.jqxWindow("close");m.overlay.hide();m._deleteAppointment(m.editAppointment)});m.addHandler(ap,"click",function(){q.jqxWindow("close");m.overlay.hide()});m.addHandler(s,"click",function(){if(!m.editAppointment.isException()){if(m.editAppointment.rootAppointment!=null){m.editAppointment.rootAppointment.exceptions.push(m.editAppointment);m.editAppointment.rootAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}else{m.editAppointment.exceptions.push(m.editAppointment);m.editAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}}else{var aG=m.editAppointment.rootAppointment?m.editAppointment.rootAppointment.exceptions:m.editAppointment.exceptions;for(var aF=0;aF=0){m.editDialogFields.color.val(b.borderColor)}else{m.editDialogFields.color.jqxDropDownList("clearSelection")}m.editDialogFields.allDay.val(b.allDay);m.editDialogFields.resource.val(b.resourceId);m.editDialogFields.status.val(b.status);if(b.timeZone){b.from=b.from.toTimeZone(b.timeZone);b.to=b.to.toTimeZone(b.timeZone)}d=b.from;h=b.to;if(a.jqx.scheduler.utilities.getStartOfDay(d).equals(d)&&a.jqx.scheduler.utilities.getEndOfDay(h).equals(h)){m.editDialogFields.allDay.val(true)}m._setAppointmentPropertiesToDialog(b,d,h,k?k.resourceId:null)}else{m.editDialogFields.saveButton.show();m._setAppointmentPropertiesToDialog(null,d,h,k?k.resourceId:null)}if(d&&h){m._changeFromUser=false;m.editDialogFields.from.val(d.toDate());m.editDialogFields.to.val(h.toDate());m._changeFromUser=true}if(!m.isTouchDevice()){m._editDialog.jqxWindow({height:150});m._editDialog.jqxWindow({height:a(m._editDialog.children())[1].scrollHeight+40})}}});m.removeHandler(m._editDialog,"keydown");m.addHandler(m._editDialog,"keydown",function(s){if(m.editDialogKeyDown){var i=m.editDialogKeyDown(q,m.editDialogFields,m.editAppointment,s);if(i!=undefined){return i}}if(s.keyCode==13){if(a(document.activeElement).ischildof(m._editDialog)){if(document.activeElement.nodeName.toLowerCase()=="button"){return true}if(b){if(b.isException()||b.rootAppointment){m.editDialogFields.saveOccurrenceButton.trigger("click")}else{if(b.isRecurrentAppointment()){m.editDialogFields.saveSeriesButton.trigger("click")}else{m.editDialogFields.saveButton.trigger("click")}}}else{m.editDialogFields.saveButton.trigger("click")}}}else{if(s.keyCode==27){m.editDialogFields.cancelButton.trigger("click")}}})},openMenu:function(e,c){var d=this;if(!d.menu){d._initMenu()}var b=d._views[d._view].type;if(d.contextMenu&&d.menu){if(!d.selectedAppointment){d.menu.jqxMenu("hideItem","editAppointment")}else{d.menu.jqxMenu("showItem","editAppointment")}if(arguments.length<2){if(d.selectedAppointment){var f=d.selectedAppointment.coord();e=f.left;c=f.top}else{if(d.focusedCell){var f=a(d.focusedCell).coord()}}e=f.left;c=f.top}d.menu.jqxMenu("open",e,c);d._hasOpenedMenu=true}},closeMenu:function(){var b=this;if(b.contextMenu&&b.menu){setTimeout(function(){b.menu.jqxMenu("close")})}},closeDialog:function(){var b=this;b._editDialog.jqxWindow("close")},openDialog:function(d,e){var f=this;var c=f._views[f._view].type;if(f.selectedJQXAppointment){var b=f._initDialog(f.selectedJQXAppointment);if(b!==false){f._openDialog(d,e)}}else{if(f.getSelection()==null){f.focus();f.focusedCell.setAttribute("data-selected","true");f._lastSelectedCell=f.focusedCell;f._updateCellsSelection(f.focusedCell)}f._initDialog();f._openDialog(d,e)}},_openDialog:function(d,c){var f=this;var j=f._views[f._view].type;if(!f.editDialog){return}var e=f.host.coord();f.overlay.show();f.overlay.css("z-index",9999999);f.overlay.width(f.host.width());f.overlay.height(f.host.height());f.overlay.offset(e);var g=f.isTouchDevice();if(g){f._editDialog.jqxWindow("move",e.left,e.top);f._editDialog.jqxWindow({draggable:false,maxWidth:f.host.width(),maxHeight:f.host.height()});f._editDialog.jqxWindow({width:f.host.width(),height:f.host.height()});f._editDialog.jqxWindow("open");f._editDialog.jqxWindow("move",e.left,e.top)}else{if(d!=undefined&&c!=undefined){f._editDialog.jqxWindow("move",d,c);f._editDialog.jqxWindow("open")}else{var i=f._editDialog.height();if(i<400){i=400}var h=e.top+f.host.height()/2-i/2;var b=e.left+f.host.width()/2-f._editDialog.width()/2;f._editDialog.jqxWindow("move",b,h);f._editDialog.jqxWindow("open")}}setTimeout(function(){f.overlay.css("z-index",999)},50)},_setAppointmentPropertiesFromDialog:function(c,d){var e=this;var b=function(n){var x=e._views[e._view].type;var u=e._views[e._view];var A=e.editDialogFields.from.val("date");var h=e.editDialogFields.to.val("date");if(A>h){e.editDialogFields.from.jqxDateTimeInput("focus");return false}if(A==h){if(x.indexOf("month")>=0){return true}return false}n.resourceId=e.editDialogFields.resource.val();if(e.editDialogFields.resourceContainer.css("display")=="none"){n.resourceId=""}n.description=e.editDialogFields.description.val();n.allDay=e.editDialogFields.allDay.val();n.status=e.editDialogFields.status.val();n.location=e.editDialogFields.location.val();n.timeZone=e.editDialogFields.timeZone.val();if(n.timeZone==""&&e.timeZone!=""){n.timeZone=e.timeZone}n.from=new a.jqx.date(A,n.timeZone);n.to=new a.jqx.date(h,n.timeZone);if(e.timeZone){n.from=n.from.toTimeZone(e.timeZone);n.to=n.to.toTimeZone(e.timeZone)}else{n.from=n.from.toTimeZone(null);n.to=n.to.toTimeZone(null)}if(n.allDay){n.from=a.jqx.scheduler.utilities.getStartOfDay(n.from);n.to=a.jqx.scheduler.utilities.getEndOfDay(n.to)}if(e.editDialogFields.color.val()){var v=e.getAppointmentColors(e.editDialogFields.color.val());n.color=v.color;n.background=v.background;n.borderColor=v.border}n.subject=e.editDialogFields.subject.val();var f=e.editDialogFields.repeat.jqxDropDownList("selectedIndex");var r=new a.jqx.scheduler.recurrencePattern();var j=e.editDialogFields.repeatEndPanel;r.timeZone=e.timeZone;r.from=n.from.clone();if(d=="occurrence"){if(n.rootAppointment){r.from=n.rootAppointment.from.clone()}}if(e.editDialogFields.resetExceptions.val()){n.exceptions=new Array();n.recurrenceException=new Array()}if(j.repeatEndNever.val()){r.count=1000;r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndAfter.val()){r.count=j.repeatEndAfterValue.val();r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndOn.val()){r.count=1000;var h=new a.jqx.date(j.repeatEndOnValue.jqxDateTimeInput("getDate"),e.timeZone);r.to=h}}}switch(f){case 0:default:n.clearRecurrence();break;case 1:var k=e.editDialogFields.daily;var F=k.repeatDayInterval.val();r.interval=F;r.freq="daily";break;case 2:var w=e.editDialogFields.weekly;var F=w.repeatWeekInterval.val();var q=[{Sunday:0},{Monday:1},{Tuesday:2},{Wednesday:3},{Thursday:4},{Friday:5},{Saturday:6}];var p=w.repeatDays;var o=new Array();r.weekDays={};for(var C=0;C<7;C++){var B=p[C].val();if(B){if(C==0){o.push(6)}else{o.push(C-1)}a.extend(r.weekDays,q[C])}}r.freq="weekly";r.byweekday=o;r.interval=F;break;case 3:var D=e.editDialogFields.monthly;var F=D.repeatMonth.val();if(D.repeatMonthDayBool.val()){r.day=D.repeatMonthDay.val();r.bymonthday=new Array();r.bymonthday.push(r.day)}else{var y=D.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=D.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="monthly";r.interval=F;break;case 4:var G=e.editDialogFields.yearly;var F=G.repeatYear.val();if(G.repeatYearBool.val()){r.day=G.repeatYearDay.val();r.month=G.repeatYearMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);r.byyearday=new Array();r.byyearday.push(r.day)}else{r.month=G.repeatDayOfWeekMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);var y=G.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=G.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="yearly";r.interval=F;break}if(n.rootAppointment){n.rootAppointment.recurrencePattern=r}else{if(f>0){n.recurrencePattern=r}}var m={};var t={};for(var H in e.appointmentDataFields){var g=e.appointmentDataFields[H];var z=n[H];m[H]=z;if(H=="from"||H=="to"){z=z.toDate()}t[g]=z}m.originalData=t;m.jqxAppointment=n;n.boundAppointment=m;return true}(c);return b},_setAppointmentPropertiesToDialog:function(e,h,d,g){var f=this;var c=function(){var p=f.editDialogFields.repeatEndPanel;p.repeatEndNever.jqxRadioButton({checked:true});p.repeatEndAfter.jqxRadioButton({checked:false});p.repeatEndAfterValue.val(1);p.repeatEndOnValue.val(l);var l=d.toDate();if(f.editDialogFields.daily){var j=f.editDialogFields.daily;j.repeatDayInterval.val(1)}if(f.editDialogFields.weekly){var o=f.editDialogFields.weekly;for(var m=0;m=0||(h&&h.equals(d))||(d&&d.equals(a.jqx.scheduler.utilities.getEndOfDay(d))&&h&&h.equals(a.jqx.scheduler.utilities.getStartOfDay(h)))){f.editDialogFields.allDay.val(true)}f.editDialogFields.color.jqxDropDownList("clearSelection");f.editDialogFields.description.val("");f.editDialogFields.subject.val("");f.editDialogFields.repeat.jqxDropDownList("selectIndex",0);return}var b=function(j){var r=j.recurrencePattern;if(j.rootAppointment){var r=j.rootAppointment.recurrencePattern}if(r==null){return}var k=r.freq;var p=0;if(k=="daily"){p=1}if(k=="weekly"){p=2}if(k=="monthly"){p=3}if(k=="yearly"){p=4}var n=f.editDialogFields.repeatEndPanel;if(r.count!=1000){n.repeatEndNever.jqxRadioButton({checked:false});n.repeatEndAfter.jqxRadioButton({checked:true});n.repeatEndAfterValue.val(r.count)}else{if(r.to.year()!=9999){n.repeatEndOn.jqxRadioButton({checked:true});n.repeatEndOnValue.val(r.to.toDate())}else{n.repeatEndNever.jqxRadioButton({checked:true})}}f.editDialogFields.repeat.jqxDropDownList("selectIndex",p);switch(p){case 1:var l=r.interval;var q=f.editDialogFields.daily;q.repeatDayInterval.val(l);break;case 2:var l=r.interval;var z=f.editDialogFields.weekly;z.repeatWeekInterval.val(l);var y=r.byweekday;for(var o=0;o<7;o++){var w=z.repeatDays[o];w.val(false)}for(var o=0;o0){u.repeatMonthDayBool.jqxRadioButton({checked:true});u.repeatMonthDay.val(r.day)}else{u.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}u.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}u.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break;case 4:var t=f.editDialogFields.yearly;if(r.byyearday&&r.byyearday.length>0){t.repeatYearDay.val(r.byyearday[0]);t.repeatYearBool.val(true)}if(r.bymonth&&r.bymonth.length>0){t.repeatYearMonth.val(r.bymonth[0]);t.repeatYearBool.val(true)}if(!r.byyearday||(r.byyearday&&r.byyearday.length==0)){t.repeatDayOfWeekMonth.val(r.bymonth[0]);t.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}t.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}t.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break}};b(e)}});a.jqx.scheduler.column=function(b,c){this.owner=b;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="center";this.cellsalign="center";this.width="auto";this.minwidth=60;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(d,e){if(this[d]){var f=this[d];this[d]=e;this.owner._columnPropertyChanged(this,d,e,f)}else{if(this[d.toLowerCase()]){var f=this[d.toLowerCase()];this[d.toLowerCase()]=e;this.owner._columnPropertyChanged(this,d.toLowerCase(),e,f)}}};this._initfields=function(e){if(e!=null){var d=this;if(a.jqx.hasProperty(e,"dataField")){this.datafield=a.jqx.get(e,"dataField")}if(a.jqx.hasProperty(e,"displayField")){this.displayfield=a.jqx.get(e,"displayField")}else{this.displayfield=this.datafield}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"validation")){this.validation=a.jqx.get(e,"validation")}if(a.jqx.hasProperty(e,"autoCellHeight")){this.autoCellHeight=a.jqx.get(e,"autoCellHeight")}if(a.jqx.hasProperty(e,"text")){this.text=a.jqx.get(e,"text")}else{this.text=this.displayfield}if(a.jqx.hasProperty(e,"sortable")){this.sortable=a.jqx.get(e,"sortable")}if(a.jqx.hasProperty(e,"hidden")){this.hidden=a.jqx.get(e,"hidden")}if(a.jqx.hasProperty(e,"groupable")){this.groupable=a.jqx.get(e,"groupable")}if(a.jqx.hasProperty(e,"renderer")){this.renderer=a.jqx.get(e,"renderer")}if(a.jqx.hasProperty(e,"align")){this.align=a.jqx.get(e,"align")}if(a.jqx.hasProperty(e,"cellsAlign")){this.cellsalign=a.jqx.get(e,"cellsAlign")}if(a.jqx.hasProperty(e,"cellsFormat")){this.cellsFormat=a.jqx.get(e,"cellsFormat")}if(a.jqx.hasProperty(e,"width")){this.width=a.jqx.get(e,"width")}if(a.jqx.hasProperty(e,"minWidth")){this.minwidth=a.jqx.get(e,"minWidth")}if(a.jqx.hasProperty(e,"maxWidth")){this.maxwidth=a.jqx.get(e,"maxWidth")}if(a.jqx.hasProperty(e,"cellsRenderer")){this.cellsRenderer=a.jqx.get(e,"cellsRenderer")}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"pinned")){this.pinned=a.jqx.get(e,"pinned")}if(a.jqx.hasProperty(e,"filterable")){this.filterable=a.jqx.get(e,"filterable")}if(a.jqx.hasProperty(e,"filter")){this.filter=a.jqx.get(e,"filter")}if(a.jqx.hasProperty(e,"resizable")){this.resizable=a.jqx.get(e,"resizable")}if(a.jqx.hasProperty(e,"draggable")){this.draggable=a.jqx.get(e,"draggable")}if(a.jqx.hasProperty(e,"editable")){this.editable=a.jqx.get(e,"editable")}if(a.jqx.hasProperty(e,"initEditor")){this.initeditor=a.jqx.get(e,"initEditor")}if(a.jqx.hasProperty(e,"createEditor")){this.createeditor=a.jqx.get(e,"createEditor")}if(a.jqx.hasProperty(e,"destroyEditor")){this.destroyeditor=a.jqx.get(e,"destroyEditor")}if(a.jqx.hasProperty(e,"getEditorValue")){this.geteditorvalue=a.jqx.get(e,"getEditorValue")}if(a.jqx.hasProperty(e,"className")){this.classname=a.jqx.get(e,"className")}if(a.jqx.hasProperty(e,"cellClassName")){this.cellclassname=a.jqx.get(e,"cellClassName")}if(a.jqx.hasProperty(e,"rendered")){this.rendered=a.jqx.get(e,"rendered")}if(a.jqx.hasProperty(e,"exportable")){this.exportable=a.jqx.get(e,"exportable")}if(a.jqx.hasProperty(e,"nullable")){this.nullable=a.jqx.get(e,"nullable")}if(a.jqx.hasProperty(e,"columnGroup")){this.columngroup=a.jqx.get(e,"columnGroup")}if(!e instanceof String&&!(typeof e=="string")){for(var f in e){if(!d.hasOwnProperty(f)){if(!d.hasOwnProperty(f.toLowerCase())){b.host.remove();throw new Error("jqxScheduler: Invalid property name - "+f+".")}}}}}};this._initfields(c);return this};a.jqx.schedulerDataCollection=function(b){this.records=new Array();this.owner=b;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(d,c){this.records[d]=c};this.isempty=function(c){if(this.records[c]==undefined){return true}return false};this.initialize=function(c){if(c<1){c=1}this.records[c-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(c){return this.records.indexOf(c)};this.add=function(c){if(c==null){return false}this.records[this.records.length]=c;return true};this.insertAt=function(d,c){if(d==null||d==undefined){return false}if(c==null){return false}if(d>=0){if(dc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(a.jqx.dataFormat.isNumber(d)&&a.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(a.jqx.dataFormat.isDate(d)&&a.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(d)&&!a.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(l){if(this.scheduler.serverProcessing){return l}var c=new Array();if(this.filters.length){var f=new Array();var k=function(o,s){for(var q=0;q0)){var j=new Array();var g=function(n,o){for(var m=0;m0){g(p,p.records)}}};g(null,l);k.call(this,j,c);for(var d=0;d0){return a(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=a(d).attr(j);if(c!=null&&c.toString().length>0){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.scheduler.appointmentsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.scheduler.appointmentsByKey["jqx"+f];if(!g){var g=this.scheduler.appointmentsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); +(function(a){if(!a.jqx.scheduler){a.jqx.scheduler={}}a.jqx.scheduler.utilities={weekDays:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},guid:function(){function b(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return b()+b()},areWeekDaysIncluded:function(d,c){var b=false;a.each(d,function(e,f){if(f===c){b=true;return false}});return b},getStartOfDay:function(c){var b=new a.jqx.date(c.year(),c.month(),c.day(),0,0,0);b.timeZone=c.timeZone;return b},getEndOfDay:function(c){var b=new a.jqx.date(c.year(),c.month(),c.day(),23,59,59);b.timeZone=c.timeZone;return b},getDaysCount:function(d,c){var b=1;while(d=g&&dg){return true}if(g==d||c==b){return true}if(gd&&cb){return true}}else{if(b>g&&bc){return true}}return false},rangeContains:function(e,d,c,b){return(e<=c&&b<=d)},monthDays:[31,28,31,30,31,30,31,31,30,31,30,31],msPerDay:1000*60*60*24,maxYear:9999,ORDINAL_BASE:new Date(1970,0,1),getYearDay:function(b){var c=new Date(b.getFullYear(),b.getMonth(),b.getDate());return Math.ceil((c-new Date(b.getFullYear(),0,1))/a.jqx.scheduler.utilities.msPerDay)+1},isLeapYear:function(b){if(b instanceof Date){b=b.getFullYear()}return((b%4===0)&&(b%100!==0))||(b%400===0)},tzOffset:function(b){return b.getTimezoneOffset()*60*1000},monthRange:function(c,d){var b=new Date(c,d,1);return[a.jqx.scheduler.utilities.getWeekday(b),a.jqx.scheduler.utilities.getMonthDays(b)]},getMonthDays:function(b){var c=b.getMonth();return c==1&&a.jqx.scheduler.utilities.isLeapYear(b)?29:a.jqx.scheduler.utilities.monthDays[c]},getWeekday:function(b){var c=[6,0,1,2,3,4,5];return c[b.getDay()]},combine:function(b,c){c=c||b;return new Date(b.getFullYear(),b.getMonth(),b.getDate(),c.getHours(),c.getMinutes(),c.getSeconds())},sort:function(b){b.sort(function(d,c){return d.getTime()-c.getTime()})},timeToUntilString:function(e){var c=new Date(e);var b,f=[c.getUTCFullYear(),c.getUTCMonth()+1,c.getUTCDate(),"T",c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),"Z"];for(var d=0;d75){k+=l.substr(0,75)+"\n";l=" "+l.substr(75)}k+=l;return k};var g=function(k){return(k<10?"0":"")+k};var j=function(l,k){return(!l?"":(!k?""+l.getFullYear()+"-"+g(l.getMonth()+1)+"-"+g(l.getDate())+"T"+g(l.getHours())+":"+g(l.getMinutes())+":"+g(l.getSeconds())+"Z":""+l.getUTCFullYear()+"-"+g(l.getUTCMonth()+1)+"-"+g(l.getUTCDate())+"T"+g(l.getUTCHours())+":"+g(l.getUTCMinutes())+":"+g(l.getUTCSeconds())+"Z"))};var f=function(){var k="";for(var l=0;l0){i.recurrenceException=f()}else{i.recurrenceException=""}i.dtstamp=j(new Date(),h);return JSON.stringify(i)};c.toString=function(i){var f=function(l){var k="";while(l.length>75){k+=l.substr(0,75)+"\n";l=" "+l.substr(75)}k+=l;return k};var h=function(k){return(k<10?"0":"")+k};var j=function(l,k){return(!l?"":(k?""+l.getFullYear()+h(l.getMonth()+1)+h(l.getDate())+"T"+h(l.getHours())+h(l.getMinutes())+h(l.getSeconds()):""+l.getUTCFullYear()+h(l.getUTCMonth()+1)+h(l.getUTCDate())+"T"+h(l.getUTCHours())+h(l.getUTCMinutes())+h(l.getUTCSeconds())+"Z"))};var g=function(){var k="";for(var l=0;l0?"EXDATE:"+g()+"\n":"")+(c.subject?f("SUMMARY:"+c.subject)+"\n":"")+"TRANSP:OPAQUE\n"+(c.status?f("STATUS:"+e)+"\n":"")+(c.description?f("DESCRIPTION:"+c.description)+"\n":"")+(c.location?f("LOCATION:"+c.location)+"\n":"")+"END:VEVENT"};c.range=function(){if(!c.allDay){return{from:c.from,to:c.to}}else{return{from:a.jqx.scheduler.utilities.getStartOfDay(c.from),to:a.jqx.scheduler.utilities.getEndOfDay(c.to)}}};c.clearRecurrence=function(){if(c.recurrencePattern){c.exceptions=new Array();c.exceptionDates=new Array();c.recurrencePattern=null;c.recurrenceException=new Array();c.hidden=false}};c.isAllDayAppointment=function(){return this.duration().days()>=1||this.allDay};c.cloneAppointmentAttributes=function(e){e.subject=c.subject;e.description=c.description;e.location=c.location;e.tooltip=c.tooltip;e.resourceId=c.resourceId;e.category=c.category;e.status=c.status;e.rootAppointment=c;e.color=c.color;e.borderColor=c.borderColor;e.background=c.background;e.hidden=c.hidden;e.timezone=c.timeZone;e.style=c.style;e.hiddenByResourceId=c.hiddenByResourceId};c.createOccurrence=function(g){if(g==null){return null}var f=new a.jqx.scheduler.appointment();f.allDay=c.allDay;var e=c.duration();if(c.allDay){e=new a.jqx.timeSpan(10000*(c.to-c.from))}f.from=g;f.to=g.add(e);f.occurrenceFrom=g.clone();f.subject=c.subject;f.description=c.description;f.location=c.location;f.tooltip=c.tooltip;f.resourceId=c.resourceId;f.category=c.category;f.status=c.status;f.rootAppointment=c;f.color=c.color;f.draggable=c.draggable;f.resizable=c.resizable;f.borderColor=c.borderColor;f.background=c.background;f.recurrentAppointment=true;f.timeZone=c.timeZone;f.style=c.style;f.hiddenByResourceId=c.hiddenByResourceId;f.boundAppointment=c.boundAppointment;if(c.hiddenByResourceId){f.hidden=true}f.id=c.id+"."+a.jqx.scheduler.utilities.guid();c.hidden=true;c.occurrenceIndex++;return f};c.clone=function(){var e=new a.jqx.scheduler.appointment();e.allDay=c.allDay;e.from=c.from.clone();e.to=c.to.clone();e.subject=c.subject;e.description=c.description;e.location=c.location;e.tooltip=c.tooltip;e.resourceId=c.resourceId;e.category=c.category;e.status=c.status;e.color=c.color;e.borderColor=c.borderColor;e.background=c.background;e.style=c.style;e.timeZone=c.timeZone;e.hiddenByResourceId=c.hiddenByResourceId;if(c.hiddenByResourceId){e.hidden=true}e.id=c.id+"."+a.jqx.scheduler.utilities.guid();return e};c.isRecurrentAppointment=function(){return c.recurrentAppointment||c.recurrencePattern!=null};c.anyExceptions=function(){return c.exceptions!=null&&c.exceptions.length>0};c.anyOccurrences=function(){return c.occurrenceEnumerator!=null&&c.occurrenceEnumerator.getNextAppointment()};c.isException=function(){var g=c.rootAppointment||this;if(!g.recurrenceException){return false}for(var f=0;f=k)||(b.to=k)){b.currentTime=null;return true}if(a.jqx.scheduler.utilities.getEndOfDay(h.to).addDays(f)h.count){return false}return true}return false};b.getCanSetTime=function(c,e,d){if(!c.canCreateNewOccurence(e,b.calendar)){d=false}if(e0){b.recurrentAppointment=arguments[0];if(arguments[1]){b.calendar=arguments[1]}if(arguments[2]){b.from=arguments[2]}if(arguments[3]){b.to=arguments[3]}if(arguments[4]){b.scheduler=arguments[4]}if(arguments[2]===undefined){b.from=new a.jqx.date(0);b.to=new a.jqx.date(9999,12,31)}if(b.scheduler&&b.scheduler.localization){b.calendar.firstDay=b.scheduler.localization.firstDay}b.fillList()}return b};a.jqx.scheduler.recurrencePattern=function(){var c=this;var b={from:new a.jqx.date(0),to:new a.jqx.date(9999,12,31),count:1000,interval:1,exceptions:new Array(),newExceptions:new Array(),month:1,day:1,current:0,currentYearDay:0,step:0,days:[],bynweekday:[],isEveryWeekDay:true,timeZone:null,weekDays:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},freq:"daily",bymonth:null,bymonthday:null,byyearday:null,byweekno:null,byweekday:null};a.extend(true,c,b);c.getNewOccurenceDate=function(){var o=function(n,C){var k=0,D=[];if(n instanceof Array){for(;k0){var g=new a.jqx.date(c.from.year(),c.from.month(),1,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addMonths(c.step*c.interval);q(g.year());var B=g.month();var f=[c.mrange.slice(B-1,B+1)][0];var h=f[0];var m=f[1];m-=1;c.nwdaymask=o(0,c.yearlen);c.step++;for(var y=0;y0){var g=new a.jqx.date(c.from.year(),c.from.month(),c.bymonthday[c.current],c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addMonths(c.step*c.interval);c.current++;if(!c.bymonthday[c.current]){c.current=0;c.step++}}else{var g=new a.jqx.date(c.from.year(),c.from.month(),c.day,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addMonths(c.step*c.interval);c.step++}}return g;case"yearly":if(c.bymonth&&c.bymonth.length>0){if(c.bynweekday.length>0){var g=new a.jqx.date(c.from.year(),c.bymonth[c.current],1,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);q(g.year());var B=g.month();var f=[c.mrange.slice(B-1,B+1)][0];var h=f[0];var m=f[1];m-=1;c.nwdaymask=o(0,c.yearlen);for(var y=0;y0){var g=new a.jqx.date(c.from.year(),c.bymonth[c.current],c.byyearday[c.currentYearDay],c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.currentYearDay++;if(!c.byyearday[c.currentYearDay]){c.currentYearDay=0;c.current++;if(!c.bymonth[c.current]){c.current=0;c.step++}}}else{var g=new a.jqx.date(c.from.year(),c.bymonth[c.current],c.from.day(),c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.current++;if(!c.bymonth[c.current]){c.current=0;c.step++}}}}else{if(c.byyearday&&c.byyearday.length>0){var g=new a.jqx.date(c.from.year(),c.from.month(),c.byyearday[c.current],c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.current++;if(!c.byyearday[c.current]){c.current=0;c.step++}}else{if(c.byweekno!=null){var p=function(n,k){var i=1;var C=new a.jqx.date(k.year(),1,1,k.hour(),k.minute(),k.second());C.timeZone=c.timeZone;while(i!=n){C=C.addDays(7);i++;if(i>53){break}}while(a.jqx.scheduler.utilities.getWeekday(C.toDate())!=c.wkst){C=C.addDays(1)}return C};var g=c.from.addYears(c.step*c.interval);g=p(c.byweekno[c.current],g);if(c.byweekday){var e=g;for(var z=0;z<7;z++){if(j[e.dayOfWeek()]===c.byweekday[c.currentYearDay]){break}e=e.addDays(1)}g=e;c.currentYearDay++;if(!c.byweekday[c.currentYearDay]){c.currentYearDay=0;c.current++;if(!c.byweekno[c.current]){c.current=0;c.step++}}}else{c.current++;if(!c.byweekno[c.current]){c.current=0;c.step++}}}else{var g=new a.jqx.date(c.from.year(),c.month,c.day,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.step++}}}return g}};c.isDateInExceptionAppointment=function(d,e,f){switch(c.freq){case"daily":case"weekly":default:return d.year()==f.from.year()&&d.dayOfYear()==f.from.dayOfYear()}};c.createNewPattern=function(){if(c.ical){var d=new a.jqx.scheduler.recurrencePattern(c.ical);return d}else{var d=new a.jqx.scheduler.recurrencePattern();d.from=c.from;d.to=c.to;d.count=c.count;d.interval=c.interval;d.exceptions=c.exceptions;d.newExceptions=c.newExceptions;d.weekDays=c.weekDays;d.isEveryWeekDay=c.isEveryWeekDay;d.month=c.month;d.day=c.day;d.current=c.current;d.currentYearDay=c.currentYearDay;d.step=c.step;d.days=c.days;d.bynweekday=c.bynweekday;d.bymonth=c.bymonth;d.bymonthday=c.bymonthday;d.byyearday=c.byyearday;d.byweekno=c.byweekno;d.byweekday=c.byweekday;d.freq=d.freq;d.timeZone=d.timeZone;return d}};c.equals=function(e){var d=c.from==e.from&&c.to==e.to&&c.count===e.count&&c.interval===e.interval&&c.day===e.day&&c.month===e.month;return d};c.isDayOfWeekIncluded=function(e){var d=e.dayOfWeek();return a.jqx.scheduler.utilities.areWeekDaysIncluded(c.weekDays,d)};c.getWeekIndexFromDate=function(g,f){var e=f.firstDay;var h=a.jqx.scheduler.utilities.getStartOfWeek(c.from,f,e);var d=new a.jqx.timeSpan(g.subtract(h));return parseInt(d.days()/7)};c.canCreateNewOccurence=function(e,g){var d=e.toDate();switch(c.freq){case"daily":default:if(c.bymonth){if(c.bymonth.indexOf(e.month())==-1){return false}}if(c.isEveryWeekDay){if(!c.isDayOfWeekIncluded(e,g)){return false}else{return true}}else{return true}break;case"weekly":var f=c.getWeekIndexFromDate(e,g);if(c.bymonth){if(c.bymonth.indexOf(e.month())==-1){return false}}if((f%c.interval)!=0){return false}if(c.weekDays=={}){var h=e;if(c.from.dayOfWeek()!=h.dayOfWeek()){return false}}else{if(!c.isDayOfWeekIncluded(e,g)){return false}}break;case"monthly":case"yearly":if(c.bymonth){if(c.bymonth.indexOf(e.month())==-1){return false}}if(e0){c.month=c.bymonth[0]}else{c.month=c.from.month()}c.day=c.from.day();if(f.byweekday!=undefined){var h={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};c.weekDays={};for(var g=0;g0?"+":"")+String(i.n)+v}return v};this.getJsWeekday=function(){return i.weekday==6?0:i.weekday+1}};this.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"];this.YEARLY=0;this.MONTHLY=1;this.WEEKLY=2;this.DAILY=3;this.HOURLY=4;this.MINUTELY=5;this.SECONDLY=6;this.MO=new f(0);this.TU=new f(1);this.WE=new f(2);this.TH=new f(3);this.FR=new f(4);this.SA=new f(5);this.SU=new f(6);var d={freq:null,dtstart:null,interval:1,wkst:D.MO,count:null,until:null,bysetpos:null,bymonth:null,bymonthday:null,byyearday:null,byweekno:null,byweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null};this._string=null;this.toString=function(){var aa=this.origOptions;var Y,Z,V,W,U,k=[];Z=Object.keys(aa);V=Object.keys(d);for(var R=0;R>>0;if(typeof V!=="function"){throw new TypeError(V+" is not a function")}if(arguments.length>1){R=j}v=0;while(v0){Q.push(H)}else{if(H<0){I.push(H)}}}x.bymonthday=Q;x.bynmonthday=I}else{if(x.bymonthday<0){x.bynmonthday=[x.bymonthday];x.bymonthday=[]}else{x.bynmonthday=[];x.bymonthday=[x.bymonthday]}}}if(x.byweekno!==null&&!(x.byweekno instanceof Array)){x.byweekno=[x.byweekno]}if(x.byweekday===null){x.bynweekday=null}else{if(typeof x.byweekday=="number"){x.byweekday=[x.byweekday];x.bynweekday=null}else{if(x.byweekday instanceof f){if(!x.byweekday.n||x.freq>this.MONTHLY){x.byweekday=[x.byweekday.weekday];x.bynweekday=null}else{x.bynweekday=[[x.byweekday.weekday,x.byweekday.n]];x.byweekday=null}}else{var r=[],F=[];for(N=0;Nthis.MONTHLY){r.push(o.weekday)}else{F.push([o.weekday,o.n])}}}x.byweekday=C(r)?r:null;x.bynweekday=C(F)?F:null}}}if(x.byhour===null){x.byhour=(x.freq=this.HOURLY){this.timeset=null}else{this.timeset=[];if(x.byhour){for(N=0;N1&&C&&q.resourcesInMultipleICSFiles){var t=this.getAppointments();for(var E=0;E>16,d=h>>8&255,j=h&255;return"#"+(16777216+(Math.round((c-e)*i)+e)*65536+(Math.round((c-d)*i)+d)*256+(Math.round((c-j)*i)+j)).toString(16).slice(1)},hexToRgba:function(c,e){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(c);var d=function(){var f=a.jqx.browser.msie&&a.jqx.browser.version<10;if(this.alpha==undefined||f){return"rgb("+this.r+", "+this.g+", "+this.b+")"}if(this.alpha>1){this.alpha=1}else{if(this.alpha<0){this.alpha=0}}return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"};if(e==undefined){return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16),toString:d}:null}if(e>1){e=1}else{if(e<0){e=0}}return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16),alpha:e,toString:d}:null},getAppointmentColors:function(f){var e="";var d="";var c="";e=this.hexToRgba(f,this.appointmentOpacity).toString();d=f;var b=function(h){var g=105;var i=(h.r*0.299)+(h.g*0.587)+(h.b*0.114);var j=(255-ib.length-1){var j=parseInt(i.substring(6));if(j>=27){j=0}b=b.concat(this.colorSchemes[j].colors);j++}c=b[g];c=this.hexToRgba(b[g],this.appointmentOpacity).toString();e=b[g];var h=function(l){var k=105;var m=(l.r*0.299)+(l.g*0.587)+(l.b*0.114);var n=(255-m');this.columnsheader.children().remove();var b=this.columnsHeight;b=this._preparecolumnGroups();this.columnsheader.height(b);this._rendercolumnheaders()},_refreshColumnTitles:function(){var p=this._views[this._view].type;var o=this._views[this._view];var l=this;var d=new Array();if(l.columns.records[0].timeColumn){d.push({})}if(o.timeRuler&&o.timeRuler.timeZones){for(var v=0;v23){z=0}if(J>23){J=23}K=J-z+1}var D=60;var H=2;if(B){switch(B){case"sixtyMinutes":case"hour":H=1;break;case"thirdyMinutes":case"halfHour":H=2;break;case"fifteenMinutes":case"quarterHour":H=4;break;case"tenMinutes":H=6;break;case"fiveMinutes":H=12;break}}var M=new Array();var L="auto";if(o.timeRuler&&o.timeRuler.formatString){L=o.timeRuler.formatString}var y=z;var E=K;var j=A.addHours(y);if(l.rtl){var j=A.addHours(J)}for(var F=0;F");i.append(b);var j=a("
    "+h.schedulerLocalization.editDialogRepeatString+"
    ").appendTo(b);var l=a("
    ").appendTo(b);var k=a("
    ").appendTo(l);var r=a("
    ");i.append(r);var m=a("
    ");r.append(m);var o=function(H,A){var u=a("
    ").appendTo(H);var E=a("
    "+h.schedulerLocalization.editDialogRepeatEndString+"
    ").appendTo(u);var D=a("
    ").appendTo(u);var G=a("
    "+h.schedulerLocalization.editDialogRepeatNeverString+"
    ").appendTo(D);G.jqxRadioButton({rtl:h.rtl,groupName:"end"+A,theme:h.theme,width:200,checked:true});h.editDialogFields[A].repeatEndNever=G;h.editDialogFields[A].repeatEndNeverLabel=E;var z=a("
    ").appendTo(u);var y=a("
    ").appendTo(u);var F=a("
    "+h.schedulerLocalization.editDialogRepeatAfterString+"
    ").appendTo(y);F.jqxRadioButton({rtl:h.rtl,groupName:"end"+A,theme:h.theme,width:60,checked:false});var B=a("
    ").appendTo(y);B.jqxNumberInput({rtl:h.rtl,decimal:10,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var v=a("
    "+h.schedulerLocalization.editDialogRepeatOccurrencesString+"
    ").appendTo(y);h.editDialogFields[A].repeatEndAfter=F;h.editDialogFields[A].repeatEndAfterValue=B;h.editDialogFields[A].repeatEndAfterLabel=z;var x=a("
    ").appendTo(u);var w=a("
    ").appendTo(u);var t=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(w);t.jqxRadioButton({rtl:h.rtl,groupName:"end"+A,theme:h.theme,width:60,checked:false});var C=a("
    ").appendTo(w);C.jqxDateTimeInput({dropDownWidth:220,dropDownHeight:220,rtl:h.rtl,localization:h._getDateTimeInputLocalization(),firstDayOfWeek:h.schedulerLocalization.firstDay,todayString:h.schedulerLocalization.todayString,clearString:h.schedulerLocalization.clearString,value:c,formatString:h.editDialogDateFormatString,width:150,theme:h.theme});var s=C.jqxDateTimeInput("getInstance");h.editDialogFields[A].repeatEndOn=t;h.editDialogFields[A].repeatEndOnValue=C;h.editDialogFields[A].repeatEndOnLabel=x;return u};m.detach();h.editDialogFields.repeatEndPanel={};h.editDialogFields.repeatEndPanelContainer=m;o(m,"repeatEndPanel");var q=function(){var z=a("
    ").appendTo(a(document.body));var ad=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(z);var ay=a("
    ").appendTo(z);var am=a("
    ").appendTo(ay);am.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var V=a("
    "+h.schedulerLocalization.editDialogRepeatEveryDayString+"
    ").appendTo(ay);h.editDialogFields.daily={};h.editDialogFields.daily.repeatDayInterval=am;h.editDialogFields.daily.repeatDayLabel=ad;h.editDialogFields.daily.panel=z;z.detach();h.editDialogFields.weekly={};var E=a("
    ").appendTo(a(document.body));var ag=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(E);var t=a("
    ").appendTo(E);var at=a("
    ").appendTo(t);at.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var W=a("
    "+h.schedulerLocalization.editDialogRepeatEveryWeekString+"
    ").appendTo(t);h.editDialogFields.weekly.repeatWeekInterval=at;h.editDialogFields.weekly.repeatWeekIntervalLabel=ag;var F=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(E);var Z=a("
    ").appendTo(E);var T=a("
    ").appendTo(Z);h.editDialogFields.weekly.repeatDaysLabel=F;h.editDialogFields.weekly.repeatDays=new Array();for(var aw=0;aw<7;aw++){var P=h._getDayName(aw,"firstTwoLetters");var B=a("
    "+P+"
    ");T.append(B);var Y=aw==1?true:false;B.jqxCheckBox({rtl:h.rtl,checked:Y,width:50,theme:h.theme});h.editDialogFields.weekly.repeatDays.push(B)}h.editDialogFields.weekly.panel=E;E.detach();h.editDialogFields.monthly={};var U=a("
    ").appendTo(a(document.body));var av=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(U);var M=a("
    ").appendTo(U);var A=a("
    ").appendTo(M);A.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var ai=a("
    "+h.schedulerLocalization.editDialogRepeatEveryMonthString+"
    ").appendTo(M);h.editDialogFields.monthly.repeatMonth=A;h.editDialogFields.monthly.repeatMonthLabel=av;var an=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(U);var H=a("
    ").appendTo(U);var x=a("
    ").appendTo(H);var al=a("
    "+h.schedulerLocalization.editDialogRepeatEveryMonthDayString+"
    ").appendTo(x);al.jqxRadioButton({rtl:h.rtl,groupName:"month",width:60,checked:true,theme:h.theme});var ao=a("
    ").appendTo(x);ao.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});h.editDialogFields.monthly.repeatMonthDay=ao;h.editDialogFields.monthly.repeatMonthDayBool=al;h.editDialogFields.monthly.repeatMonthDayLabel=an;var O=a("
    ").appendTo(U);var aj=a("
    ").appendTo(U);var aa=a("
    ").appendTo(aj);var G=a("
    ").appendTo(aa);G.jqxRadioButton({groupName:"month",width:25,checked:false,theme:h.theme});var L=a("
    ").appendTo(aa);var Q=new Array();Q.push(h.schedulerLocalization.editDialogRepeatFirstString);Q.push(h.schedulerLocalization.editDialogRepeatSecondString);Q.push(h.schedulerLocalization.editDialogRepeatThirdString);Q.push(h.schedulerLocalization.editDialogRepeatFourthString);Q.push(h.schedulerLocalization.editDialogRepeatLastString);L.jqxDropDownList({height:27,dropDownWidth:150,selectedIndex:0,source:Q,autoDropDownHeight:true,width:"auto",theme:h.theme});var S=a("
    ").appendTo(aa);var ac=new Array();for(var aw=0;aw<7;aw++){var P=h._getDayName(aw);ac.push(P)}S.jqxDropDownList({height:27,rtl:h.rtl,dropDownWidth:150,autoDropDownHeight:true,selectedIndex:1,source:ac,width:"auto",theme:h.theme});h.editDialogFields.monthly.repeatDayOfWeekBool=G;h.editDialogFields.monthly.repeatDayOfWeek=S;h.editDialogFields.monthly.repeatDayOfWeekLabel=O;h.editDialogFields.monthly.repeatDayOfWeekType=L;h.editDialogFields.monthly.panel=U;U.detach();h.editDialogFields.yearly={};var aq=a("
    ").appendTo(a(document.body));var R=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(aq);var ak=a("
    ").appendTo(aq);var ab=a("
    ").appendTo(ak);ab.jqxNumberInput({decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var D=a("
    "+h.schedulerLocalization.editDialogRepeatEveryYearString+"
    ").appendTo(ak);h.editDialogFields.yearly.repeatYear=ab;h.editDialogFields.yearly.repeatYearLabel=R;var N=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(aq);var ah=a("
    ").appendTo(aq);var X=a("
    ").appendTo(ah);var af=a("
    ").appendTo(X);af.jqxRadioButton({rtl:h.rtl,groupName:"year",width:25,checked:true,theme:h.theme});h.editDialogFields.yearly.repeatYearBool=af;h.editDialogFields.yearly.repeatYearBoolLabel=N;var v=a("
    ").appendTo(X);var ap=new Array();for(var aw=0;aw<12;aw++){var ax=h.schedulerLocalization.months.names[aw];ap.push(ax)}v.jqxDropDownList({height:27,selectedIndex:0,dropDownWidth:150,width:"auto",source:ap,theme:h.theme});h.editDialogFields.yearly.repeatYearMonth=v;var y=a("
    ").appendTo(X);y.jqxNumberInput({height:25,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});h.editDialogFields.yearly.repeatYearDay=y;var ae=a("
    ").appendTo(aq);var s=a("
    ").appendTo(aq);var ar=a("
    ").appendTo(s);var C=a("
    ").appendTo(ar);C.jqxRadioButton({rtl:h.rtl,groupName:"year",width:25,checked:false,theme:h.theme});var au=a("
    ").appendTo(ar);h.editDialogFields.yearly.repeatDayOfWeekBool=C;h.editDialogFields.yearly.repeatDayOfWeekType=au;h.editDialogFields.yearly.repeatDayOfWeekLabel=ae;var K=new Array();K.push(h.schedulerLocalization.editDialogRepeatFirstString);K.push(h.schedulerLocalization.editDialogRepeatSecondString);K.push(h.schedulerLocalization.editDialogRepeatThirdString);K.push(h.schedulerLocalization.editDialogRepeatFourthString);K.push(h.schedulerLocalization.editDialogRepeatLastString);au.jqxDropDownList({height:27,dropDownWidth:150,selectedIndex:0,source:K,autoDropDownHeight:true,width:"auto",theme:h.theme});var I=a("
    ").appendTo(ar);h.editDialogFields.yearly.repeatDayOfWeek=I;var u=new Array();for(var aw=0;aw<7;aw++){var P=h._getDayName(aw);u.push(P)}I.jqxDropDownList({height:27,rtl:h.rtl,dropDownWidth:150,selectedIndex:1,autoDropDownHeight:true,source:u,width:"auto",theme:h.theme});var ap=new Array();var J=a("
    "+h.schedulerLocalization.editDialogRepeatOfString+"
    ").appendTo(ar);var w=a("
    ").appendTo(ar);for(var aw=0;aw<12;aw++){var ax=h.schedulerLocalization.months.names[aw];ap.push(ax)}h.editDialogFields.yearly.repeatDayOfWeekMonth=w;w.jqxDropDownList({height:27,rtl:h.rtl,dropDownWidth:150,selectedIndex:0,source:ap,width:"auto",theme:h.theme});h.editDialogFields.yearly.panel=aq;aq.detach()};if(h.editAppointment&&h.editAppointment.rootAppointment){q()}else{q()}var g=a("
    ");i.append(g);var f=a("
    "+h.schedulerLocalization.editDialogExceptionsString+"
    ").appendTo(g);var e=a("
    ").appendTo(g);var d=a("
    "+h.schedulerLocalization.editDialogResetExceptionsString+"
    ").appendTo(e);d.jqxCheckBox({width:"100%",theme:h.theme});g.hide();h.editDialogFields.resetExceptions=d;h.editDialogFields.resetExceptionsLabel=f;h.editDialogFields.resetExceptionsContainer=g;var n=new Array();n.push(h.schedulerLocalization.editDialogRepeatNeverString);n.push(h.schedulerLocalization.editDialogRepeatDailyString);n.push(h.schedulerLocalization.editDialogRepeatWeeklyString);n.push(h.schedulerLocalization.editDialogRepeatMonthlyString);n.push(h.schedulerLocalization.editDialogRepeatYearlyString);k.jqxDropDownList({rtl:h.rtl,height:27,width:"100%",autoDropDownHeight:true,theme:h.theme,source:n,selectedIndex:0});h.editDialogFields.repeat=k;h.editDialogFields.repeatLabel=j;h.editDialogFields.repeatContainer=b;h.editDialogFields.repeatPanel=r;this.addHandler(k,"change",function(u){var t=u.args.item.index;var s=function(){r.children().detach();switch(t){case 0:break;case 1:h.editDialogFields.daily.panel.css("visibility","visible");r.append(h.editDialogFields.daily.panel);break;case 2:h.editDialogFields.weekly.panel.css("visibility","visible");r.append(h.editDialogFields.weekly.panel);break;case 3:h.editDialogFields.monthly.panel.css("visibility","visible");r.append(h.editDialogFields.monthly.panel);break;case 4:h.editDialogFields.yearly.panel.css("visibility","visible");r.append(h.editDialogFields.yearly.panel);break}r.append(m);if(t==0){h.editDialogFields.repeatEndPanelContainer.hide()}else{h.editDialogFields.repeatEndPanelContainer.show()}if(!h.isTouchDevice()){p.jqxWindow({height:150});p.jqxWindow({height:i[0].scrollHeight+40})}}()})},_initMenu:function(){var c=this;if(this.host.jqxMenu){if(this.menu){if(this._hasOpenedMenu){return}this.removeHandler(this.menu,"keydown");this.removeHandler(this.menu,"closed");this.removeHandler(this.menu,"itemclick");this.menu.jqxMenu("destroy");this.menu.removeData();this.menu.remove()}this.menuitemsarray=new Array();this.menu=a('');this.host.append(this.menu);this.addHandler(a(window),"orientationchange.jqxscheduler"+this.element.id,function(){c.menu.jqxMenu("close");c._hasOpenedMenu=false});this.addHandler(a(window),"orientationchanged.jqxscheduler"+this.element.id,function(){c.menu.jqxMenu("close");c._hasOpenedMenu=false});this.removeHandler(this.menu,"keydown");this.addHandler(this.menu,"keydown",function(e){if(e.keyCode==27){c.menu.jqxMenu("close");c._hasOpenedMenu=false;c.focus()}});this.addHandler(this.menu,"open",function(e){if(c.contextMenuOpen){c.contextMenuOpen(c.menu,c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null,e)}c._raiseEvent("contextMenuOpen",{menu:c.menu,appointment:c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null});c._removeFeedbackAndStopResize()});this.addHandler(this.menu,"close",function(e){if(c.contextMenuClose){c.contextMenuClose(c.menu,c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null,e)}c._hasOpenedMenu=false;if(document.activeElement&&document.activeElement.className.indexOf("jqx-menu")>=0&&!c.menuOpening){c.focus()}c._raiseEvent("contextMenuClose",{menu:c.menu,appointment:c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null})});this.addHandler(this.host,"contextmenu",function(e){e.preventDefault();e.stopPropagation();return false});this.addHandler(this.menu,"itemclick",function(h){var g=c.menu.jqxMenu("getItem",h.args.id);c._raiseEvent("contextMenuItemClick",{item:g,menu:c.menu,appointment:c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null});if(c.contextMenuItemClick){var f=c.contextMenuItemClick(c.menu,c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null,h);if(f==true){if(new Date()-c.renderedTime>500){c._renderrows()}c.menu.jqxMenu("close");c._hasOpenedMenu=false;return}}if(g.id=="createAppointment"){c._initDialog();c._openDialog();if(h.args.clickType=="keyboard"){c.menu.jqxMenu("close");c._hasOpenedMenu=false}}else{if(g.id=="editAppointment"){var e=c.getJQXAppointmentByElement(c.selectedAppointment);if(!e.readOnly){var f=c._initDialog(e);if(f!==false){c._openDialog()}}if(h.args.clickType=="keyboard"){c.menu.jqxMenu("close");c._hasOpenedMenu=false}}else{if(h.args.clickType=="keyboard"){c.menu.jqxMenu("close");c._hasOpenedMenu=false}return true}}});var d=new Array();d.push({label:this.schedulerLocalization.contextMenuEditAppointmentString,id:"editAppointment"});d.push({label:this.schedulerLocalization.contextMenuCreateAppointmentString,id:"createAppointment"});var b={rtl:this.rtl,keyboardNavigation:true,source:d,popupZIndex:999999,autoOpenPopup:false,mode:"popup",theme:this.theme,animationShowDuration:0,animationHideDuration:0,animationShowDelay:0};if(c.contextMenuCreate){c.contextMenuCreate(c.menu,b)}c._raiseEvent("contextMenuCreate",{menu:c.menu,settings:b});this.menu.jqxMenu(b)}},_initDialog:function(b,c){var m=this;var k=null;if(b&&b.isRecurrentAppointment()&&!m.editRecurrenceDialog.jqxWindow("isOpen")){var l=m.host.coord();var o=l.top+m.host.height()/2-m.editRecurrenceDialog.height()/2;var g=l.left+m.host.width()/2-m.editRecurrenceDialog.width()/2;m.editRecurrenceDialog.find("button:first").focus();setTimeout(function(){m.editRecurrenceDialog.find("button:first").focus()},25);m.editRecurrenceDialog.jqxWindow("move",g,o);m.editRecurrenceDialog.jqxWindow("open");m.editSeries=function(i){if(i){m._initDialog(b.rootAppointment);m._openDialog()}else{m._initDialog(b);m._openDialog()}};m.overlay.show();m.overlay.width(m.host.width());m.overlay.height(m.host.height());var l=m.host.coord();m.overlay.offset(l);if(!m._editDialog){m._initDialog()}return false}m.editAppointment=b;if(!b){k=m.getSelection();if(!k){m.focus();if(!m.focusedCell){m._updateFocusedCell()}if(m.focusedCell){m.focusedCell.setAttribute("data-selected","true");m._lastSelectedCell=m.focusedCell;m._updateCellsSelection(m.focusedCell);k=m.getSelection()}}}if(k||b){var d=k?k.from:b.from;var h=k?k.to:b.to;var n=m.getSelectedCells();if(n.length>0){var f=n[n.length-1].getAttribute("data-end-date");if(f){h=a.jqx.scheduler.utilities.getEndOfDay(h)}}m._editStart=d;m._editEnd=h}if(m.editDialogFields&&m.editDialogFields.resourceContainer&&m._resources.length>0){var e=new Array();for(var j=0;j10){r=false}m.editDialogFields.resource.jqxDropDownList({source:e,selectedIndex:0,autoDropDownHeight:r});if(!b){m.editDialogFields.resource.val(k.resourceId)}}if(m.editDialogFields&&m.editDialogFields.repeatContainer){if(b&&b.rootAppointment){m.editDialogFields.repeatContainer.hide();m.editDialogFields.repeatPanel.hide()}else{m.editDialogFields.repeatContainer.show();m.editDialogFields.repeatPanel.show()}}if(m._editDialog==null){m._editDialog=null;var p=b==null?m.schedulerLocalization.editDialogCreateTitleString:m.schedulerLocalization.editDialogTitleString;var q=a("
    "+p+"
    ");a(q).jqxWindow({rtl:m.rtl,autoFocus:false,autoOpen:false,animationType:"none",theme:m.theme,width:540,maxHeight:800,minHeight:110,resizable:false,initContent:function(){m.editDialogFields={};if(d==null&&h==null&&m._editStart&&m._editEnd){d=m._editStart;h=m._editEnd}q.jqxWindow("setTitle",p);var H=a(q.children()[1]);var A=a("
    ");H.append(A);var C=a("
    "+m.schedulerLocalization.editDialogSubjectString+"
    ").appendTo(A);var ad=a("
    ").appendTo(A);var U=a("").appendTo(ad);U.jqxInput({height:25,rtl:m.rtl,width:"100%",theme:m.theme});U.css("box-sizing","border-box");m.editDialogFields.subject=U;m.editDialogFields.subjectLabel=C;m.editDialogFields.subjectContainer=A;var P=a("
    ");H.append(P);var z=a("
    "+m.schedulerLocalization.editDialogLocationString+"
    ").appendTo(P);var Z=a("
    ").appendTo(P);var T=a("").appendTo(Z);T.jqxInput({height:25,rtl:m.rtl,width:"100%",theme:m.theme});T.css("box-sizing","border-box");m.editDialogFields.location=T;m.editDialogFields.locationLabel=z;m.editDialogFields.locationContainer=P;var L=a("
    ");H.append(L);var X=a("
    "+m.schedulerLocalization.editDialogFromString+"
    ").appendTo(L);var av=a("
    ").appendTo(L);var aq=a("
    ").appendTo(av);var V=null;if(!d){var ay=new Date();ay.setHours(9,0,0);V=ay;d=new a.jqx.date(ay)}else{V=d.toDate()}aq.jqxDateTimeInput({height:27,dropDownWidth:220,dropDownHeight:220,rtl:m.rtl,localization:m._getDateTimeInputLocalization(),firstDayOfWeek:m.schedulerLocalization.firstDay,todayString:m.schedulerLocalization.todayString,clearString:m.schedulerLocalization.clearString,value:V,formatString:m.editDialogDateTimeFormatString,width:"100%",showTimeButton:true,theme:m.theme});m.editDialogFields.from=aq;m.editDialogFields.fromLabel=X;m.editDialogFields.fromContainer=L;var aC=a("
    ");H.append(aC);var y=a("
    "+m.schedulerLocalization.editDialogToString+"
    ").appendTo(aC);var Y=a("
    ").appendTo(aC);var S=a("
    ").appendTo(Y);var x=null;if(!h){var ay=new Date();ay.setHours(10,0,0);x=ay;h=new a.jqx.date(ay)}else{x=h.toDate()}S.jqxDateTimeInput({height:27,dropDownWidth:220,dropDownHeight:220,rtl:m.rtl,localization:m._getDateTimeInputLocalization(),firstDayOfWeek:m.schedulerLocalization.firstDay,todayString:m.schedulerLocalization.todayString,clearString:m.schedulerLocalization.clearString,value:x,formatString:m.editDialogDateTimeFormatString,width:"100%",showTimeButton:true,theme:m.theme});m.editDialogFields.to=S;m.editDialogFields.toLabel=y;m.editDialogFields.toContainer=aC;m._changeFromUser=true;m.addHandler(aq,"change",function(aH){if(!m._changeFromUser){return}var aF=aH.args;var aK=aH.args.oldValue;var aJ=S.val("date");var aE=new a.jqx.date(aJ)-new a.jqx.date(aK);if(aE>0){var aG=aE*10000;var aI=a.jqx.timeSpan(aG);var i=new a.jqx.date(aH.args.newValue).add(aI);S.val(i.toDate())}});m.addHandler(S,"change",function(aE){if(!m._changeFromUser){return}var i=aE.args;var aG=aE.args.oldValue;var aF=S.val("date");if(aq.val("date")>=aF){S.val(aG)}});var t=a("
    ");H.append(t);var R=a("
    "+m.schedulerLocalization.editDialogAllDayString+"
    ").appendTo(t);var ar=a("
    ").appendTo(t);var ai=a("
    ").appendTo(ar);ai.jqxCheckBox({rtl:m.rtl,width:25,theme:m.theme});m.editDialogFields.allDay=ai;m.editDialogFields.allDayLabel=R;m.editDialogFields.allDayContainer=t;m.addHandler(t,"change",function(i){if(i.args.checked){S.jqxDateTimeInput({showTimeButton:false,formatString:m.editDialogDateFormatString});aq.jqxDateTimeInput({showTimeButton:false,formatString:m.editDialogDateFormatString})}else{S.jqxDateTimeInput({showTimeButton:true,formatString:m.editDialogDateTimeFormatString});aq.jqxDateTimeInput({showTimeButton:true,formatString:m.editDialogDateTimeFormatString})}});if(a.jqx.scheduler.utilities.getStartOfDay(d).equals(d)&&a.jqx.scheduler.utilities.getEndOfDay(h).equals(h)){m.editDialogFields.allDay.val(true)}if(m._views[m._view].type.indexOf("month")>=0||(d&&d.equals(h))||(h&&h.equals(a.jqx.scheduler.utilities.getEndOfDay(h))&&d&&d.equals(a.jqx.scheduler.utilities.getStartOfDay(d)))){m.editDialogFields.allDay.val(true)}var w=a("
    ");H.append(w);var W=a("
    "+m.schedulerLocalization.editDialogTimeZoneString+"
    ").appendTo(w);var at=a("
    ").appendTo(w);var ao=a("
    ").appendTo(at);var u=new Array();u.push({displayName:m.schedulerLocalization.editDialogSelectTimeZoneString,id:null});u=u.concat(m.timeZones);for(var aw=0;aw=0){var af=au.displayName.substring(2+G)}else{var af=au.displayName}au.searchName=af}ao.jqxDropDownList({height:27,rtl:m.rtl,placeHolder:m.schedulerLocalization.editDialogSelectTimeZoneString,width:"100%",theme:m.theme,searchMember:"searchName",source:u,displayMember:"displayName",valueMember:"id"});m.editDialogFields.timeZone=ao;m.editDialogFields.timeZoneLabel=W;m.editDialogFields.timeZoneContainer=w;m.initRepeatPanels(q,H,h.toDate());if(m.editDialogFields&&m.editDialogFields.repeatContainer){if(m.editAppointment&&m.editAppointment.rootAppointment){m.editDialogFields.repeatContainer.hide();m.editDialogFields.repeatPanel.hide()}else{m.editDialogFields.repeatContainer.show();m.editDialogFields.repeatPanel.show()}}var K=a("
    ");H.append(K);var aA=a("
    "+m.schedulerLocalization.editDialogDescriptionString+"
    ").appendTo(K);var O=a("
    ").appendTo(K);var D=a("").appendTo(O);D.jqxInput({rtl:m.rtl,height:40,width:"100%",theme:m.theme});D.css("box-sizing","border-box");m.editDialogFields.description=D;m.editDialogFields.descriptionLabel=aA;m.editDialogFields.descriptionContainer=K;var ac=a("
    ");H.append(ac);var aD=a("
    "+m.schedulerLocalization.editDialogColorString+"
    ").appendTo(ac);var Q=a("
    ").appendTo(ac);var F=a("
    ").appendTo(Q);var I=function(aE){if(aE==-1){return""}var i=m.colors[aE];var aF="";var aF="";aF+="
    ";return aF};var an=function(aG,aE){if(aE<0){aG.css("top","4px");aG.css("position","relative");return aG[0].outerHTML}var i=m.colors[aE];var aF="";aF+="
    ";return aF};F.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:-1,placeHolder:m.schedulerLocalization.editDialogColorPlaceHolderString,selectionRenderer:an,renderer:I,source:m.colors,width:"100%",theme:m.theme});m.editDialogFields.color=F;m.editDialogFields.colorLabel=aD;m.editDialogFields.colorContainer=ac;var ah=a("
    ");H.append(ah);var az=a("
    "+m.schedulerLocalization.editDialogStatusString+"
    ").appendTo(ah);var N=a("
    ").appendTo(ah);var B=a("
    ").appendTo(N);B.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:2,autoDropDownHeight:true,source:m.schedulerLocalization.editDialogStatuses,width:"100%",theme:m.theme});m.editDialogFields.status=B;m.editDialogFields.statusLabel=az;m.editDialogFields.statusContainer=ah;var ag=a("
    ");H.append(ag);var M=a("
    "+m.schedulerLocalization.editDialogResourceIdString+"
    ").appendTo(ag);var am=a("
    ").appendTo(ag);var ab=a("
    ").appendTo(am);var E=new Array();for(var aw=0;aw10){v=false}ab.jqxDropDownList({height:27,rtl:m.rtl,source:E,selectedIndex:0,autoDropDownHeight:v,width:"100%",theme:m.theme});m.editDialogFields.resource=ab;m.editDialogFields.resourceLabel=M;m.editDialogFields.resourceContainer=ag;if(E.length==0){ag.hide()}if(!b&&k){m.editDialogFields.resource.val(k.resourceId)}var ae=a("
    ");H.append(ae);var al=a("
    ").appendTo(ae);var ap=a("").appendTo(al);var aj=a("").appendTo(al);var ak=a("").appendTo(al);var J=a("").appendTo(al);var aa=a("").appendTo(al);var aB=a("").appendTo(al);var s=a("").appendTo(al);var ax=25;if(m.isTouchDevice()){ax=null}aj.jqxButton({rtl:m.rtl,theme:m.theme});ak.jqxButton({rtl:m.rtl,theme:m.theme});J.jqxButton({rtl:m.rtl,theme:m.theme});aa.jqxButton({rtl:m.rtl,theme:m.theme});ap.jqxButton({rtl:m.rtl,theme:m.theme});aB.jqxButton({rtl:m.rtl,theme:m.theme});s.jqxButton({rtl:m.rtl,theme:m.theme});aB.hide();s.hide();m.editDialogFields.saveOccurrenceButton=s;m.editDialogFields.saveSeriesButton=aB;m.editDialogFields.saveButton=aa;m.editDialogFields.cancelButton=ap;m.editDialogFields.deleteButton=aj;m.editDialogFields.deleteSeriesButton=ak;m.editDialogFields.deleteExceptionsButton=J;m.editDialogFields.buttons=al;m.addHandler(aj,"click",function(){q.jqxWindow("close");m.overlay.hide();m._deleteAppointment(m.editAppointment)});m.addHandler(ap,"click",function(){q.jqxWindow("close");m.overlay.hide()});m.addHandler(s,"click",function(){if(!m.editAppointment.isException()){if(m.editAppointment.rootAppointment!=null){m.editAppointment.rootAppointment.exceptions.push(m.editAppointment);m.editAppointment.rootAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}else{m.editAppointment.exceptions.push(m.editAppointment);m.editAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}}else{var aG=m.editAppointment.rootAppointment?m.editAppointment.rootAppointment.exceptions:m.editAppointment.exceptions;for(var aF=0;aF=0){m.editDialogFields.color.val(b.borderColor)}else{m.editDialogFields.color.jqxDropDownList("clearSelection")}m.editDialogFields.allDay.val(b.allDay);m.editDialogFields.resource.val(b.resourceId);m.editDialogFields.status.val(b.status);if(b.timeZone){b.from=b.from.toTimeZone(b.timeZone);b.to=b.to.toTimeZone(b.timeZone)}d=b.from;h=b.to;if(a.jqx.scheduler.utilities.getStartOfDay(d).equals(d)&&a.jqx.scheduler.utilities.getEndOfDay(h).equals(h)){m.editDialogFields.allDay.val(true)}m._setAppointmentPropertiesToDialog(b,d,h,k?k.resourceId:null)}else{m.editDialogFields.saveButton.show();m._setAppointmentPropertiesToDialog(null,d,h,k?k.resourceId:null)}if(d&&h){m._changeFromUser=false;m.editDialogFields.from.val(d.toDate());m.editDialogFields.to.val(h.toDate());m._changeFromUser=true}if(!m.isTouchDevice()){m._editDialog.jqxWindow({height:150});m._editDialog.jqxWindow({height:a(m._editDialog.children())[1].scrollHeight+40})}}});m.removeHandler(m._editDialog,"keydown");m.addHandler(m._editDialog,"keydown",function(s){if(m.editDialogKeyDown){var i=m.editDialogKeyDown(q,m.editDialogFields,m.editAppointment,s);if(i!=undefined){return i}}if(s.keyCode==13){if(a(document.activeElement).ischildof(m._editDialog)){if(document.activeElement.nodeName.toLowerCase()=="button"){return true}if(b){if(b.isException()||b.rootAppointment){m.editDialogFields.saveOccurrenceButton.trigger("click")}else{if(b.isRecurrentAppointment()){m.editDialogFields.saveSeriesButton.trigger("click")}else{m.editDialogFields.saveButton.trigger("click")}}}else{m.editDialogFields.saveButton.trigger("click")}}}else{if(s.keyCode==27){m.editDialogFields.cancelButton.trigger("click")}}})},openMenu:function(e,c){var d=this;if(!d.menu){d._initMenu()}var b=d._views[d._view].type;if(d.contextMenu&&d.menu){if(!d.selectedAppointment){d.menu.jqxMenu("hideItem","editAppointment")}else{d.menu.jqxMenu("showItem","editAppointment")}if(arguments.length<2){if(d.selectedAppointment){var f=d.selectedAppointment.coord();e=f.left;c=f.top}else{if(d.focusedCell){var f=a(d.focusedCell).coord()}}e=f.left;c=f.top}d.menu.jqxMenu("open",e,c);d._hasOpenedMenu=true}},closeMenu:function(){var b=this;if(b.contextMenu&&b.menu){setTimeout(function(){b.menu.jqxMenu("close")})}},closeDialog:function(){var b=this;b._editDialog.jqxWindow("close")},openDialog:function(d,e){var f=this;var c=f._views[f._view].type;if(f.selectedJQXAppointment){var b=f._initDialog(f.selectedJQXAppointment);if(b!==false){f._openDialog(d,e)}}else{if(f.getSelection()==null){f.focus();f.focusedCell.setAttribute("data-selected","true");f._lastSelectedCell=f.focusedCell;f._updateCellsSelection(f.focusedCell)}f._initDialog();f._openDialog(d,e)}},_openDialog:function(d,c){var f=this;var j=f._views[f._view].type;if(!f.editDialog){return}var e=f.host.coord();f.overlay.show();f.overlay.css("z-index",9999999);f.overlay.width(f.host.width());f.overlay.height(f.host.height());f.overlay.offset(e);var g=f.isTouchDevice();if(g){f._editDialog.jqxWindow("move",e.left,e.top);f._editDialog.jqxWindow({draggable:false,maxWidth:f.host.width(),maxHeight:f.host.height()});f._editDialog.jqxWindow({width:f.host.width(),height:f.host.height()});f._editDialog.jqxWindow("open");f._editDialog.jqxWindow("move",e.left,e.top)}else{if(d!=undefined&&c!=undefined){f._editDialog.jqxWindow("move",d,c);f._editDialog.jqxWindow("open")}else{var i=f._editDialog.height();if(i<400){i=400}var h=e.top+f.host.height()/2-i/2;var b=e.left+f.host.width()/2-f._editDialog.width()/2;f._editDialog.jqxWindow("move",b,h);f._editDialog.jqxWindow("open")}}setTimeout(function(){f.overlay.css("z-index",999)},50)},_setAppointmentPropertiesFromDialog:function(c,d){var e=this;var b=function(n){var x=e._views[e._view].type;var u=e._views[e._view];var A=e.editDialogFields.from.val("date");var h=e.editDialogFields.to.val("date");if(A>h){e.editDialogFields.from.jqxDateTimeInput("focus");return false}if(A==h){if(x.indexOf("month")>=0){return true}return false}n.resourceId=e.editDialogFields.resource.val();if(e.editDialogFields.resourceContainer.css("display")=="none"){n.resourceId=""}n.description=e.editDialogFields.description.val();n.allDay=e.editDialogFields.allDay.val();n.status=e.editDialogFields.status.val();n.location=e.editDialogFields.location.val();n.timeZone=e.editDialogFields.timeZone.val();if(n.timeZone==""&&e.timeZone!=""){n.timeZone=e.timeZone}n.from=new a.jqx.date(A,n.timeZone);n.to=new a.jqx.date(h,n.timeZone);if(e.timeZone){n.from=n.from.toTimeZone(e.timeZone);n.to=n.to.toTimeZone(e.timeZone)}else{n.from=n.from.toTimeZone(null);n.to=n.to.toTimeZone(null)}if(n.allDay){n.from=a.jqx.scheduler.utilities.getStartOfDay(n.from);n.to=a.jqx.scheduler.utilities.getEndOfDay(n.to)}if(e.editDialogFields.color.val()){var v=e.getAppointmentColors(e.editDialogFields.color.val());n.color=v.color;n.background=v.background;n.borderColor=v.border}n.subject=e.editDialogFields.subject.val();var f=e.editDialogFields.repeat.jqxDropDownList("selectedIndex");var r=new a.jqx.scheduler.recurrencePattern();var j=e.editDialogFields.repeatEndPanel;r.timeZone=e.timeZone;r.from=n.from.clone();if(d=="occurrence"){if(n.rootAppointment){r.from=n.rootAppointment.from.clone()}}if(e.editDialogFields.resetExceptions.val()){n.exceptions=new Array();n.recurrenceException=new Array()}if(j.repeatEndNever.val()){r.count=1000;r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndAfter.val()){r.count=j.repeatEndAfterValue.val();r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndOn.val()){r.count=1000;var h=new a.jqx.date(j.repeatEndOnValue.jqxDateTimeInput("getDate"),e.timeZone);r.to=h}}}switch(f){case 0:default:n.clearRecurrence();break;case 1:var k=e.editDialogFields.daily;var F=k.repeatDayInterval.val();r.interval=F;r.freq="daily";break;case 2:var w=e.editDialogFields.weekly;var F=w.repeatWeekInterval.val();var q=[{Sunday:0},{Monday:1},{Tuesday:2},{Wednesday:3},{Thursday:4},{Friday:5},{Saturday:6}];var p=w.repeatDays;var o=new Array();r.weekDays={};for(var C=0;C<7;C++){var B=p[C].val();if(B){if(C==0){o.push(6)}else{o.push(C-1)}a.extend(r.weekDays,q[C])}}r.freq="weekly";r.byweekday=o;r.interval=F;break;case 3:var D=e.editDialogFields.monthly;var F=D.repeatMonth.val();if(D.repeatMonthDayBool.val()){r.day=D.repeatMonthDay.val();r.bymonthday=new Array();r.bymonthday.push(r.day)}else{var y=D.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=D.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="monthly";r.interval=F;break;case 4:var G=e.editDialogFields.yearly;var F=G.repeatYear.val();if(G.repeatYearBool.val()){r.day=G.repeatYearDay.val();r.month=G.repeatYearMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);r.byyearday=new Array();r.byyearday.push(r.day)}else{r.month=G.repeatDayOfWeekMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);var y=G.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=G.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="yearly";r.interval=F;break}if(n.rootAppointment){n.rootAppointment.recurrencePattern=r}else{if(f>0){n.recurrencePattern=r}}var m={};var t={};for(var H in e.appointmentDataFields){var g=e.appointmentDataFields[H];var z=n[H];m[H]=z;if(H=="from"||H=="to"){z=z.toDate()}t[g]=z}m.originalData=t;m.jqxAppointment=n;n.boundAppointment=m;return true}(c);return b},_setAppointmentPropertiesToDialog:function(e,h,d,g){var f=this;var c=function(){var p=f.editDialogFields.repeatEndPanel;p.repeatEndNever.jqxRadioButton({checked:true});p.repeatEndAfter.jqxRadioButton({checked:false});p.repeatEndAfterValue.val(1);p.repeatEndOnValue.val(l);var l=d.toDate();if(f.editDialogFields.daily){var j=f.editDialogFields.daily;j.repeatDayInterval.val(1)}if(f.editDialogFields.weekly){var o=f.editDialogFields.weekly;for(var m=0;m=0||(h&&h.equals(d))||(d&&d.equals(a.jqx.scheduler.utilities.getEndOfDay(d))&&h&&h.equals(a.jqx.scheduler.utilities.getStartOfDay(h)))){f.editDialogFields.allDay.val(true)}f.editDialogFields.color.jqxDropDownList("clearSelection");f.editDialogFields.description.val("");f.editDialogFields.subject.val("");f.editDialogFields.repeat.jqxDropDownList("selectIndex",0);return}var b=function(j){var r=j.recurrencePattern;if(j.rootAppointment){var r=j.rootAppointment.recurrencePattern}if(r==null){return}var k=r.freq;var p=0;if(k=="daily"){p=1}if(k=="weekly"){p=2}if(k=="monthly"){p=3}if(k=="yearly"){p=4}var n=f.editDialogFields.repeatEndPanel;if(r.count!=1000){n.repeatEndNever.jqxRadioButton({checked:false});n.repeatEndAfter.jqxRadioButton({checked:true});n.repeatEndAfterValue.val(r.count)}else{if(r.to.year()!=9999){n.repeatEndOn.jqxRadioButton({checked:true});n.repeatEndOnValue.val(r.to.toDate())}else{n.repeatEndNever.jqxRadioButton({checked:true})}}f.editDialogFields.repeat.jqxDropDownList("selectIndex",p);switch(p){case 1:var l=r.interval;var q=f.editDialogFields.daily;q.repeatDayInterval.val(l);break;case 2:var l=r.interval;var z=f.editDialogFields.weekly;z.repeatWeekInterval.val(l);var y=r.byweekday;for(var o=0;o<7;o++){var w=z.repeatDays[o];w.val(false)}for(var o=0;o0){u.repeatMonthDayBool.jqxRadioButton({checked:true});u.repeatMonthDay.val(r.day)}else{u.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}u.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}u.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break;case 4:var t=f.editDialogFields.yearly;if(r.byyearday&&r.byyearday.length>0){t.repeatYearDay.val(r.byyearday[0]);t.repeatYearBool.val(true)}if(r.bymonth&&r.bymonth.length>0){t.repeatYearMonth.jqxDropDownList("selectIndex",r.bymonth[0]-1);t.repeatYearBool.val(true)}if(!r.byyearday||(r.byyearday&&r.byyearday.length==0)){t.repeatDayOfWeekMonth.jqxDropDownList("selectIndex",r.bymonth[0]-1);t.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}t.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}t.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break}};b(e)}});a.jqx.scheduler.column=function(b,c){this.owner=b;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="center";this.cellsalign="center";this.width="auto";this.minwidth=60;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(d,e){if(this[d]){var f=this[d];this[d]=e;this.owner._columnPropertyChanged(this,d,e,f)}else{if(this[d.toLowerCase()]){var f=this[d.toLowerCase()];this[d.toLowerCase()]=e;this.owner._columnPropertyChanged(this,d.toLowerCase(),e,f)}}};this._initfields=function(e){if(e!=null){var d=this;if(a.jqx.hasProperty(e,"dataField")){this.datafield=a.jqx.get(e,"dataField")}if(a.jqx.hasProperty(e,"displayField")){this.displayfield=a.jqx.get(e,"displayField")}else{this.displayfield=this.datafield}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"validation")){this.validation=a.jqx.get(e,"validation")}if(a.jqx.hasProperty(e,"autoCellHeight")){this.autoCellHeight=a.jqx.get(e,"autoCellHeight")}if(a.jqx.hasProperty(e,"text")){this.text=a.jqx.get(e,"text")}else{this.text=this.displayfield}if(a.jqx.hasProperty(e,"sortable")){this.sortable=a.jqx.get(e,"sortable")}if(a.jqx.hasProperty(e,"hidden")){this.hidden=a.jqx.get(e,"hidden")}if(a.jqx.hasProperty(e,"groupable")){this.groupable=a.jqx.get(e,"groupable")}if(a.jqx.hasProperty(e,"renderer")){this.renderer=a.jqx.get(e,"renderer")}if(a.jqx.hasProperty(e,"align")){this.align=a.jqx.get(e,"align")}if(a.jqx.hasProperty(e,"cellsAlign")){this.cellsalign=a.jqx.get(e,"cellsAlign")}if(a.jqx.hasProperty(e,"cellsFormat")){this.cellsFormat=a.jqx.get(e,"cellsFormat")}if(a.jqx.hasProperty(e,"width")){this.width=a.jqx.get(e,"width")}if(a.jqx.hasProperty(e,"minWidth")){this.minwidth=a.jqx.get(e,"minWidth")}if(a.jqx.hasProperty(e,"maxWidth")){this.maxwidth=a.jqx.get(e,"maxWidth")}if(a.jqx.hasProperty(e,"cellsRenderer")){this.cellsRenderer=a.jqx.get(e,"cellsRenderer")}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"pinned")){this.pinned=a.jqx.get(e,"pinned")}if(a.jqx.hasProperty(e,"filterable")){this.filterable=a.jqx.get(e,"filterable")}if(a.jqx.hasProperty(e,"filter")){this.filter=a.jqx.get(e,"filter")}if(a.jqx.hasProperty(e,"resizable")){this.resizable=a.jqx.get(e,"resizable")}if(a.jqx.hasProperty(e,"draggable")){this.draggable=a.jqx.get(e,"draggable")}if(a.jqx.hasProperty(e,"editable")){this.editable=a.jqx.get(e,"editable")}if(a.jqx.hasProperty(e,"initEditor")){this.initeditor=a.jqx.get(e,"initEditor")}if(a.jqx.hasProperty(e,"createEditor")){this.createeditor=a.jqx.get(e,"createEditor")}if(a.jqx.hasProperty(e,"destroyEditor")){this.destroyeditor=a.jqx.get(e,"destroyEditor")}if(a.jqx.hasProperty(e,"getEditorValue")){this.geteditorvalue=a.jqx.get(e,"getEditorValue")}if(a.jqx.hasProperty(e,"className")){this.classname=a.jqx.get(e,"className")}if(a.jqx.hasProperty(e,"cellClassName")){this.cellclassname=a.jqx.get(e,"cellClassName")}if(a.jqx.hasProperty(e,"rendered")){this.rendered=a.jqx.get(e,"rendered")}if(a.jqx.hasProperty(e,"exportable")){this.exportable=a.jqx.get(e,"exportable")}if(a.jqx.hasProperty(e,"nullable")){this.nullable=a.jqx.get(e,"nullable")}if(a.jqx.hasProperty(e,"columnGroup")){this.columngroup=a.jqx.get(e,"columnGroup")}if(!e instanceof String&&!(typeof e=="string")){for(var f in e){if(!d.hasOwnProperty(f)){if(!d.hasOwnProperty(f.toLowerCase())){b.host.remove();throw new Error("jqxScheduler: Invalid property name - "+f+".")}}}}}};this._initfields(c);return this};a.jqx.schedulerDataCollection=function(b){this.records=new Array();this.owner=b;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(d,c){this.records[d]=c};this.isempty=function(c){if(this.records[c]==undefined){return true}return false};this.initialize=function(c){if(c<1){c=1}this.records[c-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(c){return this.records.indexOf(c)};this.add=function(c){if(c==null){return false}this.records[this.records.length]=c;return true};this.insertAt=function(d,c){if(d==null||d==undefined){return false}if(c==null){return false}if(d>=0){if(dc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(a.jqx.dataFormat.isNumber(d)&&a.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(a.jqx.dataFormat.isDate(d)&&a.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(d)&&!a.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(l){if(this.scheduler.serverProcessing){return l}var c=new Array();if(this.filters.length){var f=new Array();var k=function(o,s){for(var q=0;q0)){var j=new Array();var g=function(n,o){for(var m=0;m0){g(p,p.records)}}};g(null,l);k.call(this,j,c);for(var d=0;d0){return a(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=a(d).attr(j);if(c!=null&&c.toString().length>0){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.scheduler.appointmentsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.scheduler.appointmentsByKey["jqx"+f];if(!g){var g=this.scheduler.appointmentsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); (function(a){a.jqx.jqxWidget("jqxScrollBar","",{});a.extend(a.jqx._jqxScrollBar.prototype,{defineInstance:function(){var b={height:null,width:null,vertical:false,min:0,max:1000,value:0,step:10,largestep:50,thumbMinSize:10,thumbSize:0,thumbStep:"auto",roundedCorners:"all",showButtons:true,disabled:false,touchMode:"auto",touchModeStyle:"auto",thumbTouchSize:0,_triggervaluechanged:true,rtl:false,areaDownCapture:false,areaUpCapture:false,_initialLayout:false,offset:0,reference:0,velocity:0,frame:0,timestamp:0,ticker:null,amplitude:0,target:0};if(this===a.jqx._jqxScrollBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){this._mouseup=new Date();var c=this;var d="
    ";if(a.jqx.utilities&&a.jqx.utilities.scrollBarButtonsVisibility=="hidden"){this.showButtons=false}if(c.WinJS){MSApp.execUnsafeLocalFunction(function(){c.host.html(d)})}else{this.element.innerHTML=d}if(this.width!=undefined&&parseInt(this.width)>0){this.host.width(parseInt(this.width))}if(this.height!=undefined&&parseInt(this.height)>0){this.host.height(parseInt(this.height))}this.isPercentage=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width);this.isPercentage=true}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height);this.isPercentage=true}if(this.isPercentage){var e=this;a.jqx.utilities.resize(this.host,function(){e._arrange()},false)}this.thumbCapture=false;this.scrollOuterWrap=a(this.element.firstChild);this.scrollWrap=a(this.scrollOuterWrap[0].firstChild);this.btnUp=a(this.scrollWrap[0].firstChild);this.areaUp=a(this.btnUp[0].nextSibling);this.btnThumb=a(this.areaUp[0].nextSibling);this.arrowUp=a(this.btnUp[0].firstChild);this.areaDown=a(this.btnThumb[0].nextSibling);this.btnDown=a(this.areaDown[0].nextSibling);this.arrowDown=a(this.btnDown[0].firstChild);var b=this.element.id;this.btnUp[0].id="jqxScrollBtnUp"+b;this.btnDown[0].id="jqxScrollBtnDown"+b;this.btnThumb[0].id="jqxScrollThumb"+b;this.areaUp[0].id="jqxScrollAreaUp"+b;this.areaDown[0].id="jqxScrollAreaDown"+b;this.scrollWrap[0].id="jqxScrollWrap"+b;this.scrollOuterWrap[0].id="jqxScrollOuterWrap"+b;if(!this.host.jqxRepeatButton){throw new Error("jqxScrollBar: Missing reference to jqxbuttons.js.");return}this.btnUp.jqxRepeatButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.btnDown.jqxRepeatButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.btnDownInstance=a.data(this.btnDown[0],"jqxRepeatButton").instance;this.btnUpInstance=a.data(this.btnUp[0],"jqxRepeatButton").instance;this.areaUp.jqxRepeatButton({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.areaDown.jqxRepeatButton({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.btnThumb.jqxButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.propertyChangeMap.value=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.setPosition(parseFloat(i),true)}}};this.propertyChangeMap.width=function(f,h,g,i){if(f.width!=undefined&&parseInt(f.width)>0){f.host.width(parseInt(f.width));f._arrange()}};this.propertyChangeMap.height=function(f,h,g,i){if(f.height!=undefined&&parseInt(f.height)>0){f.host.height(parseInt(f.height));f._arrange()}};this.propertyChangeMap.theme=function(f,h,g,i){f.setTheme()};this.propertyChangeMap.max=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.max=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.min=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.min=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.disabled=function(f,h,g,i){if(g!=i){if(i){f.host.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{f.host.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}f.btnUp.jqxRepeatButton("disabled",f.disabled);f.btnDown.jqxRepeatButton("disabled",f.disabled);f.btnThumb.jqxButton("disabled",f.disabled)}};this.propertyChangeMap.touchMode=function(f,h,g,i){if(g!=i){f._updateTouchBehavior();if(i===true){f.showButtons=false;f.refresh()}else{if(i===false){f.showButtons=true;f.refresh()}}}};this.propertyChangeMap.rtl=function(f,h,g,i){if(g!=i){f.refresh()}};this.buttonUpCapture=false;this.buttonDownCapture=false;this._updateTouchBehavior();this.setPosition(this.value);this._addHandlers();this.setTheme()},resize:function(c,b){this.width=c;this.height=b;this._arrange()},_updateTouchBehavior:function(){this.isTouchDevice=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.setTheme();return}this.isTouchDevice=true;a.jqx.mobile.setMobileSimulator(this.btnThumb[0]);this._removeHandlers();this._addHandlers();this.setTheme()}else{if(this.touchMode==false){this.isTouchDevice=false}}},_addHandlers:function(){var j=this;var e=false;try{if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){e=true;this._touchSupport=true}}catch(f){}if(j.isTouchDevice||e){this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchend"),function(k){var l=j.vertical?j.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):j.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");var m=j.toThemeProperty("jqx-fill-state-pressed");j.btnThumb.removeClass(l);j.btnThumb.removeClass(m);if(!j.disabled){j.handlemouseup(j,k)}return false});this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchstart"),function(k){if(!j.disabled){if(j.touchMode==true){k.clientX=k.originalEvent.clientX;k.clientY=k.originalEvent.clientY}else{var l=k;if(l.originalEvent.touches&&l.originalEvent.touches.length){k.clientX=l.originalEvent.touches[0].clientX;k.clientY=l.originalEvent.touches[0].clientY}else{k.clientX=k.originalEvent.clientX;k.clientY=k.originalEvent.clientY}}j.handlemousedown(k);if(k.preventDefault){k.preventDefault()}}});a.jqx.mobile.touchScroll(this.element,j.max,function(q,p,l,k,m){if(j.host.css("visibility")=="visible"){if(j.touchMode==true){m.clientX=m.originalEvent.clientX;m.clientY=m.originalEvent.clientY}else{var o=m;if(o.originalEvent.touches&&o.originalEvent.touches.length){m.clientX=o.originalEvent.touches[0].clientX;m.clientY=o.originalEvent.touches[0].clientY}else{m.clientX=m.originalEvent.clientX;m.clientY=m.originalEvent.clientY}}var n=j.vertical?j.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):j.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");j.btnThumb.addClass(n);j.btnThumb.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.thumbCapture=true;j.handlemousemove(m)}},j.element.id,j.host,j.host)}if(!this.isTouchDevice){try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var b=null;if(window.parent&&document.referrer){b=document.referrer}if(b&&b.indexOf(document.location.host)!=-1){var g=function(k){if(!j.disabled){j.handlemouseup(j,k)}};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}}catch(i){}var c="click mouseup mousedown";this.addHandler(this.btnDown,c,function(l){var k=j.step;if(Math.abs(j.max-j.min)<=k){k=1}if(j.rtl&&!j.vertical){k=-j.step}switch(l.type){case"click":if(j.buttonDownCapture&&!j.isTouchDevice){if(!j.disabled){j.setPosition(j.value+k)}}else{if(!j.disabled&&j.isTouchDevice){j.setPosition(j.value+k)}}break;case"mouseup":if(!j.btnDownInstance.base.disabled&&j.buttonDownCapture){j.buttonDownCapture=false;j.btnDown.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j.btnDown.removeClass(j.toThemeProperty("jqx-fill-state-pressed"));j._removeArrowClasses("pressed","down");j.handlemouseup(j,l);j.setPosition(j.value+k);return false}break;case"mousedown":if(!j.btnDownInstance.base.disabled){j.buttonDownCapture=true;j.btnDown.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.btnDown.addClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j._addArrowClasses("pressed","down");return false}break}});this.addHandler(this.btnUp,c,function(l){var k=j.step;if(Math.abs(j.max-j.min)<=k){k=1}if(j.rtl&&!j.vertical){k=-j.step}switch(l.type){case"click":if(j.buttonUpCapture&&!j.isTouchDevice){if(!j.disabled){j.setPosition(j.value-k)}}else{if(!j.disabled&&j.isTouchDevice){j.setPosition(j.value-k)}}break;case"mouseup":if(!j.btnUpInstance.base.disabled&&j.buttonUpCapture){j.buttonUpCapture=false;j.btnUp.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j.btnUp.removeClass(j.toThemeProperty("jqx-fill-state-pressed"));j._removeArrowClasses("pressed","up");j.handlemouseup(j,l);j.setPosition(j.value-k);return false}break;case"mousedown":if(!j.btnUpInstance.base.disabled){j.buttonUpCapture=true;j.btnUp.addClass(j.toThemeProperty("jqx-fill-state-pressed"));j.btnUp.addClass(j.toThemeProperty("jqx-scrollbar-button-state-pressed"));j._addArrowClasses("pressed","up");return false}break}})}var h="click";if(this.isTouchDevice){h=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.areaUp,h,function(l){if(!j.disabled){var k=j.largestep;if(j.rtl&&!j.vertical){k=-j.largestep}j.setPosition(j.value-k);return false}});this.addHandler(this.areaDown,h,function(l){if(!j.disabled){var k=j.largestep;if(j.rtl&&!j.vertical){k=-j.largestep}j.setPosition(j.value+k);return false}});this.addHandler(this.areaUp,"mousedown",function(k){if(!j.disabled){j.areaUpCapture=true;return false}});this.addHandler(this.areaDown,"mousedown",function(k){if(!j.disabled){j.areaDownCapture=true;return false}});this.addHandler(this.btnThumb,"mousedown dragstart",function(k){if(k.type==="dragstart"){return false}if(!j.disabled){j.handlemousedown(k)}if(k.preventDefault){k.preventDefault()}});this.addHandler(a(document),"mouseup."+this.element.id,function(k){if(!j.disabled){j.handlemouseup(j,k)}});if(!this.isTouchDevice){this.mousemoveFunc=function(k){if(!j.disabled){j.handlemousemove(k)}};this.addHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc);this.addHandler(a(document),"mouseleave."+this.element.id,function(k){if(!j.disabled){j.handlemouseleave(k)}});this.addHandler(a(document),"mouseenter."+this.element.id,function(k){if(!j.disabled){j.handlemouseenter(k)}});if(!j.disabled){this.addHandler(this.btnUp,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&!j.btnUpInstance.base.disabled&&j.touchMode!=true){j.btnUp.addClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnUp.addClass(j.toThemeProperty("jqx-fill-state-hover"));j._addArrowClasses("hover","up")}}else{if(!j.disabled&&!j.btnUpInstance.base.disabled&&j.touchMode!=true){j.btnUp.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnUp.removeClass(j.toThemeProperty("jqx-fill-state-hover"));j._removeArrowClasses("hover","up")}}});var d=j.toThemeProperty("jqx-scrollbar-thumb-state-hover");if(!j.vertical){d=j.toThemeProperty("jqx-scrollbar-thumb-state-hover-horizontal")}this.addHandler(this.btnThumb,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&j.touchMode!=true){j.btnThumb.addClass(d);j.btnThumb.addClass(j.toThemeProperty("jqx-fill-state-hover"))}}else{if(!j.disabled&&j.touchMode!=true){j.btnThumb.removeClass(d);j.btnThumb.removeClass(j.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.btnDown,"mouseenter mouseleave",function(k){if(k.type==="mouseenter"){if(!j.disabled&&!j.btnDownInstance.base.disabled&&j.touchMode!=true){j.btnDown.addClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnDown.addClass(j.toThemeProperty("jqx-fill-state-hover"));j._addArrowClasses("hover","down")}}else{if(!j.disabled&&!j.btnDownInstance.base.disabled&&j.touchMode!=true){j.btnDown.removeClass(j.toThemeProperty("jqx-scrollbar-button-state-hover"));j.btnDown.removeClass(j.toThemeProperty("jqx-fill-state-hover"));j._removeArrowClasses("hover","down")}}})}}},destroy:function(){var b=this.btnUp;var f=this.btnDown;var d=this.btnThumb;var c=this.scrollWrap;var h=this.areaUp;var e=this.areaDown;this.arrowUp.remove();delete this.arrowUp;this.arrowDown.remove();delete this.arrowDown;e.removeClass();h.removeClass();f.removeClass();b.removeClass();d.removeClass();b.jqxRepeatButton("destroy");f.jqxRepeatButton("destroy");h.jqxRepeatButton("destroy");e.jqxRepeatButton("destroy");d.jqxButton("destroy");var g=a.data(this.element,"jqxScrollBar");this._removeHandlers();this.btnUp=null;this.btnDown=null;this.scrollWrap=null;this.areaUp=null;this.areaDown=null;this.scrollOuterWrap=null;delete this.mousemoveFunc;delete this.btnDownInstance;delete this.btnUpInstance;delete this.scrollOuterWrap;delete this.scrollWrap;delete this.btnDown;delete this.areaDown;delete this.areaUp;delete this.btnDown;delete this.btnUp;delete this.btnThumb;delete this.propertyChangeMap.value;delete this.propertyChangeMap.min;delete this.propertyChangeMap.max;delete this.propertyChangeMap.touchMode;delete this.propertyChangeMap.disabled;delete this.propertyChangeMap.theme;delete this.propertyChangeMap;if(g){delete g.instance}this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_removeHandlers:function(){this.removeHandler(this.btnUp,"mouseenter");this.removeHandler(this.btnDown,"mouseenter");this.removeHandler(this.btnThumb,"mouseenter");this.removeHandler(this.btnUp,"mouseleave");this.removeHandler(this.btnDown,"mouseleave");this.removeHandler(this.btnThumb,"mouseleave");this.removeHandler(this.btnUp,"click");this.removeHandler(this.btnDown,"click");this.removeHandler(this.btnDown,"mouseup");this.removeHandler(this.btnUp,"mouseup");this.removeHandler(this.btnDown,"mousedown");this.removeHandler(this.btnUp,"mousedown");this.removeHandler(this.areaUp,"mousedown");this.removeHandler(this.areaDown,"mousedown");this.removeHandler(this.areaUp,"click");this.removeHandler(this.areaDown,"click");this.removeHandler(this.btnThumb,"mousedown");this.removeHandler(this.btnThumb,"dragstart");this.removeHandler(a(document),"mouseup."+this.element.id);if(!this.mousemoveFunc){this.removeHandler(a(document),"mousemove."+this.element.id)}else{this.removeHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc)}this.removeHandler(a(document),"mouseleave."+this.element.id);this.removeHandler(a(document),"mouseenter."+this.element.id);var b=this},_addArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},_removeArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},setTheme:function(){var o=this.btnUp;var m=this.btnDown;var p=this.btnThumb;var e=this.scrollWrap;var g=this.areaUp;var h=this.areaDown;var f=this.arrowUp;var i=this.arrowDown;this.scrollWrap[0].className=this.toThemeProperty("jqx-reset");this.scrollOuterWrap[0].className=this.toThemeProperty("jqx-reset");var k=this.toThemeProperty("jqx-reset");this.areaDown[0].className=k;this.areaUp[0].className=k;var d=this.toThemeProperty("jqx-scrollbar")+" "+this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content");this.host.addClass(d);if(this.isTouchDevice){this.host.addClass(this.toThemeProperty("jqx-scrollbar-mobile"))}m[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");o[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");var q="";if(this.vertical){f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-up");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-down");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal")}else{f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-left");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-right");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal-horizontal")}q+=" "+this.toThemeProperty("jqx-fill-state-normal");p[0].className=q;if(this.disabled){e.addClass(this.toThemeProperty("jqx-fill-state-disabled"));e.removeClass(this.toThemeProperty("jqx-scrollbar-state-normal"))}else{e.addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));e.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this.roundedCorners=="all"){this.host.addClass(this.toThemeProperty("jqx-rc-all"));if(this.vertical){var j=a.jqx.cssroundedcorners("top");j=this.toThemeProperty(j);o.addClass(j);var c=a.jqx.cssroundedcorners("bottom");c=this.toThemeProperty(c);m.addClass(c)}else{var n=a.jqx.cssroundedcorners("left");n=this.toThemeProperty(n);o.addClass(n);var l=a.jqx.cssroundedcorners("right");l=this.toThemeProperty(l);m.addClass(l)}}else{var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);o.addClass(b);m.addClass(b)}var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);if(!p.hasClass(b)){p.addClass(b)}if(o.css("display")==="none"){this.showButtons=false;this.touchModeStyle=true;p.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-normal-touch"))}if(this.isTouchDevice&&this.touchModeStyle!=false){this.showButtons=false;p.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-normal-touch"))}},isScrolling:function(){if(this.thumbCapture==undefined||this.buttonDownCapture==undefined||this.buttonUpCapture==undefined||this.areaDownCapture==undefined||this.areaUpCapture==undefined){return false}return this.thumbCapture||this.buttonDownCapture||this.buttonUpCapture||this.areaDownCapture||this.areaUpCapture},track:function(){var d,b,e,c;d=Date.now();b=d-this.timestamp;this.timestamp=d;e=this.offset-this.frame;this.frame=this.offset;c=1000*e/(1+b);this.velocity=0.2*c+0.2*this.velocity},handlemousedown:function(e){if(this.thumbCapture==undefined||this.thumbCapture==false){this.thumbCapture=true;var c=this.btnThumb;if(c!=null){c.addClass(this.toThemeProperty("jqx-fill-state-pressed"));if(this.vertical){c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}}}var d=this;function b(f){d.reference=parseInt(d.btnThumb[0].style.top);d.offset=parseInt(d.btnThumb[0].style.top);if(!d.vertical){d.reference=parseInt(d.btnThumb[0].style.left);d.offset=parseInt(d.btnThumb[0].style.left)}d.velocity=d.amplitude=0;d.frame=d.offset;d.timestamp=Date.now();clearInterval(d.ticker);d.ticker=setInterval(function(){d.track()},100)}if(this.thumbCapture&&a.jqx.scrollAnimation){b(e)}this.dragStartX=e.clientX;this.dragStartY=e.clientY;this.dragStartValue=this.value},toggleHover:function(c,b){},refresh:function(){this._arrange()},_setElementPosition:function(c,b,d){if(!isNaN(b)){if(parseInt(c[0].style.left)!=parseInt(b)){c[0].style.left=b+"px"}}if(!isNaN(d)){if(parseInt(c[0].style.top)!=parseInt(d)){c[0].style.top=d+"px"}}},_setElementTopPosition:function(b,c){if(!isNaN(c)){b[0].style.top=c+"px"}},_setElementLeftPosition:function(c,b){if(!isNaN(b)){c[0].style.left=b+"px"}},handlemouseleave:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonDownCapture||this.buttonUpCapture){b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));this._removeArrowClasses("pressed")}if(this.thumbCapture!=true){return}var c=this.btnThumb;var f=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");c.removeClass(f);c.removeClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemouseenter:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonUpCapture){b.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","up")}if(this.buttonDownCapture){d.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","down")}if(this.thumbCapture!=true){return}var c=this.btnThumb;if(this.vertical){c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}c.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemousemove:function(b){var i=this.btnUp;var e=this.btnDown;var d=0;if(e==null||i==null){return}if(i!=null&&e!=null&&this.buttonDownCapture!=undefined&&this.buttonUpCapture!=undefined){if(this.buttonDownCapture&&b.which==d){e.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","down");this.buttonDownCapture=false}else{if(this.buttonUpCapture&&b.which==d){i.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));i.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","up");this.buttonUpCapture=false}}}if(this.thumbCapture!=true){return false}var k=this.btnThumb;if(b.which==d&&!this.isTouchDevice&&!this._touchSupport){this.thumbCapture=false;this._arrange();var j=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");k.removeClass(j);k.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));return true}if(b.preventDefault!=undefined){b.preventDefault()}if(b.originalEvent!=null){b.originalEvent.mouseHandled=true}if(b.stopPropagation!=undefined){b.stopPropagation()}var l=0;try{if(!this.vertical){l=b.clientX-this.dragStartX}else{l=b.clientY-this.dragStartY}var f=this._btnAndThumbSize;if(!this._btnAndThumbSize){f=(this.vertical)?i.height()+e.height()+k.height():i.width()+e.width()+k.width()}var g=(this.max-this.min)/(this.scrollBarSize-f);if(this.thumbStep=="auto"){l*=g}else{l*=g;if(Math.abs(this.dragStartValue+l-this.value)>=parseInt(this.thumbStep)){var c=Math.round(parseInt(l)/this.thumbStep)*this.thumbStep;if(this.rtl&&!this.vertical){this.setPosition(this.dragStartValue-c)}else{this.setPosition(this.dragStartValue+c)}return false}else{return false}}var c=l;if(this.rtl&&!this.vertical){c=-l}this.setPosition(this.dragStartValue+c);this.offset=parseInt(k[0].style.left);if(this.vertical){this.offset=parseInt(k[0].style.top)}}catch(h){alert(h)}return false},handlemouseup:function(j,b){var g=false;if(this.thumbCapture){this.thumbCapture=false;var i=this.btnThumb;var h=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");i.removeClass(h);i.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));g=true;this._mouseup=new Date();if(a.jqx.scrollAnimation){var d=this;function f(){var k,o;if(d.amplitude){k=Date.now()-d.timestamp;o=-d.amplitude*Math.exp(-k/325);if(o>0.5||o<-0.5){var l=(d.max-d.min)/(d.scrollBarSize-d._btnAndThumbSize);var n=l*(d.target+o);var m=n;if(d.rtl&&!d.vertical){m=-n}d.setPosition(d.dragStartValue+m);requestAnimationFrame(f)}else{var l=(d.max-d.min)/(d.scrollBarSize-d._btnAndThumbSize);var n=l*(d.target+o);var m=n;if(d.rtl&&!d.vertical){m=-n}d.setPosition(d.dragStartValue+m)}}}clearInterval(this.ticker);if(this.velocity>25||this.velocity<-25){this.amplitude=0.8*this.velocity;this.target=Math.round(this.offset+this.amplitude);if(!this.vertical){this.target-=this.reference}else{this.target-=this.reference}this.timestamp=Date.now();requestAnimationFrame(f)}}}this.areaDownCapture=this.areaUpCapture=false;if(this.buttonUpCapture||this.buttonDownCapture){var e=this.btnUp;var c=this.btnDown;this.buttonUpCapture=false;this.buttonDownCapture=false;e.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));c.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));c.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed");g=true;this._mouseup=new Date()}if(g){if(b.preventDefault!=undefined){b.preventDefault()}if(b.originalEvent!=null){b.originalEvent.mouseHandled=true}if(b.stopPropagation!=undefined){b.stopPropagation()}}},setPosition:function(b,g){var d=this.element;if(b==undefined||b==NaN){b=this.min}if(b>=this.max){b=this.max}if(b1){d=(c/(b+c)*c)}else{if(b==1){d=c-1}else{if(b==0){d=c}}}if(this.thumbSize>0){d=this.thumbSize}if(d=0){e[0].style.width=m-k-i+"px"}else{e[0].style.width="0px"}this._setElementLeftPosition(n,l);this._setElementLeftPosition(o,l+k);this._setElementLeftPosition(e,2+l+k+d)}},_arrange:function(){var m=this;if(m._initialLayout){m._initialLayout=false;return}if(m.min>m.max){var x=m.min;m.min=m.max;m.max=x}if(m.min<0){var k=m.max-m.min;m.min=0;m.max=k}var d=m.element;var g=m.areaUp;var t=m.areaDown;var c=m.btnUp;var l=m.btnDown;var u=m.btnThumb;var p=m.scrollWrap;var n=parseInt(m.element.style.height);var q=parseInt(m.element.style.width);if(m.isPercentage){var n=m.host.height();var q=m.host.width()}if(isNaN(n)){n=0}if(isNaN(q)){q=0}m._width=q;m._height=n;var b=(!m.vertical)?n:q;if(!m.showButtons){b=0}c[0].style.width=b+"px";c[0].style.height=b+"px";l[0].style.width=b+"px";l[0].style.height=b+"px";if(m.vertical){p[0].style.width=q+2+"px"}else{p[0].style.height=n+2+"px"}m._setElementPosition(c,0,0);var s=b+2;if(m.vertical){m._setElementPosition(l,0,n-s)}else{m._setElementPosition(l,q-s,0)}var f=(!m.vertical)?q:n;m.scrollBarSize=f;var h=m._getThumbSize(f-2*s);h=Math.floor(h-2);if(h0){g[0].style.width=w+"px"}if(n>0){g[0].style.height=n+"px"}var j=(f-w-e);if(j<0){j=0}t[0].style.width=j+"px";t[0].style.height=n+"px";var r=parseInt(m.element.style.width);if(m.isPercentage){r=m.host.width()}u[0].style.visibility="inherit";if((r-3*parseInt(b)<0)||(r",c);f[0].style.cssText=d.field.style.cssText;if(!d.width){d.width=a(d.field).width()}if(!d.height){d.height=a(d.field).outerHeight()}a(d.field).hide().after(f);var e=d.host.data();d.host=f;d.host.data(e);d.element=f[0];d.element.id=d.field.id;d.field.id=c.id;if(d._className){d.host.addClass(d._className);a(d.field).removeClass(d._className)}if(d.field.tabIndex){var b=d.field.tabIndex;d.field.tabIndex=-1;d.element.tabIndex=b}}},resize:function(c,b){this.width=c;this.height=b;this.render()},render:function(){this.innerHTML="";if(this.theme&&this.theme!=""&&(this.theme.indexOf("metro")!=-1||this.theme.indexOf("windowsphone")!=-1||this.theme.indexOf("office")!=-1)){if(this.thumbSize=="40%"){this.thumbSize=12}this.metroMode=true}var c=a.data(document.body,"jqx-switchbutton")||1;this._idHandler(c);a.data(document.body,"jqx-draggables",++c);this._isTouchDevice=a.jqx.mobile.isTouchDevice();this.switchRatio=parseInt(this.switchRatio,10);this._render();this._addClasses();this._performLayout();this._removeEventHandlers();this._addEventHandles();this._disableSelection();var b=this;if(!this.checked){this._switchButton(false,0,true)}if(this.disabled){this.element.disabled=true}},setOnLabel:function(b){this._onLabel.html('
    '+b+"
    ");this._centerLabels()},setOffLabel:function(b){this._offLabel.html('
    '+b+"
    ");this._centerLabels()},toggle:function(){if(this.checked){this.uncheck()}else{this.check()}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},uncheck:function(){var b=this;this._switchButton(false);a.jqx.aria(this,"aria-checked",this.checked)},check:function(){var b=this;this._switchButton(true);a.jqx.aria(this,"aria-checked",this.checked)},_idHandler:function(b){if(!this.element.id){var c="jqx-switchbutton-"+b;this.element.id=c}},_dir:function(b){return this._dimensions[this.orientation][b]},_getEvent:function(c){if(this._isTouchDevice){var b=this._touchEvents[c];return a.jqx.mobile.getTouchEventName(b)}else{return c}},_render:function(){this._thumb=a("
    ");this._onLabel=a("
    ");this._offLabel=a("
    ");this._wrapper=a("
    ");this._onLabel.appendTo(this.host);this._thumb.appendTo(this.host);this._offLabel.appendTo(this.host);this.host.wrapInner(this._wrapper);this._wrapper=this.host.children();this.setOnLabel(this.onLabel);this.setOffLabel(this.offLabel)},_addClasses:function(){var c=this._thumb,d=this._onLabel,b=this._offLabel;this.host.addClass(this.toThemeProperty("jqx-switchbutton"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this._wrapper.addClass(this.toThemeProperty("jqx-switchbutton-wrapper"));c.addClass(this.toThemeProperty("jqx-fill-state-normal"));c.addClass(this.toThemeProperty("jqx-switchbutton-thumb"));d.addClass(this.toThemeProperty("jqx-switchbutton-label-on"));d.addClass(this.toThemeProperty("jqx-switchbutton-label"));b.addClass(this.toThemeProperty("jqx-switchbutton-label-off"));b.addClass(this.toThemeProperty("jqx-switchbutton-label"));if(this.checked){this.host.addClass(this.toThemeProperty("jqx-switchbutton-on"))}else{this.host.removeClass(this.toThemeProperty("jqx-switchbutton-on"))}},_performLayout:function(){var g=this.host,e=this._dir("opSize"),f=this._dir("size"),i=this._wrapper,d;g.css({width:this.width,height:this.height});i.css(e,g[e]());this._thumbLayout();this._labelsLayout();d=this._borders[this._dir("opposite")];i.css(f,g[f]()+this._offLabel[this._dir("oSize")]()+d);i.css(e,g[e]());if(this.metroMode||(this.theme&&this.theme!=""&&(this.theme.indexOf("metro")!=-1||this.theme.indexOf("office")!=-1))){var c=this._thumb,h=this._onLabel,b=this._offLabel;h.css("position","relative");h.css("top","1px");h.css("margin-left","1px");b.css("position","relative");b.css("top","1px");b.css("left","-2px");b.css("margin-right","1px");b.height(h.height()-2);b.width(h.width()-3);h.height(h.height()-2);h.width(h.width()-3);this._thumb[this._dir("size")](this.thumbSize+3);this._thumb.css("top","-1px");this._thumb[this._dir("opSize")](g[this._dir("opSize")]()+2);this._thumb.css("position","relative");this.host.css("overflow","hidden");if(this.checked){this._onLabel.css("visibility","visible");this._offLabel.css("visibility","hidden");this._thumb.css("left","0px")}else{this._onLabel.css("visibility","hidden");this._offLabel.css("visibility","visible");this._thumb.css("left","-2px")}}},_thumbLayout:function(){var d=this.thumbSize,e=this.host,b=0,f={horizontal:0,vertical:0},c=this;if(d.toString().indexOf("%")>=0){d=e[this._dir("size")]()*parseInt(d,10)/100}this._thumb[this._dir("size")](d);this._thumb[this._dir("opSize")](e[this._dir("opSize")]());this._handleThumbBorders()},_handleThumbBorders:function(){this._borders.horizontal=parseInt(this._thumb.css("border-left-width"),10)||0;this._borders.horizontal+=parseInt(this._thumb.css("border-right-width"),10)||0;this._borders.vertical=parseInt(this._thumb.css("border-top-width"),10)||0;this._borders.vertical+=parseInt(this._thumb.css("border-bottom-width"),10)||0;var b=this._borders[this._dir("opposite")];if(this.orientation==="horizontal"){this._thumb.css("margin-top",-b/2);this._thumb.css("margin-left",0)}else{this._thumb.css("margin-left",-b/2);this._thumb.css("margin-top",0)}},_labelsLayout:function(){var g=this.host,c=this._thumb,e=this._dir("opSize"),h=this._dir("size"),b=this._dir("oSize"),f=g[h]()-c[b](),d=this._borders[this._dir("opposite")]/2;this._onLabel[h](f+d);this._offLabel[h](f+d);if(this.rtl){this._onLabel[h](f+2*d)}this._onLabel[e](g[e]());this._offLabel[e](g[e]());this._orderLabels();this._centerLabels()},_orderLabels:function(){if(this.orientation==="horizontal"){var b="left";if(this.rtl){b="right"}this._onLabel.css("float",b);this._thumb.css("float",b);this._offLabel.css("float",b)}else{this._onLabel.css("display","block");this._offLabel.css("display","block")}},_centerLabels:function(){var c=this._onLabel.children("div"),b=this._offLabel.children("div"),e=c.parent(),f=e.height(),g=c.outerHeight(),d=this._borders[this.orientation]/2||0;if(g==0){g=14}var h=Math.floor((f-g)/2)+d;c.css("margin-top",h);b.css("margin-top",h)},_removeEventHandlers:function(){var b="."+this.element.id;this.removeHandler(this._wrapper,this._getEvent("click")+b,this._clickHandle);this.removeHandler(this._thumb,this._getEvent("mousedown")+b,this._mouseDown);this.removeHandler(a(document),this._getEvent("mouseup")+b,this._mouseUp);this.removeHandler(a(document),this._getEvent("mousemove")+b,this._mouseMove);this.removeHandler(this._thumb,"mouseenter"+b);this.removeHandler(this._thumb,"mouseleave"+b);this.removeHandler(this._wrapper,"focus"+b);this.removeHandler(this._wrapper,"blur"+b)},_addEventHandles:function(){var c="."+this.element.id,b=this;this.addHandler(this.host,"focus"+c,function(d){b.host.addClass(b.toThemeProperty("jqx-fill-state-focus"));return false});this.addHandler(this.host,"blur"+c,function(){b.host.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this._thumb,"mouseenter"+c,function(){b._thumb.addClass(b.toThemeProperty("jqx-fill-state-hover"))});this.addHandler(this._thumb,"mouseleave"+c,function(){b._thumb.removeClass(b.toThemeProperty("jqx-fill-state-hover"))});this.addHandler(this._wrapper,this._getEvent("click")+c,this._clickHandle,{self:this});this.addHandler(this._thumb,this._getEvent("mousedown")+c,this._mouseDown,{self:this});this.addHandler(a(document),this._getEvent("mouseup")+c,this._mouseUp,{self:this});this.addHandler(a(document),this._getEvent("mousemove")+c,this._mouseMove,{self:this})},enable:function(){this.disabled=false;this.element.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},disable:function(){this.disabled=true;this.element.disabled=true;a.jqx.aria(this,"aria-disabled",this.disabled)},_clickHandle:function(c){var b=c.data.self;if((b.toggleMode==="click"||b.toggleMode==="default")&&!b.disabled){if(!b._isDistanceTraveled&&!b._dragged){b._wrapper.stop();b.toggle()}}b._thumb.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))},_mouseDown:function(c){var b=c.data.self,d=b._wrapper;if(b.metroMode){b.host.css("overflow","hidden");b._onLabel.css("visibility","visible");b._offLabel.css("visibility","visible")}b._mouseStartPosition=b._getMouseCoordinates(c);b._buttonStartPosition={left:parseInt(d.css("margin-left"),10)||0,top:parseInt(d.css("margin-top"),10)||0};if(!b.disabled&&(b.toggleMode==="slide"||b.toggleMode==="default")){b._wrapper.stop();b._isMouseDown=true;b._isDistanceTraveled=false;b._dragged=false}b._thumb.addClass(b.toThemeProperty("jqx-fill-state-pressed"))},_mouseUp:function(d){var c=d.data.self;if(c.metroMode){}c._isMouseDown=false;c._thumb.removeClass(c.toThemeProperty("jqx-fill-state-pressed"));if(!c._isDistanceTraveled){return}var f=c._wrapper,b=parseInt(f.css("margin-"+c._dir("pos")),10)||0,e=c._dropHandler(b);if(e){c._switchButton(!c.checked)}else{c._switchButton(c.checked,null,true)}c._isDistanceTraveled=false},_mouseMove:function(f){var d=f.data.self,b=d._getMouseCoordinates(f);if(d._isMouseDown&&d._distanceTraveled(b)){var e=d._dir("pos"),h=d._wrapper,c=d._buttonStartPosition[e],g=c+b[e]-d._mouseStartPosition[e],g=d._validatePosition(g);d._dragged=true;h.css("margin-"+d._dir("pos"),g);d._onLabel.css("visibility","visible");d._offLabel.css("visibility","visible");return false}},_distanceTraveled:function(b){if(this._isDistanceTraveled){return true}else{if(!this._isMouseDown){return false}else{var d=this._mouseStartPosition,c=this._distanceRequired;this._isDistanceTraveled=Math.abs(b.left-d.left)>=c||Math.abs(b.top-d.top)>=c;return this._isDistanceTraveled}}},_validatePosition:function(c){var d=this._borders[this._dir("opposite")],b=0,e=-(this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]())-d;if(bc){return e}return c},_dropHandler:function(c){var b=0,d=-(this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]()),g=Math.abs(d-b),e=Math.abs(c-this._buttonStartPosition[this._dir("pos")]),f=g*(this.switchRatio/100);if(e>=f){return true}return false},_switchButton:function(c,h,g){if(this.metroMode){this.host.css("overflow","hidden");this._onLabel.css("visibility","visible");this._offLabel.css("visibility","visible");if(c){this._thumb.css("left","0px")}else{this._thumb.css("left","-2px")}}else{this._onLabel.css("visibility","visible");this._offLabel.css("visibility","visible")}var i=this._wrapper,d=this,f={},e=this._borders[this._dir("opposite")],b=0;if(typeof h==="undefined"){h=(this.animationEnabled?this.animationDuration:0)}if(!this.rtl){if(!c){b=this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]()+e}}else{if(c){b=this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]()+e;if(this.metroMode){b+=5}}else{if(this.metroMode){b-=3}}}f["margin-"+this._dir("pos")]=-b;if(c){d.host.addClass(d.toThemeProperty("jqx-switchbutton-on"))}else{d.host.removeClass(d.toThemeProperty("jqx-switchbutton-on"))}i.animate(f,h,function(){if(c){d._onLabel.css("visibility","visible");d._offLabel.css("visibility","hidden")}else{d._onLabel.css("visibility","hidden");d._offLabel.css("visibility","visible")}d.checked=c;if(!g){d._handleEvent(!c)}})},_handleEvent:function(b){if(b!==this.checked){this._raiseEvent(2,{check:this.checked,checked:this.checked})}if(b){this._raiseEvent(0,{checked:this.checked})}else{this._raiseEvent(1,{checked:this.checked})}},_disableSelection:function(){var c=this.host,b=c.find("*");a.each(b,function(d,e){e.onselectstart=function(){return false};a(e).addClass("jqx-disableselect")})},_getMouseCoordinates:function(b){if(this._isTouchDevice){if(b.originalEvent.touches){return{left:b.originalEvent.touches[0].pageX,top:b.originalEvent.touches[0].pageY}}return{left:b.pageX,top:b.pageY}}else{return{left:b.pageX,top:b.pageY}}},destroy:function(){this._removeEventHandlers();this.host.removeClass(this.toThemeProperty("jqx-switchbutton"));this._wrapper.remove()},_raiseEvent:function(d,b){var c=a.Event(this._events[d]);c.args=b;return this.host.trigger(c)},_themeChanger:function(f,g,e){if(!f){return}if(typeof e==="undefined"){e=this.host}var h=e[0].className.split(" "),b=[],j=[],d=e.children();for(var c=0;c=0){b.push(h[c]);j.push(h[c].replace(f,g))}}this._removeOldClasses(b,e);this._addNewClasses(j,e);for(var c=0;c0&&f._contentList[f.selectedItem]){a(f._contentList[f.selectedItem]).trigger(j)}},50+f.selectionTrackerAnimationDuration)}else{var d=new a.Event("loadContent");if(!f._initTabContentList[f.selectedItem]){if(f.initTabContent){f.initTabContent(f.selectedItem);f._initTabContentList[f.selectedItem]=true}}d.owner=this;var h=new a.Event("resize");this.host.trigger(h)}}}catch(c){if(c&&console){console.log(c)}}return b},_getArrowsDisplacement:function(){if(!this._needScroll){return 0}var d;var c=this.arrowButtonSize;var b=this.arrowButtonSize;if(this.scrollPosition==="left"){d=c+b}else{if(this.scrollPosition==="both"){d=c}else{d=0}}return d},_scrollRight:function(e){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var f=parseInt(this._width(this._unorderedList)+parseInt(this._unorderedListHelper.css("margin-left"),10),10),h=this._width(this.element),g,i,b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),d=0,j;if(this.scrollable){g=this._leftArrow.offsetWidth;i=this._rightArrow.offsetWidth}else{g=0;i=0}e=(this.enableScrollAnimation)?e:0;if(this._width(this._headerWrapper)>parseInt(this._unorderedListHelper.css("margin-left"),10)+this._width(this._unorderedList)){d=c}else{if(Math.abs(b)+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){j=h-f-g-i+parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(d,j,e)},_scrollLeft:function(f){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),e=0,d;f=(this.enableScrollAnimation)?f:0;if(this._width(this._headerWrapper)>=this._width(this._unorderedList)){e=c}else{if(b+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){d=parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(e,d,f)},_performScrollAnimation:function(e,d,c){var b=this;if(d!==undefined){this._moveSelectionTrack(this._selectedItem,0,d)}this._lockAnimation("unorderedList");b._refreshBarPosition();this._unorderedListHelper.animate({left:e},c,function(){b._moveSelectionTrack(b.selectedItem,0);b._unlockAnimation("unorderedList");b._refreshBarPosition()})},_addKeyboardHandlers:function(){var b=this;if(this.keyboardNavigation){this.addHandler(this.host,"keydown",function(e){if(!b._activeAnimation()){var f=b._selectedItem;var d=b.selectionTracker;var c=b.getContentAt(f);if(a(e.target).ischildof(c)){return true}if(a(document.activeElement).ischildof(a(c))){return true}switch(e.keyCode){case 37:if(b.rtl){b.next()}else{b.previous()}return false;case 39:if(b.rtl){b.previous()}else{b.next()}return false;case 36:b.first();return false;case 35:b.last();return false;case 27:if(b._tabCaptured){b._cancelClick=true;b._uncapture(null,b.selectedItem);b._tabCaptured=false}break}b.selectionTracker=d}return true})}},_addScrollHandlers:function(){var b=this;this.addHandler(this._leftArrow,"mousedown",function(){b._startScrollRepeat(true,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mousedown",function(){b._startScrollRepeat(false,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(this._leftArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(a(document),"mouseup.tab"+this.element.id,this._mouseUpScrollDocumentHandler,this);this.addHandler(a(document),"mouseleave.tab"+this.element.id,this._mouseLeaveScrollDocumentHandler,this)},_mouseLeaveScrollDocumentHandler:function(c){var b=c.data;if(!b._scrollTimeout){return}clearTimeout(b._scrollTimeout)},_mouseUpScrollDocumentHandler:function(c){var b=c.data;clearTimeout(b._scrollTimeout)},_mouseUpDragDocumentHandler:function(c){var b=c.data;if(b._tabCaptured&&b._dragStarted){b._uncapture(c)}b._tabCaptured=false},_addReorderHandlers:function(){var b=this;b.addHandler(a(document),"mousemove.tab"+b.element.id,b._moveElement,b);b.addHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpDragDocumentHandler,b)},_addEventHandlers:function(){var e=this.length();while(e){e--;this._addEventListenerAt(e)}if(this.keyboardNavigation){this._addKeyboardHandlers()}if(this.scrollable){this._addScrollHandlers()}if(this.reorder&&!this._isTouchDevice){this._addReorderHandlers()}var d=this;try{if(document.referrer!==""||window.frameElement){if(window.top!==null&&window.top!==window.self){var c=function(){if(d._tabCaptured){d._cancelClick=true;d._uncapture(null,d.selectedItem);d._tabCaptured=false}};var f=null;if(window.parent&&document.referrer){f=document.referrer}if(f&&f.indexOf(document.location.host)!==-1){if(window.top.document){this.addHandler(a(window.top.document),"mouseup.tabs"+this.element.id,c)}}}}}catch(b){}},focus:function(){try{this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25)}catch(b){}},_getFocusedItem:function(c){var d=this.length();while(d){d--;var b=this._titleList[d],g=this._outerWidth(b,true),f=parseInt(a(b).offset().left,10),e=f;if((e<=c&&e+g>=c)&&(b!==this._capturedElement)&&(!this._titleList[d].locked)&&(this._titleList[d].disabled!==true)){return d}}return -1},_uncapture:function(f){var e=this.selectionTracker;this._unorderedListLeftBackup=this._unorderedListHelper.css("left");this._dragStarted=false;this._tabCaptured=false;var b=this._indexOf(this._capturedElement);if(!this._capturedElement){return}switch(this.position){case"top":this._capturedElement.style.bottom="0px";break;case"bottom":this._capturedElement.style.top="0px";break}var d;if(f){d=this._getFocusedItem(f.clientX)}if(d===-1||!f){this._capturedElement.style.left="0px"}else{this._raiseEvent(10,{item:b,dropIndex:d});this._reorderItems(d,b)}for(var c=0;c=e;c--){this._titleList[c]=this._titleList[c-1];this._contentList[c]=this._contentList[c-1]}this._contentList[e]=f;this._titleList[e]=this._capturedElement}},getSelectedItem:function(){return this.selectedItem},_getSelectedItem:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c){this._selectedItem=this.selectedItem=b;break}}},_moveElement:function(d){var c=d.data;if(c._tabCaptured){if(document.selection){document.selection.clear()}if(!c._dragStarted){var b=-parseInt(c._unorderedListHelper.css("left"),10);if(d.clientX+b>c._startX+3||d.clientX+be.offset().left+c._width(this._headerWrapper)){this._scrollRight(this.scrollAnimationDuration);this._capturedElement.style.left=parseInt(a(this._capturedElement).css("left"),10)+this._lastUnorderedListPosition-b}else{c._stop(c._unorderedListHelper);this._unlockAnimation("unorderedList");clearTimeout(this._scrollTimeout)}}this._scrollTimeout=setTimeout(function(){c._dragScroll(d)},this.scrollAnimationDuration);this._lastUnorderedListPosition=b},_captureElement:function(d,c){if(!this._tabCaptured&&!this._titleList[c].locked&&this._titleList[c].disabled!==true&&!this._activeAnimation()){var b=-parseInt(this._unorderedListHelper.css("left"),10);this._startX=b+d.clientX;this._startY=d.clientY;this._lastX=d.clientX;this._lastY=d.clientY;this._tabCaptured=true;this._capturedElement=this._titleList[c]}},_titleInteractionTrigger:function(b){if(this._headerExpandingBalance>0){this._removeOppositeBorder()}if(this._selectedItem!==b){this.select(this._titleList[b],"toggle");this._titleList[b].collapsed=false;if(!this.collapsible){if(this.height!=="auto"){this._contentWrapper.style.visibility="visible"}else{this._contentWrapper.style.display="block"}}}else{if(this.collapsible){if(this.isCollapsed){this.expand()}else{this.collapse()}}}},collapse:function(){var b=this._selectedItem,c=this;this.isCollapsed=true;if(c.height!=="auto"){c._contentWrapper.style.visibility="hidden"}else{c._contentWrapper.style.display="none"}c._raiseEvent(13,{item:b});if(this.position==="top"){c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed")}else{c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed-bottom");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed-bottom")}},expand:function(){var b=this._selectedItem,c=this;this.isCollapsed=false;this._select(b,c.contentTransitionDuration,null,false,true);if(c.height!=="auto"){c._contentWrapper.style.visibility="visible"}else{c._contentWrapper.style.display="block"}c._raiseEvent(14,{item:b});if(this.position==="top"){c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed"))}else{c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed-bottom"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed-bottom"))}},_addSelectHandler:function(b){var c=this;this.addHandler(this._titleList[b],"selectstart",function(){return false});this.addHandler(this._titleList[b],this.toggleMode,(function(d){return function(){c._raiseEvent("15",{item:d});if(!c._tabCaptured&&!c._cancelClick){c._titleInteractionTrigger(d)}return true}}(b)))},_addDragDropHandlers:function(b){var c=this;this.addHandler(this._titleList[b],"mousedown",function(d){c._captureElement(d,b)});this.addHandler(this._titleList[b],"mouseup",function(d){if(c._tabCaptured&&c._dragStarted){c._cancelClick=true;c._uncapture(d,b)}else{c._cancelClick=false}c._tabCaptured=false;return false})},_removeHoverStates:function(){var b=this;a.each(this._titleList,function(){b._removeClass(this,b.toThemeProperty("jqx-tabs-title-hover-top jqx-tabs-title-hover-bottom"))})},_addHoverHandlers:function(b){var d=this;var c=this._titleList[b];this.addHandler(c,"mouseenter mouseleave",function(g){if(b!==d._selectedItem){var f="jqx-fill-state-hover";if(d.position==="top"){f+=" jqx-tabs-title-hover-top"}else{f+=" jqx-tabs-title-hover-bottom"}if(g.type==="mouseenter"){c.className+=" "+d.toThemeProperty(f)}else{d._removeClass(c,d.toThemeProperty(f))}if(d.showCloseButtons){var e=d._closeButtonList[b];if(g.type==="mouseenter"){e.className+=" "+d.toThemeProperty("jqx-tabs-close-button-hover",true)}else{d._removeClass(e,d.toThemeProperty("jqx-tabs-close-button-hover",true))}}}})},_addEventListenerAt:function(c){var d=this;if(this._titleList[c].disabled){return}if(this.reorder&&!this._isTouchDevice){this._addDragDropHandlers(c)}this._addSelectHandler(c);if(this.enabledHover){this._addHoverHandlers(c)}var b=d._closeButtonList[c];this.removeHandler(b,"click");this.addHandler(b,"click",function(){d.removeAt(c);return false})},_removeEventHandlers:function(){var c=this;var b=c.length();while(b){b--;c._removeEventListenerAt(b)}if(c.scrollable){c.removeHandler(c._leftArrow,"mousedown");c.removeHandler(c._rightArrow,"mousedown")}c.removeHandler(a(document),"mousemove.tab"+c.element.id,c._moveElement);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpScrollDocumentHandler);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpDragDocumentHandler);c.removeHandler(c.host,"keydown")},_removeEventListenerAt:function(b){var c=this;c.removeHandler(c._titleList[b],c.toggleMode);c.removeHandler(c._titleList[b],"mouseenter");c.removeHandler(c._titleList[b],"mouseleave");c.removeHandler(c._titleList[b],"mousedown");c.removeHandler(c._titleList[b],"mouseup");c.removeHandler(c._closeButtonList[b],"click")},_moveSelectionTrack:function(n,c,b){var h=this;if(n===-1){return}if(this._titleList.length===0){return}if(n>=this._titleList.length){return}var m=this._titleList[n],o=a(m);h._refreshBarPosition();if(this.selectionTracker&&this._selectionTracker){var i;h._stop(h._selectionTrackerHelper);this._unlockAnimation("selectionTracker");if(b===undefined){i=parseInt(o.position().left,10);if(!isNaN(parseInt(this._unorderedListHelper.css("left"),10))){i+=parseInt(this._unorderedListHelper.css("left"),10)}if(!isNaN(parseInt(this._unorderedListHelper.css("margin-left"),10))){i+=parseInt(this._unorderedListHelper.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-left"),10))){i+=parseInt(o.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-right"),10))){}}else{i=b}var g=0;var e=0;if(this.position==="top"){g=this._height(h._headerWrapper)-m.offsetHeight;if(!this.autoHeight){e+=parseInt(o.css("margin-top"),10)}}this._lockAnimation("selectionTracker");var l=parseInt(o.css("padding-left"),10)+parseInt(o.css("padding-right"),10);var f=this.position==="top"?0:1;var k=parseInt(a(this._headerWrapper).css("padding-top"),10);var j=parseInt(o.css("padding-top"),10)+parseInt(o.css("padding-bottom"),10);this._selectionTracker.style.visibility="visible";this._moveSelectionTrackerContainer.style.visibility="visible";var d=parseInt(o.css("margin-top"),10);if(isNaN(d)){d=0}h._refreshBarPosition();h._selectionTrackerHelper.animate({top:k+d-f,left:i+"px",height:parseInt(this._height(m)+j,10),width:h._width(m)+l},c,function(){h._unlockAnimation("selectionTracker");h._selectionTracker.style.visibility="hidden";h._addSelectStyle(n,true);h._moveSelectionTrackerContainer.style.visibility="hidden"})}},destroy:function(){a.jqx.utilities.resize(this.host,null,true);if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){this.removeHandler(a(window.top.document),"mouseup.tabs"+this.element.id)}}this.host.remove()},_switchTabs:function(b,d){if(b!==d&&!this._activeAnimation()&&!this._tabCaptured){var c=this;this._raiseEvent(7,{item:d});this._raiseEvent(6,{item:b});if(this._currentEvent){if(this._currentEvent.cancel){this._currentEvent=null;return}}this._unselect(d,null,true);this._select(b,c.contentTransitionDuration,null,true);return true}return false},_activeAnimation:function(){for(var b in this._isAnimated){if(this._isAnimated.hasOwnProperty(b)){if(this._isAnimated[b]){return true}}}return false},_indexOf:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c||this._contentList[b]===c){return b}}return -1},_validateProperties:function(){try{if(this.scrollAnimationDuration<0||isNaN(this.scrollAnimationDuration)){throw new Error(this._invalidArgumentExceptions.invalidScrollAnimationDuration)}if(parseInt(this.width,10)<0&&this.width!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(parseInt(this.height,10)<0&&this.height!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.animationType!=="none"&&this.animationType!=="fade"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(this.contentTransitionDuration<0||isNaN(this.contentTransitionDuration)){throw new Error(this._invalidArgumentExceptions.invalidcontentTransitionDuration)}if(this.toggleMode!=="click"&&this.toggleMode!=="dblclick"&&this.toggleMode!=="mouseenter"&&this.toggleMode!=="none"){throw new Error(this._invalidArgumentExceptions.invalidToggleMode)}if(this.position!=="top"&&this.position!=="bottom"){throw new Error(this._invalidArgumentExceptions.invalidPosition)}if(this.scrollPosition!=="left"&&this.scrollPosition!=="right"&&this.scrollPosition!=="both"){throw new Error(this._invalidArgumentExceptions.invalidScrollPosition)}if(this.scrollStep<0||isNaN(this.scrollStep)){throw new Error(this._invalidArgumentExceptions.invalidScrollStep)}if(this._titleList.length!==this._contentList.length||this._titleList.length===0){throw new Error(this._invalidArgumentExceptions.invalidStructure)}if(this.arrowButtonSize<0||isNaN(this.arrowButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidArrowSize)}if(this.closeButtonSize<0||isNaN(this.closeButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidCloseSize)}}catch(b){try{console.log(b)}catch(c){}}},_startScrollRepeat:function(d,c){var b=this;if(d){this._scrollLeft(c)}else{this._scrollRight(c)}if(this._scrollTimeout){clearTimeout(this._scrollTimeout)}this._scrollTimeout=setTimeout(function(){b._startScrollRepeat(d,b.scrollAnimationDuration)},c)},_performLayout:function(){var b=this.length();while(b){b--;if(this.position==="top"||this.position==="bottom"){if(this.rtl){this._titleList[b].style["float"]="right"}else{this._titleList[b].style["float"]="left"}}}this._fitToSize();this._performHeaderLayout();this._fitToSize()},updatetabsheader:function(){this._performHeaderLayout()},_setSize:function(){var b=this;b._fitToSize();b._positionArrows(b._totalItemsWidth);if(b._totalItemsWidth>b.element.offsetWidth){b._unorderedList.style.width=b._toPx(b._totalItemsWidth)}else{b._unorderedList.style.width=b.element.offsetWidth-2+"px"}b._fitToSize()},_addArrows:function(){if(this._leftArrow&&this._rightArrow){a(this._leftArrow).remove();a(this._rightArrow).remove()}this._leftArrow=document.createElement("div");this._leftArrow.innerHTML='';this._leftArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._leftArrow.style.zIndex=30;this._leftArrow.style.display="none";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.height="100%";this._rightArrow=document.createElement("div");this._rightArrow.innerHTML='';this._rightArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._rightArrow.style.zIndex=30;this._rightArrow.style.display="none";this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.height="100%";this._headerWrapper.appendChild(this._leftArrow);this._headerWrapper.appendChild(this._rightArrow)},_tabsWithVisibleCloseButtons:function(){if(!this.showCloseButtons){return 0}var b=this.length();a.each(this._titleList,function(){var c=this.attr("hasclosebutton");if(c!==undefined&&c!==null){if(c==="false"||c===false){b--}}});return b},_calculateTitlesSize:function(){var g=this;function f(n,m){if(n){if(m){n.style.display="block"}else{n.style.display="none"}}}var l=0;var k=0;var h=this.length();if(this.rtl&&a.jqx.browser.msie&&a.jqx.browser.version<8){this._measureItem=document.createElement("span");this._measureItem.style.position="relative";this._measureItem.style.visibility="hidden";document.body.appendChild(this._measureItem)}while(h){h--;var j=this._titleList[h],b=g._closeButtonList[h];if(this._measureItem){this._measureItem.innerHTML=j.innerHTML;this._measureItem.html(this._titleList[h].html());j.style.width=g._toPx(g._width(this._measureItem))}j.style.position="static";f(b,false);k+=g._outerWidth(j,true);var e=g._outerHeight(j,true);if(l1)){d=false;if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[h]===1){f(b,false);d=true}}if(!d){k+=this.closeButtonSize;f(b,true)}}}j.style.height=this._toPx(g._height(j))}if(this._measureItem){a(this._measureItem).remove()}return{height:l,width:10+k}},_reorderHeaderElements:function(){if(this.selectionTracker){this._moveSelectionTrackerContainer.style.position="absolute";this._moveSelectionTrackerContainer.style.height="100%";this._moveSelectionTrackerContainer.style.top="0px";this._moveSelectionTrackerContainer.style.left="0px";this._moveSelectionTrackerContainer.style.width="100%"}this._headerWrapper.style.position="relative";this._headerWrapper.style.left="0px";this._headerWrapper.style.top="0px";if(this.scrollable){this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.position="absolute";this._rightArrow.style.top="0px";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.position="absolute";this._leftArrow.style.top="0px";var c=this.theme&&this.theme.indexOf("ui-")!==-1?3:0;if(c>0){this._rightArrow.className+=" "+this.toThemeProperty("jqx-rc-r");this._leftArrow.className+=" "+this.toThemeProperty("jqx-rc-l")}var b=this.scrollPosition;if(this.rtl){if(b==="left"){b="right"}if(b==="right"){b="left"}}switch(b){case"both":this._rightArrow.style.right="0px";this._leftArrow.style.left="0px";break;case"left":this._rightArrow.style.left=this._toPx(this.arrowButtonSize);this._leftArrow.style.left="0px";break;case"right":this._rightArrow.style.right=this._toPx(-c);this._leftArrow.style.right=this._toPx(parseInt(this.arrowButtonSize,10)-c);break}}},_positionArrows:function(b){if(b>=this._headerWrapper.offsetWidth&&this.scrollable){this._needScroll=true;if(this._unorderedListHelper.position().left===0){this._unorderedListLeftBackup=this._getArrowsDisplacement()+"px"}this._leftArrow.style.display="block";this._rightArrow.style.display="block"}else{this._needScroll=false;this._leftArrow.style.display="none";this._rightArrow.style.display="none";this._unorderedList.style.left="0px"}},_performHeaderLayout:function(){this._removeSelectStyle();var b=this._calculateTitlesSize();var e=b.height;var c=b.width;this._headerWrapper.style.height=this._toPx(e);this._unorderedList.style.height=this._toPx(e);if(this.headerHeight!==null&&this.headerHeight!=="auto"){this._headerWrapper.style.height=this._toPx(this.headerHeight);this._unorderedList.style.height=this._toPx(this.headerHeight)}var d=this._width(this.element);if(c>d){this._unorderedList.style.width=this._toPx(c)}else{this._unorderedList.style.width=this._toPx(d)}if(a.jqx.browser.msie&&a.jqx.browser.version<8){this._unorderedList.style.position="relative";this._unorderedList.style.overflow="hidden"}this._reorderHeaderElements();c=c+parseInt(this._unorderedListHelper.css("margin-left"),10);this._totalItemsWidth=c;this._positionArrows(c);this._unorderedList.style.position="relative";this._unorderedList.style.top="0px";this._verticalAlignElements();this._moveSelectionTrack(this._selectedItem,0);this._addSelectStyle(this.selectedItem)},_verticalAlignElements:function(){var j=this.length();while(j){j--;var n=this._titleList[j],p=a(n),b=p.children()[0],m=this._closeButtonList[j],k=parseInt(p.css("padding-top"),10);if(!k){k=0}if(this.autoHeight){var c=parseInt(p.css("padding-top"),10),o=parseInt(p.css("padding-bottom"),10),i=p.css("border-top-width"),f=p.css("border-bottom-width");if(i.indexOf("px")===-1){i=1}else{i=parseInt(i,10)}if(f.indexOf("px")===-1){f=1}else{f=parseInt(f,10)}n.style.height=this._toPx(this._outerHeight(this._unorderedList,true)-(c+o+i+f))}else{if(this.position==="top"){var h=this._height(this._unorderedList)-parseInt(this._outerHeight(n,true),10);if(parseInt(p.css("margin-top"),10)!==h&&h!==0){n.style.marginTop=this._toPx(h)}}else{n.style.height=this._toPx(this._height(n))}}b.style.height="100%";var e=this._height(n);if(m){var g=e/2-this._height(m)/2;m.style.marginTop=this._toPx(1+g)}var l=e/2-this._height(b)/2;b.style.marginTop=this._toPx(l)}if(this.scrollable){var d=(parseInt(this._headerWrapper.offsetHeight,10)-this.arrowButtonSize)/2;a(this._rightArrow).children()[0].style.marginTop=this._toPx(d);this._rightArrow.style.height="100%";a(this._leftArrow).children()[0].style.marginTop=this._toPx(d);this._leftArrow.style.height="100%"}},_getImageUrl:function(c){var b=c.css("background-image");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},_fitToSize:function(){var c=false;var e=false;var d=this;if(d.width!==null&&d.width.toString().indexOf("%")!==-1){c=true}if(d.height!==null&&d.height.toString().indexOf("%")!==-1){e=true}if(c){this.element.style.width=this.width;this._contentWrapper.style.width="100%"}else{d.element.style.width=d._toPx(d.width);if(this.width!=="auto"){this._contentWrapper.style.width="100%"}}var b;if(e){this.element.style.height=this.height;this._contentWrapper.style.width="100%";this._contentWrapper.style.height="auto";b=this.element.offsetHeight-this._headerWrapper.offsetHeight-2;this._contentWrapper.style.height=b+"px"}else{if(this.height!=="auto"){d.element.style.height=d._toPx(d.height);b=this._height(d.element)-this._headerWrapper.offsetHeight;this._contentWrapper.style.height=d._toPx(b)}else{this._contentWrapper.style.height="auto"}}},_maxHeightTab:function(){var c=this.length();var d=-1;var b=-1;while(c){c--;if(d0){a(g).find(".jqx-tabs-close-button").remove()}d.style["float"]=f;d.innerHTML=g.innerHTML;g.innerHTML="";var b=document.createElement("div");b.className=this.toThemeProperty("jqx-tabs-close-button");b.style.height=this._toPx(this.closeButtonSize);b.style.width=this._toPx(this.closeButtonSize);b.style["float"]=f;b.style.fontSize="1px";g.appendChild(d);g.appendChild(b);if(e===true){this._closeButtonList[c]=b}else{this._closeButtonList.splice(c,0,b)}if(!this.showCloseButtons){b.style.display="none"}else{if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[c]===1){b.style.display="none"}}}},_addCloseButtons:function(){var b=this.length();while(b){b--;this._addCloseButton(b,true)}},_prepareTabs:function(){var c=this.length();var b=this.selectionTracker;this.selectionTracker=false;while(c){c--;if(this._selectedItem!==c){this._unselect(c,null,false)}}this._select(this._selectedItem,0,null,false);this.selectionTracker=b;if(this.initTabContent){if(!this._initTabContentList[this.selectedItem]){if(!this._hiddenParent()){this.initTabContent(this.selectedItem);this._initTabContentList[this.selectedItem]=true}}}},_isValidIndex:function(b){return(b>=0&&b=0&&f!==undefined){var c=null;if(this.showCloseButtons){c=this._closeButtonList[d];if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[d]===1){c=null}}}var b="jqx-fill-state-hover",e=" jqx-fill-state-pressed";if(this.position==="top"){b+=" jqx-tabs-title-hover-top";e+=" jqx-tabs-title-selected-top"}else{b+=" jqx-tabs-title-hover-bottom";e+=" jqx-tabs-title-selected-bottom"}this._removeClass(f,this.toThemeProperty(b));f.className+=this.toThemeProperty(e);if(c!==null){c.className+=" "+this.toThemeProperty("jqx-tabs-close-button-selected")}}}},_addItemTo:function(g,c,e){if(c");a(this._headerWrapper).append(b);b.addClass(this.toThemeProperty("jqx-tabs-bar"));this.bar=b}setTimeout(function(){var d=parseInt(c._unorderedListHelper.css("left"),10);var e=parseInt(c._unorderedListHelper.css("margin-left"));c.bar.css("left",e+c._titleList[c._selectedItem].offsetLeft+d);c.bar.width(a(c._titleList[c._selectedItem]).outerWidth()-2)})},_select:function(h,e,l,b,c){if(!this._tabCaptured){this.host.attr("hideFocus","true");var g=this;if(c===undefined){this._addSelectStyle(h)}else{this._addSelectStyle(h,c)}var k=a(g._titleList[h]),d=g._titleList[h].getAttribute("id"),j=a(g._contentList[h]);if(this.isCollapsed&&this.collapsible){j[0].style.display="none";this._selectCallback(h,l,b);return}g._refreshBarPosition();switch(this.animationType){case"none":if(!g.selectionTracker){for(var f=0;f=0){if(!this._tabCaptured){var g=this,e=g._contentList[d],c=a(e),h=g._titleList[d],f=a(h);if(c.initAnimate&&c.animate===undefined){c.initAnimate()}g._stop(c);if(this.animationType==="fade"){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}else{if(this.selectionTracker){setTimeout(function(){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)},this.selectionTrackerAnimationDuration)}else{e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}}this._unselectCallback(d,i,b);if(!this.selectionTracker){g._removeClass(h,g.toThemeProperty("jqx-tabs-title-selected jqx-fill-state-pressed"))}}}},_unselectCallback:function(c,d,b){if(b){this._raiseEvent(8,{item:c})}if(d){d()}},disable:function(){var b=this.length();while(b){b--;this.disableAt(b)}},enable:function(){var b=this.length();while(b){b--;this.enableAt(b)}},getEnabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(!this.disabled){b++}});return b},getDisabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(this.disabled){b++}});return b},removeAt:function(b){if(this._isValidIndex(b)&&(this.canCloseAllTabs||this.length()>1)){this._removeHoverStates();var d=this,c=d._outerWidth(this._titleList[b],true),g=this.getTitleAt(b);this._unorderedList.style.width=d._toPx(d._width(this._unorderedList)-c);a(this._titleList[b]).remove();a(this._contentList[b]).remove();this._titleList.splice(b,1);this._contentList.splice(b,1);d._closeButtonList.splice(b,1);this._addStyles();this._performHeaderLayout();this._removeEventHandlers();this._addEventHandlers();this._raiseEvent(3,{item:b,title:g});this._isAnimated={};var f;if(this.selectedItem>0){this._selectedItem=-1;if(this.selectedItem>=b){f=this._getPreviousIndex(this.selectedItem);this.select(f)}else{this.select(d.selectedItem)}}else{this._selectedItem=-1;f=this._getNextIndex(this.selectedItem);this.select(f)}if(parseInt(this._unorderedListHelper.css("left"),10)>this._getArrowsDisplacement()){this._unorderedList.style.left=d._toPx(this._getArrowsDisplacement())}if(d._width(this._unorderedList)<=d._width(this._headerWrapper)){var e=(this.enableScrollAnimation)?this.scrollAnimationDuration:0;this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:0},e,function(){d._unlockAnimation("unorderedList")})}}},removeFirst:function(){this.removeAt(0)},removeLast:function(){this.removeAt(this.length()-1)},disableAt:function(b){var d=this._titleList[b];if(!d.disabled||d.disabled===undefined){if(this.selectedItem===b){var c=this.next();if(!c){c=this.previous()}}d.disabled=true;this.removeHandler(d,this.toggleMode);if(this.enabledHover){a(d).off("mouseenter").off("mouseleave")}this._removeEventListenerAt(b);d.className+=" "+this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled");this._raiseEvent(5,{item:b})}},enableAt:function(b){var c=this._titleList[b];if(c.disabled){c.disabled=false;this._addEventListenerAt(b);this._removeClass(c,this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled"));this._raiseEvent(4,{item:b})}},addAt:function(d,g,e){if(d>=0&&d<=this.length()){this._removeHoverStates();var b=document.createElement("li");b.innerHTML=g;b.className=this.toThemeProperty("jqx-tabs-title jqx-item");var f=document.createElement("div");f.innerHTML=e;f.className=this.toThemeProperty("jqx-tabs-content-element");if(this.position==="bottom"){b.className+=" "+this.toThemeProperty("jqx-tabs-title-bottom")}var c=false;if(this._titleList.length===0){this._unorderedList.appendChild(b)}else{if(d=0){this._unorderedList.insertBefore(b,this._titleList[d])}else{this._unorderedList.appendChild(b)}}this._contentWrapper.appendChild(f);this._addItemTo(this._titleList,d,b);this._addItemTo(this._contentList,d,f);this._addCloseButton(d);if(this._selectedItem>d){this._selectedItem++}this._switchTabs(d,this._selectedItem);this._selectedItem=d;this._uiRefresh(c);this._raiseEvent(2,{item:d});this._moveSelectionTrack(this._selectedItem,0)}},addFirst:function(c,b){this.addAt(0,c,b)},addLast:function(c,b){this.addAt(this.length(),c,b)},val:function(b){if(arguments.length===0||typeof(b)==="object"){return this._selectedItem}this.select(b);return this._selectedItem},select:function(b){if(typeof(b)==="object"){b=this._indexOf(b)}var d=b>=0&&b0&&b0&&c<=this._titleList.length){c--;if(!this._titleList[c].disabled){return c}}return b}else{return 0}},_getNextIndex:function(c){if(c!==undefined&&!isNaN(c)){var b=c;while(c>=0&&c=0&&bb-this._getArrowsDisplacement()){h=-l+k-f-((this.scrollable)?(2*this.arrowButtonSize-this._getArrowsDisplacement()):0);c=k-f-this._getArrowsDisplacement()}else{this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration);return true}}this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:h},this.scrollAnimationDuration,function(){d._unlockAnimation("unorderedList");d._moveSelectionTrack(d._selectedItem,0);return true});this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration,c);return true},isVisibleAt:function(d){var c=this;if(d===undefined||d===-1||d===null){d=c.selectedItem}if(!c._isValidIndex(d)){return false}var h=c._titleList[d];var j=parseInt(a(h).position().left,10)+parseInt(c._unorderedListHelper.css("margin-left"),10);var f=parseInt(c._unorderedListHelper.css("left"),10);var i=c._outerWidth(c._headerWrapper,true);var e=c._outerWidth(h,true);var g=f-c._getArrowsDisplacement();var b=i-c._getArrowsDisplacement()-g;if(j<-g){return false}else{if(j+e>b){return false}else{return true}}return true},isDisabled:function(b){return this._titleList[b].disabled},_lockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=true}},_unlockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=false}},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length===2){d._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length===2){return}this._validateProperties();switch(c){case"touchMode":if(d){b.enabledHover=false;b.keyboardNavigation=false}break;case"width":case"height":b._setSize();return;case"disabled":if(d){this.disable()}else{this.enable()}return;case"showCloseButtons":if(d){this.showAllCloseButtons()}else{this.hideAllCloseButtons()}this._performHeaderLayout();return;case"selectedItem":if(this._isValidIndex(d)){this.select(d)}return;case"scrollStep":case"contentTransitionDuration":case"scrollAnimationDuration":case"enableScrollAnimation":return;case"selectionTracker":if(d){this._refresh();this.select(this._selectedItem)}else{if(this._selectionTracker){this._selectionTrackerHelper.remove()}}return;case"scrollable":if(d){this._refresh();this.select(this._selectedItem)}else{a(this._leftArrow).remove();a(this._rightArrow).remove();this._performHeaderLayout()}return;case"autoHeight":this._performHeaderLayout();return;case"theme":a.jqx.utilities.setTheme(e,d,this.host);return}this._unorderedList.style.left="0px";this._refresh();this.select(this._selectedItem);this._addSelectStyle(this._selectedItem,true)},_toPx:function(b){if(typeof b==="number"){return b+"px"}else{return b}},_removeClass:function(c,b){a(c).removeClass(b)},_width:function(e){var b=a(e),g=b.css("border-left-width"),c=b.css("border-right-width"),d=parseInt(b.css("padding-left"),10),h=parseInt(b.css("padding-right"),10);if(g.indexOf("px")===-1){g=1}else{g=parseInt(g,10)}if(c.indexOf("px")===-1){c=1}else{c=parseInt(c,10)}var f=e.offsetWidth-(g+c+d+h);return f},_outerWidth:function(c,g){var f=c.offsetWidth;if(g){var b=a(c),d=parseInt(b.css("margin-left"),10),e=parseInt(b.css("margin-right"),10);f+=d+e}return f},_height:function(e){var c=a(e),h=c.css("border-top-width"),d=c.css("border-bottom-width"),f=parseInt(c.css("padding-top"),10),g=parseInt(c.css("padding-bottom"),10);if(h.indexOf("px")===-1){h=1}else{h=parseInt(h,10)}if(d.indexOf("px")===-1){d=1}else{d=parseInt(d,10)}var b=e.offsetHeight-(h+d+f+g);return b},_outerHeight:function(e,g){var f=e.offsetHeight;if(g){var b=a(e),c=parseInt(b.css("margin-top"),10),d=parseInt(b.css("margin-bottom"),10);f+=c+d}return f},_stop:function(b){if(b.stop){b.stop()}else{b.animate("stop",true)}}})}(jqxBaseFramework)); +(function(a){a.jqx.jqxWidget("jqxTabs","",{});a.extend(a.jqx._jqxTabs.prototype,{defineInstance:function(){var b={scrollAnimationDuration:200,enabledHover:true,disabled:false,collapsible:false,animationType:"none",enableScrollAnimation:true,contentTransitionDuration:450,toggleMode:"click",selectedItem:0,height:"auto",width:"auto",position:"top",selectionTracker:false,scrollable:true,scrollPosition:"right",scrollStep:70,autoHeight:true,headerHeight:null,showCloseButtons:false,canCloseAllTabs:true,closeButtonSize:16,arrowButtonSize:16,keyboardNavigation:true,reorder:false,selectionTrackerAnimationDuration:300,_isTouchDevice:false,roundedCorners:true,_headerExpandingBalance:0,_dragStarted:false,_tabCaptured:false,_lastUnorderedListPosition:0,_selectedItem:0,_titleList:[],_contentList:[],_contentWrapper:null,_unorderedList:null,_scrollTimeout:null,isCollapsed:false,touchMode:false,initTabContent:null,enableDropAnimation:false,_currentEvent:null,_needScroll:true,_isAnimated:{},_events:["created","selected","add","removed","enabled","disabled","selecting","unselecting","unselected","dragStart","dragEnd","locked","unlocked","collapsed","expanded","tabclick"],_initTabContentList:[],_invalidArgumentExceptions:{invalidScrollAnimationDuration:"The scroll animation duration is not valid!",invalidWidth:"Width you've entered is invalid!",invalidHeight:"Height you've entered is invalid!",invalidAnimationType:"You've entered invalid animation type!",invalidcontentTransitionDuration:"You've entered invalid value for contentTransitionDuration!",invalidToggleMode:"You've entered invalid value for toggleMode!",invalidPosition:"You've entered invalid position!",invalidScrollPosition:"You've entered invalid scroll position!",invalidScrollStep:"You've entered invalid scroll step!",invalidStructure:"Invalid structure!",invalidArrowSize:"Invalid scroll button size!",invalidCloseSize:"Invalid close button size!"},aria:{"aria-disabled":{name:"disabled",type:"boolean"}},rtl:false};if(this===a.jqx._jqxTabs.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._IE8=a.jqx.browser.msie&&a.jqx.browser.version<9;a.jqx.aria(this);this.element.className+=" "+this.toThemeProperty("jqx-tabs jqx-widget jqx-widget-content");this.element.setAttribute("role","tablist");var e=this.host.children();for(var b=0;b0&&f._contentList[f.selectedItem]){a(f._contentList[f.selectedItem]).trigger(j)}},50+f.selectionTrackerAnimationDuration)}else{var d=new a.Event("loadContent");if(!f._initTabContentList[f.selectedItem]){if(f.initTabContent){f.initTabContent(f.selectedItem);f._initTabContentList[f.selectedItem]=true}}d.owner=this;var h=new a.Event("resize");this.host.trigger(h)}}}catch(c){if(c&&console){console.log(c)}}return b},_getArrowsDisplacement:function(){if(!this._needScroll){return 0}var d;var c=this.arrowButtonSize;var b=this.arrowButtonSize;if(this.scrollPosition==="left"){d=c+b}else{if(this.scrollPosition==="both"){d=c}else{d=0}}return d},_scrollRight:function(e){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var f=parseInt(this._width(this._unorderedList)+parseInt(this._unorderedListHelper.css("margin-left"),10),10),h=this._width(this.element),g,i,b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),d=0,j;if(this.scrollable){g=this._leftArrow.offsetWidth;i=this._rightArrow.offsetWidth}else{g=0;i=0}e=(this.enableScrollAnimation)?e:0;if(this._width(this._headerWrapper)>parseInt(this._unorderedListHelper.css("margin-left"),10)+this._width(this._unorderedList)){d=c}else{if(Math.abs(b)+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){j=h-f-g-i+parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(d,j,e)},_scrollLeft:function(f){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),e=0,d;f=(this.enableScrollAnimation)?f:0;if(this._width(this._headerWrapper)>=this._width(this._unorderedList)){e=c}else{if(b+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){d=parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(e,d,f)},_performScrollAnimation:function(e,d,c){var b=this;if(d!==undefined){this._moveSelectionTrack(this._selectedItem,0,d)}this._lockAnimation("unorderedList");b._refreshBarPosition();this._unorderedListHelper.animate({left:e},c,function(){b._moveSelectionTrack(b.selectedItem,0);b._unlockAnimation("unorderedList");b._refreshBarPosition()})},_addKeyboardHandlers:function(){var b=this;if(this.keyboardNavigation){this.addHandler(this.host,"keydown",function(e){if(!b._activeAnimation()){var f=b._selectedItem;var d=b.selectionTracker;var c=b.getContentAt(f);if(a(e.target).ischildof(c)){return true}if(a(document.activeElement).ischildof(a(c))){return true}switch(e.keyCode){case 37:if(b.rtl){b.next()}else{b.previous()}return false;case 39:if(b.rtl){b.previous()}else{b.next()}return false;case 36:b.first();return false;case 35:b.last();return false;case 27:if(b._tabCaptured){b._cancelClick=true;b._uncapture(null,b.selectedItem);b._tabCaptured=false}break}b.selectionTracker=d}return true})}},_addScrollHandlers:function(){var b=this;this.addHandler(this._leftArrow,"mousedown",function(){b._startScrollRepeat(true,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mousedown",function(){b._startScrollRepeat(false,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(this._leftArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(a(document),"mouseup.tab"+this.element.id,this._mouseUpScrollDocumentHandler,this);this.addHandler(a(document),"mouseleave.tab"+this.element.id,this._mouseLeaveScrollDocumentHandler,this)},_mouseLeaveScrollDocumentHandler:function(c){var b=c.data;if(!b._scrollTimeout){return}clearTimeout(b._scrollTimeout)},_mouseUpScrollDocumentHandler:function(c){var b=c.data;clearTimeout(b._scrollTimeout)},_mouseUpDragDocumentHandler:function(c){var b=c.data;if(b._tabCaptured&&b._dragStarted){b._uncapture(c)}b._tabCaptured=false},_addReorderHandlers:function(){var b=this;b.addHandler(a(document),"mousemove.tab"+b.element.id,b._moveElement,b);b.addHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpDragDocumentHandler,b)},_addEventHandlers:function(){var e=this.length();while(e){e--;this._addEventListenerAt(e)}if(this.keyboardNavigation){this._addKeyboardHandlers()}if(this.scrollable){this._addScrollHandlers()}if(this.reorder&&!this._isTouchDevice){this._addReorderHandlers()}var d=this;try{if(document.referrer!==""||window.frameElement){if(window.top!==null&&window.top!==window.self){var c=function(){if(d._tabCaptured){d._cancelClick=true;d._uncapture(null,d.selectedItem);d._tabCaptured=false}};var f=null;if(window.parent&&document.referrer){f=document.referrer}if(f&&f.indexOf(document.location.host)!==-1){if(window.top.document){this.addHandler(a(window.top.document),"mouseup.tabs"+this.element.id,c)}}}}}catch(b){}},focus:function(){try{this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25)}catch(b){}},_getFocusedItem:function(c){var d=this.length();while(d){d--;var b=this._titleList[d],g=this._outerWidth(b,true),f=parseInt(a(b).offset().left,10),e=f;if((e<=c&&e+g>=c)&&(b!==this._capturedElement)&&(!this._titleList[d].locked)&&(this._titleList[d].disabled!==true)){return d}}return -1},_uncapture:function(f){var e=this.selectionTracker;this._unorderedListLeftBackup=this._unorderedListHelper.css("left");this._dragStarted=false;this._tabCaptured=false;var b=this._indexOf(this._capturedElement);if(!this._capturedElement){return}switch(this.position){case"top":this._capturedElement.style.bottom="0px";break;case"bottom":this._capturedElement.style.top="0px";break}var d;if(f){d=this._getFocusedItem(f.clientX)}if(d===-1||!f){this._capturedElement.style.left="0px"}else{this._raiseEvent(10,{item:b,dropIndex:d});this._reorderItems(d,b)}for(var c=0;c=e;c--){this._titleList[c]=this._titleList[c-1];this._contentList[c]=this._contentList[c-1]}this._contentList[e]=f;this._titleList[e]=this._capturedElement}},getSelectedItem:function(){return this.selectedItem},_getSelectedItem:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c){this._selectedItem=this.selectedItem=b;break}}},_moveElement:function(d){var c=d.data;if(c._tabCaptured){if(document.selection){document.selection.clear()}if(!c._dragStarted){var b=-parseInt(c._unorderedListHelper.css("left"),10);if(d.clientX+b>c._startX+3||d.clientX+be.offset().left+c._width(this._headerWrapper)){this._scrollRight(this.scrollAnimationDuration);this._capturedElement.style.left=parseInt(a(this._capturedElement).css("left"),10)+this._lastUnorderedListPosition-b}else{c._stop(c._unorderedListHelper);this._unlockAnimation("unorderedList");clearTimeout(this._scrollTimeout)}}this._scrollTimeout=setTimeout(function(){c._dragScroll(d)},this.scrollAnimationDuration);this._lastUnorderedListPosition=b},_captureElement:function(d,c){if(!this._tabCaptured&&!this._titleList[c].locked&&this._titleList[c].disabled!==true&&!this._activeAnimation()){var b=-parseInt(this._unorderedListHelper.css("left"),10);this._startX=b+d.clientX;this._startY=d.clientY;this._lastX=d.clientX;this._lastY=d.clientY;this._tabCaptured=true;this._capturedElement=this._titleList[c]}},_titleInteractionTrigger:function(b){if(this._headerExpandingBalance>0){this._removeOppositeBorder()}if(this._selectedItem!==b){this.select(this._titleList[b],"toggle");this._titleList[b].collapsed=false;if(!this.collapsible){if(this.height!=="auto"){this._contentWrapper.style.visibility="visible"}else{this._contentWrapper.style.display="block"}}}else{if(this.collapsible){if(this.isCollapsed){this.expand()}else{this.collapse()}}}},collapse:function(){var b=this._selectedItem,c=this;this.isCollapsed=true;if(c.height!=="auto"){c._contentWrapper.style.visibility="hidden"}else{c._contentWrapper.style.display="none"}c._raiseEvent(13,{item:b});if(this.position==="top"){c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed")}else{c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed-bottom");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed-bottom")}},expand:function(){var b=this._selectedItem,c=this;this.isCollapsed=false;this._select(b,c.contentTransitionDuration,null,false,true);if(c.height!=="auto"){c._contentWrapper.style.visibility="visible"}else{c._contentWrapper.style.display="block"}c._raiseEvent(14,{item:b});if(this.position==="top"){c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed"))}else{c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed-bottom"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed-bottom"))}},_addSelectHandler:function(b){var c=this;this.addHandler(this._titleList[b],"selectstart",function(){return false});this.addHandler(this._titleList[b],this.toggleMode,(function(d){return function(){c._raiseEvent("15",{item:d});if(!c._tabCaptured&&!c._cancelClick){c._titleInteractionTrigger(d)}return true}}(b)))},_addDragDropHandlers:function(b){var c=this;this.addHandler(this._titleList[b],"mousedown",function(d){c._captureElement(d,b)});this.addHandler(this._titleList[b],"mouseup",function(d){if(c._tabCaptured&&c._dragStarted){c._cancelClick=true;c._uncapture(d,b)}else{c._cancelClick=false}c._tabCaptured=false;return false})},_removeHoverStates:function(){var b=this;a.each(this._titleList,function(){b._removeClass(this,b.toThemeProperty("jqx-tabs-title-hover-top jqx-tabs-title-hover-bottom"))})},_addHoverHandlers:function(b){var d=this;var c=this._titleList[b];this.addHandler(c,"mouseenter mouseleave",function(g){if(b!==d._selectedItem){var f="jqx-fill-state-hover";if(d.position==="top"){f+=" jqx-tabs-title-hover-top"}else{f+=" jqx-tabs-title-hover-bottom"}if(g.type==="mouseenter"){c.className+=" "+d.toThemeProperty(f)}else{d._removeClass(c,d.toThemeProperty(f))}if(d.showCloseButtons){var e=d._closeButtonList[b];if(g.type==="mouseenter"){e.className+=" "+d.toThemeProperty("jqx-tabs-close-button-hover",true)}else{d._removeClass(e,d.toThemeProperty("jqx-tabs-close-button-hover",true))}}}})},_addEventListenerAt:function(c){var d=this;if(this._titleList[c].disabled){return}if(this.reorder&&!this._isTouchDevice){this._addDragDropHandlers(c)}this._addSelectHandler(c);if(this.enabledHover){this._addHoverHandlers(c)}var b=d._closeButtonList[c];this.removeHandler(b,"click");this.addHandler(b,"click",function(){var e=a(this).parents("li").index();d.removeAt(e);return false})},_removeEventHandlers:function(){var c=this;var b=c.length();while(b){b--;c._removeEventListenerAt(b)}if(c.scrollable){c.removeHandler(c._leftArrow,"mousedown");c.removeHandler(c._rightArrow,"mousedown")}c.removeHandler(a(document),"mousemove.tab"+c.element.id,c._moveElement);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpScrollDocumentHandler);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpDragDocumentHandler);c.removeHandler(c.host,"keydown")},_removeEventListenerAt:function(b){var c=this;c.removeHandler(c._titleList[b],c.toggleMode);c.removeHandler(c._titleList[b],"mouseenter");c.removeHandler(c._titleList[b],"mouseleave");c.removeHandler(c._titleList[b],"mousedown");c.removeHandler(c._titleList[b],"mouseup");c.removeHandler(c._closeButtonList[b],"click")},_moveSelectionTrack:function(n,c,b){var h=this;if(n===-1){return}if(this._titleList.length===0){return}if(n>=this._titleList.length){return}var m=this._titleList[n],o=a(m);h._refreshBarPosition();if(this.selectionTracker&&this._selectionTracker){var i;h._stop(h._selectionTrackerHelper);this._unlockAnimation("selectionTracker");if(b===undefined){i=parseInt(o.position().left,10);if(!isNaN(parseInt(this._unorderedListHelper.css("left"),10))){i+=parseInt(this._unorderedListHelper.css("left"),10)}if(!isNaN(parseInt(this._unorderedListHelper.css("margin-left"),10))){i+=parseInt(this._unorderedListHelper.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-left"),10))){i+=parseInt(o.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-right"),10))){}}else{i=b}var g=0;var e=0;if(this.position==="top"){g=this._height(h._headerWrapper)-m.offsetHeight;if(!this.autoHeight){e+=parseInt(o.css("margin-top"),10)}}this._lockAnimation("selectionTracker");var l=parseInt(o.css("padding-left"),10)+parseInt(o.css("padding-right"),10);var f=this.position==="top"?0:1;var k=parseInt(a(this._headerWrapper).css("padding-top"),10);var j=parseInt(o.css("padding-top"),10)+parseInt(o.css("padding-bottom"),10);this._selectionTracker.style.visibility="visible";this._moveSelectionTrackerContainer.style.visibility="visible";var d=parseInt(o.css("margin-top"),10);if(isNaN(d)){d=0}h._refreshBarPosition();h._selectionTrackerHelper.animate({top:k+d-f,left:i+"px",height:parseInt(this._height(m)+j,10),width:h._width(m)+l},c,function(){h._unlockAnimation("selectionTracker");h._selectionTracker.style.visibility="hidden";h._addSelectStyle(n,true);h._moveSelectionTrackerContainer.style.visibility="hidden"})}},destroy:function(){a.jqx.utilities.resize(this.host,null,true);if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){this.removeHandler(a(window.top.document),"mouseup.tabs"+this.element.id)}}this.host.remove()},_switchTabs:function(b,d){if(b!==d&&!this._activeAnimation()&&!this._tabCaptured){var c=this;this._raiseEvent(7,{item:d});this._raiseEvent(6,{item:b});if(this._currentEvent){if(this._currentEvent.cancel){this._currentEvent=null;return}}this._unselect(d,null,true);this._select(b,c.contentTransitionDuration,null,true);return true}return false},_activeAnimation:function(){for(var b in this._isAnimated){if(this._isAnimated.hasOwnProperty(b)){if(this._isAnimated[b]){return true}}}return false},_indexOf:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c||this._contentList[b]===c){return b}}return -1},_validateProperties:function(){try{if(this.scrollAnimationDuration<0||isNaN(this.scrollAnimationDuration)){throw new Error(this._invalidArgumentExceptions.invalidScrollAnimationDuration)}if(parseInt(this.width,10)<0&&this.width!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(parseInt(this.height,10)<0&&this.height!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.animationType!=="none"&&this.animationType!=="fade"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(this.contentTransitionDuration<0||isNaN(this.contentTransitionDuration)){throw new Error(this._invalidArgumentExceptions.invalidcontentTransitionDuration)}if(this.toggleMode!=="click"&&this.toggleMode!=="dblclick"&&this.toggleMode!=="mouseenter"&&this.toggleMode!=="none"){throw new Error(this._invalidArgumentExceptions.invalidToggleMode)}if(this.position!=="top"&&this.position!=="bottom"){throw new Error(this._invalidArgumentExceptions.invalidPosition)}if(this.scrollPosition!=="left"&&this.scrollPosition!=="right"&&this.scrollPosition!=="both"){throw new Error(this._invalidArgumentExceptions.invalidScrollPosition)}if(this.scrollStep<0||isNaN(this.scrollStep)){throw new Error(this._invalidArgumentExceptions.invalidScrollStep)}if(this._titleList.length!==this._contentList.length||this._titleList.length===0){throw new Error(this._invalidArgumentExceptions.invalidStructure)}if(this.arrowButtonSize<0||isNaN(this.arrowButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidArrowSize)}if(this.closeButtonSize<0||isNaN(this.closeButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidCloseSize)}}catch(b){try{console.log(b)}catch(c){}}},_startScrollRepeat:function(d,c){var b=this;if(d){this._scrollLeft(c)}else{this._scrollRight(c)}if(this._scrollTimeout){clearTimeout(this._scrollTimeout)}this._scrollTimeout=setTimeout(function(){b._startScrollRepeat(d,b.scrollAnimationDuration)},c)},_performLayout:function(){var b=this.length();while(b){b--;if(this.position==="top"||this.position==="bottom"){if(this.rtl){this._titleList[b].style["float"]="right"}else{this._titleList[b].style["float"]="left"}}}this._fitToSize();this._performHeaderLayout();this._fitToSize()},updatetabsheader:function(){this._performHeaderLayout()},_setSize:function(){var b=this;b._fitToSize();b._positionArrows(b._totalItemsWidth);if(b._totalItemsWidth>b.element.offsetWidth){b._unorderedList.style.width=b._toPx(b._totalItemsWidth)}else{b._unorderedList.style.width=b.element.offsetWidth-2+"px"}b._fitToSize()},_addArrows:function(){if(this._leftArrow&&this._rightArrow){a(this._leftArrow).remove();a(this._rightArrow).remove()}this._leftArrow=document.createElement("div");this._leftArrow.innerHTML='';this._leftArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._leftArrow.style.zIndex=30;this._leftArrow.style.display="none";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.height="100%";this._rightArrow=document.createElement("div");this._rightArrow.innerHTML='';this._rightArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._rightArrow.style.zIndex=30;this._rightArrow.style.display="none";this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.height="100%";this._headerWrapper.appendChild(this._leftArrow);this._headerWrapper.appendChild(this._rightArrow)},_tabsWithVisibleCloseButtons:function(){if(!this.showCloseButtons){return 0}var b=this.length();a.each(this._titleList,function(){var c=this.attr("hasclosebutton");if(c!==undefined&&c!==null){if(c==="false"||c===false){b--}}});return b},_calculateTitlesSize:function(){var g=this;function f(n,m){if(n){if(m){n.style.display="block"}else{n.style.display="none"}}}var l=0;var k=0;var h=this.length();if(this.rtl&&a.jqx.browser.msie&&a.jqx.browser.version<8){this._measureItem=document.createElement("span");this._measureItem.style.position="relative";this._measureItem.style.visibility="hidden";document.body.appendChild(this._measureItem)}while(h){h--;var j=this._titleList[h],b=g._closeButtonList[h];if(this._measureItem){this._measureItem.innerHTML=j.innerHTML;this._measureItem.html(this._titleList[h].html());j.style.width=g._toPx(g._width(this._measureItem))}j.style.position="static";f(b,false);k+=g._outerWidth(j,true);var e=g._outerHeight(j,true);if(l1)){d=false;if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[h]===1){f(b,false);d=true}}if(!d){k+=this.closeButtonSize;f(b,true)}}}j.style.height=this._toPx(g._height(j))}if(this._measureItem){a(this._measureItem).remove()}return{height:l,width:10+k}},_reorderHeaderElements:function(){if(this.selectionTracker){this._moveSelectionTrackerContainer.style.position="absolute";this._moveSelectionTrackerContainer.style.height="100%";this._moveSelectionTrackerContainer.style.top="0px";this._moveSelectionTrackerContainer.style.left="0px";this._moveSelectionTrackerContainer.style.width="100%"}this._headerWrapper.style.position="relative";this._headerWrapper.style.left="0px";this._headerWrapper.style.top="0px";if(this.scrollable){this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.position="absolute";this._rightArrow.style.top="0px";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.position="absolute";this._leftArrow.style.top="0px";var c=this.theme&&this.theme.indexOf("ui-")!==-1?3:0;if(c>0){this._rightArrow.className+=" "+this.toThemeProperty("jqx-rc-r");this._leftArrow.className+=" "+this.toThemeProperty("jqx-rc-l")}var b=this.scrollPosition;if(this.rtl){if(b==="left"){b="right"}if(b==="right"){b="left"}}switch(b){case"both":this._rightArrow.style.right="0px";this._leftArrow.style.left="0px";break;case"left":this._rightArrow.style.left=this._toPx(this.arrowButtonSize);this._leftArrow.style.left="0px";break;case"right":this._rightArrow.style.right=this._toPx(-c);this._leftArrow.style.right=this._toPx(parseInt(this.arrowButtonSize,10)-c);break}}},_positionArrows:function(b){if(b>=this._headerWrapper.offsetWidth&&this.scrollable){this._needScroll=true;if(this._unorderedListHelper.position().left===0){this._unorderedListLeftBackup=this._getArrowsDisplacement()+"px"}this._leftArrow.style.display="block";this._rightArrow.style.display="block"}else{this._needScroll=false;this._leftArrow.style.display="none";this._rightArrow.style.display="none";this._unorderedList.style.left="0px"}},_performHeaderLayout:function(){this._removeSelectStyle();var b=this._calculateTitlesSize();var e=b.height;var c=b.width;this._headerWrapper.style.height=this._toPx(e);this._unorderedList.style.height=this._toPx(e);if(this.headerHeight!==null&&this.headerHeight!=="auto"){this._headerWrapper.style.height=this._toPx(this.headerHeight);this._unorderedList.style.height=this._toPx(this.headerHeight)}var d=this._width(this.element);if(c>d){this._unorderedList.style.width=this._toPx(c)}else{this._unorderedList.style.width=this._toPx(d)}if(a.jqx.browser.msie&&a.jqx.browser.version<8){this._unorderedList.style.position="relative";this._unorderedList.style.overflow="hidden"}this._reorderHeaderElements();c=c+parseInt(this._unorderedListHelper.css("margin-left"),10);this._totalItemsWidth=c;this._positionArrows(c);this._unorderedList.style.position="relative";this._unorderedList.style.top="0px";this._verticalAlignElements();this._moveSelectionTrack(this._selectedItem,0);this._addSelectStyle(this.selectedItem)},_verticalAlignElements:function(){var j=this.length();while(j){j--;var n=this._titleList[j],p=a(n),b=p.children()[0],m=this._closeButtonList[j],k=parseInt(p.css("padding-top"),10);if(!k){k=0}if(this.autoHeight){var c=parseInt(p.css("padding-top"),10),o=parseInt(p.css("padding-bottom"),10),i=p.css("border-top-width"),f=p.css("border-bottom-width");if(i.indexOf("px")===-1){i=1}else{i=parseInt(i,10)}if(f.indexOf("px")===-1){f=1}else{f=parseInt(f,10)}n.style.height=this._toPx(this._outerHeight(this._unorderedList,true)-(c+o+i+f))}else{if(this.position==="top"){var h=this._height(this._unorderedList)-parseInt(this._outerHeight(n,true),10);if(parseInt(p.css("margin-top"),10)!==h&&h!==0){n.style.marginTop=this._toPx(h)}}else{n.style.height=this._toPx(this._height(n))}}b.style.height="100%";var e=this._height(n);if(m){var g=e/2-this._height(m)/2;m.style.marginTop=this._toPx(1+g)}var l=e/2-this._height(b)/2;b.style.marginTop=this._toPx(l)}if(this.scrollable){var d=(parseInt(this._headerWrapper.offsetHeight,10)-this.arrowButtonSize)/2;a(this._rightArrow).children()[0].style.marginTop=this._toPx(d);this._rightArrow.style.height="100%";a(this._leftArrow).children()[0].style.marginTop=this._toPx(d);this._leftArrow.style.height="100%"}},_getImageUrl:function(c){var b=c.css("background-image");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},_fitToSize:function(){var c=false;var e=false;var d=this;if(d.width!==null&&d.width.toString().indexOf("%")!==-1){c=true}if(d.height!==null&&d.height.toString().indexOf("%")!==-1){e=true}if(c){this.element.style.width=this.width;this._contentWrapper.style.width="100%"}else{d.element.style.width=d._toPx(d.width);if(this.width!=="auto"){this._contentWrapper.style.width="100%"}}var b;if(e){this.element.style.height=this.height;this._contentWrapper.style.width="100%";this._contentWrapper.style.height="auto";b=this.element.offsetHeight-this._headerWrapper.offsetHeight-2;this._contentWrapper.style.height=b+"px"}else{if(this.height!=="auto"){d.element.style.height=d._toPx(d.height);b=this._height(d.element)-this._headerWrapper.offsetHeight;this._contentWrapper.style.height=d._toPx(b)}else{this._contentWrapper.style.height="auto"}}},_maxHeightTab:function(){var c=this.length();var d=-1;var b=-1;while(c){c--;if(d0){a(g).find(".jqx-tabs-close-button").remove()}d.style["float"]=f;d.innerHTML=g.innerHTML;g.innerHTML="";var b=document.createElement("div");b.className=this.toThemeProperty("jqx-tabs-close-button");b.style.height=this._toPx(this.closeButtonSize);b.style.width=this._toPx(this.closeButtonSize);b.style["float"]=f;b.style.fontSize="1px";g.appendChild(d);g.appendChild(b);if(e===true){this._closeButtonList[c]=b}else{this._closeButtonList.splice(c,0,b)}if(!this.showCloseButtons){b.style.display="none"}else{if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[c]===1){b.style.display="none"}}}},_addCloseButtons:function(){var b=this.length();while(b){b--;this._addCloseButton(b,true)}},_prepareTabs:function(){var c=this.length();var b=this.selectionTracker;this.selectionTracker=false;while(c){c--;if(this._selectedItem!==c){this._unselect(c,null,false)}}this._select(this._selectedItem,0,null,false);this.selectionTracker=b;if(this.initTabContent){if(!this._initTabContentList[this.selectedItem]){if(!this._hiddenParent()){this.initTabContent(this.selectedItem);this._initTabContentList[this.selectedItem]=true}}}},_isValidIndex:function(b){return(b>=0&&b=0&&f!==undefined){var c=null;if(this.showCloseButtons){c=this._closeButtonList[d];if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[d]===1){c=null}}}var b="jqx-fill-state-hover",e=" jqx-fill-state-pressed";if(this.position==="top"){b+=" jqx-tabs-title-hover-top";e+=" jqx-tabs-title-selected-top"}else{b+=" jqx-tabs-title-hover-bottom";e+=" jqx-tabs-title-selected-bottom"}this._removeClass(f,this.toThemeProperty(b));f.className+=this.toThemeProperty(e);if(c!==null){c.className+=" "+this.toThemeProperty("jqx-tabs-close-button-selected")}}}},_addItemTo:function(g,c,e){if(c");a(this._headerWrapper).append(b);b.addClass(this.toThemeProperty("jqx-tabs-bar"));this.bar=b}setTimeout(function(){var d=parseInt(c._unorderedListHelper.css("left"),10);var e=parseInt(c._unorderedListHelper.css("margin-left"));if(d){c.bar.css("left",e+c._titleList[c._selectedItem].offsetLeft+d)}else{c.bar.css("left",e+c._titleList[c._selectedItem].offsetLeft)}c.bar.width(a(c._titleList[c._selectedItem]).outerWidth()-2)})},_select:function(h,e,l,b,c){if(!this._tabCaptured){this.host.attr("hideFocus","true");var g=this;if(c===undefined){this._addSelectStyle(h)}else{this._addSelectStyle(h,c)}var k=a(g._titleList[h]),d=g._titleList[h].getAttribute("id"),j=a(g._contentList[h]);if(this.isCollapsed&&this.collapsible){j[0].style.display="none";this._selectCallback(h,l,b);return}g._refreshBarPosition();switch(this.animationType){case"none":if(!g.selectionTracker){for(var f=0;f=0){if(!this._tabCaptured){var g=this,e=g._contentList[d],c=a(e),h=g._titleList[d],f=a(h);if(c.initAnimate&&c.animate===undefined){c.initAnimate()}g._stop(c);if(this.animationType==="fade"){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}else{if(this.selectionTracker){setTimeout(function(){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)},this.selectionTrackerAnimationDuration)}else{e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}}this._unselectCallback(d,i,b);if(!this.selectionTracker){g._removeClass(h,g.toThemeProperty("jqx-tabs-title-selected jqx-fill-state-pressed"))}}}},_unselectCallback:function(c,d,b){if(b){this._raiseEvent(8,{item:c})}if(d){d()}},disable:function(){var b=this.length();while(b){b--;this.disableAt(b)}},enable:function(){var b=this.length();while(b){b--;this.enableAt(b)}},getEnabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(!this.disabled){b++}});return b},getDisabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(this.disabled){b++}});return b},removeAt:function(b){if(this._isValidIndex(b)&&(this.canCloseAllTabs||this.length()>1)){this._removeHoverStates();this._initTabContentList[b]=false;var d=this,c=d._outerWidth(this._titleList[b],true),g=this.getTitleAt(b);this._unorderedList.style.width=d._toPx(d._width(this._unorderedList)-c);a(this._titleList[b]).remove();a(this._contentList[b]).remove();this._titleList.splice(b,1);this._contentList.splice(b,1);d._closeButtonList.splice(b,1);this._addStyles();this._performHeaderLayout();this._removeEventHandlers();this._addEventHandlers();this._raiseEvent(3,{item:b,title:g});this._isAnimated={};var f;if(this.selectedItem>0){this._selectedItem=-1;if(this.selectedItem>=b){f=this._getPreviousIndex(this.selectedItem);this.select(f)}else{this.select(d.selectedItem)}}else{this._selectedItem=-1;f=this._getNextIndex(this.selectedItem);this.select(f)}if(parseInt(this._unorderedListHelper.css("left"),10)>this._getArrowsDisplacement()){this._unorderedList.style.left=d._toPx(this._getArrowsDisplacement())}if(d._width(this._unorderedList)<=d._width(this._headerWrapper)){var e=(this.enableScrollAnimation)?this.scrollAnimationDuration:0;this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:0},e,function(){d._unlockAnimation("unorderedList")})}}},removeFirst:function(){this.removeAt(0)},removeLast:function(){this.removeAt(this.length()-1)},disableAt:function(b){var d=this._titleList[b];if(!d.disabled||d.disabled===undefined){if(this.selectedItem===b){var c=this.next();if(!c){c=this.previous()}}d.disabled=true;this.removeHandler(d,this.toggleMode);if(this.enabledHover){a(d).off("mouseenter").off("mouseleave")}this._removeEventListenerAt(b);d.className+=" "+this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled");this._raiseEvent(5,{item:b})}},enableAt:function(b){var c=this._titleList[b];if(c.disabled){c.disabled=false;this._addEventListenerAt(b);this._removeClass(c,this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled"));this._raiseEvent(4,{item:b})}},addAt:function(d,g,e){if(d>=0&&d<=this.length()){this._removeHoverStates();var b=document.createElement("li");b.innerHTML=g;b.className=this.toThemeProperty("jqx-tabs-title jqx-item");var f=document.createElement("div");f.innerHTML=e;f.className=this.toThemeProperty("jqx-tabs-content-element");if(this.position==="bottom"){b.className+=" "+this.toThemeProperty("jqx-tabs-title-bottom")}var c=false;if(this._titleList.length===0){this._unorderedList.appendChild(b)}else{if(d=0){this._unorderedList.insertBefore(b,this._titleList[d])}else{this._unorderedList.appendChild(b)}}this._contentWrapper.appendChild(f);this._addItemTo(this._titleList,d,b);this._addItemTo(this._contentList,d,f);this._addCloseButton(d);if(this._selectedItem>d){this._selectedItem++}this._switchTabs(d,this._selectedItem);this._selectedItem=d;this._uiRefresh(c);this._raiseEvent(2,{item:d});this._moveSelectionTrack(this._selectedItem,0)}},addFirst:function(c,b){this.addAt(0,c,b)},addLast:function(c,b){this.addAt(this.length(),c,b)},val:function(b){if(arguments.length===0||typeof(b)==="object"){return this._selectedItem}this.select(b);return this._selectedItem},select:function(b){if(typeof(b)==="object"){b=this._indexOf(b)}var d=b>=0&&b0&&b0&&c<=this._titleList.length){c--;if(!this._titleList[c].disabled){return c}}return b}else{return 0}},_getNextIndex:function(c){if(c!==undefined&&!isNaN(c)){var b=c;while(c>=0&&c=0&&bb-this._getArrowsDisplacement()){h=-l+k-f-((this.scrollable)?(2*this.arrowButtonSize-this._getArrowsDisplacement()):0);c=k-f-this._getArrowsDisplacement()}else{this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration);return true}}this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:h},this.scrollAnimationDuration,function(){d._unlockAnimation("unorderedList");d._moveSelectionTrack(d._selectedItem,0);return true});this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration,c);return true},isVisibleAt:function(d){var c=this;if(d===undefined||d===-1||d===null){d=c.selectedItem}if(!c._isValidIndex(d)){return false}var h=c._titleList[d];var j=parseInt(a(h).position().left,10)+parseInt(c._unorderedListHelper.css("margin-left"),10);var f=parseInt(c._unorderedListHelper.css("left"),10);var i=c._outerWidth(c._headerWrapper,true);var e=c._outerWidth(h,true);var g=f-c._getArrowsDisplacement();var b=i-c._getArrowsDisplacement()-g;if(j<-g){return false}else{if(j+e>b){return false}else{return true}}return true},isDisabled:function(b){return this._titleList[b].disabled},_lockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=true}},_unlockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=false}},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length===2){d._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length===2){return}this._validateProperties();switch(c){case"touchMode":if(d){b.enabledHover=false;b.keyboardNavigation=false}break;case"width":case"height":b._setSize();return;case"disabled":if(d){this.disable()}else{this.enable()}return;case"showCloseButtons":if(d){this.showAllCloseButtons()}else{this.hideAllCloseButtons()}this._performHeaderLayout();return;case"selectedItem":if(this._isValidIndex(d)){this.select(d)}return;case"scrollStep":case"contentTransitionDuration":case"scrollAnimationDuration":case"enableScrollAnimation":return;case"selectionTracker":if(d){this._refresh();this.select(this._selectedItem)}else{if(this._selectionTracker){this._selectionTrackerHelper.remove()}}return;case"scrollable":if(d){this._refresh();this.select(this._selectedItem)}else{a(this._leftArrow).remove();a(this._rightArrow).remove();this._performHeaderLayout()}return;case"autoHeight":this._performHeaderLayout();return;case"theme":a.jqx.utilities.setTheme(e,d,this.host);return}this._unorderedList.style.left="0px";this._refresh();this.select(this._selectedItem);this._addSelectStyle(this._selectedItem,true)},_toPx:function(b){if(typeof b==="number"){return b+"px"}else{return b}},_removeClass:function(c,b){a(c).removeClass(b)},_width:function(e){var b=a(e),g=b.css("border-left-width"),c=b.css("border-right-width"),d=parseInt(b.css("padding-left"),10),h=parseInt(b.css("padding-right"),10);if(g.indexOf("px")===-1){g=1}else{g=parseInt(g,10)}if(c.indexOf("px")===-1){c=1}else{c=parseInt(c,10)}var f=e.offsetWidth-(g+c+d+h);return f},_outerWidth:function(c,g){var f=c.offsetWidth;if(g){var b=a(c),d=parseInt(b.css("margin-left"),10),e=parseInt(b.css("margin-right"),10);f+=d+e}return f},_height:function(e){var c=a(e),h=c.css("border-top-width"),d=c.css("border-bottom-width"),f=parseInt(c.css("padding-top"),10),g=parseInt(c.css("padding-bottom"),10);if(h.indexOf("px")===-1){h=1}else{h=parseInt(h,10)}if(d.indexOf("px")===-1){d=1}else{d=parseInt(d,10)}var b=e.offsetHeight-(h+d+f+g);return b},_outerHeight:function(e,g){var f=e.offsetHeight;if(g){var b=a(e),c=parseInt(b.css("margin-top"),10),d=parseInt(b.css("margin-bottom"),10);f+=c+d}return f},_stop:function(b){if(b.stop){b.stop()}else{b.animate("stop",true)}}})}(jqxBaseFramework)); (function(a){a.jqx.jqxWidget("jqxTagCloud","",{});a.extend(a.jqx._jqxTagCloud.prototype,{defineInstance:function(){var b={width:null,height:null,source:null,disabled:false,rtl:false,valueMember:"value",displayMember:"label",urlMember:"url",urlBase:"",autoBind:true,takeTopWeightedItems:false,displayLimit:null,minValueToDisplay:0,maxValueToDisplay:0,minFontSize:10,maxFontSize:24,fontSizeUnit:"px",displayValue:false,sortBy:"none",alterTextCase:"none",sortOrder:"ascending",textColor:null,minColor:null,maxColor:null,tagRenderer:null};if(this===a.jqx._jqxTagCloud.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;b.render();b.dataBind(b.source,true)},dataBind:function(b,c){var h=this;h.records=[];var e=b._source?true:false;var i;if(e){i=b;b=b._source}else{b.datafields=[{name:h.displayMember},{name:h.valueMember},{name:h.urlMember}];i=new a.jqx.dataAdapter(b,{autoBind:true})}var j=function(){if(b.type!==undefined){i._options.type=b.type}if(b.formatdata!==undefined){i._options.formatData=b.formatdata}if(b.contenttype!==undefined){i._options.contentType=b.contenttype}if(b.async!==undefined){i._options.async=b.async}};var f=function(k){k._setSourceData(i);k._raiseEvent(1,{records:k.records});k._renderTags()};j(this);switch(b.datatype){case"local":case"array":default:if(b.localdata!=null||a.isArray(b)){i.unbindBindingUpdate(h.element.id);if(h.autoBind||(!h.autoBind&&!c)){i.dataBind()}f(h);i.bindBindingUpdate(h.element.id,function(k){f(h,k)})}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"csv":case"tab":if(b.localdata!=null){i.unbindBindingUpdate(h.element.id);if(h.autoBind||(!h.autoBind&&!c)){i.dataBind()}f(h);i.bindBindingUpdate(h.element.id,function(){f(h)});return}var d={};if(i._options.data){a.extend(i._options.data,d)}else{if(b.data){a.extend(d,b.data)}i._options.data=d}var g=function(){f(h)};i.unbindDownloadComplete(h.element.id);i.bindDownloadComplete(h.element.id,g);if(h.autoBind||(!h.autoBind&&!c)){i.dataBind()}}h._raiseEvent(2,{records:h.records})},destroy:function(){var b=this;b.removeHandler(b._el,"keydown");b.removeHandler(b._el,"click");b.host.empty();b.host.remove()},findTagIndex:function(c){var d=this;for(var b=0;b=b){d.hiddenList[g]++}}d._renderTags()}})}else{d.records.splice(b,0,e);for(var c=b+1;c=b){d.hiddenList[c]++}}d._renderTags()}},updateAt:function(b,d){var c=this;if(d[this.displayMember]===undefined){throw new Error("jqxTagCloud: Update tag requires a valid displayMember field to be supplied in the parameter")}d.index=b;d.uid=c.records[b].uid;if(c.source.updateTag&&typeof(c.source.updateTag)==="function"){c.source.updateTag(b,d,function(e){if(e){a.each(d,function(f,g){c.records[b][f]=g});c._renderTags()}})}else{a.each(d,function(e,f){c.records[b][e]=f});c._renderTags()}},removeAt:function(b){var d=this;if(d.source.deleteTag&&typeof(d.source.deleteTag)==="function"){d.source.deleteTag(b,function(f){if(f){d.records.splice(b,1);for(var e=b;eb){d.hiddenList[e]--}else{if(d.hiddenList[e]===b){d.hiddentList.splice(b,1)}}}}})}else{d.records.splice(b,1);for(var c=b;cb){d.hiddenList[c]--}else{if(d.hiddenList[c]===b){d.hiddentList.splice(b,1)}}}}d._renderTags()},hideItem:function(b){var d=this;if(!(typeof(b)!=="number"||d.hiddenList.indexOf(b)!==-1)){d.hiddenList.push(b);var e=-1;for(var c=0;c");b.host.addClass(b.toThemeProperty("jqx-widget jqx-tag-cloud"));b._setRtl();b.host.append(b._el);b.focusedItem=null;b.minColor=b._parseColor(b.minColor);b.maxColor=b._parseColor(b.maxColor);b.displayLimit=parseInt(b.displayLimit);if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}b.addHandler(b._el,"click",function(d){if(a(document.activeElement).parents("#"+b._el[0].parentElement.id).length){}else{if(b.focusedItem!=null){a(b.focusedItem).focus()}else{a(b._el).find("a")[0].focus();b.focusedItem=document.activeElement}}if(b.disabled){d.preventDefault()}if(d.target.tagName.toLowerCase()==="a"){d.target.focus();b.focusedItem=document.activeElement}if(d.target.tagName.toLowerCase()==="li"){a(d.target).find("a").focus();b.focusedItem=document.activeElement}var c=a(d.target).closest("li").index();if(c!==-1){b._raiseEvent(0,{label:b.renderedData[c][b.displayMember],url:b.renderedData[c][b.urlMember],value:b.renderedData[c][b.valueMember],visibleIndex:c,index:b.renderedData[c].index,target:a(d.target).closest("li")[0],originalEvent:d})}});b._addKeyboardSupport()},resize:function(c,b){var d=this;d.width=c;d.height=b;d._updateSize()},propertyChangedHandler:function(b,c,f,e){var d=this;if(c==="source"){d.dataBind(b.source)}if(c==="displayLimit"){d[c]=parseInt(e)}if(c==="minColor"||c==="maxColor"){d[c]=d._parseColor(e)}if(c==="rtl"){d._setRtl();return}if(c==="width"||c==="height"){d._updateSize();return}if(c==="textColor"){if(!(d.minColor&&d.maxColor)){d._updateColor();return}}d._renderTags()},_alterCase:function(d){var c=this;function e(f){return f.replace(/\w\S*/g,function(g){return g.charAt(0).toUpperCase()+g.substr(1).toLowerCase()})}if(c.alterTextCase!=="none"){switch(c.alterTextCase){case"allLower":for(var b=0;b");var l="";if(null!==m.tagRenderer&&typeof(m.tagRenderer)==="function"){l=m.tagRenderer.apply(m,arguments)}else{l=k[m.displayMember]+(m.displayValue?"("+k[m.valueMember]+")":"")}l=a('
    a";bF=bv.getElementsByTagName("*");bD=bv.getElementsByTagName("a")[0];if(!bF||!bD||!bF.length){return{}}bE=ak.createElement("select");bx=bE.appendChild(ak.createElement("option"));bC=bv.getElementsByTagName("input")[0];bD.style.cssText="top:1px;float:left;opacity:.5";bG={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bD.getAttribute("style")),hrefNormalized:(bD.getAttribute("href")==="/a"),opacity:/^0.5/.test(bD.style.opacity),cssFloat:!!bD.style.cssFloat,checkOn:(bC.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!ak.createElement("form").enctype,html5Clone:ak.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:(ak.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};bC.checked=true;bG.noCloneChecked=bC.cloneNode(true).checked;bE.disabled=true;bG.optDisabled=!bx.disabled;try{delete bv.test}catch(bA){bG.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",bu=function(){bG.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick");bv.detachEvent("onclick",bu)}bC=ak.createElement("input");bC.value="t";bC.setAttribute("type","radio");bG.radioValue=bC.value==="t";bC.setAttribute("checked","checked");bC.setAttribute("name","t");bv.appendChild(bC);bB=ak.createDocumentFragment();bB.appendChild(bv.lastChild);bG.checkClone=bB.cloneNode(true).cloneNode(true).lastChild.checked;bG.appendChecked=bC.checked;bB.removeChild(bC);bB.appendChild(bv);if(bv.attachEvent){for(by in {submit:true,change:true,focusin:true}){bz="on"+by;bw=(bz in bv);if(!bw){bv.setAttribute(bz,"return;");bw=(typeof bv[bz]==="function")}bG[by+"Bubbles"]=bw}}C(function(){var bI,bM,bK,bL,bJ="padding:0;margin:0;border:0;display:block;overflow:hidden;",bH=ak.getElementsByTagName("body")[0];if(!bH){return}bI=ak.createElement("div");bI.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";bH.insertBefore(bI,bH.firstChild);bM=ak.createElement("div");bI.appendChild(bM);bM.innerHTML="
    t
    ";bK=bM.getElementsByTagName("td");bK[0].style.cssText="padding:0;margin:0;border:0;display:none";bw=(bK[0].offsetHeight===0);bK[0].style.display="";bK[1].style.display="none";bG.reliableHiddenOffsets=bw&&(bK[0].offsetHeight===0);bM.innerHTML="";bM.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%;";bG.boxSizing=(bM.offsetWidth===4);bG.doesNotIncludeMarginInBodyOffset=(bH.offsetTop!==1);if(bd.getComputedStyle){bG.pixelPosition=(bd.getComputedStyle(bM,null)||{}).top!=="1%";bG.boxSizingReliable=(bd.getComputedStyle(bM,null)||{width:"4px"}).width==="4px";bL=ak.createElement("div");bL.style.cssText=bM.style.cssText=bJ;bL.style.marginRight=bL.style.width="0";bM.style.width="1px";bM.appendChild(bL);bG.reliableMarginRight=!parseFloat((bd.getComputedStyle(bL,null)||{}).marginRight)}if(typeof bM.style.zoom!=="undefined"){bM.innerHTML="";bM.style.cssText=bJ+"width:1px;padding:1px;display:inline;zoom:1";bG.inlineBlockNeedsLayout=(bM.offsetWidth===3);bM.style.display="block";bM.style.overflow="visible";bM.innerHTML="
    ";bM.firstChild.style.width="5px";bG.shrinkWrapBlocks=(bM.offsetWidth!==3);bI.style.zoom=1}bH.removeChild(bI);bI=bM=bK=bL=null});bB.removeChild(bv);bF=bD=bE=bx=bC=bB=bv=null;return bG})();var aK=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aq=/([A-Z])/g;C.extend({cache:{},deletedIds:[],uuid:0,expando:"JQXLite"+(C.fn.jqx+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(bu){bu=bu.nodeType?C.cache[bu[C.expando]]:bu[C.expando];return !!bu&&!M(bu)},data:function(bx,bv,bz,by){if(!C.acceptData(bx)){return}var bA,bC,bD=C.expando,bB=typeof bv==="string",bE=bx.nodeType,bu=bE?C.cache:bx,bw=bE?bx[bD]:bx[bD]&&bD;if((!bw||!bu[bw]||(!by&&!bu[bw].data))&&bB&&bz===G){return}if(!bw){if(bE){bx[bD]=bw=C.deletedIds.pop()||C.guid++}else{bw=bD}}if(!bu[bw]){bu[bw]={};if(!bE){bu[bw].toJSON=C.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){bu[bw]=C.extend(bu[bw],bv)}else{bu[bw].data=C.extend(bu[bw].data,bv)}}bA=bu[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==G){bA[C.camelCase(bv)]=bz}if(bB){bC=bA[bv];if(bC==null){bC=bA[C.camelCase(bv)]}}else{bC=bA}return bC},removeData:function(bx,bv,by){if(!C.acceptData(bx)){return}var bB,bA,bz,bC=bx.nodeType,bu=bC?C.cache:bx,bw=bC?bx[C.expando]:C.expando;if(!bu[bw]){return}if(bv){bB=by?bu[bw]:bu[bw].data;if(bB){if(!C.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=C.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA1,null,false)},removeData:function(bu){return this.each(function(){C.removeData(this,bu)})}});function a9(bw,bv,bx){if(bx===G&&bw.nodeType===1){var bu="data-"+bv.replace(aq,"-$1").toLowerCase();bx=bw.getAttribute(bu);if(typeof bx==="string"){try{bx=bx==="true"?true:bx==="false"?false:bx==="null"?null:+bx+""===bx?+bx:aK.test(bx)?C.parseJSON(bx):bx}catch(by){}C.data(bw,bv,bx)}else{bx=G}}return bx}function M(bv){var bu;for(bu in bv){if(bu==="data"&&C.isEmptyObject(bv[bu])){continue}if(bu!=="toJSON"){return false}}return true}C.extend({queue:function(bw,bv,bx){var bu;if(bw){bv=(bv||"fx")+"queue";bu=C._data(bw,bv);if(bx){if(!bu||C.isArray(bx)){bu=C._data(bw,bv,C.makeArray(bx))}else{bu.push(bx)}}return bu||[]}},dequeue:function(bz,by){by=by||"fx";var bv=C.queue(bz,by),bA=bv.length,bx=bv.shift(),bu=C._queueHooks(bz,by),bw=function(){C.dequeue(bz,by)};if(bx==="inprogress"){bx=bv.shift();bA--}if(bx){if(by==="fx"){bv.unshift("inprogress")}delete bu.stop;bx.call(bz,bw,bu)}if(!bA&&bu){bu.empty.fire()}},_queueHooks:function(bw,bv){var bu=bv+"queueHooks";return C._data(bw,bu)||C._data(bw,bu,{empty:C.Callbacks("once memory").add(function(){C.removeData(bw,bv+"queue",true);C.removeData(bw,bu,true)})})}});C.fn.extend({queue:function(bu,bv){var bw=2;if(typeof bu!=="string"){bv=bu;bu="fx";bw--}if(arguments.length1)},removeAttr:function(bu){return this.each(function(){C.removeAttr(this,bu)})},prop:function(bu,bv){return C.access(this,C.prop,bu,bv,arguments.length>1)},removeProp:function(bu){bu=C.propFix[bu]||bu;return this.each(function(){try{this[bu]=G;delete this[bu]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,bu;if(C.isFunction(by)){return this.each(function(bC){C(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(a8);for(bw=0,bv=this.length;bw=0){by=by.replace(" "+bx[bB]+" "," ")}}bz.className=bA?C.trim(by):""}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,bu=typeof bv==="boolean";if(C.isFunction(bx)){return this.each(function(by){C(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=C(this),bB=bv,bC=bx.split(a8);while((bA=bC[bz++])){bB=bu?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){C._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":C._data(this,"__className__")||""}}})},hasClass:function(bu){var bx=" "+bu+" ",bw=0,bv=this.length;for(;bw=0){return true}}return false},val:function(bx){var bu,bv,by,bw=this[0];if(!arguments.length){if(bw){bu=C.valHooks[bw.type]||C.valHooks[bw.nodeName.toLowerCase()];if(bu&&"get" in bu&&(bv=bu.get(bw,"value"))!==G){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aP,""):bv==null?"":bv}return}by=C.isFunction(bx);return this.each(function(bA){var bB,bz=C(this);if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(C.isArray(bB)){bB=C.map(bB,function(bC){return bC==null?"":bC+""})}}}bu=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()];if(!bu||!("set" in bu)||bu.set(this,bB,"value")===G){this.value=bB}})}});C.extend({valHooks:{option:{get:function(bu){var bv=bu.attributes.value;return !bv||bv.specified?bu.value:bu.text}},select:{get:function(bu){var bA,bw,bC=bu.options,by=bu.selectedIndex,bx=bu.type==="select-one"||by<0,bB=bx?null:[],bz=bx?by+1:bC.length,bv=by<0?bz:bx?by:0;for(;bv=0});if(!bu.length){bv.selectedIndex=-1}return bu}}},attrFn:{},attr:function(bA,bx,bB,bz){var bw,bu,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&C.isFunction(C.fn[bx])){return C(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return C.prop(bA,bx,bB)}by=bv!==1||!C.isXMLDoc(bA);if(by){bx=bx.toLowerCase();bu=C.attrHooks[bx]||(ae.test(bx)?aT:bh)}if(bB!==G){if(bB===null){C.removeAttr(bA,bx);return}else{if(bu&&"set" in bu&&by&&(bw=bu.set(bA,bB,bx))!==G){return bw}else{bA.setAttribute(bx,bB+"");return bB}}}else{if(bu&&"get" in bu&&by&&(bw=bu.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?G:bw}}},removeAttr:function(bx,bz){var by,bA,bv,bu,bw=0;if(bz&&bx.nodeType===1){bA=bz.split(a8);for(;bw=0){bG=bG.slice(0,-1);bx=true}if(bG.indexOf(".")>=0){bw=bG.split(".");bG=bw.shift();bw.sort()}if((!bA||C.event.customEvent[bG])&&!C.event.global[bG]){return}bv=typeof bv==="object"?bv[C.expando]?bv:new C.Event(bG,bv):new C.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bx;bv.namespace=bw.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bw.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){bu=C.cache;for(bD in bu){if(bu[bD].events&&bu[bD].events[bG]){C.event.trigger(bv,bC,bu[bD].handle.elem,true)}}return}bv.result=G;if(!bv.target){bv.target=bA}bC=bC!=null?C.makeArray(bC):[];bC.unshift(bv);bF=C.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bC)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!C.isWindow(bA)){bI=bF.delegateType||bG;bH=N.test(bI+bG)?bA:bA.parentNode;for(bz=bA;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz===(bA.ownerDocument||ak)){bB.push([bz.defaultView||bz.parentWindow||bd,bI])}}for(bD=0;bD=0:C.find(bx,this,null,[bK]).length}if(bD[bx]){bC.push(bI)}}if(bC.length){bH.push({elem:bK,matches:bC})}}}}if(by.length>bz){bH.push({elem:this,matches:by.slice(bz)})}for(bB=0;bB0?this.on(bu,null,bx,bw):this.trigger(bu)};if(aH.test(bu)){C.event.fixHooks[bu]=C.event.keyHooks}if(bi.test(bu)){C.event.fixHooks[bu]=C.event.mouseHooks}}); +var oldBrowser=document.all&&!document.addEventListener;if(!oldBrowser){(function(bd,G){var q,an,ak=bd.document,bo=bd.location,bt=bd.navigator,ax=bd.JQXLite,X=bd.$,aR=Array.prototype.push,aD=Array.prototype.slice,aA=Array.prototype.indexOf,y=Object.prototype.toString,b=Object.prototype.hasOwnProperty,aw=String.prototype.trim,C=function(bu,bv){return new C.fn.init(bu,bv,q)},aE=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,at=/\S/,a8=/\s+/,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,aF=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,e=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,j=/^[\],:{}\s]*$/,t=/(?:^|:|,)(?:\s*\[)+/g,a5=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,K=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,au=/^-ms-/,aS=/-([\da-z])/gi,m=function(bu,bv){return(bv+"").toUpperCase()},a4=function(){if(ak.addEventListener){ak.removeEventListener("DOMContentLoaded",a4,false);C.ready()}else{if(ak.readyState==="complete"){ak.detachEvent("onreadystatechange",a4);C.ready()}}},a0={};C.fn=C.prototype={constructor:C,init:function(bu,bx,by){var bw,bz,bv,bA;if(!bu){return this}if(bu.nodeType){this.context=this[0]=bu;this.length=1;return this}if(typeof bu==="string"){if(bu.charAt(0)==="<"&&bu.charAt(bu.length-1)===">"&&bu.length>=3){bw=[null,bu,null]}else{bw=aF.exec(bu)}if(bw&&(bw[1]||!bx)){if(bw[1]){bx=bx instanceof C?bx[0]:bx;bA=(bx&&bx.nodeType?bx.ownerDocument||bx:ak);bu=C.parseHTML(bw[1],bA,true);if(e.test(bw[1])&&C.isPlainObject(bx)){this.attr.call(bu,bx,true)}return C.merge(this,bu)}else{bz=ak.getElementById(bw[2]);if(bz&&bz.parentNode){if(bz.id!==bw[2]){return by.find(bu)}this.length=1;this[0]=bz}this.context=ak;this.selector=bu;return this}}else{if(!bx||bx.jqx){return(bx||by).find(bu)}else{return this.constructor(bx).find(bu)}}}else{if(C.isFunction(bu)){return by.ready(bu)}}if(bu.selector!==G){this.selector=bu.selector;this.context=bu.context}return C.makeArray(bu,this)},selector:"",jqx:"4.5.0",length:0,size:function(){return this.length},toArray:function(){return aD.call(this)},get:function(bu){return bu==null?this.toArray():(bu<0?this[this.length+bu]:this[bu])},pushStack:function(bv,bx,bu){var bw=C.merge(this.constructor(),bv);bw.prevObject=this;bw.context=this.context;if(bx==="find"){bw.selector=this.selector+(this.selector?" ":"")+bu}else{if(bx){bw.selector=this.selector+"."+bx+"("+bu+")"}}return bw},each:function(bv,bu){return C.each(this,bv,bu)},ready:function(bu){C.ready.promise().done(bu);return this},eq:function(bu){bu=+bu;return bu===-1?this.slice(bu):this.slice(bu,bu+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(aD.apply(this,arguments),"slice",aD.call(arguments).join(","))},map:function(bu){return this.pushStack(C.map(this,function(bw,bv){return bu.call(bw,bv,bw)}))},end:function(){return this.prevObject||this.constructor(null)},push:aR,sort:[].sort,splice:[].splice};C.fn.init.prototype=C.fn;C.extend=C.fn.extend=function(){var bD,bw,bu,bv,bA,bB,bz=arguments[0]||{},by=1,bx=arguments.length,bC=false;if(typeof bz==="boolean"){bC=bz;bz=arguments[1]||{};by=2}if(typeof bz!=="object"&&!C.isFunction(bz)){bz={}}if(bx===by){bz=this;--by}for(;by0){return}an.resolveWith(ak,[C]);if(C.fn.trigger){C(ak).trigger("ready").off("ready")}},isFunction:function(bu){return C.type(bu)==="function"},isArray:Array.isArray||function(bu){return C.type(bu)==="array"},isWindow:function(bu){return bu!=null&&bu==bu.window},isNumeric:function(bu){return !isNaN(parseFloat(bu))&&isFinite(bu)},type:function(bu){return bu==null?String(bu):a0[y.call(bu)]||"object"},isPlainObject:function(bw){if(!bw||C.type(bw)!=="object"||bw.nodeType||C.isWindow(bw)){return false}try{if(bw.constructor&&!b.call(bw,"constructor")&&!b.call(bw.constructor.prototype,"isPrototypeOf")){return false}}catch(bv){return false}var bu;for(bu in bw){}return bu===G||b.call(bw,bu)},isEmptyObject:function(bv){var bu;for(bu in bv){return false}return true},error:function(bu){throw new Error(bu)},parseHTML:function(bx,bw,bu){var bv;if(!bx||typeof bx!=="string"){return null}if(typeof bw==="boolean"){bu=bw;bw=0}bw=bw||ak;if((bv=e.exec(bx))){return[bw.createElement(bv[1])]}bv=C.buildFragment([bx],bw,bu?null:[]);return C.merge([],(bv.cacheable?C.clone(bv.fragment):bv.fragment).childNodes)},parseJSON:function(bu){if(!bu||typeof bu!=="string"){return null}bu=C.trim(bu);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(bu)}if(j.test(bu.replace(a5,"@").replace(K,"]").replace(t,""))){return(new Function("return "+bu))()}C.error("Invalid JSON: "+bu)},parseXML:function(bw){var bu,bv;if(!bw||typeof bw!=="string"){return null}try{if(bd.DOMParser){bv=new DOMParser();bu=bv.parseFromString(bw,"text/xml")}else{bu=new ActiveXObject("Microsoft.XMLDOM");bu.async="false";bu.loadXML(bw)}}catch(bx){bu=G}if(!bu||!bu.documentElement||bu.getElementsByTagName("parsererror").length){C.error("Invalid XML: "+bw)}return bu},noop:function(){},globalEval:function(bu){if(bu&&at.test(bu)){(bd.execScript||function(bv){bd["eval"].call(bd,bv)})(bu)}},camelCase:function(bu){return bu.replace(au,"ms-").replace(aS,m)},nodeName:function(bv,bu){return bv.nodeName&&bv.nodeName.toLowerCase()===bu.toLowerCase()},each:function(bz,bA,bw){var bv,bx=0,by=bz.length,bu=by===G||C.isFunction(bz);if(bw){if(bu){for(bv in bz){if(bA.apply(bz[bv],bw)===false){break}}}else{for(;bx0&&bu[0]&&bu[bv-1])||bv===0||C.isArray(bu));if(bx){for(;bw-1){bB.splice(bG,1);if(by){if(bG<=bz){bz--}if(bG<=bA){bA--}}}})}return this},has:function(bF){return C.inArray(bF,bB)>-1},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=G;return this},disabled:function(){return !bB},lock:function(){bC=G;if(!bx){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){bF=bF||[];bF=[bG,bF.slice?bF.slice():bF];if(bB&&(!bu||bC)){if(by){bC.push(bF)}else{bv(bF)}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bu}};return bD};C.extend({Deferred:function(bw){var bv=[["resolve","done",C.Callbacks("once memory"),"resolved"],["reject","fail",C.Callbacks("once memory"),"rejected"],["notify","progress",C.Callbacks("memory")]],bx="pending",by={state:function(){return bx},always:function(){bu.done(arguments).fail(arguments);return this},then:function(){var bz=arguments;return C.Deferred(function(bA){C.each(bv,function(bC,bB){var bE=bB[0],bD=bz[bC];bu[bB[1]](C.isFunction(bD)?function(){var bF=bD.apply(this,arguments);if(bF&&C.isFunction(bF.promise)){bF.promise().done(bA.resolve).fail(bA.reject).progress(bA.notify)}else{bA[bE+"With"](this===bu?bA:this,[bF])}}:bA[bE])});bz=null}).promise()},promise:function(bz){return bz!=null?C.extend(bz,by):by}},bu={};by.pipe=by.then;C.each(bv,function(bA,bz){var bC=bz[2],bB=bz[3];by[bz[1]]=bC.add;if(bB){bC.add(function(){bx=bB},bv[bA^1][2].disable,bv[2][2].lock)}bu[bz[0]]=bC.fire;bu[bz[0]+"With"]=bC.fireWith});by.promise(bu);if(bw){bw.call(bu,bu)}return bu},when:function(by){var bw=0,bA=aD.call(arguments),bu=bA.length,bv=bu!==1||(by&&C.isFunction(by.promise))?bu:0,bD=bv===1?by:C.Deferred(),bx=function(bF,bG,bE){return function(bH){bG[bF]=this;bE[bF]=arguments.length>1?aD.call(arguments):bH;if(bE===bC){bD.notifyWith(bG,bE)}else{if(!(--bv)){bD.resolveWith(bG,bE)}}}},bC,bz,bB;if(bu>1){bC=new Array(bu);bz=new Array(bu);bB=new Array(bu);for(;bw
    a";bF=bv.getElementsByTagName("*");bD=bv.getElementsByTagName("a")[0];if(!bF||!bD||!bF.length){return{}}bE=ak.createElement("select");bx=bE.appendChild(ak.createElement("option"));bC=bv.getElementsByTagName("input")[0];bD.style.cssText="top:1px;float:left;opacity:.5";bG={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bD.getAttribute("style")),hrefNormalized:(bD.getAttribute("href")==="/a"),opacity:/^0.5/.test(bD.style.opacity),cssFloat:!!bD.style.cssFloat,checkOn:(bC.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!ak.createElement("form").enctype,html5Clone:ak.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:(ak.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};bC.checked=true;bG.noCloneChecked=bC.cloneNode(true).checked;bE.disabled=true;bG.optDisabled=!bx.disabled;try{delete bv.test}catch(bA){bG.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",bu=function(){bG.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick");bv.detachEvent("onclick",bu)}bC=ak.createElement("input");bC.value="t";bC.setAttribute("type","radio");bG.radioValue=bC.value==="t";bC.setAttribute("checked","checked");bC.setAttribute("name","t");bv.appendChild(bC);bB=ak.createDocumentFragment();bB.appendChild(bv.lastChild);bG.checkClone=bB.cloneNode(true).cloneNode(true).lastChild.checked;bG.appendChecked=bC.checked;bB.removeChild(bC);bB.appendChild(bv);if(bv.attachEvent){for(by in {submit:true,change:true,focusin:true}){bz="on"+by;bw=(bz in bv);if(!bw){bv.setAttribute(bz,"return;");bw=(typeof bv[bz]==="function")}bG[by+"Bubbles"]=bw}}C(function(){var bI,bM,bK,bL,bJ="padding:0;margin:0;border:0;display:block;overflow:hidden;",bH=ak.getElementsByTagName("body")[0];if(!bH){return}bI=ak.createElement("div");bI.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";bH.insertBefore(bI,bH.firstChild);bM=ak.createElement("div");bI.appendChild(bM);bM.innerHTML="
    t
    ";bK=bM.getElementsByTagName("td");bK[0].style.cssText="padding:0;margin:0;border:0;display:none";bw=(bK[0].offsetHeight===0);bK[0].style.display="";bK[1].style.display="none";bG.reliableHiddenOffsets=bw&&(bK[0].offsetHeight===0);bM.innerHTML="";bM.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%;";bG.boxSizing=(bM.offsetWidth===4);bG.doesNotIncludeMarginInBodyOffset=(bH.offsetTop!==1);if(bd.getComputedStyle){bG.pixelPosition=(bd.getComputedStyle(bM,null)||{}).top!=="1%";bG.boxSizingReliable=(bd.getComputedStyle(bM,null)||{width:"4px"}).width==="4px";bL=ak.createElement("div");bL.style.cssText=bM.style.cssText=bJ;bL.style.marginRight=bL.style.width="0";bM.style.width="1px";bM.appendChild(bL);bG.reliableMarginRight=!parseFloat((bd.getComputedStyle(bL,null)||{}).marginRight)}if(typeof bM.style.zoom!=="undefined"){bM.innerHTML="";bM.style.cssText=bJ+"width:1px;padding:1px;display:inline;zoom:1";bG.inlineBlockNeedsLayout=(bM.offsetWidth===3);bM.style.display="block";bM.style.overflow="visible";bM.innerHTML="
    ";bM.firstChild.style.width="5px";bG.shrinkWrapBlocks=(bM.offsetWidth!==3);bI.style.zoom=1}bH.removeChild(bI);bI=bM=bK=bL=null});bB.removeChild(bv);bF=bD=bE=bx=bC=bB=bv=null;return bG})();var aK=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aq=/([A-Z])/g;C.extend({cache:{},deletedIds:[],uuid:0,expando:"JQXLite"+(C.fn.jqx+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(bu){bu=bu.nodeType?C.cache[bu[C.expando]]:bu[C.expando];return !!bu&&!M(bu)},data:function(bx,bv,bz,by){if(!C.acceptData(bx)){return}var bA,bC,bD=C.expando,bB=typeof bv==="string",bE=bx.nodeType,bu=bE?C.cache:bx,bw=bE?bx[bD]:bx[bD]&&bD;if((!bw||!bu[bw]||(!by&&!bu[bw].data))&&bB&&bz===G){return}if(!bw){if(bE){bx[bD]=bw=C.deletedIds.pop()||C.guid++}else{bw=bD}}if(!bu[bw]){bu[bw]={};if(!bE){bu[bw].toJSON=C.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){bu[bw]=C.extend(bu[bw],bv)}else{bu[bw].data=C.extend(bu[bw].data,bv)}}bA=bu[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==G){bA[C.camelCase(bv)]=bz}if(bB){bC=bA[bv];if(bC==null){bC=bA[C.camelCase(bv)]}}else{bC=bA}return bC},removeData:function(bx,bv,by){if(!C.acceptData(bx)){return}var bB,bA,bz,bC=bx.nodeType,bu=bC?C.cache:bx,bw=bC?bx[C.expando]:C.expando;if(!bu[bw]){return}if(bv){bB=by?bu[bw]:bu[bw].data;if(bB){if(!C.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=C.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA1,null,false)},removeData:function(bu){return this.each(function(){C.removeData(this,bu)})}});function a9(bw,bv,bx){if(bx===G&&bw.nodeType===1){var bu="data-"+bv.replace(aq,"-$1").toLowerCase();bx=bw.getAttribute(bu);if(typeof bx==="string"){try{bx=bx==="true"?true:bx==="false"?false:bx==="null"?null:+bx+""===bx?+bx:aK.test(bx)?C.parseJSON(bx):bx}catch(by){}C.data(bw,bv,bx)}else{bx=G}}return bx}function M(bv){var bu;for(bu in bv){if(bu==="data"&&C.isEmptyObject(bv[bu])){continue}if(bu!=="toJSON"){return false}}return true}C.extend({queue:function(bw,bv,bx){var bu;if(bw){bv=(bv||"fx")+"queue";bu=C._data(bw,bv);if(bx){if(!bu||C.isArray(bx)){bu=C._data(bw,bv,C.makeArray(bx))}else{bu.push(bx)}}return bu||[]}},dequeue:function(bz,by){by=by||"fx";var bv=C.queue(bz,by),bA=bv.length,bx=bv.shift(),bu=C._queueHooks(bz,by),bw=function(){C.dequeue(bz,by)};if(bx==="inprogress"){bx=bv.shift();bA--}if(bx){if(by==="fx"){bv.unshift("inprogress")}delete bu.stop;bx.call(bz,bw,bu)}if(!bA&&bu){bu.empty.fire()}},_queueHooks:function(bw,bv){var bu=bv+"queueHooks";return C._data(bw,bu)||C._data(bw,bu,{empty:C.Callbacks("once memory").add(function(){C.removeData(bw,bv+"queue",true);C.removeData(bw,bu,true)})})}});C.fn.extend({queue:function(bu,bv){var bw=2;if(typeof bu!=="string"){bv=bu;bu="fx";bw--}if(arguments.length1)},removeAttr:function(bu){return this.each(function(){C.removeAttr(this,bu)})},prop:function(bu,bv){return C.access(this,C.prop,bu,bv,arguments.length>1)},removeProp:function(bu){bu=C.propFix[bu]||bu;return this.each(function(){try{this[bu]=G;delete this[bu]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,bu;if(C.isFunction(by)){return this.each(function(bC){C(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(a8);for(bw=0,bv=this.length;bw=0){by=by.replace(" "+bx[bB]+" "," ")}}bz.className=bA?C.trim(by):""}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,bu=typeof bv==="boolean";if(C.isFunction(bx)){return this.each(function(by){C(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=C(this),bB=bv,bC=bx.split(a8);while((bA=bC[bz++])){bB=bu?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){C._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":C._data(this,"__className__")||""}}})},hasClass:function(bu){var bx=" "+bu+" ",bw=0,bv=this.length;for(;bw=0){return true}}return false},val:function(bx){var bu,bv,by,bw=this[0];if(!arguments.length){if(bw){bu=C.valHooks[bw.type]||C.valHooks[bw.nodeName.toLowerCase()];if(bu&&"get" in bu&&(bv=bu.get(bw,"value"))!==G){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aP,""):bv==null?"":bv}return}by=C.isFunction(bx);return this.each(function(bA){var bB,bz=C(this);if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(C.isArray(bB)){bB=C.map(bB,function(bC){return bC==null?"":bC+""})}}}bu=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()];if(!bu||!("set" in bu)||bu.set(this,bB,"value")===G){this.value=bB}})}});C.extend({valHooks:{option:{get:function(bu){var bv=bu.attributes.value;return !bv||bv.specified?bu.value:bu.text}},select:{get:function(bu){var bA,bw,bC=bu.options,by=bu.selectedIndex,bx=bu.type==="select-one"||by<0,bB=bx?null:[],bz=bx?by+1:bC.length,bv=by<0?bz:bx?by:0;for(;bv=0});if(!bu.length){bv.selectedIndex=-1}return bu}}},attrFn:{},attr:function(bA,bx,bB,bz){var bw,bu,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&C.isFunction(C.fn[bx])){return C(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return C.prop(bA,bx,bB)}by=bv!==1||!C.isXMLDoc(bA);if(by){bx=bx.toLowerCase();bu=C.attrHooks[bx]||(ae.test(bx)?aT:bh)}if(bB!==G){if(bB===null){C.removeAttr(bA,bx);return}else{if(bu&&"set" in bu&&by&&(bw=bu.set(bA,bB,bx))!==G){return bw}else{bA.setAttribute(bx,bB+"");return bB}}}else{if(bu&&"get" in bu&&by&&(bw=bu.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?G:bw}}},removeAttr:function(bx,bz){var by,bA,bv,bu,bw=0;if(bz&&bx.nodeType===1){bA=bz.split(a8);for(;bw=0){bG=bG.slice(0,-1);bx=true}if(bG.indexOf(".")>=0){bw=bG.split(".");bG=bw.shift();bw.sort()}if((!bA||C.event.customEvent[bG])&&!C.event.global[bG]){return}bv=typeof bv==="object"?bv[C.expando]?bv:new C.Event(bG,bv):new C.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bx;bv.namespace=bw.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bw.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){bu=C.cache;for(bD in bu){if(bu[bD].events&&bu[bD].events[bG]){C.event.trigger(bv,bC,bu[bD].handle.elem,true)}}return}bv.result=G;if(!bv.target){bv.target=bA}bC=bC!=null?C.makeArray(bC):[];bC.unshift(bv);bF=C.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bC)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!C.isWindow(bA)){bI=bF.delegateType||bG;bH=N.test(bI+bG)?bA:bA.parentNode;for(bz=bA;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz===(bA.ownerDocument||ak)){bB.push([bz.defaultView||bz.parentWindow||bd,bI])}}for(bD=0;bD=0:C.find(bx,this,null,[bK]).length}if(bD[bx]){bC.push(bI)}}if(bC.length){bH.push({elem:bK,matches:bC})}}}}if(by.length>bz){bH.push({elem:this,matches:by.slice(bz)})}for(bB=0;bB0?this.on(bu,null,bx,bw):this.trigger(bu)};if(aH.test(bu)){C.event.fixHooks[bu]=C.event.keyHooks}if(bi.test(bu)){C.event.fixHooks[bu]=C.event.mouseHooks}}); /*! * Sizzle CSS Selector Engine * Copyright 2012 JQXLite Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ -(function(cn,bM){var cs,bF,cg,bv,bR,b5,bI,bL,bH,ce,bE=true,bZ="undefined",cu=("sizcache"+Math.random()).replace(".",""),bz=String,bD=cn.document,bG=bD.documentElement,bW=0,bK=0,b9=[].pop,cr=[].push,bQ=[].slice,bT=[].indexOf||function(cE){var cD=0,cC=this.length;for(;cDcg.cacheLength){delete cC[cD.shift()]}return(cC[cE+" "]=cF)},cC)},cp=cA(),cq=cA(),bS=cA(),b3="[\\x20\\t\\r\\n\\f]",bP="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",bN=bP.replace("w","w#"),cz="([*^$|!~]?=)",ck="\\["+b3+"*("+bP+")"+b3+"*(?:"+cz+b3+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+bN+")|)|)"+b3+"*\\]",cB=":("+bP+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+ck+")|[^:]|\\\\.)*|.*))\\)|)",b4=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+b3+"*((?:-\\d)?\\d*)"+b3+"*\\)|)(?=[^-]|$)",co=new RegExp("^"+b3+"+|((?:^|[^\\\\])(?:\\\\.)*)"+b3+"+$","g"),bA=new RegExp("^"+b3+"*,"+b3+"*"),cc=new RegExp("^"+b3+"*([\\x20\\t\\r\\n\\f>+~])"+b3+"*"),ch=new RegExp(cB),cj=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,b8=/^:not/,cm=/[\x20\t\r\n\f]*[+~]/,cv=/:not\($/,bX=/h\d/i,ci=/input|select|textarea|button/i,bY=/\\(?!\\)/g,cb={ID:new RegExp("^#("+bP+")"),CLASS:new RegExp("^\\.("+bP+")"),NAME:new RegExp("^\\[name=['\"]?("+bP+")['\"]?\\]"),TAG:new RegExp("^("+bP.replace("w","w*")+")"),ATTR:new RegExp("^"+ck),PSEUDO:new RegExp("^"+cB),POS:new RegExp(b4,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+b3+"*(even|odd|(([+-]|)(\\d*)n|)"+b3+"*(?:([+-]|)"+b3+"*(\\d+)|))"+b3+"*\\)|)","i"),needsContext:new RegExp("^"+b3+"*[>+~]|"+b4,"i")},cf=function(cC){var cE=bD.createElement("div");try{return cC(cE)}catch(cD){return false}finally{cE=null}},bC=cf(function(cC){cC.appendChild(bD.createComment(""));return !cC.getElementsByTagName("*").length}),b7=cf(function(cC){cC.innerHTML="";return cC.firstChild&&typeof cC.firstChild.getAttribute!==bZ&&cC.firstChild.getAttribute("href")==="#"}),bV=cf(function(cD){cD.innerHTML="";var cC=typeof cD.lastChild.getAttribute("multiple");return cC!=="boolean"&&cC!=="string"}),b6=cf(function(cC){cC.innerHTML="";if(!cC.getElementsByClassName||!cC.getElementsByClassName("e").length){return false}cC.lastChild.className="e";return cC.getElementsByClassName("e").length===2}),bu=cf(function(cD){cD.id=cu+0;cD.innerHTML="
    ";bG.insertBefore(cD,bG.firstChild);var cC=bD.getElementsByName&&bD.getElementsByName(cu).length===2+bD.getElementsByName(cu+0).length;bF=!bD.getElementById(cu);bG.removeChild(cD);return cC});try{bQ.call(bG.childNodes,0)[0].nodeType}catch(cy){bQ=function(cD){var cE,cC=[];for(;(cE=this[cD]);cD++){cC.push(cE)}return cC}}function cl(cF,cC,cH,cK){cH=cH||[];cC=cC||bD;var cI,cD,cJ,cE,cG=cC.nodeType;if(!cF||typeof cF!=="string"){return cH}if(cG!==1&&cG!==9){return[]}cJ=bR(cC);if(!cJ&&!cK){if((cI=cj.exec(cF))){if((cE=cI[1])){if(cG===9){cD=cC.getElementById(cE);if(cD&&cD.parentNode){if(cD.id===cE){cH.push(cD);return cH}}else{return cH}}else{if(cC.ownerDocument&&(cD=cC.ownerDocument.getElementById(cE))&&b5(cC,cD)&&cD.id===cE){cH.push(cD);return cH}}}else{if(cI[2]){cr.apply(cH,bQ.call(cC.getElementsByTagName(cF),0));return cH}else{if((cE=cI[3])&&b6&&cC.getElementsByClassName){cr.apply(cH,bQ.call(cC.getElementsByClassName(cE),0));return cH}}}}}return ct(cF.replace(co,"$1"),cC,cH,cK,cJ)}cl.matches=function(cD,cC){return cl(cD,null,null,cC)};cl.matchesSelector=function(cC,cD){return cl(cD,null,null,[cC]).length>0};function cd(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return cD==="input"&&cE.type===cC}}function by(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return(cD==="input"||cD==="button")&&cE.type===cC}}function ca(cC){return cw(function(cD){cD=+cD;return cw(function(cE,cI){var cG,cF=cC([],cE.length,cD),cH=cF.length;while(cH--){if(cE[(cG=cF[cH])]){cE[cG]=!(cI[cG]=cE[cG])}}})})}bv=cl.getText=function(cG){var cF,cD="",cE=0,cC=cG.nodeType;if(cC){if(cC===1||cC===9||cC===11){if(typeof cG.textContent==="string"){return cG.textContent}else{for(cG=cG.firstChild;cG;cG=cG.nextSibling){cD+=bv(cG)}}}else{if(cC===3||cC===4){return cG.nodeValue}}}else{for(;(cF=cG[cE]);cE++){cD+=bv(cF)}}return cD};bR=cl.isXML=function(cC){var cD=cC&&(cC.ownerDocument||cC).documentElement;return cD?cD.nodeName!=="HTML":false};b5=cl.contains=bG.contains?function(cD,cC){var cF=cD.nodeType===9?cD.documentElement:cD,cE=cC&&cC.parentNode;return cD===cE||!!(cE&&cE.nodeType===1&&cF.contains&&cF.contains(cE))}:bG.compareDocumentPosition?function(cD,cC){return cC&&!!(cD.compareDocumentPosition(cC)&16)}:function(cD,cC){while((cC=cC.parentNode)){if(cC===cD){return true}}return false};cl.attr=function(cE,cD){var cF,cC=bR(cE);if(!cC){cD=cD.toLowerCase()}if((cF=cg.attrHandle[cD])){return cF(cE)}if(cC||bV){return cE.getAttribute(cD)}cF=cE.getAttributeNode(cD);return cF?typeof cE[cD]==="boolean"?cE[cD]?cD:null:cF.specified?cF.value:null:null};cg=cl.selectors={cacheLength:50,createPseudo:cw,match:cb,attrHandle:b7?{}:{href:function(cC){return cC.getAttribute("href",2)},type:function(cC){return cC.getAttribute("type")}},find:{ID:bF?function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC&&cC.parentNode?[cC]:[]}}:function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC?cC.id===cF||typeof cC.getAttributeNode!==bZ&&cC.getAttributeNode("id").value===cF?[cC]:bM:[]}},TAG:bC?function(cC,cD){if(typeof cD.getElementsByTagName!==bZ){return cD.getElementsByTagName(cC)}}:function(cC,cG){var cF=cG.getElementsByTagName(cC);if(cC==="*"){var cH,cE=[],cD=0;for(;(cH=cF[cD]);cD++){if(cH.nodeType===1){cE.push(cH)}}return cE}return cF},NAME:bu&&function(cC,cD){if(typeof cD.getElementsByName!==bZ){return cD.getElementsByName(name)}},CLASS:b6&&function(cE,cD,cC){if(typeof cD.getElementsByClassName!==bZ&&!cC){return cD.getElementsByClassName(cE)}}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(cC){cC[1]=cC[1].replace(bY,"");cC[3]=(cC[4]||cC[5]||"").replace(bY,"");if(cC[2]==="~="){cC[3]=" "+cC[3]+" "}return cC.slice(0,4)},CHILD:function(cC){cC[1]=cC[1].toLowerCase();if(cC[1]==="nth"){if(!cC[2]){cl.error(cC[0])}cC[3]=+(cC[3]?cC[4]+(cC[5]||1):2*(cC[2]==="even"||cC[2]==="odd"));cC[4]=+((cC[6]+cC[7])||cC[2]==="odd")}else{if(cC[2]){cl.error(cC[0])}}return cC},PSEUDO:function(cD){var cE,cC;if(cb.CHILD.test(cD[0])){return null}if(cD[3]){cD[2]=cD[3]}else{if((cE=cD[4])){if(ch.test(cE)&&(cC=bw(cE,true))&&(cC=cE.indexOf(")",cE.length-cC)-cE.length)){cE=cE.slice(0,cC);cD[0]=cD[0].slice(0,cC)}cD[2]=cE}}return cD.slice(0,3)}},filter:{ID:bF?function(cC){cC=cC.replace(bY,"");return function(cD){return cD.getAttribute("id")===cC}}:function(cC){cC=cC.replace(bY,"");return function(cE){var cD=typeof cE.getAttributeNode!==bZ&&cE.getAttributeNode("id");return cD&&cD.value===cC}},TAG:function(cC){if(cC==="*"){return function(){return true}}cC=cC.replace(bY,"").toLowerCase();return function(cD){return cD.nodeName&&cD.nodeName.toLowerCase()===cC}},CLASS:function(cC){var cD=cp[cu][cC+" "];return cD||(cD=new RegExp("(^|"+b3+")"+cC+"("+b3+"|$)"))&&cp(cC,function(cE){return cD.test(cE.className||(typeof cE.getAttribute!==bZ&&cE.getAttribute("class"))||"")})},ATTR:function(cE,cD,cC){return function(cH,cG){var cF=cl.attr(cH,cE);if(cF==null){return cD==="!="}if(!cD){return true}cF+="";return cD==="="?cF===cC:cD==="!="?cF!==cC:cD==="^="?cC&&cF.indexOf(cC)===0:cD==="*="?cC&&cF.indexOf(cC)>-1:cD==="$="?cC&&cF.substr(cF.length-cC.length)===cC:cD==="~="?(" "+cF+" ").indexOf(cC)>-1:cD==="|="?cF===cC||cF.substr(0,cC.length+1)===cC+"-":false}},CHILD:function(cC,cE,cF,cD){if(cC==="nth"){return function(cI){var cH,cJ,cG=cI.parentNode;if(cF===1&&cD===0){return true}if(cG){cJ=0;for(cH=cG.firstChild;cH;cH=cH.nextSibling){if(cH.nodeType===1){cJ++;if(cI===cH){break}}}}cJ-=cD;return cJ===cF||(cJ%cF===0&&cJ/cF>=0)}}return function(cH){var cG=cH;switch(cC){case"only":case"first":while((cG=cG.previousSibling)){if(cG.nodeType===1){return false}}if(cC==="first"){return true}cG=cH;case"last":while((cG=cG.nextSibling)){if(cG.nodeType===1){return false}}return true}}},PSEUDO:function(cF,cE){var cC,cD=cg.pseudos[cF]||cg.setFilters[cF.toLowerCase()]||cl.error("unsupported pseudo: "+cF);if(cD[cu]){return cD(cE)}if(cD.length>1){cC=[cF,cF,"",cE];return cg.setFilters.hasOwnProperty(cF.toLowerCase())?cw(function(cI,cK){var cH,cG=cD(cI,cE),cJ=cG.length;while(cJ--){cH=bT.call(cI,cG[cJ]);cI[cH]=!(cK[cH]=cG[cJ])}}):function(cG){return cD(cG,0,cC)}}return cD}},pseudos:{not:cw(function(cC){var cD=[],cE=[],cF=bI(cC.replace(co,"$1"));return cF[cu]?cw(function(cH,cM,cK,cI){var cL,cG=cF(cH,null,cI,[]),cJ=cH.length;while(cJ--){if((cL=cG[cJ])){cH[cJ]=!(cM[cJ]=cL)}}}):function(cI,cH,cG){cD[0]=cI;cF(cD,null,cG,cE);return !cE.pop()}}),has:cw(function(cC){return function(cD){return cl(cC,cD).length>0}}),contains:cw(function(cC){return function(cD){return(cD.textContent||cD.innerText||bv(cD)).indexOf(cC)>-1}}),enabled:function(cC){return cC.disabled===false},disabled:function(cC){return cC.disabled===true},checked:function(cC){var cD=cC.nodeName.toLowerCase();return(cD==="input"&&!!cC.checked)||(cD==="option"&&!!cC.selected)},selected:function(cC){if(cC.parentNode){cC.parentNode.selectedIndex}return cC.selected===true},parent:function(cC){return !cg.pseudos.empty(cC)},empty:function(cD){var cC;cD=cD.firstChild;while(cD){if(cD.nodeName>"@"||(cC=cD.nodeType)===3||cC===4){return false}cD=cD.nextSibling}return true},header:function(cC){return bX.test(cC.nodeName)},text:function(cE){var cD,cC;return cE.nodeName.toLowerCase()==="input"&&(cD=cE.type)==="text"&&((cC=cE.getAttribute("type"))==null||cC.toLowerCase()===cD)},radio:cd("radio"),checkbox:cd("checkbox"),file:cd("file"),password:cd("password"),image:cd("image"),submit:by("submit"),reset:by("reset"),button:function(cD){var cC=cD.nodeName.toLowerCase();return cC==="input"&&cD.type==="button"||cC==="button"},input:function(cC){return ci.test(cC.nodeName)},focus:function(cC){var cD=cC.ownerDocument;return cC===cD.activeElement&&(!cD.hasFocus||cD.hasFocus())&&!!(cC.type||cC.href||~cC.tabIndex)},active:function(cC){return cC===cC.ownerDocument.activeElement},first:ca(function(){return[0]}),last:ca(function(cC,cD){return[cD-1]}),eq:ca(function(cC,cE,cD){return[cD<0?cD+cE:cD]}),even:ca(function(cC,cE){for(var cD=0;cD=0;){cC.push(cD)}return cC}),gt:ca(function(cC,cF,cE){for(var cD=cE<0?cE+cF:cE;++cD1?function(cG,cF,cD){var cE=cC.length;while(cE--){if(!cC[cE](cG,cF,cD)){return false}}return true}:cC[0]}function b0(cC,cD,cE,cF,cI){var cG,cL=[],cH=0,cJ=cC.length,cK=cD!=null;for(;cH-1){cS[cU]=!(cP[cU]=cM)}}}}else{cO=b0(cO===cP?cO.splice(cJ,cO.length):cO);if(cH){cH(null,cP,cO,cR)}else{cr.apply(cP,cO)}}})}function b2(cI){var cD,cG,cE,cH=cI.length,cL=cg.relative[cI[0].type],cM=cL||cg.relative[" "],cF=cL?1:0,cJ=b1(function(cN){return cN===cD},cM,true),cK=b1(function(cN){return bT.call(cD,cN)>-1},cM,true),cC=[function(cP,cO,cN){return(!cL&&(cN||cO!==ce))||((cD=cO).nodeType?cJ(cP,cO,cN):cK(cP,cO,cN))}];for(;cF1&&bJ(cC),cF>1&&cI.slice(0,cF-1).join("").replace(co,"$1"),cG,cF0,cG=cF.length>0,cD=function(cQ,cK,cP,cO,cW){var cL,cM,cR,cV=[],cU=0,cN="0",cH=cQ&&[],cS=cW!=null,cT=ce,cJ=cQ||cG&&cg.find.TAG("*",cW&&cK.parentNode||cK),cI=(bW+=cT==null?1:Math.E);if(cS){ce=cK!==bD&&cK;cs=cD.el}for(;(cL=cJ[cN])!=null;cN++){if(cG&&cL){for(cM=0;(cR=cF[cM]);cM++){if(cR(cL,cK,cP)){cO.push(cL);break}}if(cS){bW=cI;cs=++cD.el}}if(cC){if((cL=!cR&&cL)){cU--}if(cQ){cH.push(cL)}}}cU+=cN;if(cC&&cN!==cU){for(cM=0;(cR=cE[cM]);cM++){cR(cH,cV,cK,cP)}if(cQ){if(cU>0){while(cN--){if(!(cH[cN]||cV[cN])){cV[cN]=b9.call(cO)}}}cV=b0(cV)}cr.apply(cO,cV);if(cS&&!cQ&&cV.length>0&&(cU+cE.length)>1){cl.uniqueSort(cO)}}if(cS){bW=cI;ce=cT}return cH};cD.el=0;return cC?cw(cD):cD}bI=cl.compile=function(cC,cH){var cE,cD=[],cG=[],cF=bS[cu][cC+" "];if(!cF){if(!cH){cH=bw(cC)}cE=cH.length;while(cE--){cF=b2(cH[cE]);if(cF[cu]){cD.push(cF)}else{cG.push(cF)}}cF=bS(cC,bB(cG,cD))}return cF};function bU(cD,cG,cF){var cE=0,cC=cG.length;for(;cE2&&(cD=cN[0]).type==="ID"&&cC.nodeType===9&&!cJ&&cg.relative[cN[1].type]){cC=cg.find.ID(cD.matches[0].replace(bY,""),cC,cJ)[0];if(!cC){return cG}cE=cE.slice(cN.shift().length)}for(cH=cb.POS.test(cE)?-1:cN.length-1;cH>=0;cH--){cD=cN[cH];if(cg.relative[(cM=cD.type)]){break}if((cL=cg.find[cM])){if((cK=cL(cD.matches[0].replace(bY,""),cm.test(cN[0].type)&&cC.parentNode||cC,cJ))){cN.splice(cH,1);cE=cK.length&&cN.join("");if(!cE){cr.apply(cG,bQ.call(cK,0));return cG}break}}}}}bI(cE,cI)(cK,cC,cJ,cG,cm.test(cE));return cG}if(bD.querySelectorAll){(function(){var cH,cI=ct,cG=/'|\\/g,cE=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cD=[":focus"],cC=[":active"],cF=bG.matchesSelector||bG.mozMatchesSelector||bG.webkitMatchesSelector||bG.oMatchesSelector||bG.msMatchesSelector;cf(function(cJ){cJ.innerHTML="";if(!cJ.querySelectorAll("[selected]").length){cD.push("\\["+b3+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!cJ.querySelectorAll(":checked").length){cD.push(":checked")}});cf(function(cJ){cJ.innerHTML="

    ";if(cJ.querySelectorAll("[test^='']").length){cD.push("[*^$]="+b3+"*(?:\"\"|'')")}cJ.innerHTML="";if(!cJ.querySelectorAll(":enabled").length){cD.push(":enabled",":disabled")}});cD=new RegExp(cD.join("|"));ct=function(cP,cK,cR,cU,cT){if(!cU&&!cT&&!cD.test(cP)){var cN,cS,cM=true,cJ=cu,cL=cK,cQ=cK.nodeType===9&&cP;if(cK.nodeType===1&&cK.nodeName.toLowerCase()!=="object"){cN=bw(cP);if((cM=cK.getAttribute("id"))){cJ=cM.replace(cG,"\\$&")}else{cK.setAttribute("id",cJ)}cJ="[id='"+cJ+"'] ";cS=cN.length;while(cS--){cN[cS]=cJ+cN[cS].join("")}cL=cm.test(cP)&&cK.parentNode||cK;cQ=cN.join(",")}if(cQ){try{cr.apply(cR,bQ.call(cL.querySelectorAll(cQ),0));return cR}catch(cO){}finally{if(!cM){cK.removeAttribute("id")}}}}return cI(cP,cK,cR,cU,cT)};if(cF){cf(function(cK){cH=cF.call(cK,"div");try{cF.call(cK,"[test!='']:sizzle");cC.push("!=",cB)}catch(cJ){}});cC=new RegExp(cC.join("|"));cl.matchesSelector=function(cK,cM){cM=cM.replace(cE,"='$1']");if(!bR(cK)&&!cC.test(cM)&&!cD.test(cM)){try{var cJ=cF.call(cK,cM);if(cJ||cH||cK.document&&cK.document.nodeType!==11){return cJ}}catch(cL){}}return cl(cM,null,null,[cK]).length>0}}})()}cg.pseudos.nth=cg.pseudos.eq;function bO(){}cg.filters=bO.prototype=cg.pseudos;cg.setFilters=new bO();cl.attr=C.attr;C.find=cl;C.expr=cl.selectors;C.expr[":"]=C.expr.pseudos;C.unique=cl.uniqueSort;C.text=cl.getText;C.isXMLDoc=cl.isXML;C.contains=cl.contains})(bd);var U=/Until$/,ag=/^(?:parents|prev(?:Until|All))/,bq=/^.[^:#\[\.,]*$/,aQ=C.expr.match.needsContext,ao={children:true,contents:true,next:true,prev:true};C.fn.extend({find:function(bu){var by,bv,bA,bB,bz,bx,bw=this;if(typeof bu!=="string"){return C(bu).filter(function(){for(by=0,bv=bw.length;by0){for(bB=bA;bB=0:C.filter(bu,this).length>0:this.filter(bu).length>0)},closest:function(by,bx){var bz,bw=0,bu=this.length,bv=[],bA=aQ.test(by)||typeof by!=="string"?C(by,bx||this.context):0;for(;bw-1:C.find.matchesSelector(bz,by)){bv.push(bz);break}bz=bz.parentNode}}bv=bv.length>1?C.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(bu){if(!bu){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof bu==="string"){return C.inArray(this[0],C(bu))}return C.inArray(bu.jqx?bu[0]:bu,this)},add:function(bu,bv){var bx=typeof bu==="string"?C(bu,bv):C.makeArray(bu&&bu.nodeType?[bu]:bu),bw=C.merge(this.get(),bx);return this.pushStack(x(bx[0])||x(bw[0])?bw:C.unique(bw))},addBack:function(bu){return this.add(bu==null?this.prevObject:this.prevObject.filter(bu))}});C.fn.andSelf=C.fn.addBack;function x(bu){return !bu||!bu.parentNode||bu.parentNode.nodeType===11}function aB(bv,bu){do{bv=bv[bu]}while(bv&&bv.nodeType!==1);return bv}C.each({parent:function(bv){var bu=bv.parentNode;return bu&&bu.nodeType!==11?bu:null},parents:function(bu){return C.dir(bu,"parentNode")},parentsUntil:function(bv,bu,bw){return C.dir(bv,"parentNode",bw)},next:function(bu){return aB(bu,"nextSibling")},prev:function(bu){return aB(bu,"previousSibling")},nextAll:function(bu){return C.dir(bu,"nextSibling")},prevAll:function(bu){return C.dir(bu,"previousSibling")},nextUntil:function(bv,bu,bw){return C.dir(bv,"nextSibling",bw)},prevUntil:function(bv,bu,bw){return C.dir(bv,"previousSibling",bw)},siblings:function(bu){return C.sibling((bu.parentNode||{}).firstChild,bu)},children:function(bu){return C.sibling(bu.firstChild)},contents:function(bu){return C.nodeName(bu,"iframe")?bu.contentDocument||bu.contentWindow.document:C.merge([],bu.childNodes)}},function(bu,bv){C.fn[bu]=function(by,bw){var bx=C.map(this,bv,by);if(!U.test(bu)){bw=by}if(bw&&typeof bw==="string"){bx=C.filter(bw,bx)}bx=this.length>1&&!ao[bu]?C.unique(bx):bx;if(this.length>1&&ag.test(bu)){bx=bx.reverse()}return this.pushStack(bx,bu,aD.call(arguments).join(","))}});C.extend({filter:function(bw,bu,bv){if(bv){bw=":not("+bw+")"}return bu.length===1?C.find.matchesSelector(bu[0],bw)?[bu[0]]:[]:C.find.matches(bw,bu)},dir:function(bw,bv,by){var bu=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===G||bx.nodeType!==1||!C(bx).is(by))){if(bx.nodeType===1){bu.push(bx)}bx=bx[bv]}return bu},sibling:function(bw,bv){var bu=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){bu.push(bw)}}return bu}});function az(bx,bw,bu){bw=bw||0;if(C.isFunction(bw)){return C.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===bu})}else{if(bw.nodeType){return C.grep(bx,function(bz,by){return(bz===bw)===bu})}else{if(typeof bw==="string"){var bv=C.grep(bx,function(by){return by.nodeType===1});if(bq.test(bw)){return C.filter(bw,bv,!bu)}else{bw=C.filter(bw,bv)}}}}return C.grep(bx,function(bz,by){return(C.inArray(bz,bw)>=0)===bu})}function a(bu){var bw=aJ.split("|"),bv=bu.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aJ="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aa=/ JQXLite\d+="(?:null|\d+)"/g,ah=/^\s+/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,c=/<([\w:]+)/,v=/]","i"),R=/^(?:checkbox|radio)$/,o=/checked\s*(?:[^=]|=\s*.checked.)/i,bp=/\/(java|ecma)script/i,aG=/^\s*\s*$/g,am={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},T=a(ak),bg=T.appendChild(ak.createElement("div"));am.optgroup=am.option;am.tbody=am.tfoot=am.colgroup=am.caption=am.thead;am.th=am.td;if(!C.support.htmlSerialize){am._default=[1,"X
    ","
    "]}C.fn.extend({text:function(bu){return C.access(this,function(bv){return bv===G?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ak).createTextNode(bv))},null,bu,arguments.length)},wrapAll:function(bu){if(C.isFunction(bu)){return this.each(function(bw){C(this).wrapAll(bu.call(this,bw))})}if(this[0]){var bv=C(bu,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(bu){if(C.isFunction(bu)){return this.each(function(bv){C(this).wrapInner(bu.call(this,bv))})}return this.each(function(){var bv=C(this),bw=bv.contents();if(bw.length){bw.wrapAll(bu)}else{bv.append(bu)}})},wrap:function(bu){var bv=C.isFunction(bu);return this.each(function(bw){C(this).wrapAll(bv?bu.call(this,bw):bu)})},unwrap:function(){return this.parent().each(function(){if(!C.nodeName(this,"body")){C(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.appendChild(bu)}})},prepend:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.insertBefore(bu,this.firstChild)}})},before:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(bu,this),"before",this.selector)}},after:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(this,bu),"after",this.selector)}},remove:function(bu,bx){var bw,bv=0;for(;(bw=this[bv])!=null;bv++){if(!bu||C.filter(bu,[bw]).length){if(!bx&&bw.nodeType===1){C.cleanData(bw.getElementsByTagName("*"));C.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){var bv,bu=0;for(;(bv=this[bu])!=null;bu++){if(bv.nodeType===1){C.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,bu){bv=bv==null?false:bv;bu=bu==null?bv:bu;return this.map(function(){return C.clone(this,bv,bu)})},html:function(bu){return C.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===G){return bx.nodeType===1?bx.innerHTML.replace(aa,""):G}if(typeof by==="string"&&!W.test(by)&&(C.support.htmlSerialize||!ac.test(by))&&(C.support.leadingWhitespace||!ah.test(by))&&!am[(c.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(L,"<$1>");try{for(;bw1&&typeof bB==="string"&&o.test(bB)){return this.each(function(){C(this).domManip(bA,bE,bD)})}if(C.isFunction(bB)){return this.each(function(bG){var bF=C(this);bA[0]=bB.call(this,bG,bE?bF.html():G);bF.domManip(bA,bE,bD)})}if(this[0]){bw=C.buildFragment(bA,this,bv);bz=bw.fragment;by=bz.firstChild;if(bz.childNodes.length===1){bz=by}if(by){bE=bE&&C.nodeName(by,"tr");for(bC=bw.cacheable||bu-1;bx0?this.clone(true):this).get();C(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,bu,bC.selector)}}});function bk(bu){if(typeof bu.getElementsByTagName!=="undefined"){return bu.getElementsByTagName("*")}else{if(typeof bu.querySelectorAll!=="undefined"){return bu.querySelectorAll("*")}else{return[]}}}function al(bu){if(R.test(bu.type)){bu.defaultChecked=bu.checked}}C.extend({clone:function(by,bA,bw){var bu,bv,bx,bz;if(C.support.html5Clone||C.isXMLDoc(by)||!ac.test("<"+by.nodeName+">")){bz=by.cloneNode(true)}else{bg.innerHTML=by.outerHTML;bg.removeChild(bz=bg.firstChild)}if((!C.support.noCloneEvent||!C.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!C.isXMLDoc(by)){ab(by,bz);bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){if(bv[bx]){ab(bu[bx],bv[bx])}}}if(bA){r(by,bz);if(bw){bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){r(bu[bx],bv[bx])}}}bu=bv=null;return bz},clean:function(bH,bw,bu,bx){var bE,bD,bG,bL,bA,bK,bB,by,bv,bF,bJ,bC,bz=bw===ak&&T,bI=[];if(!bw||typeof bw.createDocumentFragment==="undefined"){bw=ak}for(bE=0;(bG=bH[bE])!=null;bE++){if(typeof bG==="number"){bG+=""}if(!bG){continue}if(typeof bG==="string"){if(!P.test(bG)){bG=bw.createTextNode(bG)}else{bz=bz||a(bw);bB=bw.createElement("div");bz.appendChild(bB);bG=bG.replace(L,"<$1>");bL=(c.exec(bG)||["",""])[1].toLowerCase();bA=am[bL]||am._default;bK=bA[0];bB.innerHTML=bA[1]+bG+bA[2];while(bK--){bB=bB.lastChild}if(!C.support.tbody){by=v.test(bG);bv=bL==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bA[1]===""&&!by?bB.childNodes:[];for(bD=bv.length-1;bD>=0;--bD){if(C.nodeName(bv[bD],"tbody")&&!bv[bD].childNodes.length){bv[bD].parentNode.removeChild(bv[bD])}}}if(!C.support.leadingWhitespace&&ah.test(bG)){bB.insertBefore(bw.createTextNode(ah.exec(bG)[0]),bB.firstChild)}bG=bB.childNodes;bB.parentNode.removeChild(bB)}}if(bG.nodeType){bI.push(bG)}else{C.merge(bI,bG)}}if(bB){bG=bB=bz=null}if(!C.support.appendChecked){for(bE=0;(bG=bI[bE])!=null;bE++){if(C.nodeName(bG,"input")){al(bG)}else{if(typeof bG.getElementsByTagName!=="undefined"){C.grep(bG.getElementsByTagName("input"),al)}}}}if(bu){bJ=function(bM){if(!bM.type||bp.test(bM.type)){return bx?bx.push(bM.parentNode?bM.parentNode.removeChild(bM):bM):bu.appendChild(bM)}};for(bE=0;(bG=bI[bE])!=null;bE++){if(!(C.nodeName(bG,"script")&&bJ(bG))){bu.appendChild(bG);if(typeof bG.getElementsByTagName!=="undefined"){bC=C.grep(C.merge([],bG.getElementsByTagName("script")),bJ);bI.splice.apply(bI,[bE+1,0].concat(bC));bE+=bC.length}}}}return bI},cleanData:function(bv,bD){var by,bw,bx,bC,bz=0,bE=C.expando,bu=C.cache,bA=C.support.deleteExpando,bB=C.event.special;for(;(bx=bv[bz])!=null;bz++){if(bD||C.acceptData(bx)){bw=bx[bE];by=bw&&bu[bw];if(by){if(by.events){for(bC in by.events){if(bB[bC]){C.event.remove(bx,bC)}else{C.removeEvent(bx,bC,by.handle)}}}if(bu[bw]){delete bu[bw];if(bA){delete bx[bE]}else{if(bx.removeAttribute){bx.removeAttribute(bE)}else{bx[bE]=null}}C.deletedIds.push(bw)}}}}}});(function(){var bu,bv;C.uaMatch=function(bx){bx=bx.toLowerCase();var bw=/(chrome)[ \/]([\w.]+)/.exec(bx)||/(webkit)[ \/]([\w.]+)/.exec(bx)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(bx)||/(msie) ([\w.]+)/.exec(bx)||bx.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(bx)||[];return{browser:bw[1]||"",version:bw[2]||"0"}};bu=C.uaMatch(bt.userAgent);bv={};if(bu.browser){bv[bu.browser]=true;bv.version=bu.version}if(bv.chrome){bv.webkit=true}else{if(bv.webkit){bv.safari=true}}C.browser=bv;C.sub=function(){function bx(bz,bA){return new bx.fn.init(bz,bA)}C.extend(true,bx,this);bx.superclass=this;bx.fn=bx.prototype=this();bx.fn.constructor=bx;bx.sub=this.sub;bx.fn.init=function by(bz,bA){if(bA&&bA instanceof C&&!(bA instanceof bx)){bA=bx(bA)}return C.fn.init.call(this,bz,bA,bw)};bx.fn.init.prototype=bx.fn;var bw=bx(ak);return bx}})();var Q,bc,l,ad=/alpha\([^)]*\)/i,aj=/opacity=([^)]*)/,w=/^(top|right|bottom|left)$/,ai=/^(none|table(?!-c[ea]).+)/,av=/^margin/,i=new RegExp("^("+aE+")(.*)$","i"),aV=new RegExp("^("+aE+")(?!px)[a-z%]+$","i"),E=new RegExp("^([-+])=("+aE+")","i"),J={BODY:"block"},ba={position:"absolute",visibility:"hidden",display:"block"},aL={letterSpacing:0,fontWeight:400},D=["Top","Right","Bottom","Left"],O=["Webkit","O","Moz","ms"],be=C.fn.toggle;function a2(bx,bv){if(bv in bx){return bv}var by=bv.charAt(0).toUpperCase()+bv.slice(1),bu=bv,bw=O.length;while(bw--){bv=O[bw]+by;if(bv in bx){return bv}}return bu}function ap(bv,bu){bv=bu||bv;return C.css(bv,"display")==="none"||!C.contains(bv.ownerDocument,bv)}function bb(bz,bu){var by,bA,bv=[],bw=0,bx=bz.length;for(;bw1)},show:function(){return bb(this,true)},hide:function(){return bb(this)},toggle:function(bw,bv){var bu=typeof bw==="boolean";if(C.isFunction(bw)&&C.isFunction(bv)){return be.apply(this,arguments)}return this.each(function(){if(bu?bw:ap(this)){C(this).show()}else{C(this).hide()}})}});C.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var bu=Q(bw,"opacity");return bu===""?"1":bu}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":C.support.cssFloat?"cssFloat":"styleFloat"},style:function(bw,bv,bC,bx){if(!bw||bw.nodeType===3||bw.nodeType===8||!bw.style){return}var bA,bB,bD,by=C.camelCase(bv),bu=bw.style;bv=C.cssProps[by]||(C.cssProps[by]=a2(bu,by));bD=C.cssHooks[bv]||C.cssHooks[by];if(bC!==G){bB=typeof bC;if(bB==="string"&&(bA=E.exec(bC))){bC=(bA[1]+1)*bA[2]+parseFloat(C.css(bw,bv));bB="number"}if(bC==null||bB==="number"&&isNaN(bC)){return}if(bB==="number"&&!C.cssNumber[by]){bC+="px"}if(!bD||!("set" in bD)||(bC=bD.set(bw,bC,bx))!==G){try{bu[bv]=bC}catch(bz){}}}else{if(bD&&"get" in bD&&(bA=bD.get(bw,false,bx))!==G){return bA}return bu[bv]}},css:function(bA,by,bz,bv){var bB,bx,bu,bw=C.camelCase(by);by=C.cssProps[bw]||(C.cssProps[bw]=a2(bA.style,bw));bu=C.cssHooks[by]||C.cssHooks[bw];if(bu&&"get" in bu){bB=bu.get(bA,true,bv)}if(bB===G){bB=Q(bA,by)}if(bB==="normal"&&by in aL){bB=aL[by]}if(bz||bv!==G){bx=parseFloat(bB);return bz||C.isNumeric(bx)?bx||0:bB}return bB},swap:function(by,bx,bz){var bw,bv,bu={};for(bv in bx){bu[bv]=by.style[bv];by.style[bv]=bx[bv]}bw=bz.call(by);for(bv in bx){by.style[bv]=bu[bv]}return bw}});if(bd.getComputedStyle){Q=function(bB,bv){var bu,by,bx,bA,bz=bd.getComputedStyle(bB,null),bw=bB.style;if(bz){bu=bz.getPropertyValue(bv)||bz[bv];if(bu===""&&!C.contains(bB.ownerDocument,bB)){bu=C.style(bB,bv)}if(aV.test(bu)&&av.test(bv)){by=bw.width;bx=bw.minWidth;bA=bw.maxWidth;bw.minWidth=bw.maxWidth=bw.width=bu;bu=bz.width;bw.width=by;bw.minWidth=bx;bw.maxWidth=bA}}return bu}}else{if(ak.documentElement.currentStyle){Q=function(by,bw){var bz,bu,bv=by.currentStyle&&by.currentStyle[bw],bx=by.style;if(bv==null&&bx&&bx[bw]){bv=bx[bw]}if(aV.test(bv)&&!w.test(bw)){bz=bx.left;bu=by.runtimeStyle&&by.runtimeStyle.left;if(bu){by.runtimeStyle.left=by.currentStyle.left}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bz;if(bu){by.runtimeStyle.left=bu}}return bv===""?"auto":bv}}}function aO(bu,bw,bx){var bv=i.exec(bw);return bv?Math.max(0,bv[1]-(bx||0))+(bv[2]||"px"):bw}function aZ(bx,bv,bu,bz){var bw=bu===(bz?"border":"content")?4:bv==="width"?1:0,by=0;for(;bw<4;bw+=2){if(bu==="margin"){by+=C.css(bx,bu+D[bw],true)}if(bz){if(bu==="content"){by-=parseFloat(Q(bx,"padding"+D[bw]))||0}if(bu!=="margin"){by-=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}else{by+=parseFloat(Q(bx,"padding"+D[bw]))||0;if(bu!=="padding"){by+=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}}return by}function Y(bx,bv,bu){var by=bv==="width"?bx.offsetWidth:bx.offsetHeight,bw=true,bz=C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box";if(by<=0||by==null){by=Q(bx,bv);if(by<0||by==null){by=bx.style[bv]}if(aV.test(by)){return by}bw=bz&&(C.support.boxSizingReliable||by===bx.style[bv]);by=parseFloat(by)||0}return(by+aZ(bx,bv,bu||(bz?"border":"content"),bw))+"px"}function aN(bw){if(J[bw]){return J[bw]}var bu=C("<"+bw+">").appendTo(ak.body),bv=bu.css("display");bu.remove();if(bv==="none"||bv===""){bc=ak.body.appendChild(bc||C.extend(ak.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!l||!bc.createElement){l=(bc.contentWindow||bc.contentDocument).document;l.write("");l.close()}bu=l.body.appendChild(l.createElement(bw));bv=Q(bu,"display");ak.body.removeChild(bc)}J[bw]=bv;return bv}C.each(["height","width"],function(bv,bu){C.cssHooks[bu]={get:function(by,bx,bw){if(bx){if(by.offsetWidth===0&&ai.test(Q(by,"display"))){return C.swap(by,ba,function(){return Y(by,bu,bw)})}else{return Y(by,bu,bw)}}},set:function(bx,by,bw){return aO(bx,by,bw?aZ(bx,bu,bw,C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box"):0)}}});if(!C.support.opacity){C.cssHooks.opacity={get:function(bv,bu){return aj.test((bu&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":bu?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,bu=C.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&C.trim(bw.replace(ad,""))===""&&bx.removeAttribute){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ad.test(bw)?bw.replace(ad,bu):bw+" "+bu}}}C(function(){if(!C.support.reliableMarginRight){C.cssHooks.marginRight={get:function(bv,bu){return C.swap(bv,{display:"inline-block"},function(){if(bu){return Q(bv,"marginRight")}})}}}if(!C.support.pixelPosition&&C.fn.position){C.each(["top","left"],function(bu,bv){C.cssHooks[bv]={get:function(by,bx){if(bx){var bw=Q(by,bv);return aV.test(bw)?C(by).position()[bv]+"px":bw}}}})}});if(C.expr&&C.expr.filters){C.expr.filters.hidden=function(bu){return(bu.offsetWidth===0&&bu.offsetHeight===0)||(!C.support.reliableHiddenOffsets&&((bu.style&&bu.style.display)||Q(bu,"display"))==="none")};C.expr.filters.visible=function(bu){return !C.expr.filters.hidden(bu)}}C.each({margin:"",padding:"",border:"Width"},function(bu,bv){C.cssHooks[bu+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[bu+D[bx]+bv]=bz[bx]||bz[bx-2]||bz[0]}return bw}};if(!av.test(bu)){C.cssHooks[bu+bv].set=aO}});var g=/%20/g,af=/\[\]$/,br=/\r?\n/g,aU=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,p=/^(?:select|textarea)/i;C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?C.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aU.test(this.type))}).map(function(bu,bv){var bw=C(this).val();return bw==null?null:C.isArray(bw)?C.map(bw,function(by,bx){return{name:bv.name,value:by.replace(br,"\r\n")}}):{name:bv.name,value:bw.replace(br,"\r\n")}}).get()}});C.param=function(bu,bw){var bx,bv=[],by=function(bz,bA){bA=C.isFunction(bA)?bA():(bA==null?"":bA);bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===G){bw=C.ajaxSettings&&C.ajaxSettings.traditional}if(C.isArray(bu)||(bu.jqx&&!C.isPlainObject(bu))){C.each(bu,function(){by(this.name,this.value)})}else{for(bx in bu){s(bx,bu[bx],bw,by)}}return bv.join("&").replace(g,"+")};function s(bw,by,bv,bx){var bu;if(C.isArray(by)){C.each(by,function(bA,bz){if(bv||af.test(bw)){bx(bw,bz)}else{s(bw+"["+(typeof bz==="object"?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&C.type(by)==="object"){for(bu in by){s(bw+"["+bu+"]",by[bu],bv,bx)}}else{bx(bw,by)}}}if(C.support.ajax){C.ajaxTransport(function(bu){if(!bu.crossDomain||C.support.cors){var bv;return{send:function(bB,bw){var bz,by,bA=bu.xhr();if(bu.username){bA.open(bu.type,bu.url,bu.async,bu.username,bu.password)}else{bA.open(bu.type,bu.url,bu.async)}if(bu.xhrFields){for(by in bu.xhrFields){bA[by]=bu.xhrFields[by]}}if(bu.mimeType&&bA.overrideMimeType){bA.overrideMimeType(bu.mimeType)}if(!bu.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((bu.hasContent&&bu.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=G;if(bz){bA.onreadystatechange=C.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}try{bI.text=bA.responseText}catch(bJ){}try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&bu.isLocal&&!bu.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!bu.async){bv()}else{if(bA.readyState===4){setTimeout(bv,0)}else{bz=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};C(bd).unload(xhrOnUnloadAbort)}xhrCallbacks[bz]=bv}bA.onreadystatechange=bv}}},abort:function(){if(bv){bv(0,1)}}}}})}var a6,a1,ar=/^(?:toggle|show|hide)$/,aM=new RegExp("^(?:([-+])=|)("+aE+")([a-z%]*)$","i"),a7=/queueHooks$/,k=[bm],H={"*":[function(bu,bB){var bx,bC,bD=this.createTween(bu,bB),by=aM.exec(bB),bz=bD.cur(),bv=+bz||0,bw=1,bA=20;if(by){bx=+by[2];bC=by[3]||(C.cssNumber[bu]?"":"px");if(bC!=="px"&&bv){bv=C.css(bD.elem,bu,true)||bx||1;do{bw=bw||".5";bv=bv/bw;C.style(bD.elem,bu,bv+bC)}while(bw!==(bw=bD.cur()/bz)&&bw!==1&&--bA)}bD.unit=bC;bD.start=bv;bD.end=by[1]?bv+(by[1]+1)*bx:bx}return bD}]};function bl(){setTimeout(function(){a6=G},0);return(a6=C.now())}function Z(bv,bu){C.each(bu,function(bA,by){var bz=(H[bA]||[]).concat(H["*"]),bw=0,bx=bz.length;for(;bw-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(bu)||0;by=parseFloat(bE)||0}if(C.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};C.fn.extend({isRendered:function(){var bv=this;var bu=this[0];if(bu.parentNode==null||(bu.offsetWidth===0||bu.offsetHeight===0)){return false}return true},getSizeFromStyle:function(){var by=this;var bx=null;var bu=null;var bw=this[0];var bv;if(bw.style.width){bx=bw.style.width}if(bw.style.height){bu=bw.style.height}if(bd.getComputedStyle){bv=getComputedStyle(bw,null)}else{bv=bw.currentStyle}if(bv){if(bv.width){bx=bv.width}if(bv.height){bu=bv.height}}if(bx==="0px"){bx=0}if(bu==="0px"){bu=0}if(bx===null){bx=0}if(bu===null){bu=0}return{width:bx,height:bu}},initAnimate:function(){},sizeStyleChanged:function(bx){var bw=this;var by;var bu=function(bz){var bA=by;if(bz&&bz[0]&&bz[0].attributeName==="style"&&bz[0].type==="attributes"){if(bA.element.offsetWidth!==bA.offsetWidth||bA.element.offsetHeight!==bA.offsetHeight){bA.offsetWidth=bA.element.offsetWidth;bA.offsetHeight=bA.element.offsetHeight;if(bw.isRendered()){bA.callback()}}}};by={element:bw[0],offsetWidth:bw[0].offsetWidth,offsetHeight:bw[0].offsetHeight,callback:bx};try{if(!bw.elementStyleObserver){bw.elementStyleObserver=new MutationObserver(bu);bw.elementStyleObserver.observe(bw[0],{attributes:true,childList:false,characterData:false})}}catch(bv){}},position:function(){if(!this[0]){return}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),bu=V.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(C.css(bw,"marginTop"))||0;bx.left-=parseFloat(C.css(bw,"marginLeft"))||0;bu.top+=parseFloat(C.css(bv[0],"borderTopWidth"))||0;bu.left+=parseFloat(C.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-bu.top,left:bx.left-bu.left}},offsetParent:function(){return this.map(function(){var bu=this.offsetParent||ak.body;while(bu&&(!V.test(bu.nodeName)&&C.css(bu,"position")==="static")){bu=bu.offsetParent}return bu||ak.body})}});C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(bw,bv){var bu=/Y/.test(bv);C.fn[bw]=function(bx){return C.access(this,function(by,bB,bA){var bz=aC(by);if(bA===G){return bz?(bv in bz)?bz[bv]:bz.document.documentElement[bB]:by[bB]}if(bz){bz.scrollTo(!bu?bA:C(bz).scrollLeft(),bu?bA:C(bz).scrollTop())}else{by[bB]=bA}},bw,bx,arguments.length,null)}});function aC(bu){return C.isWindow(bu)?bu:bu.nodeType===9?bu.defaultView||bu.parentWindow:false}C.each({Height:"height",Width:"width"},function(bu,bv){C.each({padding:"inner"+bu,content:bv,"":"outer"+bu},function(bw,bx){C.fn[bx]=function(bB,bA){var bz=arguments.length&&(bw||typeof bB!=="boolean"),by=bw||(bB===true||bA===true?"margin":"border");return C.access(this,function(bD,bC,bE){var bF;if(C.isWindow(bD)){return bD.document.documentElement["client"+bu]}if(bD.nodeType===9){bF=bD.documentElement;return Math.max(bD.body["scroll"+bu],bF["scroll"+bu],bD.body["offset"+bu],bF["offset"+bu],bF["client"+bu])}return bE===G?C.css(bD,bC,bE,by):C.style(bD,bC,bE,by)},bv,bz?bB:G,bz,null)}})});bd.JQXLite=bd.jqxHelper=C;if(typeof define==="function"&&define.amd&&define.amd.JQXLite){define("jqx",[],function(){return C})}})(window)}(function(a){if(a.jQuery){a.minQuery=a.JQXLite=a.jQuery;return}if(!a.$){a.$=a.minQuery=a.JQXLite}else{a.minQuery=a.JQXLite=a.$}})(window);JQXLite.generateID=function(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};var b="";do{b="jqx"+a()+a()+a()}while($("#"+b).length>0);return b};var jqxBaseFramework=window.jqxBaseFramework=window.minQuery||window.jQuery;(function(b){b.jqx=b.jqx||{};window.jqx=b.jqx;var a={createInstance:function(c,e,g){if(e=="jqxDataAdapter"){var f=g[0];var d=g[1]||{};return new b.jqx.dataAdapter(f,d)}b(c)[e](g||{});return b(c)[e]("getInstance")}};window.jqwidgets=a;b.jqx.define=function(c,d,e){c[d]=function(){if(this.baseType){this.base=new c[this.baseType]();this.base.defineInstance()}this.defineInstance();this.metaInfo()};c[d].prototype.defineInstance=function(){};c[d].prototype.metaInfo=function(){};c[d].prototype.base=null;c[d].prototype.baseType=undefined;if(e&&c[e]){c[d].prototype.baseType=e}};b.jqx.invoke=function(f,e){if(e.length==0){return}var g=typeof(e)==Array||e.length>0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):b({}).toArray();while(f[g]==undefined&&f.base!=null){if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}f=f.base}if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}return};b.jqx.getByPriority=function(c){var e=undefined;for(var d=0;d0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):{};while(f[g]==undefined&&f.base!=null){if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}f=f.base}if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}return false};b.jqx.isPropertySetter=function(d,c){if(c.length==1&&typeof(c[0])=="object"){return true}if(c.length==2&&typeof(c[0])=="string"&&!b.jqx.hasFunction(d,c)){return true}return false};b.jqx.validatePropertySetter=function(g,e,c){if(!b.jqx.propertySetterValidation){return true}if(e.length==1&&typeof(e[0])=="object"){for(var f in e[0]){var h=g;while(!h.hasOwnProperty(f)&&h.base){h=h.base}if(!h||!h.hasOwnProperty(f)){if(!c){var d=h.hasOwnProperty(f.toString().toLowerCase());if(!d){throw"Invalid property: "+f}else{return true}}return false}}return true}if(e.length!=2){if(!c){throw"Invalid property: "+e.length>=0?e[0]:""}return false}while(!g.hasOwnProperty(e[0])&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e[0])){if(!c){throw"Invalid property: "+e[0]}return false}return true};if(!Object.keys){Object.keys=(function(){var e=Object.prototype.hasOwnProperty,f=!({toString:null}).propertyIsEnumerable("toString"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=d.length;return function(j){if(typeof j!=="object"&&(typeof j!=="function"||j===null)){throw new TypeError("Object.keys called on non-object")}var g=[],k,h;for(k in j){if(e.call(j,k)){g.push(k)}}if(f){for(h=0;h1){var g=!f.base?f.element:f.base.element;var c=b.data(g,f.widgetName).initArgs;if(c&&JSON&&JSON.stringify&&i[0]&&c[0]){try{if(JSON.stringify(i[0])==JSON.stringify(c[0])){var h=true;b.each(i[0],function(l,m){if(f[l]!=m){h=false;return false}});if(h){return}}}catch(e){}}f.batchUpdate=i[0];var j={};var k={};b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){if(f[l]!=m){j[l]=f[l];k[l]=m;d++}}else{if(n.hasOwnProperty(l.toLowerCase())){if(f[l.toLowerCase()]!=m){j[l.toLowerCase()]=f[l.toLowerCase()];k[l.toLowerCase()]=m;d++}}}});if(d<2){f.batchUpdate=null}}b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){b.jqx.setvalueraiseevent(n,l,m)}else{if(n.hasOwnProperty(l.toLowerCase())){b.jqx.setvalueraiseevent(n,l.toLowerCase(),m)}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+l+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,j,k)}}}else{if(i.length==2){while(!f.hasOwnProperty(i[0])&&f.base){f=f.base}if(f.hasOwnProperty(i[0])){b.jqx.setvalueraiseevent(f,i[0],i[1])}else{if(f.hasOwnProperty(i[0].toLowerCase())){b.jqx.setvalueraiseevent(f,i[0].toLowerCase(),i[1])}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+i[0]+"'"}}}}}};b.jqx.setvalueraiseevent=function(d,e,f){var c=d[e];d[e]=f;if(!d.isInitialized){return}if(d.propertyChangedHandler!=undefined){d.propertyChangedHandler(d,e,c,f)}if(d.propertyChangeMap!=undefined&&d.propertyChangeMap[e]!=undefined){d.propertyChangeMap[e](d,e,c,f)}};b.jqx.get=function(f,e){if(e==undefined||e==null){return undefined}if(f.propertyMap){var d=f.propertyMap(e);if(d!=null){return d}}if(f.hasOwnProperty(e)){return f[e]}if(f.hasOwnProperty(e.toLowerCase())){return f[e.toLowerCase()]}var c=undefined;if(typeof(e)==Array){if(e.length!=1){return undefined}c=e[0]}else{if(typeof(e)=="string"){c=e}}while(!f.hasOwnProperty(c)&&f.base){f=f.base}if(f){return f[c]}return undefined};b.jqx.serialize=function(f){var c="";if(b.isArray(f)){c="[";for(var e=0;e0){c+=", "}c+=b.jqx.serialize(f[e])}c+="]"}else{if(typeof(f)=="object"){c="{";var d=0;for(var e in f){if(d++>0){c+=", "}c+=e+": "+b.jqx.serialize(f[e])}c+="}"}else{c=f.toString()}}return c};b.jqx.propertySetterValidation=true;b.jqx.jqxWidgetProxy=function(h,d,c){var e=b(d);var g=b.data(d,h);if(g==undefined){return undefined}var f=g.instance;if(b.jqx.hasFunction(f,c)){return b.jqx.invoke(f,c)}if(b.jqx.isPropertySetter(f,c)){if(b.jqx.validatePropertySetter(f,c)){b.jqx.set(f,c);return undefined}}else{if(typeof(c)=="object"&&c.length==0){return}else{if(typeof(c)=="object"&&c.length==1&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c[0])}else{if(typeof(c)=="string"&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c)}}}}throw"jqxCore: Invalid parameter '"+b.jqx.serialize(c)+"' does not exist."};b.jqx.applyWidget=function(d,f,l,m){var h=false;try{h=window.MSApp!=undefined}catch(g){}var n=b(d);if(!m){m=new b.jqx["_"+f]()}else{m.host=n;m.element=d}if(d.id==""){d.id=b.jqx.utilities.createId()}var k={host:n,element:d,instance:m,initArgs:l};m.widgetName=f;b.data(d,f,k);b.data(d,"jqxWidget",k.instance);var j=new Array();var m=k.instance;while(m){m.isInitialized=false;j.push(m);m=m.base}j.reverse();j[0].theme=b.jqx.theme||"";b.jqx.jqxWidgetProxy(f,d,l);for(var c in j){m=j[c];if(c==0){m.host=n;m.element=d;m.WinJS=h}if(m!=undefined){if(m.definedInstance){m.definedInstance()}if(m.createInstance!=null){if(h){MSApp.execUnsafeLocalFunction(function(){m.createInstance(l)})}else{m.createInstance(l)}}}}for(var c in j){if(j[c]!=undefined){j[c].isInitialized=true}}if(h){MSApp.execUnsafeLocalFunction(function(){k.instance.refresh(true)})}else{k.instance.refresh(true)}};b.jqx.jqxWidget=function(c,d,g){var j=false;try{var l=Array.prototype.slice.call(g,0)}catch(i){var l=""}try{j=window.MSApp!=undefined}catch(i){}var h=c;var m="";if(d){m="_"+d}b.jqx.define(b.jqx,"_"+h,m);var k=new Array();if(!window[h]){var f=function(n){if(n==null){return""}var e=b.type(n);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(n===null){return""}return n.toString()}var o="";b.each(n,function(q,r){var t=r;if(q>0){o+=", "}o+="[";var p=0;if(b.type(t)=="object"){for(var s in t){if(p>0){o+=", "}o+="{"+s+":"+t[s]+"}";p++}}else{if(p>0){o+=", "}o+="{"+q+":"+t+"}";p++}o+="]"});return o};a[h]=window[h]=function(e,s){var n=[];if(!s){s={}}n.push(s);var o=e;if(b.type(o)==="object"&&e[0]){o=e[0].id;if(o===""){o=e[0].id=b.jqx.utilities.createId()}}else{if(b.type(e)==="object"&&e&&e.nodeName){o=e.id;if(o===""){o=e.id=b.jqx.utilities.createId()}}}if(window.jqxWidgets&&window.jqxWidgets[o]){if(s){b.each(window.jqxWidgets[o],function(t){var u=b(this.element).data();if(u&&u.jqxWidget){b(this.element)[h](s)}})}if(window.jqxWidgets[o].length==1){var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o][0]}}var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o]}}var p=b(e);if(p.length===0){p=b("
    ");if(h==="jqxInput"||h==="jqxPasswordInput"||h==="jqxMaskedInput"){p=b("")}if(h==="jqxTextArea"){p=b("")}if(h==="jqxButton"||h==="jqxRepeatButton"||h==="jqxToggleButton"){p=b("
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(b.support.htmlSerialize||!k.test(s))&&(b.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1>");try{for(;m=0&&d.indexOf(".net4.0c")>=0){e.browser="msie";e.version="11";c[1]="msie"}if(d.indexOf("edge")>=0){e.browser="msie";e.version="12";c[1]="msie"}e[c[1]]=c[1];return e}});b.jqx.browser=b.jqx.utilities.getBrowser();b.jqx.isHidden=function(d){if(!d||!d[0]){return false}var c=d[0].offsetWidth,e=d[0].offsetHeight;if(c===0||e===0){return true}else{return false}};b.jqx.ariaEnabled=true;b.jqx.aria=function(d,f,e){if(!b.jqx.ariaEnabled){return}if(f==undefined){b.each(d.aria,function(h,i){var k=!d.base?d.host.attr(h):d.base.host.attr(h);if(k!=undefined&&!b.isFunction(k)){var j=k;switch(i.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}d[i.name]=j}else{var k=d[i.name];if(b.isFunction(k)){k=d[i.name]()}if(k==undefined){k=""}try{!d.base?d.host.attr(h,k.toString()):d.base.host.attr(h,k.toString())}catch(g){}}})}else{try{if(d.host){if(!d.base){if(d.host){if(d.element.setAttribute){d.element.setAttribute(f,e.toString())}else{d.host.attr(f,e.toString())}}else{d.attr(f,e.toString())}}else{if(d.base.host){d.base.host.attr(f,e.toString())}else{d.attr(f,e.toString())}}}else{if(d.setAttribute){d.setAttribute(f,e.toString())}}}catch(c){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d){var c=this.length;var e=Number(arguments[1])||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=c}for(;e=0||j.indexOf("WPDesktop")>=0||j.indexOf("IEMobile")>=0||j.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(j.indexOf("Touch")>=0){var c=("MSPointerDown" in window)||("pointerdown" in window);if(c){this.touchDevice=true;return true}if(j.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(l){this.touchDevice=false;return false}},getLeftPos:function(c){var d=c.offsetLeft;while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){d+=c.offsetLeft;if(document.all){d+=c.clientLeft}}}return d},getTopPos:function(d){var f=d.offsetTop;var c=b(d).coord();while((d=d.offsetParent)!=null){if(d.tagName!="HTML"){f+=(d.offsetTop-d.scrollTop);if(document.all){f+=d.clientTop}}}var e=navigator.userAgent.toLowerCase();var g=(e.indexOf("windows phone")!=-1||e.indexOf("WPDesktop")!=-1||e.indexOf("ZuneWP7")!=-1||e.indexOf("msie 9")!=-1||e.indexOf("msie 11")!=-1||e.indexOf("msie 10")!=-1)&&e.indexOf("touch")!=-1;if(g){return c.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return f}if(e.indexOf("version/7")!=-1){return c.top}if(e.indexOf("version/6")!=-1||e.indexOf("version/5")!=-1){f=f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return f+b(window).scrollTop()}return c.top}return f},isChromeMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("android")!=-1;return c},isOperaMiniMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1||d.indexOf("opera mobi")!=-1;return c},isOperaMiniBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1;return c},isNewSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/5")!=-1);return c},isSafari4MobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/4")!=-1);return c},isWindowsPhone:function(){var d=navigator.userAgent.toLowerCase();var c=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1&&d.indexOf("touch")!=-1);return c},isSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return true}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return true}var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1||d.indexOf("mobile safari")!=-1;return c},isIPadSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1;return c},isMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("android")!=-1;return c},getTouches:function(c){if(c.originalEvent){if(c.originalEvent.touches&&c.originalEvent.touches.length){return c.originalEvent.touches}else{if(c.originalEvent.changedTouches&&c.originalEvent.changedTouches.length){return c.originalEvent.changedTouches}}}if(!c.touches){c.touches=new Array();c.touches[0]=c.originalEvent!=undefined?c.originalEvent:c;if(c.originalEvent!=undefined&&c.pageX){c.touches[0]=c}if(c.type=="mousemove"){c.touches[0]=c}}return c.touches},getTouchEventName:function(c){if(this.isWindowsPhone()){var d=navigator.userAgent.toLowerCase();if(d.indexOf("windows phone 7")!=-1){if(c.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(c.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(c.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}if(c.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(c.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(c.toLowerCase().indexOf("end")!=-1){return"pointerup"}}else{return c}},dispatchMouseEvent:function(c,g,f){if(this.simulatetouches){return}var d=document.createEvent("MouseEvent");d.initMouseEvent(c,true,true,g.view,1,g.screenX,g.screenY,g.clientX,g.clientY,false,false,false,false,0,null);if(f!=null){f.dispatchEvent(d)}},getRootNode:function(c){while(c.nodeType!==1){c=c.parentNode}return c},setTouchScroll:function(c,d){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[d]=c},touchScroll:function(B,M,Z,H,x,n){if(B==null){return}var G=this;var f=0;var r=0;var g=0;var i=0;var t=0;var j=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[H]=false;var k=false;var p=b(B);var R=["select","input","textarea"];var X=0;var J=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[H]=true;var H=H;var w=this.getTouchEventName("touchstart")+".touchScroll";var D=this.getTouchEventName("touchend")+".touchScroll";var ab=this.getTouchEventName("touchmove")+".touchScroll";var l,W,z,ah,V,Y,aj,Q,aa,d,F,ad,af,O,e,v,u,S,c,E,ag,o;Q=M;var aj=0;var aa=0;var h=0;var T=0;var ai=0;var Y=x.jqxScrollBar("max");var o=325;function A(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientY}else{if(am.originalEvent&&am.originalEvent.clientY!==undefined){return am.originalEvent.clientY}else{var al=G.getTouches(am);return al[0].clientY}}}function ae(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientX}else{if(am.originalEvent&&am.originalEvent.clientX!==undefined){return am.originalEvent.clientX}else{var al=G.getTouches(am);return al[0].clientX}}}var I=function(){var ap,am,aq,ao;ap=Date.now();am=ap-v;v=ap;aq=aa-e;var an=h-ah;e=aa;ah=h;F=true;ao=1000*aq/(1+am);var al=1000*an/(1+am);af=0.8*ao+0.2*af;O=0.8*al+0.2*O};var C=false;var X=function(am){if(!G.enableScrolling[H]){return true}if(b.inArray(am.target.tagName.toLowerCase(),R)!==-1){return}aa=n.jqxScrollBar("value");h=x.jqxScrollBar("value");var an=G.getTouches(am);var ao=an[0];if(an.length==1){G.dispatchMouseEvent("mousedown",ao,G.getRootNode(ao.target))}Y=x.jqxScrollBar("max");Q=n.jqxScrollBar("max");function al(ap){C=false;F=true;d=A(ap);ag=ae(ap);af=S=O=0;e=aa;ah=h;v=Date.now();clearInterval(u);u=setInterval(I,100);T=aa;ai=h;if(aa>0&&aaQ)?Q:(amQ)?"max":(amY)?Y:(amY)?"max":(am0.5||am<-0.5){ac(c+am);requestAnimationFrame(U)}else{ac(c)}}}function N(){var al,am;if(S){al=Date.now()-v;am=-S*Math.exp(-al/o);if(am>0.5||am<-0.5){m(E+am);requestAnimationFrame(N)}else{m(E)}}}var y=function(al){if(!G.enableScrolling[H]){return true}if(!G.scrolling[H]){return true}if(C){al.preventDefault();al.stopPropagation()}var aq=G.getTouches(al);if(aq.length>1){return true}var am=aq[0].pageY;var ao=aq[0].pageX;if(G.simulatetouches){if(aq[0]._pageY!=undefined){am=aq[0]._pageY;ao=aq[0]._pageX}}var au=am-r;var av=ao-t;J=am;var at=ao;g=au-f;j=av-i;k=true;f=au;i=av;var an=x!=null?x[0].style.visibility!="hidden":true;var ar=n!=null?n[0].style.visibility!="hidden":true;function ap(ay){var aA,az,ax;if(F){aA=A(ay);ax=ae(ay);az=d-aA;V=ag-ax;var aw="value";if(az>2||az<-2){d=aA;aw=ac(aa+az,ay);I();if(aw=="min"&&T===0){return true}if(aw=="max"&&T===Q){return true}if(!ar){return true}ay.preventDefault();ay.stopPropagation();C=true;return false}else{if(V>2||V<-2){ag=ax;aw=m(h+V,ay);I();if(aw=="min"&&ai===0){return true}if(aw=="max"&&ai===Y){return true}if(!an){return true}C=true;ay.preventDefault();ay.stopPropagation();return false}}ay.preventDefault()}}if(an||ar){if((an)||(ar)){ap(al)}}};if(p.on){p.on(ab,y)}else{p.bind(ab,y)}var s=function(am){if(!G.enableScrolling[H]){return true}var an=G.getTouches(am)[0];if(!G.scrolling[H]){return true}F=false;clearInterval(u);if(af>10||af<-10){S=0.8*af;c=Math.round(aa+S);v=Date.now();requestAnimationFrame(U)}else{if(O>10||O<-10){S=0.8*O;E=Math.round(h+S);v=Date.now();requestAnimationFrame(N)}else{}}G.scrolling[H]=false;if(k){G.dispatchMouseEvent("mouseup",an,am.target)}else{var an=G.getTouches(am)[0],al=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,al);G.dispatchMouseEvent("click",an,al);return true}};if(this.simulatetouches){var q=b(window).on!=undefined||b(window).bind;var P=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};b(window).on!=undefined?b(document).on("mouseup.touchScroll",P):b(document).bind("mouseup.touchScroll",P);if(window.frameElement){if(window.top!=null){var L=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};if(window.top.document){b(window.top.document).on?b(window.top.document).on("mouseup",L):b(window.top.document).bind("mouseup",L)}}}var ak=b(document).on!=undefined||b(document).bind;var K=function(al){if(!G.scrolling[H]){return true}G.scrolling[H]=false;var an=G.getTouches(al)[0],am=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,am);G.dispatchMouseEvent("click",an,am)};b(document).on!=undefined?b(document).on("touchend",K):b(document).bind("touchend",K)}if(p.on){p.on("dragstart",function(al){al.preventDefault()});p.on("selectstart",function(al){al.preventDefault()})}p.on?p.on(D+" touchcancel.touchScroll",s):p.bind(D+" touchcancel.touchScroll",s)}});b.jqx.cookie=b.jqx.cookie||{};b.extend(b.jqx.cookie,{cookie:function(f,g,d){if(arguments.length>1&&String(g)!=="[object Object]"){d=b.extend({},d);if(g===null||g===undefined){d.expires=-1}if(typeof d.expires==="number"){var i=d.expires,e=d.expires=new Date();e.setDate(e.getDate()+i)}g=String(g);return(document.cookie=[encodeURIComponent(f),"=",d.raw?g:encodeURIComponent(g),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join(""))}d=g||{};var c,h=d.raw?function(j){return j}:decodeURIComponent;return(c=new RegExp("(?:^|; )"+encodeURIComponent(f)+"=([^;]*)").exec(document.cookie))?h(c[1]):null}});b.jqx.string=b.jqx.string||{};b.extend(b.jqx.string,{replace:function(g,e,f){if(e===f){return this}var c=g;var d=c.indexOf(e);while(d!=-1){c=c.replace(e,f);d=c.indexOf(e)}return c},contains:function(c,d){if(c==null||d==null){return false}return c.indexOf(d)!=-1},containsIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toString().toUpperCase().indexOf(d.toString().toUpperCase())!=-1},equals:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.slice(0,d.length)==d}return false},equalsIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.toUpperCase().slice(0,d.length)==d.toUpperCase()}return false},startsWith:function(c,d){if(c==null||d==null){return false}return c.slice(0,d.length)==d},startsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toUpperCase().slice(0,d.length)==d.toUpperCase()},normalize:function(c){if(c.charCodeAt(c.length-1)==65279){c=c.substring(0,c.length-1)}return c},endsWith:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.slice(-d.length)==d},endsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.toUpperCase().slice(-d.length)==d.toUpperCase()}});b.extend(b.easing,{easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e}return i/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){if(b.event&&b.event.special){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}})}if(b.fn.extend){b.fn.extend({ischildof:function(g){if(!b(this).parents){var c=g.element.contains(this.element);return c}var e=b(this).parents().get();for(var d=0;d=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}if(this[0]&&this[0].tagName.toLowerCase().indexOf("angular")>=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal&&b.fn.modal.Constructor){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(n){var e,j,i={top:0,left:0},f=this[0],l=f&&f.ownerDocument;if(!l){return}e=l.documentElement;if(!b.contains(e,f)){return i}if(typeof f.getBoundingClientRect!==undefined){i=f.getBoundingClientRect()}var d=function(o){return b.isWindow(o)?o:o.nodeType===9?o.defaultView||o.parentWindow:false};j=d(l);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var m=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(m){h=2}if(true==n){if(document.body.style.position!="static"&&document.body.style.position!=""){var k=b(document.body).coord();h=-k.left;c=-k.top}}return{top:c+i.top+(j.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+i.left+(j.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};b.jqx.ripplers=[];b.jqx.ripple=function(f,e,o){if(!e){e=f}var h=b(f);var j=false;h.append("");var p=h.find(".ink");var c=false;for(var g=0;g")}var r=d.find(".ink");r.removeClass("animate");if(!r.height()&&!r.width()){var s=Math.max(d.outerWidth(),d.outerHeight());r.css({height:s,width:s})}if(o==="checkbox"||o==="radiobutton"){if(o==="checkbox"){if(e.jqxCheckBox("disabled")){return}}if(o==="radiobutton"){if(e.jqxRadioButton("disabled")){return}}var q=d.width()/2-r.width()/2;var t=d.height()/2-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate");r.on("animationend",function(){if(b.jqx.ripple.mouseCaptured){r.removeClass("animate");r.addClass("active");f.addClass("active")}});return}var q=i.pageX-d.offset().left-r.width()/2;var t=i.pageY-d.offset().top-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate")})})}})(jqxBaseFramework); +(function(cn,bM){var cs,bF,cg,bv,bR,b5,bI,bL,bH,ce,bE=true,bZ="undefined",cu=("sizcache"+Math.random()).replace(".",""),bz=String,bD=cn.document,bG=bD.documentElement,bW=0,bK=0,b9=[].pop,cr=[].push,bQ=[].slice,bT=[].indexOf||function(cE){var cD=0,cC=this.length;for(;cDcg.cacheLength){delete cC[cD.shift()]}return(cC[cE+" "]=cF)},cC)},cp=cA(),cq=cA(),bS=cA(),b3="[\\x20\\t\\r\\n\\f]",bP="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",bN=bP.replace("w","w#"),cz="([*^$|!~]?=)",ck="\\["+b3+"*("+bP+")"+b3+"*(?:"+cz+b3+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+bN+")|)|)"+b3+"*\\]",cB=":("+bP+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+ck+")|[^:]|\\\\.)*|.*))\\)|)",b4=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+b3+"*((?:-\\d)?\\d*)"+b3+"*\\)|)(?=[^-]|$)",co=new RegExp("^"+b3+"+|((?:^|[^\\\\])(?:\\\\.)*)"+b3+"+$","g"),bA=new RegExp("^"+b3+"*,"+b3+"*"),cc=new RegExp("^"+b3+"*([\\x20\\t\\r\\n\\f>+~])"+b3+"*"),ch=new RegExp(cB),cj=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,b8=/^:not/,cm=/[\x20\t\r\n\f]*[+~]/,cv=/:not\($/,bX=/h\d/i,ci=/input|select|textarea|button/i,bY=/\\(?!\\)/g,cb={ID:new RegExp("^#("+bP+")"),CLASS:new RegExp("^\\.("+bP+")"),NAME:new RegExp("^\\[name=['\"]?("+bP+")['\"]?\\]"),TAG:new RegExp("^("+bP.replace("w","w*")+")"),ATTR:new RegExp("^"+ck),PSEUDO:new RegExp("^"+cB),POS:new RegExp(b4,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+b3+"*(even|odd|(([+-]|)(\\d*)n|)"+b3+"*(?:([+-]|)"+b3+"*(\\d+)|))"+b3+"*\\)|)","i"),needsContext:new RegExp("^"+b3+"*[>+~]|"+b4,"i")},cf=function(cC){var cE=bD.createElement("div");try{return cC(cE)}catch(cD){return false}finally{cE=null}},bC=cf(function(cC){cC.appendChild(bD.createComment(""));return !cC.getElementsByTagName("*").length}),b7=cf(function(cC){cC.innerHTML="";return cC.firstChild&&typeof cC.firstChild.getAttribute!==bZ&&cC.firstChild.getAttribute("href")==="#"}),bV=cf(function(cD){cD.innerHTML="";var cC=typeof cD.lastChild.getAttribute("multiple");return cC!=="boolean"&&cC!=="string"}),b6=cf(function(cC){cC.innerHTML="";if(!cC.getElementsByClassName||!cC.getElementsByClassName("e").length){return false}cC.lastChild.className="e";return cC.getElementsByClassName("e").length===2}),bu=cf(function(cD){cD.id=cu+0;cD.innerHTML="
    ";bG.insertBefore(cD,bG.firstChild);var cC=bD.getElementsByName&&bD.getElementsByName(cu).length===2+bD.getElementsByName(cu+0).length;bF=!bD.getElementById(cu);bG.removeChild(cD);return cC});try{bQ.call(bG.childNodes,0)[0].nodeType}catch(cy){bQ=function(cD){var cE,cC=[];for(;(cE=this[cD]);cD++){cC.push(cE)}return cC}}function cl(cF,cC,cH,cK){cH=cH||[];cC=cC||bD;var cI,cD,cJ,cE,cG=cC.nodeType;if(!cF||typeof cF!=="string"){return cH}if(cG!==1&&cG!==9){return[]}cJ=bR(cC);if(!cJ&&!cK){if((cI=cj.exec(cF))){if((cE=cI[1])){if(cG===9){cD=cC.getElementById(cE);if(cD&&cD.parentNode){if(cD.id===cE){cH.push(cD);return cH}}else{return cH}}else{if(cC.ownerDocument&&(cD=cC.ownerDocument.getElementById(cE))&&b5(cC,cD)&&cD.id===cE){cH.push(cD);return cH}}}else{if(cI[2]){cr.apply(cH,bQ.call(cC.getElementsByTagName(cF),0));return cH}else{if((cE=cI[3])&&b6&&cC.getElementsByClassName){cr.apply(cH,bQ.call(cC.getElementsByClassName(cE),0));return cH}}}}}return ct(cF.replace(co,"$1"),cC,cH,cK,cJ)}cl.matches=function(cD,cC){return cl(cD,null,null,cC)};cl.matchesSelector=function(cC,cD){return cl(cD,null,null,[cC]).length>0};function cd(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return cD==="input"&&cE.type===cC}}function by(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return(cD==="input"||cD==="button")&&cE.type===cC}}function ca(cC){return cw(function(cD){cD=+cD;return cw(function(cE,cI){var cG,cF=cC([],cE.length,cD),cH=cF.length;while(cH--){if(cE[(cG=cF[cH])]){cE[cG]=!(cI[cG]=cE[cG])}}})})}bv=cl.getText=function(cG){var cF,cD="",cE=0,cC=cG.nodeType;if(cC){if(cC===1||cC===9||cC===11){if(typeof cG.textContent==="string"){return cG.textContent}else{for(cG=cG.firstChild;cG;cG=cG.nextSibling){cD+=bv(cG)}}}else{if(cC===3||cC===4){return cG.nodeValue}}}else{for(;(cF=cG[cE]);cE++){cD+=bv(cF)}}return cD};bR=cl.isXML=function(cC){var cD=cC&&(cC.ownerDocument||cC).documentElement;return cD?cD.nodeName!=="HTML":false};b5=cl.contains=bG.contains?function(cD,cC){var cF=cD.nodeType===9?cD.documentElement:cD,cE=cC&&cC.parentNode;return cD===cE||!!(cE&&cE.nodeType===1&&cF.contains&&cF.contains(cE))}:bG.compareDocumentPosition?function(cD,cC){return cC&&!!(cD.compareDocumentPosition(cC)&16)}:function(cD,cC){while((cC=cC.parentNode)){if(cC===cD){return true}}return false};cl.attr=function(cE,cD){var cF,cC=bR(cE);if(!cC){cD=cD.toLowerCase()}if((cF=cg.attrHandle[cD])){return cF(cE)}if(cC||bV){return cE.getAttribute(cD)}cF=cE.getAttributeNode(cD);return cF?typeof cE[cD]==="boolean"?cE[cD]?cD:null:cF.specified?cF.value:null:null};cg=cl.selectors={cacheLength:50,createPseudo:cw,match:cb,attrHandle:b7?{}:{href:function(cC){return cC.getAttribute("href",2)},type:function(cC){return cC.getAttribute("type")}},find:{ID:bF?function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC&&cC.parentNode?[cC]:[]}}:function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC?cC.id===cF||typeof cC.getAttributeNode!==bZ&&cC.getAttributeNode("id").value===cF?[cC]:bM:[]}},TAG:bC?function(cC,cD){if(typeof cD.getElementsByTagName!==bZ){return cD.getElementsByTagName(cC)}}:function(cC,cG){var cF=cG.getElementsByTagName(cC);if(cC==="*"){var cH,cE=[],cD=0;for(;(cH=cF[cD]);cD++){if(cH.nodeType===1){cE.push(cH)}}return cE}return cF},NAME:bu&&function(cC,cD){if(typeof cD.getElementsByName!==bZ){return cD.getElementsByName(name)}},CLASS:b6&&function(cE,cD,cC){if(typeof cD.getElementsByClassName!==bZ&&!cC){return cD.getElementsByClassName(cE)}}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(cC){cC[1]=cC[1].replace(bY,"");cC[3]=(cC[4]||cC[5]||"").replace(bY,"");if(cC[2]==="~="){cC[3]=" "+cC[3]+" "}return cC.slice(0,4)},CHILD:function(cC){cC[1]=cC[1].toLowerCase();if(cC[1]==="nth"){if(!cC[2]){cl.error(cC[0])}cC[3]=+(cC[3]?cC[4]+(cC[5]||1):2*(cC[2]==="even"||cC[2]==="odd"));cC[4]=+((cC[6]+cC[7])||cC[2]==="odd")}else{if(cC[2]){cl.error(cC[0])}}return cC},PSEUDO:function(cD){var cE,cC;if(cb.CHILD.test(cD[0])){return null}if(cD[3]){cD[2]=cD[3]}else{if((cE=cD[4])){if(ch.test(cE)&&(cC=bw(cE,true))&&(cC=cE.indexOf(")",cE.length-cC)-cE.length)){cE=cE.slice(0,cC);cD[0]=cD[0].slice(0,cC)}cD[2]=cE}}return cD.slice(0,3)}},filter:{ID:bF?function(cC){cC=cC.replace(bY,"");return function(cD){return cD.getAttribute("id")===cC}}:function(cC){cC=cC.replace(bY,"");return function(cE){var cD=typeof cE.getAttributeNode!==bZ&&cE.getAttributeNode("id");return cD&&cD.value===cC}},TAG:function(cC){if(cC==="*"){return function(){return true}}cC=cC.replace(bY,"").toLowerCase();return function(cD){return cD.nodeName&&cD.nodeName.toLowerCase()===cC}},CLASS:function(cC){var cD=cp[cu][cC+" "];return cD||(cD=new RegExp("(^|"+b3+")"+cC+"("+b3+"|$)"))&&cp(cC,function(cE){return cD.test(cE.className||(typeof cE.getAttribute!==bZ&&cE.getAttribute("class"))||"")})},ATTR:function(cE,cD,cC){return function(cH,cG){var cF=cl.attr(cH,cE);if(cF==null){return cD==="!="}if(!cD){return true}cF+="";return cD==="="?cF===cC:cD==="!="?cF!==cC:cD==="^="?cC&&cF.indexOf(cC)===0:cD==="*="?cC&&cF.indexOf(cC)>-1:cD==="$="?cC&&cF.substr(cF.length-cC.length)===cC:cD==="~="?(" "+cF+" ").indexOf(cC)>-1:cD==="|="?cF===cC||cF.substr(0,cC.length+1)===cC+"-":false}},CHILD:function(cC,cE,cF,cD){if(cC==="nth"){return function(cI){var cH,cJ,cG=cI.parentNode;if(cF===1&&cD===0){return true}if(cG){cJ=0;for(cH=cG.firstChild;cH;cH=cH.nextSibling){if(cH.nodeType===1){cJ++;if(cI===cH){break}}}}cJ-=cD;return cJ===cF||(cJ%cF===0&&cJ/cF>=0)}}return function(cH){var cG=cH;switch(cC){case"only":case"first":while((cG=cG.previousSibling)){if(cG.nodeType===1){return false}}if(cC==="first"){return true}cG=cH;case"last":while((cG=cG.nextSibling)){if(cG.nodeType===1){return false}}return true}}},PSEUDO:function(cF,cE){var cC,cD=cg.pseudos[cF]||cg.setFilters[cF.toLowerCase()]||cl.error("unsupported pseudo: "+cF);if(cD[cu]){return cD(cE)}if(cD.length>1){cC=[cF,cF,"",cE];return cg.setFilters.hasOwnProperty(cF.toLowerCase())?cw(function(cI,cK){var cH,cG=cD(cI,cE),cJ=cG.length;while(cJ--){cH=bT.call(cI,cG[cJ]);cI[cH]=!(cK[cH]=cG[cJ])}}):function(cG){return cD(cG,0,cC)}}return cD}},pseudos:{not:cw(function(cC){var cD=[],cE=[],cF=bI(cC.replace(co,"$1"));return cF[cu]?cw(function(cH,cM,cK,cI){var cL,cG=cF(cH,null,cI,[]),cJ=cH.length;while(cJ--){if((cL=cG[cJ])){cH[cJ]=!(cM[cJ]=cL)}}}):function(cI,cH,cG){cD[0]=cI;cF(cD,null,cG,cE);return !cE.pop()}}),has:cw(function(cC){return function(cD){return cl(cC,cD).length>0}}),contains:cw(function(cC){return function(cD){return(cD.textContent||cD.innerText||bv(cD)).indexOf(cC)>-1}}),enabled:function(cC){return cC.disabled===false},disabled:function(cC){return cC.disabled===true},checked:function(cC){var cD=cC.nodeName.toLowerCase();return(cD==="input"&&!!cC.checked)||(cD==="option"&&!!cC.selected)},selected:function(cC){if(cC.parentNode){cC.parentNode.selectedIndex}return cC.selected===true},parent:function(cC){return !cg.pseudos.empty(cC)},empty:function(cD){var cC;cD=cD.firstChild;while(cD){if(cD.nodeName>"@"||(cC=cD.nodeType)===3||cC===4){return false}cD=cD.nextSibling}return true},header:function(cC){return bX.test(cC.nodeName)},text:function(cE){var cD,cC;return cE.nodeName.toLowerCase()==="input"&&(cD=cE.type)==="text"&&((cC=cE.getAttribute("type"))==null||cC.toLowerCase()===cD)},radio:cd("radio"),checkbox:cd("checkbox"),file:cd("file"),password:cd("password"),image:cd("image"),submit:by("submit"),reset:by("reset"),button:function(cD){var cC=cD.nodeName.toLowerCase();return cC==="input"&&cD.type==="button"||cC==="button"},input:function(cC){return ci.test(cC.nodeName)},focus:function(cC){var cD=cC.ownerDocument;return cC===cD.activeElement&&(!cD.hasFocus||cD.hasFocus())&&!!(cC.type||cC.href||~cC.tabIndex)},active:function(cC){return cC===cC.ownerDocument.activeElement},first:ca(function(){return[0]}),last:ca(function(cC,cD){return[cD-1]}),eq:ca(function(cC,cE,cD){return[cD<0?cD+cE:cD]}),even:ca(function(cC,cE){for(var cD=0;cD=0;){cC.push(cD)}return cC}),gt:ca(function(cC,cF,cE){for(var cD=cE<0?cE+cF:cE;++cD1?function(cG,cF,cD){var cE=cC.length;while(cE--){if(!cC[cE](cG,cF,cD)){return false}}return true}:cC[0]}function b0(cC,cD,cE,cF,cI){var cG,cL=[],cH=0,cJ=cC.length,cK=cD!=null;for(;cH-1){cS[cU]=!(cP[cU]=cM)}}}}else{cO=b0(cO===cP?cO.splice(cJ,cO.length):cO);if(cH){cH(null,cP,cO,cR)}else{cr.apply(cP,cO)}}})}function b2(cI){var cD,cG,cE,cH=cI.length,cL=cg.relative[cI[0].type],cM=cL||cg.relative[" "],cF=cL?1:0,cJ=b1(function(cN){return cN===cD},cM,true),cK=b1(function(cN){return bT.call(cD,cN)>-1},cM,true),cC=[function(cP,cO,cN){return(!cL&&(cN||cO!==ce))||((cD=cO).nodeType?cJ(cP,cO,cN):cK(cP,cO,cN))}];for(;cF1&&bJ(cC),cF>1&&cI.slice(0,cF-1).join("").replace(co,"$1"),cG,cF0,cG=cF.length>0,cD=function(cQ,cK,cP,cO,cW){var cL,cM,cR,cV=[],cU=0,cN="0",cH=cQ&&[],cS=cW!=null,cT=ce,cJ=cQ||cG&&cg.find.TAG("*",cW&&cK.parentNode||cK),cI=(bW+=cT==null?1:Math.E);if(cS){ce=cK!==bD&&cK;cs=cD.el}for(;(cL=cJ[cN])!=null;cN++){if(cG&&cL){for(cM=0;(cR=cF[cM]);cM++){if(cR(cL,cK,cP)){cO.push(cL);break}}if(cS){bW=cI;cs=++cD.el}}if(cC){if((cL=!cR&&cL)){cU--}if(cQ){cH.push(cL)}}}cU+=cN;if(cC&&cN!==cU){for(cM=0;(cR=cE[cM]);cM++){cR(cH,cV,cK,cP)}if(cQ){if(cU>0){while(cN--){if(!(cH[cN]||cV[cN])){cV[cN]=b9.call(cO)}}}cV=b0(cV)}cr.apply(cO,cV);if(cS&&!cQ&&cV.length>0&&(cU+cE.length)>1){cl.uniqueSort(cO)}}if(cS){bW=cI;ce=cT}return cH};cD.el=0;return cC?cw(cD):cD}bI=cl.compile=function(cC,cH){var cE,cD=[],cG=[],cF=bS[cu][cC+" "];if(!cF){if(!cH){cH=bw(cC)}cE=cH.length;while(cE--){cF=b2(cH[cE]);if(cF[cu]){cD.push(cF)}else{cG.push(cF)}}cF=bS(cC,bB(cG,cD))}return cF};function bU(cD,cG,cF){var cE=0,cC=cG.length;for(;cE2&&(cD=cN[0]).type==="ID"&&cC.nodeType===9&&!cJ&&cg.relative[cN[1].type]){cC=cg.find.ID(cD.matches[0].replace(bY,""),cC,cJ)[0];if(!cC){return cG}cE=cE.slice(cN.shift().length)}for(cH=cb.POS.test(cE)?-1:cN.length-1;cH>=0;cH--){cD=cN[cH];if(cg.relative[(cM=cD.type)]){break}if((cL=cg.find[cM])){if((cK=cL(cD.matches[0].replace(bY,""),cm.test(cN[0].type)&&cC.parentNode||cC,cJ))){cN.splice(cH,1);cE=cK.length&&cN.join("");if(!cE){cr.apply(cG,bQ.call(cK,0));return cG}break}}}}}bI(cE,cI)(cK,cC,cJ,cG,cm.test(cE));return cG}if(bD.querySelectorAll){(function(){var cH,cI=ct,cG=/'|\\/g,cE=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cD=[":focus"],cC=[":active"],cF=bG.matchesSelector||bG.mozMatchesSelector||bG.webkitMatchesSelector||bG.oMatchesSelector||bG.msMatchesSelector;cf(function(cJ){cJ.innerHTML="";if(!cJ.querySelectorAll("[selected]").length){cD.push("\\["+b3+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!cJ.querySelectorAll(":checked").length){cD.push(":checked")}});cf(function(cJ){cJ.innerHTML="

    ";if(cJ.querySelectorAll("[test^='']").length){cD.push("[*^$]="+b3+"*(?:\"\"|'')")}cJ.innerHTML="";if(!cJ.querySelectorAll(":enabled").length){cD.push(":enabled",":disabled")}});cD=new RegExp(cD.join("|"));ct=function(cP,cK,cR,cU,cT){if(!cU&&!cT&&!cD.test(cP)){var cN,cS,cM=true,cJ=cu,cL=cK,cQ=cK.nodeType===9&&cP;if(cK.nodeType===1&&cK.nodeName.toLowerCase()!=="object"){cN=bw(cP);if((cM=cK.getAttribute("id"))){cJ=cM.replace(cG,"\\$&")}else{cK.setAttribute("id",cJ)}cJ="[id='"+cJ+"'] ";cS=cN.length;while(cS--){cN[cS]=cJ+cN[cS].join("")}cL=cm.test(cP)&&cK.parentNode||cK;cQ=cN.join(",")}if(cQ){try{cr.apply(cR,bQ.call(cL.querySelectorAll(cQ),0));return cR}catch(cO){}finally{if(!cM){cK.removeAttribute("id")}}}}return cI(cP,cK,cR,cU,cT)};if(cF){cf(function(cK){cH=cF.call(cK,"div");try{cF.call(cK,"[test!='']:sizzle");cC.push("!=",cB)}catch(cJ){}});cC=new RegExp(cC.join("|"));cl.matchesSelector=function(cK,cM){cM=cM.replace(cE,"='$1']");if(!bR(cK)&&!cC.test(cM)&&!cD.test(cM)){try{var cJ=cF.call(cK,cM);if(cJ||cH||cK.document&&cK.document.nodeType!==11){return cJ}}catch(cL){}}return cl(cM,null,null,[cK]).length>0}}})()}cg.pseudos.nth=cg.pseudos.eq;function bO(){}cg.filters=bO.prototype=cg.pseudos;cg.setFilters=new bO();cl.attr=C.attr;C.find=cl;C.expr=cl.selectors;C.expr[":"]=C.expr.pseudos;C.unique=cl.uniqueSort;C.text=cl.getText;C.isXMLDoc=cl.isXML;C.contains=cl.contains})(bd);var U=/Until$/,ag=/^(?:parents|prev(?:Until|All))/,bq=/^.[^:#\[\.,]*$/,aQ=C.expr.match.needsContext,ao={children:true,contents:true,next:true,prev:true};C.fn.extend({find:function(bu){var by,bv,bA,bB,bz,bx,bw=this;if(typeof bu!=="string"){return C(bu).filter(function(){for(by=0,bv=bw.length;by0){for(bB=bA;bB=0:C.filter(bu,this).length>0:this.filter(bu).length>0)},closest:function(by,bx){var bz,bw=0,bu=this.length,bv=[],bA=aQ.test(by)||typeof by!=="string"?C(by,bx||this.context):0;for(;bw-1:C.find.matchesSelector(bz,by)){bv.push(bz);break}bz=bz.parentNode}}bv=bv.length>1?C.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(bu){if(!bu){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof bu==="string"){return C.inArray(this[0],C(bu))}return C.inArray(bu.jqx?bu[0]:bu,this)},add:function(bu,bv){var bx=typeof bu==="string"?C(bu,bv):C.makeArray(bu&&bu.nodeType?[bu]:bu),bw=C.merge(this.get(),bx);return this.pushStack(x(bx[0])||x(bw[0])?bw:C.unique(bw))},addBack:function(bu){return this.add(bu==null?this.prevObject:this.prevObject.filter(bu))}});C.fn.andSelf=C.fn.addBack;function x(bu){return !bu||!bu.parentNode||bu.parentNode.nodeType===11}function aB(bv,bu){do{bv=bv[bu]}while(bv&&bv.nodeType!==1);return bv}C.each({parent:function(bv){var bu=bv.parentNode;return bu&&bu.nodeType!==11?bu:null},parents:function(bu){return C.dir(bu,"parentNode")},parentsUntil:function(bv,bu,bw){return C.dir(bv,"parentNode",bw)},next:function(bu){return aB(bu,"nextSibling")},prev:function(bu){return aB(bu,"previousSibling")},nextAll:function(bu){return C.dir(bu,"nextSibling")},prevAll:function(bu){return C.dir(bu,"previousSibling")},nextUntil:function(bv,bu,bw){return C.dir(bv,"nextSibling",bw)},prevUntil:function(bv,bu,bw){return C.dir(bv,"previousSibling",bw)},siblings:function(bu){return C.sibling((bu.parentNode||{}).firstChild,bu)},children:function(bu){return C.sibling(bu.firstChild)},contents:function(bu){return C.nodeName(bu,"iframe")?bu.contentDocument||bu.contentWindow.document:C.merge([],bu.childNodes)}},function(bu,bv){C.fn[bu]=function(by,bw){var bx=C.map(this,bv,by);if(!U.test(bu)){bw=by}if(bw&&typeof bw==="string"){bx=C.filter(bw,bx)}bx=this.length>1&&!ao[bu]?C.unique(bx):bx;if(this.length>1&&ag.test(bu)){bx=bx.reverse()}return this.pushStack(bx,bu,aD.call(arguments).join(","))}});C.extend({filter:function(bw,bu,bv){if(bv){bw=":not("+bw+")"}return bu.length===1?C.find.matchesSelector(bu[0],bw)?[bu[0]]:[]:C.find.matches(bw,bu)},dir:function(bw,bv,by){var bu=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===G||bx.nodeType!==1||!C(bx).is(by))){if(bx.nodeType===1){bu.push(bx)}bx=bx[bv]}return bu},sibling:function(bw,bv){var bu=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){bu.push(bw)}}return bu}});function az(bx,bw,bu){bw=bw||0;if(C.isFunction(bw)){return C.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===bu})}else{if(bw.nodeType){return C.grep(bx,function(bz,by){return(bz===bw)===bu})}else{if(typeof bw==="string"){var bv=C.grep(bx,function(by){return by.nodeType===1});if(bq.test(bw)){return C.filter(bw,bv,!bu)}else{bw=C.filter(bw,bv)}}}}return C.grep(bx,function(bz,by){return(C.inArray(bz,bw)>=0)===bu})}function a(bu){var bw=aJ.split("|"),bv=bu.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aJ="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aa=/ JQXLite\d+="(?:null|\d+)"/g,ah=/^\s+/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,c=/<([\w:]+)/,v=/]","i"),R=/^(?:checkbox|radio)$/,o=/checked\s*(?:[^=]|=\s*.checked.)/i,bp=/\/(java|ecma)script/i,aG=/^\s*\s*$/g,am={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},T=a(ak),bg=T.appendChild(ak.createElement("div"));am.optgroup=am.option;am.tbody=am.tfoot=am.colgroup=am.caption=am.thead;am.th=am.td;if(!C.support.htmlSerialize){am._default=[1,"X
    ","
    "]}C.fn.extend({text:function(bu){return C.access(this,function(bv){return bv===G?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ak).createTextNode(bv))},null,bu,arguments.length)},wrapAll:function(bu){if(C.isFunction(bu)){return this.each(function(bw){C(this).wrapAll(bu.call(this,bw))})}if(this[0]){var bv=C(bu,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(bu){if(C.isFunction(bu)){return this.each(function(bv){C(this).wrapInner(bu.call(this,bv))})}return this.each(function(){var bv=C(this),bw=bv.contents();if(bw.length){bw.wrapAll(bu)}else{bv.append(bu)}})},wrap:function(bu){var bv=C.isFunction(bu);return this.each(function(bw){C(this).wrapAll(bv?bu.call(this,bw):bu)})},unwrap:function(){return this.parent().each(function(){if(!C.nodeName(this,"body")){C(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.appendChild(bu)}})},prepend:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.insertBefore(bu,this.firstChild)}})},before:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(bu,this),"before",this.selector)}},after:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(this,bu),"after",this.selector)}},remove:function(bu,bx){var bw,bv=0;for(;(bw=this[bv])!=null;bv++){if(!bu||C.filter(bu,[bw]).length){if(!bx&&bw.nodeType===1){C.cleanData(bw.getElementsByTagName("*"));C.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){var bv,bu=0;for(;(bv=this[bu])!=null;bu++){if(bv.nodeType===1){C.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,bu){bv=bv==null?false:bv;bu=bu==null?bv:bu;return this.map(function(){return C.clone(this,bv,bu)})},html:function(bu){return C.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===G){return bx.nodeType===1?bx.innerHTML.replace(aa,""):G}if(typeof by==="string"&&!W.test(by)&&(C.support.htmlSerialize||!ac.test(by))&&(C.support.leadingWhitespace||!ah.test(by))&&!am[(c.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(L,"<$1>");try{for(;bw1&&typeof bB==="string"&&o.test(bB)){return this.each(function(){C(this).domManip(bA,bE,bD)})}if(C.isFunction(bB)){return this.each(function(bG){var bF=C(this);bA[0]=bB.call(this,bG,bE?bF.html():G);bF.domManip(bA,bE,bD)})}if(this[0]){bw=C.buildFragment(bA,this,bv);bz=bw.fragment;by=bz.firstChild;if(bz.childNodes.length===1){bz=by}if(by){bE=bE&&C.nodeName(by,"tr");for(bC=bw.cacheable||bu-1;bx0?this.clone(true):this).get();C(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,bu,bC.selector)}}});function bk(bu){if(typeof bu.getElementsByTagName!=="undefined"){return bu.getElementsByTagName("*")}else{if(typeof bu.querySelectorAll!=="undefined"){return bu.querySelectorAll("*")}else{return[]}}}function al(bu){if(R.test(bu.type)){bu.defaultChecked=bu.checked}}C.extend({clone:function(by,bA,bw){var bu,bv,bx,bz;if(C.support.html5Clone||C.isXMLDoc(by)||!ac.test("<"+by.nodeName+">")){bz=by.cloneNode(true)}else{bg.innerHTML=by.outerHTML;bg.removeChild(bz=bg.firstChild)}if((!C.support.noCloneEvent||!C.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!C.isXMLDoc(by)){ab(by,bz);bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){if(bv[bx]){ab(bu[bx],bv[bx])}}}if(bA){r(by,bz);if(bw){bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){r(bu[bx],bv[bx])}}}bu=bv=null;return bz},clean:function(bH,bw,bu,bx){var bE,bD,bG,bL,bA,bK,bB,by,bv,bF,bJ,bC,bz=bw===ak&&T,bI=[];if(!bw||typeof bw.createDocumentFragment==="undefined"){bw=ak}for(bE=0;(bG=bH[bE])!=null;bE++){if(typeof bG==="number"){bG+=""}if(!bG){continue}if(typeof bG==="string"){if(!P.test(bG)){bG=bw.createTextNode(bG)}else{bz=bz||a(bw);bB=bw.createElement("div");bz.appendChild(bB);bG=bG.replace(L,"<$1>");bL=(c.exec(bG)||["",""])[1].toLowerCase();bA=am[bL]||am._default;bK=bA[0];bB.innerHTML=bA[1]+bG+bA[2];while(bK--){bB=bB.lastChild}if(!C.support.tbody){by=v.test(bG);bv=bL==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bA[1]===""&&!by?bB.childNodes:[];for(bD=bv.length-1;bD>=0;--bD){if(C.nodeName(bv[bD],"tbody")&&!bv[bD].childNodes.length){bv[bD].parentNode.removeChild(bv[bD])}}}if(!C.support.leadingWhitespace&&ah.test(bG)){bB.insertBefore(bw.createTextNode(ah.exec(bG)[0]),bB.firstChild)}bG=bB.childNodes;bB.parentNode.removeChild(bB)}}if(bG.nodeType){bI.push(bG)}else{C.merge(bI,bG)}}if(bB){bG=bB=bz=null}if(!C.support.appendChecked){for(bE=0;(bG=bI[bE])!=null;bE++){if(C.nodeName(bG,"input")){al(bG)}else{if(typeof bG.getElementsByTagName!=="undefined"){C.grep(bG.getElementsByTagName("input"),al)}}}}if(bu){bJ=function(bM){if(!bM.type||bp.test(bM.type)){return bx?bx.push(bM.parentNode?bM.parentNode.removeChild(bM):bM):bu.appendChild(bM)}};for(bE=0;(bG=bI[bE])!=null;bE++){if(!(C.nodeName(bG,"script")&&bJ(bG))){bu.appendChild(bG);if(typeof bG.getElementsByTagName!=="undefined"){bC=C.grep(C.merge([],bG.getElementsByTagName("script")),bJ);bI.splice.apply(bI,[bE+1,0].concat(bC));bE+=bC.length}}}}return bI},cleanData:function(bv,bD){var by,bw,bx,bC,bz=0,bE=C.expando,bu=C.cache,bA=C.support.deleteExpando,bB=C.event.special;for(;(bx=bv[bz])!=null;bz++){if(bD||C.acceptData(bx)){bw=bx[bE];by=bw&&bu[bw];if(by){if(by.events){for(bC in by.events){if(bB[bC]){C.event.remove(bx,bC)}else{C.removeEvent(bx,bC,by.handle)}}}if(bu[bw]){delete bu[bw];if(bA){delete bx[bE]}else{if(bx.removeAttribute){bx.removeAttribute(bE)}else{bx[bE]=null}}C.deletedIds.push(bw)}}}}}});(function(){var bu,bv;C.uaMatch=function(bx){bx=bx.toLowerCase();var bw=/(chrome)[ \/]([\w.]+)/.exec(bx)||/(webkit)[ \/]([\w.]+)/.exec(bx)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(bx)||/(msie) ([\w.]+)/.exec(bx)||bx.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(bx)||[];return{browser:bw[1]||"",version:bw[2]||"0"}};bu=C.uaMatch(bt.userAgent);bv={};if(bu.browser){bv[bu.browser]=true;bv.version=bu.version}if(bv.chrome){bv.webkit=true}else{if(bv.webkit){bv.safari=true}}C.browser=bv;C.sub=function(){function bx(bz,bA){return new bx.fn.init(bz,bA)}C.extend(true,bx,this);bx.superclass=this;bx.fn=bx.prototype=this();bx.fn.constructor=bx;bx.sub=this.sub;bx.fn.init=function by(bz,bA){if(bA&&bA instanceof C&&!(bA instanceof bx)){bA=bx(bA)}return C.fn.init.call(this,bz,bA,bw)};bx.fn.init.prototype=bx.fn;var bw=bx(ak);return bx}})();var Q,bc,l,ad=/alpha\([^)]*\)/i,aj=/opacity=([^)]*)/,w=/^(top|right|bottom|left)$/,ai=/^(none|table(?!-c[ea]).+)/,av=/^margin/,i=new RegExp("^("+aE+")(.*)$","i"),aV=new RegExp("^("+aE+")(?!px)[a-z%]+$","i"),E=new RegExp("^([-+])=("+aE+")","i"),J={BODY:"block"},ba={position:"absolute",visibility:"hidden",display:"block"},aL={letterSpacing:0,fontWeight:400},D=["Top","Right","Bottom","Left"],O=["Webkit","O","Moz","ms"],be=C.fn.toggle;function a2(bx,bv){if(bv in bx){return bv}var by=bv.charAt(0).toUpperCase()+bv.slice(1),bu=bv,bw=O.length;while(bw--){bv=O[bw]+by;if(bv in bx){return bv}}return bu}function ap(bv,bu){bv=bu||bv;return C.css(bv,"display")==="none"||!C.contains(bv.ownerDocument,bv)}function bb(bz,bu){var by,bA,bv=[],bw=0,bx=bz.length;for(;bw1)},show:function(){return bb(this,true)},hide:function(){return bb(this)},toggle:function(bw,bv){var bu=typeof bw==="boolean";if(C.isFunction(bw)&&C.isFunction(bv)){return be.apply(this,arguments)}return this.each(function(){if(bu?bw:ap(this)){C(this).show()}else{C(this).hide()}})}});C.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var bu=Q(bw,"opacity");return bu===""?"1":bu}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":C.support.cssFloat?"cssFloat":"styleFloat"},style:function(bw,bv,bC,bx){if(!bw||bw.nodeType===3||bw.nodeType===8||!bw.style){return}var bA,bB,bD,by=C.camelCase(bv),bu=bw.style;bv=C.cssProps[by]||(C.cssProps[by]=a2(bu,by));bD=C.cssHooks[bv]||C.cssHooks[by];if(bC!==G){bB=typeof bC;if(bB==="string"&&(bA=E.exec(bC))){bC=(bA[1]+1)*bA[2]+parseFloat(C.css(bw,bv));bB="number"}if(bC==null||bB==="number"&&isNaN(bC)){return}if(bB==="number"&&!C.cssNumber[by]){bC+="px"}if(!bD||!("set" in bD)||(bC=bD.set(bw,bC,bx))!==G){try{bu[bv]=bC}catch(bz){}}}else{if(bD&&"get" in bD&&(bA=bD.get(bw,false,bx))!==G){return bA}return bu[bv]}},css:function(bA,by,bz,bv){var bB,bx,bu,bw=C.camelCase(by);by=C.cssProps[bw]||(C.cssProps[bw]=a2(bA.style,bw));bu=C.cssHooks[by]||C.cssHooks[bw];if(bu&&"get" in bu){bB=bu.get(bA,true,bv)}if(bB===G){bB=Q(bA,by)}if(bB==="normal"&&by in aL){bB=aL[by]}if(bz||bv!==G){bx=parseFloat(bB);return bz||C.isNumeric(bx)?bx||0:bB}return bB},swap:function(by,bx,bz){var bw,bv,bu={};for(bv in bx){bu[bv]=by.style[bv];by.style[bv]=bx[bv]}bw=bz.call(by);for(bv in bx){by.style[bv]=bu[bv]}return bw}});if(bd.getComputedStyle){Q=function(bB,bv){var bu,by,bx,bA,bz=bd.getComputedStyle(bB,null),bw=bB.style;if(bz){bu=bz.getPropertyValue(bv)||bz[bv];if(bu===""&&!C.contains(bB.ownerDocument,bB)){bu=C.style(bB,bv)}if(aV.test(bu)&&av.test(bv)){by=bw.width;bx=bw.minWidth;bA=bw.maxWidth;bw.minWidth=bw.maxWidth=bw.width=bu;bu=bz.width;bw.width=by;bw.minWidth=bx;bw.maxWidth=bA}}return bu}}else{if(ak.documentElement.currentStyle){Q=function(by,bw){var bz,bu,bv=by.currentStyle&&by.currentStyle[bw],bx=by.style;if(bv==null&&bx&&bx[bw]){bv=bx[bw]}if(aV.test(bv)&&!w.test(bw)){bz=bx.left;bu=by.runtimeStyle&&by.runtimeStyle.left;if(bu){by.runtimeStyle.left=by.currentStyle.left}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bz;if(bu){by.runtimeStyle.left=bu}}return bv===""?"auto":bv}}}function aO(bu,bw,bx){var bv=i.exec(bw);return bv?Math.max(0,bv[1]-(bx||0))+(bv[2]||"px"):bw}function aZ(bx,bv,bu,bz){var bw=bu===(bz?"border":"content")?4:bv==="width"?1:0,by=0;for(;bw<4;bw+=2){if(bu==="margin"){by+=C.css(bx,bu+D[bw],true)}if(bz){if(bu==="content"){by-=parseFloat(Q(bx,"padding"+D[bw]))||0}if(bu!=="margin"){by-=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}else{by+=parseFloat(Q(bx,"padding"+D[bw]))||0;if(bu!=="padding"){by+=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}}return by}function Y(bx,bv,bu){var by=bv==="width"?bx.offsetWidth:bx.offsetHeight,bw=true,bz=C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box";if(by<=0||by==null){by=Q(bx,bv);if(by<0||by==null){by=bx.style[bv]}if(aV.test(by)){return by}bw=bz&&(C.support.boxSizingReliable||by===bx.style[bv]);by=parseFloat(by)||0}return(by+aZ(bx,bv,bu||(bz?"border":"content"),bw))+"px"}function aN(bw){if(J[bw]){return J[bw]}var bu=C("<"+bw+">").appendTo(ak.body),bv=bu.css("display");bu.remove();if(bv==="none"||bv===""){bc=ak.body.appendChild(bc||C.extend(ak.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!l||!bc.createElement){l=(bc.contentWindow||bc.contentDocument).document;l.write("");l.close()}bu=l.body.appendChild(l.createElement(bw));bv=Q(bu,"display");ak.body.removeChild(bc)}J[bw]=bv;return bv}C.each(["height","width"],function(bv,bu){C.cssHooks[bu]={get:function(by,bx,bw){if(bx){if(by.offsetWidth===0&&ai.test(Q(by,"display"))){return C.swap(by,ba,function(){return Y(by,bu,bw)})}else{return Y(by,bu,bw)}}},set:function(bx,by,bw){return aO(bx,by,bw?aZ(bx,bu,bw,C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box"):0)}}});if(!C.support.opacity){C.cssHooks.opacity={get:function(bv,bu){return aj.test((bu&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":bu?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,bu=C.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&C.trim(bw.replace(ad,""))===""&&bx.removeAttribute){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ad.test(bw)?bw.replace(ad,bu):bw+" "+bu}}}C(function(){if(!C.support.reliableMarginRight){C.cssHooks.marginRight={get:function(bv,bu){return C.swap(bv,{display:"inline-block"},function(){if(bu){return Q(bv,"marginRight")}})}}}if(!C.support.pixelPosition&&C.fn.position){C.each(["top","left"],function(bu,bv){C.cssHooks[bv]={get:function(by,bx){if(bx){var bw=Q(by,bv);return aV.test(bw)?C(by).position()[bv]+"px":bw}}}})}});if(C.expr&&C.expr.filters){C.expr.filters.hidden=function(bu){return(bu.offsetWidth===0&&bu.offsetHeight===0)||(!C.support.reliableHiddenOffsets&&((bu.style&&bu.style.display)||Q(bu,"display"))==="none")};C.expr.filters.visible=function(bu){return !C.expr.filters.hidden(bu)}}C.each({margin:"",padding:"",border:"Width"},function(bu,bv){C.cssHooks[bu+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[bu+D[bx]+bv]=bz[bx]||bz[bx-2]||bz[0]}return bw}};if(!av.test(bu)){C.cssHooks[bu+bv].set=aO}});var g=/%20/g,af=/\[\]$/,br=/\r?\n/g,aU=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,p=/^(?:select|textarea)/i;C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?C.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aU.test(this.type))}).map(function(bu,bv){var bw=C(this).val();return bw==null?null:C.isArray(bw)?C.map(bw,function(by,bx){return{name:bv.name,value:by.replace(br,"\r\n")}}):{name:bv.name,value:bw.replace(br,"\r\n")}}).get()}});C.param=function(bu,bw){var bx,bv=[],by=function(bz,bA){bA=C.isFunction(bA)?bA():(bA==null?"":bA);bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===G){bw=C.ajaxSettings&&C.ajaxSettings.traditional}if(C.isArray(bu)||(bu.jqx&&!C.isPlainObject(bu))){C.each(bu,function(){by(this.name,this.value)})}else{for(bx in bu){s(bx,bu[bx],bw,by)}}return bv.join("&").replace(g,"+")};function s(bw,by,bv,bx){var bu;if(C.isArray(by)){C.each(by,function(bA,bz){if(bv||af.test(bw)){bx(bw,bz)}else{s(bw+"["+(typeof bz==="object"?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&C.type(by)==="object"){for(bu in by){s(bw+"["+bu+"]",by[bu],bv,bx)}}else{bx(bw,by)}}}if(C.support.ajax){C.ajaxTransport(function(bu){if(!bu.crossDomain||C.support.cors){var bv;return{send:function(bB,bw){var bz,by,bA=bu.xhr();if(bu.username){bA.open(bu.type,bu.url,bu.async,bu.username,bu.password)}else{bA.open(bu.type,bu.url,bu.async)}if(bu.xhrFields){for(by in bu.xhrFields){bA[by]=bu.xhrFields[by]}}if(bu.mimeType&&bA.overrideMimeType){bA.overrideMimeType(bu.mimeType)}if(!bu.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((bu.hasContent&&bu.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=G;if(bz){bA.onreadystatechange=C.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}try{bI.text=bA.responseText}catch(bJ){}try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&bu.isLocal&&!bu.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!bu.async){bv()}else{if(bA.readyState===4){setTimeout(bv,0)}else{bz=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};C(bd).unload(xhrOnUnloadAbort)}xhrCallbacks[bz]=bv}bA.onreadystatechange=bv}}},abort:function(){if(bv){bv(0,1)}}}}})}var a6,a1,ar=/^(?:toggle|show|hide)$/,aM=new RegExp("^(?:([-+])=|)("+aE+")([a-z%]*)$","i"),a7=/queueHooks$/,k=[bm],H={"*":[function(bu,bB){var bx,bC,bD=this.createTween(bu,bB),by=aM.exec(bB),bz=bD.cur(),bv=+bz||0,bw=1,bA=20;if(by){bx=+by[2];bC=by[3]||(C.cssNumber[bu]?"":"px");if(bC!=="px"&&bv){bv=C.css(bD.elem,bu,true)||bx||1;do{bw=bw||".5";bv=bv/bw;C.style(bD.elem,bu,bv+bC)}while(bw!==(bw=bD.cur()/bz)&&bw!==1&&--bA)}bD.unit=bC;bD.start=bv;bD.end=by[1]?bv+(by[1]+1)*bx:bx}return bD}]};function bl(){setTimeout(function(){a6=G},0);return(a6=C.now())}function Z(bv,bu){C.each(bu,function(bA,by){var bz=(H[bA]||[]).concat(H["*"]),bw=0,bx=bz.length;for(;bw-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(bu)||0;by=parseFloat(bE)||0}if(C.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};C.fn.extend({isRendered:function(){var bv=this;var bu=this[0];if(bu.parentNode==null||(bu.offsetWidth===0||bu.offsetHeight===0)){return false}return true},getSizeFromStyle:function(){var by=this;var bx=null;var bu=null;var bw=this[0];var bv;if(bw.style.width){bx=bw.style.width}if(bw.style.height){bu=bw.style.height}if(bd.getComputedStyle){bv=getComputedStyle(bw,null)}else{bv=bw.currentStyle}if(bv){if(bv.width){bx=bv.width}if(bv.height){bu=bv.height}}if(bx==="0px"){bx=0}if(bu==="0px"){bu=0}if(bx===null){bx=0}if(bu===null){bu=0}return{width:bx,height:bu}},initAnimate:function(){},sizeStyleChanged:function(bx){var bw=this;var by;var bu=function(bz){var bA=by;if(bz&&bz[0]&&bz[0].attributeName==="style"&&bz[0].type==="attributes"){if(bA.element.offsetWidth!==bA.offsetWidth||bA.element.offsetHeight!==bA.offsetHeight){bA.offsetWidth=bA.element.offsetWidth;bA.offsetHeight=bA.element.offsetHeight;if(bw.isRendered()){bA.callback()}}}};by={element:bw[0],offsetWidth:bw[0].offsetWidth,offsetHeight:bw[0].offsetHeight,callback:bx};try{if(!bw.elementStyleObserver){bw.elementStyleObserver=new MutationObserver(bu);bw.elementStyleObserver.observe(bw[0],{attributes:true,childList:false,characterData:false})}}catch(bv){}},position:function(){if(!this[0]){return}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),bu=V.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(C.css(bw,"marginTop"))||0;bx.left-=parseFloat(C.css(bw,"marginLeft"))||0;bu.top+=parseFloat(C.css(bv[0],"borderTopWidth"))||0;bu.left+=parseFloat(C.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-bu.top,left:bx.left-bu.left}},offsetParent:function(){return this.map(function(){var bu=this.offsetParent||ak.body;while(bu&&(!V.test(bu.nodeName)&&C.css(bu,"position")==="static")){bu=bu.offsetParent}return bu||ak.body})}});C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(bw,bv){var bu=/Y/.test(bv);C.fn[bw]=function(bx){return C.access(this,function(by,bB,bA){var bz=aC(by);if(bA===G){return bz?(bv in bz)?bz[bv]:bz.document.documentElement[bB]:by[bB]}if(bz){bz.scrollTo(!bu?bA:C(bz).scrollLeft(),bu?bA:C(bz).scrollTop())}else{by[bB]=bA}},bw,bx,arguments.length,null)}});function aC(bu){return C.isWindow(bu)?bu:bu.nodeType===9?bu.defaultView||bu.parentWindow:false}C.each({Height:"height",Width:"width"},function(bu,bv){C.each({padding:"inner"+bu,content:bv,"":"outer"+bu},function(bw,bx){C.fn[bx]=function(bB,bA){var bz=arguments.length&&(bw||typeof bB!=="boolean"),by=bw||(bB===true||bA===true?"margin":"border");return C.access(this,function(bD,bC,bE){var bF;if(C.isWindow(bD)){return bD.document.documentElement["client"+bu]}if(bD.nodeType===9){bF=bD.documentElement;return Math.max(bD.body["scroll"+bu],bF["scroll"+bu],bD.body["offset"+bu],bF["offset"+bu],bF["client"+bu])}return bE===G?C.css(bD,bC,bE,by):C.style(bD,bC,bE,by)},bv,bz?bB:G,bz,null)}})});bd.JQXLite=bd.jqxHelper=C;if(typeof define==="function"&&define.amd&&define.amd.JQXLite){define("jqx",[],function(){return C})}})(window)}(function(a){if(a.jQuery){a.minQuery=a.JQXLite=a.jQuery;return}if(!a.$){a.$=a.minQuery=a.JQXLite}else{a.minQuery=a.JQXLite=a.$}})(window);JQXLite.generateID=function(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};var b="";do{b="jqx"+a()+a()+a()}while($("#"+b).length>0);return b};var jqxBaseFramework=window.jqxBaseFramework=window.minQuery||window.jQuery;(function(b){b.jqx=b.jqx||{};window.jqx=b.jqx;var a={createInstance:function(c,e,g){if(e=="jqxDataAdapter"){var f=g[0];var d=g[1]||{};return new b.jqx.dataAdapter(f,d)}b(c)[e](g||{});return b(c)[e]("getInstance")}};window.jqwidgets=a;b.jqx.define=function(c,d,e){c[d]=function(){if(this.baseType){this.base=new c[this.baseType]();this.base.defineInstance()}this.defineInstance();this.metaInfo()};c[d].prototype.defineInstance=function(){};c[d].prototype.metaInfo=function(){};c[d].prototype.base=null;c[d].prototype.baseType=undefined;if(e&&c[e]){c[d].prototype.baseType=e}};b.jqx.invoke=function(f,e){if(e.length==0){return}var g=typeof(e)==Array||e.length>0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):b({}).toArray();while(f[g]==undefined&&f.base!=null){if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}f=f.base}if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}return};b.jqx.getByPriority=function(c){var e=undefined;for(var d=0;d0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):{};while(f[g]==undefined&&f.base!=null){if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}f=f.base}if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}return false};b.jqx.isPropertySetter=function(d,c){if(c.length==1&&typeof(c[0])=="object"){return true}if(c.length==2&&typeof(c[0])=="string"&&!b.jqx.hasFunction(d,c)){return true}return false};b.jqx.validatePropertySetter=function(g,e,c){if(!b.jqx.propertySetterValidation){return true}if(e.length==1&&typeof(e[0])=="object"){for(var f in e[0]){var h=g;while(!h.hasOwnProperty(f)&&h.base){h=h.base}if(!h||!h.hasOwnProperty(f)){if(!c){var d=h.hasOwnProperty(f.toString().toLowerCase());if(!d){throw"Invalid property: "+f}else{return true}}return false}}return true}if(e.length!=2){if(!c){throw"Invalid property: "+e.length>=0?e[0]:""}return false}while(!g.hasOwnProperty(e[0])&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e[0])){if(!c){throw"Invalid property: "+e[0]}return false}return true};if(!Object.keys){Object.keys=(function(){var e=Object.prototype.hasOwnProperty,f=!({toString:null}).propertyIsEnumerable("toString"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=d.length;return function(j){if(typeof j!=="object"&&(typeof j!=="function"||j===null)){throw new TypeError("Object.keys called on non-object")}var g=[],k,h;for(k in j){if(e.call(j,k)){g.push(k)}}if(f){for(h=0;h1){var g=!f.base?f.element:f.base.element;var c=b.data(g,f.widgetName).initArgs;if(c&&JSON&&JSON.stringify&&i[0]&&c[0]){try{if(JSON.stringify(i[0])==JSON.stringify(c[0])){var h=true;b.each(i[0],function(l,m){if(f[l]!=m){h=false;return false}});if(h){return}}}catch(e){}}f.batchUpdate=i[0];var j={};var k={};b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){if(f[l]!=m){j[l]=f[l];k[l]=m;d++}}else{if(n.hasOwnProperty(l.toLowerCase())){if(f[l.toLowerCase()]!=m){j[l.toLowerCase()]=f[l.toLowerCase()];k[l.toLowerCase()]=m;d++}}}});if(d<2){f.batchUpdate=null}}b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){b.jqx.setvalueraiseevent(n,l,m)}else{if(n.hasOwnProperty(l.toLowerCase())){b.jqx.setvalueraiseevent(n,l.toLowerCase(),m)}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+l+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,j,k)}}}else{if(i.length==2){while(!f.hasOwnProperty(i[0])&&f.base){f=f.base}if(f.hasOwnProperty(i[0])){b.jqx.setvalueraiseevent(f,i[0],i[1])}else{if(f.hasOwnProperty(i[0].toLowerCase())){b.jqx.setvalueraiseevent(f,i[0].toLowerCase(),i[1])}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+i[0]+"'"}}}}}};b.jqx.setvalueraiseevent=function(d,e,f){var c=d[e];d[e]=f;if(!d.isInitialized){return}if(d.propertyChangedHandler!=undefined){d.propertyChangedHandler(d,e,c,f)}if(d.propertyChangeMap!=undefined&&d.propertyChangeMap[e]!=undefined){d.propertyChangeMap[e](d,e,c,f)}};b.jqx.get=function(f,e){if(e==undefined||e==null){return undefined}if(f.propertyMap){var d=f.propertyMap(e);if(d!=null){return d}}if(f.hasOwnProperty(e)){return f[e]}if(f.hasOwnProperty(e.toLowerCase())){return f[e.toLowerCase()]}var c=undefined;if(typeof(e)==Array){if(e.length!=1){return undefined}c=e[0]}else{if(typeof(e)=="string"){c=e}}while(!f.hasOwnProperty(c)&&f.base){f=f.base}if(f){return f[c]}return undefined};b.jqx.serialize=function(f){var c="";if(b.isArray(f)){c="[";for(var e=0;e0){c+=", "}c+=b.jqx.serialize(f[e])}c+="]"}else{if(typeof(f)=="object"){c="{";var d=0;for(var e in f){if(d++>0){c+=", "}c+=e+": "+b.jqx.serialize(f[e])}c+="}"}else{c=f.toString()}}return c};b.jqx.propertySetterValidation=true;b.jqx.jqxWidgetProxy=function(h,d,c){var e=b(d);var g=b.data(d,h);if(g==undefined){return undefined}var f=g.instance;if(b.jqx.hasFunction(f,c)){return b.jqx.invoke(f,c)}if(b.jqx.isPropertySetter(f,c)){if(b.jqx.validatePropertySetter(f,c)){b.jqx.set(f,c);return undefined}}else{if(typeof(c)=="object"&&c.length==0){return}else{if(typeof(c)=="object"&&c.length==1&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c[0])}else{if(typeof(c)=="string"&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c)}}}}throw"jqxCore: Invalid parameter '"+b.jqx.serialize(c)+"' does not exist."};b.jqx.applyWidget=function(d,f,l,m){var h=false;try{h=window.MSApp!=undefined}catch(g){}var n=b(d);if(!m){m=new b.jqx["_"+f]()}else{m.host=n;m.element=d}if(d.id==""){d.id=b.jqx.utilities.createId()}var k={host:n,element:d,instance:m,initArgs:l};m.widgetName=f;b.data(d,f,k);b.data(d,"jqxWidget",k.instance);var j=new Array();var m=k.instance;while(m){m.isInitialized=false;j.push(m);m=m.base}j.reverse();j[0].theme=b.jqx.theme||"";b.jqx.jqxWidgetProxy(f,d,l);for(var c in j){m=j[c];if(c==0){m.host=n;m.element=d;m.WinJS=h}if(m!=undefined){if(m.definedInstance){m.definedInstance()}if(m.createInstance!=null){if(h){MSApp.execUnsafeLocalFunction(function(){m.createInstance(l)})}else{m.createInstance(l)}}}}for(var c in j){if(j[c]!=undefined){j[c].isInitialized=true}}if(h){MSApp.execUnsafeLocalFunction(function(){k.instance.refresh(true)})}else{k.instance.refresh(true)}};b.jqx.jqxWidget=function(c,d,g){var j=false;try{var l=Array.prototype.slice.call(g,0)}catch(i){var l=""}try{j=window.MSApp!=undefined}catch(i){}var h=c;var m="";if(d){m="_"+d}b.jqx.define(b.jqx,"_"+h,m);var k=new Array();if(!window[h]){var f=function(n){if(n==null){return""}var e=b.type(n);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(n===null){return""}return n.toString()}var o="";b.each(n,function(q,r){var t=r;if(q>0){o+=", "}o+="[";var p=0;if(b.type(t)=="object"){for(var s in t){if(p>0){o+=", "}o+="{"+s+":"+t[s]+"}";p++}}else{if(p>0){o+=", "}o+="{"+q+":"+t+"}";p++}o+="]"});return o};a[h]=window[h]=function(e,s){var n=[];if(!s){s={}}n.push(s);var o=e;if(b.type(o)==="object"&&e[0]){o=e[0].id;if(o===""){o=e[0].id=b.jqx.utilities.createId()}}else{if(b.type(e)==="object"&&e&&e.nodeName){o=e.id;if(o===""){o=e.id=b.jqx.utilities.createId()}}}if(window.jqxWidgets&&window.jqxWidgets[o]){if(s){b.each(window.jqxWidgets[o],function(t){var u=b(this.element).data();if(u&&u.jqxWidget){b(this.element)[h](s)}})}if(window.jqxWidgets[o].length==1){var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o][0]}}var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o]}}var p=b(e);if(p.length===0){p=b("
    ");if(h==="jqxInput"||h==="jqxPasswordInput"||h==="jqxMaskedInput"){p=b("")}if(h==="jqxTextArea"){p=b("")}if(h==="jqxButton"||h==="jqxRepeatButton"||h==="jqxToggleButton"){p=b("
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(b.support.htmlSerialize||!k.test(s))&&(b.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1>");try{for(;m=0&&d.indexOf(".net4.0c")>=0){e.browser="msie";e.version="11";c[1]="msie"}if(d.indexOf("edge")>=0){e.browser="msie";e.version="12";c[1]="msie"}e[c[1]]=c[1];return e}});b.jqx.browser=b.jqx.utilities.getBrowser();b.jqx.isHidden=function(d){if(!d||!d[0]){return false}var c=d[0].offsetWidth,e=d[0].offsetHeight;if(c===0||e===0){return true}else{return false}};b.jqx.ariaEnabled=true;b.jqx.aria=function(d,f,e){if(!b.jqx.ariaEnabled){return}if(f==undefined){b.each(d.aria,function(h,i){var k=!d.base?d.host.attr(h):d.base.host.attr(h);if(k!=undefined&&!b.isFunction(k)){var j=k;switch(i.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}d[i.name]=j}else{var k=d[i.name];if(b.isFunction(k)){k=d[i.name]()}if(k==undefined){k=""}try{!d.base?d.host.attr(h,k.toString()):d.base.host.attr(h,k.toString())}catch(g){}}})}else{try{if(d.host){if(!d.base){if(d.host){if(d.element.setAttribute){d.element.setAttribute(f,e.toString())}else{d.host.attr(f,e.toString())}}else{d.attr(f,e.toString())}}else{if(d.base.host){d.base.host.attr(f,e.toString())}else{d.attr(f,e.toString())}}}else{if(d.setAttribute){d.setAttribute(f,e.toString())}}}catch(c){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d){var c=this.length;var e=Number(arguments[1])||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=c}for(;e=0||j.indexOf("WPDesktop")>=0||j.indexOf("IEMobile")>=0||j.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(j.indexOf("Touch")>=0){var c=("MSPointerDown" in window)||("pointerdown" in window);if(c){this.touchDevice=true;return true}if(j.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(l){this.touchDevice=false;return false}},getLeftPos:function(c){var d=c.offsetLeft;while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){d+=c.offsetLeft;if(document.all){d+=c.clientLeft}}}return d},getTopPos:function(d){var f=d.offsetTop;var c=b(d).coord();while((d=d.offsetParent)!=null){if(d.tagName!="HTML"){f+=(d.offsetTop-d.scrollTop);if(document.all){f+=d.clientTop}}}var e=navigator.userAgent.toLowerCase();var g=(e.indexOf("windows phone")!=-1||e.indexOf("WPDesktop")!=-1||e.indexOf("ZuneWP7")!=-1||e.indexOf("msie 9")!=-1||e.indexOf("msie 11")!=-1||e.indexOf("msie 10")!=-1)&&e.indexOf("touch")!=-1;if(g){return c.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return f}if(e.indexOf("version/7")!=-1){return c.top}if(e.indexOf("version/6")!=-1||e.indexOf("version/5")!=-1){f=f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return f+b(window).scrollTop()}return c.top}return f},isChromeMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("android")!=-1;return c},isOperaMiniMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1||d.indexOf("opera mobi")!=-1;return c},isOperaMiniBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1;return c},isNewSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/5")!=-1);return c},isSafari4MobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/4")!=-1);return c},isWindowsPhone:function(){var d=navigator.userAgent.toLowerCase();var c=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1&&d.indexOf("touch")!=-1);return c},isSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return true}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return true}var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1||d.indexOf("mobile safari")!=-1;return c},isIPadSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1;return c},isMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("android")!=-1;return c},getTouches:function(c){if(c.originalEvent){if(c.originalEvent.touches&&c.originalEvent.touches.length){return c.originalEvent.touches}else{if(c.originalEvent.changedTouches&&c.originalEvent.changedTouches.length){return c.originalEvent.changedTouches}}}if(!c.touches){c.touches=new Array();c.touches[0]=c.originalEvent!=undefined?c.originalEvent:c;if(c.originalEvent!=undefined&&c.pageX){c.touches[0]=c}if(c.type=="mousemove"){c.touches[0]=c}}return c.touches},getTouchEventName:function(c){if(this.isWindowsPhone()){var d=navigator.userAgent.toLowerCase();if(d.indexOf("windows phone 7")!=-1){if(c.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(c.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(c.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}if(c.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(c.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(c.toLowerCase().indexOf("end")!=-1){return"pointerup"}}else{return c}},dispatchMouseEvent:function(c,g,f){if(this.simulatetouches){return}var d=document.createEvent("MouseEvent");d.initMouseEvent(c,true,true,g.view,1,g.screenX,g.screenY,g.clientX,g.clientY,false,false,false,false,0,null);if(f!=null){f.dispatchEvent(d)}},getRootNode:function(c){while(c.nodeType!==1){c=c.parentNode}return c},setTouchScroll:function(c,d){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[d]=c},touchScroll:function(B,M,Z,H,x,n){if(B==null){return}var G=this;var f=0;var r=0;var g=0;var i=0;var t=0;var j=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[H]=false;var k=false;var p=b(B);var R=["select","input","textarea"];var X=0;var J=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[H]=true;var H=H;var w=this.getTouchEventName("touchstart")+".touchScroll";var D=this.getTouchEventName("touchend")+".touchScroll";var ab=this.getTouchEventName("touchmove")+".touchScroll";var l,W,z,ah,V,Y,aj,Q,aa,d,F,ad,af,O,e,v,u,S,c,E,ag,o;Q=M;var aj=0;var aa=0;var h=0;var T=0;var ai=0;var Y=x.jqxScrollBar("max");var o=325;function A(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientY}else{if(am.originalEvent&&am.originalEvent.clientY!==undefined){return am.originalEvent.clientY}else{var al=G.getTouches(am);return al[0].clientY}}}function ae(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientX}else{if(am.originalEvent&&am.originalEvent.clientX!==undefined){return am.originalEvent.clientX}else{var al=G.getTouches(am);return al[0].clientX}}}var I=function(){var ap,am,aq,ao;ap=Date.now();am=ap-v;v=ap;aq=aa-e;var an=h-ah;e=aa;ah=h;F=true;ao=1000*aq/(1+am);var al=1000*an/(1+am);af=0.8*ao+0.2*af;O=0.8*al+0.2*O};var C=false;var X=function(am){if(!G.enableScrolling[H]){return true}if(b.inArray(am.target.tagName.toLowerCase(),R)!==-1){return}aa=n.jqxScrollBar("value");h=x.jqxScrollBar("value");var an=G.getTouches(am);var ao=an[0];if(an.length==1){G.dispatchMouseEvent("mousedown",ao,G.getRootNode(ao.target))}Y=x.jqxScrollBar("max");Q=n.jqxScrollBar("max");function al(ap){C=false;F=true;d=A(ap);ag=ae(ap);af=S=O=0;e=aa;ah=h;v=Date.now();clearInterval(u);u=setInterval(I,100);T=aa;ai=h;if(aa>0&&aaQ)?Q:(amQ)?"max":(amY)?Y:(amY)?"max":(am0.5||am<-0.5){ac(c+am);requestAnimationFrame(U)}else{ac(c)}}}function N(){var al,am;if(S){al=Date.now()-v;am=-S*Math.exp(-al/o);if(am>0.5||am<-0.5){m(E+am);requestAnimationFrame(N)}else{m(E)}}}var y=function(al){if(!G.enableScrolling[H]){return true}if(!G.scrolling[H]){return true}if(C){al.preventDefault();al.stopPropagation()}var aq=G.getTouches(al);if(aq.length>1){return true}var am=aq[0].pageY;var ao=aq[0].pageX;if(G.simulatetouches){if(aq[0]._pageY!=undefined){am=aq[0]._pageY;ao=aq[0]._pageX}}var au=am-r;var av=ao-t;J=am;var at=ao;g=au-f;j=av-i;k=true;f=au;i=av;var an=x!=null?x[0].style.visibility!="hidden":true;var ar=n!=null?n[0].style.visibility!="hidden":true;function ap(ay){var aA,az,ax;if(F){aA=A(ay);ax=ae(ay);az=d-aA;V=ag-ax;var aw="value";if(az>2||az<-2){d=aA;aw=ac(aa+az,ay);I();if(aw=="min"&&T===0){return true}if(aw=="max"&&T===Q){return true}if(!ar){return true}ay.preventDefault();ay.stopPropagation();C=true;return false}else{if(V>2||V<-2){ag=ax;aw=m(h+V,ay);I();if(aw=="min"&&ai===0){return true}if(aw=="max"&&ai===Y){return true}if(!an){return true}C=true;ay.preventDefault();ay.stopPropagation();return false}}ay.preventDefault()}}if(an||ar){if((an)||(ar)){ap(al)}}};if(p.on){p.on(ab,y)}else{p.bind(ab,y)}var s=function(am){if(!G.enableScrolling[H]){return true}var an=G.getTouches(am)[0];if(!G.scrolling[H]){return true}F=false;clearInterval(u);if(af>10||af<-10){S=0.8*af;c=Math.round(aa+S);v=Date.now();requestAnimationFrame(U)}else{if(O>10||O<-10){S=0.8*O;E=Math.round(h+S);v=Date.now();requestAnimationFrame(N)}else{}}G.scrolling[H]=false;if(k){G.dispatchMouseEvent("mouseup",an,am.target)}else{var an=G.getTouches(am)[0],al=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,al);G.dispatchMouseEvent("click",an,al);return true}};if(this.simulatetouches){var q=b(window).on!=undefined||b(window).bind;var P=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};b(window).on!=undefined?b(document).on("mouseup.touchScroll",P):b(document).bind("mouseup.touchScroll",P);if(window.frameElement){if(window.top!=null){var L=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};if(window.top.document){b(window.top.document).on?b(window.top.document).on("mouseup",L):b(window.top.document).bind("mouseup",L)}}}var ak=b(document).on!=undefined||b(document).bind;var K=function(al){if(!G.scrolling[H]){return true}G.scrolling[H]=false;var an=G.getTouches(al)[0],am=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,am);G.dispatchMouseEvent("click",an,am)};b(document).on!=undefined?b(document).on("touchend",K):b(document).bind("touchend",K)}if(p.on){p.on("dragstart",function(al){al.preventDefault()});p.on("selectstart",function(al){al.preventDefault()})}p.on?p.on(D+" touchcancel.touchScroll",s):p.bind(D+" touchcancel.touchScroll",s)}});b.jqx.cookie=b.jqx.cookie||{};b.extend(b.jqx.cookie,{cookie:function(f,g,d){if(arguments.length>1&&String(g)!=="[object Object]"){d=b.extend({},d);if(g===null||g===undefined){d.expires=-1}if(typeof d.expires==="number"){var i=d.expires,e=d.expires=new Date();e.setDate(e.getDate()+i)}g=String(g);return(document.cookie=[encodeURIComponent(f),"=",d.raw?g:encodeURIComponent(g),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join(""))}d=g||{};var c,h=d.raw?function(j){return j}:decodeURIComponent;return(c=new RegExp("(?:^|; )"+encodeURIComponent(f)+"=([^;]*)").exec(document.cookie))?h(c[1]):null}});b.jqx.string=b.jqx.string||{};b.extend(b.jqx.string,{replace:function(g,e,f){if(e===f){return this}var c=g;var d=c.indexOf(e);while(d!=-1){c=c.replace(e,f);d=c.indexOf(e)}return c},contains:function(c,d){if(c==null||d==null){return false}return c.indexOf(d)!=-1},containsIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toString().toUpperCase().indexOf(d.toString().toUpperCase())!=-1},equals:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.slice(0,d.length)==d}return false},equalsIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.toUpperCase().slice(0,d.length)==d.toUpperCase()}return false},startsWith:function(c,d){if(c==null||d==null){return false}return c.slice(0,d.length)==d},startsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toUpperCase().slice(0,d.length)==d.toUpperCase()},normalize:function(c){if(c.charCodeAt(c.length-1)==65279){c=c.substring(0,c.length-1)}return c},endsWith:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.slice(-d.length)==d},endsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.toUpperCase().slice(-d.length)==d.toUpperCase()}});b.extend(b.easing,{easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e}return i/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){if(b.event&&b.event.special){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}})}if(b.fn.extend){b.fn.extend({ischildof:function(g){if(!b(this).parents){var c=g.element.contains(this.element);return c}var e=b(this).parents().get();for(var d=0;d=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}if(this[0]&&this[0].tagName.toLowerCase().indexOf("angular")>=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal&&b.fn.modal.Constructor){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(n){var e,j,i={top:0,left:0},f=this[0],l=f&&f.ownerDocument;if(!l){return}e=l.documentElement;if(!b.contains(e,f)){return i}if(typeof f.getBoundingClientRect!==undefined){i=f.getBoundingClientRect()}var d=function(o){return b.isWindow(o)?o:o.nodeType===9?o.defaultView||o.parentWindow:false};j=d(l);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var m=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(m){h=2}if(true==n){if(document.body.style.position!="static"&&document.body.style.position!=""){var k=b(document.body).coord();h=-k.left;c=-k.top}}return{top:c+i.top+(j.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+i.left+(j.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};b.jqx.ripplers=[];b.jqx.ripple=function(f,e,o){if(!e){e=f}var h=b(f);var j=false;h.append("");var p=h.find(".ink");var c=false;for(var g=0;g")}var r=d.find(".ink");r.removeClass("animate");if(!r.height()&&!r.width()){var s=Math.max(d.outerWidth(),d.outerHeight());r.css({height:s,width:s})}if(o==="checkbox"||o==="radiobutton"){if(o==="checkbox"){if(e.jqxCheckBox("disabled")){return}}if(o==="radiobutton"){if(e.jqxRadioButton("disabled")){return}}var q=d.width()/2-r.width()/2;var t=d.height()/2-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate");r.on("animationend",function(){if(b.jqx.ripple.mouseCaptured){r.removeClass("animate");r.addClass("active");f.addClass("active")}});return}var q=i.pageX-d.offset().left-r.width()/2;var t=i.pageY-d.offset().top-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate")})})}})(jqxBaseFramework); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxdata.export.js --- a/www/jqwidgets/jqxdata.export.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxdata.export.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(B,A,x,z,y,v,w){this.hierarchy=y;this.exportFormat=v;this.filename=w;B.beginFile(w);n(B);k(B);B.endFile(w);return B.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(x){x.beginBody();if(this.hierarchy){var w=function(z){for(var y=0;yz.level&&x.index-10){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="https://jqwidgets.com/export_server/dataexport.php"}else{v="http://jquerygrid.net/export_server/dataexport.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(K,H,G,B){K=K.toString().toLowerCase();var D=c[K];if(typeof D==="undefined"){throw"You can't export to "+K+" format."}if(K==="pdf"&&B==undefined){var M=this.exportTo(K,H,K,"pdf");if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var L=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);L.cellInitialize();var J=b(M).find("th");var I=b(M).find("tr");var N=0;L.setFontSize(13*72/96);var F=595;switch(b.jqx.pdfExport.paperSize){case"legal":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=1008}break;case"letter":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=792}break;case"a3":var F=841;if(b.jqx.pdfExport.orientation!=="portrait"){F=1190}break;case"a4":var F=595;if(b.jqx.pdfExport.orientation!=="portrait"){F=842}break;case"a5":var F=420;if(b.jqx.pdfExport.orientation!=="portrait"){F=595}break}F-=20;var E=0;var C=[];b.each(J,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=25}var Q=P*72/96;C[O]=Q;E+=Q});if(E>F){b.each(C,function(O){C[O]=(C[O]/E)*100;C[O]=C[O]*F/100})}b.each(J,function(P){var T=C[P];var S=25*72/96;var R=L.getTextDimensions(b(this).html());var Q=b(this).html();if(R.w+3>T){var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U.length>3){Q=U.substring(0,U.length-3)+"..."}else{Q=U.substring(0,1)+"..."}var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U!=Q){Q=U}}L.cell(10,10,T,S,Q,N)});N++;b.each(I,function(V){if(V===0){return true}var P=b(this).children();var Q=P.length>J.length;if(Q){var Y=P.length-J.length;var Z="";var X=C[0];var U=25*72/96;for(var R=0;R<=Y;R++){var O=P[R].innerHTML;if(O==="+"||O==="-"){O=O+" "}if(O===" "){O=" "}Z+=O}var T=L.getTextDimensions(Z);if(T.w+3>X){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N);for(var R=Y+1;RX){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N)}N++;return true}b.each(P,function(ab){var af=C[ab];var ae=25*72/96;var ad=b(this).html();var ac=L.getTextDimensions(b(this).html());if(ac.w+3>af){var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag.length>3){ad=ag.substring(0,ag.length-3)+"..."}else{ad=ag.substring(0,1)+"..."}var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag!=ad){ad=ag}}L.cell(10,10,af,ae,ad,N)});N++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}return L}return d(D,u,q,j,H,G,B)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);if(F=="utf-8"||F=="UTF-8"){M.setFont("courier","normal")}M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;TZ){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();if(af===" "){af=" "}var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}M.save(B+".pdf");return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if((d&&d.toString()=="NaN")||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o'}else{g='\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t'}};this.beginHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t"}else{g+="\n\t\t\t\t"}}else{if(m.width){g+='\n\t\t\t\t"}else{g+='\n\t\t\t\t"}}}};this.endHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.beginBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}j=0};this.beginRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t"}else{g+="\n\t\t\t\t\t"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}}};this.endRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}};this.endBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.endFile=function(k){if(i||k==undefined){g+="\n
    '+m.text+"'+m.text+"'+m.text+"'+m.text+"'+m.text+"
    '+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"
    "}else{g+="\n\t\t\n\t\n\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='\n\t \n\t \n\t \n\t12.00 \n\t \n\t \n\t8130 \n\t15135 \n\t120 \n\t45 \n\tFalse \n\tFalse \n\t \n\t'};this.beginHeader=function(){l='\n\t\n\t\t';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q";return}l+="\n\t\t\t"};this.beginRows=function(p){l+="\n\t\t\t\t"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}l+="\n\t\t\t"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}};this.endBody=function(){l+="\n\t\t
    "};this.endFile=function(){l+="\n\t
    \n
    ";h+="\n\t"};this.getFile=function(){return h+l};function g(t,w,s,v){var r="String";var u=this.getFormat(w);if(t!=null&&t.toString().substring(0,3)=="_AG"){t=t.toString().substring(3);r="String"}else{if(u.type=="date"){var q=t;t=this.formatData(t,u.type,u.formatString,u.localization);if(t===null||t===""){t="";r="String"}else{t=q.toISOString();r="DateTime"}}if(u.type=="string"){if(t===null||t===undefined){t=""}else{if(t.toString().indexOf("&")>=0){t=t.toString().replace(/&/g,"&")}if(t.toString().indexOf(">")>=0){t=t.toString().replace(/>/g,">")}if(t.toString().indexOf("<")>=0){t=t.toString().replace(/=0){t=t.toString().replace(/"/g,""")}if(t.toString().indexOf("'")>=0){t=t.toString().replace(/'/g,"'")}}}if(s.dataType=="number"||s.dataType=="float"||s.dataType=="int"||s.dataType=="integer"){r="Number";t=parseFloat(t);if(t===null||isNaN(t)||t===""){t="";r="String"}if(t&&r!="String"&&t!=""){if(w&&w.formatString&&w.formatString.indexOf("p")>=0){t=t/100}}s.currencysymbol=w.localization.currencysymbol}}var p=f(s);if(s.merge){l+='\n\t\t\t\t'+t+""}else{l+='\n\t\t\t\t'+t+""}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='';e+="\n"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.appendBodyCell=function(j,n,g,m,h,l){var k=this.getFormat(n);j=this.formatData(j,k.type,k.formatString,k.localization);if(k.type=="string"){if(j.toString().indexOf("&")>=0){j=j.toString().replace(/&/g,"&")}if(j.toString().indexOf(">")>=0){j=j.toString().replace(/>/g,">")}if(j.toString().indexOf("<")>=0){j=j.toString().replace(/=0){j=j.toString().replace(/"/g,""")}if(j.toString().indexOf("'")>=0){j=j.toString().replace(/'/g,"'")}}if(m.level!=undefined){if(this.hierarchy){e+="\n\t\t";for(var f=0;f"+j+""}else{e+="<"+l+">"+j+""}}else{if(l!=undefined){e+="\n\t\t<"+l+">"+j+""}else{e+="\n\t\t<"+c[d]+">"+j+""}}}else{e+="\n\t\t<"+c[d]+">"+j+""}d++};this.endRow=function(g){if(g!=undefined){if(this.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.endBody=function(){};this.endFile=function(){e+="\n
    "};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k>");ab("endobj");aA=f[aB].join("\n");w();if(av){k=[];for(ax=0;ax>8)&255,(ay>>16)&255,(ay>>24)&255])];aA="";for(ax in k){if(k.hasOwnProperty(ax)){aA+=String.fromCharCode.apply(null,k[ax])}}ab("<>")}else{ab("<>")}K(aA);ab("endobj")}D[1]=F;ab("1 0 obj");ab("<>");ab("endobj")},X=function(i){i.objectNumber=w();ab("<>");ab("endobj")},J=function(){var i;for(i in ai){if(ai.hasOwnProperty(i)){X(ai[i])}}},L=function(){G.publish("putXobjectDict")},x=function(){ab("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");ab("/Font <<");var i;for(i in ai){if(ai.hasOwnProperty(i)){ab("/"+i+" "+ai[i].objectNumber+" 0 R")}}ab(">>");ab("/XObject <<");L();ab(">>")},h=function(){J();G.publish("putResources");D[2]=F;ab("2 0 obj");ab("<<");x();ab(">>");ab("endobj");G.publish("postPutResources")},m=function(aw,k,ax){var i;if(Q[k]===i){Q[k]={}}Q[k][ax]=aw},au={},u=function(i,ax,az,aw){var ay="F"+(c(ai)+1).toString(10),k=ai[ay]={id:ay,PostScriptName:i,fontName:ax,fontStyle:az,encoding:aw,metadata:{}};m(ay,ax,az);G.publish("addFont",k);return ay},e=function(){var k="helvetica",aG="times",aI="courier",aF="normal",aE="bold",aD="italic",aH="bolditalic",ax="StandardEncoding",aA=[["Helvetica",k,aF],["Helvetica-Bold",k,aE],["Helvetica-Oblique",k,aD],["Helvetica-BoldOblique",k,aH],["Courier",aI,aF],["Courier-Bold",aI,aE],["Courier-Oblique",aI,aD],["Courier-BoldOblique",aI,aH],["Times-Roman",aG,aF],["Times-Bold",aG,aE],["Times-Italic",aG,aD],["Times-BoldItalic",aG,aH]],aC,ay,aB,az;for(aC=0,ay=aA.length;aC>8){aF=true}}aG=aw.join("")}}aC=aG.length;while(aF===az&&aC!==0){if(aG.charCodeAt(aC-1)>>8){aF=true}aC--}if(!aF){return aG}else{aw=ax.noBOM?[]:[254,255];for(aC=0,aA=aG.length;aC>8;if(aB>>8){throw new Error("Character at position "+aC.toString(10)+" of string '"+aG+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}aw.push(aB);aw.push(k-(aB<<8))}return String.fromCharCode.apply(az,aw)}},Z=function(k,i){return s(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Y=function(){ab("/Producer (pdfDataExport "+ao+")");if(O.title){ab("/Title ("+Z(O.title)+")")}if(O.subject){ab("/Subject ("+Z(O.subject)+")")}if(O.author){ab("/Author ("+Z(O.author)+")")}if(O.keywords){ab("/Keywords ("+Z(O.keywords)+")")}if(O.creator){ab("/Creator ("+Z(O.creator)+")")}var i=new Date();ab("/CreationDate (D:"+[i.getFullYear(),A(i.getMonth()+1),A(i.getDate()),A(i.getHours()),A(i.getMinutes()),A(i.getSeconds())].join("")+")")},W=function(){ab("/Type /Catalog");ab("/Pages 1 0 R");ab("/OpenAction [3 0 R /FitH null]");ab("/PageLayout /OneColumn");G.publish("putCatalog")},l=function(){ab("/Size "+(n+1));ab("/Root "+n+" 0 R");ab("/Info "+(n-1)+" 0 R")},ar=function(){g++;v=true;f[g]=[]},ah=function(){ar();ab(p(z*ak)+" w");ab(H);if(R!==0){ab(R.toString(10)+" J")}if(T!==0){ab(T.toString(10)+" j")}G.publish("addPage",{pageNumber:g})},y=function(aw,ay){var i,k;if(aw===k){aw=ai[d].fontName}if(ay===k){ay=ai[d].fontStyle}try{i=Q[aw][ay]}catch(ax){i=k}if(!i){throw new Error("Unable to look up font label for font '"+aw+"', '"+ay+"'. Refer to getFontList() for available fonts.")}return i},q=function(){v=false;t=[];D=[];ab("%PDF-"+U);aa();h();w();ab("<<");Y();ab(">>");ab("endobj");w();ab("<<");W();ab(">>");ab("endobj");var aw=F,k;ab("xref");ab("0 "+(n+1));ab("0000000000 65535 f ");for(k=1;k<=n;k++){ab(r(D[k])+" 00000 n ")}ab("trailer");ab("<<");l();ab(">>");ab("startxref");ab(aw);ab("%%EOF");v=true;return t.join("\n")},ac=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},I=function(az,aw){var ay,aB,aA,aC,ax,k;switch(az){case ay:return q();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return P.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return P.output("dataurlnewwindow")}}}aB=q();aA=aB.length;aC=new Uint8Array(new ArrayBuffer(aA));for(ax=0;axB){af=C;C=B;B=af}}else{if(E==="l"||E==="landscape"){E="l";if(B>C){af=C;C=B;B=af}}else{throw ("Invalid orientation: "+E)}}P.internal={pdfEscape:Z,getStyle:ac,getFont:function(){return ai[y.apply(P,arguments)]},getFontSize:function(){return aj},btoa:btoa,write:function(i,ax,aw,k){ab(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return p(i*ak)},getVerticalCoordinateString:function(i){return p((B-i)*ak)},collections:{},newObject:w,putStream:K,events:G,scaleFactor:ak,pageSize:{width:C,height:B},output:function(k,i){return I(k,i)}};P.addPage=function(){ah();return this};var ag=["","0","00","000","0000"];var j=function(aA,aw){var ax=["FEFF"];for(var az=0,k=aA.length,ay;az Tj\nT* <")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n<"+aB+"> Tj\nET");return this};P.text=function(aF,aE,aC,aw){var ax,aA,az,aD,k,aB,ay;if(typeof aF==="number"){aA=aC;az=aF;aD=aE;aF=aA;aE=az;aC=aD}if(typeof aF==="string"&&aF.match(/[\n\r]/)){aF=aF.split(/\r\n|\r|\n/g)}if(typeof aw==="undefined"){aw={noBOM:true,autoencode:true}}else{if(aw.noBOM===ax){aw.noBOM=true}if(aw.autoencode===ax){aw.autoencode=true}}if(typeof aF==="string"){aB=Z(aF,aw)}else{if(aF instanceof Array){k=aF.concat();for(ay=k.length-1;ay!==-1;ay--){k[ay]=Z(k[ay],aw)}aB=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n("+aB+") Tj\nET");return this};P.line=function(k,ax,i,aw){ab(p(k*ak)+" "+p((B-ax)*ak)+" m "+p(i*ak)+" "+p((B-aw)*ak)+" l S");return this};P.lines=function(k,aF,aE,aO,aK){var ay,aM,aC,aD,aB,aA,aI,aG,aN,aL,az,aJ,ax,aH,aw;if(typeof k==="number"){aM=aE;aC=k;aD=aF;k=aM;aF=aC;aE=aD}aK=ac(aK);aO=aO===ay?[1,1]:aO;ab(o(aF*ak)+" "+o((B-aE)*ak)+" m ");aB=aO[0];aA=aO[1];aG=k.length;aH=aF;aw=aE;for(aI=0;aI=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(s*2))/s))}}else{if(e&&k().ln!==u&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}}}var B=k(),r=this.getTextDimensions(p),t=1;if(B.x!==undefined&&B.ln===u){z=B.x+B.w}if(B.y!==undefined&&B.y===v){v=B.y}if(B.h!==undefined&&B.h===s){s=B.h}if(B.ln!==undefined&&B.ln===u){u=B.ln;t=0}if(e){v=s*(g()+t)}else{v=(v+(s*Math.abs(l()*f-u-l())))}this.rect(z,v,A,s);var q=/[а-яА-ЯЁё]/.test(p);if(q){this.text16(p,z+3,v+s-3)}else{this.text(p,z+3,v+s-3)}n(g()+t);d(z,v,A,s,u);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;qp){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;Ej){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;ok){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r")[0],g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;if(h.addEventListener){h.addEventListener("unload",i,false)}return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":if(console){console.log(b+": Data URIs are not supported on IE6-9.")}break;case"save":c=d;break}}})(pdfDataExport.API); +(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(C,B,x,A,y,v,w){var z=this;if(!z){z=window.jqx}z.hierarchy=y;z.exportFormat=v;z.filename=w;C.beginFile(w);n(C);k(C);C.endFile(w);return C.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(y){var x=this;if(!x){x=window.jqx}y.beginBody();if(x.hierarchy){var w=function(A){for(var z=0;zA.level&&w.index-10){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="https://jqwidgets.com/export_server/dataexport.php"}else{v="http://jquerygrid.net/export_server/dataexport.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(K,H,G,B){K=K.toString().toLowerCase();var D=c[K];if(typeof D==="undefined"){throw"You can't export to "+K+" format."}if(K==="pdf"&&B==undefined){var M=this.exportTo(K,H,K,"pdf");if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var L=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);L.cellInitialize();var J=b(M).find("th");var I=b(M).find("tr");var N=0;L.setFontSize(13*72/96);var F=595;switch(b.jqx.pdfExport.paperSize){case"legal":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=1008}break;case"letter":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=792}break;case"a3":var F=841;if(b.jqx.pdfExport.orientation!=="portrait"){F=1190}break;case"a4":var F=595;if(b.jqx.pdfExport.orientation!=="portrait"){F=842}break;case"a5":var F=420;if(b.jqx.pdfExport.orientation!=="portrait"){F=595}break}F-=20;var E=0;var C=[];b.each(J,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=25}var Q=P*72/96;C[O]=Q;E+=Q});if(J.length===0){b.each(I[0].cells,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=F/I[0].cells.length}var Q=P*72/96;C[O]=Q;E+=Q})}if(E>F){b.each(C,function(O){C[O]=(C[O]/E)*100;C[O]=C[O]*F/100})}b.each(J,function(P){var T=C[P];var S=25*72/96;var R=L.getTextDimensions(b(this).html());var Q=b(this).html();if(R.w+3>T){var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U.length>3){Q=U.substring(0,U.length-3)+"..."}else{Q=U.substring(0,1)+"..."}var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U!=Q){Q=U}}L.cell(10,10,T,S,Q,N)});N++;b.each(I,function(V){if(V===0){return true}var P=b(this).children();var Q=P.length>J.length&&J.length>0;if(Q){var Y=P.length-J.length;var Z="";var X=C[0];var U=25*72/96;for(var R=0;R<=Y;R++){var O=P[R].innerHTML;if(O==="+"||O==="-"){O=O+" "}if(O===" "){O=" "}Z+=O}var T=L.getTextDimensions(Z);if(T.w+3>X){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N);for(var R=Y+1;RX){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N)}N++;return true}b.each(P,function(ab){var af=C[ab];var ae=25*72/96;var ad=b(this).html();var ac=L.getTextDimensions(b(this).html());if(ac.w+3>af){var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag.length>3){ad=ag.substring(0,ag.length-3)+"..."}else{ad=ag.substring(0,1)+"..."}var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag!=ad){ad=ag}}L.cell(10,10,af,ae,ad,N)});N++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}return L}return d(D,u,q,j,H,G,B)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);if(F=="utf-8"||F=="UTF-8"){M.setFont("courier","normal")}M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(K.length===0){b.each(J[0].cells,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=G/J[0].cells.length}var S=R*72/96;C[Q]=S;E+=S})}if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length&&K.length>0;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;TZ){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();if(af===" "){af=" "}var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}M.save(B+".pdf");return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if((d&&d.toString()=="NaN")||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o'}else{g='\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t'}};this.beginHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t"}else{g+="\n\t\t\t\t"}}else{if(m.width){g+='\n\t\t\t\t"}else{g+='\n\t\t\t\t"}}}};this.endHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.beginBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}j=0};this.beginRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t"}else{g+="\n\t\t\t\t\t"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}}};this.endRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}};this.endBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.endFile=function(k){if(i||k==undefined){g+="\n
    '+m.text+"'+m.text+"'+m.text+"'+m.text+"'+m.text+"
    '+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"
    "}else{g+="\n\t\t\n\t\n\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='\n\t \n\t \n\t \n\t12.00 \n\t \n\t \n\t8130 \n\t15135 \n\t120 \n\t45 \n\tFalse \n\tFalse \n\t \n\t'};this.beginHeader=function(){l='\n\t\n\t\t';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q";return}l+="\n\t\t\t"};this.beginRows=function(p){l+="\n\t\t\t\t"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}l+="\n\t\t\t"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}};this.endBody=function(){l+="\n\t\t
    "};this.endFile=function(){l+="\n\t
    \n
    ";h+="\n\t"};this.getFile=function(){return h+l};function g(t,w,s,v){var r="String";var u=this.getFormat(w);if(t!=null&&t.toString().substring(0,3)=="_AG"){t=t.toString().substring(3);r="String"}else{if(u.type=="date"){var q=t;t=this.formatData(t,u.type,u.formatString,u.localization);if(t===null||t===""){t="";r="String"}else{t=q.toISOString();r="DateTime"}}if(u.type=="string"){if(t===null||t===undefined){t=""}else{if(t.toString().indexOf("&")>=0){t=t.toString().replace(/&/g,"&")}if(t.toString().indexOf(">")>=0){t=t.toString().replace(/>/g,">")}if(t.toString().indexOf("<")>=0){t=t.toString().replace(/=0){t=t.toString().replace(/"/g,""")}if(t.toString().indexOf("'")>=0){t=t.toString().replace(/'/g,"'")}}}if(s.dataType=="number"||s.dataType=="float"||s.dataType=="int"||s.dataType=="integer"){r="Number";t=parseFloat(t);if(t===null||isNaN(t)||t===""){t="";r="String"}if(t&&r!="String"&&t!=""){if(w&&w.formatString&&w.formatString.indexOf("p")>=0){t=t/100}}s.currencysymbol=w.localization.currencysymbol}}var p=f(s);if(s.merge){l+='\n\t\t\t\t'+t+""}else{l+='\n\t\t\t\t'+t+""}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='';e+="\n"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(h){var g=this;if(!g){g=window.jqx}if(h!=undefined){if(g.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.appendBodyCell=function(h,n,f,o,j,m){var k=this;if(!k){k=window.jqx}var l=this.getFormat(n);h=this.formatData(h,l.type,l.formatString,l.localization);if(l.type=="string"){if(h.toString().indexOf("&")>=0){h=h.toString().replace(/&/g,"&")}if(h.toString().indexOf(">")>=0){h=h.toString().replace(/>/g,">")}if(h.toString().indexOf("<")>=0){h=h.toString().replace(/=0){h=h.toString().replace(/"/g,""")}if(h.toString().indexOf("'")>=0){h=h.toString().replace(/'/g,"'")}}if(o.level!=undefined){if(k.hierarchy){e+="\n\t\t";for(var g=0;g"+h+""}else{e+="<"+m+">"+h+""}}else{if(m!=undefined){e+="\n\t\t<"+m+">"+h+""}else{e+="\n\t\t<"+c[d]+">"+h+""}}}else{e+="\n\t\t<"+c[d]+">"+h+""}d++};this.endRow=function(h){var g=this;if(!g){g=window.jqx}if(h!=undefined){if(g.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.endBody=function(){};this.endFile=function(){e+="\n
    "};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k>");ab("endobj");aA=f[aB].join("\n");w();if(av){k=[];for(ax=0;ax>8)&255,(ay>>16)&255,(ay>>24)&255])];aA="";for(ax in k){if(k.hasOwnProperty(ax)){aA+=String.fromCharCode.apply(null,k[ax])}}ab("<>")}else{ab("<>")}K(aA);ab("endobj")}D[1]=F;ab("1 0 obj");ab("<>");ab("endobj")},X=function(i){i.objectNumber=w();ab("<>");ab("endobj")},J=function(){var i;for(i in ai){if(ai.hasOwnProperty(i)){X(ai[i])}}},L=function(){G.publish("putXobjectDict")},x=function(){ab("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");ab("/Font <<");var i;for(i in ai){if(ai.hasOwnProperty(i)){ab("/"+i+" "+ai[i].objectNumber+" 0 R")}}ab(">>");ab("/XObject <<");L();ab(">>")},h=function(){J();G.publish("putResources");D[2]=F;ab("2 0 obj");ab("<<");x();ab(">>");ab("endobj");G.publish("postPutResources")},m=function(aw,k,ax){var i;if(Q[k]===i){Q[k]={}}Q[k][ax]=aw},au={},u=function(i,ax,az,aw){var ay="F"+(c(ai)+1).toString(10),k=ai[ay]={id:ay,PostScriptName:i,fontName:ax,fontStyle:az,encoding:aw,metadata:{}};m(ay,ax,az);G.publish("addFont",k);return ay},e=function(){var k="helvetica",aG="times",aI="courier",aF="normal",aE="bold",aD="italic",aH="bolditalic",ax="StandardEncoding",aA=[["Helvetica",k,aF],["Helvetica-Bold",k,aE],["Helvetica-Oblique",k,aD],["Helvetica-BoldOblique",k,aH],["Courier",aI,aF],["Courier-Bold",aI,aE],["Courier-Oblique",aI,aD],["Courier-BoldOblique",aI,aH],["Times-Roman",aG,aF],["Times-Bold",aG,aE],["Times-Italic",aG,aD],["Times-BoldItalic",aG,aH]],aC,ay,aB,az;for(aC=0,ay=aA.length;aC>8){aF=true}}aG=aw.join("")}}aC=aG.length;while(aF===az&&aC!==0){if(aG.charCodeAt(aC-1)>>8){aF=true}aC--}if(!aF){return aG}else{aw=ax.noBOM?[]:[254,255];for(aC=0,aA=aG.length;aC>8;if(aB>>8){throw new Error("Character at position "+aC.toString(10)+" of string '"+aG+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}aw.push(aB);aw.push(k-(aB<<8))}return String.fromCharCode.apply(az,aw)}},Z=function(k,i){return s(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Y=function(){ab("/Producer (pdfDataExport "+ao+")");if(O.title){ab("/Title ("+Z(O.title)+")")}if(O.subject){ab("/Subject ("+Z(O.subject)+")")}if(O.author){ab("/Author ("+Z(O.author)+")")}if(O.keywords){ab("/Keywords ("+Z(O.keywords)+")")}if(O.creator){ab("/Creator ("+Z(O.creator)+")")}var i=new Date();ab("/CreationDate (D:"+[i.getFullYear(),A(i.getMonth()+1),A(i.getDate()),A(i.getHours()),A(i.getMinutes()),A(i.getSeconds())].join("")+")")},W=function(){ab("/Type /Catalog");ab("/Pages 1 0 R");ab("/OpenAction [3 0 R /FitH null]");ab("/PageLayout /OneColumn");G.publish("putCatalog")},l=function(){ab("/Size "+(n+1));ab("/Root "+n+" 0 R");ab("/Info "+(n-1)+" 0 R")},ar=function(){g++;v=true;f[g]=[]},ah=function(){ar();ab(p(z*ak)+" w");ab(H);if(R!==0){ab(R.toString(10)+" J")}if(T!==0){ab(T.toString(10)+" j")}G.publish("addPage",{pageNumber:g})},y=function(aw,ay){var i,k;if(aw===k){aw=ai[d].fontName}if(ay===k){ay=ai[d].fontStyle}try{i=Q[aw][ay]}catch(ax){i=k}if(!i){throw new Error("Unable to look up font label for font '"+aw+"', '"+ay+"'. Refer to getFontList() for available fonts.")}return i},q=function(){v=false;t=[];D=[];ab("%PDF-"+U);aa();h();w();ab("<<");Y();ab(">>");ab("endobj");w();ab("<<");W();ab(">>");ab("endobj");var aw=F,k;ab("xref");ab("0 "+(n+1));ab("0000000000 65535 f ");for(k=1;k<=n;k++){ab(r(D[k])+" 00000 n ")}ab("trailer");ab("<<");l();ab(">>");ab("startxref");ab(aw);ab("%%EOF");v=true;return t.join("\n")},ac=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},I=function(az,aw){var ay,aB,aA,aC,ax,k;switch(az){case ay:return q();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return P.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return P.output("dataurlnewwindow")}}}aB=q();aA=aB.length;aC=new Uint8Array(new ArrayBuffer(aA));for(ax=0;axB){af=C;C=B;B=af}}else{if(E==="l"||E==="landscape"){E="l";if(B>C){af=C;C=B;B=af}}else{throw ("Invalid orientation: "+E)}}P.internal={pdfEscape:Z,getStyle:ac,getFont:function(){return ai[y.apply(P,arguments)]},getFontSize:function(){return aj},btoa:btoa,write:function(i,ax,aw,k){ab(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return p(i*ak)},getVerticalCoordinateString:function(i){return p((B-i)*ak)},collections:{},newObject:w,putStream:K,events:G,scaleFactor:ak,pageSize:{width:C,height:B},output:function(k,i){return I(k,i)}};P.addPage=function(){ah();return this};var ag=["","0","00","000","0000"];var j=function(aA,aw){var ax=["FEFF"];for(var az=0,k=aA.length,ay;az Tj\nT* <")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n<"+aB+"> Tj\nET");return this};P.text=function(aF,aE,aC,aw){var ax,aA,az,aD,k,aB,ay;if(typeof aF==="number"){aA=aC;az=aF;aD=aE;aF=aA;aE=az;aC=aD}if(typeof aF==="string"&&aF.match(/[\n\r]/)){aF=aF.split(/\r\n|\r|\n/g)}if(typeof aw==="undefined"){aw={noBOM:true,autoencode:true}}else{if(aw.noBOM===ax){aw.noBOM=true}if(aw.autoencode===ax){aw.autoencode=true}}if(typeof aF==="string"){aB=Z(aF,aw)}else{if(aF instanceof Array){k=aF.concat();for(ay=k.length-1;ay!==-1;ay--){k[ay]=Z(k[ay],aw)}aB=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n("+aB+") Tj\nET");return this};P.line=function(k,ax,i,aw){ab(p(k*ak)+" "+p((B-ax)*ak)+" m "+p(i*ak)+" "+p((B-aw)*ak)+" l S");return this};P.lines=function(k,aF,aE,aO,aK){var ay,aM,aC,aD,aB,aA,aI,aG,aN,aL,az,aJ,ax,aH,aw;if(typeof k==="number"){aM=aE;aC=k;aD=aF;k=aM;aF=aC;aE=aD}aK=ac(aK);aO=aO===ay?[1,1]:aO;ab(o(aF*ak)+" "+o((B-aE)*ak)+" m ");aB=aO[0];aA=aO[1];aG=k.length;aH=aF;aw=aE;for(aI=0;aI=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(s*2))/s))}}else{if(e&&k().ln!==u&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}}}var B=k(),r=this.getTextDimensions(p),t=1;if(B.x!==undefined&&B.ln===u){z=B.x+B.w}if(B.y!==undefined&&B.y===v){v=B.y}if(B.h!==undefined&&B.h===s){s=B.h}if(B.ln!==undefined&&B.ln===u){u=B.ln;t=0}if(e){v=s*(g()+t)}else{v=(v+(s*Math.abs(l()*f-u-l())))}this.rect(z,v,A,s);var q=/[а-яА-ЯЁё]/.test(p);if(q){this.text16(p,z+3,v+s-3)}else{this.text(p,z+3,v+s-3)}n(g()+t);d(z,v,A,s,u);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;qp){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;Ej){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;ok){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r")[0],g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;if(h.addEventListener){h.addEventListener("unload",i,false)}return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":if(console){console.log(b+": Data URIs are not supported on IE6-9.")}break;case"save":c=d;break}}})(pdfDataExport.API); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxdata.js --- a/www/jqwidgets/jqxdata.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxdata.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxdatatable.js --- a/www/jqwidgets/jqxdatatable.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxdatatable.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(b){b.jqx.jqxWidget("jqxDataTable","",{});b.extend(b.jqx._jqxDataTable.prototype,{defineInstance:function(){var c={altRows:false,aggregatesHeight:34,autoShowLoadElement:true,autoRowHeight:true,columnsHeight:30,columns:[],columnGroups:null,columnsResize:false,columnsReorder:false,dataview:null,disabled:false,editable:false,editSettings:{saveOnPageChange:true,saveOnBlur:true,saveOnSelectionChange:true,cancelOnEsc:true,saveOnEnter:true,editSingleCell:false,editOnDoubleClick:true,editOnF2:true},enableHover:true,enableBrowserSelection:false,filterHeight:35,filterable:false,filterMode:"default",groupsRenderer:null,groups:new Array(),headerZIndex:359,height:null,handleKeyboardNavigation:null,indentWidth:25,initRowDetails:false,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxDataTable raises the 'bindingComplete' event when the binding is completed.",localization:null,pagerHeight:40,pageSize:10,pageSizeOptions:["5","10","20"],pageable:false,pagerPosition:"bottom",pagerMode:"default",pageSizeMode:"default",pagerButtonsCount:5,pagerRenderer:null,ready:null,rendertoolbar:null,rowDetails:false,renderStatusBar:null,rendered:null,rendering:null,rtl:false,sortable:false,showtoolbar:false,showstatusbar:false,statusBarHeight:34,serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:b.jqx.utilities.scrollBarSize,touchScrollBarSize:b.jqx.utilities.touchScrollBarSize,showAggregates:false,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,beginEdit:null,endEdit:null,autokoupdates:true,columnsVirtualization:false,exportSettings:{columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,recordsInView:true,fileName:"jqxDataTable"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},toolbarHeight:34,tableZIndex:369,_updating:false,touchmode:"auto",width:null,that:this,incrementalSearch:true,events:["bindingComplete","sort","filter","pageChanged","pageSizeChanged","rowClick","rowDoubleClick","cellValueChanged","rowBeginEdit","rowEndEdit","rowSelect","rowUnselect","rowCheck","rowUncheck","columnResized","columnReordered","rowExpand","rowCollapse","cellBeginEdit","cellEndEdit"]};if(this===b.jqx._jqxDataTable.prototype){return c}b.extend(true,this,c);this.that=this;return c},createInstance:function(e){var l=this;if(b.jqx.utilities.scrollBarSize!=13){l.scrollBarSize=b.jqx.utilities.scrollBarSize}if((l.element.nodeName.toLowerCase()=="table")||b(l.element).children("table").length>0){var n=l.host.find("tbody tr");var d=l.host.find("th");var w=new Array();if(d.length===0){d=n[0];n.splice(0,1)}if(l.localizestrings){l.localizestrings();if(l.localization!=null){l.localizestrings(l.localization,false)}}var z=[];for(var u=0;u
    ");var m=l.host.parent();var q=l.host.data();q.jqxDataTable.host=m;q.jqxDataTable.element=m[0];l.host.parent()[0].id=l.element.id;try{l.host.parent()[0].style=l.element.style}catch(r){}l.element=m[0];l.host=m;l.host.data(q);var o={dataFields:w,localdata:z,datatype:"array"};var y=new b.jqx.dataAdapter(o);l.source=y}if(l.source&&!l.source.dataBind){l.source=new b.jqx.dataAdapter(l.source)}var x=l.source._source.datafields;if(x&&x.length>0){l._camelCase=l.source._source.dataFields!==undefined;l.selectionMode=l.selectionMode.toLowerCase()}if(l.host.attr("tabindex")==null){l.host.attr("tabindex","0")}l.host.attr("role","grid");l.host.attr("align","left");l.host.addClass(l.toTP("jqx-grid"));l.host.addClass(l.toTP("jqx-reset"));l.host.addClass(l.toTP("jqx-rc-all"));l.host.addClass(l.toTP("jqx-widget"));l.host.addClass(l.toTP("jqx-widget-content"));if(l._testmodules()){return}l.render(true);b.jqx.utilities.resize(l.host,function(){var A=b(window).width();var i=b(window).height();var j=l.host.width();var B=l.host.height();if(l._lastHostWidth!=j||l._lastHostHeight!=B){l._updatesize(l._lastHostWidth!=j,l._lastHostHeight!=B)}l._lastWidth=A;l._lastHeight=i;l._lastHostWidth=j;l._lastHostHeight=B})},getvaluebytype:function(h,d){var f=h;if(h==null){return h}if(this.gridlocalization.decimalseparator==","){if(h.indexOf(this.gridlocalization.decimalseparator)>=0){h=h.replace(this.gridlocalization.decimalseparator,".")}}if(h.indexOf(this.gridlocalization.currencysymbol)>=0){h=h.replace(this.gridlocalization.currencysymbol,"")}if(h.indexOf(this.gridlocalization.percentagesymbol)>=0){h=h.replace(this.gridlocalization.percentagesymbol,"")}if(b.isArray(h)&&d.type!="array"){for(var e=0;e
    ');var d=b('
    '+this.gridlocalization.loadtext+"
    ");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var c=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){c=true}}if(c){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var e=false;if(this.width==="auto"||this.width===null||this.autoWidth){e=true}if(e){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(d){var c=b("measure Text");c.addClass(this.toTP("jqx-widget"));b(document.body).append(c);if(d=="cell"){this._cellheight=c.height()}else{this._columnheight=c.height()}c.remove()},_testmodules:function(){var g="";var e=this;var c=function(){if(g.length!=""){g+=","}};if(!this.host.jqxScrollBar){c();g+=" jqxscrollbar.js"}if(!this.host.jqxButton){c();g+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){c();g+=" jqxdata.js"}if(g!=""||this.editable||this.filterable||this.pageable){var d=[];var f=function(h){switch(h){case"checkbox":if(!e.host.jqxCheckBox&&!d.checkbox){d.checkbox=true;c();g+=" jqxcheckbox.js"}break;case"dropdownlist":if(!e.host.jqxDropDownList&&!d.dropdownlist){c();d.dropdownlist=true;g+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!e.host.jqxListBox&&!d.listbox){c();d.listbox=true;g+=" jqxlistbox.js"}}break}};if((this.filterable&&this.filterMode!="simple")||(this.pagerMode=="advanced"&&this.pageable)){f("dropdownlist")}if(g!=""){throw new Error("jqxDataTable: Missing references to the following module(s): "+g);this.host.remove();return true}}return false},focus:function(){try{this.wrapper.focus();this.host.focus();var d=this;setTimeout(function(){d.wrapper.focus();d.host.focus()},25);this.focused=true}catch(c){}},hiddenParent:function(){return b.jqx.isHidden(this.host)},isBindingCompleted:function(){return !this._loading},_updatesize:function(i,h){if(this._loading){return}var f=this;var g=f.host.width();var e=f.host.height();if(!f._oldWidth){f._oldWidth=g}if(!f._oldHeight){f._oldHeight=e}if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer);f._resizeTimer=null}var d=300;var c=function(){if(f._resizeTimer){clearTimeout(f._resizeTimer)}f.resizingGrid=true;if(b.jqx.isHidden(f.host)){return}f._updatecolumnwidths();f.refresh();f._oldWidth=g;f._oldHeight=e;f.resizingGrid=false};c();f._resizeTimer=setTimeout(function(){var k=f.host.width();var j=f.host.height();if(f._oldWidth!=k||f._oldHeight!=j){c()}},d)},resize:function(d,c){if(d!=undefined){this.width=d}if(c!=undefined){this.height=c}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c=b.jqx.mobile.isTouchDevice();this.touchDevice=c;if(this.touchmode==true){c=true;b.jqx.mobile.setMobileSimulator(this.table[0]);this.touchDevice=c}else{if(this.touchmode==false){c=false}}if(c){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return c},toTP:function(c){return this.toThemeProperty(c)},localizestrings:function(c,f){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(c!=null){for(var h in c){if(h.toLowerCase()!==h){c[h.toLowerCase()]=c[h]}}var j=["pagergotopagestring","pagershowrowsstring","pagerrangestring","pagernextbuttonstring","pagerpreviousbuttonstring","pagerfirstbuttonstring","pagerlastbuttonstring","toppagerstring","firstDay","days","months","AM","PM","patterns","percentsymbol","currencysymbol","currencysymbolposition","decimalseparator","thousandsseparator","filterapplystring","filteraddnew","filtercancelstring","filterclearstring","filterstring","filterstringcomparisonoperators","filternumericcomparisonoperators","filterdatecomparisonoperators","filterbooleancomparisonoperators","emptydatastring","filterselectstring","todaystring","clearstring","validationstring","loadtext","filtersearchstring","loadingErrorMessage"];var g=this;for(var e=0;eg&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}else{this.vScrollBar[0].style.visibility="hidden"}if((h!=this.vScrollBar[0].style.visibility)){this._updatecolumnwidths();var i=this.table.height();if(j!=i){j=i;if(!q&&j>g&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}}}if(this.scrollBarSize==0){n=0}var o=this.table?this.table.width():0;if(o>3){o-=3}var c=parseInt(this.host.css("border-left-width"))+parseInt(this.host.css("border-right-width"));var r=c+this.host.width()-n;if(o>r&&!p){this.hScrollBar[0].style.visibility=e;this.hScrollBar.jqxScrollBar({max:o-r});n=4+parseInt(d);if(d==0){n=0}if(!q){if(j>g-n+4&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.hScrollBar.jqxScrollBar({max:c+o-r});var f=this.vScrollBar[0].style.visibility==="hidden";this.vScrollBar[0].style.visibility=e;this._updatecolumnwidths();if(f){this.hScrollBar.jqxScrollBar({max:o-r+n+c})}var k=this.table?this.table.width():0;if(k>3){k-=3}if(k!=o){if(k"+e+"");d.addClass(this.toTP("jqx-widget"));d.addClass(this.toTP("jqx-grid"));d.addClass(this.toTP("jqx-grid-column-header"));d.addClass(this.toTP("jqx-widget-header"));b(document.body).append(d);var c=d.outerWidth()+20;d.remove();return c},_arrangeAutoHeight:function(e){if(!e){e=0}if(this.height==="auto"||this.height===null||this.autoheight){var h=this.table.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:-1}else{g+=this.showHeader?this.columnsheader.height():-1}g+=this.showstatusbar?this.statusBarHeight:0;g+=this.showAggregates?this.aggregatesHeight:0;g+=this.showtoolbar?this.toolbarHeight:0;g+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){g+=this.pageable?this.pagerHeight:0}g+=h;if(this.filterable){var f=this.filter.find(".filterrow");var c=this.filter.find(".filterrow-hidden");var d=1;if(c.length>0){d=0}g+=this.filterHeight-1+this.filterHeight*f.length*d}if(g+e>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(g+e)}return true}return false},_arrangeAutoWidth:function(e){if(!e){e=0}if(this.width==="auto"||this.width===null||this.autowidth){var d=0;for(var f=0;fthis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(g+e)}return true}return false},_measureTopAndHeight:function(){var d=this.host.height();var h=0;if(this.showtoolbar){h+=this.toolbarHeight;d-=parseInt(this.toolbarHeight)}if(this.filterable){var g=this.filter.find(".filterrow");var e=this.filter.find(".filterrow-hidden");var f=1;if(e.length>0){f=0}h+=this.filterHeight;d-=parseInt(this.filterHeight);var c=f==1?g.length:0;h+=this.filterHeight*c;d-=this.filterHeight*c}if(this.pageable&&this.pagerPosition!="bottom"){h+=parseInt(this.pagerHeight)+1;if(d>this.pagerHeight&&this.pagerPosition==="both"){d-=parseInt(this.pagerHeight)}}return{top:h,height:d}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var v=this.host.width();var r=this.host.height();var j=r;var i=this;if(this.pageable){if(this.pagerPosition==="bottom"){this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="both"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="top"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="hidden"}}}}else{this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="hidden"}var q=0;if(this.showtoolbar){this.toolbar.width(v);this.toolbar.height(this.toolbarHeight-1);this.toolbar.css("top",0);q+=this.toolbarHeight;r-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.filterable){this.filter.width(v);this.filter.css("top",q);var t=this.filter.find(".filterrow");var h=this.filter.find(".filterrow-hidden");var A=1;if(h.length>0){A=0}this.filter.height(this.filterHeight-1+this.filterHeight*t.length*A);q+=this.filterHeight;r-=parseInt(this.filterHeight);var x=A==1?t.length:0;q+=this.filterHeight*x;r-=this.filterHeight*x}if(this.showstatusbar){this.statusbar.width(!this.table?v:Math.max(v,this.table.width()));this.statusbar.height(this.statusBarHeight-1)}else{this.statusbar[0].style.height="0px"}if(this.showAggregates){this.aggregates.height(this.aggregatesHeight-1)}else{this.aggregates[0].style.height="0px"}if(this.pageable&&this.pagerPosition!="bottom"){this.toppager[0].style.width=v+"px";this.toppager[0].style.height=parseInt(this.pagerHeight)+"px";this.toppager[0].style.top=parseInt(q)+"px";q+=parseInt(this.pagerHeight)+1;if(r>this.pagerHeight){r-=parseInt(this.pagerHeight)}}else{if(this.toppager[0].style.width!=v+"px"){this.toppager[0].style.width=parseInt(v)+"px"}if(this.toppager[0].style.height!=this.pagerHeight+"px"){this.toppager[0].style.height=parseInt(this.pagerHeight)+"px"}if(this.toppager[0].style.top!=q+"px"){this.toppager[0].style.top=q+"px"}var y=this.pagerPosition!="bottom"?this.pagerHeight:0;var d=q+y+"px";if(this.content[0].style.top!=d){this.content[0].style.top=q+this.pagerHeight+"px"}}this._updateScrollbars(j);var c=parseInt(this.scrollBarSize);var n=4;var e=2;var f=0;if(this.vScrollBar[0].style.visibility!="hidden"){f=c+n}if(this.hScrollBar[0].style.visibility!="hidden"){e=c+n+2}if(c==0){f=0;e=0}if(this.showAggregates){if(this.hScrollBar[0].style.visibility==="hidden"){this.aggregates.width(!this.table?v:Math.max(v,this.table.width())+4)}else{this.aggregates.width("auto")}}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var w=this._arrangeAutoHeight(e-2);var s=this._arrangeAutoWidth(f+1);if(w||s){var v=this.host.width();this.toppager[0].style.width=parseInt(v)+"px";this.toolbar[0].style.width=parseInt(v)+"px";this.statusbar[0].style.width=parseInt(v)+"px";this.filter[0].style.width=parseInt(v)+"px"}if(w){var B=this._measureTopAndHeight();q=B.top;r=B.height}}var m=0;if(this.pageable){m=this.pagerHeight;if(this.pagerPosition!="top"){e+=this.pagerHeight}}if(this.showAggregates){e+=this.aggregatesHeight;m+=this.aggregatesHeight}if(this.showstatusbar){e+=this.statusBarHeight;m+=this.statusBarHeight}if(this.hScrollBar[0].style.height!=c+"px"){this.hScrollBar[0].style.height=parseInt(c)+"px"}if(this.hScrollBar[0].style.top!=q+r-n-c-m+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=q+r-n-c-m-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var g=false;var z=false;if(f==0){if(l!=(v-2)+"px"){this.hScrollBar[0].style.width=(v-2)+"px";g=true}}else{if(l!=(v-c-n)+"px"){this.hScrollBar[0].style.width=(v-c-n+"px");g=true}}if(this.vScrollBar[0].style.width!=c+"px"){this.vScrollBar[0].style.width=c+"px";z=true}if(this.vScrollBar[0].style.height!=parseInt(r)-e+"px"){this.vScrollBar[0].style.height=(parseInt(r)-e+"px");z=true}if(this.vScrollBar[0].style.left!=parseInt(v)-parseInt(c)-n+"px"||this.vScrollBar[0].style.top!=q+"px"){this.vScrollBar[0].style.top=q+"px";this.vScrollBar[0].style.left=parseInt(v)-parseInt(c)-n+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:q});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:c+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var u=this.hScrollInstance;u.disabled=this.disabled;if(g){u.refresh()}if(z){k.refresh()}var o=function(C){if((C.vScrollBar[0].style.visibility!="hidden")&&(C.hScrollBar[0].style.visibility!="hidden")){C.bottomRight[0].style.visibility="inherit";C.bottomRight[0].style.left=1+parseInt(C.vScrollBar.css("left"))+"px";C.bottomRight[0].style.top=parseInt(C.hScrollBar.css("top"))+"px";if(C.rtl){C.bottomRight.css("left","0px")}C.bottomRight[0].style.width=parseInt(c)+3+"px";C.bottomRight[0].style.height=parseInt(c)+4+"px";if(C.showAggregates){C.bottomRight.css("z-index",99);C.bottomRight.height(parseInt(c)+4+C.aggregatesHeight);C.bottomRight.css({top:parseInt(C.hScrollBar.css("top"))-C.aggregatesHeight})}}else{C.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=v-f+"px"){this.content[0].style.width=v-f+"px"}if(this.content[0].style.height!=r-e+3+"px"){this.content[0].style.height=r-e+3+"px"}if(this.content[0].style.top!=q+"px"){this.content[0].style.top=parseInt(q)+"px"}if(this.rtl){this.content.css("left",f);if(this.filter&&(this.filter.children().length>0)){b(this.filter.children()).css("left",f)}if(this.table){var p=this.table.width();if(p0)){b(this.filter.children()).css("left",v-p+2)}}}}if(this.showAggregates){this.aggregates.css("top",q+r-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0));if(this.rtl){this.aggregates.css("left","0px")}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({top:q+r-n-c-m+this.aggregatesHeight+"px"});this.aggregates.css("top",1+q+r-c-5-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0))}o(this)}if(this.showstatusbar){this.statusbar.css("top",q+r-this.statusBarHeight-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.statusbar.css("left",this.content.css("left"))}else{this.statusbar.css("left","0px")}}}if(this.pageable){this.pager[0].style.width=v+"px";this.pager[0].style.height=this.pagerHeight+"px";this.pager[0].style.top=parseInt(q)+parseInt(r)-parseInt(this.pagerHeight)-1+"px"}else{this.pager[0].style.height="0px"}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(v!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(r!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostwidth=v},scrollOffset:function(e,d){if(arguments.length==0||(e!=null&&typeof(e)=="object"&&!e.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(e!=null&&typeof(e)=="object"){var d=e.left;var c=e.top;var e=c}if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(c){if(c==null||c==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",c)}},scrolltop:function(c){if(c==null||c==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",c)}},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(c){this._updating=false;if(c===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(h,j,c){if(this.loadingstate===true){return}var d=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){b(this.dataloadelement).css("visibility","visible");b(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none")}}var g=this;if(h==null){h={}}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataView();this.dataview.pageable=this.pageable;this.dataview.grid=this;if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pageSize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pageSize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}}this._loading=true;this.dataview.update=function(y){g._loading=false;g.rowsByKey=new Array();var C=g.source._source.datafields;if(g.groups&&g.groups.length>0){var s=Object.prototype.toString;var m=g.groups[0];Object.prototype.toString=(typeof m=="function")?m:function(){return this[m]};if(!g.source.records.sort){var u=new Array();var q=0;var E=0;var D={};b.each(D,function(){u[E+q++]=this});D=u}g.source.records.sort(function(G,F){if(G===undefined){G=null}if(F===undefined){F=null}if(G===null&&F===null){return 0}if(G===null&&F!==null){return -1}if(G!==null&&F===null){return 1}var J=0;var I=0;if(G&&G.uid){J=G.uid}if(F&&F.uid){I=F.uid}G=G.toString();F=F.toString();if(b.jqx.dataFormat.isNumber(G)&&b.jqx.dataFormat.isNumber(F)){if(GF){return 1}return 0}else{if(b.jqx.dataFormat.isDate(G)&&b.jqx.dataFormat.isDate(F)){if(GF){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(G)&&!b.jqx.dataFormat.isNumber(F)){G=String(G).toLowerCase();F=String(F).toLowerCase()}}}try{if(GF){return 1}}catch(H){var K=H}if(typeof(J)=="number"){if(JI){return 1}}return 0});Object.prototype.toString=s}for(var A=0;A0){var t=function(F){for(var G=0;G0){t(F[G].records)}}};t(p.records)}if(A===0){var n=false;if(C){for(var z=0;z-1||l.toString().indexOf(g.gridlocalization.percentsymbol)>-1){var v=l.toString().split(" ").length;var k=new Number(g._toNumber(l.toString()));if(!isNaN(k)&&v==1){C[z].type="number"}}if(b.jqx.dataFormat.isNumber(l)||(!isNaN(parseFloat(l))&&isFinite(l))){C[z].type="number"}if(b.jqx.dataFormat.isDate(l)){C[z].type="date"}}}}if(n){for(var z=0;zg-c){this.hScrollBar.jqxScrollBar("setPosition",g-c)}else{if(g>e){this.hScrollBar.jqxScrollBar("setPosition",h+g-e)}}}},ensurerowvisiblebykey:function(o){if(this.vScrollBar[0].style.visibility==="hidden"){return false}var p=this._getuirow(o);if(!p){return}var m=this.vScrollBar.jqxScrollBar("value");var e=this.host.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:0}else{g+=this.showHeader?this.columnsheader.height():0}if(this.filterable){g+=this.filter.height()}if(this.pageable){if(this.pagerPosition==="top"){g+=this.pagerHeight}}if(this.showtoolbar){g+=this.toolbarHeight}e-=g;if(this.pageable&&this.pagerPosition!=="top"){e-=this.pagerHeight}if(this.showstatusbar){e-=this.statusBarHeight}if(this.showAggregates){e-=this.aggregatesHeight}if(this.hScrollBar.css("visibility")!="hidden"){e-=20}var n=this.host.coord().top+g;var f=m;var c=e+f;var i=p.coord().top+m-n;i=Math.round(i);var l=i+p.outerHeight();l=Math.round(l);if(Math.round(p.position().top)===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var j=b(this._table.children()[1]).children().length-1;var d=this._getuikey(j);var k=this._getuirow(d);if(k){if(k[0]===p[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}}if(ic){return this.vScrollBar.jqxScrollBar("setPosition",4+l-e)}},ensureRowVisible:function(c){var d=this._getkey(c);this.ensurerowvisiblebykey(d)},getColumn:function(c){var d=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==c||this.displayfield==c){d=this;return false}})}return d},_setcolumnproperty:function(e,g,h){if(e==null||g==null||h==null){return null}var d=g;g=g.toLowerCase();var f=this.getColumn(e);if(f==null){return}var i=f[g];f[g]=h;f[d]=h;var c=this.getColumn(e);if(c!=null){c[g]=h}switch(g){case"filteritems":case"text":case"editable":case"resizable":case"draggable":case"hidden":case"hideable":case"renderer":case"cellsrenderer":case"align":case"aggregates":case"cellsalign":case"cellsformat":case"pinned":case"contenttype":case"filterable":case"groupable":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(g=="align"){this._rendercolumnheaders();this.refresh()}else{if(g=="text"||g=="class"||g=="hidden"||g=="pinned"||g=="resizable"||g=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(g=="width"||g=="maxwidth"||g=="minwidth"){f._width=null;f._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(c,e){if(c==null||e==null){return null}e=e.toLowerCase();var d=this.getColumn(c);return d[e]},setColumnProperty:function(c,d,e){this._setcolumnproperty(c,d,e)},hideColumn:function(c){this._setcolumnproperty(c,"hidden",true)},showColumn:function(c){this._setcolumnproperty(c,"hidden",false)},updateBoundData:function(d,c){this.databind(this.source,d,c)},refresh:function(c){if(c!=true){if(b.jqx.isHidden(this.host)){return}this.vScrollInstance.setPosition(0);this._renderrows();this.updatepagerdetails();this._arrange();if(this._arrangeFilterRow){this._arrangeFilterRow()}this._renderhorizontalscroll();this._showicons();if(this.showAggregates){this._updateaggregates()}this._updateTouchScrolling()}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var d="www.jqwidgets.com";if(location.hostname.indexOf(d.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var e=String.fromCharCode(83,80,65,78);var c=String.fromCharCode(72,84,84,80,58,47,47);var f=document.createElement(e);f.id=b.jqx.utilities.createId();f.innerHTML=d;f.style.position="absolute";f.style.right="5px";f.style.bottom="5px";f.style.color="#909090";f.style.cursor="pointer";f.style.zIndex="999999";f.style.display="none";f.style.fontSize="9px";f.onmousedown=function(){open(c+d)};this.content[0].appendChild(f);this._gridRenderElement=f}}},_updateTouchScrolling:function(){var d=this.that;if(d.isTouchDevice()){var f=b.jqx.mobile.getTouchEventName("touchstart");var e=b.jqx.mobile.getTouchEventName("touchend");var c=b.jqx.mobile.getTouchEventName("touchmove");if(d.table){d.removeHandler(d.table,f+".touchScroll");d.removeHandler(d.table,c+".touchScroll");d.removeHandler(d.table,e+".touchScroll");d.removeHandler(d.table,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(d.table[0],Math.max(d.vScrollInstance.max,d.hScrollInstance.max),function(i,h){if(h!=null&&d.vScrollBar.css("visibility")!="hidden"){var g=d.vScrollInstance.value;d.vScrollInstance.setPosition(h)}if(i!=null&&d.hScrollBar.css("visibility")!="hidden"){var g=d.hScrollInstance.value;d.hScrollInstance.setPosition(i)}d.scrolled=new Date();d.vScrollInstance.thumbCapture=true},this.element.id,this.hScrollBar,this.vScrollBar)}}},_showicons:function(){if(!this.table){return}for(var e=0;e0){c.css("margin-right",4+h+"px")}else{c.css("margin-right","4px")}}else{if(h>0){c.css("margin-left",4+h+"px")}else{c.css("margin-left","4px")}}}}},render:function(j){var f="
    ";this.element.innerText="";this.element.innerHTML=f;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var h=this.host.find("#verticalScrollBar"+this.element.id);var l=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=h.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=l.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=b.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=b.data(this.hScrollBar[0],"jqxScrollBar").instance;this.filter=this.host.find("#filter");this.filter[0].id="filter"+this.element.id;this.filter.addClass(this.toTP("jqx-widget-header"));this.filter.addClass(this.toTP("jqx-grid-toolbar"));this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-grid-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.aggregates=this.host.find("#aggregates");this.aggregates[0].id="aggregates"+this.element.id;this.aggregates.addClass(this.toTP("jqx-grid-statusbar"));this.aggregates.addClass(this.toTP("jqx-widget-header"));this.statusbar=this.host.find("#statusbar");this.statusbar[0].id="statusbar"+this.element.id;this.statusbar.addClass(this.toTP("jqx-grid-statusbar"));this.statusbar.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.toppager=this.host.find("#toppager");this.toppager.addClass(this.toTP("jqx-grid-pager-top"));this.toppager.addClass(this.toTP("jqx-widget-header"));this.gridtable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var c=this.source.datafields;if(c==null&&this.source._source){c=this.source._source.datafields}if(c){for(var d=0;d2){for(var k=0;k
    ');e.columnsheader.remove();e.columnsheader.addClass(e.toTP("jqx-widget-header"));e.columnsheader.addClass(e.toTP("jqx-grid-header"));if(!e.showHeader){e.columnsheader.css("display","none")}else{if(e.columnsheader){e.columnsheader.css("display","block")}}e.gridcontent=e.gridcontent||b('
    ');e.gridcontent.remove();var d=e.columnsHeight;d=e._preparecolumnGroups();e.columnsheader.height(d);e.content.append(e.columnsheader);e.content.append(e.gridcontent);e._rendercolumnheaders();e.tableheight=null;e.gridcontent.find("#contenttable"+e.element.id).remove();if(e.table!=null){e.table.remove();e.table=null}e.table=b('
    ');e.gridcontent.addClass(e.toTP("jqx-grid-content"));e.gridcontent.addClass(e.toTP("jqx-widget-content"));e.gridcontent.append(e.table);e._renderrows();if(e.filterable){e._renderfilter()}if(e.pageable){e._initpager()}e._arrange();if(e.renderStatusBar){e.renderStatusBar(e.statusbar)}if(e.rendertoolbar){e.rendertoolbar(e.toolbar)}if(e.showAggregates){e._updateaggregates()}if(e.disabled){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}e._renderhorizontalscroll();e._showicons();e._addHandlers()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},_initpager:function(){var g=this;var c=this.gridlocalization.pagergotopagestring;var i=this.gridlocalization.pagerrangestring;var d=this.gridlocalization.pagershowrowsstring;var h=(this.pagerHeight-28)/2;this.pagerdiv=this.pagerdiv||b('
    ');this.toppagerdiv=this.toppagerdiv||b('
    ');if(!this.pageable){this.pagerdiv.remove();this.toppagerdiv.remove();return}if(!this.pagerRenderer){this.pagerdiv.css("top",h);this.toppagerdiv.css("top",h);var f=function(s,E){var n=this;var r=b('
    ');var D=b('
    ');var t=b('
    ');var j=b('
    ');var m=b('
    ');var q=b('
    ');var z=b('
    ');var x=b('
    ');var p=b('
    ');r.attr("disabled",n.disabled);var A=b('
    ');A[0].id="gridpagerlist"+E+n.element.id;n.removeHandler(t,"mousedown");n.removeHandler(t,"mouseup");n.removeHandler(t,"click");n.removeHandler(j,"mousedown");n.removeHandler(j,"mouseup");n.removeHandler(j,"click");n.removeHandler(m,"mousedown");n.removeHandler(m,"mouseup");n.removeHandler(m,"click");n.removeHandler(q,"mousedown");n.removeHandler(q,"mouseup");n.removeHandler(q,"click");if(!n.rtl){j.attr("title",n.gridlocalization.pagerpreviousbuttonstring);t.attr("title",n.gridlocalization.pagernextbuttonstring)}else{t.attr("title",n.gridlocalization.pagerpreviousbuttonstring);j.attr("title",n.gridlocalization.pagernextbuttonstring)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){p.css("padding-top","3px")}this["pagerfirst"+E]=m;this["pagerlast"+E]=q;this["pagernext"+E]=t;this["pagerprevious"+E]=j;this["pagergotoinput"+E]=r;this["pagerdetails"+E]=z;this["pagershowrows"+E]=x;this["pagergotolabel"+E]=D;this["pagershowrowscombo"+E]=A;this["pagerbuttons"+E]=p;if(n.pagerMode=="default"){if(!n.rtl){m.attr("title",n.gridlocalization.pagerfirstbuttonstring);q.attr("title",n.gridlocalization.pagerlastbuttonstring)}else{q.attr("title",n.gridlocalization.pagerfirstbuttonstring);m.attr("title",n.gridlocalization.pagerlastbuttonstring)}var v=b("
    ");v.addClass(n.toThemeProperty("jqx-icon-arrow-first"));m.wrapInner(v);var o=b("
    ");o.addClass(n.toThemeProperty("jqx-icon-arrow-last"));q.wrapInner(o);if(!n.rtl){s.append(m);s.append(j);s.append(p);s.append(t);s.append(q)}else{s.append(q);s.append(t);s.append(p);s.append(j);s.append(m)}q.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});m.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var C=!n.rtl?"left":"right";p.css("float",C);q.css("float",C);m.css("float",C);t.css("float",C);j.css("float",C);z.css("float",n.rtl?"left":"right");if(n.rtl){z.css("margin-left","7px");z.css("margin-right","0px")}else{z.css("margin-left","0px");z.css("margin-right","7px")}}else{if(!n.rtl){s.append(t);s.append(j)}}t.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});j.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var k=b("
    ");k.addClass(n.toThemeProperty("jqx-icon-arrow-left"));j.wrapInner(k);var l=b("
    ");l.addClass(n.toThemeProperty("jqx-icon-arrow-right"));t.wrapInner(l);if(!n.rtl){s.append(z)}if(n.pagerMode!="default"){if(!n.rtl){s.append(A);s.append(x);s.append(r);s.append(D)}else{s.append(D);s.append(r);s.append(x);s.append(A);s.append(z);s.append(t);s.append(j)}var u=n.pageSizeOptions;A.jqxDropDownList({_checkForHiddenParent:false,rtl:n.rtl,disabled:n.disabled,source:u,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:28,theme:n.theme});var B=0;for(var y=0;y=u[y]){B=y}}D[0].innerHTML=c;A.jqxDropDownList({selectedIndex:B});var w=r.find("input");w.addClass(n.toThemeProperty("jqx-input"));w.addClass(n.toThemeProperty("jqx-widget-content"));if(this.rtl){w.css("direction","rtl")}var n=this;this.removeHandler(A,"select");this.addHandler(A,"select",function(K){if(K.args){if(n.vScrollInstance){n.vScrollInstance.setPosition(0)}var I=K.args.index;n.pagershowrowscombotop.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.renderSelection("mouse");n.pagershowrowscombotop.data().jqxDropDownList.instance.renderSelection("mouse");var L=n.dataview.pagenum*n.dataview.pagesize;var H=u[I];var J=n.pageSize;n.pageSize=parseInt(H);if(isNaN(n.pageSize)){n.pageSize=10}if(H>=100){n.pagershowrowscombotop.jqxDropDownList({width:55});n.pagershowrowscombobottom.jqxDropDownList({width:55})}else{n.pagershowrowscombotop.jqxDropDownList({width:44});n.pagershowrowscombobottom.jqxDropDownList({width:44})}n.dataview.pagesize=n.pageSize;var G=Math.floor(L/n.dataview.pagesize);if(G!==n.dataview.pagenum||parseInt(H)!==parseInt(J)){n._raiseEvent("pageSizeChanged",{pagenum:G,oldpageSize:J,pageSize:n.dataview.pagesize});var F=n.goToPage(G);if(!F){if(!n.serverProcessing){n.refresh()}else{n.updateBoundData("pager")}}}}});var r=r.find("input");r.addClass(n.toThemeProperty("jqx-grid-pager-input"));r.addClass(n.toThemeProperty("jqx-rc-all"));this.removeHandler(r,"keydown");this.removeHandler(r,"change");n.addHandler(r,"keydown",function(F){if(F.keyCode>=65&&F.keyCode<=90){return false}if(F.keyCode=="13"){var G=r.val();G=parseInt(G);if(!isNaN(G)){n.goToPage(G-1)}return false}});n.addHandler(r,"change",function(){var F=r.val();F=parseInt(F);if(!isNaN(F)){n.goToPage(F-1)}})}x[0].innerHTML=d;n.addHandler(t,"mouseenter",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseenter",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mouseleave",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseleave",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mousedown",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(t,"mouseup",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(j,"mousedown",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});n.addHandler(j,"mouseup",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});if(n.pagerMode==="default"){n.addHandler(q,"mouseenter",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseenter",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mouseleave",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseleave",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mousedown",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mousedown",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))});n.addHandler(q,"mouseup",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mouseup",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))})}n.addHandler(b(document),"mouseup.pagerbuttons"+E+this.element.id,function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"));k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"));if(o){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"));v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))}});n.addHandler(t,"click",function(){if(!t.jqxButton("disabled")){if(!n.rtl){n.goToNextPage()}else{n.goToPrevPage()}}});n.addHandler(j,"click",function(){if(!j.jqxButton("disabled")){if(!n.rtl){n.goToPrevPage()}else{n.goToNextPage()}}});if(this.pagerMode==="default"){n.addHandler(m,"click",function(){if(!m.jqxButton("disabled")){if(!n.rtl){n.goToPage(0)}else{var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}}});n.addHandler(q,"click",function(){if(!q.jqxButton("disabled")){if(!n.rtl){var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}else{n.goToPage(0)}}})}};this.pagerdiv.children().remove();this.toppagerdiv.children().remove();f.call(this,this.pagerdiv,"bottom");f.call(this,this.toppagerdiv,"top");this.pager.append(this.pagerdiv);this.toppager.append(this.toppagerdiv);this.updatepagerdetails()}else{this.pagerdiv.children().remove();this.toppager.children().remove();var e=this.pagerRenderer();if(e!=null){this.pagerdiv.append(b(e))}this.pager.append(this.pagerdiv);var e=this.pagerRenderer();if(e!=null){this.toppagerdiv.append(b(e))}this.toppager.append(this.toppagerdiv)}},_updatepagertheme:function(){},goToPage:function(f,h){if(this._loading){return false}if(this.editKey!=undefined){if(this.editSettings.saveOnPageChange){var e=this.endroweditbykey(this.editKey);if(!e){return false}}else{return false}}if(f==null||f==undefined){f=0}if(f==-1){f=0}if(f<0){return false}var d=this.dataview.totalrecords;var g=this.dataview.pagenum;var c=Math.ceil(d/this.pageSize);if(f>=c){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(f>0){f=c-1}}if(this.dataview.pagenum!=f){if(this.pageable){this.dataview.pagenum=f;this._raiseEvent("pageChanged",{pagenum:f,oldpagenum:g,pageSize:this.dataview.pagesize})}if(!this.serverProcessing){this.refresh();if(h){if(b.isFunction(h)){h()}}}else{this.updateBoundData("pager",h)}return true}return false},goToPrevPage:function(e){if(this.dataview.pagenum>0){return this.goToPage(this.dataview.pagenum-1,e)}else{if(this.pagerMode!="default"&&this.pagerMode!="advanced"){var d=this.dataview.totalrecords;var c=Math.ceil(d/this.pageSize);return this.goToPage(c-1,e)}}return false},goToNextPage:function(e){var d=this.dataview.totalrecords;if(this.summaryrows){d+=this.summaryrows.length}var c=Math.ceil(d/this.pageSize);if(this.dataview.pagenum=this.dataview.totalrecords){u=this.dataview.totalrecords}var v=this.dataview.totalrecords;d++;var t=Math.ceil(v/this.dataview.pagesize);if(t>=1){t--}t++;if(this.pageSizeMode=="root"){t=Math.ceil(this.rootRecordsLength/this.dataview.pagesize);if(t>=1){t--}t++;v=this.rootRecordsLength;this.dataview.totalrecords=this.rootRecordsLength}if(this.pagerMode!="default"){if(this["pagergotoinputbottom"]){var k=this["pagergotoinputbottom"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t);k=this["pagergotoinputtop"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t)}}else{var o="";var n=this.pagerButtonsCount;if(n==0||!n){n=5}var s=0;if(this.rtl){s=n-1}while((this.rtl&&s>=0)||(!this.rtl&&st&&!this.rtl){break}else{if(this.rtl&&e>t){s--;continue}}if(!this.rtl){if(s==0&&e>n){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){o+=""+e+"";if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}}else{if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}o+=""+e+""}if(this.rtl){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(s==0&&e>n){o+="..."}}if(!this.rtl){s++}else{s--}}if(!this["pagerbuttonsbottom"]){return}var h=this["pagerbuttonsbottom"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");var h=this["pagerbuttonstop"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");this["pagerbuttonsbottom"][0].innerHTML=o;this["pagerbuttonstop"][0].innerHTML=o;if(this.disabled){this.host.find(".jqx-grid-pager-number").css("cursor","default")}var q=function(){h.click(function(i){if(j.disabled){return}var w=b(i.target).attr("data-page");j.goToPage(parseInt(w)-1)});h.mouseenter(function(i){if(j.disabled){return}b(i.target).addClass(j.toTP("jqx-fill-state-hover"))});h.mouseleave(function(i){if(j.disabled){return}b(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};if(this.pagerPosition==="both"||this.pagerPosition==="bottom"){var h=this["pagerbuttonsbottom"].find("a");q(h)}if(this.pagerPosition==="both"||this.pagerPosition==="top"){var h=this["pagerbuttonstop"].find("a");q(h)}}if(u==0&&uu){this.goToPrevPage()}},_preparecolumnGroups:function(){var o=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var m=this;for(var g=0;gi){return 1}return 0});for(var k=1;k0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){return true}}if(undefined==f.editKey){return false}});this.addHandler(b(window),"jqxReady."+this.element.id,function(){f._updatecolumnwidths();f.refresh()});if(this.editable){this.addHandler(b(document),"mousedown.gridedit"+this.element.id,function(k){if(f.editable&&f.editSettings.saveOnBlur){if(f.editKey!=null){if(!f.vScrollInstance.isScrolling()&&!f.vScrollInstance.isScrolling()){var s=f.host.coord();var p=f.host.width();var l=f.host.height();var u=false;var j=false;var t=false;if(k.pageYs.top+l){u=true;j=true}if(k.pageXs.left+p){u=true;t=true}if(u){var m=function(y){var x=b(y.children()[0]).data();if(x&&!x.jqxWidget){x=y.data()}if(!x){x=y.data()}if(x.jqxWidget&&x.jqxWidget.container&&x.jqxWidget.container[0].style.display=="block"){var i=x.jqxWidget;var z=i.container.coord().top;var w=i.container.coord().top+i.container.height();if(j&&(k.pageYw)){u=true;i.close();return true}else{return false}}};var r=f._editors;if(r){for(var n=0;n0){var k=f._pinnedTable[0].rows[f.hoveredRow[0].rowIndex].cells;i(k)}}f.hoveredRow=null};this.addHandler(this.table,"mouseleave",function(i){c();if(f.wrapper){f.wrapper.parent().removeAttr("tabindex",0);f.wrapper.removeAttr("tabindex",1);f.content.removeAttr("tabindex",2)}});var g=function(o){if(!f.enableHover){return true}f.hoveredRow=o;if(!o){return true}var l=o[0].cells;var n=f.rowDetails&&!f.treeGrid;var q=n&&!f.treeGrid?1:0;var k=0;if(q>0&&f.rtl){q=0;k=1}for(var m=q;m=0){if(!l.expanded){f.showdetailsbykey(F)}else{f.hidedetailsbykey(F)}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("jqx-grid-group")>=0&&f.treeGrid){if(!l.expanded){f.treeGrid.expandRow(F)}else{f.treeGrid.collapseRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}if(B.preventDefault){B.preventDefault()}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("checkbox")>=0&&f.treeGrid){if(!l.checked){f.treeGrid.checkRow(F)}else{f.treeGrid.uncheckRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}}else{var m=b(q).index();var k=f.columns.records[m];if(B.stopPropagation){B.stopPropagation()}if(f.editable&&f.editKey==null){if(f._lastSelectedKey==F&&f.editSettings.editOnDoubleClick&&A){var u=f.beginroweditbykey(F,k);return true}}if(f.isTouchDevice()){if(f.scrolled&&new Date()-f.scrolled<500){if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return false}}if(f.selectionMode==="singlerow"&&f.selectionMode!=="custom"){f.selectrowbykey(F,"mouse",false);f._lastSelectedKey=F;f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}else{if(f.selectionMode!=="custom"){if(!B.ctrlKey&&!B.metaKey){f.clearSelection(false)}if(B.shiftKey){if(f._lastSelectedKey){var l=f.rowinfo[f._lastSelectedKey];f._doSelection(f._lastSelectedKey,true,false);var j=b(f._table.children()[1]).children(("[data-key="+f._lastSelectedKey+"]"));var n=j.index();var z=p.index();f._selectRange(z,n);f.selectrowbykey(F,"mouse",false);f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}}}f._lastSelectedKey=F;f.clickTime=new Date();if(f.selectionMode!=="custom"){if(l){if(l.selected){f.unselectrowbykey(F,"mouse",false)}else{f.selectrowbykey(F,"mouse",false)}v()}}else{return true}f._updateSelection();if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return true}}}}}})},_updateSelection:function(){var l=this;var r=b(l._table.children()[1]).children();var n=l._pinnedTable?b(l._pinnedTable.children()[1]).children():null;var e=l.rowDetails&&!l.treeGrid;var d=e?1:0;var f=0;if(d>0&&l.rtl){d=0;f=1}for(var h=0;he){var h=e;var d=c;while(hf){var d=d.prev();var g=d.attr("data-key");this._doSelection(g,true,false);h--}}}},_getuikey:function(d,g){var f=null;var e=b(this._table.children()[1]).children();f=b(e[d]).attr("data-key");if(b(e[d]).attr("data-role")){var c=b(e[d]);if(g=="next"){while(c){c=c.next();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}else{if(g=="prev"){while(c){c=c.prev();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}}return null}return f},getRows:function(){return this.source.records},getView:function(){var d=this;var e=this._names();var f=new Array();var c=function(k,h){if(!h){return}for(var j=0;j0){g.records=new Array();c(g.records,h[j].records)}}}}};c(f,this.dataViewRecords);return f},getKeys:function(){var d=new Array();var e=this.source.records;for(var c=0;c0){var h=0;for(var j=0;j0){continue}if(h===n+e){k=o.attr("data-key");return k}h++}return k}if(this.rowDetails){var h=0;for(var j=0;j0){return c}}catch(e){var d=b(this._table.children()[1]).children();for(var f=0;f0){return c}}catch(e){var d=b(this._pinnedTable.children()[1]).children();for(var f=0;f=33&&s<=40))){var z=-1;if(!this._searchString){this._searchString=""}if((s==8||s==46)&&this._searchString.length>=1){this._searchString=this._searchString.substr(0,this._searchString.length-1)}var e=String.fromCharCode(s);var H=(!isNaN(parseInt(e)));var J=false;if((s>=65&&s<=97)||H||s==8||s==32||s==46){if(!X.shiftKey){e=e.toLocaleLowerCase()}if(s!=8&&s!=32&&s!=46){if(!(this._searchString.length>0&&this._searchString.substr(0,1)==e)){this._searchString+=e}}if(s==32){this._searchString+=" "}this._searchTime=new Date();var n=this.getSelection();if(n.length>=1){var t=n[0].uid;var C=-1;for(var S=0;S0&&B[0]==t)){var B=this._getMatches(this._searchString)}}else{var B=this._getMatches(this._searchString)}if(B.length>0){var n=this.getSelection();if(n.length>=1){var c=B.indexOf(n[0].uid);if(c==-1){this.clearSelection(false);this.selectrowbykey(B[0])}else{var h=c+1;if(h>=B.length){h=0}this.clearSelection(false);this.selectrowbykey(B[h])}}else{this.clearSelection(false);this.selectrowbykey(B[0])}this._lastSearchString=this._searchString}}if(this._searchTimer!=undefined){clearTimeout(this._searchTimer)}if(s==27||s==13){this._searchString="";this._lastSearchString=""}this._searchTimer=setTimeout(function(){I._searchString="";I._lastSearchString=""},500);if(z>=0){return}if(J){return false}}}if(this.editKey!=undefined){if(s===27&&this.editSettings.cancelOnEsc){this.endroweditbykey(this.editKey,true)}else{if(s===13&&this.editSettings.saveOnEnter){if(X.target&&X.target.nodeName.toLowerCase()!="div"&&X.target.nodeName.toLowerCase()!="input"){return true}this.endroweditbykey(this.editKey,false)}else{if(this.editSettings.editSingleCell){if(this.editColumn){var P=this.columns.records.indexOf(this.editColumn);if(s==9&&P0){var M=this.editKey;var E=null;for(var S=P-1;S>=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){E=this.columns.records[S];break}}if(E){this.endroweditbykey(this.editKey,false);this.beginroweditbykey(M,E)}}}if(s==9){var o=this.rowinfo[this.editKey];var C=this.getrowindex(o);var v=this._getuirow(this.editKey);if(!X.shiftKey&&!y){var N=null;for(var S=0;S=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){N=this.columns.records[S];break}}if(N){while(v){v=v.prev();if(v){var D=v.attr("data-role");if(!D){var F=v.attr("data-key");break}}}if(F){this.clearSelection(false);this._lastSelectedKey=F;var o=this.rowsByKey[F];var C=this.getrowindex(o);var L=this.getrowdisplayindex(o);this._raiseEvent("rowSelect",{key:F,index:L,boundIndex:C,row:this.rowsByKey[F]});this.endroweditbykey(this.editKey,false);this._doSelection(F,true,true);this.beginroweditbykey(F,N)}}}}return false}}}}}return true}if(X.ctrlKey||X.metaKey){var f=String.fromCharCode(s).toLowerCase();if(f=="c"||f=="x"){var n=this.getSelection();if(n.length>=1){var w="";for(var K=0;K');O.val(w);b("body").append(O);O.select();setTimeout(function(){document.designMode="off";O.select();O.remove()},100)}}}}if(s===32&&this.treeGrid){if(this.treeGrid.checkboxes){var n=this.getSelection();if(n.length>1){for(var S=0;S0){if(this.dataview.filters.length>0){var m=this.rowinfo[t].row.records;for(var S=0;S0){while(this._getuirow(t)==null&&this.dataview.pagenum>0){this.goToPrevPage()}}}else{if(s==39){var v=this._getuirow(t);var U=null;if(v){var D=v.attr("data-role");if(!D){U=v.attr("data-key")}}if(this.pageable&&U==null){this.goToNextPage()}}}}return false}},_selection:function(c){if("selectionStart" in c[0]){var h=c[0];var i=h.selectionEnd-h.selectionStart;return{start:h.selectionStart,end:h.selectionEnd,length:i,text:h.value}}else{var f=document.selection.createRange();if(f==null){return{start:0,end:h.value.length,length:0}}var d=c[0].createTextRange();var g=d.duplicate();d.moveToBookmark(f.getBookmark());g.setEndPoint("EndToStart",d);var i=f.text.length;return{start:g.text.length,end:g.text.length+f.text.length,length:i,text:f.text}}},_doSelection:function(c,e,d){if(c==null){this.clearSelection();return}if(this.selectionMode==="singlerow"){this.clearSelection(false)}var f=this.rowinfo[c];if(f){f.selected=e;this.ensurerowvisiblebykey(c)}else{this.ensurerowvisiblebykey(c);var f=this.rowinfo[c];if(f){f.selected=e}else{this.rowinfo[c]={selected:e}}}if(this.selectionMode!="none"){if(d!==false){this._renderrows()}}},clearSelection:function(e){if(this.rowinfo){var f=this.getRows();for(var h in this.rowinfo){var g=this.rowinfo[h];if(g.selected){g.selected=false;var d=f.indexOf(g.row);var c=this.getrowdisplayindex(g.row);this._raiseEvent("rowUnselect",{key:h,index:c,boundIndex:d,row:g.row})}}}if(e!==false){this._renderrows()}},exportData:function(t){if(!b.jqx.dataAdapter.ArrayExporter){if(!this.treeGrid){throw"jqxDataTable: Missing reference to jqxdata.export.js!"}throw"jqxTreeGrid: Missing reference to jqxdata.export.js!"}var h=this.exportSettings.columnsHeader;if(h==undefined){h=true}var w=this.exportSettings.hiddenColumns;if(w==undefined){w=false}var P=this.exportSettings.serverURL;var I=this.exportSettings.characterSet;var ac=this.exportSettings.collapsedRecords;if(ac==undefined){ac=false}var F=this.exportSettings.fileName;if(F===undefined){F=this.treeGrid?"jqxTreeGrid_Data":"jqxDataTable_Data"}var s=this;var Y=this.getRows();if(this.exportSettings.recordsInView==true){Y=this.getView()}if(this.treeGrid&&this.treeGrid.virtualModeCreateRecords){var Y=this.treeGrid.getRows()}if(this.groups&&this.groups.length>0){var k=this.source.getGroupedRecords(this.groups,"records","label",null,"data",null,"parent",Y);var m=function(o,ae){for(var ag=0;ag0){var ah=m(j.records,new Array());for(var af=0;af0){if(p.length>0){var aa=this._names();for(var X=0;X0&&o){d(ae[af].records)}}};d(L);if(t!="xml"&&t!="json"){var u=p.length;for(var X=0;X0){o["Level"+o[aa.level]]=ae?"-":"+"}else{o["Level"+o[aa.level]]=""}}else{o["Level"+o[aa.level]]=""}if(o[aa.leaf]){o["Level"+o[aa.level]]=""}for(var ag=o[aa.level]+1;ag=g){aj=p.length-g-1}else{if(g>0&&ag1){var j=b(s._table[0].rows[1].cells[aj]);if(j.length==0){var j=b(s._table[0].rows[1].cells[0])}}if(ak.length==0){var ak=b(s._table[0].rows[0].cells[0])}var af=this;var ah=function(an){var ap=s.toThemeProperty;an.removeClass(ap("jqx-cell"));an.removeClass(ap("jqx-grid-cell-selected"));an.removeClass(ap("jqx-fill-state-pressed"));an.removeClass(ap("jqx-grid-cell-hover"));an.removeClass(ap("jqx-fill-state-hover"));if(af.customCellStyles){for(var ao in af.customCellStyles){an.removeClass(af.customCellStyles[ao])}}};ah(ak);if(j){ah(j)}if(this.displayfield==null){return true}if(s.showAggregates){if(s.getcolumnaggregateddata){if(s.treeGrid){var am=function(an,ao){for(var ap=0;ap500){Z[this.displayfield].width=500}Z[this.displayfield].formatString=this.cellsFormat;Z[this.displayfield].localization=s.gridlocalization;Z[this.displayfield].type=ai;Z[this.displayfield].cellsAlign=this.cellsalign;Z[this.displayfield].hidden=!h;Z[this.displayfield].index=aj;Z[this.displayfield].maxIndex=p.length}E="cell"+B;var al=this.element;if(t!="json"&&t!="xml"){K="column"+z;var i=function(o,av,au,an,at,ap,ao,aq,ar){C[o]={index:1+ao,maxIndex:p.length};if(ap.rtl){C[o].index=p.length-ao}if(t=="html"||t=="xls"||t=="pdf"){if(av){C[o]["font-size"]=av.css("font-size");C[o]["font-weight"]=av.css("font-weight");C[o]["font-style"]=av.css("font-style");C[o]["background-color"]=ap._getexportcolor(av.css("background-color"));C[o]["color"]=ap._getexportcolor(av.css("color"));C[o]["border-color"]=ap._getexportcolor(av.css("border-top-color"))}if(au){C[o]["text-align"]=at.align}else{C[o]["text-align"]=at.cellsalign;C[o]["formatString"]=at.cellsFormat;C[o]["dataType"]=ai}if(t=="html"||t=="pdf"){C[o]["border-top-width"]="0px";if(!ap.rtl){C[o]["border-left-width"]="0px";C[o]["border-right-width"]="1px"}else{C[o]["border-left-width"]="1px";C[o]["border-right-width"]="0px";if(ao==p.length-g-1&&au){C[o]["border-right-width"]="1px"}}C[o]["border-bottom-width"]="1px";if(av){C[o]["border-top-style"]=av.css("border-top-style");C[o]["border-left-style"]=av.css("border-left-style");C[o]["border-right-style"]=av.css("border-right-style");C[o]["border-bottom-style"]=av.css("border-bottom-style")}if(au){if(ao==0&&!ap.rtl){C[o]["border-left-width"]="1px"}else{if(ao==p.length-1&&ap.rtl){C[o]["border-right-width"]="1px"}}if(av){C[o]["border-top-width"]="1px";C[o]["border-bottom-width"]=av.css("border-bottom-width")}}else{if(ao==0&&!ap.rtl){C[o]["border-left-width"]="1px"}else{if(ao==p.length-1&&ap.rtl){C[o]["border-right-width"]="1px"}}}if(av){C[o]["height"]=av.css("height")}if(ap.treeGrid&&!au){if(C[o].index-10&&this.treeGrid){var ab=g+1;if(this.rtl){ab=p.length-g}if(C["column"+ab]){var e=C["column"+ab];e.merge=g;e["border-left-width"]="1px";var H=C["cell"+ab];for(var X=0;X0){b.each(p,function(j){if(this.aggregates){for(var ae=0;ae0){var c=l;for(var v=0;v0){var c=this.getRows();for(var e=0;e0){var n=this.rowsByKey[H];if(this.treeGrid){var n=this.treeGrid.getRow(H)}if(n.level0){for(var z=0;z
    ";var s=this.getCellTextByKey(H,h.displayfield);d.innerHTML=e;var f=b(d.firstChild);switch(h.columntype){case"textbox":case"default":var k=b("").appendTo(f);if(this.rtl){k.css("direction","rtl")}k.addClass(this.toThemeProperty("jqx-input"));k.addClass(this.toThemeProperty("jqx-widget-content"));k.addClass(this.toThemeProperty("jqx-cell-editor"));k[0].onfocus=function(i){setTimeout(function(){if(i){var I=b(i.target).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}else{var I=b(document.activeElement).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}if(p.content){p.content[0].scrollTop=0;p.content[0].scrollLeft=0}if(p.gridcontent){p.gridcontent[0].scrollLeft=0;p.gridcontent[0].scrollTop=0}},10)};if(!h.editable){k.attr("disabled",true);k.attr("readOnly",true);k.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{if(!q){q=true;var g=b.jqx.browser.msie&&b.jqx.browser.version>10;if(!g){k.focus()}var c=k;setTimeout(function(){var J=c.val().length;if(!g){c.focus()}try{if("selectionStart" in c[0]){c[0].setSelectionRange(0,J)}else{var i=c[0].createTextRange();i.collapse(true);i.moveEnd("character",J);i.moveStart("character",0);i.select()}}catch(I){var K=I}},10)}}k.width(x);k.height(u);if(b.jqx.browser.msie&&b.jqx.browser.version<9){k.css("line-height",parseInt(u)+"px")}k.css("text-align",h.cellsalign);if(s===null){s=""}if(s==undefined){s=""}k.val(s);if(h.createeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.createeditor(!this.treeGrid?o:H,s,k,C,x,u)}this._editors.push({column:h,editor:k});if(h.cellsFormat!=""){if(h.cellsFormat.indexOf("p")!=-1||h.cellsFormat.indexOf("c")!=-1||h.cellsFormat.indexOf("n")!=-1||h.cellsFormat.indexOf("f")!=-1){k.keydown(function(I){var O=I.charCode?I.charCode:I.keyCode?I.keyCode:0;var L=String.fromCharCode(O);var M=parseInt(L);if(isNaN(M)){return true}if(p._selection(k).length>0){return true}var K="";var J=k.val();if(h.cellsFormat.length>1){var N=parseInt(h.cellsFormat.substring(1));if(isNaN(N)){N=0}}else{var N=0}if(N>0){if(J.indexOf(p.gridlocalization.decimalseparator)!=-1){if(p._selection(k).start>J.indexOf(p.gridlocalization.decimalseparator)){return true}}}for(var P=0;P=11){return false}})}}if(h.initeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.initeditor(!this.treeGrid?o:H,s,k,C,x,u)}break;case"custom":case"template":if(!this.editorsCache){this.editorsCache=new Array()}var l=b("
    ").appendTo(f);var y=b.trim(h.datafield).split(" ").join("");if(y.indexOf(".")!=-1){y=y.replace(".","")}var A=this.editorsCache["templateeditor_"+y];if(h.columntype=="custom"){var A=this.editorsCache["customeditor_"+y+"_"+H]}var C=s;var s=this.getCellValueByKey(H,h.displayfield);if(!A){var k=b("
    ");k.width(v);k.height(u);A=k;if(s===null){s=""}if(h.columntype!="custom"){this.editorsCache["templateeditor_"+y]=k}else{this.editorsCache["customeditor_"+y+"_"+H]=k}k.appendTo(l);if(h.createeditor){h.createeditor(!this.treeGrid?o:H,s,k,C,v,u)}}else{var k=A;k.width(v);k.height(u);k.appendTo(l)}if(h.initeditor){h.initeditor(!this.treeGrid?o:H,s,k,C,v,u)}this._editors.push({column:h,editor:k});break}}}this.editKey=H;this.beginUpdate();var G=this.getrowdisplayindex(n);this._raiseEvent("rowBeginEdit",{key:H,index:G,boundIndex:o,row:this.rowsByKey[H]});if(F){var n=this.rowsByKey[H];var w=null;var m=null;if(n){w=n[r.datafield];m=n[r.displayfield]}this._raiseEvent("cellBeginEdit",{value:w,displayValue:m,key:H,index:G,dataField:r.datafield,displayField:r.displayfield,boundIndex:o,row:this.rowsByKey[H]})}this.endUpdate(false)},_toNumber:function(f){if(!f.indexOf&&f!=undefined){f=f.toString()}if(f.indexOf(this.gridlocalization.currencysymbol)>-1){f=f.replace(this.gridlocalization.currencysymbol,"")}var c=function(l,j,k){var h=l;if(j==k){return l}var i=h.indexOf(j);while(i!=-1){h=h.replace(j,k);i=h.indexOf(j)}return h};f=c(f,this.gridlocalization.thousandsseparator,"");f=f.replace(this.gridlocalization.decimalseparator,".");if(f.indexOf(this.gridlocalization.percentsymbol)>-1){f=f.replace(this.gridlocalization.percentsymbol,"")}var g="";for(var d=0;d1){if(b.jqx.dataFormat){m=b.jqx.dataFormat.parsedate(e,h.cellsFormat,this.gridlocalization)}if(m=="Invalid Date"||m==null){m=""}}}}if(h.displayfield!=h.datafield){m={label:m,value:m}}break}}if(h.geteditorvalue){var c=this.getCellValueByKey(d,h.displayfield);m=h.geteditorvalue(!this.treeGrid?k:d,c,j)}}return m},_validateEditors:function(c){var k=this;var d=true;var s=k.rowsByKey[c];var l=k.getrowindex(s);var m=k._editors;var c=k.editKey;var p=k._getuirow(c);for(var h=0;h=0||G.indexOf("datetimeinput")>=0||G.indexOf("combobox")>=0||G.indexOf("menu")>=0){if(i.jqxWidget.isOpened){var F=i.jqxWidget.isOpened();if(F){i.jqxWidget.close()}}}}};var z="customeditor_"+v.displayfield+"_"+p;var y="templateeditor_"+v.displayfield;if(k.editorsCache[z]){var w=b(k.editorsCache[z]).data();var A=k.editorsCache[z];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w);k.editorsCache[z].detach()}if(k.editorsCache[y]){k.editorsCache[y].detach();var w=b(k.editorsCache[y]).data();var A=k.editorsCache[y];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w)}}if(C!=u){k.beginUpdate();k._raiseEvent("cellValueChanged",{value:C,oldValue:u,dataField:v.datafield,displayField:v.displayfield,key:p,index:l,row:t});k.endUpdate(false)}}};k.updaterowbykey(k.editKey,h,false,s)}}if(!d){return false}}k._detachEditors(e);return true},_detachEditors:function(l){var g=this;var m=g.rowsByKey[l];var i=g.getrowindex(m);if(g.editorsCache){for(var h in g.editorsCache){var f=b(g.editorsCache[h]).data();if(f&&f.jqxWidget){var c=f.jqxWidget.element.className;if(c.indexOf("dropdownlist")>=0||c.indexOf("datetimeinput")>=0||c.indexOf("combobox")>=0||c.indexOf("menu")>=0){if(f.jqxWidget.isOpened){var e=f.jqxWidget.isOpened();if(e){f.jqxWidget.close()}}}}b(g.editorsCache[h]).detach()}}g.beginUpdate();var d=g.getrowdisplayindex(m);if(g.editSettings.editSingleCell){var m=g.rowsByKey[l];var k=null;var j=null;if(m){k=m[g.editColumn.datafield];j=m[g.editColumn.displayfield]}g._raiseEvent("cellEndEdit",{value:k,displayValue:j,key:l,index:d,dataField:g.editColumn.datafield,displayField:g.editColumn.displayfield,boundIndex:i,row:g.rowsByKey[l]})}g._raiseEvent("rowEndEdit",{key:l,index:d,boundIndex:i,row:g.rowsByKey[l]});g.endUpdate(false);g.editColumn=null;g.editKey=null;g._renderrows();g._renderhorizontalscroll();g.host.focus();setTimeout(function(){g.host.focus()},10)},_showvalidationpopup:function(r,e,s,m){if(s==undefined){var s=this.gridlocalization.validationstring}m.addClass(this.toThemeProperty("jqx-grid-validation-label"));var p=b("
    ");var o=b("
    ");p.html(s);o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));p.addClass(this.toThemeProperty("jqx-grid-validation"));p.addClass(this.toThemeProperty("jqx-rc-all"));p.hide();o.hide();p.prependTo(this.table);o.prependTo(this.table);var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);var l=this.getColumn(e).uielement;if(!r){return}var k=r;p.css("top",parseInt(k.position().top)+30+"px");var c=parseInt(p.css("top"));o.css("top",c-11);o.removeClass();o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var f=false;if(c>=this._table.height()){o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));c=parseInt(k.position().top)-k.outerHeight()-5;if(c<0){c=0;o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}p.css("top",c+"px");o.css("top",c+p.outerHeight()-9)}var n=-g+parseInt(b(l).position().left);var q=parseInt(this._table.css("left"));if(isNaN(q)){q=0}if(q!=0){g=0}o.css("left",g+n+30);var d=p.width();if(d+n>this.host.width()-20){var i=d+n-this.host.width()+40;n-=i}if(!f){p.css("left",g+n)}else{p.css("left",g+parseInt(b(l).position().left)-p.outerWidth())}m.mouseenter(function(){if(m.hasClass("jqx-grid-validation-label")){p.show();o.show()}});m.mouseleave(function(){p.hide();o.hide()});if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:p,validationrow:o}},addRow:function(d,p,j,n){if(p!=undefined){this._datachanged=true;if(j==undefined){j="last"}var o=false;var k=this.that;if(d==null){var f=this.dataview.filters&&this.dataview.filters.length>0;var m=!f?this.dataview.totalrecords:this.source.records.length;if(!this.pageable){if(this.source._source.totalrecords){this.dataview.totalrecords=this.source._source.totalrecords}else{if(this.source._source.totalRecords){this.dataview.totalrecords=this.source._source.totalRecords}else{if(this.source.hierarchy.length!==0){this.dataview.totalrecords=this.source.hierarchy.length}else{this.dataview.totalrecords=this.source.records.length}}}var m=!f?this.dataview.totalrecords:this.source.records.length}if(!b.isArray(p)){d=this.dataview.getid(this.dataview.source.id,p,m);if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{var c=new Array();b.each(p,function(e,q){var r=k.dataview.getid(k.dataview.source.id,p[e],m+e);c.push(r);if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}});d=c}}else{if(!b.isArray(p)){if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{b.each(p,function(e,q){var r=d[e];if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}})}}var i=this.treeGrid?(this.treeGrid.virtualModeCreateRecords?true:false):false;var g=function(v,q,A,t){if(v._loading){throw new Error("jqxDataTable: "+v.loadingErrorMessage);return false}var r=v.vScrollInstance.value;var z=false;if(!b.isArray(A)){A.uid=q;v.rowsByKey[q]=A;if(q==n){n=null}z=v.source.addRecord(A,t,n,i)}else{b.each(A,function(B,C){var D=null;if(q!=null&&q[B]!=null){D=q[B]}this.uid=D;v.rowsByKey[D]=this;if(q==n){n=null}z=v.source.addRecord(this,t,n,i)})}if(v.groups&&v.groups.length>0){var w=Object.prototype.toString;var y=v.groups[0];Object.prototype.toString=(typeof y=="function")?y:function(){return this[y]};if(!v.source.records.sort){var x=new Array();var u=0;var e=0;var s=[];b.each(s,function(){x[e+u++]=this});s=x}v.source.records.sort(function(C,B){if(C===undefined){C=null}if(B===undefined){B=null}if(C===null&&B===null){return 0}if(C===null&&B!==null){return -1}if(C!==null&&B===null){return 1}var F=0;var E=0;if(C&&C.uid){F=C.uid}if(B&&B.uid){E=B.uid}C=C.toString();B=B.toString();if(b.jqx.dataFormat.isNumber(C)&&b.jqx.dataFormat.isNumber(B)){if(CB){return 1}return 0}else{if(b.jqx.dataFormat.isDate(C)&&b.jqx.dataFormat.isDate(B)){if(CB){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(C)&&!b.jqx.dataFormat.isNumber(B)){C=String(C).toLowerCase();B=String(B).toLowerCase()}}}try{if(CB){return 1}}catch(D){var G=D}if(typeof(F)=="number"){if(FE){return 1}}return 0});Object.prototype.toString=w}v.dataview._filteredData=null;v.dataview._sortData=null;v.dataview._sortHierarchyData=null;if(v._updating==undefined||v._updating==false){v.refresh()}if(v.source&&v.source._knockoutdatasource&&!v._updateFromAdapter&&v.autokoupdates){if(v.source._source._localdata){v.source.suspendKO=true;v.source._source._localdata.push(A);v.source.suspendKO=false}}v.vScrollInstance.setPosition(r);return z};if(this.source.addrow){var h=function(e,q){if(e==true||e==undefined){if(q!=undefined){d=q}g(k,d,p,j)}};try{if(!k.treeGrid){o=this.source.addrow(d,p,j,h)}else{o=this.source.addrow(d,p,j,n,h)}if(o==undefined){o=true}}catch(l){o=false}if(o==false){return false}}else{g(this,d,p,j)}return o}return false},deleteRow:function(c){var d=this._getkey(c);this.deleterowbykey(d)},deleterowbykey:function(g){if(g!=undefined){this._datachanged=true;var h=false;var f=this.that;var d=function(m,l){if(m._loading){throw new Error("jqxDataTable: "+m.loadingErrorMessage);return false}m.dataview._filteredData=null;m.dataview._sortData=null;m.dataview._sortHierarchyData=null;var o=false;var p=m.vScrollInstance.value;if(!b.isArray(l)){var o=false;if(m.rowsByKey[l]){o=true;if(m.rowinfo[l]&&m.rowinfo[l].selected){m.unselectrowbykey(l,false)}if(m.treeGrid){var n=m._names();var k=m.rowsByKey[l][n.parent]}delete m.rowsByKey[l];if(m.treeGrid){if(m.rowinfo[l]){var i=m.rowinfo[l].row.records;var j=function(q){for(var r=0;r0&&v.originalRecord){v.originalRecord[o.columns.records[u].datafield]=t[o.columns.records[u].datafield]}}r=true}};s(n);if(o.treeGrid){n=o.treeGrid.getRow(l);s(n)}}else{b.each(l,function(w,x){var v=o.rowsByKey[this];var u=function(z,y){if(!v){r=false}else{v[this]=t[w]}r=true};u(this,v);if(o.treeGrid){v=o.treeGrid.getRow(this);u(this,v)}})}var m=o.vScrollInstance.value;if(g==undefined||g==true){if(o._updating==undefined||o._updating==false){o._renderrows()}}if(o.showAggregates&&o._updatecolumnsaggregates){o._updatecolumnsaggregates()}if(o.source&&o.source._knockoutdatasource&&!o._updateFromAdapter&&o.autokoupdates){if(o.source._source._localdata){var n=o.rowsByKey[l];var p=o.getrowindex(n);var q=o.source._source._localdata()[p];o.source.suspendKO=true;o.source._source._localdata.replace(q,b.extend({},n));o.source.suspendKO=false}}o.vScrollInstance.setPosition(m);return r};if(this.source.updaterow){var e=function(l){if(l==true||l==undefined){d(f,c,k);if(i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}};try{j=this.source.updaterow(c,k,e);if(j==undefined){j=true}}catch(h){j=false}}else{j=d(f,c,k);if(j&&i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}return j}return false},lockRow:function(c){var d=this._getkey(c);this.lockrowbykey(d)},unlockRow:function(c){var d=this._getkey(c);this.unlockrowbykey(d)},lockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=true}else{this.rowinfo[c]={locked:true}}this._renderrows()},unlockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=false}else{this.rowinfo[c]={locked:false}}this._renderrows()},selectRow:function(c){var d=this._getkey(c);this.selectrowbykey(d)},unselectRow:function(c){var d=this._getkey(c);this.unselectrowbykey(d)},selectrowbykey:function(e,h,f){if(h!="keyboard"&&h!="mouse"){this._lastSelectedKey=e}var g=f!==false?true:false;this._doSelection(e,true,g);var i=this.rowsByKey[e];var d=this.getrowindex(i);var c=this.getrowdisplayindex(i);this._raiseEvent("rowSelect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},unselectrowbykey:function(e,f){var g=f!==false?true:false;this._doSelection(e,false,g);var h=this.rowsByKey[e];var d=this.getrowindex(h);var c=this.getrowdisplayindex(h);this._raiseEvent("rowUnselect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},getSelection:function(){var c=new Array();if(this.rowinfo){for(var e in this.rowinfo){var d=this.rowinfo[e];if(d.selected){c.push(d.row)}}}return c},showdetailsbykey:function(k){if(!this.rowDetails){return}var l=this.rowinfo[k];if(l){l.expanded=true;var f=b(this._table.children()[1]).children(("[data-key="+k+"]"));var i=b(this._pinnedTable.children()[1]).children(("[data-key="+k+"]"));if(f){var c=i.children();var h=b(c[0]);if(this.rtl){var h=b(c[c.length-1])}if(!this.rtl){h.removeClass(this.toThemeProperty("jqx-grid-group-collapse"));h.addClass(this.toThemeProperty("jqx-grid-group-expand"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{h.removeClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));h.addClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}f.next().show();var d=i.next();d.show();if(b.jqx.browser.msie&&b.jqx.browser.version<8){f.next().children().show();i.next().children().show()}if(!l.initialized){var j=l.detailsHeight;var m=this.initRowDetails(k,l.row,b(b(d).children().children().children()[0]),l);l.details=b(d).children().children().children()[0];l.initialized=true;if(m===false||l.detailsHeight!=j){if(m===false){l.expanded=false;l.nodetails=true;d.hide()}this._renderrows()}}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var g=this.getrowindex(l.row);var e=this.getrowdisplayindex(l.row);this._raiseEvent("rowExpand",{row:l.row,index:e,boundIndex:g,rowKey:k})}}},hidedetailsbykey:function(h){if(!this.rowDetails){return}var j=this.rowinfo[h];if(j){j.expanded=false;var d=b(this._table.children()[1]).children(("[data-key="+h+"]"));var e=b(this._pinnedTable.children()[1]).children(("[data-key="+h+"]"));if(d){var g=e.children();var i=b(g[0]);if(this.rtl){var i=b(g[g.length-1])}if(!this.rtl){i.addClass(this.toThemeProperty("jqx-grid-group-collapse"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand"));i.addClass(this.toThemeProperty("jqx-icon-arrow-right"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{i.addClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));i.addClass(this.toThemeProperty("jqx-icon-arrow-left"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}d.next().hide();e.next().hide();if(b.jqx.browser.msie&&b.jqx.browser.version<8){d.next().children().hide();e.next().children().hide()}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var f=this.getrowindex(j.row);var c=this.getrowdisplayindex(j.row);this._raiseEvent("rowCollapse",{row:j.row,index:c,boundIndex:f,rowKey:h})}}},_getvirtualcolumnsindexes:function(d,l,h,k,c){if(this.rowDetails||this.rtl||this.editcell||(this.width&&this.width.toString().indexOf("%")>=0)||this.exporting){return{start:0,end:h+k}}var e=0;var i=-1;var f=h+k;if(this.autorowheight){return{start:0,end:h+k}}if(!c){for(var g=0;g=d&&i==-1){i=g}if(e>l+d){f=g;break}}}f++;if(f>h+k){f=h+k}if(i==-1){i=0}return{start:i,end:f}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var h=parseInt(u);if(this.table==null){return}var q=this.columnsrow;var r=0;var i=this.columns.records.length-r;var e=this.columns.records;var l=this.source.records.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){h=t.max-h}}if(l&&!this._haspinned){this.table[0].style.left=-h+"px";q[0].style.marginLeft=-h+"px"}else{if(this._haspinned||this._haspinned==undefined){for(var w=0;w0:false;if(this.columns&&this.columns.records){for(var e=0;e0){if(h==="stringfilter"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}}}},applyFilters:function(){if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this.serverProcessing){this.dataview.pagenum=0;this.updateBoundData("filter")}else{this.goToPage(0);this.refresh()}if(arguments&&arguments.length>0){if(this._updateSimpleFilter){if(this.filtercolumnsList){var d=this.filtercolumnsList.jqxDropDownList("getSelectedItem").value;this._updateSimpleFilter(d)}}if(this._updateFilterRow){this._updateFilterRow()}}this._raiseEvent("filter",{filters:this.dataview.filters})},sortBy:function(d,g){this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}if(d==null){g=null;d=this.sortcolumn}if(d){var f=this;var e;if(g=="a"||g=="asc"||g=="ascending"||g==true){e=true}else{e=false}if(g!=null){f.sortdirection={ascending:e,descending:!e}}else{f.sortdirection={ascending:false,descending:false}}if(g!=null){f.sortcolumn=d}else{f.sortcolumn=null}if(f.source.sort){f.dataview.sortfield=d;if(g==null){f.dataview.sortfielddirection=""}else{f.dataview.sortfielddirection=e?"asc":"desc"}if(f.source.sort&&!this._loading){f.source.sort(d,g)}}f.dataview.sortBy(d,g);f._raiseEvent("sort",{sortcolumn:this.sortcolumn,sortdirection:this.sortdirection})}if(!this.serverProcessing){this.refresh()}else{this.updateBoundData("sort")}},_togglesort:function(d){var f=this;if(this.disabled){return}if(d.sortable&&f.sortable){var c={sortcolumn:this.sortcolumn,sortdirection:this.sortdirection};var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(e==true){e=false}else{e=null}}else{e=true}f.sortBy(d.displayfield,e)}},_renderfilter:function(){var h=this;var j=b("
    ");j.height(22);var o=j.find("input");var g=j.find("div:first");j.addClass(this.toThemeProperty("jqx-rc-all"));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-input-group"));o.addClass(this.toThemeProperty("jqx-input"));o.addClass(this.toThemeProperty("jqx-rc-l"));o.addClass(this.toThemeProperty("jqx-input-group-addon"));o.addClass(this.toThemeProperty("jqx-widget"));o.addClass(this.toThemeProperty("jqx-widget-content"));g.addClass(this.toThemeProperty("jqx-fill-state-normal"));g.addClass(this.toThemeProperty("jqx-rc-r"));g.addClass(this.toThemeProperty("jqx-input-group-addon"));g.find("div").addClass(this.toThemeProperty("jqx-icon-search"));if(this.rtl){o.addClass(this.toThemeProperty("jqx-rtl"));o.css("direction","rtl")}this.filter.children().remove();this.filterbutton=g;var d=new Array();for(var f=0;f"+this.gridlocalization.filtersearchstring+"
    ");this.filter.append(l);var c=b("
    ");this.filter.append(c);if(c.jqxDropDownList){c.jqxDropDownList({theme:this.theme,enableBrowserBoundsDetection:true,autoDropDownHeight:p,rtl:h.rtl,dropDownWidth:220,selectedIndex:0,width:"auto",height:20,source:d,displayMember:"label",valueMember:"value"})}this.filtercolumnsList=c;var n=function(q){h.filterinput.val("");for(var r=0;r=0){x=x.replace(h.gridlocalization.decimalseparator,".")}}if(x.indexOf(h.gridlocalization.currencysymbol)>=0){x=x.replace(h.gridlocalization.currencysymbol,"")}if(x.indexOf(h.gridlocalization.percentagesymbol)>=0){x=x.replace(h.gridlocalization.percentagesymbol,"")}}var y=A.createfilter(C,x,"EQUAL",null,B.cellsFormat,h.gridlocalization)}else{var y=A.createfilter(C,x,"CONTAINS")}}A.operator=i;A.addfilter(0,y);return A};if(h.filterMode!=="simple"){if(u){var v=u.value;var t=h.getColumn(v);var s=w(t,r,"and");if(r.length>0){h.removeFilter(v);h.addFilter(v,s);h.applyFilters()}else{h.removeFilter(v);h.applyFilters()}if(h.filterMode==="advanced"){if(h._updateFilterRow){h._updateFilterRow(true)}}}}else{h.clearFilters(false,false);if(r.length>0){for(var q=0;q"+this.gridlocalization.filterstring+"");j.append(e);this.addHandler(e,"click",function(q){var i=function(u){if(h.filterrow){for(var x=0;x
    ");k.attr("title",h.gridlocalization.filterclearstring);k.addClass(h.toThemeProperty("jqx-icon-close"));j.append(k);k.hide();h.filtericon=k;k.click(function(){h.clearFilters();h.filtericon.fadeOut(200)});if(h.dataview.filters.length>0){if(h.filterMode!="advanced"){n(h.dataview.filters[0].datafield)}else{if(h._updateFilterRow){h._updateFilterRow()}}}},_renderadvancedfilter:function(){var h=this;var c=function(){h.clearFilters(false,false);var n=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var p=h.filterinput.val();for(var m=0;m0||(w.length==0&&k=="NOT_NULL")||(w.length==0&&k=="NOT_EMPTY")||(w.length==0&&k=="EMPTY")||(w.length==0&&k=="NULL")){var s=l.displayfield;var x=new b.jqx.filter();if(q=="numericfilter"){if(h.gridlocalization.decimalseparator==","){if(w.indexOf(h.gridlocalization.decimalseparator)>=0){w=w.replace(h.gridlocalization.decimalseparator,".")}}if(w.indexOf(h.gridlocalization.currencysymbol)>=0){w=w.replace(h.gridlocalization.currencysymbol,"")}if(w.indexOf(h.gridlocalization.percentagesymbol)>=0){w=w.replace(h.gridlocalization.percentagesymbol,"")}}var j=x.createfilter(q,w,k,null,l.cellsFormat,h.gridlocalization);x.addfilter(0,j);h.addFilter(s,x)}}if(h.dataview.filters.length>0){h.applyFilters()}else{h.clearFilters()}if(h.dataview.filters.length==0){h.filtericon.fadeOut(200)}else{h.filtericon.fadeIn(200)}};var e=function(){var m=b("
    ").appendTo(h.filter);h.filterrow=m;m[0].cells=new Array();m.height(24);m.width(h.table.width());var k=0;var j=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var l=h.filterinput.val();b.each(h.columns.records,function(){var p=this;var n=b("
    ").appendTo(m);n.css("position","absolute");n.css("left",k+parseInt(p.uielement[0].style.left));if(p.pinned){n.css("z-index",h.tableZIndex+h.columns.records.length);n.addClass(h.toThemeProperty("jqx-widget-header"))}m[0].cells.push(n[0]);if(!this.filterable){return true}var o=b("").appendTo(n);o.keydown(function(r){if(r.keyCode===13){c()}});if(p.displayfield===j){o.val(l)}o.addClass(h.toThemeProperty("jqx-input"));o.addClass(h.toThemeProperty("jqx-rc-all"));o.addClass(h.toThemeProperty("jqx-widget"));o.addClass(h.toThemeProperty("jqx-widget-content"));var q=b("
    ").appendTo(n);q.append(b("
    "));o.focus(function(){h.ensureColumnVisible(p.displayfield);h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield);setTimeout(function(){h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield)},10)});q.click(function(){var u=b("
    ");u.insertAfter(q);q.remove();var s=h.getcolumntypebydatafield(p);var t=h._getfiltersbytype(s);var r;if(s==="string"){r=2}else{r=0}u.jqxDropDownList({theme:h.theme,enableBrowserBoundsDetection:true,renderMode:"simple",arrowSize:0,selectedIndex:r,rtl:h.rtl,dropDownWidth:230,dropDownHeight:180,width:20,height:20,source:t,selectionRenderer:function(){return"
    "}});h.addHandler(u,"close",function(v){o.focus();setTimeout(function(){o.focus()},10)});u.removeAttr("tabindex");u.find("div").removeAttr("tabindex");u.jqxDropDownList("open")});o[0].style.width=p.width-6-22+"px"});b("
    ").appendTo(m)};e();var i=b("
    ").appendTo(h.filter);var f=b("").appendTo(i);var g=b("").appendTo(i);var d=0;f.css("left",d);g.css("left",d);f.css("top","4px");g.css("top","4px");f.jqxButton({theme:h.theme});g.jqxButton({theme:h.theme});g.click(function(){h.filtercolumnsList.jqxDropDownList({disabled:false});h.filterinput.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filterinput.attr("disabled",false);h.filterbutton.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filter.find(".filterrow").addClass("filterrow-hidden");h.filter.find(".filterrow").hide();h._arrange()});f.click(function(){c()});h._renderhorizontalscroll()},_getfiltertype:function(c){var d="stringfilter";switch(c){case"number":case"int":case"float":case"decimal":d="numericfilter";break;case"boolean":case"bool":d="booleanfilter";break;case"date":case"time":d="datefilter";break;case"string":d="stringfilter";break}return d},getcolumntypebydatafield:function(e){var f=this;var d="string";var c=f.source.datafields||((f.source._source)?f.source._source.datafields:null);if(c){var g="";b.each(c,function(){if(this.name==e.displayfield){if(this.type){g=this.type}return false}});if(g){return g}}return d},_getfiltersbytype:function(c){var d=this;var e="";switch(c){case"number":case"float":case"int":e=d.gridlocalization.filternumericcomparisonoperators;break;case"date":e=d.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":e=d.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:e=d.gridlocalization.filterstringcomparisonoperators;break}return e},_getcellvalue:function(c,e){var d=null;d=e[c.datafield];if(c.displayfield!=null){d=e[c.displayfield]}if(d==null){d=""}return d},_renderrows:function(ap){if(this.editable){if(this.editKey!=null){if(ap!==false){var M=this.endroweditbykey(this.editKey)}}}if(this.treeGrid){this.treeGrid._renderrows();return}if(this._loading){return}if(this._updating){return}if(this.rendering){this.rendering()}var ab=this;var T=0;this.table[0].rows=new Array();var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-widget-content");if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var K=this.columns.records.length;var ao=b.jqx.browser.msie&&b.jqx.browser.version<8;if(ao){this.host.attr("hideFocus","true")}var R=ab.groups.length;var ai=new Array();var k=this.source.records;k=this.dataview.evaluate(k);this.dataViewRecords=k;if(this.dataview.pagesize=="all"||!this.pageable||this.serverProcessing){var u=k;if(this.pageable&&this.serverProcessing&&k.length>this.dataview.pagesize){var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}}else{var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}if(ab.groups&&ab.groups.length>0){var P=this.pageable?this.dataview.pagesize*this.dataview.pagenum:0;var z=function(w){var au=0;var i=new Array();for(var c=0;cab.dataview.pagesize*ab.dataview.pagenum&&au<=ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){i.push(j)}if(au>ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){break}}return i};if(this.pageSizeMode==="root"){var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",k,0);ab.rootRecordsLength=v.length;v=z(v)}else{var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",u,P)}var y=function(j,w){for(var av=0;av0){var aw=y(c.records,new Array());for(var au=0;auZ.maxwidth){e=Z.maxwidth}var l=b('
    ');b(document.body).append(l);var n=l.find("td");aq=1+parseInt(n.css("padding-left"))+parseInt(n.css("padding-right"));l.remove();break}}var ak=this.rtl?" "+this.toTP("jqx-grid-table-rtl"):"";var B="";var ar="
    ";var I=0;var s=K;for(var al=0;alZ.maxwidth){e=Z.maxwidth}e-=aq;if(e<0){e=0}if(ao){var ac=e;if(al==I){ac++}if(Z.rowDetailscolumn){var ac=ac+4;ar+="";B+=""}else{ar+="";B+=""}}else{ar+="";B+=""}aa+=e}B+="";ar+="";this._hiddencolumns=false;var g=false;if(this.rowDetails&&this._pinnedTable){this._pinnedTable.find("[data-role=details]").detach();this._table.find("[data-role=details]").detach()}if(U===0){var o='';var m=this.host.height();if(this.pageable){m-=this.pagerHeight;if(this.pagerPosition==="both"){m-=this.pagerHeight}}m-=this.columnsHeight;if(this.filterable){var ag=this.filter.find(".filterrow");var D=this.filter.find(".filterrow-hidden");var C=1;if(D.length>0){C=0}m-=this.filterHeight+this.filterHeight*ag.length*C}if(this.showstatusbar){m-=this.statusBarHeight}if(this.showAggregates){m-=this.aggregatesHeight}if(m<25){m=25}if(this.hScrollBar[0].style.visibility!="hidden"){m-=this.hScrollBar.outerHeight()}if(this.height==="auto"||this.height===null||this.autoheight){m=300}var l='";o+=l;B+=o;ar+=o;this.table[0].style.width=aa+2+"px";T=aa}var q=this.getRows();var x=new Array();for(var am=0;am';var E='';if(R>0){if(G.level';var E=''}}var p=0;var S=0;for(var al=0;alae.maxwidth){e=ae.maxwidth}e-=aq;if(e<0){e=0}var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(ae.pinned){H+=" "+this.toTP("jqx-grid-cell-pinned")}if(this.sortcolumn===ae.displayfield){H+=" "+this.toTP("jqx-grid-cell-sort")}if(this.altRows&&am%2!=0){H+=" "+this.toTP("jqx-grid-cell-alt")}if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var O="";if(R>0){if(G.levelat.maxwidth){e=at.maxwidth}A-=aq;if(A<0){A=0}if(!at.hidden){ac+=A}}e=ac}else{H+=" "+this.toTP("jqx-grid-cell-pinned")}}}var l='";af+='" class="'+H+'">';af+=aj;af+="";if(!ae.pinned){o+=l;if(g){E+=af}}else{E+=l;o+=l}if(R>0&&!ao){if(G.level";E+="";B+=o;ar+=E;if(!this.rowinfo[G.uid]){this.rowinfo[G.uid]={group:Y,row:G,details:null,detailsHeight:200,initialized:false,expanded:false}}else{if(!("group" in this.rowinfo[G.uid])){this.rowinfo[G.uid].group=Y}if(!("row" in this.rowinfo[G.uid])){this.rowinfo[G.uid].row=G}if(!("details" in this.rowinfo[G.uid])){this.rowinfo[G.uid].details=null}if(!("detailsHeight" in this.rowinfo[G.uid])){this.rowinfo[G.uid].detailsHeight=200}if(!("initialized" in this.rowinfo[G.uid])){this.rowinfo[G.uid].initialized=false}if(!("expanded" in this.rowinfo[G.uid])){this.rowinfo[G.uid].expanded=false}}if(this.serverProcessing){this.rowinfo[G.uid].row=G}if(this.rowDetails){var F=this.rowinfo[G.uid].detailsHeight;if(this.rowinfo[G.uid]){if(this.rowinfo[G.uid].expanded){var ah='';B+=ah;ar+=ah}}B+="
    ';l+=this.gridlocalization.emptydatastring;l+="
    0){if(G.level0&&ao&&Y&&al>=R){l+="font-size: 1px; border-color: transparent; color: transparent;";af+="font-size: 1px; border-color: transparent; color: transparent;"}if(ae.pinned){l+="pointer-events: auto;";af+="pointer-events: auto;"}if(!Y&&ae.rowDetailscolumn){if(this.rowinfo[G.uid]){if(!this.rowinfo[G.uid].nodetails){if(this.rowinfo[G.uid].expanded){if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-expand")}else{H+=" "+this.toTP("jqx-grid-group-expand-rtl")}H+=" "+this.toTP("jqx-icon-arrow-down")}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}if(!this.autoRowHeight||(this.autoRowHeight&&!ae.autoCellHeight)){H+=" "+this.toTP("jqx-grid-cell-nowrap ")}var aj=ab._getcellvalue(ae,G);var f=ae.cellsFormat;if(R>0){if(G.level=0||aj.indexOf(" ng-")>=0)){x.push({rowKey:G.uid,row:d,column:ae.datafield,value:aj,columnIndex:al})}}}else{if(this.groupsRenderer){aj=this.groupsRenderer(aj,G,G.level)}}l+='" class="'+H+'">';l+=aj;l+="
    ";ar+="";if(g){if(ab.WinJS){MSApp.execUnsafeLocalFunction(function(){ab.table.html(ar+B)})}else{ab.table[0].innerHTML=ar+B}var W=this.table.find("#table"+this.element.id);var X=this.table.find("#pinnedtable"+this.element.id);X.css("float","left");X.css("pointer-events","none");W.css("float","left");X[0].style.position="absolute";W[0].style.position="relative";W[0].style.zIndex=V-10;X[0].style.zIndex=V+10;this._table=W;this._table[0].style.left="0px";this._pinnedTable=X;this._pinnedTable[0].style.left="0px";this._pinnedTable[0].style.width=T+"px";this._table[0].style.width=T+"px";if(this.rtl){if(T>parseInt(this.element.style.width)&&this._haspinned){this._pinnedTable[0].style.left=3-T+parseInt(this.element.style.width)+"px"}}if(this.rowDetails){for(var am=0;am0){var an=this._table[0].rows;b.each(x,function(){var w=this.row;var au=this.rowKey;var j=this.column;var i=this.columnIndex;var t=ab._getuirow(au);if(t){var c=t[0].cells[i];if(b.jqx.angularCompile){b.jqx.angularCompile(c,"
    "+c.innerHTML+"
    ")}}})}if(this.rendered){this.rendered()}},getcolumnindex:function(c){var d=this.getColumn(c);var e=this.columns.records.indexOf(d);return e},setcolumnindex:function(e,i,j){var h=this.getColumn(e);if(h.pinned){return}if(h.hidden){return}if(h.checkboxcolumn){return}if(h.grouped){return}var l=this.columns.records.indexOf(h);this.columns.records.splice(l,1);this.columns.records.splice(i,0,h);var f=0;var n=this.headerZIndex;this.columnsrow.children().detach();var k=this.toThemeProperty("jqx-grid-cell");k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");k+=" "+this.toThemeProperty("jqx-item");var m=this;var c=null;if(m.filterrow!=undefined){var c=b(m.filterrow.children()[0])}this.columnsrow[0].cells=[];var g=false;b.each(this.columns.records,function(p,s){var q=this.uielement;m.columnsrow.append(q);if(!m.rtl){q.css("z-index",n--)}else{q.css("z-index",n++)}var o=!m.rtl?250+n-1:250+n+1;if(this.pinned){q.css("z-index",o)}var r=this.width;q.css("left",f);m.columnsrow[0].cells[m.columnsrow[0].cells.length]=q[0];if(this.hidden){g=true}if(!(this.hidden&&this.hideable)){f+=r}});if(this.groupable){var d=this.groups.length;if(d>0){if(l-d>=0){l-=d;i-=d}}}if(this.rowDetails){if(l-1>=0){l--;i--}}if(this.selectionMode=="checkbox"){if(l-1>=0){l--;i--}}var h=this._columns[l];this._columns.splice(l,1);this._columns.splice(i,0,h);this.resize();this._rendercolumnGroups();this._raiseEvent("columnReordered",{dataField:h.datafield,oldIndex:l,newIndex:i})},_pinnedColumnsLength:function(){var c=0;b.each(this.columns.records,function(){if(this.pinned){c++}if(this.grouped){c++}});if(this.rowDetails){c++}if(this.selectionMode=="checkbox"){c++}return c},_handlecolumnsReorder:function(){var g=this;var h=-1;var d=false;if(!g.columnsReorder){return}var f="mousemove.reorder"+this.element.id;var e="mousedown.reorder"+this.element.id;var i="mouseup.reorder"+this.element.id;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true;f=b.jqx.mobile.getTouchEventName("touchmove")+".reorder"+this.element.id;e=b.jqx.mobile.getTouchEventName("touchstart")+".reorder"+this.element.id;i=b.jqx.mobile.getTouchEventName("touchend")+".reorder"+this.element.id}this.removeHandler(b(document),f);this.addHandler(b(document),f,function(x){if(g.resizing){return true}if(g.reordercolumn!=null){var m=parseInt(x.pageX);var u=parseInt(x.pageY);if(c){var t=g.getTouches(x);var p=t[0];if(p!=undefined){m=parseInt(p.pageX);u=parseInt(p.pageY)}}var j=g.host.coord();var w=parseInt(j.left);var k=parseInt(j.top);if(g.dragmousedownoffset==undefined||g.dragmousedownoffset==null){g.dragmousedownoffset={left:0,top:0}}var B=parseInt(m)-parseInt(g.dragmousedownoffset.left);var s=parseInt(u)-parseInt(g.dragmousedownoffset.top);g.reordercolumn.css({left:B+"px",top:s+"px"});d=false;if(m>=w&&m<=w+g.host.width()){if(u>=k&&u<=k+g.host.height()){d=true}}h=-1;if(d){g.reordercolumnicon.removeClass(g.toThemeProperty("jqx-grid-dragcancel-icon"));g.reordercolumnicon.addClass(g.toThemeProperty("jqx-grid-drag-icon"));var n=g.columnsheader.coord();var q=n.top+g.columnsheader.height();if(g.columnsdropline!=null){if(u>=n.top&&u<=q){h=g._handlereordercolumnsdroplines(m);if(g.columnGroups){if(h!=-1){var l=0;l+=g._pinnedColumnsLength();var o=h.index;if(o>=l){var y=g.columns.records[o];if(y!=undefined){var v=g.columns.records.indexOf(g.getColumn(y.datafield));if(y.datafield==null){var v=g.columns.records.indexOf(g.getcolumnbytext(y.text))}var r=b.data(g.reordercolumn[0],"reorderrecord");var A=g.columns.records.indexOf(g.getColumn(r));var z=y;if(A=p){var s=g.columns.records[q];if(s!=undefined){var u=g.columns.records.indexOf(g.getColumn(s.datafield));if(s.datafield==null){var u=g.columns.records.indexOf(g.getcolumnbytext(s.text))}if(g.columnGroups){var r=s;if(xu){g.setcolumnindex(k,u)}}}}}}if(g.columnsdropline!=null){g.columnsdropline.remove();g.columnsdropline=null}}}})},getcolumnbytext:function(d){var c=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.text==d){c=this;return false}})}return c},_handlereordercolumnsdroplines:function(i){var c=this;var h=-1;var e=c._pinnedColumnsLength();var g=parseInt(c.host.coord().left);var d=g+c.host.width();var f=c.vScrollBar.css("visibility")!="hidden"?19:0;if(!c.rtl){f=0}b.each(c.columnsbounds,function(j){if(j>=e){if(this.width==0){return true}if(i<=this.left+this.width/2){if(i>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+parseInt(this.left)+"px");c.columnsdropline.css("top",parseInt(this.top)+"px");c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"before"};return false}else{if(i>=this.left+this.width/2){if(this.left+this.width>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+1+this.left+this.width);c.columnsdropline.css("top",this.top);c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"after"}}}}});return h},_createreordercolumn:function(d,f,i){var h=this;var g=f;if(h.reordercolumn){h.reordercolumn.remove()}if(h.columnsdropline){h.columnsdropline.remove()}h.reordercolumn=b("
    ");var k=d.clone();h.reordercolumn.css("z-index",999999);k.css("border-width","1px");k.css("opacity","0.4");var j=b(k.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(j.length>0){j.css("display","none")}var c=b(k.find(".jqx-icon-close"));if(c.length>0){c.css("display","none")}h.reordercolumnicon=b('
    ');h.reordercolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.reordercolumn.css("float","left");h.reordercolumn.css("position","absolute");var e=h.host.coord();k.width(d.width()+16);h.reordercolumn.append(k);h.reordercolumn.height(d.height());h.reordercolumn.width(k.width());h.reordercolumn.append(h.reordercolumnicon);b(document.body).append(h.reordercolumn);k.css("margin-left",0);k.css("left",0);k.css("top",0);h.reordercolumn.css("left",g.left+h.dragmousedown.left);h.reordercolumn.css("top",g.top+h.dragmousedown.top);if(i!=undefined&&i){h.columnsdropline=b('
    ');h.columnsdropline.width(2);h.columnsdropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));b(document.body).append(h.columnsdropline)}},_handlecolumnsdragreorder:function(d,g){if(this.reordercolumn){this.reordercolumn.remove()}if(this.columnsdropline){this.columnsdropline.remove()}this.dragmousedown=null;this.dragmousedownoffset=null;this.columndragstarted=false;this.reordercolumn=null;var h=this;var f;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true}var e="mousedown.drag";var f="mousemove.drag";if(c){e=b.jqx.mobile.getTouchEventName("touchstart")+".drag";f=b.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(g,"dragstart",function(i){return false})}this.addHandler(g,e,function(k){if(false==d.draggable){return true}if(h.resizing){return true}h.__drag=true;var j=k.pageX;var i=k.pageY;if(c){var l=h.getTouches(k);var n=l[0];j=n.pageX;i=n.pageY}h.dragmousedown={left:j,top:i};var m=b(k.target).coord();h.dragmousedownoffset={left:parseInt(j)-parseInt(m.left),top:parseInt(i-m.top)};if(k.preventDefault){k.preventDefault()}return true});this.addHandler(g,f,function(k){if(!d.draggable){return true}if(undefined==d.datafield){return true}if(d.pinned){return true}if(h.resizing){return true}if(h.dragmousedown){var j=k.pageX;var i=k.pageY;if(c){var m=h.getTouches(k);var o=m[0];if(o!=undefined){j=o.pageX;i=o.pageY}}f={left:j,top:i};if(!h.columndragstarted&&h.reordercolumn==null){var l=Math.abs(f.left-h.dragmousedown.left);var n=Math.abs(f.top-h.dragmousedown.top);if(l>3||n>3){h._createreordercolumn(g,f,true);b(document.body).addClass("jqx-disableselect");b.data(h.reordercolumn[0],"reorderrecord",d.datafield)}}}})},getTouches:function(c){return b.jqx.mobile.getTouches(c)},_handlecolumnsResize:function(){var i=this;if(this.columnsResize){var k=false;if(i.isTouchDevice()){k=true}var g="mousemove.resize"+this.element.id;var d="mousedown.resize"+this.element.id;var e="mouseup.resize"+this.element.id;if(k){var g=b.jqx.mobile.getTouchEventName("touchmove")+".resize"+this.element.id;var d=b.jqx.mobile.getTouchEventName("touchstart")+".resize"+this.element.id;var e=b.jqx.mobile.getTouchEventName("touchend")+".resize"+this.element.id}this.removeHandler(b(document),g);this.addHandler(b(document),g,function(n){if(i.resizablecolumn!=null&&!i.disabled&&i.resizing){if(i.resizeline!=null){var s=i.resizablecolumn.columnelement;var p=i.host.coord();var v=parseInt(i.resizestartline.coord().left);var l=v-i._startcolumnwidth;var w=i.resizablecolumn.column.minwidth;if(w=="auto"){w=0}else{w=parseInt(w)}var m=i.resizablecolumn.column.maxwidth;if(m=="auto"){m=0}else{m=parseInt(m)}var q=n.pageX;if(k){var t=b.jqx.mobile.getTouches(n);var r=t[0];q=r.pageX}l+=w;var u=m>0?v+m:0;var o=m==0?true:i._startcolumnwidth+q-v=p.left&&q>=l){if(u!=0&&n.pageX=p.left&&q<=p.left+i.host.width()){i.resizeline.css("left",q);if(k){return false}}}}}}if(!k&&i.resizablecolumn!=null){return false}});this.removeHandler(b(document),d);this.addHandler(b(document),d,function(m){if(i.resizablecolumn!=null&&!i.disabled){var l=i.resizablecolumn.columnelement;if(l.coord().top+l.height()+5m.pageY){i.resizablecolumn=null;return}i._startcolumnwidth=i.resizablecolumn.column.width;i.resizablecolumn.column._width=null;b(document.body).addClass("jqx-disableselect");b(document.body).addClass("jqx-position-reset");i._mouseDownResize=new Date();i.resizing=true;i._resizecolumn=i.resizablecolumn.column;i.resizeline=i.resizeline||b('
    ');i.resizestartline=i.resizestartline||b('
    ');i.resizebackground=i.resizebackground||b('
    ');i.resizebackground.css("opacity",0.01);i.resizebackground.css("cursor","col-resize");i.resizeline.css("cursor","col-resize");i.resizestartline.css("cursor","col-resize");i.resizeline.addClass(i.toThemeProperty("jqx-grid-column-resizeline"));i.resizestartline.addClass(i.toThemeProperty("jqx-grid-column-resizestartline"));b(document.body).append(i.resizeline);b(document.body).append(i.resizestartline);b(document.body).append(i.resizebackground);var n=i.resizablecolumn.columnelement.coord();i.resizebackground.css("left",i.host.coord().left);i.resizebackground.css("top",i.host.coord().top);i.resizebackground.width(i.host.width());i.resizebackground.height(i.host.height());i.resizebackground.css("z-index",999999999);var o=function(q){if(!i.rtl){q.css("left",parseInt(n.left)+i._startcolumnwidth)}else{q.css("left",parseInt(n.left))}var s=0;var t=i.showtoolbar?i.toolbarHeight:0;s+=t;var v=i.showstatusbar?i.statusBarHeight:0;s+=v;var r=i.showAggregates?i.aggregatesHeight:0;s+=r;if(i.pageable&&i.pagerPosition!="bottom"){s+=i.pagerHeight}if(i.filterable){s+=i.filter.height()}var p=0;if(i.pageable&&i.pagerPosition!="top"){p=i.pagerHeight}var u=i.hScrollBar.css("visibility")!="hidden"?i.scrollBarSize:0;q.css("top",parseInt(n.top));q.css("z-index",9999999999);if(i.columnGroups){q.height(i.host.height()+i.resizablecolumn.columnelement.height()-p-s-u-i.columnGroupslevel*i.columnsHeight)}else{q.height(i.host.height()-p-s-u)}q.show("fast")};o(i.resizeline);o(i.resizestartline);i.dragmousedown=null}});var f=function(){b(document.body).removeClass("jqx-disableselect");b(document.body).removeClass("jqx-position-reset");if(!i.resizing){return}i._mouseUpResize=new Date();var t=i._mouseUpResize-i._mouseDownResize;if(t<200){i.resizing=false;if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){i._resizecolumn=null;i.resizeline.hide();i.resizestartline.hide();i.resizebackground.remove()}return}i.resizing=false;if(i.disabled){return}var n=i.host.width();if(i.vScrollBar[0].style.visibility!="hidden"){n-=20}if(n<0){n=0}if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){var u=parseInt(i.resizeline.css("left"));var o=parseInt(i.resizestartline.css("left"));var s=i._startcolumnwidth+u-o;if(i.rtl){var s=i._startcolumnwidth-u+o}var r=i._resizecolumn.width;i._resizecolumn.width=s;if(i._resizecolumn._percentagewidth!=undefined){i._resizecolumn._percentagewidth=(s/n)*100}for(var q=0;q0){k-=parseInt(this.scrollBarSize)+6;c=k}var j="";if(this.columns==undefined||this.columns.records==undefined){return}var i=this;var h=false;b.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=i.vScrollBar[0].style.visibility=="hidden"?0:i.scrollBarSize+5;if(i.scrollBarSize==0){n=0}m=parseFloat(this.width)*c/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(c)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}k-=Math.round(m)}else{if(this.width!="auto"&&!this._width){k-=this.width}else{j+=this.text}}}});var f=this.columnsheader.find("#columntable"+this.element.id);if(f.length==0){return}var d=0;var g=f.find(".jqx-grid-column-header");var e=0;b.each(this.columns.records,function(n,q){var m=b(g[n]);var t=false;var s=this.width;var o=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){s=parseFloat(this._percentagewidth)*c/100}else{s=parseFloat(this.width)*c/100}s=Math.round(s);t=true}if(this.width!="auto"&&!this._width&&!t){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(t){if(sthis.maxwidth&&this.maxwidth!="auto"){s=this.maxwidth;this.width=s}if(parseInt(m[0].style.width)!=s){m.width(s);this.width=s}}else{var l=Math.floor(k*(this.text.length/j.length));if(isNaN(l)){l=this.minwidth}var p=(k*(this.text.length/j.length))-l;d+=p;if(d>=1){d-=1;l++}if(d>=0.5&&n==i.columns.records.length-1){l++}if(l<0){var r=b(""+this.text+"");b(document.body).append(r);l=10+r.width();r.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=l;m.width(this.width)}}if(parseInt(m[0].style.left)!=e){m.css("left",e)}if(!(this.hidden)){e+=this.width}this._requirewidthupdate=true;if(o!==this.width){h=true}});this.columnsheader.width(2+e);f.width(this.columnsheader.width());this._resizecolumnGroups();if(h){this._renderrows()}if(this.showAggregates){this._refreshcolumnsaggregates()}},_rendercolumnheaders:function(){var r=this;if(this._updating){return}if(r.columns.records.length>r.headerZIndex){r.headerZIndex=r.columns.records.length+10}this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var g=b('
    ');g[0].cells=new Array();var l=0;var h=0;var s="";var u=this.host.width();var f=u;var w=new Array();var t=new Array();b.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){u-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*f/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}u-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}u-=this.width}}}}else{s+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(r._haspinned){this.pinned=true}w[w.length]=this}else{t[t.length]=this}});if(!this.rtl){for(var o=0;o=this.columns.records.length-w.length;o--){this.columns.replace(o,w[e++])}for(var m=0;m
    ');if(r.rtl&&K===0){x[0].style.borderLeftColor="transparent"}if(r.columnGroups){x[0].style.height=n+"px";x[0].style.bottom="0px";if(this.pinned){x[0].style.zIndex=L}}this.uielement=x;this.element=x;if(this.classname!=""&&this.classname){x.addClass(this.classname)}var C=this.width;var D=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){C=parseFloat(this._percentagewidth)*f/100}else{C=parseFloat(this.width)*f/100}C=Math.round(C);D=true}if(this.width!="auto"&&!this._width&&!D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}x[0].style.width=parseInt(C)+"px"}else{if(D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}x.width(C);this.width=C}else{var H=Math.floor(u*(this.text.length/s.length));var E=(u*(this.text.length/s.length))-H;c+=E;if(c>=1){c-=1;H++}if(c>=0.5&&K==r.columns.records.length-1){H++}if(isNaN(H)){H=this.minwidth}if(H<0){var F=b(""+this.text+"");b(document.body).append(F);H=10+F.width();F.remove()}if(Hthis.maxwidth){H=this.maxwidth}this._width="auto";this.width=parseInt(H);C=this.width;x.width(this.width)}}if(this.hidden){x.css("display","none")}var k=b(x.children()[0]);g[0].cells[K]=x[0];var p=false;var J=false;var z=this.renderer!=null?this.renderer(this.text,this.align,n):r._rendercolumnheader(this.text,this.align,n,r);if(z==null){z=r._rendercolumnheader(this.text,this.align,n,r)}if(this.renderer!=null){z=b(z)}p=true;if(r.WinJS){MSApp.execUnsafeLocalFunction(function(){k.append(b(z))})}else{if(this.renderer){k.append(b(z))}else{if(z){k[0].innerHTML=z}}}if(z!=null){var B=b('
    ');k.append(B);var O=B.children();this.sortasc=O[1];this.sortdesc=O[2];this.filtericon=O[0];this.iconscontainer=B;if(r.rtl){B.css("margin-left","0px");B.css("left","0px");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}}g.append(x);if(r.columnsReorder&&this.draggable&&r._handlecolumnsdragreorder){r._handlecolumnsdragreorder(this,x)}var M=this;r.addHandler(x,"click",function(i){if(M.checkboxcolumn){return true}if(r._togglesort){if(!r._loading){r._togglesort(M)}}i.preventDefault()});if(r.columnsResize&&!J){var y=false;var j="mousemove";if(r.isTouchDevice()){y=true;j=b.jqx.mobile.getTouchEventName("touchstart")}r.addHandler(x,j,function(P){if(!M.resizable){r.resizablecolumn=null;return true}var i=parseInt(P.pageX);var R=5;var U=parseInt(x.coord().left);if(r.hasTransform){U=b.jqx.utilities.getOffset(x).left}if(r._handlecolumnsResize){if(y){var Q=b.jqx.mobile.getTouches(P);var T=Q[0];i=T.pageX;R=40;if(i>=U+M.width-R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize")}else{x.css("cursor","");r.resizablecolumn=null}return true}var S=M.width;if(r.rtl){S=0}if(i>=U+S-R){if(i<=U+S+R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize");return false}else{x.css("cursor","");r.resizablecolumn=null}}else{x.css("cursor","");if(i0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}this.columnsrow=g;r.columnsheader.append(g);g.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsReorder){this._handlecolumnsReorder()}if(this._handlecolumnsResize){this._handlecolumnsResize()}if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var o=0;for(var l=0;l
    ');var k=b(this._rendercolumnheader(q.text,q.align,this.columnsHeight,this));f.append(k);f[0].style.left=d+"px";if(d===0){f[0].style.borderLeftColor="transparent"}f[0].style.top=p+"px";f[0].style.height=r+"px";f[0].style.width=-1+q.width+"px";e.append(f);q.element=f}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var d=0;d0){d.removeHandler(c,"mouseenter");d.removeHandler(c,"mouseleave");var e=b(f.filtericon);d.removeHandler(e,"mousedown");d.removeHandler(e,"click");d.removeHandler(c,"click")}},_calculateaggregate:function(k,o,d,h){if(!k.datafield){return null}var e=k.aggregates;if(!e){e=o}if(e){var f=new Array();for(var n=0;n0){r(u[t].records)}}};r(h);h=q}if(this.treeGrid&&this.filterable&&this.dataview.filters.length>0){var p=new Array();for(var n=0;n=g){if(m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e,formatStrings:f}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}}return m}else{var m=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,h,c);if(this.treeGrid&&m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var g=this.source._source.hierarchy&&this.source._source.hierarchy.groupingDataFields?this.source._source.hierarchy.groupingDataFields.length:0;if(g==0||c>=g){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}return m}}}return null},getcolumnaggregateddata:function(d,h,i,e){var f=this.getColumn(d);if(!f){return""}var k=(i==undefined||i==false)?false:i;if(h==null){return""}var c=f.aggregates;f.aggregates=null;var j=this._calculateaggregate(f,h,k,e);var g={};if(j){g=j[d];f.aggregates=c}return g},_updatecolumnaggregates:function(e,h,c){var f=this;if(!h){c.children().remove();c.html("");if(e.aggregatesRenderer){var g={};if(e.aggregates){g=this.getcolumnaggregateddata(e.datafield,e.aggregates)}var d=e.aggregatesRenderer({},e,c,null);c.html(d)}return}c.children().remove();c.html("");if(e.aggregatesRenderer){if(h){var d=e.aggregatesRenderer(h[e.datafield],e,c,this.getcolumnaggregateddata(e.datafield,e.aggregates),"aggregates");c.html(d)}}else{b.each(h,function(){var j=this;for(g in j){var k=b('
    ');var i=g;i=f._getaggregatename(i);k.html(i+":"+j[g]);if(f.rtl){k.addClass(f.toThemeProperty("jqx-rtl"))}c.append(k)}})}},_getaggregatetype:function(d){switch(d){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return d}var c=d;for(var e in d){c=e;break}return c},_getaggregatename:function(d){var c=d;switch(d){case"min":c="Min";break;case"max":c="Max";break;case"count":c="Count";break;case"avg":c="Avg";break;case"product":c="Product";break;case"var":c="Var";break;case"stdevp":c="StDevP";break;case"stdev":c="StDev";break;case"varp":c="VarP";case"sum":c="Sum";break}if(d===c&&typeof(c)!="string"){for(var e in d){c=e;break}}return c},_updatecolumnsaggregates:function(){var g=this.getRows();if(this.dataViewRecords){g=this.dataViewRecords}var c=this.columns.records.length;if(undefined!=this.aggregates[0].cells){for(var f=0;f');var f=0;var m=this.columns.records.length;var l=this.toThemeProperty("jqx-grid-cell");if(this.rtl){l+=" "+this.toThemeProperty("jqx-grid-cell-rtl");f=0;c.css("border-left-width","0px");this.aggregates.css("border-left-color","transparent")}l+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var n=m+10;var o=new Array();this.aggregates[0].cells=o;for(var h=0;hg.maxwidth){d=g.maxwidth}var e=l;if(g.cellsalign){e+=" "+this.toThemeProperty("jqx-"+g.cellsalign+"-align")}var k=b('
    ');c.append(k);k.css("left",f);if(!this.rtl){k.css("z-index",n--)}else{k.css("z-index",n++);if(h==0){k.css("border-left-width","0px")}}k.width(d);k[0].style.left=f+"px";if(!(g.hidden&&g.hideable)){f+=d}else{k.css("display","none")}o[o.length]=k[0];this._updatecolumnaggregates(g,i,k)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){c.css("z-index",n--)}c.width(parseInt(f)+2);c.height(this.aggregatesHeight);this.aggregates.children().remove();this.aggregates.append(c);this.aggregates.removeClass(this.toThemeProperty("jqx-widget-header"));this.aggregates.addClass(l);this.aggregates.css("border-bottom-color","transparent");this.aggregates.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}},destroy:function(){var h=this;if(h.columns&&h.columns.records){for(var f=0;f0){j.jqxDropDownList("destroy")}}}if(h.filtercolumnsList){h.filtercolumnsList.jqxDropDownList("destroy")}}if(h.pageable){if(h.pagershowrowscombotop&&h.pagershowrowscombotop.jqxDropDownList){h.pagershowrowscombotop.jqxDropDownList("destroy")}if(h.pagershowrowscombobottom&&h.pagershowrowscombobottom.jqxDropDownList){h.pagershowrowscombobottom.jqxDropDownList("destroy")}var l=h.pagerbuttonsbottom.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();var l=h.pagerbuttonstop.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();if(h.pagernexttop){h.pagernexttop.jqxButton("destroy");h.pagerprevioustop.jqxButton("destroy");h.pagernextbottom.jqxButton("destroy");h.pagerpreviousbottom.jqxButton("destroy");h.pagerfirsttop.jqxButton("destroy");h.pagerfirstbottom.jqxButton("destroy");h.pagerlasttop.jqxButton("destroy");h.pagerlastbottom.jqxButton("destroy")}}h._removeHandlers();h.vScrollBar.jqxScrollBar("destroy");h.hScrollBar.jqxScrollBar("destroy");delete h.vScrollBar;delete h.hScrollBar;delete h._mousewheelfunc;b.jqx.utilities.resize(h.host,null,true);h.host.remove()},propertiesChangedHandler:function(c,d,e){if(e.width&&e.height&&Object.keys(e).length==2){c.refresh()}},propertyChangedHandler:function(e,l,d,k){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(k!==d){if(l=="filterable"){e._render()}else{if(l==="height"){e.host.height(e.height);e.host.width(e.width);e._updatesize(false,true)}else{if(l==="width"){e.host.height(e.height);e.host.width(e.width);e._updatesize(true,false)}else{if(l==="source"){e.updateBoundData()}else{if(l==="columns"||l==="columnGroups"){e._columns=null;e._render()}else{if(l==="rtl"){e.content.css("left","");e.columns=e._columns;e.vScrollBar.jqxScrollBar({rtl:k});e.hScrollBar.jqxScrollBar({rtl:k});e._render()}else{if(l==="pagerMode"){e.pagerMode=k;e._initpager()}else{if(l=="pageSizeOptions"){e._initpager();var j=false;for(var f=0;f0){c.jqxDropDownList({theme:e.theme})}if(e.filtercolumnsList){e.filtercolumnsList.jqxDropDownList({theme:e.theme})}}e.refresh()}else{e.refresh()}}}}}}}}}}}}}}}}}},_rendercolumnheader:function(f,g,c,d){var e="4px";if(d.columnGroups){e=(c/2-this._columnheight/2);if(e<0){e=4}e+="px"}else{if(this.columnsHeight!=25){e=(this.columnsHeight/2-this._columnheight/2);if(e<0){e=4}e+="px"}}return'
    '+f+"
    "}});function a(c,d){this.owner=c;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.aggregates=null;this.aggregatesRenderer=null;this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(e,f){if(this[e]){var g=this[e];this[e]=f;this.owner._columnPropertyChanged(this,e,f,g)}else{if(this[e.toLowerCase()]){var g=this[e.toLowerCase()];this[e.toLowerCase()]=f;this.owner._columnPropertyChanged(this,e.toLowerCase(),f,g)}}};this._initfields=function(f){if(f!=null){var e=this;if(b.jqx.hasProperty(f,"dataField")){this.datafield=b.jqx.get(f,"dataField")}if(b.jqx.hasProperty(f,"displayField")){this.displayfield=b.jqx.get(f,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"validation")){this.validation=b.jqx.get(f,"validation")}if(b.jqx.hasProperty(f,"autoCellHeight")){this.autoCellHeight=b.jqx.get(f,"autoCellHeight")}if(b.jqx.hasProperty(f,"text")){this.text=b.jqx.get(f,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(f,"sortable")){this.sortable=b.jqx.get(f,"sortable")}if(b.jqx.hasProperty(f,"hidden")){this.hidden=b.jqx.get(f,"hidden")}if(b.jqx.hasProperty(f,"groupable")){this.groupable=b.jqx.get(f,"groupable")}if(b.jqx.hasProperty(f,"renderer")){this.renderer=b.jqx.get(f,"renderer")}if(b.jqx.hasProperty(f,"align")){this.align=b.jqx.get(f,"align")}if(b.jqx.hasProperty(f,"cellsAlign")){this.cellsalign=b.jqx.get(f,"cellsAlign")}if(b.jqx.hasProperty(f,"cellsFormat")){this.cellsFormat=b.jqx.get(f,"cellsFormat")}if(b.jqx.hasProperty(f,"width")){this.width=b.jqx.get(f,"width")}if(b.jqx.hasProperty(f,"minWidth")){this.minwidth=b.jqx.get(f,"minWidth")}if(b.jqx.hasProperty(f,"maxWidth")){this.maxwidth=b.jqx.get(f,"maxWidth")}if(b.jqx.hasProperty(f,"cellsRenderer")){this.cellsRenderer=b.jqx.get(f,"cellsRenderer")}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"pinned")){this.pinned=b.jqx.get(f,"pinned")}if(b.jqx.hasProperty(f,"filterable")){this.filterable=b.jqx.get(f,"filterable")}if(b.jqx.hasProperty(f,"filter")){this.filter=b.jqx.get(f,"filter")}if(b.jqx.hasProperty(f,"resizable")){this.resizable=b.jqx.get(f,"resizable")}if(b.jqx.hasProperty(f,"draggable")){this.draggable=b.jqx.get(f,"draggable")}if(b.jqx.hasProperty(f,"editable")){this.editable=b.jqx.get(f,"editable")}if(b.jqx.hasProperty(f,"initEditor")){this.initeditor=b.jqx.get(f,"initEditor")}if(b.jqx.hasProperty(f,"createEditor")){this.createeditor=b.jqx.get(f,"createEditor")}if(b.jqx.hasProperty(f,"destroyEditor")){this.destroyeditor=b.jqx.get(f,"destroyEditor")}if(b.jqx.hasProperty(f,"getEditorValue")){this.geteditorvalue=b.jqx.get(f,"getEditorValue")}if(b.jqx.hasProperty(f,"className")){this.classname=b.jqx.get(f,"className")}if(b.jqx.hasProperty(f,"cellClassName")){this.cellclassname=b.jqx.get(f,"cellClassName")}if(b.jqx.hasProperty(f,"aggregates")){this.aggregates=b.jqx.get(f,"aggregates")}if(b.jqx.hasProperty(f,"aggregatesRenderer")){this.aggregatesRenderer=b.jqx.get(f,"aggregatesRenderer")}if(b.jqx.hasProperty(f,"rendered")){this.rendered=b.jqx.get(f,"rendered")}if(b.jqx.hasProperty(f,"exportable")){this.exportable=b.jqx.get(f,"exportable")}if(b.jqx.hasProperty(f,"nullable")){this.nullable=b.jqx.get(f,"nullable")}if(b.jqx.hasProperty(f,"columnGroup")){this.columngroup=b.jqx.get(f,"columnGroup")}if(!f instanceof String&&!(typeof f=="string")){for(var g in f){if(!e.hasOwnProperty(g)){if(!e.hasOwnProperty(g.toLowerCase())){c.host.remove();throw new Error("jqxDataTable: Invalid property name - "+g+".")}}}}}};this._initfields(d);return this}b.jqx.dataCollection=function(c){this.records=new Array();this.owner=c;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(e,d){this.records[e]=d};this.isempty=function(d){if(this.records[d]==undefined){return true}return false};this.initialize=function(d){if(d<1){d=1}this.records[d-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(d){return this.records.indexOf(d)};this.add=function(d){if(d==null){return false}this.records[this.records.length]=d;return true};this.insertAt=function(e,d){if(e==null||e==undefined){return false}if(d==null){return false}if(e>=0){if(e0){for(var s=0;sc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(b.jqx.dataFormat.isNumber(d)&&b.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(b.jqx.dataFormat.isDate(d)&&b.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(d)&&!b.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(p){if(this.grid.serverProcessing){if(p){if(this.grid.source._source.id==""||this.grid.source._source.id==null){if(this.grid.pageable){var c=this.grid.pageSize*this.pagenum;this.grid.rowsByKey=new Array();var h=this;b.each(p,function(i){this.uid=c;h.grid.rowsByKey[this.uid]=this;c++})}}}return p}var d=new Array();if(this.filters.length){var j=new Array();var o=function(s,w){for(var u=0;u0)){var n=new Array();var k=function(r,s){for(var q=0;q0){k(t,t.records)}}};k(null,p);o.call(this,n,d);for(var e=0;e0)){var h=this;var l=new Array();this._sortData=null;var f=function(t,q){h._sortData=null;var r=null;if(h.source.hierarchy.groupingDataFields){if(q&&q.length>0&&q[0].level0){return b(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=b(d).attr(j);if(c!=null&&c.toString().length>0){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.grid.rowsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.grid.rowsByKey["jqx"+f];if(!g){var g=this.grid.rowsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); +(function(b){b.jqx.jqxWidget("jqxDataTable","",{});b.extend(b.jqx._jqxDataTable.prototype,{defineInstance:function(){var c={altRows:false,aggregatesHeight:34,autoShowLoadElement:true,autoRowHeight:true,columnsHeight:30,columns:[],columnGroups:null,columnsResize:false,columnsReorder:false,dataview:null,disabled:false,editable:false,editSettings:{saveOnPageChange:true,saveOnBlur:true,saveOnSelectionChange:true,cancelOnEsc:true,saveOnEnter:true,editSingleCell:false,editOnDoubleClick:true,editOnF2:true},enableHover:true,enableBrowserSelection:false,filterHeight:35,filterable:false,filterMode:"default",groupsRenderer:null,groups:new Array(),headerZIndex:359,height:null,handleKeyboardNavigation:null,indentWidth:25,initRowDetails:false,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxDataTable raises the 'bindingComplete' event when the binding is completed.",localization:null,pagerHeight:40,pageSize:10,pageSizeOptions:["5","10","20"],pageable:false,pagerPosition:"bottom",pagerMode:"default",pageSizeMode:"default",pagerButtonsCount:5,pagerRenderer:null,ready:null,rendertoolbar:null,rowDetails:false,renderStatusBar:null,rendered:null,rendering:null,rtl:false,sortable:false,showtoolbar:false,showstatusbar:false,statusBarHeight:34,serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:b.jqx.utilities.scrollBarSize,touchScrollBarSize:b.jqx.utilities.touchScrollBarSize,showAggregates:false,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,beginEdit:null,endEdit:null,autokoupdates:true,columnsVirtualization:false,exportSettings:{columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,recordsInView:true,fileName:"jqxDataTable"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},toolbarHeight:34,tableZIndex:369,_updating:false,touchmode:"auto",width:null,that:this,incrementalSearch:true,events:["bindingComplete","sort","filter","pageChanged","pageSizeChanged","rowClick","rowDoubleClick","cellValueChanged","rowBeginEdit","rowEndEdit","rowSelect","rowUnselect","rowCheck","rowUncheck","columnResized","columnReordered","rowExpand","rowCollapse","cellBeginEdit","cellEndEdit"]};if(this===b.jqx._jqxDataTable.prototype){return c}b.extend(true,this,c);this.that=this;return c},createInstance:function(e){var l=this;if(b.jqx.utilities.scrollBarSize!=13){l.scrollBarSize=b.jqx.utilities.scrollBarSize}if((l.element.nodeName.toLowerCase()=="table")||b(l.element).children("table").length>0){var n=l.host.find("tbody tr");var d=l.host.find("th");var w=new Array();if(d.length===0){d=n[0];n.splice(0,1)}if(l.localizestrings){l.localizestrings();if(l.localization!=null){l.localizestrings(l.localization,false)}}var z=[];for(var u=0;u");var m=l.host.parent();var q=l.host.data();q.jqxDataTable.host=m;q.jqxDataTable.element=m[0];l.host.parent()[0].id=l.element.id;try{l.host.parent()[0].style=l.element.style}catch(r){}l.element=m[0];l.host=m;l.host.data(q);var o={dataFields:w,localdata:z,datatype:"array"};var y=new b.jqx.dataAdapter(o);l.source=y}if(l.source&&!l.source.dataBind){l.source=new b.jqx.dataAdapter(l.source)}var x=l.source._source.datafields;if(x&&x.length>0){l._camelCase=l.source._source.dataFields!==undefined;l.selectionMode=l.selectionMode.toLowerCase()}if(l.host.attr("tabindex")==null){l.host.attr("tabindex","0")}l.host.attr("role","grid");l.host.attr("align","left");l.host.addClass(l.toTP("jqx-grid"));l.host.addClass(l.toTP("jqx-reset"));l.host.addClass(l.toTP("jqx-rc-all"));l.host.addClass(l.toTP("jqx-widget"));l.host.addClass(l.toTP("jqx-widget-content"));if(l._testmodules()){return}l.render(true);b.jqx.utilities.resize(l.host,function(){var A=b(window).width();var i=b(window).height();var j=l.host.width();var B=l.host.height();if(l._lastHostWidth!=j||l._lastHostHeight!=B){l._updatesize(l._lastHostWidth!=j,l._lastHostHeight!=B)}l._lastWidth=A;l._lastHeight=i;l._lastHostWidth=j;l._lastHostHeight=B})},getvaluebytype:function(h,d){var f=h;if(h==null){return h}if(this.gridlocalization.decimalseparator==","){if(h.indexOf(this.gridlocalization.decimalseparator)>=0){h=h.replace(this.gridlocalization.decimalseparator,".")}}if(h.indexOf(this.gridlocalization.currencysymbol)>=0){h=h.replace(this.gridlocalization.currencysymbol,"")}if(h.indexOf(this.gridlocalization.percentagesymbol)>=0){h=h.replace(this.gridlocalization.percentagesymbol,"")}if(b.isArray(h)&&d.type!="array"){for(var e=0;e');var d=b('
    '+this.gridlocalization.loadtext+"
    ");d.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));d.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(d);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var c=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){c=true}}if(c){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var e=false;if(this.width==="auto"||this.width===null||this.autoWidth){e=true}if(e){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(d){var c=b("measure Text");c.addClass(this.toTP("jqx-widget"));b(document.body).append(c);if(d=="cell"){this._cellheight=c.height()}else{this._columnheight=c.height()}c.remove()},_testmodules:function(){var g="";var e=this;var c=function(){if(g.length!=""){g+=","}};if(!this.host.jqxScrollBar){c();g+=" jqxscrollbar.js"}if(!this.host.jqxButton){c();g+=" jqxbuttons.js"}if(!b.jqx.dataAdapter){c();g+=" jqxdata.js"}if(g!=""||this.editable||this.filterable||this.pageable){var d=[];var f=function(h){switch(h){case"checkbox":if(!e.host.jqxCheckBox&&!d.checkbox){d.checkbox=true;c();g+=" jqxcheckbox.js"}break;case"dropdownlist":if(!e.host.jqxDropDownList&&!d.dropdownlist){c();d.dropdownlist=true;g+=" jqxdropdownlist.js(requires: jqxlistbox.js)"}else{if(!e.host.jqxListBox&&!d.listbox){c();d.listbox=true;g+=" jqxlistbox.js"}}break}};if((this.filterable&&this.filterMode!="simple")||(this.pagerMode=="advanced"&&this.pageable)){f("dropdownlist")}if(g!=""){throw new Error("jqxDataTable: Missing references to the following module(s): "+g);this.host.remove();return true}}return false},focus:function(){try{this.wrapper.focus();this.host.focus();var d=this;setTimeout(function(){d.wrapper.focus();d.host.focus()},25);this.focused=true}catch(c){}},hiddenParent:function(){return b.jqx.isHidden(this.host)},isBindingCompleted:function(){return !this._loading},_updatesize:function(i,h){if(this._loading){return}var f=this;var g=f.host.width();var e=f.host.height();if(!f._oldWidth){f._oldWidth=g}if(!f._oldHeight){f._oldHeight=e}if(f._resizeTimer!=undefined){clearTimeout(f._resizeTimer);f._resizeTimer=null}var d=300;var c=function(){if(f._resizeTimer){clearTimeout(f._resizeTimer)}f.resizingGrid=true;if(b.jqx.isHidden(f.host)){return}f._updatecolumnwidths();f.refresh();f._oldWidth=g;f._oldHeight=e;f.resizingGrid=false};c();f._resizeTimer=setTimeout(function(){var k=f.host.width();var j=f.host.height();if(f._oldWidth!=k||f._oldHeight!=j){c()}},d)},resize:function(d,c){if(d!=undefined){this.width=d}if(c!=undefined){this.height=c}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var c=b.jqx.mobile.isTouchDevice();this.touchDevice=c;if(this.touchmode==true){c=true;b.jqx.mobile.setMobileSimulator(this.table[0]);this.touchDevice=c}else{if(this.touchmode==false){c=false}}if(c){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return c},toTP:function(c){return this.toThemeProperty(c)},localizestrings:function(c,f){this._cellscache=new Array();if(b.jqx.dataFormat){b.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(c!=null){for(var h in c){if(h.toLowerCase()!==h){c[h.toLowerCase()]=c[h]}}var j=["pagergotopagestring","pagershowrowsstring","pagerrangestring","pagernextbuttonstring","pagerpreviousbuttonstring","pagerfirstbuttonstring","pagerlastbuttonstring","toppagerstring","firstDay","days","months","AM","PM","patterns","percentsymbol","currencysymbol","currencysymbolposition","decimalseparator","thousandsseparator","filterapplystring","filteraddnew","filtercancelstring","filterclearstring","filterstring","filterstringcomparisonoperators","filternumericcomparisonoperators","filterdatecomparisonoperators","filterbooleancomparisonoperators","emptydatastring","filterselectstring","todaystring","clearstring","validationstring","loadtext","filtersearchstring","loadingErrorMessage"];var g=this;for(var e=0;eg&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}else{this.vScrollBar[0].style.visibility="hidden"}if((h!=this.vScrollBar[0].style.visibility)){this._updatecolumnwidths();var i=this.table.height();if(j!=i){j=i;if(!q&&j>g&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.vScrollBar[0].style.visibility=e;n=4+parseInt(d);this.vScrollBar.jqxScrollBar({max:j-g})}}}if(this.scrollBarSize==0){n=0}var o=this.table?this.table.width():0;if(o>3){o-=3}var c=parseInt(this.host.css("border-left-width"))+parseInt(this.host.css("border-right-width"));var r=c+this.host.width()-n;if(o>r&&!p){this.hScrollBar[0].style.visibility=e;this.hScrollBar.jqxScrollBar({max:o-r});n=4+parseInt(d);if(d==0){n=0}if(!q){if(j>g-n+4&&(this.source.records.length>0||(this.source.hierarchy&&this.source.hierarchy.length>0))){this.hScrollBar.jqxScrollBar({max:c+o-r});var f=this.vScrollBar[0].style.visibility==="hidden";this.vScrollBar[0].style.visibility=e;this._updatecolumnwidths();if(f){this.hScrollBar.jqxScrollBar({max:o-r+n+c})}var k=this.table?this.table.width():0;if(k>3){k-=3}if(k!=o){if(k"+e+"");d.addClass(this.toTP("jqx-widget"));d.addClass(this.toTP("jqx-grid"));d.addClass(this.toTP("jqx-grid-column-header"));d.addClass(this.toTP("jqx-widget-header"));b(document.body).append(d);var c=d.outerWidth()+20;d.remove();return c},_arrangeAutoHeight:function(e){if(!e){e=0}if(this.height==="auto"||this.height===null||this.autoheight){var h=this.table.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:-1}else{g+=this.showHeader?this.columnsheader.height():-1}g+=this.showstatusbar?this.statusBarHeight:0;g+=this.showAggregates?this.aggregatesHeight:0;g+=this.showtoolbar?this.toolbarHeight:0;g+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){g+=this.pageable?this.pagerHeight:0}g+=h;if(this.filterable){var f=this.filter.find(".filterrow");var c=this.filter.find(".filterrow-hidden");var d=1;if(c.length>0){d=0}g+=this.filterHeight-1+this.filterHeight*f.length*d}if(g+e>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(g+e)}return true}return false},_arrangeAutoWidth:function(e){if(!e){e=0}if(this.width==="auto"||this.width===null||this.autowidth){var d=0;for(var f=0;fthis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(g+e)}return true}return false},_measureTopAndHeight:function(){var d=this.host.height();var h=0;if(this.showtoolbar){h+=this.toolbarHeight;d-=parseInt(this.toolbarHeight)}if(this.filterable){var g=this.filter.find(".filterrow");var e=this.filter.find(".filterrow-hidden");var f=1;if(e.length>0){f=0}h+=this.filterHeight;d-=parseInt(this.filterHeight);var c=f==1?g.length:0;h+=this.filterHeight*c;d-=this.filterHeight*c}if(this.pageable&&this.pagerPosition!="bottom"){h+=parseInt(this.pagerHeight)+1;if(d>this.pagerHeight&&this.pagerPosition==="both"){d-=parseInt(this.pagerHeight)}}return{top:h,height:d}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var v=this.host.width();var r=this.host.height();var j=r;var i=this;if(this.pageable){if(this.pagerPosition==="bottom"){this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="both"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="inherit"}else{if(this.pagerPosition==="top"){this.toppager[0].style.visibility="inherit";this.pager[0].style.visibility="hidden"}}}}else{this.toppager[0].style.visibility="hidden";this.pager[0].style.visibility="hidden"}var q=0;if(this.showtoolbar){this.toolbar.width(v);this.toolbar.height(this.toolbarHeight-1);this.toolbar.css("top",0);q+=this.toolbarHeight;r-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.filterable){this.filter.width(v);this.filter.css("top",q);var t=this.filter.find(".filterrow");var h=this.filter.find(".filterrow-hidden");var A=1;if(h.length>0){A=0}this.filter.height(this.filterHeight-1+this.filterHeight*t.length*A);q+=this.filterHeight;r-=parseInt(this.filterHeight);var x=A==1?t.length:0;q+=this.filterHeight*x;r-=this.filterHeight*x}if(this.showstatusbar){this.statusbar.width(!this.table?v:Math.max(v,this.table.width()));this.statusbar.height(this.statusBarHeight-1)}else{this.statusbar[0].style.height="0px"}if(this.showAggregates){this.aggregates.height(this.aggregatesHeight-1)}else{this.aggregates[0].style.height="0px"}if(this.pageable&&this.pagerPosition!="bottom"){this.toppager[0].style.width=v+"px";this.toppager[0].style.height=parseInt(this.pagerHeight)+"px";this.toppager[0].style.top=parseInt(q)+"px";q+=parseInt(this.pagerHeight)+1;if(r>this.pagerHeight){r-=parseInt(this.pagerHeight)}}else{if(this.toppager[0].style.width!=v+"px"){this.toppager[0].style.width=parseInt(v)+"px"}if(this.toppager[0].style.height!=this.pagerHeight+"px"){this.toppager[0].style.height=parseInt(this.pagerHeight)+"px"}if(this.toppager[0].style.top!=q+"px"){this.toppager[0].style.top=q+"px"}var y=this.pagerPosition!="bottom"?this.pagerHeight:0;var d=q+y+"px";if(this.content[0].style.top!=d){this.content[0].style.top=q+this.pagerHeight+"px"}}this._updateScrollbars(j);var c=parseInt(this.scrollBarSize);var n=4;var e=2;var f=0;if(this.vScrollBar[0].style.visibility!="hidden"){f=c+n}if(this.hScrollBar[0].style.visibility!="hidden"){e=c+n+2}if(c==0){f=0;e=0}if(this.showAggregates){if(this.hScrollBar[0].style.visibility==="hidden"){this.aggregates.width(!this.table?v:Math.max(v,this.table.width())+4)}else{this.aggregates.width("auto")}}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var w=this._arrangeAutoHeight(e-2);var s=this._arrangeAutoWidth(f+1);if(w||s){var v=this.host.width();this.toppager[0].style.width=parseInt(v)+"px";this.toolbar[0].style.width=parseInt(v)+"px";this.statusbar[0].style.width=parseInt(v)+"px";this.filter[0].style.width=parseInt(v)+"px"}if(w){var B=this._measureTopAndHeight();q=B.top;r=B.height}}var m=0;if(this.pageable){m=this.pagerHeight;if(this.pagerPosition!="top"){e+=this.pagerHeight}}if(this.showAggregates){e+=this.aggregatesHeight;m+=this.aggregatesHeight}if(this.showstatusbar){e+=this.statusBarHeight;m+=this.statusBarHeight}if(this.hScrollBar[0].style.height!=c+"px"){this.hScrollBar[0].style.height=parseInt(c)+"px"}if(this.hScrollBar[0].style.top!=q+r-n-c-m+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=q+r-n-c-m-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var g=false;var z=false;if(f==0){if(l!=(v-2)+"px"){this.hScrollBar[0].style.width=(v-2)+"px";g=true}}else{if(l!=(v-c-n)+"px"){this.hScrollBar[0].style.width=(v-c-n+"px");g=true}}if(this.vScrollBar[0].style.width!=c+"px"){this.vScrollBar[0].style.width=c+"px";z=true}if(this.vScrollBar[0].style.height!=parseInt(r)-e+"px"){this.vScrollBar[0].style.height=(parseInt(r)-e+"px");z=true}if(this.vScrollBar[0].style.left!=parseInt(v)-parseInt(c)-n+"px"||this.vScrollBar[0].style.top!=q+"px"){this.vScrollBar[0].style.top=q+"px";this.vScrollBar[0].style.left=parseInt(v)-parseInt(c)-n+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:q});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:c+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var u=this.hScrollInstance;u.disabled=this.disabled;if(g){u.refresh()}if(z){k.refresh()}var o=function(C){if((C.vScrollBar[0].style.visibility!="hidden")&&(C.hScrollBar[0].style.visibility!="hidden")){C.bottomRight[0].style.visibility="inherit";C.bottomRight[0].style.left=1+parseInt(C.vScrollBar.css("left"))+"px";C.bottomRight[0].style.top=parseInt(C.hScrollBar.css("top"))+"px";if(C.rtl){C.bottomRight.css("left","0px")}C.bottomRight[0].style.width=parseInt(c)+3+"px";C.bottomRight[0].style.height=parseInt(c)+4+"px";if(C.showAggregates){C.bottomRight.css("z-index",99);C.bottomRight.height(parseInt(c)+4+C.aggregatesHeight);C.bottomRight.css({top:parseInt(C.hScrollBar.css("top"))-C.aggregatesHeight})}}else{C.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=v-f+"px"){this.content[0].style.width=v-f+"px"}if(this.content[0].style.height!=r-e+3+"px"){this.content[0].style.height=r-e+3+"px"}if(this.content[0].style.top!=q+"px"){this.content[0].style.top=parseInt(q)+"px"}if(this.rtl){this.content.css("left",f);if(this.filter&&(this.filter.children().length>0)){b(this.filter.children()).css("left",f)}if(this.table){var p=this.table.width();if(p0)){b(this.filter.children()).css("left",v-p+2)}}}}if(this.showAggregates){this.aggregates.css("top",q+r-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0));if(this.rtl){this.aggregates.css("left","0px")}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({top:q+r-n-c-m+this.aggregatesHeight+"px"});this.aggregates.css("top",1+q+r-c-5-this.aggregatesHeight-(this.pageable?this.pagerHeight:0)-(this.showstatusbar?(this.statusBarHeight+1):0))}o(this)}if(this.showstatusbar){this.statusbar.css("top",q+r-this.statusBarHeight-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.statusbar.css("left",this.content.css("left"))}else{this.statusbar.css("left","0px")}}}if(this.pageable){this.pager[0].style.width=v+"px";this.pager[0].style.height=this.pagerHeight+"px";this.pager[0].style.top=parseInt(q)+parseInt(r)-parseInt(this.pagerHeight)-1+"px"}else{this.pager[0].style.height="0px"}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(v!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(r!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostwidth=v},scrollOffset:function(e,d){if(arguments.length==0||(e!=null&&typeof(e)=="object"&&!e.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(e!=null&&typeof(e)=="object"){var d=e.left;var c=e.top;var e=c}if(e==null||d==null||e==undefined||d==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",e);this.hScrollBar.jqxScrollBar("setPosition",d)},scrollleft:function(c){if(c==null||c==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",c)}},scrolltop:function(c){if(c==null||c==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",c)}},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(c){this._updating=false;if(c===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(h,j,c){if(this.loadingstate===true){return}var d=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){b(this.dataloadelement).css("visibility","visible");b(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{b(this.dataloadelement).css("visibility","hidden");b(this.dataloadelement).css("display","none")}}var g=this;if(h==null){h={}}if(h.sortcomparer==undefined||h.sortcomparer==null){h.sortcomparer=null}if(h.filter==undefined||h.filter==null){h.filter=null}if(h.sort==undefined||h.sort==null){h.sort=null}if(h.data==undefined||h.data==null){h.data=null}var e=null;if(h!=null){e=h._source!=undefined?h._source.url:h.url}this.dataview=this.dataview||new b.jqx.dataView();this.dataview.pageable=this.pageable;this.dataview.grid=this;if(!g.initializedcall){if(h._source){if(this.sortable){if(h._source.sortcolumn!=undefined){this.sortcolumn=h._source.sortcolumn;this.source.sortcolumn=this.sortcolumn;this.dataview.sortfield=h._source.sortcolumn;h._source.sortcolumn=null}if(h._source.sortdirection!=undefined){this.dataview.sortfielddirection=h._source.sortdirection;var i=h._source.sortdirection;if(i=="a"||i=="asc"||i=="ascending"||i==true){var f=true}else{var f=false}if(i!=null){this.sortdirection={ascending:f,descending:!f}}else{this.sortdirection={ascending:false,descending:false}}}}}if(this.pageable){if(h._source){if(h._source.pagenum!=undefined){this.dataview.pagenum=h._source.pagenum}if(h._source.pagesize!=undefined){this.pageSize=h._source.pagesize;this.dataview.pagesize=h._source.pagesize}else{this.dataview.pagesize=h._source.pagesize;if(this.dataview.pagesize==undefined){this.dataview.pagesize=this.pageSize}}}}if(this.sortable){if(h.sortcolumn){this.dataview.sortfield=h.sortcolumn}if(h.sortdirection){this.dataview.sortfielddirection=h.sortdirection}}}this._loading=true;this.dataview.update=function(y){g._loading=false;g.rowsByKey=new Array();var C=g.source._source.datafields;if(g.groups&&g.groups.length>0){var s=Object.prototype.toString;var m=g.groups[0];Object.prototype.toString=(typeof m=="function")?m:function(){return this[m]};if(!g.source.records.sort){var u=new Array();var q=0;var E=0;var D={};b.each(D,function(){u[E+q++]=this});D=u}g.source.records.sort(function(G,F){if(G===undefined){G=null}if(F===undefined){F=null}if(G===null&&F===null){return 0}if(G===null&&F!==null){return -1}if(G!==null&&F===null){return 1}var J=0;var I=0;if(G&&G.uid){J=G.uid}if(F&&F.uid){I=F.uid}G=G.toString();F=F.toString();if(b.jqx.dataFormat.isNumber(G)&&b.jqx.dataFormat.isNumber(F)){if(GF){return 1}return 0}else{if(b.jqx.dataFormat.isDate(G)&&b.jqx.dataFormat.isDate(F)){if(GF){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(G)&&!b.jqx.dataFormat.isNumber(F)){G=String(G).toLowerCase();F=String(F).toLowerCase()}}}try{if(GF){return 1}}catch(H){var K=H}if(typeof(J)=="number"){if(JI){return 1}}return 0});Object.prototype.toString=s}for(var A=0;A0){var t=function(F){for(var G=0;G0){t(F[G].records)}}};t(p.records)}if(A===0){var n=false;if(C){for(var z=0;z-1||l.toString().indexOf(g.gridlocalization.percentsymbol)>-1){var v=l.toString().split(" ").length;var k=new Number(g._toNumber(l.toString()));if(!isNaN(k)&&v==1){C[z].type="number"}}if(b.jqx.dataFormat.isNumber(l)||(!isNaN(parseFloat(l))&&isFinite(l))){C[z].type="number"}if(b.jqx.dataFormat.isDate(l)){C[z].type="date"}}}}if(n){for(var z=0;zg-c){this.hScrollBar.jqxScrollBar("setPosition",g-c)}else{if(g>e){this.hScrollBar.jqxScrollBar("setPosition",h+g-e)}}}},ensurerowvisiblebykey:function(o){if(this.vScrollBar[0].style.visibility==="hidden"){return false}var p=this._getuirow(o);if(!p){return}var m=this.vScrollBar.jqxScrollBar("value");var e=this.host.height();var g=0;if(!this.columnGroups){g+=this.showHeader?this.columnsHeight:0}else{g+=this.showHeader?this.columnsheader.height():0}if(this.filterable){g+=this.filter.height()}if(this.pageable){if(this.pagerPosition==="top"){g+=this.pagerHeight}}if(this.showtoolbar){g+=this.toolbarHeight}e-=g;if(this.pageable&&this.pagerPosition!=="top"){e-=this.pagerHeight}if(this.showstatusbar){e-=this.statusBarHeight}if(this.showAggregates){e-=this.aggregatesHeight}if(this.hScrollBar.css("visibility")!="hidden"){e-=20}var n=this.host.coord().top+g;var f=m;var c=e+f;var i=p.coord().top+m-n;i=Math.round(i);var l=i+p.outerHeight();l=Math.round(l);if(Math.round(p.position().top)===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var j=b(this._table.children()[1]).children().length-1;var d=this._getuikey(j);var k=this._getuirow(d);if(k){if(k[0]===p[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}}if(ic){return this.vScrollBar.jqxScrollBar("setPosition",4+l-e)}},ensureRowVisible:function(c){var d=this._getkey(c);this.ensurerowvisiblebykey(d)},getColumn:function(c){var d=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.datafield==c||this.displayfield==c){d=this;return false}})}return d},_setcolumnproperty:function(e,g,h){if(e==null||g==null||h==null){return null}var d=g;g=g.toLowerCase();var f=this.getColumn(e);if(f==null){return}var i=f[g];f[g]=h;f[d]=h;var c=this.getColumn(e);if(c!=null){c[g]=h}switch(g){case"filteritems":case"text":case"editable":case"resizable":case"draggable":case"hidden":case"hideable":case"renderer":case"cellsrenderer":case"align":case"aggregates":case"cellsalign":case"cellsformat":case"pinned":case"contenttype":case"filterable":case"groupable":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(g=="align"){this._rendercolumnheaders();this.refresh()}else{if(g=="text"||g=="class"||g=="hidden"||g=="pinned"||g=="resizable"||g=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(g=="width"||g=="maxwidth"||g=="minwidth"){f._width=null;f._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(c,e){if(c==null||e==null){return null}e=e.toLowerCase();var d=this.getColumn(c);return d[e]},setColumnProperty:function(c,d,e){this._setcolumnproperty(c,d,e)},hideColumn:function(c){this._setcolumnproperty(c,"hidden",true)},showColumn:function(c){this._setcolumnproperty(c,"hidden",false)},updateBoundData:function(d,c){this.databind(this.source,d,c)},refresh:function(c){if(c!=true){if(b.jqx.isHidden(this.host)){return}this.vScrollInstance.setPosition(0);this._renderrows();this.updatepagerdetails();this._arrange();if(this._arrangeFilterRow){this._arrangeFilterRow()}this._renderhorizontalscroll();this._showicons();if(this.showAggregates){this._updateaggregates()}this._updateTouchScrolling()}},_rendercelltexts:function(){if(b.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var d="www.jqwidgets.com";if(location.hostname.indexOf(d.substring(4))==-1){if(this._gridRenderElement){b(this._gridRenderElement).remove()}var e=String.fromCharCode(83,80,65,78);var c=String.fromCharCode(72,84,84,80,58,47,47);var f=document.createElement(e);f.id=b.jqx.utilities.createId();f.innerHTML=d;f.style.position="absolute";f.style.right="5px";f.style.bottom="5px";f.style.color="#909090";f.style.cursor="pointer";f.style.zIndex="999999";f.style.display="none";f.style.fontSize="9px";f.onmousedown=function(){open(c+d)};this.content[0].appendChild(f);this._gridRenderElement=f}}},_updateTouchScrolling:function(){var d=this.that;if(d.isTouchDevice()){var f=b.jqx.mobile.getTouchEventName("touchstart");var e=b.jqx.mobile.getTouchEventName("touchend");var c=b.jqx.mobile.getTouchEventName("touchmove");if(d.table){d.removeHandler(d.table,f+".touchScroll");d.removeHandler(d.table,c+".touchScroll");d.removeHandler(d.table,e+".touchScroll");d.removeHandler(d.table,"touchcancel.touchScroll");b.jqx.mobile.touchScroll(d.table[0],Math.max(d.vScrollInstance.max,d.hScrollInstance.max),function(i,h){if(h!=null&&d.vScrollBar.css("visibility")!="hidden"){var g=d.vScrollInstance.value;d.vScrollInstance.setPosition(h)}if(i!=null&&d.hScrollBar.css("visibility")!="hidden"){var g=d.hScrollInstance.value;d.hScrollInstance.setPosition(i)}d.scrolled=new Date();d.vScrollInstance.thumbCapture=true},this.element.id,this.hScrollBar,this.vScrollBar)}}},_showicons:function(){if(!this.table){return}for(var e=0;e0){c.css("margin-right",4+h+"px")}else{c.css("margin-right","4px")}}else{if(h>0){c.css("margin-left",4+h+"px")}else{c.css("margin-left","4px")}}}}},render:function(j){var f="
    ";this.element.innerText="";this.element.innerHTML=f;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var h=this.host.find("#verticalScrollBar"+this.element.id);var l=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=h.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=l.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchmode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=b.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=b.data(this.hScrollBar[0],"jqxScrollBar").instance;this.filter=this.host.find("#filter");this.filter[0].id="filter"+this.element.id;this.filter.addClass(this.toTP("jqx-widget-header"));this.filter.addClass(this.toTP("jqx-grid-toolbar"));this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-grid-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.aggregates=this.host.find("#aggregates");this.aggregates[0].id="aggregates"+this.element.id;this.aggregates.addClass(this.toTP("jqx-grid-statusbar"));this.aggregates.addClass(this.toTP("jqx-widget-header"));this.statusbar=this.host.find("#statusbar");this.statusbar[0].id="statusbar"+this.element.id;this.statusbar.addClass(this.toTP("jqx-grid-statusbar"));this.statusbar.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.toppager=this.host.find("#toppager");this.toppager.addClass(this.toTP("jqx-grid-pager-top"));this.toppager.addClass(this.toTP("jqx-widget-header"));this.gridtable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var c=this.source.datafields;if(c==null&&this.source._source){c=this.source._source.datafields}if(c){for(var d=0;d2){for(var k=0;k
    ');e.columnsheader.remove();e.columnsheader.addClass(e.toTP("jqx-widget-header"));e.columnsheader.addClass(e.toTP("jqx-grid-header"));if(!e.showHeader){e.columnsheader.css("display","none")}else{if(e.columnsheader){e.columnsheader.css("display","block")}}e.gridcontent=e.gridcontent||b('
    ');e.gridcontent.remove();var d=e.columnsHeight;d=e._preparecolumnGroups();e.columnsheader.height(d);e.content.append(e.columnsheader);e.content.append(e.gridcontent);e._rendercolumnheaders();e.tableheight=null;e.gridcontent.find("#contenttable"+e.element.id).remove();if(e.table!=null){e.table.remove();e.table=null}e.table=b('
    ');e.gridcontent.addClass(e.toTP("jqx-grid-content"));e.gridcontent.addClass(e.toTP("jqx-widget-content"));e.gridcontent.append(e.table);e._renderrows();if(e.filterable){e._renderfilter()}if(e.pageable){e._initpager()}e._arrange();if(e.renderStatusBar){e.renderStatusBar(e.statusbar)}if(e.rendertoolbar){e.rendertoolbar(e.toolbar)}if(e.showAggregates){e._updateaggregates()}if(e.disabled){e.host.addClass(e.toThemeProperty("jqx-fill-state-disabled"))}e._renderhorizontalscroll();e._showicons();e._addHandlers()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},_initpager:function(){var g=this;var c=this.gridlocalization.pagergotopagestring;var i=this.gridlocalization.pagerrangestring;var d=this.gridlocalization.pagershowrowsstring;var h=(this.pagerHeight-28)/2;this.pagerdiv=this.pagerdiv||b('
    ');this.toppagerdiv=this.toppagerdiv||b('
    ');if(!this.pageable){this.pagerdiv.remove();this.toppagerdiv.remove();return}if(!this.pagerRenderer){this.pagerdiv.css("top",h);this.toppagerdiv.css("top",h);var f=function(s,E){var n=this;var r=b('
    ');var D=b('
    ');var t=b('
    ');var j=b('
    ');var m=b('
    ');var q=b('
    ');var z=b('
    ');var x=b('
    ');var p=b('
    ');r.attr("disabled",n.disabled);var A=b('
    ');A[0].id="gridpagerlist"+E+n.element.id;n.removeHandler(t,"mousedown");n.removeHandler(t,"mouseup");n.removeHandler(t,"click");n.removeHandler(j,"mousedown");n.removeHandler(j,"mouseup");n.removeHandler(j,"click");n.removeHandler(m,"mousedown");n.removeHandler(m,"mouseup");n.removeHandler(m,"click");n.removeHandler(q,"mousedown");n.removeHandler(q,"mouseup");n.removeHandler(q,"click");if(!n.rtl){j.attr("title",n.gridlocalization.pagerpreviousbuttonstring);t.attr("title",n.gridlocalization.pagernextbuttonstring)}else{t.attr("title",n.gridlocalization.pagerpreviousbuttonstring);j.attr("title",n.gridlocalization.pagernextbuttonstring)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){p.css("padding-top","3px")}this["pagerfirst"+E]=m;this["pagerlast"+E]=q;this["pagernext"+E]=t;this["pagerprevious"+E]=j;this["pagergotoinput"+E]=r;this["pagerdetails"+E]=z;this["pagershowrows"+E]=x;this["pagergotolabel"+E]=D;this["pagershowrowscombo"+E]=A;this["pagerbuttons"+E]=p;if(n.pagerMode=="default"){if(!n.rtl){m.attr("title",n.gridlocalization.pagerfirstbuttonstring);q.attr("title",n.gridlocalization.pagerlastbuttonstring)}else{q.attr("title",n.gridlocalization.pagerfirstbuttonstring);m.attr("title",n.gridlocalization.pagerlastbuttonstring)}var v=b("
    ");v.addClass(n.toThemeProperty("jqx-icon-arrow-first"));m.wrapInner(v);var o=b("
    ");o.addClass(n.toThemeProperty("jqx-icon-arrow-last"));q.wrapInner(o);if(!n.rtl){s.append(m);s.append(j);s.append(p);s.append(t);s.append(q)}else{s.append(q);s.append(t);s.append(p);s.append(j);s.append(m)}q.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});m.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var C=!n.rtl?"left":"right";p.css("float",C);q.css("float",C);m.css("float",C);t.css("float",C);j.css("float",C);z.css("float",n.rtl?"left":"right");if(n.rtl){z.css("margin-left","7px");z.css("margin-right","0px")}else{z.css("margin-left","0px");z.css("margin-right","7px")}}else{if(!n.rtl){s.append(t);s.append(j)}}t.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});j.jqxButton({cursor:"pointer",disabled:n.disabled,theme:n.theme});var k=b("
    ");k.addClass(n.toThemeProperty("jqx-icon-arrow-left"));j.wrapInner(k);var l=b("
    ");l.addClass(n.toThemeProperty("jqx-icon-arrow-right"));t.wrapInner(l);if(!n.rtl){s.append(z)}if(n.pagerMode!="default"){if(!n.rtl){s.append(A);s.append(x);s.append(r);s.append(D)}else{s.append(D);s.append(r);s.append(x);s.append(A);s.append(z);s.append(t);s.append(j)}var u=n.pageSizeOptions;A.jqxDropDownList({_checkForHiddenParent:false,rtl:n.rtl,disabled:n.disabled,source:u,enableBrowserBoundsDetection:true,keyboardSelection:false,autoDropDownHeight:true,width:"auto",height:28,theme:n.theme});var B=0;for(var y=0;y=u[y]){B=y}}D[0].innerHTML=c;A.jqxDropDownList({selectedIndex:B});var w=r.find("input");w.addClass(n.toThemeProperty("jqx-input"));w.addClass(n.toThemeProperty("jqx-widget-content"));if(this.rtl){w.css("direction","rtl")}var n=this;this.removeHandler(A,"select");this.addHandler(A,"select",function(K){if(K.args){if(n.vScrollInstance){n.vScrollInstance.setPosition(0)}var I=K.args.index;n.pagershowrowscombotop.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.selectIndex(I);n.pagershowrowscombobottom.data().jqxDropDownList.instance.renderSelection("mouse");n.pagershowrowscombotop.data().jqxDropDownList.instance.renderSelection("mouse");var L=n.dataview.pagenum*n.dataview.pagesize;var H=u[I];var J=n.pageSize;n.pageSize=parseInt(H);if(isNaN(n.pageSize)){n.pageSize=10}if(H>=100){n.pagershowrowscombotop.jqxDropDownList({width:55});n.pagershowrowscombobottom.jqxDropDownList({width:55})}else{n.pagershowrowscombotop.jqxDropDownList({width:44});n.pagershowrowscombobottom.jqxDropDownList({width:44})}n.dataview.pagesize=n.pageSize;var G=Math.floor(L/n.dataview.pagesize);if(G!==n.dataview.pagenum||parseInt(H)!==parseInt(J)){n._raiseEvent("pageSizeChanged",{pagenum:G,oldpageSize:J,pageSize:n.dataview.pagesize});var F=n.goToPage(G);if(!F){if(!n.serverProcessing){n.refresh()}else{n.updateBoundData("pager")}}}}});var r=r.find("input");r.addClass(n.toThemeProperty("jqx-grid-pager-input"));r.addClass(n.toThemeProperty("jqx-rc-all"));this.removeHandler(r,"keydown");this.removeHandler(r,"change");n.addHandler(r,"keydown",function(F){if(F.keyCode>=65&&F.keyCode<=90){return false}if(F.keyCode=="13"){var G=r.val();G=parseInt(G);if(!isNaN(G)){n.goToPage(G-1)}return false}});n.addHandler(r,"change",function(){var F=r.val();F=parseInt(F);if(!isNaN(F)){n.goToPage(F-1)}})}x[0].innerHTML=d;n.addHandler(t,"mouseenter",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseenter",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mouseleave",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-hover"))});n.addHandler(j,"mouseleave",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-hover"))});n.addHandler(t,"mousedown",function(){l.addClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(t,"mouseup",function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"))});n.addHandler(j,"mousedown",function(){k.addClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});n.addHandler(j,"mouseup",function(){k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"))});if(n.pagerMode==="default"){n.addHandler(q,"mouseenter",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseenter",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mouseleave",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-hover"))});n.addHandler(m,"mouseleave",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-hover"))});n.addHandler(q,"mousedown",function(){o.addClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mousedown",function(){v.addClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))});n.addHandler(q,"mouseup",function(){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"))});n.addHandler(m,"mouseup",function(){v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))})}n.addHandler(b(document),"mouseup.pagerbuttons"+E+this.element.id,function(){l.removeClass(n.toThemeProperty("jqx-icon-arrow-right-selected"));k.removeClass(n.toThemeProperty("jqx-icon-arrow-left-selected"));if(o){o.removeClass(n.toThemeProperty("jqx-icon-arrow-last-selected"));v.removeClass(n.toThemeProperty("jqx-icon-arrow-first-selected"))}});n.addHandler(t,"click",function(){if(!t.jqxButton("disabled")){if(!n.rtl){n.goToNextPage()}else{n.goToPrevPage()}}});n.addHandler(j,"click",function(){if(!j.jqxButton("disabled")){if(!n.rtl){n.goToPrevPage()}else{n.goToNextPage()}}});if(this.pagerMode==="default"){n.addHandler(m,"click",function(){if(!m.jqxButton("disabled")){if(!n.rtl){n.goToPage(0)}else{var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}}});n.addHandler(q,"click",function(){if(!q.jqxButton("disabled")){if(!n.rtl){var G=n.dataview.totalrecords;var F=Math.ceil(G/n.pageSize);n.goToPage(F-1)}else{n.goToPage(0)}}})}};this.pagerdiv.children().remove();this.toppagerdiv.children().remove();f.call(this,this.pagerdiv,"bottom");f.call(this,this.toppagerdiv,"top");this.pager.append(this.pagerdiv);this.toppager.append(this.toppagerdiv);this.updatepagerdetails()}else{this.pagerdiv.children().remove();this.toppager.children().remove();var e=this.pagerRenderer();if(e!=null){this.pagerdiv.append(b(e))}this.pager.append(this.pagerdiv);var e=this.pagerRenderer();if(e!=null){this.toppagerdiv.append(b(e))}this.toppager.append(this.toppagerdiv)}},_updatepagertheme:function(){},goToPage:function(f,h){if(this._loading){return false}if(this.editKey!=undefined){if(this.editSettings.saveOnPageChange){var e=this.endroweditbykey(this.editKey);if(!e){return false}}else{return false}}if(f==null||f==undefined){f=0}if(f==-1){f=0}if(f<0){return false}var d=this.dataview.totalrecords;var g=this.dataview.pagenum;var c=Math.ceil(d/this.pageSize);if(f>=c){if(this.dataview.totalrecords==0){this.dataview.pagenum=0;this.updatepagerdetails()}if(f>0){f=c-1}}if(this.dataview.pagenum!=f){if(this.pageable){this.dataview.pagenum=f;this._raiseEvent("pageChanged",{pagenum:f,oldpagenum:g,pageSize:this.dataview.pagesize})}if(!this.serverProcessing){this.refresh();if(h){if(b.isFunction(h)){h()}}}else{this.updateBoundData("pager",h)}return true}return false},goToPrevPage:function(e){if(this.dataview.pagenum>0){return this.goToPage(this.dataview.pagenum-1,e)}else{if(this.pagerMode!="default"&&this.pagerMode!="advanced"){var d=this.dataview.totalrecords;var c=Math.ceil(d/this.pageSize);return this.goToPage(c-1,e)}}return false},goToNextPage:function(e){var d=this.dataview.totalrecords;if(this.summaryrows){d+=this.summaryrows.length}var c=Math.ceil(d/this.pageSize);if(this.dataview.pagenum=this.dataview.totalrecords){u=this.dataview.totalrecords}var v=this.dataview.totalrecords;d++;var t=Math.ceil(v/this.dataview.pagesize);if(t>=1){t--}t++;if(this.pageSizeMode=="root"){t=Math.ceil(this.rootRecordsLength/this.dataview.pagesize);if(t>=1){t--}t++;v=this.rootRecordsLength;this.dataview.totalrecords=this.rootRecordsLength}if(this.pagerMode!="default"){if(this["pagergotoinputbottom"]){var k=this["pagergotoinputbottom"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t);k=this["pagergotoinputtop"].find("input");k.val(this.dataview.pagenum+1);k.attr("title","1 - "+t)}}else{var o="";var n=this.pagerButtonsCount;if(n==0||!n){n=5}var s=0;if(this.rtl){s=n-1}while((this.rtl&&s>=0)||(!this.rtl&&st&&!this.rtl){break}else{if(this.rtl&&e>t){s--;continue}}if(!this.rtl){if(s==0&&e>n){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}if(!this.rtl){o+=""+e+"";if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}}else{if(s===n-1){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(t>=1+e){o+="..."}}if(this.dataview.pagenum===e-1){c+=" "+this.toTP("jqx-fill-state-pressed")}o+=""+e+""}if(this.rtl){var c=this.toTP("jqx-grid-pager-number");c+=" "+this.toTP("jqx-rc-all");if(s==0&&e>n){o+="..."}}if(!this.rtl){s++}else{s--}}if(!this["pagerbuttonsbottom"]){return}var h=this["pagerbuttonsbottom"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");var h=this["pagerbuttonstop"].find("a");this.removeHandler(h,"click");this.removeHandler(h,"mouseenter");this.removeHandler(h,"mouseleave");this["pagerbuttonsbottom"][0].innerHTML=o;this["pagerbuttonstop"][0].innerHTML=o;if(this.disabled){this.host.find(".jqx-grid-pager-number").css("cursor","default")}var q=function(){h.click(function(i){if(j.disabled){return}var w=b(i.target).attr("data-page");j.goToPage(parseInt(w)-1)});h.mouseenter(function(i){if(j.disabled){return}b(i.target).addClass(j.toTP("jqx-fill-state-hover"))});h.mouseleave(function(i){if(j.disabled){return}b(i.target).removeClass(j.toTP("jqx-fill-state-hover"))})};if(this.pagerPosition==="both"||this.pagerPosition==="bottom"){var h=this["pagerbuttonsbottom"].find("a");q(h)}if(this.pagerPosition==="both"||this.pagerPosition==="top"){var h=this["pagerbuttonstop"].find("a");q(h)}}if(u==0&&uu){this.goToPrevPage()}},_preparecolumnGroups:function(){var o=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var m=this;for(var g=0;gi){return 1}return 0});for(var k=1;k0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){return true}}if(undefined==f.editKey){return false}});this.addHandler(b(window),"jqxReady."+this.element.id,function(){f._updatecolumnwidths();f.refresh()});if(this.editable){this.addHandler(b(document),"mousedown.gridedit"+this.element.id,function(k){if(f.editable&&f.editSettings.saveOnBlur){if(f.editKey!=null){if(!f.vScrollInstance.isScrolling()&&!f.vScrollInstance.isScrolling()){var s=f.host.coord();var p=f.host.width();var l=f.host.height();var u=false;var j=false;var t=false;if(k.pageYs.top+l){u=true;j=true}if(k.pageXs.left+p){u=true;t=true}if(u){var m=function(y){var x=b(y.children()[0]).data();if(x&&!x.jqxWidget){x=y.data()}if(!x){x=y.data()}if(x.jqxWidget&&x.jqxWidget.container&&x.jqxWidget.container[0].style.display=="block"){var i=x.jqxWidget;var z=i.container.coord().top;var w=i.container.coord().top+i.container.height();if(j&&(k.pageYw)){u=true;i.close();return true}else{return false}}};var r=f._editors;if(r){for(var n=0;n0){var k=f._pinnedTable[0].rows[f.hoveredRow[0].rowIndex].cells;i(k)}}f.hoveredRow=null};this.addHandler(this.table,"mouseleave",function(i){c();if(f.wrapper){f.wrapper.parent().removeAttr("tabindex",0);f.wrapper.removeAttr("tabindex",1);f.content.removeAttr("tabindex",2)}});var g=function(o){if(!f.enableHover){return true}f.hoveredRow=o;if(!o){return true}var l=o[0].cells;var n=f.rowDetails&&!f.treeGrid;var q=n&&!f.treeGrid?1:0;var k=0;if(q>0&&f.rtl){q=0;k=1}for(var m=q;m=0){if(!l.expanded){f.showdetailsbykey(F)}else{f.hidedetailsbykey(F)}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("jqx-grid-group")>=0&&f.treeGrid){if(!l.expanded){f.treeGrid.expandRow(F)}else{f.treeGrid.collapseRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}if(B.preventDefault){B.preventDefault()}}else{if(B.target&&B.target.className.indexOf&&B.target.className.indexOf("checkbox")>=0&&f.treeGrid){if(!l.checked){f.treeGrid.checkRow(F)}else{f.treeGrid.uncheckRow(F)}g(f._getuirow(F));if(B.stopPropagation){B.stopPropagation()}}else{var m=b(q).index();var k=f.columns.records[m];if(B.stopPropagation){B.stopPropagation()}if(f.editable&&f.editKey==null){if(f._lastSelectedKey==F&&f.editSettings.editOnDoubleClick&&A){var u=f.beginroweditbykey(F,k);return true}}if(f.isTouchDevice()){if(f.scrolled&&new Date()-f.scrolled<500){if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return false}}if(f.selectionMode==="singlerow"&&f.selectionMode!=="custom"){f.selectrowbykey(F,"mouse",false);f._lastSelectedKey=F;f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}else{if(f.selectionMode!=="custom"){if(!B.ctrlKey&&!B.metaKey){f.clearSelection(false)}if(B.shiftKey){if(f._lastSelectedKey){var l=f.rowinfo[f._lastSelectedKey];f._doSelection(f._lastSelectedKey,true,false);var j=b(f._table.children()[1]).children(("[data-key="+f._lastSelectedKey+"]"));var n=j.index();var z=p.index();f._selectRange(z,n);f.selectrowbykey(F,"mouse",false);f._updateSelection();if(B.preventDefault){B.preventDefault()}v();return true}}}f._lastSelectedKey=F;f.clickTime=new Date();if(f.selectionMode!=="custom"){if(l){if(l.selected){f.unselectrowbykey(F,"mouse",false)}else{f.selectrowbykey(F,"mouse",false)}v()}}else{return true}f._updateSelection();if(!f.enableBrowserSelection){if(B.preventDefault){B.preventDefault()}}return true}}}}}})},_updateSelection:function(){var l=this;var r=b(l._table.children()[1]).children();var n=l._pinnedTable?b(l._pinnedTable.children()[1]).children():null;var e=l.rowDetails&&!l.treeGrid;var d=e?1:0;var f=0;if(d>0&&l.rtl){d=0;f=1}for(var h=0;he){var h=e;var d=c;while(hf){var d=d.prev();var g=d.attr("data-key");this._doSelection(g,true,false);h--}}}},_getuikey:function(d,g){var f=null;var e=b(this._table.children()[1]).children();f=b(e[d]).attr("data-key");if(b(e[d]).attr("data-role")){var c=b(e[d]);if(g=="next"){while(c){c=c.next();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}else{if(g=="prev"){while(c){c=c.prev();if(c){var h=c.attr("data-role");if(!h){f=c.attr("data-key");return f}}}}}return null}return f},getRows:function(){return this.source.records},getView:function(){var d=this;var e=this._names();var f=new Array();var c=function(k,h){if(!h){return}for(var j=0;j0){g.records=new Array();c(g.records,h[j].records)}}}}};c(f,this.dataViewRecords);return f},getKeys:function(){var d=new Array();var e=this.source.records;for(var c=0;c0){var h=0;for(var j=0;j0){continue}if(h===n+e){k=o.attr("data-key");return k}h++}return k}if(this.rowDetails){var h=0;for(var j=0;j0){return c}}catch(e){var d=b(this._table.children()[1]).children();for(var f=0;f0){return c}}catch(e){var d=b(this._pinnedTable.children()[1]).children();for(var f=0;f=33&&s<=40))){var z=-1;if(!this._searchString){this._searchString=""}if((s==8||s==46)&&this._searchString.length>=1){this._searchString=this._searchString.substr(0,this._searchString.length-1)}var e=String.fromCharCode(s);var H=(!isNaN(parseInt(e)));var J=false;if((s>=65&&s<=97)||H||s==8||s==32||s==46){if(!X.shiftKey){e=e.toLocaleLowerCase()}if(s!=8&&s!=32&&s!=46){if(!(this._searchString.length>0&&this._searchString.substr(0,1)==e)){this._searchString+=e}}if(s==32){this._searchString+=" "}this._searchTime=new Date();var n=this.getSelection();if(n.length>=1){var t=n[0].uid;var C=-1;for(var S=0;S0&&B[0]==t)){var B=this._getMatches(this._searchString)}}else{var B=this._getMatches(this._searchString)}if(B.length>0){var n=this.getSelection();if(n.length>=1){var c=B.indexOf(n[0].uid);if(c==-1){this.clearSelection(false);this.selectrowbykey(B[0])}else{var h=c+1;if(h>=B.length){h=0}this.clearSelection(false);this.selectrowbykey(B[h])}}else{this.clearSelection(false);this.selectrowbykey(B[0])}this._lastSearchString=this._searchString}}if(this._searchTimer!=undefined){clearTimeout(this._searchTimer)}if(s==27||s==13){this._searchString="";this._lastSearchString=""}this._searchTimer=setTimeout(function(){I._searchString="";I._lastSearchString=""},500);if(z>=0){return}if(J){return false}}}if(this.editKey!=undefined){if(s===27&&this.editSettings.cancelOnEsc){this.endroweditbykey(this.editKey,true)}else{if(s===13&&this.editSettings.saveOnEnter){if(X.target&&X.target.nodeName.toLowerCase()!="div"&&X.target.nodeName.toLowerCase()!="input"){return true}this.endroweditbykey(this.editKey,false)}else{if(this.editSettings.editSingleCell){if(this.editColumn){var P=this.columns.records.indexOf(this.editColumn);if(s==9&&P0){var M=this.editKey;var E=null;for(var S=P-1;S>=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){E=this.columns.records[S];break}}if(E){this.endroweditbykey(this.editKey,false);this.beginroweditbykey(M,E)}}}if(s==9){var o=this.rowinfo[this.editKey];var C=this.getrowindex(o);var v=this._getuirow(this.editKey);if(!X.shiftKey&&!y){var N=null;for(var S=0;S=0;S--){if(this.columns.records[S].editable&&!this.columns.records[S].hidden){N=this.columns.records[S];break}}if(N){while(v){v=v.prev();if(v){var D=v.attr("data-role");if(!D){var F=v.attr("data-key");break}}}if(F){this.clearSelection(false);this._lastSelectedKey=F;var o=this.rowsByKey[F];var C=this.getrowindex(o);var L=this.getrowdisplayindex(o);this._raiseEvent("rowSelect",{key:F,index:L,boundIndex:C,row:this.rowsByKey[F]});this.endroweditbykey(this.editKey,false);this._doSelection(F,true,true);this.beginroweditbykey(F,N)}}}}return false}}}}}return true}if(X.ctrlKey||X.metaKey){var f=String.fromCharCode(s).toLowerCase();if(f=="c"||f=="x"){var n=this.getSelection();if(n.length>=1){var w="";for(var K=0;K');O.val(w);b("body").append(O);O.select();setTimeout(function(){document.designMode="off";O.select();O.remove()},100)}}}}if(s===32&&this.treeGrid){if(this.treeGrid.checkboxes){var n=this.getSelection();if(n.length>1){for(var S=0;S0){if(this.dataview.filters.length>0){var m=this.rowinfo[t].row.records;for(var S=0;S0){while(this._getuirow(t)==null&&this.dataview.pagenum>0){this.goToPrevPage()}}}else{if(s==39){var v=this._getuirow(t);var U=null;if(v){var D=v.attr("data-role");if(!D){U=v.attr("data-key")}}if(this.pageable&&U==null){this.goToNextPage()}}}}return false}},_selection:function(c){if("selectionStart" in c[0]){var h=c[0];var i=h.selectionEnd-h.selectionStart;return{start:h.selectionStart,end:h.selectionEnd,length:i,text:h.value}}else{var f=document.selection.createRange();if(f==null){return{start:0,end:h.value.length,length:0}}var d=c[0].createTextRange();var g=d.duplicate();d.moveToBookmark(f.getBookmark());g.setEndPoint("EndToStart",d);var i=f.text.length;return{start:g.text.length,end:g.text.length+f.text.length,length:i,text:f.text}}},_doSelection:function(c,e,d){if(c==null){this.clearSelection();return}if(this.selectionMode==="singlerow"){this.clearSelection(false)}var f=this.rowinfo[c];if(f){f.selected=e;this.ensurerowvisiblebykey(c)}else{this.ensurerowvisiblebykey(c);var f=this.rowinfo[c];if(f){f.selected=e}else{this.rowinfo[c]={selected:e}}}if(this.selectionMode!="none"){if(d!==false){this._renderrows()}}},clearSelection:function(e){if(this.rowinfo){var f=this.getRows();for(var h in this.rowinfo){var g=this.rowinfo[h];if(g.selected){g.selected=false;var d=f.indexOf(g.row);var c=this.getrowdisplayindex(g.row);this._raiseEvent("rowUnselect",{key:h,index:c,boundIndex:d,row:g.row})}}}if(e!==false){this._renderrows()}},exportData:function(t){if(!b.jqx.dataAdapter.ArrayExporter){if(!this.treeGrid){throw"jqxDataTable: Missing reference to jqxdata.export.js!"}throw"jqxTreeGrid: Missing reference to jqxdata.export.js!"}var h=this.exportSettings.columnsHeader;if(h==undefined){h=true}var w=this.exportSettings.hiddenColumns;if(w==undefined){w=false}var P=this.exportSettings.serverURL;var I=this.exportSettings.characterSet;var ac=this.exportSettings.collapsedRecords;if(ac==undefined){ac=false}var F=this.exportSettings.fileName;if(F===undefined){F=this.treeGrid?"jqxTreeGrid_Data":"jqxDataTable_Data"}var s=this;var Y=this.getRows();if(this.exportSettings.recordsInView==true){Y=this.getView()}if(this.treeGrid&&this.treeGrid.virtualModeCreateRecords){var Y=this.treeGrid.getRows()}if(this.groups&&this.groups.length>0){var k=this.source.getGroupedRecords(this.groups,"records","label",null,"data",null,"parent",Y);var m=function(o,ad){for(var af=0;af0){var ag=m(j.records,new Array());for(var ae=0;ae0){if(p.length>0){var aa=this._names();for(var X=0;X0&&o){d(ad[ae].records)}}};d(L);if(t!="xml"&&t!="json"){var u=p.length;for(var X=0;X0){o["Level"+o[aa.level]]=ad?"-":"+"}else{o["Level"+o[aa.level]]=""}}else{o["Level"+o[aa.level]]=""}if(o[aa.leaf]){o["Level"+o[aa.level]]=""}for(var af=o[aa.level]+1;af=g){ai=p.length-g-1}else{if(g>0&&af1){var j=b(s._table[0].rows[1].cells[ai]);if(j.length==0){var j=b(s._table[0].rows[1].cells[0])}}if(aj.length==0){var aj=b(s._table[0].rows[0].cells[0])}var ae=this;var ag=function(am){am.removeClass(K.toThemeProperty("jqx-cell"));am.removeClass(K.toThemeProperty("jqx-grid-cell-selected"));am.removeClass(K.toThemeProperty("jqx-fill-state-pressed"));am.removeClass(K.toThemeProperty("jqx-grid-cell-hover"));am.removeClass(K.toThemeProperty("jqx-fill-state-hover"));if(ae.customCellStyles){for(var an in ae.customCellStyles){am.removeClass(ae.customCellStyles[an])}}};ag(aj);if(j){ag(j)}if(this.displayfield==null){return true}if(s.showAggregates){if(s.getcolumnaggregateddata){if(s.treeGrid){var al=function(am,an){for(var ao=0;ao500){Z[this.displayfield].width=500}Z[this.displayfield].formatString=this.cellsFormat;Z[this.displayfield].localization=s.gridlocalization;Z[this.displayfield].type=ah;Z[this.displayfield].cellsAlign=this.cellsalign;Z[this.displayfield].hidden=!h;Z[this.displayfield].index=ai;Z[this.displayfield].maxIndex=p.length}E="cell"+B;var ak=this.element;if(t!="json"&&t!="xml"){J="column"+z;var i=function(o,au,at,am,ar,ao,an,ap,aq){C[o]={index:1+an,maxIndex:p.length};if(ao.rtl){C[o].index=p.length-an}if(t=="html"||t=="xls"||t=="pdf"){if(au){C[o]["font-size"]=au.css("font-size");C[o]["font-weight"]=au.css("font-weight");C[o]["font-style"]=au.css("font-style");C[o]["background-color"]=ao._getexportcolor(au.css("background-color"));C[o]["color"]=ao._getexportcolor(au.css("color"));C[o]["border-color"]=ao._getexportcolor(au.css("border-top-color"))}if(at){C[o]["text-align"]=ar.align}else{C[o]["text-align"]=ar.cellsalign;C[o]["formatString"]=ar.cellsFormat;C[o]["dataType"]=ah}if(t=="html"||t=="pdf"){C[o]["border-top-width"]="0px";if(!ao.rtl){C[o]["border-left-width"]="0px";C[o]["border-right-width"]="1px"}else{C[o]["border-left-width"]="1px";C[o]["border-right-width"]="0px";if(an==p.length-g-1&&at){C[o]["border-right-width"]="1px"}}C[o]["border-bottom-width"]="1px";if(au){C[o]["border-top-style"]=au.css("border-top-style");C[o]["border-left-style"]=au.css("border-left-style");C[o]["border-right-style"]=au.css("border-right-style");C[o]["border-bottom-style"]=au.css("border-bottom-style")}if(at){if(an==0&&!ao.rtl){C[o]["border-left-width"]="1px"}else{if(an==p.length-1&&ao.rtl){C[o]["border-right-width"]="1px"}}if(au){C[o]["border-top-width"]="1px";C[o]["border-bottom-width"]=au.css("border-bottom-width")}}else{if(an==0&&!ao.rtl){C[o]["border-left-width"]="1px"}else{if(an==p.length-1&&ao.rtl){C[o]["border-right-width"]="1px"}}}if(au){C[o]["height"]=au.css("height")}if(ao.treeGrid&&!at){if(C[o].index-10&&this.treeGrid){var ab=g+1;if(this.rtl){ab=p.length-g}if(C["column"+ab]){var e=C["column"+ab];e.merge=g;e["border-left-width"]="1px";var H=C["cell"+ab];for(var X=0;X0){b.each(p,function(j){if(this.aggregates){for(var ad=0;ad0){var c=l;for(var v=0;v0){var c=this.getRows();for(var e=0;e0){var n=this.rowsByKey[H];if(this.treeGrid){var n=this.treeGrid.getRow(H)}if(n.level0){for(var z=0;z";var s=this.getCellTextByKey(H,h.displayfield);d.innerHTML=e;var f=b(d.firstChild);switch(h.columntype){case"textbox":case"default":var k=b("").appendTo(f);if(this.rtl){k.css("direction","rtl")}k.addClass(this.toThemeProperty("jqx-input"));k.addClass(this.toThemeProperty("jqx-widget-content"));k.addClass(this.toThemeProperty("jqx-cell-editor"));k[0].onfocus=function(i){setTimeout(function(){if(i){var I=b(i.target).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}else{var I=b(document.activeElement).parent().parent().index();if(I>=0){p.ensureColumnVisible(p.columns.records[I].datafield)}}if(p.content){p.content[0].scrollTop=0;p.content[0].scrollLeft=0}if(p.gridcontent){p.gridcontent[0].scrollLeft=0;p.gridcontent[0].scrollTop=0}},10)};if(!h.editable){k.attr("disabled",true);k.attr("readOnly",true);k.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{if(!q){q=true;var g=b.jqx.browser.msie&&b.jqx.browser.version>10;if(!g){k.focus()}var c=k;setTimeout(function(){var J=c.val().length;if(!g){c.focus()}try{if("selectionStart" in c[0]){c[0].setSelectionRange(0,J)}else{var i=c[0].createTextRange();i.collapse(true);i.moveEnd("character",J);i.moveStart("character",0);i.select()}}catch(I){var K=I}},10)}}k.width(x);k.height(u);if(b.jqx.browser.msie&&b.jqx.browser.version<9){k.css("line-height",parseInt(u)+"px")}k.css("text-align",h.cellsalign);if(s===null){s=""}if(s==undefined){s=""}k.val(s);if(h.createeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.createeditor(!this.treeGrid?o:H,s,k,C,x,u)}this._editors.push({column:h,editor:k});if(h.cellsFormat!=""){if(h.cellsFormat.indexOf("p")!=-1||h.cellsFormat.indexOf("c")!=-1||h.cellsFormat.indexOf("n")!=-1||h.cellsFormat.indexOf("f")!=-1){k.keydown(function(I){var O=I.charCode?I.charCode:I.keyCode?I.keyCode:0;var L=String.fromCharCode(O);var M=parseInt(L);if(isNaN(M)){return true}if(p._selection(k).length>0){return true}var K="";var J=k.val();if(h.cellsFormat.length>1){var N=parseInt(h.cellsFormat.substring(1));if(isNaN(N)){N=0}}else{var N=0}if(N>0){if(J.indexOf(p.gridlocalization.decimalseparator)!=-1){if(p._selection(k).start>J.indexOf(p.gridlocalization.decimalseparator)){return true}}}for(var P=0;P=11){return false}})}}if(h.initeditor){var C=s;var s=this.getCellValueByKey(H,h.displayfield);h.initeditor(!this.treeGrid?o:H,s,k,C,x,u)}break;case"custom":case"template":if(!this.editorsCache){this.editorsCache=new Array()}var l=b("
    ").appendTo(f);var y=b.trim(h.datafield).split(" ").join("");if(y.indexOf(".")!=-1){y=y.replace(".","")}var A=this.editorsCache["templateeditor_"+y];if(h.columntype=="custom"){var A=this.editorsCache["customeditor_"+y+"_"+H]}var C=s;var s=this.getCellValueByKey(H,h.displayfield);if(!A){var k=b("
    ");k.width(v);k.height(u);A=k;if(s===null){s=""}if(h.columntype!="custom"){this.editorsCache["templateeditor_"+y]=k}else{this.editorsCache["customeditor_"+y+"_"+H]=k}k.appendTo(l);if(h.createeditor){h.createeditor(!this.treeGrid?o:H,s,k,C,v,u)}}else{var k=A;k.width(v);k.height(u);k.appendTo(l)}if(h.initeditor){h.initeditor(!this.treeGrid?o:H,s,k,C,v,u)}this._editors.push({column:h,editor:k});break}}}this.editKey=H;this.beginUpdate();var G=this.getrowdisplayindex(n);this._raiseEvent("rowBeginEdit",{key:H,index:G,boundIndex:o,row:this.rowsByKey[H]});if(F){var n=this.rowsByKey[H];var w=null;var m=null;if(n){w=n[r.datafield];m=n[r.displayfield]}this._raiseEvent("cellBeginEdit",{value:w,displayValue:m,key:H,index:G,dataField:r.datafield,displayField:r.displayfield,boundIndex:o,row:this.rowsByKey[H]})}this.endUpdate(false)},_toNumber:function(f){if(!f.indexOf&&f!=undefined){f=f.toString()}if(f.indexOf(this.gridlocalization.currencysymbol)>-1){f=f.replace(this.gridlocalization.currencysymbol,"")}var c=function(l,j,k){var h=l;if(j==k){return l}var i=h.indexOf(j);while(i!=-1){h=h.replace(j,k);i=h.indexOf(j)}return h};f=c(f,this.gridlocalization.thousandsseparator,"");f=f.replace(this.gridlocalization.decimalseparator,".");if(f.indexOf(this.gridlocalization.percentsymbol)>-1){f=f.replace(this.gridlocalization.percentsymbol,"")}var g="";for(var d=0;d1){if(b.jqx.dataFormat){m=b.jqx.dataFormat.parsedate(e,h.cellsFormat,this.gridlocalization)}if(m=="Invalid Date"||m==null){m=""}}}}if(h.displayfield!=h.datafield){m={label:m,value:m}}break}}if(h.geteditorvalue){var c=this.getCellValueByKey(d,h.displayfield);m=h.geteditorvalue(!this.treeGrid?k:d,c,j)}}return m},_validateEditors:function(c){var k=this;var d=true;var s=k.rowsByKey[c];var l=k.getrowindex(s);var m=k._editors;var c=k.editKey;var p=k._getuirow(c);for(var h=0;h=0||G.indexOf("datetimeinput")>=0||G.indexOf("combobox")>=0||G.indexOf("menu")>=0){if(i.jqxWidget.isOpened){var F=i.jqxWidget.isOpened();if(F){i.jqxWidget.close()}}}}};var z="customeditor_"+v.displayfield+"_"+p;var y="templateeditor_"+v.displayfield;if(k.editorsCache[z]){var w=b(k.editorsCache[z]).data();var A=k.editorsCache[z];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w);k.editorsCache[z].detach()}if(k.editorsCache[y]){k.editorsCache[y].detach();var w=b(k.editorsCache[y]).data();var A=k.editorsCache[y];if(!w.jqxWidget&&b(A).children()[0]&&b(b(A).children()[0]).data().jqxWidget){w=b(b(A).children()[0]).data()}E(w)}}if(C!=u){k.beginUpdate();k._raiseEvent("cellValueChanged",{value:C,oldValue:u,dataField:v.datafield,displayField:v.displayfield,key:p,index:l,row:t});k.endUpdate(false)}}};k.updaterowbykey(k.editKey,h,false,s)}}if(!d){return false}}k._detachEditors(e);return true},_detachEditors:function(l){var g=this;var m=g.rowsByKey[l];var i=g.getrowindex(m);if(g.editorsCache){for(var h in g.editorsCache){var f=b(g.editorsCache[h]).data();if(f&&f.jqxWidget){var c=f.jqxWidget.element.className;if(c.indexOf("dropdownlist")>=0||c.indexOf("datetimeinput")>=0||c.indexOf("combobox")>=0||c.indexOf("menu")>=0){if(f.jqxWidget.isOpened){var e=f.jqxWidget.isOpened();if(e){f.jqxWidget.close()}}}}b(g.editorsCache[h]).detach()}}g.beginUpdate();var d=g.getrowdisplayindex(m);if(g.editSettings.editSingleCell){var m=g.rowsByKey[l];var k=null;var j=null;if(m){k=m[g.editColumn.datafield];j=m[g.editColumn.displayfield]}g._raiseEvent("cellEndEdit",{value:k,displayValue:j,key:l,index:d,dataField:g.editColumn.datafield,displayField:g.editColumn.displayfield,boundIndex:i,row:g.rowsByKey[l]})}g._raiseEvent("rowEndEdit",{key:l,index:d,boundIndex:i,row:g.rowsByKey[l]});g.endUpdate(false);g.editColumn=null;g.editKey=null;g._renderrows();g._renderhorizontalscroll();g.host.focus();setTimeout(function(){g.host.focus()},10)},_showvalidationpopup:function(r,e,s,m){if(s==undefined){var s=this.gridlocalization.validationstring}m.addClass(this.toThemeProperty("jqx-grid-validation-label"));var p=b("
    ");var o=b("
    ");p.html(s);o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));p.addClass(this.toThemeProperty("jqx-grid-validation"));p.addClass(this.toThemeProperty("jqx-rc-all"));p.hide();o.hide();p.prependTo(this.table);o.prependTo(this.table);var h=this.hScrollInstance;var j=h.value;var g=parseInt(j);var l=this.getColumn(e).uielement;if(!r){return}var k=r;p.css("top",parseInt(k.position().top)+30+"px");var c=parseInt(p.css("top"));o.css("top",c-11);o.removeClass();o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));var f=false;if(c>=this._table.height()){o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up"));o.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));c=parseInt(k.position().top)-k.outerHeight()-5;if(c<0){c=0;o.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down"));f=true}p.css("top",c+"px");o.css("top",c+p.outerHeight()-9)}var n=-g+parseInt(b(l).position().left);var q=parseInt(this._table.css("left"));if(isNaN(q)){q=0}if(q!=0){g=0}o.css("left",g+n+30);var d=p.width();if(d+n>this.host.width()-20){var i=d+n-this.host.width()+40;n-=i}if(!f){p.css("left",g+n)}else{p.css("left",g+parseInt(b(l).position().left)-p.outerWidth())}m.mouseenter(function(){if(m.hasClass("jqx-grid-validation-label")){p.show();o.show()}});m.mouseleave(function(){p.hide();o.hide()});if(!this.popups){this.popups=new Array()}this.popups[this.popups.length]={validation:p,validationrow:o}},addRow:function(d,p,j,n){if(p!=undefined){this._datachanged=true;if(j==undefined){j="last"}var o=false;var k=this.that;if(d==null){var f=this.dataview.filters&&this.dataview.filters.length>0;var m=!f?this.dataview.totalrecords:this.source.records.length;if(!this.pageable){if(this.source._source.totalrecords){this.dataview.totalrecords=this.source._source.totalrecords}else{if(this.source._source.totalRecords){this.dataview.totalrecords=this.source._source.totalRecords}else{if(this.source.hierarchy.length!==0){this.dataview.totalrecords=this.source.hierarchy.length}else{this.dataview.totalrecords=this.source.records.length}}}var m=!f?this.dataview.totalrecords:this.source.records.length}if(!b.isArray(p)){d=this.dataview.getid(this.dataview.source.id,p,m);if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{var c=new Array();b.each(p,function(e,q){var r=k.dataview.getid(k.dataview.source.id,p[e],m+e);c.push(r);if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}});d=c}}else{if(!b.isArray(p)){if(this.getColumn(this.dataview.source.id)){p[this.dataview.source.id]=d}}else{b.each(p,function(e,q){var r=d[e];if(k.getColumn(k.dataview.source.id)){p[e][k.dataview.source.id]=r}})}}var i=this.treeGrid?(this.treeGrid.virtualModeCreateRecords?true:false):false;var g=function(v,q,A,t){if(v._loading){throw new Error("jqxDataTable: "+v.loadingErrorMessage);return false}var r=v.vScrollInstance.value;var z=false;if(!b.isArray(A)){A.uid=q;v.rowsByKey[q]=A;if(q==n){n=null}z=v.source.addRecord(A,t,n,i)}else{b.each(A,function(B,C){var D=null;if(q!=null&&q[B]!=null){D=q[B]}this.uid=D;v.rowsByKey[D]=this;if(q==n){n=null}z=v.source.addRecord(this,t,n,i)})}if(v.groups&&v.groups.length>0){var w=Object.prototype.toString;var y=v.groups[0];Object.prototype.toString=(typeof y=="function")?y:function(){return this[y]};if(!v.source.records.sort){var x=new Array();var u=0;var e=0;var s=[];b.each(s,function(){x[e+u++]=this});s=x}v.source.records.sort(function(C,B){if(C===undefined){C=null}if(B===undefined){B=null}if(C===null&&B===null){return 0}if(C===null&&B!==null){return -1}if(C!==null&&B===null){return 1}var F=0;var E=0;if(C&&C.uid){F=C.uid}if(B&&B.uid){E=B.uid}C=C.toString();B=B.toString();if(b.jqx.dataFormat.isNumber(C)&&b.jqx.dataFormat.isNumber(B)){if(CB){return 1}return 0}else{if(b.jqx.dataFormat.isDate(C)&&b.jqx.dataFormat.isDate(B)){if(CB){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(C)&&!b.jqx.dataFormat.isNumber(B)){C=String(C).toLowerCase();B=String(B).toLowerCase()}}}try{if(CB){return 1}}catch(D){var G=D}if(typeof(F)=="number"){if(FE){return 1}}return 0});Object.prototype.toString=w}v.dataview._filteredData=null;v.dataview._sortData=null;v.dataview._sortHierarchyData=null;if(v._updating==undefined||v._updating==false){v.refresh()}if(v.source&&v.source._knockoutdatasource&&!v._updateFromAdapter&&v.autokoupdates){if(v.source._source._localdata){v.source.suspendKO=true;v.source._source._localdata.push(A);v.source.suspendKO=false}}v.vScrollInstance.setPosition(r);return z};if(this.source.addrow){var h=function(e,q){if(e==true||e==undefined){if(q!=undefined){d=q}g(k,d,p,j)}};try{if(!k.treeGrid){o=this.source.addrow(d,p,j,h)}else{o=this.source.addrow(d,p,j,n,h)}if(o==undefined){o=true}}catch(l){o=false}if(o==false){return false}}else{g(this,d,p,j)}return o}return false},deleteRow:function(c){var d=this._getkey(c);this.deleterowbykey(d)},deleterowbykey:function(g){if(g!=undefined){this._datachanged=true;var h=false;var f=this.that;var d=function(m,l){if(m._loading){throw new Error("jqxDataTable: "+m.loadingErrorMessage);return false}m.dataview._filteredData=null;m.dataview._sortData=null;m.dataview._sortHierarchyData=null;var o=false;var p=m.vScrollInstance.value;if(!b.isArray(l)){var o=false;if(m.rowsByKey[l]){o=true;if(m.rowinfo[l]&&m.rowinfo[l].selected){m.unselectrowbykey(l,false)}if(m.treeGrid){var n=m._names();var k=m.rowsByKey[l][n.parent]}delete m.rowsByKey[l];if(m.treeGrid){if(m.rowinfo[l]){var i=m.rowinfo[l].row.records;var j=function(q){for(var r=0;r0&&v.originalRecord){v.originalRecord[o.columns.records[u].datafield]=t[o.columns.records[u].datafield]}}r=true}};s(n);if(o.treeGrid){n=o.treeGrid.getRow(l);s(n)}}else{b.each(l,function(w,x){var v=o.rowsByKey[this];var u=function(z,y){if(!v){r=false}else{v[this]=t[w]}r=true};u(this,v);if(o.treeGrid){v=o.treeGrid.getRow(this);u(this,v)}})}var m=o.vScrollInstance.value;if(g==undefined||g==true){if(o._updating==undefined||o._updating==false){o._renderrows()}}if(o.showAggregates&&o._updatecolumnsaggregates){o._updatecolumnsaggregates()}if(o.source&&o.source._knockoutdatasource&&!o._updateFromAdapter&&o.autokoupdates){if(o.source._source._localdata){var n=o.rowsByKey[l];var p=o.getrowindex(n);var q=o.source._source._localdata()[p];o.source.suspendKO=true;o.source._source._localdata.replace(q,b.extend({},n));o.source.suspendKO=false}}o.vScrollInstance.setPosition(m);return r};if(this.source.updaterow){var e=function(l){if(l==true||l==undefined){d(f,c,k);if(i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}};try{j=this.source.updaterow(c,k,e);if(j==undefined){j=true}}catch(h){j=false}}else{j=d(f,c,k);if(j&&i){i()}f._renderrows(false);if(f.autoRowHeight){f._updateScrollbars();f._arrange()}}return j}return false},lockRow:function(c){var d=this._getkey(c);this.lockrowbykey(d)},unlockRow:function(c){var d=this._getkey(c);this.unlockrowbykey(d)},lockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=true}else{this.rowinfo[c]={locked:true}}this._renderrows()},unlockrowbykey:function(c){if(this.rowinfo[c]){this.rowinfo[c].locked=false}else{this.rowinfo[c]={locked:false}}this._renderrows()},selectRow:function(c){var d=this._getkey(c);this.selectrowbykey(d)},unselectRow:function(c){var d=this._getkey(c);this.unselectrowbykey(d)},selectrowbykey:function(e,h,f){if(h!="keyboard"&&h!="mouse"){this._lastSelectedKey=e}var g=f!==false?true:false;this._doSelection(e,true,g);var i=this.rowsByKey[e];var d=this.getrowindex(i);var c=this.getrowdisplayindex(i);this._raiseEvent("rowSelect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},unselectrowbykey:function(e,f){var g=f!==false?true:false;this._doSelection(e,false,g);var h=this.rowsByKey[e];var d=this.getrowindex(h);var c=this.getrowdisplayindex(h);this._raiseEvent("rowUnselect",{key:e,index:c,boundIndex:d,row:this.rowsByKey[e]})},getSelection:function(){var c=new Array();if(this.rowinfo){for(var e in this.rowinfo){var d=this.rowinfo[e];if(d.selected){c.push(d.row)}}}return c},showdetailsbykey:function(k){if(!this.rowDetails){return}var l=this.rowinfo[k];if(l){l.expanded=true;var f=b(this._table.children()[1]).children(("[data-key="+k+"]"));var i=b(this._pinnedTable.children()[1]).children(("[data-key="+k+"]"));if(f){var c=i.children();var h=b(c[0]);if(this.rtl){var h=b(c[c.length-1])}if(!this.rtl){h.removeClass(this.toThemeProperty("jqx-grid-group-collapse"));h.addClass(this.toThemeProperty("jqx-grid-group-expand"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-right"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{h.removeClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));h.addClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));h.removeClass(this.toThemeProperty("jqx-icon-arrow-left"));h.addClass(this.toThemeProperty("jqx-icon-arrow-down"))}f.next().show();var d=i.next();d.show();if(b.jqx.browser.msie&&b.jqx.browser.version<8){f.next().children().show();i.next().children().show()}if(!l.initialized){var j=l.detailsHeight;var m=this.initRowDetails(k,l.row,b(b(d).children().children().children()[0]),l);l.details=b(d).children().children().children()[0];l.initialized=true;if(m===false||l.detailsHeight!=j){if(m===false){l.expanded=false;l.nodetails=true;d.hide()}this._renderrows()}}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var g=this.getrowindex(l.row);var e=this.getrowdisplayindex(l.row);this._raiseEvent("rowExpand",{row:l.row,index:e,boundIndex:g,rowKey:k})}}},hidedetailsbykey:function(h){if(!this.rowDetails){return}var j=this.rowinfo[h];if(j){j.expanded=false;var d=b(this._table.children()[1]).children(("[data-key="+h+"]"));var e=b(this._pinnedTable.children()[1]).children(("[data-key="+h+"]"));if(d){var g=e.children();var i=b(g[0]);if(this.rtl){var i=b(g[g.length-1])}if(!this.rtl){i.addClass(this.toThemeProperty("jqx-grid-group-collapse"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand"));i.addClass(this.toThemeProperty("jqx-icon-arrow-right"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}else{i.addClass(this.toThemeProperty("jqx-grid-group-collapse-rtl"));i.removeClass(this.toThemeProperty("jqx-grid-group-expand-rtl"));i.addClass(this.toThemeProperty("jqx-icon-arrow-left"));i.removeClass(this.toThemeProperty("jqx-icon-arrow-down"))}d.next().hide();e.next().hide();if(b.jqx.browser.msie&&b.jqx.browser.version<8){d.next().children().hide();e.next().children().hide()}this._updateScrollbars();if(this.height==="auto"||this.height===null||this.autoheight){this._arrange()}var f=this.getrowindex(j.row);var c=this.getrowdisplayindex(j.row);this._raiseEvent("rowCollapse",{row:j.row,index:c,boundIndex:f,rowKey:h})}}},_getvirtualcolumnsindexes:function(d,l,h,k,c){if(this.rowDetails||this.rtl||this.editcell||(this.width&&this.width.toString().indexOf("%")>=0)||this.exporting){return{start:0,end:h+k}}var e=0;var i=-1;var f=h+k;if(this.autorowheight){return{start:0,end:h+k}}if(!c){for(var g=0;g=d&&i==-1){i=g}if(e>l+d){f=g;break}}}f++;if(f>h+k){f=h+k}if(i==-1){i=0}return{start:i,end:f}},_renderhorizontalscroll:function(){var t=this.hScrollInstance;var u=t.value;if(this.hScrollBar.css("visibility")==="hidden"){t.value=0;u=0}var h=parseInt(u);if(this.table==null){return}var q=this.columnsrow;var r=0;var i=this.columns.records.length-r;var e=this.columns.records;var l=this.source.records.length==0;if(this.rtl){if(this.hScrollBar.css("visibility")!="hidden"){h=t.max-h}}if(l&&!this._haspinned){this.table[0].style.left=-h+"px";q[0].style.marginLeft=-h+"px"}else{if(this._haspinned||this._haspinned==undefined){for(var w=0;w0:false;if(this.columns&&this.columns.records){for(var e=0;e0){if(h==="stringfilter"){j.jqxDropDownList({selectedIndex:2})}else{j.jqxDropDownList({selectedIndex:0})}}}}},applyFilters:function(){if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this.serverProcessing){this.dataview.pagenum=0;this.updateBoundData("filter")}else{this.goToPage(0);this.refresh()}if(arguments&&arguments.length>0){if(this._updateSimpleFilter){if(this.filtercolumnsList){var d=this.filtercolumnsList.jqxDropDownList("getSelectedItem").value;this._updateSimpleFilter(d)}}if(this._updateFilterRow){this._updateFilterRow()}}this._raiseEvent("filter",{filters:this.dataview.filters})},sortBy:function(d,g){this.dataview._filteredData=null;this.dataview._sortData=null;this.dataview._sortHierarchyData=null;if(this._loading){throw new Error("jqxDataTable: "+this.loadingErrorMessage);return false}if(this.editable){if(this.editKey!=null){var c=this.endroweditbykey(this.editKey)}}if(d==null){g=null;d=this.sortcolumn}if(d){var f=this;var e;if(g=="a"||g=="asc"||g=="ascending"||g==true){e=true}else{e=false}if(g!=null){f.sortdirection={ascending:e,descending:!e}}else{f.sortdirection={ascending:false,descending:false}}if(g!=null){f.sortcolumn=d}else{f.sortcolumn=null}if(f.source.sort){f.dataview.sortfield=d;if(g==null){f.dataview.sortfielddirection=""}else{f.dataview.sortfielddirection=e?"asc":"desc"}if(f.source.sort&&!this._loading){f.source.sort(d,g)}}f.dataview.sortBy(d,g);f._raiseEvent("sort",{sortcolumn:this.sortcolumn,sortdirection:this.sortdirection})}if(!this.serverProcessing){this.refresh()}else{this.updateBoundData("sort")}},_togglesort:function(d){var f=this;if(this.disabled){return}if(d.sortable&&f.sortable){var c={sortcolumn:this.sortcolumn,sortdirection:this.sortdirection};var e=null;if(c.sortcolumn!=null&&c.sortcolumn==d.displayfield){e=c.sortdirection.ascending;if(e==true){e=false}else{e=null}}else{e=true}f.sortBy(d.displayfield,e)}},_renderfilter:function(){var h=this;var j=b("
    ");j.height(22);var o=j.find("input");var g=j.find("div:first");j.addClass(this.toThemeProperty("jqx-rc-all"));j.addClass(this.toThemeProperty("jqx-widget"));j.addClass(this.toThemeProperty("jqx-input-group"));o.addClass(this.toThemeProperty("jqx-input"));o.addClass(this.toThemeProperty("jqx-rc-l"));o.addClass(this.toThemeProperty("jqx-input-group-addon"));o.addClass(this.toThemeProperty("jqx-widget"));o.addClass(this.toThemeProperty("jqx-widget-content"));g.addClass(this.toThemeProperty("jqx-fill-state-normal"));g.addClass(this.toThemeProperty("jqx-rc-r"));g.addClass(this.toThemeProperty("jqx-input-group-addon"));g.find("div").addClass(this.toThemeProperty("jqx-icon-search"));if(this.rtl){o.addClass(this.toThemeProperty("jqx-rtl"));o.css("direction","rtl")}this.filter.children().remove();this.filterbutton=g;var d=new Array();for(var f=0;f"+this.gridlocalization.filtersearchstring+"");this.filter.append(l);var c=b("
    ");this.filter.append(c);if(c.jqxDropDownList){c.jqxDropDownList({theme:this.theme,enableBrowserBoundsDetection:true,autoDropDownHeight:p,rtl:h.rtl,dropDownWidth:220,selectedIndex:0,width:"auto",height:20,source:d,displayMember:"label",valueMember:"value"})}this.filtercolumnsList=c;var n=function(q){h.filterinput.val("");for(var r=0;r=0){x=x.replace(h.gridlocalization.decimalseparator,".")}}if(x.indexOf(h.gridlocalization.currencysymbol)>=0){x=x.replace(h.gridlocalization.currencysymbol,"")}if(x.indexOf(h.gridlocalization.percentagesymbol)>=0){x=x.replace(h.gridlocalization.percentagesymbol,"")}}var y=A.createfilter(C,x,"EQUAL",null,B.cellsFormat,h.gridlocalization)}else{var y=A.createfilter(C,x,"CONTAINS")}}A.operator=i;A.addfilter(0,y);return A};if(h.filterMode!=="simple"){if(u){var v=u.value;var t=h.getColumn(v);var s=w(t,r,"and");if(r.length>0){h.removeFilter(v);h.addFilter(v,s);h.applyFilters()}else{h.removeFilter(v);h.applyFilters()}if(h.filterMode==="advanced"){if(h._updateFilterRow){h._updateFilterRow(true)}}}}else{h.clearFilters(false,false);if(r.length>0){for(var q=0;q"+this.gridlocalization.filterstring+"");j.append(e);this.addHandler(e,"click",function(q){var i=function(u){if(h.filterrow){for(var x=0;x");k.attr("title",h.gridlocalization.filterclearstring);k.addClass(h.toThemeProperty("jqx-icon-close"));j.append(k);k.hide();h.filtericon=k;k.click(function(){h.clearFilters();h.filtericon.fadeOut(200)});if(h.dataview.filters.length>0){if(h.filterMode!="advanced"){n(h.dataview.filters[0].datafield)}else{if(h._updateFilterRow){h._updateFilterRow()}}}},_renderadvancedfilter:function(){var h=this;var c=function(){h.clearFilters(false,false);var n=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var p=h.filterinput.val();for(var m=0;m0||(w.length==0&&k=="NOT_NULL")||(w.length==0&&k=="NOT_EMPTY")||(w.length==0&&k=="EMPTY")||(w.length==0&&k=="NULL")){var s=l.displayfield;var x=new b.jqx.filter();if(q=="numericfilter"){if(h.gridlocalization.decimalseparator==","){if(w.indexOf(h.gridlocalization.decimalseparator)>=0){w=w.replace(h.gridlocalization.decimalseparator,".")}}if(w.indexOf(h.gridlocalization.currencysymbol)>=0){w=w.replace(h.gridlocalization.currencysymbol,"")}if(w.indexOf(h.gridlocalization.percentagesymbol)>=0){w=w.replace(h.gridlocalization.percentagesymbol,"")}}var j=x.createfilter(q,w,k,null,l.cellsFormat,h.gridlocalization);x.addfilter(0,j);h.addFilter(s,x)}}if(h.dataview.filters.length>0){h.applyFilters()}else{h.clearFilters()}if(h.dataview.filters.length==0){h.filtericon.fadeOut(200)}else{h.filtericon.fadeIn(200)}};var e=function(){var m=b("
    ").appendTo(h.filter);h.filterrow=m;m[0].cells=new Array();m.height(24);m.width(h.table.width());var k=0;var j=h.filtercolumnsList.jqxDropDownList("getSelectedItem").value;var l=h.filterinput.val();b.each(h.columns.records,function(){var p=this;var n=b("
    ").appendTo(m);n.css("position","absolute");n.css("left",k+parseInt(p.uielement[0].style.left));if(p.pinned){n.css("z-index",h.tableZIndex+h.columns.records.length);n.addClass(h.toThemeProperty("jqx-widget-header"))}m[0].cells.push(n[0]);if(!this.filterable){return true}var o=b("").appendTo(n);o.keydown(function(r){if(r.keyCode===13){c()}});if(p.displayfield===j){o.val(l)}o.addClass(h.toThemeProperty("jqx-input"));o.addClass(h.toThemeProperty("jqx-rc-all"));o.addClass(h.toThemeProperty("jqx-widget"));o.addClass(h.toThemeProperty("jqx-widget-content"));var q=b("
    ").appendTo(n);q.append(b("
    "));o.focus(function(){h.ensureColumnVisible(p.displayfield);h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield);setTimeout(function(){h.filter[0].scrollLeft=0;h.ensureColumnVisible(p.displayfield)},10)});q.click(function(){var u=b("
    ");u.insertAfter(q);q.remove();var s=h.getcolumntypebydatafield(p);var t=h._getfiltersbytype(s);var r;if(s==="string"){r=2}else{r=0}u.jqxDropDownList({theme:h.theme,enableBrowserBoundsDetection:true,renderMode:"simple",arrowSize:0,selectedIndex:r,rtl:h.rtl,dropDownWidth:230,dropDownHeight:180,width:20,height:20,source:t,selectionRenderer:function(){return"
    "}});h.addHandler(u,"close",function(v){o.focus();setTimeout(function(){o.focus()},10)});u.removeAttr("tabindex");u.find("div").removeAttr("tabindex");u.jqxDropDownList("open")});o[0].style.width=p.width-6-22+"px"});b("
    ").appendTo(m)};e();var i=b("
    ").appendTo(h.filter);var f=b("").appendTo(i);var g=b("").appendTo(i);var d=0;f.css("left",d);g.css("left",d);f.css("top","4px");g.css("top","4px");f.jqxButton({theme:h.theme});g.jqxButton({theme:h.theme});g.click(function(){h.filtercolumnsList.jqxDropDownList({disabled:false});h.filterinput.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filterinput.attr("disabled",false);h.filterbutton.removeClass(h.toThemeProperty("jqx-fill-state-disabled"));h.filter.find(".filterrow").addClass("filterrow-hidden");h.filter.find(".filterrow").hide();h._arrange()});f.click(function(){c()});h._renderhorizontalscroll()},_getfiltertype:function(c){var d="stringfilter";switch(c){case"number":case"int":case"float":case"decimal":d="numericfilter";break;case"boolean":case"bool":d="booleanfilter";break;case"date":case"time":d="datefilter";break;case"string":d="stringfilter";break}return d},getcolumntypebydatafield:function(e){var f=this;var d="string";var c=f.source.datafields||((f.source._source)?f.source._source.datafields:null);if(c){var g="";b.each(c,function(){if(this.name==e.displayfield){if(this.type){g=this.type}return false}});if(g){return g}}return d},_getfiltersbytype:function(c){var d=this;var e="";switch(c){case"number":case"float":case"int":e=d.gridlocalization.filternumericcomparisonoperators;break;case"date":e=d.gridlocalization.filterdatecomparisonoperators;break;case"boolean":case"bool":e=d.gridlocalization.filterbooleancomparisonoperators;break;case"string":default:e=d.gridlocalization.filterstringcomparisonoperators;break}return e},_getcellvalue:function(c,e){var d=null;d=e[c.datafield];if(c.displayfield!=null){d=e[c.displayfield]}if(d==null){d=""}return d},_renderrows:function(ap){if(this.editable){if(this.editKey!=null){if(ap!==false){var M=this.endroweditbykey(this.editKey)}}}if(this.treeGrid){this.treeGrid._renderrows();return}if(this._loading){return}if(this._updating){return}if(this.rendering){this.rendering()}var ab=this;var T=0;this.table[0].rows=new Array();var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-widget-content");if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var K=this.columns.records.length;var ao=b.jqx.browser.msie&&b.jqx.browser.version<8;if(ao){this.host.attr("hideFocus","true")}var R=ab.groups.length;var ai=new Array();var k=this.source.records;k=this.dataview.evaluate(k);this.dataViewRecords=k;if(this.dataview.pagesize=="all"||!this.pageable||this.serverProcessing){var u=k;if(this.pageable&&this.serverProcessing&&k.length>this.dataview.pagesize){var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}}else{var u=k.slice(this.dataview.pagesize*this.dataview.pagenum,this.dataview.pagesize*this.dataview.pagenum+this.dataview.pagesize)}if(ab.groups&&ab.groups.length>0){var P=this.pageable?this.dataview.pagesize*this.dataview.pagenum:0;var z=function(w){var au=0;var i=new Array();for(var c=0;cab.dataview.pagesize*ab.dataview.pagenum&&au<=ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){i.push(j)}if(au>ab.dataview.pagesize*ab.dataview.pagenum+ab.dataview.pagesize){break}}return i};if(this.pageSizeMode==="root"){var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",k,0);ab.rootRecordsLength=v.length;v=z(v)}else{var v=ab.source.getGroupedRecords(ab.groups,"records","label",null,"data",null,"parent",u,P)}var y=function(j,w){for(var av=0;av0){var aw=y(c.records,new Array());for(var au=0;auZ.maxwidth){e=Z.maxwidth}var l=b('
    ');b(document.body).append(l);var n=l.find("td");aq=1+parseInt(n.css("padding-left"))+parseInt(n.css("padding-right"));l.remove();break}}var ak=this.rtl?" "+this.toTP("jqx-grid-table-rtl"):"";var B="";var ar="
    ";var I=0;var s=K;for(var al=0;alZ.maxwidth){e=Z.maxwidth}e-=aq;if(e<0){e=0}if(ao){var ac=e;if(al==I){ac++}if(Z.rowDetailscolumn){var ac=ac+4;ar+="";B+=""}else{ar+="";B+=""}}else{ar+="";B+=""}aa+=e}B+="";ar+="";this._hiddencolumns=false;var g=false;if(this.rowDetails&&this._pinnedTable){this._pinnedTable.find("[data-role=details]").detach();this._table.find("[data-role=details]").detach()}if(U===0){var o='';var m=this.host.height();if(this.pageable){m-=this.pagerHeight;if(this.pagerPosition==="both"){m-=this.pagerHeight}}m-=this.columnsHeight;if(this.filterable){var ag=this.filter.find(".filterrow");var D=this.filter.find(".filterrow-hidden");var C=1;if(D.length>0){C=0}m-=this.filterHeight+this.filterHeight*ag.length*C}if(this.showstatusbar){m-=this.statusBarHeight}if(this.showAggregates){m-=this.aggregatesHeight}if(m<25){m=25}if(this.hScrollBar[0].style.visibility!="hidden"){m-=this.hScrollBar.outerHeight()}if(this.height==="auto"||this.height===null||this.autoheight){m=300}var l='";o+=l;B+=o;ar+=o;this.table[0].style.width=aa+2+"px";T=aa}var q=this.getRows();var x=new Array();for(var am=0;am';var E='';if(R>0){if(G.level';var E=''}}var p=0;var S=0;for(var al=0;alae.maxwidth){e=ae.maxwidth}e-=aq;if(e<0){e=0}var H=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");if(ae.pinned){H+=" "+this.toTP("jqx-grid-cell-pinned")}if(this.sortcolumn===ae.displayfield){H+=" "+this.toTP("jqx-grid-cell-sort")}if(this.altRows&&am%2!=0){H+=" "+this.toTP("jqx-grid-cell-alt")}if(this.rtl){H+=" "+this.toTP("jqx-cell-rtl")}var O="";if(R>0){if(G.levelat.maxwidth){e=at.maxwidth}A-=aq;if(A<0){A=0}if(!at.hidden){ac+=A}}e=ac}else{H+=" "+this.toTP("jqx-grid-cell-pinned")}}}var l='";af+='" class="'+H+'">';af+=aj;af+="";if(!ae.pinned){o+=l;if(g){E+=af}}else{E+=l;o+=l}if(R>0&&!ao){if(G.level";E+="";B+=o;ar+=E;if(!this.rowinfo[G.uid]){this.rowinfo[G.uid]={group:Y,row:G,details:null,detailsHeight:200,initialized:false,expanded:false}}else{if(!("group" in this.rowinfo[G.uid])){this.rowinfo[G.uid].group=Y}if(!("row" in this.rowinfo[G.uid])){this.rowinfo[G.uid].row=G}if(!("details" in this.rowinfo[G.uid])){this.rowinfo[G.uid].details=null}if(!("detailsHeight" in this.rowinfo[G.uid])){this.rowinfo[G.uid].detailsHeight=200}if(!("initialized" in this.rowinfo[G.uid])){this.rowinfo[G.uid].initialized=false}if(!("expanded" in this.rowinfo[G.uid])){this.rowinfo[G.uid].expanded=false}}if(this.serverProcessing){this.rowinfo[G.uid].row=G}if(this.rowDetails){var F=this.rowinfo[G.uid].detailsHeight;if(this.rowinfo[G.uid]){if(this.rowinfo[G.uid].expanded){var ah='';B+=ah;ar+=ah}}B+="
    ';l+=this.gridlocalization.emptydatastring;l+="
    0){if(G.level0&&ao&&Y&&al>=R){l+="font-size: 1px; border-color: transparent; color: transparent;";af+="font-size: 1px; border-color: transparent; color: transparent;"}if(ae.pinned){l+="pointer-events: auto;";af+="pointer-events: auto;"}if(!Y&&ae.rowDetailscolumn){if(this.rowinfo[G.uid]){if(!this.rowinfo[G.uid].nodetails){if(this.rowinfo[G.uid].expanded){if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-expand")}else{H+=" "+this.toTP("jqx-grid-group-expand-rtl")}H+=" "+this.toTP("jqx-icon-arrow-down")}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}}else{if(!this.rtl){H+=" "+this.toTP("jqx-grid-group-collapse");H+=" "+this.toTP("jqx-icon-arrow-right")}else{H+=" "+this.toTP("jqx-grid-group-collapse-rtl");H+=" "+this.toTP("jqx-icon-arrow-left")}}}if(!this.autoRowHeight||(this.autoRowHeight&&!ae.autoCellHeight)){H+=" "+this.toTP("jqx-grid-cell-nowrap ")}var aj=ab._getcellvalue(ae,G);var f=ae.cellsFormat;if(R>0){if(G.level=0||aj.indexOf(" ng-")>=0)){x.push({rowKey:G.uid,row:d,column:ae.datafield,value:aj,columnIndex:al})}}}else{if(this.groupsRenderer){aj=this.groupsRenderer(aj,G,G.level)}}l+='" class="'+H+'">';l+=aj;l+="
    ";ar+="";if(g){if(ab.WinJS){MSApp.execUnsafeLocalFunction(function(){ab.table.html(ar+B)})}else{ab.table[0].innerHTML=ar+B}var W=this.table.find("#table"+this.element.id);var X=this.table.find("#pinnedtable"+this.element.id);X.css("float","left");X.css("pointer-events","none");W.css("float","left");X[0].style.position="absolute";W[0].style.position="relative";W[0].style.zIndex=V-10;X[0].style.zIndex=V+10;this._table=W;this._table[0].style.left="0px";this._pinnedTable=X;this._pinnedTable[0].style.left="0px";this._pinnedTable[0].style.width=T+"px";this._table[0].style.width=T+"px";if(this.rtl){if(T>parseInt(this.element.style.width)&&this._haspinned){this._pinnedTable[0].style.left=3-T+parseInt(this.element.style.width)+"px"}}if(this.rowDetails){for(var am=0;am0){var an=this._table[0].rows;b.each(x,function(){var w=this.row;var au=this.rowKey;var j=this.column;var i=this.columnIndex;var t=ab._getuirow(au);if(t){var c=t[0].cells[i];if(b.jqx.angularCompile){b.jqx.angularCompile(c,"
    "+c.innerHTML+"
    ")}}})}if(this.rendered){this.rendered()}},getcolumnindex:function(c){var d=this.getColumn(c);var e=this.columns.records.indexOf(d);return e},setcolumnindex:function(e,i,j){var h=this.getColumn(e);if(h.pinned){return}if(h.hidden){return}if(h.checkboxcolumn){return}if(h.grouped){return}var l=this.columns.records.indexOf(h);this.columns.records.splice(l,1);this.columns.records.splice(i,0,h);var f=0;var n=this.headerZIndex;this.columnsrow.children().detach();var k=this.toThemeProperty("jqx-grid-cell");k+=" "+this.toThemeProperty("jqx-grid-cell-pinned");k+=" "+this.toThemeProperty("jqx-item");var m=this;var c=null;if(m.filterrow!=undefined){var c=b(m.filterrow.children()[0])}this.columnsrow[0].cells=[];var g=false;b.each(this.columns.records,function(p,s){var q=this.uielement;m.columnsrow.append(q);if(!m.rtl){q.css("z-index",n--)}else{q.css("z-index",n++)}var o=!m.rtl?250+n-1:250+n+1;if(this.pinned){q.css("z-index",o)}var r=this.width;q.css("left",f);m.columnsrow[0].cells[m.columnsrow[0].cells.length]=q[0];if(this.hidden){g=true}if(!(this.hidden&&this.hideable)){f+=r}});if(this.groupable){var d=this.groups.length;if(d>0){if(l-d>=0){l-=d;i-=d}}}if(this.rowDetails){if(l-1>=0){l--;i--}}if(this.selectionMode=="checkbox"){if(l-1>=0){l--;i--}}var h=this._columns[l];this._columns.splice(l,1);this._columns.splice(i,0,h);this.resize();this._rendercolumnGroups();this._raiseEvent("columnReordered",{dataField:h.datafield,oldIndex:l,newIndex:i})},_pinnedColumnsLength:function(){var c=0;b.each(this.columns.records,function(){if(this.pinned){c++}if(this.grouped){c++}});if(this.rowDetails){c++}if(this.selectionMode=="checkbox"){c++}return c},_handlecolumnsReorder:function(){var g=this;var h=-1;var d=false;if(!g.columnsReorder){return}var f="mousemove.reorder"+this.element.id;var e="mousedown.reorder"+this.element.id;var i="mouseup.reorder"+this.element.id;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true;f=b.jqx.mobile.getTouchEventName("touchmove")+".reorder"+this.element.id;e=b.jqx.mobile.getTouchEventName("touchstart")+".reorder"+this.element.id;i=b.jqx.mobile.getTouchEventName("touchend")+".reorder"+this.element.id}this.removeHandler(b(document),f);this.addHandler(b(document),f,function(x){if(g.resizing){return true}if(g.reordercolumn!=null){var m=parseInt(x.pageX);var u=parseInt(x.pageY);if(c){var t=g.getTouches(x);var p=t[0];if(p!=undefined){m=parseInt(p.pageX);u=parseInt(p.pageY)}}var j=g.host.coord();var w=parseInt(j.left);var k=parseInt(j.top);if(g.dragmousedownoffset==undefined||g.dragmousedownoffset==null){g.dragmousedownoffset={left:0,top:0}}var B=parseInt(m)-parseInt(g.dragmousedownoffset.left);var s=parseInt(u)-parseInt(g.dragmousedownoffset.top);g.reordercolumn.css({left:B+"px",top:s+"px"});d=false;if(m>=w&&m<=w+g.host.width()){if(u>=k&&u<=k+g.host.height()){d=true}}h=-1;if(d){g.reordercolumnicon.removeClass(g.toThemeProperty("jqx-grid-dragcancel-icon"));g.reordercolumnicon.addClass(g.toThemeProperty("jqx-grid-drag-icon"));var n=g.columnsheader.coord();var q=n.top+g.columnsheader.height();if(g.columnsdropline!=null){if(u>=n.top&&u<=q){h=g._handlereordercolumnsdroplines(m);if(g.columnGroups){if(h!=-1){var l=0;l+=g._pinnedColumnsLength();var o=h.index;if(o>=l){var y=g.columns.records[o];if(y!=undefined){var v=g.columns.records.indexOf(g.getColumn(y.datafield));if(y.datafield==null){var v=g.columns.records.indexOf(g.getcolumnbytext(y.text))}var r=b.data(g.reordercolumn[0],"reorderrecord");var A=g.columns.records.indexOf(g.getColumn(r));var z=y;if(A=p){var s=g.columns.records[q];if(s!=undefined){var u=g.columns.records.indexOf(g.getColumn(s.datafield));if(s.datafield==null){var u=g.columns.records.indexOf(g.getcolumnbytext(s.text))}if(g.columnGroups){var r=s;if(xu){g.setcolumnindex(k,u)}}}}}}if(g.columnsdropline!=null){g.columnsdropline.remove();g.columnsdropline=null}}}})},getcolumnbytext:function(d){var c=null;if(this.columns.records){b.each(this.columns.records,function(){if(this.text==d){c=this;return false}})}return c},_handlereordercolumnsdroplines:function(i){var c=this;var h=-1;var e=c._pinnedColumnsLength();var g=parseInt(c.host.coord().left);var d=g+c.host.width();var f=c.vScrollBar.css("visibility")!="hidden"?19:0;if(!c.rtl){f=0}b.each(c.columnsbounds,function(j){if(j>=e){if(this.width==0){return true}if(i<=this.left+this.width/2){if(i>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+parseInt(this.left)+"px");c.columnsdropline.css("top",parseInt(this.top)+"px");c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"before"};return false}else{if(i>=this.left+this.width/2){if(this.left+this.width>d){c.columnsdropline.fadeOut();return false}c.columnsdropline.css("left",f+1+this.left+this.width);c.columnsdropline.css("top",this.top);c.columnsdropline.height(this.height);c.columnsdropline.fadeIn("slow");h={index:j,position:"after"}}}}});return h},_createreordercolumn:function(d,f,i){var h=this;var g=f;if(h.reordercolumn){h.reordercolumn.remove()}if(h.columnsdropline){h.columnsdropline.remove()}h.reordercolumn=b("
    ");var k=d.clone();h.reordercolumn.css("z-index",999999);k.css("border-width","1px");k.css("opacity","0.4");var j=b(k.find("."+h.toThemeProperty("jqx-grid-column-menubutton")));if(j.length>0){j.css("display","none")}var c=b(k.find(".jqx-icon-close"));if(c.length>0){c.css("display","none")}h.reordercolumnicon=b('
    ');h.reordercolumnicon.addClass(h.toThemeProperty("jqx-grid-drag-icon"));h.reordercolumn.css("float","left");h.reordercolumn.css("position","absolute");var e=h.host.coord();k.width(d.width()+16);h.reordercolumn.append(k);h.reordercolumn.height(d.height());h.reordercolumn.width(k.width());h.reordercolumn.append(h.reordercolumnicon);b(document.body).append(h.reordercolumn);k.css("margin-left",0);k.css("left",0);k.css("top",0);h.reordercolumn.css("left",g.left+h.dragmousedown.left);h.reordercolumn.css("top",g.top+h.dragmousedown.top);if(i!=undefined&&i){h.columnsdropline=b('
    ');h.columnsdropline.width(2);h.columnsdropline.addClass(h.toThemeProperty("jqx-grid-group-drag-line"));b(document.body).append(h.columnsdropline)}},_handlecolumnsdragreorder:function(d,g){if(this.reordercolumn){this.reordercolumn.remove()}if(this.columnsdropline){this.columnsdropline.remove()}this.dragmousedown=null;this.dragmousedownoffset=null;this.columndragstarted=false;this.reordercolumn=null;var h=this;var f;var c=false;if(this.isTouchDevice()&&this.touchmode!==true){c=true}var e="mousedown.drag";var f="mousemove.drag";if(c){e=b.jqx.mobile.getTouchEventName("touchstart")+".drag";f=b.jqx.mobile.getTouchEventName("touchmove")+".drag"}else{this.addHandler(g,"dragstart",function(i){return false})}this.addHandler(g,e,function(k){if(false==d.draggable){return true}if(h.resizing){return true}h.__drag=true;var j=k.pageX;var i=k.pageY;if(c){var l=h.getTouches(k);var n=l[0];j=n.pageX;i=n.pageY}h.dragmousedown={left:j,top:i};var m=b(k.target).coord();h.dragmousedownoffset={left:parseInt(j)-parseInt(m.left),top:parseInt(i-m.top)};if(k.preventDefault){k.preventDefault()}return true});this.addHandler(g,f,function(k){if(!d.draggable){return true}if(undefined==d.datafield){return true}if(d.pinned){return true}if(h.resizing){return true}if(h.dragmousedown){var j=k.pageX;var i=k.pageY;if(c){var m=h.getTouches(k);var o=m[0];if(o!=undefined){j=o.pageX;i=o.pageY}}f={left:j,top:i};if(!h.columndragstarted&&h.reordercolumn==null){var l=Math.abs(f.left-h.dragmousedown.left);var n=Math.abs(f.top-h.dragmousedown.top);if(l>3||n>3){h._createreordercolumn(g,f,true);b(document.body).addClass("jqx-disableselect");b.data(h.reordercolumn[0],"reorderrecord",d.datafield)}}}})},getTouches:function(c){return b.jqx.mobile.getTouches(c)},_handlecolumnsResize:function(){var i=this;if(this.columnsResize){var k=false;if(i.isTouchDevice()){k=true}var g="mousemove.resize"+this.element.id;var d="mousedown.resize"+this.element.id;var e="mouseup.resize"+this.element.id;if(k){var g=b.jqx.mobile.getTouchEventName("touchmove")+".resize"+this.element.id;var d=b.jqx.mobile.getTouchEventName("touchstart")+".resize"+this.element.id;var e=b.jqx.mobile.getTouchEventName("touchend")+".resize"+this.element.id}this.removeHandler(b(document),g);this.addHandler(b(document),g,function(n){if(i.resizablecolumn!=null&&!i.disabled&&i.resizing){if(i.resizeline!=null){var s=i.resizablecolumn.columnelement;var p=i.host.coord();var v=parseInt(i.resizestartline.coord().left);var l=v-i._startcolumnwidth;var w=i.resizablecolumn.column.minwidth;if(w=="auto"){w=0}else{w=parseInt(w)}var m=i.resizablecolumn.column.maxwidth;if(m=="auto"){m=0}else{m=parseInt(m)}var q=n.pageX;if(k){var t=b.jqx.mobile.getTouches(n);var r=t[0];q=r.pageX}l+=w;var u=m>0?v+m:0;var o=m==0?true:i._startcolumnwidth+q-v=p.left&&q>=l){if(u!=0&&n.pageX=p.left&&q<=p.left+i.host.width()){i.resizeline.css("left",q);if(k){return false}}}}}}if(!k&&i.resizablecolumn!=null){return false}});this.removeHandler(b(document),d);this.addHandler(b(document),d,function(m){if(i.resizablecolumn!=null&&!i.disabled){var l=i.resizablecolumn.columnelement;if(l.coord().top+l.height()+5m.pageY){i.resizablecolumn=null;return}i._startcolumnwidth=i.resizablecolumn.column.width;i.resizablecolumn.column._width=null;b(document.body).addClass("jqx-disableselect");b(document.body).addClass("jqx-position-reset");i._mouseDownResize=new Date();i.resizing=true;i._resizecolumn=i.resizablecolumn.column;i.resizeline=i.resizeline||b('
    ');i.resizestartline=i.resizestartline||b('
    ');i.resizebackground=i.resizebackground||b('
    ');i.resizebackground.css("opacity",0.01);i.resizebackground.css("cursor","col-resize");i.resizeline.css("cursor","col-resize");i.resizestartline.css("cursor","col-resize");i.resizeline.addClass(i.toThemeProperty("jqx-grid-column-resizeline"));i.resizestartline.addClass(i.toThemeProperty("jqx-grid-column-resizestartline"));b(document.body).append(i.resizeline);b(document.body).append(i.resizestartline);b(document.body).append(i.resizebackground);var n=i.resizablecolumn.columnelement.coord();i.resizebackground.css("left",i.host.coord().left);i.resizebackground.css("top",i.host.coord().top);i.resizebackground.width(i.host.width());i.resizebackground.height(i.host.height());i.resizebackground.css("z-index",999999999);var o=function(q){if(!i.rtl){q.css("left",parseInt(n.left)+i._startcolumnwidth)}else{q.css("left",parseInt(n.left))}var s=0;var t=i.showtoolbar?i.toolbarHeight:0;s+=t;var v=i.showstatusbar?i.statusBarHeight:0;s+=v;var r=i.showAggregates?i.aggregatesHeight:0;s+=r;if(i.pageable&&i.pagerPosition!="bottom"){s+=i.pagerHeight}if(i.filterable){s+=i.filter.height()}var p=0;if(i.pageable&&i.pagerPosition!="top"){p=i.pagerHeight}var u=i.hScrollBar.css("visibility")!="hidden"?i.scrollBarSize:0;q.css("top",parseInt(n.top));q.css("z-index",9999999999);if(i.columnGroups){q.height(i.host.height()+i.resizablecolumn.columnelement.height()-p-s-u-i.columnGroupslevel*i.columnsHeight)}else{q.height(i.host.height()-p-s-u)}q.show("fast")};o(i.resizeline);o(i.resizestartline);i.dragmousedown=null}});var f=function(){b(document.body).removeClass("jqx-disableselect");b(document.body).removeClass("jqx-position-reset");if(!i.resizing){return}i._mouseUpResize=new Date();var t=i._mouseUpResize-i._mouseDownResize;if(t<200){i.resizing=false;if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){i._resizecolumn=null;i.resizeline.hide();i.resizestartline.hide();i.resizebackground.remove()}return}i.resizing=false;if(i.disabled){return}var n=i.host.width();if(i.vScrollBar[0].style.visibility!="hidden"){n-=20}if(n<0){n=0}if(i._resizecolumn!=null&&i.resizeline!=null&&i.resizeline.css("display")=="block"){var u=parseInt(i.resizeline.css("left"));var o=parseInt(i.resizestartline.css("left"));var s=i._startcolumnwidth+u-o;if(i.rtl){var s=i._startcolumnwidth-u+o}var r=i._resizecolumn.width;i._resizecolumn.width=s;if(i._resizecolumn._percentagewidth!=undefined){i._resizecolumn._percentagewidth=(s/n)*100}for(var q=0;q0){k-=parseInt(this.scrollBarSize)+6;c=k}var j="";if(this.columns==undefined||this.columns.records==undefined){return}var i=this;var h=false;b.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=i.vScrollBar[0].style.visibility=="hidden"?0:i.scrollBarSize+5;if(i.scrollBarSize==0){n=0}m=parseFloat(this.width)*c/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(c)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}k-=Math.round(m)}else{if(this.width!="auto"&&!this._width){k-=this.width}else{j+=this.text}}}});var f=this.columnsheader.find("#columntable"+this.element.id);if(f.length==0){return}var d=0;var g=f.find(".jqx-grid-column-header");var e=0;b.each(this.columns.records,function(n,q){var m=b(g[n]);var t=false;var s=this.width;var o=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){s=parseFloat(this._percentagewidth)*c/100}else{s=parseFloat(this.width)*c/100}s=Math.round(s);t=true}if(this.width!="auto"&&!this._width&&!t){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(t){if(sthis.maxwidth&&this.maxwidth!="auto"){s=this.maxwidth;this.width=s}if(parseInt(m[0].style.width)!=s){m.width(s);this.width=s}}else{var l=Math.floor(k*(this.text.length/j.length));if(isNaN(l)){l=this.minwidth}var p=(k*(this.text.length/j.length))-l;d+=p;if(d>=1){d-=1;l++}if(d>=0.5&&n==i.columns.records.length-1){l++}if(l<0){var r=b(""+this.text+"");b(document.body).append(r);l=10+r.width();r.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=l;m.width(this.width)}}if(parseInt(m[0].style.left)!=e){m.css("left",e)}if(!(this.hidden)){e+=this.width}this._requirewidthupdate=true;if(o!==this.width){h=true}});this.columnsheader.width(2+e);f.width(this.columnsheader.width());this._resizecolumnGroups();if(h){this._renderrows()}if(this.showAggregates){this._refreshcolumnsaggregates()}},_rendercolumnheaders:function(){var r=this;if(this._updating){return}if(r.columns.records.length>r.headerZIndex){r.headerZIndex=r.columns.records.length+10}this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var g=b('
    ');g[0].cells=new Array();var l=0;var h=0;var s="";var u=this.host.width();var f=u;var w=new Array();var t=new Array();b.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){u-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*f/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}u-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}u-=this.width}}}}else{s+=this.text}}if(this.pinned||this.grouped||this.checkboxcolumn){if(r._haspinned){this.pinned=true}w[w.length]=this}else{t[t.length]=this}});if(!this.rtl){for(var o=0;o=this.columns.records.length-w.length;o--){this.columns.replace(o,w[e++])}for(var m=0;m
    ');if(r.rtl&&K===0){x[0].style.borderLeftColor="transparent"}if(r.columnGroups){x[0].style.height=n+"px";x[0].style.bottom="0px";if(this.pinned){x[0].style.zIndex=L}}this.uielement=x;this.element=x;if(this.classname!=""&&this.classname){x.addClass(this.classname)}var C=this.width;var D=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){C=parseFloat(this._percentagewidth)*f/100}else{C=parseFloat(this.width)*f/100}C=Math.round(C);D=true}if(this.width!="auto"&&!this._width&&!D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}x[0].style.width=parseInt(C)+"px"}else{if(D){if(Cthis.maxwidth&&this.maxwidth!="auto"){C=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}x.width(C);this.width=C}else{var H=Math.floor(u*(this.text.length/s.length));var E=(u*(this.text.length/s.length))-H;c+=E;if(c>=1){c-=1;H++}if(c>=0.5&&K==r.columns.records.length-1){H++}if(isNaN(H)){H=this.minwidth}if(H<0){var F=b(""+this.text+"");b(document.body).append(F);H=10+F.width();F.remove()}if(Hthis.maxwidth){H=this.maxwidth}this._width="auto";this.width=parseInt(H);C=this.width;x.width(this.width)}}if(this.hidden){x.css("display","none")}var k=b(x.children()[0]);g[0].cells[K]=x[0];var p=false;var J=false;var z=this.renderer!=null?this.renderer(this.text,this.align,n):r._rendercolumnheader(this.text,this.align,n,r);if(z==null){z=r._rendercolumnheader(this.text,this.align,n,r)}if(this.renderer!=null){z=b(z)}p=true;if(r.WinJS){MSApp.execUnsafeLocalFunction(function(){k.append(b(z))})}else{if(this.renderer){k.append(b(z))}else{if(z){k[0].innerHTML=z}}}if(z!=null){var B=b('
    ');k.append(B);var O=B.children();this.sortasc=O[1];this.sortdesc=O[2];this.filtericon=O[0];this.iconscontainer=B;if(r.rtl){B.css("margin-left","0px");B.css("left","0px");b(this.sortasc).css("float","left");b(this.filtericon).css("float","left");b(this.sortdesc).css("float","left")}}g.append(x);if(r.columnsReorder&&this.draggable&&r._handlecolumnsdragreorder){r._handlecolumnsdragreorder(this,x)}var M=this;r.addHandler(x,"click",function(i){if(M.checkboxcolumn){return true}if(r._togglesort){if(!r._loading){r._togglesort(M)}}i.preventDefault()});if(r.columnsResize&&!J){var y=false;var j="mousemove";if(r.isTouchDevice()){y=true;j=b.jqx.mobile.getTouchEventName("touchstart")}r.addHandler(x,j,function(P){if(!M.resizable){r.resizablecolumn=null;return true}var i=parseInt(P.pageX);var R=5;var U=parseInt(x.coord().left);if(r.hasTransform){U=b.jqx.utilities.getOffset(x).left}if(r._handlecolumnsResize){if(y){var Q=b.jqx.mobile.getTouches(P);var T=Q[0];i=T.pageX;R=40;if(i>=U+M.width-R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize")}else{x.css("cursor","");r.resizablecolumn=null}return true}var S=M.width;if(r.rtl){S=0}if(i>=U+S-R){if(i<=U+S+R){r.resizablecolumn={columnelement:x,column:M};x.css("cursor","col-resize");return false}else{x.css("cursor","");r.resizablecolumn=null}}else{x.css("cursor","");if(i0){this.columnsheader.width(2+h)}else{this.columnsheader.width(h)}this.columnsrow=g;r.columnsheader.append(g);g.width(h);if(this._handlecolumnsdragdrop){this._handlecolumnsdragdrop()}if(this._handlecolumnsReorder){this._handlecolumnsReorder()}if(this._handlecolumnsResize){this._handlecolumnsResize()}if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var o=0;for(var l=0;l');var k=b(this._rendercolumnheader(q.text,q.align,this.columnsHeight,this));f.append(k);f[0].style.left=d+"px";if(d===0){f[0].style.borderLeftColor="transparent"}f[0].style.top=p+"px";f[0].style.height=r+"px";f[0].style.width=-1+q.width+"px";e.append(f);q.element=f}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var d=0;d0){d.removeHandler(c,"mouseenter");d.removeHandler(c,"mouseleave");var e=b(f.filtericon);d.removeHandler(e,"mousedown");d.removeHandler(e,"click");d.removeHandler(c,"click")}},_calculateaggregate:function(k,o,d,h){if(!k.datafield){return null}var e=k.aggregates;if(!e){e=o}if(e){var f=new Array();for(var n=0;n0){r(u[t].records)}}};r(h);h=q}if(this.treeGrid&&this.filterable&&this.dataview.filters.length>0){var p=new Array();for(var n=0;n=g){if(m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e,formatStrings:f}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}}return m}else{var m=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,h,c);if(this.treeGrid&&m){if(m[k.datafield].sum!=undefined||m[k.datafield].avg!=undefined){var g=this.source._source.hierarchy&&this.source._source.hierarchy.groupingDataFields?this.source._source.hierarchy.groupingDataFields.length:0;if(g==0||c>=g){var j=this.source.getAggregatedData([{name:k.datafield,aggregates:e}],this.gridlocalization,s,c);if(m[k.datafield].sum!=undefined){m[k.datafield].sum=j[k.datafield].sum}if(m[k.datafield].avg!=undefined){m[k.datafield].avg=j[k.datafield].avg}}}}return m}}}return null},getcolumnaggregateddata:function(d,h,i,e){var f=this.getColumn(d);if(!f){return""}var k=(i==undefined||i==false)?false:i;if(h==null){return""}var c=f.aggregates;f.aggregates=null;var j=this._calculateaggregate(f,h,k,e);var g={};if(j){g=j[d];f.aggregates=c}return g},_updatecolumnaggregates:function(e,h,c){var f=this;if(!h){c.children().remove();c.html("");if(e.aggregatesRenderer){var g={};if(e.aggregates){g=this.getcolumnaggregateddata(e.datafield,e.aggregates)}var d=e.aggregatesRenderer({},e,c,null);c.html(d)}return}c.children().remove();c.html("");if(e.aggregatesRenderer){if(h){var d=e.aggregatesRenderer(h[e.datafield],e,c,this.getcolumnaggregateddata(e.datafield,e.aggregates),"aggregates");c.html(d)}}else{b.each(h,function(){var j=this;for(g in j){var k=b('
    ');var i=g;i=f._getaggregatename(i);k.html(i+":"+j[g]);if(f.rtl){k.addClass(f.toThemeProperty("jqx-rtl"))}c.append(k)}})}},_getaggregatetype:function(d){switch(d){case"min":case"max":case"count":case"avg":case"product":case"var":case"varp":case"stdev":case"stdevp":case"sum":return d}var c=d;for(var e in d){c=e;break}return c},_getaggregatename:function(d){var c=d;switch(d){case"min":c="Min";break;case"max":c="Max";break;case"count":c="Count";break;case"avg":c="Avg";break;case"product":c="Product";break;case"var":c="Var";break;case"stdevp":c="StDevP";break;case"stdev":c="StDev";break;case"varp":c="VarP";case"sum":c="Sum";break}if(d===c&&typeof(c)!="string"){for(var e in d){c=e;break}}return c},_updatecolumnsaggregates:function(){var g=this.getRows();if(this.dataViewRecords){g=this.dataViewRecords}var c=this.columns.records.length;if(undefined!=this.aggregates[0].cells){for(var f=0;f');var f=0;var m=this.columns.records.length;var l=this.toThemeProperty("jqx-grid-cell");if(this.rtl){l+=" "+this.toThemeProperty("jqx-grid-cell-rtl");f=0;c.css("border-left-width","0px");this.aggregates.css("border-left-color","transparent")}l+=" "+this.toThemeProperty("jqx-grid-cell-pinned");var n=m+10;var o=new Array();this.aggregates[0].cells=o;for(var h=0;hg.maxwidth){d=g.maxwidth}var e=l;if(g.cellsalign){e+=" "+this.toThemeProperty("jqx-"+g.cellsalign+"-align")}var k=b('
    ');c.append(k);k.css("left",f);if(!this.rtl){k.css("z-index",n--)}else{k.css("z-index",n++);if(h==0){k.css("border-left-width","0px")}}k.width(d);k[0].style.left=f+"px";if(!(g.hidden&&g.hideable)){f+=d}else{k.css("display","none")}o[o.length]=k[0];this._updatecolumnaggregates(g,i,k)}if(b.jqx.browser.msie&&b.jqx.browser.version<8){c.css("z-index",n--)}c.width(parseInt(f)+2);c.height(this.aggregatesHeight);this.aggregates.children().remove();this.aggregates.append(c);this.aggregates.removeClass(this.toThemeProperty("jqx-widget-header"));this.aggregates.addClass(l);this.aggregates.css("border-bottom-color","transparent");this.aggregates.css("border-top-width","1px");if(this.rtl&&this.hScrollBar.css("visibility")!="hidden"){this._renderhorizontalscroll()}},destroy:function(){var h=this;if(h.columns&&h.columns.records){for(var f=0;f0){j.jqxDropDownList("destroy")}}}if(h.filtercolumnsList){h.filtercolumnsList.jqxDropDownList("destroy")}}if(h.pageable){if(h.pagershowrowscombotop&&h.pagershowrowscombotop.jqxDropDownList){h.pagershowrowscombotop.jqxDropDownList("destroy")}if(h.pagershowrowscombobottom&&h.pagershowrowscombobottom.jqxDropDownList){h.pagershowrowscombobottom.jqxDropDownList("destroy")}var l=h.pagerbuttonsbottom.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();var l=h.pagerbuttonstop.find("a");h.removeHandler(l,"click");h.removeHandler(l,"mouseenter");h.removeHandler(l,"mouseleave");l.remove();if(h.pagernexttop){h.pagernexttop.jqxButton("destroy");h.pagerprevioustop.jqxButton("destroy");h.pagernextbottom.jqxButton("destroy");h.pagerpreviousbottom.jqxButton("destroy");h.pagerfirsttop.jqxButton("destroy");h.pagerfirstbottom.jqxButton("destroy");h.pagerlasttop.jqxButton("destroy");h.pagerlastbottom.jqxButton("destroy")}}h._removeHandlers();h.vScrollBar.jqxScrollBar("destroy");h.hScrollBar.jqxScrollBar("destroy");delete h.vScrollBar;delete h.hScrollBar;delete h._mousewheelfunc;b.jqx.utilities.resize(h.host,null,true);h.host.remove()},propertiesChangedHandler:function(c,d,e){if(e.width&&e.height&&Object.keys(e).length==2){c.refresh()}},propertyChangedHandler:function(e,l,d,k){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(k!==d){if(l=="filterable"){e._render()}else{if(l==="height"){e.host.height(e.height);e.host.width(e.width);e._updatesize(false,true)}else{if(l==="width"){e.host.height(e.height);e.host.width(e.width);e._updatesize(true,false)}else{if(l==="source"){e.updateBoundData()}else{if(l==="columnGroups"){e._render()}else{if(l==="columns"){e._columns=null;e._render()}else{if(l==="rtl"){e.content.css("left","");e.columns=e._columns;e.vScrollBar.jqxScrollBar({rtl:k});e.hScrollBar.jqxScrollBar({rtl:k});e._render()}else{if(l==="pagerMode"){e.pagerMode=k;e._initpager()}else{if(l=="pageSizeOptions"){e._initpager();var j=false;for(var f=0;f0){c.jqxDropDownList({theme:e.theme})}if(e.filtercolumnsList){e.filtercolumnsList.jqxDropDownList({theme:e.theme})}}e.refresh()}else{e.refresh()}}}}}}}}}}}}}}}}}}},_rendercolumnheader:function(f,g,c,d){var e="4px";if(d.columnGroups){e=(c/2-this._columnheight/2);if(e<0){e=4}e+="px"}else{if(this.columnsHeight!=25){e=(this.columnsHeight/2-this._columnheight/2);if(e<0){e=4}e+="px"}}return'
    '+f+"
    "}});function a(c,d){this.owner=c;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="left";this.cellsalign="left";this.width="auto";this.minwidth=25;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.aggregates=null;this.aggregatesRenderer=null;this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(e,f){if(this[e]){var g=this[e];this[e]=f;this.owner._columnPropertyChanged(this,e,f,g)}else{if(this[e.toLowerCase()]){var g=this[e.toLowerCase()];this[e.toLowerCase()]=f;this.owner._columnPropertyChanged(this,e.toLowerCase(),f,g)}}};this._initfields=function(f){if(f!=null){var e=this;if(b.jqx.hasProperty(f,"dataField")){this.datafield=b.jqx.get(f,"dataField")}if(b.jqx.hasProperty(f,"displayField")){this.displayfield=b.jqx.get(f,"displayField")}else{this.displayfield=this.datafield}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"validation")){this.validation=b.jqx.get(f,"validation")}if(b.jqx.hasProperty(f,"autoCellHeight")){this.autoCellHeight=b.jqx.get(f,"autoCellHeight")}if(b.jqx.hasProperty(f,"text")){this.text=b.jqx.get(f,"text")}else{this.text=this.displayfield}if(b.jqx.hasProperty(f,"sortable")){this.sortable=b.jqx.get(f,"sortable")}if(b.jqx.hasProperty(f,"hidden")){this.hidden=b.jqx.get(f,"hidden")}if(b.jqx.hasProperty(f,"groupable")){this.groupable=b.jqx.get(f,"groupable")}if(b.jqx.hasProperty(f,"renderer")){this.renderer=b.jqx.get(f,"renderer")}if(b.jqx.hasProperty(f,"align")){this.align=b.jqx.get(f,"align")}if(b.jqx.hasProperty(f,"cellsAlign")){this.cellsalign=b.jqx.get(f,"cellsAlign")}if(b.jqx.hasProperty(f,"cellsFormat")){this.cellsFormat=b.jqx.get(f,"cellsFormat")}if(b.jqx.hasProperty(f,"width")){this.width=b.jqx.get(f,"width")}if(b.jqx.hasProperty(f,"minWidth")){this.minwidth=b.jqx.get(f,"minWidth")}if(b.jqx.hasProperty(f,"maxWidth")){this.maxwidth=b.jqx.get(f,"maxWidth")}if(b.jqx.hasProperty(f,"cellsRenderer")){this.cellsRenderer=b.jqx.get(f,"cellsRenderer")}if(b.jqx.hasProperty(f,"columnType")){this.columntype=b.jqx.get(f,"columnType")}if(b.jqx.hasProperty(f,"pinned")){this.pinned=b.jqx.get(f,"pinned")}if(b.jqx.hasProperty(f,"filterable")){this.filterable=b.jqx.get(f,"filterable")}if(b.jqx.hasProperty(f,"filter")){this.filter=b.jqx.get(f,"filter")}if(b.jqx.hasProperty(f,"resizable")){this.resizable=b.jqx.get(f,"resizable")}if(b.jqx.hasProperty(f,"draggable")){this.draggable=b.jqx.get(f,"draggable")}if(b.jqx.hasProperty(f,"editable")){this.editable=b.jqx.get(f,"editable")}if(b.jqx.hasProperty(f,"initEditor")){this.initeditor=b.jqx.get(f,"initEditor")}if(b.jqx.hasProperty(f,"createEditor")){this.createeditor=b.jqx.get(f,"createEditor")}if(b.jqx.hasProperty(f,"destroyEditor")){this.destroyeditor=b.jqx.get(f,"destroyEditor")}if(b.jqx.hasProperty(f,"getEditorValue")){this.geteditorvalue=b.jqx.get(f,"getEditorValue")}if(b.jqx.hasProperty(f,"className")){this.classname=b.jqx.get(f,"className")}if(b.jqx.hasProperty(f,"cellClassName")){this.cellclassname=b.jqx.get(f,"cellClassName")}if(b.jqx.hasProperty(f,"aggregates")){this.aggregates=b.jqx.get(f,"aggregates")}if(b.jqx.hasProperty(f,"aggregatesRenderer")){this.aggregatesRenderer=b.jqx.get(f,"aggregatesRenderer")}if(b.jqx.hasProperty(f,"rendered")){this.rendered=b.jqx.get(f,"rendered")}if(b.jqx.hasProperty(f,"exportable")){this.exportable=b.jqx.get(f,"exportable")}if(b.jqx.hasProperty(f,"nullable")){this.nullable=b.jqx.get(f,"nullable")}if(b.jqx.hasProperty(f,"columnGroup")){this.columngroup=b.jqx.get(f,"columnGroup")}if(!f instanceof String&&!(typeof f=="string")){for(var g in f){if(!e.hasOwnProperty(g)){if(!e.hasOwnProperty(g.toLowerCase())){c.host.remove();throw new Error("jqxDataTable: Invalid property name - "+g+".")}}}}}};this._initfields(d);return this}b.jqx.dataCollection=function(c){this.records=new Array();this.owner=c;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(e,d){this.records[e]=d};this.isempty=function(d){if(this.records[d]==undefined){return true}return false};this.initialize=function(d){if(d<1){d=1}this.records[d-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(d){return this.records.indexOf(d)};this.add=function(d){if(d==null){return false}this.records[this.records.length]=d;return true};this.insertAt=function(e,d){if(e==null||e==undefined){return false}if(d==null){return false}if(e>=0){if(e0){for(var s=0;sc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(b.jqx.dataFormat.isNumber(d)&&b.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(b.jqx.dataFormat.isDate(d)&&b.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!b.jqx.dataFormat.isNumber(d)&&!b.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(p){if(this.grid.serverProcessing){if(p){if(this.grid.source._source.id==""||this.grid.source._source.id==null){if(this.grid.pageable){var c=this.grid.pageSize*this.pagenum;this.grid.rowsByKey=new Array();var h=this;b.each(p,function(i){this.uid=c;h.grid.rowsByKey[this.uid]=this;c++})}}}return p}var d=new Array();if(this.filters.length){var j=new Array();var o=function(s,w){for(var u=0;u0)){var n=new Array();var k=function(r,s){for(var q=0;q0){k(t,t.records)}}};k(null,p);o.call(this,n,d);for(var e=0;e0)){var h=this;var l=new Array();this._sortData=null;var f=function(t,q){h._sortData=null;var r=null;if(h.source.hierarchy.groupingDataFields){if(q&&q.length>0&&q[0].level0){return b(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=b(d).attr(j);if(c!=null&&c.toString().length>0){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.grid.rowsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.grid.rowsByKey[f+h];if(!g){if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.grid&&this.grid.treeGrid&&this.grid.treeGrid.virtualModeCreateRecords){var g=this.grid.rowsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.grid.rowsByKey["jqx"+f];if(!g){var g=this.grid.rowsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxdate.js --- a/www/jqwidgets/jqxdate.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxdate.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxdatetimeinput.js --- a/www/jqwidgets/jqxdatetimeinput.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxdatetimeinput.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(a){a.jqx.jqxWidget("jqxDateTimeInput","",{});a.extend(a.jqx._jqxDateTimeInput.prototype,{defineInstance:function(){var b={value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),rowHeaderWidth:25,enableViews:true,views:["month","year","decade"],selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],change:null,changing:null,titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],template:"default",columnHeaderHeight:20,titleHeight:30,firstDayOfWeek:0,showWeekNumbers:false,showTimeButton:false,cookies:false,cookieoptions:null,showFooter:false,formatString:"dd/MM/yyyy",width:200,height:25,dayNameFormat:"firstTwoLetters",textAlign:"left",readonly:false,culture:"default",activeEditor:null,showCalendarButton:true,openDelay:250,closeDelay:300,closeCalendarAfterSelection:true,isEditing:false,enableBrowserBoundsDetection:false,dropDownHorizontalAlignment:"left",dropDownVerticalAlignment:"bottom",enableAbsoluteSelection:false,disabled:false,buttonSize:21,animationType:"slide",dropDownWidth:"200px",restrictedDates:new Array(),dropDownHeight:"205px",dropDownContainer:"default",selectionMode:"default",renderMode:"full",rtl:false,timeRange:null,_editor:false,todayString:"Today",clearString:"Clear",popupZIndex:2000,allowNullDate:true,changeType:null,placeHolder:"",enableHover:true,hint:true,allowKeyboardDelete:true,localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","open","close","change"],aria:{"aria-valuenow":{name:"getDate",type:"date"},"aria-valuetext":{name:"getText",type:"string"},"aria-valuemin":{name:"min",type:"date"},"aria-valuemax":{name:"max",type:"date"},"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxDateTimeInput.prototype){return b}a.extend(true,this,b);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(1);this.minDate._setMinutes(1);this.minDate._setSeconds(1);this.minDate._setMilliseconds(1);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(1);this.maxDate._setMinutes(1);this.maxDate._setSeconds(1);this.maxDate._setMilliseconds(1);this.defaultMinDate=this.minDate;this.defaultMaxDate=this.maxDate;return b},createInstance:function(d){var l="";var k=this;if(!k.host.jqxCalendar){throw new Error("jqxDateTimeInput: Missing reference to jqxcalendar.js.")}if(k.formatString!="dd/MM/yyyy"){var g=k.formatString.split(" ");if(g&&g.length>1){var c="";for(var q=0;q",j);f[0].style.cssText=k.field.style.cssText;if(!k.width){k.width=a(k.field).width()}if(!k.height){k.height=a(k.field).outerHeight()}a(k.field).hide().after(f);var u=k.host.data();k.host=f;k.host.data(u);k.element=f[0];k.element.id=k.field.id;k.field.id=j.id;if(k._className){k.host.addClass(k._className);a(k.field).removeClass(k._className)}if(k.field.tabIndex){var e=k.field.tabIndex;k.field.tabIndex=-1;k.element.tabIndex=e}}if(k.host.attr("value")){l=true;var v=k.host.attr("value");if(k.selectionMode!="range"){var r=new Date(v);if(r!=undefined&&!isNaN(r)){k.value=a.jqx._jqxDateTimeInput.getDateTime(r)}}}if(k.value!=null&&k.value instanceof Date){k.value=a.jqx._jqxDateTimeInput.getDateTime(k.value)}else{if(k.value!=null&&typeof(k.value)=="string"){var r=new Date(k.value);if(r!=undefined&&!isNaN(r)){k.value=a.jqx._jqxDateTimeInput.getDateTime(r)}else{if(k.value.indexOf(",")>=0){k.value=k.value.replace(/\,/g,"/");var r=new Date(k.value);if(r!=undefined&&!isNaN(r)){k.value=a.jqx._jqxDateTimeInput.getDateTime(r)}}}}}this._initTimeRange();this._validateTimeRange();k.host.attr("data-role","input");k.render();a.jqx.aria(this);if(k.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+k.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}if(k.minDate!==k.defaultMinDate){k.min=k.minDate}if(k.maxDate!==k.defaultMaxDate){k.max=k.maxDate}k.setMaxDate(k.max,false);k.setMinDate(k.min,false);if(k.selectionMode!=="range"&&k.value&&k.value.dateTime&&k.min&&k.max&&(k.value.dateTimek.max)){if(k.value.dateTimek.max){k.value.dateTime=k.max}k._updateText()}if(k.selectionMode=="range"){if(l){var v=k.host.attr("value");var t=v.substring(0,v.indexOf("-"));var s=v.substring(v.indexOf("-")+1);var o=new Date(t);var b=new Date(s);if(o!=undefined&&!isNaN(o)){if(b!=undefined&&!isNaN(b)){k.setRange(o,b)}}}else{if(k.getDate()!=null){k.setRange(k.getDate(),k.getDate())}}}},_validateTimeRange:function(){if(this.timeRange){var b=this.value.dateTime.getHours();var c=this.value.dateTime.getMinutes();if(b<=this.timeRange.minHour){this.value._setHours(this.timeRange.minHour);if(c=this.timeRange.maxHour){this.value._setHours(this.timeRange.maxHour);if(c>this.timeRange.maxMinute){this.value._setMinutes(this.timeRange.maxMinute);this._updateEditorsValue()}else{this._updateEditorsValue()}}}},_initTimeRange:function(){if(this.timeRange){if(this.timeRange.min){var c=null;if(this.timeRange.min.indexOf("AM")>=0||this.timeRange.min.indexOf("PM")>=0){c=this.timeRange.min.indexOf("AM")>=0?"AM":"PM"}var d=this.timeRange.min.split(":");var b=parseInt(d[0]);var f=parseInt(d[1]);if(c){this.timeRange.minDefaultHour=b;this.timeRange.minMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.minHour=b;this.timeRange.minMinute=f}if(this.timeRange.max){var c=null;if(this.timeRange.max.indexOf("AM")>=0||this.timeRange.max.indexOf("PM")>=0){c=this.timeRange.max.indexOf("AM")>=0?"AM":"PM"}var e=this.timeRange.max.split(":");var b=parseInt(e[0]);var f=parseInt(e[1]);if(c){this.timeRange.maxDefaultHour=b;this.timeRange.maxMeridian=c}if(c&&c=="PM"){b+=12}this.timeRange.maxHour=b;this.timeRange.maxMinute=f}}},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}if(document.Globalize){window.Globalize=document.Globalize;f=true}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){return a.global.format(d,e,this.culture)}else{if(f){try{var e=window.Globalize.format(d,e,this.culture);return e}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){if(d instanceof Date){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}else{if(typeof d==="number"){return a.jqx.dataFormat.formatnumber(d,e,this.localization.calendar)}else{return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}else{throw new Error("jqxDateTimeInput: Missing reference to globalize.js.")}}}},render:function(){var k=this;k._removeHandlers();k.element.innerHTML="";k.host.attr({role:"textbox"});k.id=a.jqx.utilities.createId();var f=a.jqx.utilities.createId();var j=a.jqx.utilities.createId();k._setSize();if(k.width==null){k.width=k.host.width();k.host.width(k.width)}k.touch=a.jqx.mobile.isTouchDevice();var c=a("
    ").appendTo(k.host);k.dateTimeInput=a("").appendTo(c);k.dateTimeInput.addClass(k.toThemeProperty("jqx-reset"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-clear"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-widget-content"));k.dateTimeInput.addClass(k.toThemeProperty("jqx-rc-all"));if(!k.isMaterialized()){k.dateTimeInput.attr("placeHolder",k.placeHolder)}if(k.renderMode!="full"){k.dateTimeInput.remove()}var d=k.host.attr("name");if(d){k.dateTimeInput.attr("name",d)}if(k.host.attr("tabindex")){k.dateTimeInput.attr("tabindex",k.host.attr("tabindex"));k.host.removeAttr("tabindex")}if(k.rtl){k.dateTimeInput.css("direction","rtl");k.dateTimeInput.addClass("jqx-rtl")}k.calendarButton=a("
    ").appendTo(c);if(!k.rtl){k.calendarButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.calendarButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.calendarButtonIcon=a(k.calendarButton.children()[0]);k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.calendarButtonIcon.addClass(k.toThemeProperty("jqx-icon-calendar"));k.calendarButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){if(!k.showTimeButton){k.calendarButton.addClass(k.toThemeProperty("jqx-rc-r"))}}else{k.calendarButton.addClass(k.toThemeProperty("jqx-rc-l"))}k.timeButton=a("
    ").appendTo(c);if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-action-button"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-action-button-rtl"))}k.timeButtonIcon=a(k.timeButton.children()[0]);k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon"));k.timeButtonIcon.addClass(k.toThemeProperty("jqx-icon-time"));k.timeButton.addClass(k.toThemeProperty("jqx-fill-state-normal"));if(!k.rtl){k.timeButton.addClass(k.toThemeProperty("jqx-rc-r"))}else{k.timeButton.addClass(k.toThemeProperty("jqx-rc-l"))}var m=this;k._arrange();if(a.jqx._jqxCalendar!=null&&a.jqx._jqxCalendar!=undefined){try{var i="calendar"+k.id;var h=a(a.find("#"+i));if(h.length>0){h.remove()}a.jqx.aria(this,"aria-owns",i);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-readonly",k.selectionMode=="range"?true:false);var b=a("
    ");if(a.jqx.utilities.getBrowser().browser=="opera"){b.hide()}if(k.dropDownContainer=="element"){b.appendTo(k.host)}else{b.appendTo(document.body)}k.container=b;k.calendarContainer=a(a.find("#innerCalendar"+k.id)).jqxCalendar({titleFormat:this.titleFormat,restrictedDates:this.restrictedDates,changing:k.changing,change:k.change,enableViews:k.enableViews,selectableDays:k.selectableDays,views:k.views,rowHeaderWidth:k.rowHeaderWidth,titleHeight:k.titleHeight,columnHeaderHeight:k.columnHeaderHeight,_checkForHiddenParent:false,enableAutoNavigation:false,canRender:false,localization:k.localization,todayString:k.todayString,clearString:k.clearString,dayNameFormat:k.dayNameFormat,rtl:k.rtl,culture:k.culture,showFooter:k.showFooter,selectionMode:k.selectionMode,firstDayOfWeek:k.firstDayOfWeek,showWeekNumbers:k.showWeekNumbers,width:k.dropDownWidth,height:k.dropDownHeight,theme:k.theme});if(k.dropDownContainer=="element"){k.calendarContainer.css({position:"absolute",top:0,left:0})}else{k.calendarContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0})}k.calendarContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.calendarContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k.timeContainer=a(a.find("#innerTime"+k.id));k.timeContainer.css({position:"absolute",zIndex:k.popupZIndex,top:0,left:0});k.timeContainer.addClass(k.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){k.timeContainer.addClass(k.toThemeProperty("jqx-noshadow"))}k._calendar=a.data(k.calendarContainer[0],"jqxCalendar").instance;var m=this;k._calendar.today=function(){m.today()};k._calendar.clear=function(){m.clear()};if(a.jqx.utilities.getBrowser().browser=="opera"){b.show()}b.height(parseInt(k.calendarContainer.height())+25);b.width(parseInt(k.calendarContainer.width())+25);if(k.selectionMode=="range"){k.readonly=true}if(k.animationType=="none"){k.container.css("display","none")}else{k.container.hide()}}catch(l){}}if(a.global){a.global.preferCulture(k.culture)}k.selectedText="";k._addHandlers();k.self=this;k.oldValue=k.getDate();k.items=new Array();k.editors=new Array();k._loadItems();k.editorText="";if(k.readonly==true){k.dateTimeInput.css("readonly",k.readonly)}k.dateTimeInput.css("text-align",k.textAlign);k.host.addClass(k.toThemeProperty("jqx-widget"));k.host.addClass(k.toThemeProperty("jqx-datetimeinput"));k.host.addClass(k.toThemeProperty("jqx-input"));k.host.addClass(k.toThemeProperty("jqx-overflow-hidden"));k.host.addClass(k.toThemeProperty("jqx-rc-all"));k.host.addClass(k.toThemeProperty("jqx-reset"));k.host.addClass(k.toThemeProperty("jqx-clear"));k.host.addClass(k.toThemeProperty("jqx-widget-content"));k.propertyChangeMap.disabled=function(e,p,o,q){if(q){e.host.addClass(m.toThemeProperty("jqx-input-disabled"));e.host.addClass(m.toThemeProperty("jqx-fill-state-disabled"))}else{e.host.removeClass(m.toThemeProperty("jqx-fill-state-disabled"));e.host.removeClass(m.toThemeProperty("jqx-input-disabled"))}a.jqx.aria(e,"aria-disabled",q)};if(k.disabled){k.host.addClass(k.toThemeProperty("jqx-input-disabled"));k.host.addClass(k.toThemeProperty("jqx-fill-state-disabled"));k.dateTimeInput.attr("disabled",true)}if(k.host.parents("form").length>0){k.addHandler(k.host.parents("form"),"reset",function(){setTimeout(function(){m.setDate(new Date())},10)})}if(k.cookies){var g=a.jqx.cookie.cookie("jqxDateTimeInput"+k.element.id);if(g!=null){k.setDate(new Date(g))}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(k.host.parents(".jqx-window").length>0){var n=k.host.parents(".jqx-window").css("z-index");k.container.css("z-index",n+10);k.calendarContainer.css("z-index",n+10)}}if(k.culture!="default"){k._applyCulture()}if(k.value){if(k.calendarContainer.jqxCalendar("_isDisabled",k.value.dateTime)){k.dateTimeInput.addClass(k.toThemeProperty("jqx-input-invalid"))}else{k.dateTimeInput.removeClass(k.toThemeProperty("jqx-input-invalid"))}}this._addBarAndLabel(this.dateTimeInput);this._updateHint(true);if(k.template){k.bar.addClass(k.toThemeProperty("jqx-"+k.template));k.label.addClass(k.toThemeProperty("jqx-"+k.template));k.timeButton.addClass(k.toThemeProperty("jqx-"+k.template));k.calendarButton.addClass(k.toThemeProperty("jqx-"+k.template))}this._setSize();this._arrange()},val:function(c){var b=this;if(arguments.length!=0){if(c==null){b.setDate(null)}if(b.selectionMode=="range"){b.setRange(arguments[0],arguments[1]);return b.getText()}if(c instanceof Date){b.setDate(c)}if(typeof(c)=="string"){if(c=="date"){return b.getDate()}b.setDate(c)}if(b._calendar.getDate()!=b.getDate()){b._calendar.setDate(b.getDate())}}return b.getText()},_setSize:function(){var b=window.getComputedStyle(this.element);var c=parseInt(b.borderLeftWidth)*2;var h=b.boxSizing;if(this.element.offsetWidth===0){c=2}if(h==="border-box"||isNaN(c)){c=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=parseInt(this.width)-c+"px"}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=parseInt(this.width)-c+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=parseInt(this.height)-c+"px"}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=parseInt(this.height)-c+"px"}}var g=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){g=true;this.host.width(this.width);if(c>0){this.host.css("box-sizing","border-box")}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){g=true;this.host.height(this.height)}var e=this;var f=function(){if(e.calendarContainer){e._arrange()}};if(g){if(this.calendarContainer){this._arrange();var d=this.host.width();if(this.dropDownWidth!="auto"){d=this.dropDownWidth}this.calendarContainer.jqxCalendar({width:d});this.container.width(parseInt(d)+25)}}a.jqx.utilities.resize(this.host,function(){f()})},_arrange:function(){if(this.height==null){this.height=27;this.host.height(27)}var e=parseInt(this.host.width());var m=parseInt(this.host.height());var i=window.getComputedStyle(this.element);var g=parseInt(i.borderLeftWidth)*2;var f=i.boxSizing;if(f==="border-box"||isNaN(g)){g=0}var k=this.buttonSize;var h=2;if(!this.showCalendarButton&&!this.showTimeButton){k=0;var l=0;this.calendarButton.hide();h=0}if(!this.showCalendarButton){this.calendarButton.hide()}else{this.calendarButton.show()}if(!this.showTimeButton){this.timeButton.hide()}else{this.timeButton.show()}var b=e-k-1*h;if(this.showTimeButton&&this.showCalendarButton){var b=e-2*k-1*h}else{if(this.showTimeButton||this.showCalendarButton){var b=e-k-1*h}}if(b>0){this.dateTimeInput[0].style.width=b+"px"}if(this.rtl){this.dateTimeInput[0].style.width=(-1+b+"px")}this.dateTimeInput[0].style.left="0px";this.dateTimeInput[0].style.top="0px";this.calendarButton[0].style.width=k+1+"px";this.calendarButton[0].style.left=1+b+"px";this.timeButton[0].style.width=k+1+"px";if(this.showCalendarButton){this.timeButton[0].style.left=1+this.calendarButton.width()+b+"px"}else{this.timeButton[0].style.left=1+b+"px"}if(this.renderMode!="full"){this.calendarButton[0].style.width="100%";this.calendarButton[0].style.left="0px";this.calendarButton.css("border","none");this.timeButton[0].style.width="100%";this.timeButton[0].style.left="0px";this.timeButton.css("border","none")}var d=this.dateTimeInput.height();if(d==0&&this.renderMode!="full"){d=parseInt(this.dateTimeInput.css("font-size"))+3;this.calendarButton.addClass(this.toThemeProperty("jqx-rc-all"));this.timeButton.addClass(this.toThemeProperty("jqx-rc-all"))}else{d=17}if(this.dateTimeInput[0].className.indexOf("jqx-rc-all")==-1){this.dateTimeInput.addClass(this.toThemeProperty("jqx-rc-all"))}var j=parseInt(m)/2-parseInt(d)/2;if(j>0){var n=this.dateTimeInput.css("font-size");if(""==n){n=13}var j=m-2-parseInt(n)-2;if(isNaN(j)){j=0}if(j<0){j=0}var c=j/2;if(a.jqx.browser.msie&&a.jqx.browser.version<8){c=j/4}this.dateTimeInput[0].style.paddingTop=Math.round(c)+"px";this.dateTimeInput[0].style.paddingBottom=Math.round(c)+"px"}if(this.rtl){this.calendarButton[0].style.width=k+"px";this.timeButton[0].style.width=k+"px";this.calendarButton.css("left","0px");if(this.showCalendarButton){this.timeButton.css("left",k+"px")}else{this.timeButton.css("left","0px")}this.dateTimeInput.css("left",this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",this.timeButton.width()+this.calendarButton.width())}if(a.jqx.browser.msie&&a.jqx.browser.version<=8){this.dateTimeInput.css("left",1+this.calendarButton.width());if(this.showTimeButton&&this.showCalendarButton){this.dateTimeInput.css("left",1+this.timeButton.width()+this.calendarButton.width())}}}},_removeHandlers:function(){var b=this;this.removeHandler(a(document),"mousedown."+this.id);if(this.dateTimeInput){this.removeHandler(this.dateTimeInput,"keydown."+this.id);this.removeHandler(this.dateTimeInput,"blur");this.removeHandler(this.dateTimeInput,"focus");this.removeHandler(this.host,"focus");this.removeHandler(this.dateTimeInput,"mousedown");this.removeHandler(this.dateTimeInput,"mouseup");this.removeHandler(this.dateTimeInput,"keydown");this.removeHandler(this.dateTimeInput,"keyup");this.removeHandler(this.dateTimeInput,"keypress")}if(this.calendarButton!=null){this.removeHandler(this.calendarButton,"mousedown")}if(this.timeButton!=null){this.removeHandler(this.timeButton,"mousedown")}if(this.calendarContainer!=null){this.removeHandler(this.calendarContainer,"cellSelected");this.removeHandler(this.calendarContainer,"cellMouseDown")}this.removeHandler(a(window),"resize."+this.id)},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXCalendar"+this.id);if(b!=null&&b==c.calendarContainer){return true}return false},wheel:function(d,c){if(!c.isEditing){return}c.changeType="mouse";var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(!b){if(d.preventDefault){d.preventDefault()}d.returnValue=false;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(b){if(b<0){this.spinDown()}else{this.spinUp()}return false},focus:function(){try{var c=this;c._firstFocusDate=c.getDate();this._setSelectionStart(0);this._selectGroup(-1);this.dateTimeInput.focus();setTimeout(function(){c._setSelectionStart(0);c._selectGroup(-1);c.dateTimeInput.focus()},25)}catch(b){}},_addHandlers:function(){var e=this.element.id;var c=this.element;var d=this;if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.datetimeinput"+this.element.id,function(f){var g=d.isOpened();if(g){d.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!d.disabled&&d.enableHover){var f=true;d.calendarButtonIcon.addClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.addClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.addClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mouseleave",function(){if(!d.disabled&&d.enableHover){d.calendarButtonIcon.removeClass(d.toThemeProperty("jqx-icon-calendar-hover"));d.calendarButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(d.showTimeButton){d.timeButtonIcon.removeClass(d.toThemeProperty("jqx-icon-time-hover"));d.timeButton.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(this.host,"mousewheel",function(f){d.wheel(f,d)});this.addHandler(a(document),"mousedown."+this.id,this._closeOpenedCalendar,{me:this});if(a.jqx.mobile.isTouchDevice()){this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id,this._closeOpenedCalendar,{me:this})}this.addHandler(this.dateTimeInput,"keydown."+this.id,function(h){var g=a.data(document.body,"openedJQXCalendar"+d.id);if(g!=null&&g==d.calendarContainer){var f=d.handleCalendarKey(h,d);return f}});if(this.calendarContainer!=null){this.addHandler(this.calendarContainer,"keydown",function(f){if(f.keyCode==13){if(d.isOpened()){if(!d._calendar._viewAnimating&&d._calendar.view=="month"){d.hideCalendar("selected","keyboard");d.dateTimeInput.focus();return false}}return true}else{if(f.keyCode==9){if(d.isOpened()){d.hideCalendar("selected","keyboard");return true}}else{if(f.keyCode==27){if(d.isOpened()){d.hideCalendar(null,"keyboard");d.dateTimeInput.focus();return false}return true}}}d.timePopup=false;if(f.keyCode==84){d.timePopup=true}if(f.keyCode==115){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}else{if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}if(f.altKey){if(f.keyCode==38){if(d.isOpened()){d.hideCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}else{if(f.keyCode==40){if(!d.isOpened()){d.showCalendar("keyboard","keyboard");d.dateTimeInput.focus();return false}}}}});this.addHandler(this.calendarContainer,"cellSelected",function(g){if(d.closeCalendarAfterSelection){var f=a.data(document.body,"openedJQXCalendarValue");if(g.args.selectionType=="mouse"){if(d.selectionMode!="range"){d.hideCalendar("selected","mouse")}else{if(d._calendar._clicks==0){d.hideCalendar("selected","mouse")}}}}});this.addHandler(this.calendarContainer,"cellMouseDown",function(f){if(d.closeCalendarAfterSelection){if(d._calendar.value){a.data(document.body,"openedJQXCalendarValue",new a.jqx._jqxDateTimeInput.getDateTime(d._calendar.value.dateTime))}}})}this.addHandler(this.dateTimeInput,"blur",function(h){d.bar.removeClass("focused");d.label.removeClass("focused");if(d.value!=null){d.isEditing=false;var g=d.value.dateTime.getDay();var f=d._oldDT;d._validateValue(true);if(h.stopPropagation){h.stopPropagation()}d._updateText();d._raiseEvent(9,h)}if(!d.isOpened()){d.host.removeClass(d.toThemeProperty("jqx-fill-state-focus"))}});this.addHandler(this.host,"focus",function(f){d.focus()});this.addHandler(this.dateTimeInput,"focus",function(f){d._firstFocusDate=d.getDate();if(d.value!=null){if(d.selectionMode!="range"){d._oldDT=new Date(d.value.dateTime)}else{d._oldDT=d.getRange()}setTimeout(function(){var g=d._selection();d.isEditing=true;d._validateValue();d._updateText();d._setSelectionStart(0);d._selectGroup(-1,g);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))})}else{d._setSelectionStart(0);d._selectGroup(-1);d.host.addClass(d.toThemeProperty("jqx-fill-state-focus"))}if(f.stopPropagation){f.stopPropagation()}d.bar.addClass("focused");d.label.addClass("focused");if(f.preventDefault){f.preventDefault();return false}});var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(this.calendarButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=false;d.calendarPopup=true;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar();return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.timeButton,b,function(g){var h=d.container;var f=h.css("display")=="block";d.timePopup=true;d.calendarPopup=false;if(!d.disabled){if(!d.isanimating){if(f){d.hideCalendar("mouse","mouse");return false}else{d.showCalendar("mouse");g.preventDefault()}}}});this.addHandler(this.dateTimeInput,"mousedown",function(f){return d._raiseEvent(2,f)});this.addHandler(this.dateTimeInput,"mouseup",function(f){return d._raiseEvent(3,f)});this.addHandler(this.dateTimeInput,"keydown",function(f){return d._raiseEvent(4,f)});this.addHandler(this.dateTimeInput,"keyup",function(f){return d._raiseEvent(5,f)});this.addHandler(this.dateTimeInput,"keypress",function(f){return d._raiseEvent(6,f)})},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;return"dateTimeInput"+b},setMaxDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMaxDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()>b){this.setDate(b)}a.jqx.aria(this,"aria-valuemax",b);this._refreshValue();this._updateText()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b==null){return}if(b!=null&&typeof(b)=="string"){b=new Date(b);if(!this._isValidDate(b)){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(this._calendar!=null){this._calendar.setMinDate(b)}if(c!=false){if(this.getDate()!=null&&this.getDate()=0){d=d.replace(/\,/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}}if(d.toString().indexOf("-")>=0){d=d.replace(/\-/g,"/");d=new Date(d);if(!this._isValidDate(d)){d=f}}if(d!=""){var c=d;if(window.Globalize!=undefined){d=window.Globalize.parseDate(c,this.formatString,this.culture)}else{if(a.jqx.dataFormat){d=a.jqx.dataFormat.parsedate(c,this.formatString,this.localization.calendar)}else{d=new Date(d)}}if(d===null&&c!==null){if(this._isValidDate(c)){d=c}}if(!this._isValidDate(d)){return}}}if(d==null||d=="null"||d=="undefined"){if(!this.allowNullDate){d=this.min}}if(!this._isValidDate(d)){d=null}if(d==null||d=="null"||d=="undefined"||d===""){if(this.value!=null){this.value=null;this._calendar.setDate(null);this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}this._setSelectionStart(0);this._selectGroup(-1);this._raiseEvent("0",d,e);this._raiseEvent("9",d,e)}return}if(dthis.getMaxDate()){return}if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}if(d.getFullYear){this.value._setYear(d.getFullYear());this.value._setDay(1);this.value._setMonth(d.getMonth()+1);this.value._setHours(d.getHours());this.value._setMinutes(d.getMinutes());this.value._setSeconds(d.getSeconds());this.value._setMilliseconds(d.getMilliseconds());this.value._setDay(d.getDate())}this._validateTimeRange();this._refreshValue();if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}var b=this.getDate();var g=(b-e);if(g!=0){this._raiseEvent("0",d,e);this._raiseEvent("9",d,e);return true}},getDate:function(){if(this.value==undefined){return null}return new Date(this.value.dateTime)},getText:function(){return this.dateTimeInput.val()},setRange:function(d,c){if(typeof(d)=="object"&&!this._isValidDate(d)){d=null}if(typeof(c)=="object"&&!this._isValidDate(c)){c=null}if(d!=null&&typeof(d)=="string"){d=new Date(d);if(!this._isValidDate(d)){return}}if(c!=null&&typeof(c)=="string"){c=new Date(c);if(!this._isValidDate(c)){return}}if(d&&isNaN(d)&&d.toString()=="NaN"&&typeof(d)!="string"){return}if(c&&isNaN(c)&&c.toString()=="NaN"&&typeof(c)!="string"){return}this._calendar.setRange(d,c);if(c&&d&&(c.valueOf()!=d.valueOf())){this._range={from:d,to:c}}else{this._range=this._calendar.getRange()}var b=d;if(b!=null&&b.getFullYear){if(this.value==null){this.value=new a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}this.value._setYear(b.getFullYear());this.value._setMonth(b.getMonth()+1);this.value._setHours(b.getHours());this.value._setMinutes(b.getMinutes());this.value._setSeconds(b.getSeconds());this.value._setMilliseconds(b.getMilliseconds());this.value._setDay(b.getDate())}this._refreshValue();if(this.value){this._raiseEvent("0",this.value.dateTime)}else{this._raiseEvent("0",null)}},getRange:function(){var b=this._calendar.getRange();if(this._range){var d=this._range.from;var c=this._range.to;if(c&&d&&(c.valueOf()!=d.valueOf())){if(b.from){b.from.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds())}if(b.to){b.to.setHours(c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())}}}return b},_validateValue:function(e){var b=false;for(var d=0;d1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>999){c=999}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(this.editors[d].value!=c){this.editors[d].value=c;b=true}}this.updateValue(e);if(this.value!=null&&e===true){if(this.value.dateTime>this.maxDate.dateTime){this._internalSetValue(this.maxDate);this._updateEditorsValue()}else{if(this.value.dateTime=0){this._selectGroup(e)}},spinDown:function(){var d=this.value;if(d==null){return}if(this.activeEditor!=null){var b=this.editors.indexOf(this.activeEditor);if(b==-1){return}if(this.items[b].type=="Day"){if(this.value!=null){this.activeEditor.maxValue=this.value._daysInMonth(this.value.year,this.value.month)}}var c=this.activeEditor.positions;this.activeEditor.decreaseValue(this.enableAbsoluteSelection);this.activeEditor.positions=c}if(this.isEditing){this.isEditing=false}this.updateValue();this.isEditing=true;this._updateText();var e=this.editors.indexOf(this.activeEditor);if(e>=0){this._selectGroup(e)}},_passKeyToCalendar:function(c){if(c.keyCode==13||c.keyCode==9){this.hideCalendar("selected","keyboard");return true}else{if(c.keyCode==27){var e=this.calendarContainer;var d=this._calendar;var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;d.setDate(this.value.dateTime);this.closeCalendarAfterSelection=f;this.hideCalendar()}}var f=this.closeCalendarAfterSelection;this.closeCalendarAfterSelection=false;var b=this._calendar._handleKey(c);this.closeCalendarAfterSelection=f;return b},handleCalendarKey:function(f,e){var c=a(f.target);var d=a.data(document.body,"openedJQXCalendar"+this.id);if(d!=null){if(d.length>0){var b=e._passKeyToCalendar(f);return b}}return true},_findPos:function(c){if(c==null){return}while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}var b=a(c).coord(true);return[b.left,b.top]},testOffset:function(h,f,c){var g=h.outerWidth();var j=h.outerHeight();var i=a(window).width()+a(window).scrollLeft();var e=a(window).height()+a(window).scrollTop();if(f.left+g>i){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}f.top-=Math.min(f.top,(f.top+j>e&&e>j)?Math.abs(j+c+23):0);return f},open:function(b){if(b=="time"){this.timePopup=true}else{this.timePopup=false}this.showCalendar()},close:function(b){this.hideCalendar()},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},initTimePopup:function(){this.timePopupElement=a("
    ").appendTo(this.timeContainer);this.timePopupElement.addClass(this.toThemeProperty("jqx-widget-content jqx-widget jqx-date-time-input-popup"));var s="";s+="
     
     
     
     
    ::: 
     
    ";var l=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){this.timePopupElement[0].innerHTML=s}else{this.timePopupElement[0].innerHTML="
    "+s+"-"+s+"
    "}this.timePopupElement.find(".jqx-icon-down").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-down"));this.timePopupElement.find(".jqx-icon-up").addClass(this.toThemeProperty("jqx-icon jqx-icon-arrow-up"));var g=this.timePopupElement.find("input");g.addClass(this.toThemeProperty("jqx-input"));g.addClass(this.toThemeProperty("jqx-rc-all"));this.addHandler(g,"mousedown",function(u){u.stopPropagation()});var e=function(u){if(u.target.className.indexOf("hour")>=0){m._decrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._decrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._decrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._decrementMeridian(a(u.target))}};var k=function(u){if(u.target.className.indexOf("hour")>=0){m._incrementHour(a(u.target))}if(u.target.className.indexOf("minute")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("second")>=0){m._incrementMinuteSecond(a(u.target))}if(u.target.className.indexOf("millisecond")>=0){m._incrementMillisecond(a(u.target))}if(u.target.className.indexOf("meridian")>=0){m._incrementMeridian(a(u.target))}};var r=function(v,u){if(!u.isEditing){return}var w=0;if(!v){v=window.event}if(v.originalEvent&&v.originalEvent.wheelDelta){v.wheelDelta=v.originalEvent.wheelDelta}if(v.originalEvent&&v.originalEvent.deltaY!=undefined){w=-v.originalEvent.deltaY}if(v.wheelDelta){w=v.wheelDelta/120}else{if(v.detail){w=-v.detail/3}}if(w){if(document.activeElement==v.target&&v.target.nodeName.toLowerCase()=="input"){if(w<0){e(v)}else{k(v)}}if(v.preventDefault){v.preventDefault()}v.returnValue=false}if(v.preventDefault){v.preventDefault()}v.returnValue=false};this.addHandler(g,"wheel",function(u){r(u,m)});this.addHandler(g,"keydown",function(v){var u=a(v.target);if(v.ctrlKey){if(v.keyCode==38){if(m.isOpened()){m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}else{if(v.keyCode==40){if(!m.isOpened()){m.showCalendar("keyboard","keyboard");m.dateTimeInput.focus();return false}}}}if(v.keyCode==40){e(v);v.preventDefault()}else{if(v.keyCode==38){k(v);v.preventDefault()}else{if(v.keyCode==13){v.preventDefault();m.hideCalendar("keyboard","keyboard");m.dateTimeInput.focus()}else{if(v.keyCode==27){v.preventDefault();m.hideCalendar("cancel");m.dateTimeInput.focus()}}}}});this.hourInput=a(g[0]);this.minuteInput=a(g[1]);this.secondInput=a(g[2]);this.mssecondInput=a(g[3]);this.meridianInput=a(g[4]);this.hourInput2=a(g[5]);this.minuteInput2=a(g[6]);this.secondInput2=a(g[7]);this.mssecondInput2=a(g[8]);this.meridianInput2=a(g[9]);var m=this;var o=this.timePopupElement.find(".increment-hour-column");this.hourIncrement=a(o[0]);this.hourIncrement2=a(o[1]);this.addHandler(g,"change",function(v){var u=a(v.target);if(u.val().length<=1){u.val("0"+a(v.target).val())}if(v.target.className.indexOf("hour")>=0){var w=parseInt(a(v.target).val());if(l.indexOf("HH")>=0){while(w>24){w=w-24}}else{while(w>12){w=w-12}}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}if(v.target.className.indexOf("minute")>=0||v.target.className.indexOf("second")>=0){var w=parseInt(a(v.target).val());while(w>59){w--}if(w<10){w="0"+w}if(u.val()!=w){u.val(w)}}});this._incrementHour=function(u){var v=parseInt(u.val());v++;if(l.indexOf("HH")>=0){if(v>23){v=0}}else{if(v>12){v=1}}if(v<10){v="0"+v}u.val(v)};this._incrementMinuteSecond=function(u){var v=parseInt(u.val());v++;if(v>59){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMillisecond=function(u){var v=parseInt(u.val());v++;if(v>999){v=0}if(v<10){v="0"+v}u.val(v)};this._incrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this._decrementHour=function(u){var v=parseInt(u.val());v--;if(l.indexOf("HH")>=0){if(v<0){v=23}}else{if(v<1){v=12}}if(v<10){v="0"+v}u.val(v)};this._decrementMinuteSecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=59}if(v<10){v="0"+v}u.val(v)};this._decrementMillisecond=function(u){var v=parseInt(u.val());v--;if(v<0){v=999}if(v<10){v="0"+v}u.val(v)};this._decrementMeridian=function(u){var v=u.val();if(v.toLowerCase().indexOf("a")>=0){v="PM"}else{v="AM"}u.val(v)};this.addHandler(this.hourIncrement,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput)});this.addHandler(this.hourIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementHour(m.hourInput2)});var p=this.timePopupElement.find(".increment-minute-column");this.minuteIncrement=a(p[0]);this.minuteIncrement2=a(p[1]);this.addHandler(this.minuteIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.minuteInput2)});var c=this.timePopupElement.find(".increment-second-column");this.secondIncrement=a(c[0]);this.secondIncrement2=a(c[1]);this.addHandler(this.secondIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput)});this.addHandler(this.secondIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMinuteSecond(m.secondInput2)});var d=this.timePopupElement.find(".increment-millisecond-column");this.millisecondsIncrement=a(d[0]);this.millisecondsIncrement2=a(d[1]);this.addHandler(this.millisecondsIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMillisecond(m.mssecondInput2)});var i=this.timePopupElement.find(".increment-meridian-column");this.meridianIncrement=a(i[0]);this.meridianIncrement2=a(i[1]);this.addHandler(this.meridianIncrement,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput)});this.addHandler(this.meridianIncrement2,"mousedown",function(u){u.stopPropagation();m._incrementMeridian(m.meridianInput2)});var n=this.timePopupElement.find(".decrement-hour-column");this.hourDecrement=a(n[0]);this.hourDecrement2=a(n[1]);this.addHandler(this.hourDecrement,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput)});this.addHandler(this.hourDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementHour(m.hourInput2)});var j=this.timePopupElement.find(".decrement-minute-column");this.minuteDecrement=a(j[0]);this.minuteDecrement2=a(j[1]);this.addHandler(this.minuteDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput)});this.addHandler(this.minuteDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.minuteInput2)});var t=this.timePopupElement.find(".decrement-second-column");this.secondDecrement=a(t[0]);this.secondDecrement2=a(t[1]);this.addHandler(this.secondDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput)});this.addHandler(this.secondDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMinuteSecond(m.secondInput2)});var b=this.timePopupElement.find(".decrement-millisecond-column");this.millisecondsDecrement=a(b[0]);this.millisecondsDecrement2=a(b[1]);this.addHandler(this.millisecondsDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput)});this.addHandler(this.millisecondsDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMillisecond(m.mssecondInput2)});var f=this.timePopupElement.find(".decrement-meridian-column");this.meridianDecrement=a(f[0]);this.meridianDecrement2=a(f[1]);this.addHandler(this.meridianDecrement,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput)});this.addHandler(this.meridianDecrement2,"mousedown",function(u){u.stopPropagation();m._decrementMeridian(m.meridianInput2)});var q=this.timePopupElement.find("table");this.addHandler(this.timePopupElement,"mousedown",function(u){u.stopPropagation()});var h=function(u){var v=u.find("tr");if(l.indexOf("mm")==-1){m.minuteInput.hide();m.minuteInput2.hide();a(a(v[0]).children()[1]).hide();a(a(v[0]).children()[2]).hide();a(a(v[1]).children()[1]).hide();a(a(v[1]).children()[2]).hide();a(a(v[2]).children()[1]).hide();a(a(v[2]).children()[2]).hide()}if(l.indexOf("ss")==-1){m.secondInput.hide();m.secondInput2.hide();a(a(v[0]).children()[3]).hide();a(a(v[0]).children()[4]).hide();a(a(v[1]).children()[3]).hide();a(a(v[1]).children()[4]).hide();a(a(v[2]).children()[3]).hide();a(a(v[2]).children()[4]).hide()}if(l.indexOf("tt")==-1&&l.indexOf("hh")==-1){m.meridianInput.hide();m.meridianInput2.hide();a(a(v[0]).children()[7]).hide();a(a(v[0]).children()[8]).hide();a(a(v[1]).children()[7]).hide();a(a(v[1]).children()[8]).hide();a(a(v[2]).children()[7]).hide();a(a(v[2]).children()[8]).hide()}if(l.indexOf("zz")==-1){m.mssecondInput.hide();m.mssecondInput2.hide();a(a(v[0]).children()[5]).hide();a(a(v[0]).children()[6]).hide();a(a(v[1]).children()[5]).hide();a(a(v[1]).children()[6]).hide();a(a(v[2]).children()[5]).hide();a(a(v[2]).children()[6]).hide()}};if(q.length==1){h(q)}else{h(a(a(q)[1]));h(a(a(q)[2]))}},updateTimePopup:function(){var b=this._getFormatValue(this.formatString);if(this.selectionMode!="range"){var f=this.getDate();if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}}else{var f=this.getRange().from;if(this.hourInput){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput.val(c);this.minuteInput.val(h);this.secondInput.val(e);this.mssecondInput.val(d);this.meridianInput.val(g)}var f=this.getRange().to;if(this.hourInput2){if(f){var c=f.getHours();var h=f.getMinutes();var g=f.getHours();var e=f.getSeconds();var d=f.getMilliseconds()}else{var c=0;var h=0;var g=0;var e=0;var d=0}if(c>=12){g="PM";if(b.indexOf("HH")==-1){c-=12;if(c==0){c=12}}}else{g="AM"}if(this.meridianInput.css("display")!="none"){if(c==0){c=12}}if(c<10){c="0"+c}if(h<10){h="0"+h}if(e<10){e="0"+e}if(d<10){d="0"+d}this.hourInput2.val(c);this.minuteInput2.val(h);this.secondInput2.val(e);this.mssecondInput2.val(d);this.meridianInput2.val(g)}}},showCalendar:function(){var o=this.calendarContainer;var s=this._calendar;a.jqx.aria(this,"aria-expanded",true);if(this.showTimeButton){if(this.timePopup){if(!this.timePopupElement){this.initTimePopup()}this.calendarContainer.css("visibility","hidden");this.timeContainer.css("visibility","visible");this.updateTimePopup();var d=this.timeContainer.find("input");var v=0;for(var z=0;zthis.host.width()){var f=23;this.container.css("left",f+parseInt(Math.round(u))-x+"px")}else{this.container.css("left",25+parseInt(Math.round(u))+x+"px")}}if(this.dropDownVerticalAlignment=="top"){var y=o.height();if(this.timePopup){this.timeContainer.css("top",this.container.height()-75)}b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"));var n=parseInt(this.host.outerHeight());var m=parseInt(p)-Math.abs(y+n+23);this.container.css("top",m)}if(this.enableBrowserBoundsDetection){var j=this.testOffset(o,{left:parseInt(this.container.css("left")),top:parseInt(p)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=j.top){b=true;o.css("top",23);o.addClass(this.toThemeProperty("jqx-popup-up"))}else{o.css("top",0)}this.container.css("top",j.top);if(parseInt(this.container.css("left"))!=j.left){this.container.css("left",j.left)}}this._raiseEvent(7,o);if(this.animationType!="none"){this.container.css("display","block");var q=parseInt(o.outerHeight());o.stop();this.isanimating=true;this.opening=true;if(this.animationType=="fade"){o.css("margin-top",0);o.css("opacity",0);o.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()});if(this.timePopup){this.timeContainer.css("margin-top",0);this.timeContainer.css("opacity",0);this.timeContainer.animate({opacity:1},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}}else{o.css("opacity",1);if(this.timePopup){this.timeContainer.css("opacity",1)}if(b){o.css("margin-top",q)}else{o.css("margin-top",-q)}if(this.timePopup){if(b){this.timeContainer.css("margin-top",q)}else{this.timeContainer.css("margin-top",-q)}this.timeContainer.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.timeContainer.focus()})}o.animate({"margin-top":0},this.openDelay,function(){r.isanimating=false;r.opening=false;a.data(document.body,"openedJQXCalendar"+r.id,o);r.calendarContainer.focus()})}}else{o.stop();r.isanimating=false;r.opening=false;o.css("opacity",1);o.css("margin-top",0);this.container.css("display","block");a.data(document.body,"openedJQXCalendar"+r.id,o);this.calendarContainer.focus();if(this.timePopup){this.timeContainer.stop();this.timeContainer.css("opacity",1);this.timeContainer.css("margin-top",0);this.timeContainer.focus()}}if(this.value==null){if(this._calendar&&this._calendar._getSelectedCell()){this._calendar._getSelectedCell().isSelected=false}}if(this.timePopup){this.timeButtonIcon.addClass(this.toThemeProperty("jqx-icon-time-pressed"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.timeButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.timeContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{this.calendarButtonIcon.addClass(this.toThemeProperty("jqx-icon-calendar-pressed"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-hover"));this.calendarButton.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.calendarContainer.addClass(this.toThemeProperty("jqx-fill-state-focus"))}this.host.addClass(this.toThemeProperty("jqx-fill-state-focus"))},hideCalendar:function(j,o){if(o){this.changeType=o}var h=this.calendarContainer;var b=this.container;var p=this;a.jqx.aria(this,"aria-expanded",false);if(this.showTimeButton){if(this.timeContainer.css("visibility")!="hidden"&&j!="cancel"){if(this.selectionMode!="range"&&this.hourInput){var e=this.getDate();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}if(!e){e=new Date()}e.setHours(g,f,c,q);this.setDate(e)}else{if(this.hourInput&&j!="selected"){var i=this.getRange();var g=parseInt(this.hourInput.val());var f=parseInt(this.minuteInput.val());var c=parseInt(this.secondInput.val());var q=parseInt(this.mssecondInput.val());var d=this.meridianInput.val();if(isNaN(g)){g=0}if(isNaN(f)){f=0}if(isNaN(c)){c=0}if(isNaN(q)){q=0}if(this.meridianInput.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var l=i.from;if(!l){l=new Date()}l.setHours(g,f,c,q);var g=parseInt(this.hourInput2.val());var f=parseInt(this.minuteInput2.val());var c=parseInt(this.secondInput2.val());var q=parseInt(this.mssecondInput2.val());var d=this.meridianInput2.val();if(f==""){f=0}if(c==""){c=0}if(q==""){q=0}if(this.meridianInput2.css("display")!="none"){if(d.toLowerCase().indexOf("p")>=0){if(g<12){g+=12}}if(d.toLowerCase().indexOf("a")>=0){if(g>=12){g-=12}}}var k=i.to;if(!k){k=new Date()}k.setHours(g,f,c,q);if(k.valueOf()0){var h=j[0].id.toString();var f=h.toString().substring(13);var i=a(document).find("#"+f);var n=b.data.me.hideCalendar();if(n!==false){a.data(document.body,"openedJQXCalendar"+b.data.me.id,null)}}}},_loadItems:function(){if(this.value!=null){this.items=new Array();var d=this._getFormatValue(this.formatString);this.items=this._parseFormatValue(d);this.editors=new Array();for(var b=0;b=1){f=d.format(d.value,0,d.items.length)}var b=d.dateTimeInput.val();if(b!=f){d._raiseEvent(1,d.value)}}if(d.selectionMode=="range"){var c=d.getRange();var i=d.format(d.value,0,d.items.length);if(c.to){var h=a.jqx._jqxDateTimeInput.getDateTime(c.from);i=d.format(h,0,d.items.length);var g=a.jqx._jqxDateTimeInput.getDateTime(c.to);var e=d.format(g,0,d.items.length);var f=i+" - "+e;if(f==" - "){f=""}}else{f=""}}d.dateTimeInput.val(f)},format:function(g,h,f){var b="";for(var e=h;e2;if(this.items[e].type=="FORMAT_AMPM"){d=true;if(this.editors[e].value==0){c=this.editors[e].amString}else{c=this.editors[e].pmString}}if(!d){c=this.items[e].dateParserInEditMode(new Number(this.editors[e].value),"d"+this.editors[e].maxEditPositions,this);while(c.length0){var d=this._getFormatValueGroupLength(f);var g=null;switch(f.substring(0,1)){case":":case"/":d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break;case'"':case"'":var b=f.indexOf(f[0],1);g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1+Math.max(1,b-1)),"ReadOnly",this.culture);d=Math.max(1,b+1);break;case"\\":if(f.length>=2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(1,1),"ReadOnly",this.culture);d=2}break;case"d":case"D":if(d>2){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Day",this.culture)}break;case"f":case"F":if(d>7){d=7}if(d>3){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture)}else{g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Millisecond",this.culture)}break;case"g":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;case"h":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_hh",this.culture);break;case"H":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_HH",this.culture);break;case"m":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Minute",this.culture);break;case"M":if(d>4){d=4}g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Month",this.culture);break;case"s":case"S":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Second",this.culture);break;case"t":case"T":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"FORMAT_AMPM",this.culture);break;case"y":case"Y":if(d>1){g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"Year",this.culture)}else{d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),null,"ReadOnly",this.culture)}break;case"z":g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,d),"ReadOnly",this.culture);break;default:d=1;g=a.jqx._jqxDateTimeInput.DateTimeFormatItem._create(f.substring(0,1),"ReadOnly",this.culture);break}c[e]=a.extend(true,{},g);f=f.substring(d);e++}return c},_getFormatValue:function(b){if(b==null||b.length==0){b="d"}if(b.length==1){switch(b.substring(0,1)){case"d":return this.localization.calendar.patterns.d;case"D":return this.localization.calendar.patterns.D;case"t":return this.localization.calendar.patterns.t;case"T":return this.localization.calendar.patterns.T;case"f":return this.localization.calendar.patterns.f;case"F":return this.localization.calendar.patterns.F;case"M":return this.localization.calendar.patterns.M;case"Y":return this.localization.calendar.patterns.Y;case"S":return this.localization.calendar.patterns.S}}if(b.length==2&&b.substring(0,1)=="%"){b=b.substring(1)}return b},_updateEditorsValue:function(){var j=this.value;if(j==null){return}var g=j.year;var h=j.day;var d=j.hour;var l=j.millisecond;var b=j.second;var c=j.minute;var f=j.month;if(this.items==null){return}for(var e=0;e=0&&d<12){this.editors[e].value=0}else{this.editors[e].value=1}break;case"Day":this.editors[e].value=h;break;case"FORMAT_hh":var k=d%12;if(k==0){k=12}this.editors[e].value=k;break;case"FORMAT_HH":this.editors[e].value=d;break;case"Millisecond":this.editors[e].value=l;break;case"Minute":this.editors[e].value=c;break;case"Month":this.editors[e].value=f;break;case"Second":this.editors[e].value=b;break;case"Year":this.editors[e].value=g;break}}},updateValue:function(z){if(this.isEditing){return}if(this.items&&this.items.length==0){return}var o=0;var s=1;var C=1;var l=0;var d=0;var J=0;var u=0;var I=1;var h=0;var m=false;var r=false;var D=false;var c=false;var b=false;var q=false;var x=false;var t=new Array();var e=null;var y=0;for(var B=0;B0&&I>0&&C>0&&u>=0&&l>=0&&J>=0&&d>=0){var K=this.value;if(K!=null){if(!m){s=K.year}if(!r){I=K.month}if(!D){C=K.day}}try{if(I>12){I=12}if(I<1){I=1}if(z&&K._daysInMonth(s,I)<=C){C=K._daysInMonth(s,I);if(t!=null&&t.length>0){for(B=0;B=12){l-=12}}else{if(l+12<24){l+=12}}}var g=this.value.dateTime.getDate();this.value._setYear(parseInt(s));this.value._setDay(C);this.value._setMonth(I);if(c){this.value._setHours(l)}if(b){this.value._setMinutes(u)}if(q){this.value._setSeconds(J)}if(x){this.value._setMilliseconds(d)}this._validateTimeRange()}catch(j){this.value=K}if(G!=null){var A=this.value.dateTime.getFullYear()==G.getFullYear()&&this.value.dateTime.getDate()==G.getDate()&&this.value.dateTime.getMonth()==G.getMonth()&&this.value.dateTime.getHours()==G.getHours()&&this.value.dateTime.getMinutes()==G.getMinutes()&&this.value.dateTime.getSeconds()==G.getSeconds();if(!A){if(this.changing){var n=this.changing(G,this.value.dateTime);if(n){this.value=a.jqx._jqxDateTimeInput.getDateTime(n)}}this._raiseEvent("0",this.value.dateTime);if(this.cookies){if(this.value!=null){a.jqx.cookie.cookie("jqxDateTimeInput"+this.element.id,this.value.dateTime.toString(),this.cookieoptions)}}if(this.change){this.change(this.value.dateTime)}}}}var f=this.editors.indexOf(this.activeEditor);var p=this.items[f];if(this.value){if(this.calendarContainer.jqxCalendar("_isDisabled",this.value.dateTime)){this.dateTimeInput.addClass(this.toThemeProperty("jqx-input-invalid"))}else{this.dateTimeInput.removeClass(this.toThemeProperty("jqx-input-invalid"))}}},_internalSetValue:function(b){this.value._setYear(parseInt(b.year));this.value._setDay(b.day);this.value._setMonth(b.month);this.value._setHours(b.hour);this.value._setMinutes(b.minute);this.value._setSeconds(b.second);this.value._setMilliseconds(b.milisecond)},_raiseEvent:function(c,n,f){var m=this.events[c];var g={};g.owner=this;if(n==null){n={}}if(f==null){f=n}var l=n.charCode?n.charCode:n.keyCode?n.keyCode:0;var o=true;var k=this.readonly;var b=new a.Event(m);b.owner=this;b.args=g;b.args.date=this.getDate();if(c==9){b.args.type=this.changeType;this.changeType=null}this.element.value=this.dateTimeInput.val();if(c==9&&this.selectionMode!="range"){var d=b.args.date;if(this._oldDT){if(d!=null){if(!(d.getFullYear()!=this._oldDT.getFullYear()||d.getMonth()!=this._oldDT.getMonth()||d.getDate()!=this._oldDT.getDate()||d.getHours()!=this._oldDT.getHours()||d.getMinutes()!=this._oldDT.getMinutes()||d.getSeconds()!=this._oldDT.getSeconds())){return true}}a.jqx.aria(this,"aria-valuenow",this.getDate());a.jqx.aria(this,"aria-valuetext",this.getText());if(this.getDate()!=null){a.jqx.aria(this,"aria-label","Current focused date is "+this.getDate().toLocaleString())}else{a.jqx.aria(this,"aria-label","Current focused date is Null")}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.selectionMode=="range"){b.args.date=this.getRange();if(this._oldDT){var d=b.args.date.from;if(c==9){var j=false;var i=false;var e=this._oldDT.from;if(d!=null&&e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){j=true}}var d=b.args.date.to;if(d!=null){e=this._oldDT.to;if(e){if(!(d.getFullYear()!=e.getFullYear()||d.getMonth()!=e.getMonth()||d.getDate()!=e.getDate()||d.getHours()!=e.getHours()||d.getMinutes()!=e.getMinutes()||d.getSeconds()!=e.getSeconds())){i=true}}}if(j&&i){return true}var j=b.args.date.from;if(j==null){j=""}else{j=j.toString()}var i=b.args.date.to;if(i==null){i=""}else{i=i.toString()}a.jqx.aria(this,"aria-valuenow",j+"-"+i);a.jqx.aria(this,"aria-valuetext",this.getText());if(j&&i){a.jqx.aria(this,"aria-label","Current focused range is "+j.toLocaleString()+"-"+i.toLocaleString())}}}b.args.oldValue=f;b.args.newValue=b.args.date;if(this._oldDT){b.args.oldValue=this._oldDT}}if(this.host.css("display")=="none"){return true}if(c!=2&&c!=3&&c!=4&&c!=5&&c!=6){o=this.host.trigger(b);if(b.stopPropagation){b.stopPropagation()}}var h=this;if(!k){if(c==2&&!this.disabled){setTimeout(function(){h.isEditing=true;if(this.selectionMode=="range"){h._selectGroup(-1)}else{h._selectGroup(-1)}},25)}}if(c==4){if(k||this.disabled){if(l==8||l==46){this.isEditing=false;if(this.allowKeyboardDelete){if(this.allowNullDate){this.setDate(null)}else{if(this.selectionMode!="range"){this.setDate(this.getMinDate())}else{this.setRange(this.getMinDate(),this.getMinDate())}}}}if(l==9){return true}if(!n.altKey){return false}}o=this._handleKeyDown(n,l)}else{if(c==5){if(l==9){return true}if(k||this.disabled){return false}}else{if(c==6){if(l==9){return true}if(k||this.disabled){return false}o=this._handleKeyPress(n,l)}}}return o},_doLeftKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions>0){this.activeEditor.positions--;this._selectGroup(e);return}}while(e>0){this.activeEditor=this.editors[--e];this._selectGroup(e);if(this.items[e].type!="ReadOnly"){d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&b!=this.activeEditor){if(this.items[e].type!="ReadOnly"){if(this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_doRightKey:function(){if(this.activeEditor!=null){if(!this.isEditing){this.isEditing=true}var b=this.activeEditor;var d=false;var e=this.editors.indexOf(this.activeEditor);var c=e;if(this.enableAbsoluteSelection){if(e>=0&&this.activeEditor.positions2){break}d=true;break}}if(!d){if(c>=0){this.activeEditor=this.editors[c]}}if(this.activeEditor!=null&&this.activeEditor!=b){if(this.items[e].type!="ReadOnly"){this.activeEditor.positions=0}}if(this.activeEditor!=b){this._validateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return true}else{return false}}},_saveSelectedText:function(){var c=this._selection();var e="";var d=this.dateTimeInput.val();if(c.start>0||c.length>0){for(var b=c.start;b1){c=1}}break;case"Character":break;case"Day":if(c<1){c=1}else{if(c>31){c=31}}break;case"FORMAT_hh":if(c<1){c=1}else{if(c>12){c=12}}break;case"FORMAT_HH":if(c<0){c=0}else{if(c>23){c=23}}break;case"Millisecond":if(c<0){c=0}else{if(c>99){c=99}}break;case"Minute":if(c<0){c=0}else{if(c>59){c=59}}break;case"Month":if(c<1){c=1}else{if(c>12){c=12}}break;case"ReadOnly":break;case"Second":if(c<0){c=0}else{if(c>59){c=59}}break;case"Year":if(cthis.maxDate.year){c=this.maxDate.year}}break}if(d.value!=c){b=true}if(!b){this.isEditing=false;this._validateValue();this._updateText();this.isEditing=true;this._doRightKey();return true}return false}}},_handleKeyPress:function(j,n){var m=this._selection();var b=this;var d=j.ctrlKey||j.metaKey;if((d&&n==97)||(d&&n==65)){return true}if(n==8){if(m.start>0){b._setSelectionStart(m.start)}return false}if(n==46){if(m.start=0){this.changeType="keyboard";var f=String.fromCharCode(n);var k=parseInt(f);if(f=="p"||f=="a"||f=="A"||f=="P"){if(this.activeEditor&&this.activeEditor.item.type=="FORMAT_AMPM"){if(this.activeEditor.value==0&&(f=="p"||f=="P")){this.spinUp()}else{if(this.activeEditor.value==1&&(f=="a"||f=="A")){this.spinDown()}}}}if(!isNaN(k)){if(this.container.css("display")=="block"){this.hideCalendar()}this.updateValue();this._updateText();var h=false;var i=this.editors.indexOf(this.activeEditor);var c=null;this.isEditing=true;if(i.type!="ReadOnly"){c=this.activeEditor}if(c!=null&&c.positions==0){this.editorText=""}if(this.activeEditor==null){this.activeEditor=this.editors[0]}if(this.activeEditor==null){return false}this.activeEditor.insert(f);if(c!=null&&this.editorText.length>=c.maxEditPositions){this.editorText=""}this.editorText+=f;var o=this._selectWithAdvancePattern();if(this.activeEditor.positions==this.activeEditor.maxEditPositions){var g=this._getLastEditableEditorIndex();if(this.editors.indexOf(this.activeEditor)==g&&o&&this.enableAbsoluteSelection){this.activeEditor.positions=this.activeEditor.maxEditPositions-1}else{this.activeEditor.positions=0}}h=true;this.updateValue();this._updateText();this._selectGroup(this.editors.indexOf(this.activeEditor));return false}}var l=this._isSpecialKey(n);return l},_getLastEditableEditorIndex:function(){var b=0;var d=this;for(var c=this.items.length-1;c>=0;c--){if(this.items[c].type!="ReadOnly"){return c}}return -1},_handleKeyDown:function(i,o){var h=this;this.timePopup=false;if(o==84){this.timePopup=true}if(i.keyCode==115){if(h.isOpened()){h.hideCalendar("keyboard","keyboard");return false}else{if(!h.isOpened()){h.showCalendar("keyboard","keyboard");return false}}}if(i.altKey){if(i.keyCode==38){if(h.isOpened()){if(h.showTimeButton&&!h.showCalendarButton){h.timePopup=true}h.hideCalendar("keyboard","keyboard");return false}}else{if(i.keyCode==40){if(!h.isOpened()){if(h.showTimeButton&&!h.showCalendarButton){h.timePopup=true}h.showCalendar("keyboard","keyboard");return false}}}}else{if(i.ctrlKey){this.timePopup=true;if(i.keyCode==38){if(h.isOpened()){h.hideCalendar("keyboard","keyboard");return false}}else{if(i.keyCode==40){if(!h.isOpened()){h.showCalendar("keyboard","keyboard");return false}}}}}if(h.isOpened()){if(i.keyCode==9){h.hideCalendar("selected","keyboard");return true}return}var m=h._selection();var b=i.ctrlKey||i.metaKey;if((b&&o==99)||(b&&o==67)){h._saveSelectedText(i);return true}if((b&&o==122)||(b&&o==90)){return false}if((b&&o==118)||(b&&o==86)||(i.shiftKey&&o==45)){var l=h.val();var j=this;var c=a('").appendTo(O);D.jqxInput({rtl:m.rtl,height:40,width:"100%",theme:m.theme});D.css("box-sizing","border-box");m.editDialogFields.description=D;m.editDialogFields.descriptionLabel=aA;m.editDialogFields.descriptionContainer=K;var ac=a("
    ");H.append(ac);var aD=a("
    "+m.schedulerLocalization.editDialogColorString+"
    ").appendTo(ac);var Q=a("
    ").appendTo(ac);var F=a("
    ").appendTo(Q);var I=function(aE){if(aE==-1){return""}var i=m.colors[aE];var aF="";var aF="";aF+="
    ";return aF};var an=function(aG,aE){if(aE<0){aG.css("top","4px");aG.css("position","relative");return aG[0].outerHTML}var i=m.colors[aE];var aF="";aF+="
    ";return aF};F.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:-1,placeHolder:m.schedulerLocalization.editDialogColorPlaceHolderString,selectionRenderer:an,renderer:I,source:m.colors,width:"100%",theme:m.theme});m.editDialogFields.color=F;m.editDialogFields.colorLabel=aD;m.editDialogFields.colorContainer=ac;var ah=a("
    ");H.append(ah);var az=a("
    "+m.schedulerLocalization.editDialogStatusString+"
    ").appendTo(ah);var N=a("
    ").appendTo(ah);var B=a("
    ").appendTo(N);B.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:2,autoDropDownHeight:true,source:m.schedulerLocalization.editDialogStatuses,width:"100%",theme:m.theme});m.editDialogFields.status=B;m.editDialogFields.statusLabel=az;m.editDialogFields.statusContainer=ah;var ag=a("
    ");H.append(ag);var M=a("
    "+m.schedulerLocalization.editDialogResourceIdString+"
    ").appendTo(ag);var am=a("
    ").appendTo(ag);var ab=a("
    ").appendTo(am);var E=new Array();for(var aw=0;aw10){v=false}ab.jqxDropDownList({height:27,rtl:m.rtl,source:E,selectedIndex:0,autoDropDownHeight:v,width:"100%",theme:m.theme});m.editDialogFields.resource=ab;m.editDialogFields.resourceLabel=M;m.editDialogFields.resourceContainer=ag;if(E.length==0){ag.hide()}if(!b&&k){m.editDialogFields.resource.val(k.resourceId)}var ae=a("
    ");H.append(ae);var al=a("
    ").appendTo(ae);var ap=a("").appendTo(al);var aj=a("").appendTo(al);var ak=a("").appendTo(al);var J=a("").appendTo(al);var aa=a("").appendTo(al);var aB=a("").appendTo(al);var s=a("").appendTo(al);var ax=25;if(m.isTouchDevice()){ax=null}aj.jqxButton({rtl:m.rtl,theme:m.theme});ak.jqxButton({rtl:m.rtl,theme:m.theme});J.jqxButton({rtl:m.rtl,theme:m.theme});aa.jqxButton({rtl:m.rtl,theme:m.theme});ap.jqxButton({rtl:m.rtl,theme:m.theme});aB.jqxButton({rtl:m.rtl,theme:m.theme});s.jqxButton({rtl:m.rtl,theme:m.theme});aB.hide();s.hide();m.editDialogFields.saveOccurrenceButton=s;m.editDialogFields.saveSeriesButton=aB;m.editDialogFields.saveButton=aa;m.editDialogFields.cancelButton=ap;m.editDialogFields.deleteButton=aj;m.editDialogFields.deleteSeriesButton=ak;m.editDialogFields.deleteExceptionsButton=J;m.editDialogFields.buttons=al;m.addHandler(aj,"click",function(){q.jqxWindow("close");m.overlay.hide();m._deleteAppointment(m.editAppointment)});m.addHandler(ap,"click",function(){q.jqxWindow("close");m.overlay.hide()});m.addHandler(s,"click",function(){if(!m.editAppointment.isException()){if(m.editAppointment.rootAppointment!=null){m.editAppointment.rootAppointment.exceptions.push(m.editAppointment);m.editAppointment.rootAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}else{m.editAppointment.exceptions.push(m.editAppointment);m.editAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}}else{var aG=m.editAppointment.rootAppointment?m.editAppointment.rootAppointment.exceptions:m.editAppointment.exceptions;for(var aF=0;aF=0){m.editDialogFields.color.val(b.borderColor)}else{m.editDialogFields.color.jqxDropDownList("clearSelection")}m.editDialogFields.allDay.val(b.allDay);m.editDialogFields.resource.val(b.resourceId);m.editDialogFields.status.val(b.status);if(b.timeZone){b.from=b.from.toTimeZone(b.timeZone);b.to=b.to.toTimeZone(b.timeZone)}d=b.from;h=b.to;if(a.jqx.scheduler.utilities.getStartOfDay(d).equals(d)&&a.jqx.scheduler.utilities.getEndOfDay(h).equals(h)){m.editDialogFields.allDay.val(true)}m._setAppointmentPropertiesToDialog(b,d,h,k?k.resourceId:null)}else{m.editDialogFields.saveButton.show();m._setAppointmentPropertiesToDialog(null,d,h,k?k.resourceId:null)}if(d&&h){m._changeFromUser=false;m.editDialogFields.from.val(d.toDate());m.editDialogFields.to.val(h.toDate());m._changeFromUser=true}if(!m.isTouchDevice()){m._editDialog.jqxWindow({height:150});m._editDialog.jqxWindow({height:a(m._editDialog.children())[1].scrollHeight+40})}}});m.removeHandler(m._editDialog,"keydown");m.addHandler(m._editDialog,"keydown",function(s){if(m.editDialogKeyDown){var i=m.editDialogKeyDown(q,m.editDialogFields,m.editAppointment,s);if(i!=undefined){return i}}if(s.keyCode==13){if(a(document.activeElement).ischildof(m._editDialog)){if(document.activeElement.nodeName.toLowerCase()=="button"){return true}if(b){if(b.isException()||b.rootAppointment){m.editDialogFields.saveOccurrenceButton.trigger("click")}else{if(b.isRecurrentAppointment()){m.editDialogFields.saveSeriesButton.trigger("click")}else{m.editDialogFields.saveButton.trigger("click")}}}else{m.editDialogFields.saveButton.trigger("click")}}}else{if(s.keyCode==27){m.editDialogFields.cancelButton.trigger("click")}}})},openMenu:function(e,c){var d=this;if(!d.menu){d._initMenu()}var b=d._views[d._view].type;if(d.contextMenu&&d.menu){if(!d.selectedAppointment){d.menu.jqxMenu("hideItem","editAppointment")}else{d.menu.jqxMenu("showItem","editAppointment")}if(arguments.length<2){if(d.selectedAppointment){var f=d.selectedAppointment.coord();e=f.left;c=f.top}else{if(d.focusedCell){var f=a(d.focusedCell).coord()}}e=f.left;c=f.top}d.menu.jqxMenu("open",e,c);d._hasOpenedMenu=true}},closeMenu:function(){var b=this;if(b.contextMenu&&b.menu){setTimeout(function(){b.menu.jqxMenu("close")})}},closeDialog:function(){var b=this;b._editDialog.jqxWindow("close")},openDialog:function(d,e){var f=this;var c=f._views[f._view].type;if(f.selectedJQXAppointment){var b=f._initDialog(f.selectedJQXAppointment);if(b!==false){f._openDialog(d,e)}}else{if(f.getSelection()==null){f.focus();f.focusedCell.setAttribute("data-selected","true");f._lastSelectedCell=f.focusedCell;f._updateCellsSelection(f.focusedCell)}f._initDialog();f._openDialog(d,e)}},_openDialog:function(d,c){var f=this;var j=f._views[f._view].type;if(!f.editDialog){return}var e=f.host.coord();f.overlay.show();f.overlay.css("z-index",9999999);f.overlay.width(f.host.width());f.overlay.height(f.host.height());f.overlay.offset(e);var g=f.isTouchDevice();if(g){f._editDialog.jqxWindow("move",e.left,e.top);f._editDialog.jqxWindow({draggable:false,maxWidth:f.host.width(),maxHeight:f.host.height()});f._editDialog.jqxWindow({width:f.host.width(),height:f.host.height()});f._editDialog.jqxWindow("open");f._editDialog.jqxWindow("move",e.left,e.top)}else{if(d!=undefined&&c!=undefined){f._editDialog.jqxWindow("move",d,c);f._editDialog.jqxWindow("open")}else{var i=f._editDialog.height();if(i<400){i=400}var h=e.top+f.host.height()/2-i/2;var b=e.left+f.host.width()/2-f._editDialog.width()/2;f._editDialog.jqxWindow("move",b,h);f._editDialog.jqxWindow("open")}}setTimeout(function(){f.overlay.css("z-index",999)},50)},_setAppointmentPropertiesFromDialog:function(c,d){var e=this;var b=function(n){var x=e._views[e._view].type;var u=e._views[e._view];var A=e.editDialogFields.from.val("date");var h=e.editDialogFields.to.val("date");if(A>h){e.editDialogFields.from.jqxDateTimeInput("focus");return false}if(A==h){if(x.indexOf("month")>=0){return true}return false}n.resourceId=e.editDialogFields.resource.val();if(e.editDialogFields.resourceContainer.css("display")=="none"){n.resourceId=""}n.description=e.editDialogFields.description.val();n.allDay=e.editDialogFields.allDay.val();n.status=e.editDialogFields.status.val();n.location=e.editDialogFields.location.val();n.timeZone=e.editDialogFields.timeZone.val();if(n.timeZone==""&&e.timeZone!=""){n.timeZone=e.timeZone}n.from=new a.jqx.date(A,n.timeZone);n.to=new a.jqx.date(h,n.timeZone);if(e.timeZone){n.from=n.from.toTimeZone(e.timeZone);n.to=n.to.toTimeZone(e.timeZone)}else{n.from=n.from.toTimeZone(null);n.to=n.to.toTimeZone(null)}if(n.allDay){n.from=a.jqx.scheduler.utilities.getStartOfDay(n.from);n.to=a.jqx.scheduler.utilities.getEndOfDay(n.to)}if(e.editDialogFields.color.val()){var v=e.getAppointmentColors(e.editDialogFields.color.val());n.color=v.color;n.background=v.background;n.borderColor=v.border}n.subject=e.editDialogFields.subject.val();var f=e.editDialogFields.repeat.jqxDropDownList("selectedIndex");var r=new a.jqx.scheduler.recurrencePattern();var j=e.editDialogFields.repeatEndPanel;r.timeZone=e.timeZone;r.from=n.from.clone();if(d=="occurrence"){if(n.rootAppointment){r.from=n.rootAppointment.from.clone()}}if(e.editDialogFields.resetExceptions.val()){n.exceptions=new Array();n.recurrenceException=new Array()}if(j.repeatEndNever.val()){r.count=1000;r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndAfter.val()){r.count=j.repeatEndAfterValue.val();r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndOn.val()){r.count=1000;var h=new a.jqx.date(j.repeatEndOnValue.jqxDateTimeInput("getDate"),e.timeZone);r.to=h}}}switch(f){case 0:default:n.clearRecurrence();break;case 1:var k=e.editDialogFields.daily;var F=k.repeatDayInterval.val();r.interval=F;r.freq="daily";break;case 2:var w=e.editDialogFields.weekly;var F=w.repeatWeekInterval.val();var q=[{Sunday:0},{Monday:1},{Tuesday:2},{Wednesday:3},{Thursday:4},{Friday:5},{Saturday:6}];var p=w.repeatDays;var o=new Array();r.weekDays={};for(var C=0;C<7;C++){var B=p[C].val();if(B){if(C==0){o.push(6)}else{o.push(C-1)}a.extend(r.weekDays,q[C])}}r.freq="weekly";r.byweekday=o;r.interval=F;break;case 3:var D=e.editDialogFields.monthly;var F=D.repeatMonth.val();if(D.repeatMonthDayBool.val()){r.day=D.repeatMonthDay.val();r.bymonthday=new Array();r.bymonthday.push(r.day)}else{var y=D.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=D.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="monthly";r.interval=F;break;case 4:var G=e.editDialogFields.yearly;var F=G.repeatYear.val();if(G.repeatYearBool.val()){r.day=G.repeatYearDay.val();r.month=G.repeatYearMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);r.byyearday=new Array();r.byyearday.push(r.day)}else{r.month=G.repeatDayOfWeekMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);var y=G.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=G.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="yearly";r.interval=F;break}if(n.rootAppointment){n.rootAppointment.recurrencePattern=r}else{if(f>0){n.recurrencePattern=r}}var m={};var t={};for(var H in e.appointmentDataFields){var g=e.appointmentDataFields[H];var z=n[H];m[H]=z;if(H=="from"||H=="to"){z=z.toDate()}t[g]=z}m.originalData=t;m.jqxAppointment=n;n.boundAppointment=m;return true}(c);return b},_setAppointmentPropertiesToDialog:function(e,h,d,g){var f=this;var c=function(){var p=f.editDialogFields.repeatEndPanel;p.repeatEndNever.jqxRadioButton({checked:true});p.repeatEndAfter.jqxRadioButton({checked:false});p.repeatEndAfterValue.val(1);p.repeatEndOnValue.val(l);var l=d.toDate();if(f.editDialogFields.daily){var j=f.editDialogFields.daily;j.repeatDayInterval.val(1)}if(f.editDialogFields.weekly){var o=f.editDialogFields.weekly;for(var m=0;m=0||(h&&h.equals(d))||(d&&d.equals(a.jqx.scheduler.utilities.getEndOfDay(d))&&h&&h.equals(a.jqx.scheduler.utilities.getStartOfDay(h)))){f.editDialogFields.allDay.val(true)}f.editDialogFields.color.jqxDropDownList("clearSelection");f.editDialogFields.description.val("");f.editDialogFields.subject.val("");f.editDialogFields.repeat.jqxDropDownList("selectIndex",0);return}var b=function(j){var r=j.recurrencePattern;if(j.rootAppointment){var r=j.rootAppointment.recurrencePattern}if(r==null){return}var k=r.freq;var p=0;if(k=="daily"){p=1}if(k=="weekly"){p=2}if(k=="monthly"){p=3}if(k=="yearly"){p=4}var n=f.editDialogFields.repeatEndPanel;if(r.count!=1000){n.repeatEndNever.jqxRadioButton({checked:false});n.repeatEndAfter.jqxRadioButton({checked:true});n.repeatEndAfterValue.val(r.count)}else{if(r.to.year()!=9999){n.repeatEndOn.jqxRadioButton({checked:true});n.repeatEndOnValue.val(r.to.toDate())}else{n.repeatEndNever.jqxRadioButton({checked:true})}}f.editDialogFields.repeat.jqxDropDownList("selectIndex",p);switch(p){case 1:var l=r.interval;var q=f.editDialogFields.daily;q.repeatDayInterval.val(l);break;case 2:var l=r.interval;var z=f.editDialogFields.weekly;z.repeatWeekInterval.val(l);var y=r.byweekday;for(var o=0;o<7;o++){var w=z.repeatDays[o];w.val(false)}for(var o=0;o0){u.repeatMonthDayBool.jqxRadioButton({checked:true});u.repeatMonthDay.val(r.day)}else{u.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}u.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}u.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break;case 4:var t=f.editDialogFields.yearly;if(r.byyearday&&r.byyearday.length>0){t.repeatYearDay.val(r.byyearday[0]);t.repeatYearBool.val(true)}if(r.bymonth&&r.bymonth.length>0){t.repeatYearMonth.val(r.bymonth[0]);t.repeatYearBool.val(true)}if(!r.byyearday||(r.byyearday&&r.byyearday.length==0)){t.repeatDayOfWeekMonth.val(r.bymonth[0]);t.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}t.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}t.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break}};b(e)}});a.jqx.scheduler.column=function(b,c){this.owner=b;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="center";this.cellsalign="center";this.width="auto";this.minwidth=60;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(d,e){if(this[d]){var f=this[d];this[d]=e;this.owner._columnPropertyChanged(this,d,e,f)}else{if(this[d.toLowerCase()]){var f=this[d.toLowerCase()];this[d.toLowerCase()]=e;this.owner._columnPropertyChanged(this,d.toLowerCase(),e,f)}}};this._initfields=function(e){if(e!=null){var d=this;if(a.jqx.hasProperty(e,"dataField")){this.datafield=a.jqx.get(e,"dataField")}if(a.jqx.hasProperty(e,"displayField")){this.displayfield=a.jqx.get(e,"displayField")}else{this.displayfield=this.datafield}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"validation")){this.validation=a.jqx.get(e,"validation")}if(a.jqx.hasProperty(e,"autoCellHeight")){this.autoCellHeight=a.jqx.get(e,"autoCellHeight")}if(a.jqx.hasProperty(e,"text")){this.text=a.jqx.get(e,"text")}else{this.text=this.displayfield}if(a.jqx.hasProperty(e,"sortable")){this.sortable=a.jqx.get(e,"sortable")}if(a.jqx.hasProperty(e,"hidden")){this.hidden=a.jqx.get(e,"hidden")}if(a.jqx.hasProperty(e,"groupable")){this.groupable=a.jqx.get(e,"groupable")}if(a.jqx.hasProperty(e,"renderer")){this.renderer=a.jqx.get(e,"renderer")}if(a.jqx.hasProperty(e,"align")){this.align=a.jqx.get(e,"align")}if(a.jqx.hasProperty(e,"cellsAlign")){this.cellsalign=a.jqx.get(e,"cellsAlign")}if(a.jqx.hasProperty(e,"cellsFormat")){this.cellsFormat=a.jqx.get(e,"cellsFormat")}if(a.jqx.hasProperty(e,"width")){this.width=a.jqx.get(e,"width")}if(a.jqx.hasProperty(e,"minWidth")){this.minwidth=a.jqx.get(e,"minWidth")}if(a.jqx.hasProperty(e,"maxWidth")){this.maxwidth=a.jqx.get(e,"maxWidth")}if(a.jqx.hasProperty(e,"cellsRenderer")){this.cellsRenderer=a.jqx.get(e,"cellsRenderer")}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"pinned")){this.pinned=a.jqx.get(e,"pinned")}if(a.jqx.hasProperty(e,"filterable")){this.filterable=a.jqx.get(e,"filterable")}if(a.jqx.hasProperty(e,"filter")){this.filter=a.jqx.get(e,"filter")}if(a.jqx.hasProperty(e,"resizable")){this.resizable=a.jqx.get(e,"resizable")}if(a.jqx.hasProperty(e,"draggable")){this.draggable=a.jqx.get(e,"draggable")}if(a.jqx.hasProperty(e,"editable")){this.editable=a.jqx.get(e,"editable")}if(a.jqx.hasProperty(e,"initEditor")){this.initeditor=a.jqx.get(e,"initEditor")}if(a.jqx.hasProperty(e,"createEditor")){this.createeditor=a.jqx.get(e,"createEditor")}if(a.jqx.hasProperty(e,"destroyEditor")){this.destroyeditor=a.jqx.get(e,"destroyEditor")}if(a.jqx.hasProperty(e,"getEditorValue")){this.geteditorvalue=a.jqx.get(e,"getEditorValue")}if(a.jqx.hasProperty(e,"className")){this.classname=a.jqx.get(e,"className")}if(a.jqx.hasProperty(e,"cellClassName")){this.cellclassname=a.jqx.get(e,"cellClassName")}if(a.jqx.hasProperty(e,"rendered")){this.rendered=a.jqx.get(e,"rendered")}if(a.jqx.hasProperty(e,"exportable")){this.exportable=a.jqx.get(e,"exportable")}if(a.jqx.hasProperty(e,"nullable")){this.nullable=a.jqx.get(e,"nullable")}if(a.jqx.hasProperty(e,"columnGroup")){this.columngroup=a.jqx.get(e,"columnGroup")}if(!e instanceof String&&!(typeof e=="string")){for(var f in e){if(!d.hasOwnProperty(f)){if(!d.hasOwnProperty(f.toLowerCase())){b.host.remove();throw new Error("jqxScheduler: Invalid property name - "+f+".")}}}}}};this._initfields(c);return this};a.jqx.schedulerDataCollection=function(b){this.records=new Array();this.owner=b;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(d,c){this.records[d]=c};this.isempty=function(c){if(this.records[c]==undefined){return true}return false};this.initialize=function(c){if(c<1){c=1}this.records[c-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(c){return this.records.indexOf(c)};this.add=function(c){if(c==null){return false}this.records[this.records.length]=c;return true};this.insertAt=function(d,c){if(d==null||d==undefined){return false}if(c==null){return false}if(d>=0){if(dc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(a.jqx.dataFormat.isNumber(d)&&a.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(a.jqx.dataFormat.isDate(d)&&a.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(d)&&!a.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(l){if(this.scheduler.serverProcessing){return l}var c=new Array();if(this.filters.length){var f=new Array();var k=function(o,s){for(var q=0;q0)){var j=new Array();var g=function(n,o){for(var m=0;m0){g(p,p.records)}}};g(null,l);k.call(this,j,c);for(var d=0;d0){return a(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=a(d).attr(j);if(c!=null&&c.toString().length>0){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.scheduler.appointmentsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.scheduler.appointmentsByKey["jqx"+f];if(!g){var g=this.scheduler.appointmentsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); +(function(a){if(!a.jqx.scheduler){a.jqx.scheduler={}}a.jqx.scheduler.utilities={weekDays:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},guid:function(){function b(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return b()+b()},areWeekDaysIncluded:function(d,c){var b=false;a.each(d,function(e,f){if(f===c){b=true;return false}});return b},getStartOfDay:function(c){var b=new a.jqx.date(c.year(),c.month(),c.day(),0,0,0);b.timeZone=c.timeZone;return b},getEndOfDay:function(c){var b=new a.jqx.date(c.year(),c.month(),c.day(),23,59,59);b.timeZone=c.timeZone;return b},getDaysCount:function(d,c){var b=1;while(d=g&&dg){return true}if(g==d||c==b){return true}if(gd&&cb){return true}}else{if(b>g&&bc){return true}}return false},rangeContains:function(e,d,c,b){return(e<=c&&b<=d)},monthDays:[31,28,31,30,31,30,31,31,30,31,30,31],msPerDay:1000*60*60*24,maxYear:9999,ORDINAL_BASE:new Date(1970,0,1),getYearDay:function(b){var c=new Date(b.getFullYear(),b.getMonth(),b.getDate());return Math.ceil((c-new Date(b.getFullYear(),0,1))/a.jqx.scheduler.utilities.msPerDay)+1},isLeapYear:function(b){if(b instanceof Date){b=b.getFullYear()}return((b%4===0)&&(b%100!==0))||(b%400===0)},tzOffset:function(b){return b.getTimezoneOffset()*60*1000},monthRange:function(c,d){var b=new Date(c,d,1);return[a.jqx.scheduler.utilities.getWeekday(b),a.jqx.scheduler.utilities.getMonthDays(b)]},getMonthDays:function(b){var c=b.getMonth();return c==1&&a.jqx.scheduler.utilities.isLeapYear(b)?29:a.jqx.scheduler.utilities.monthDays[c]},getWeekday:function(b){var c=[6,0,1,2,3,4,5];return c[b.getDay()]},combine:function(b,c){c=c||b;return new Date(b.getFullYear(),b.getMonth(),b.getDate(),c.getHours(),c.getMinutes(),c.getSeconds())},sort:function(b){b.sort(function(d,c){return d.getTime()-c.getTime()})},timeToUntilString:function(e){var c=new Date(e);var b,f=[c.getUTCFullYear(),c.getUTCMonth()+1,c.getUTCDate(),"T",c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),"Z"];for(var d=0;d75){k+=l.substr(0,75)+"\n";l=" "+l.substr(75)}k+=l;return k};var g=function(k){return(k<10?"0":"")+k};var j=function(l,k){return(!l?"":(!k?""+l.getFullYear()+"-"+g(l.getMonth()+1)+"-"+g(l.getDate())+"T"+g(l.getHours())+":"+g(l.getMinutes())+":"+g(l.getSeconds())+"Z":""+l.getUTCFullYear()+"-"+g(l.getUTCMonth()+1)+"-"+g(l.getUTCDate())+"T"+g(l.getUTCHours())+":"+g(l.getUTCMinutes())+":"+g(l.getUTCSeconds())+"Z"))};var f=function(){var k="";for(var l=0;l0){i.recurrenceException=f()}else{i.recurrenceException=""}i.dtstamp=j(new Date(),h);return JSON.stringify(i)};c.toString=function(i){var f=function(l){var k="";while(l.length>75){k+=l.substr(0,75)+"\n";l=" "+l.substr(75)}k+=l;return k};var h=function(k){return(k<10?"0":"")+k};var j=function(l,k){return(!l?"":(k?""+l.getFullYear()+h(l.getMonth()+1)+h(l.getDate())+"T"+h(l.getHours())+h(l.getMinutes())+h(l.getSeconds()):""+l.getUTCFullYear()+h(l.getUTCMonth()+1)+h(l.getUTCDate())+"T"+h(l.getUTCHours())+h(l.getUTCMinutes())+h(l.getUTCSeconds())+"Z"))};var g=function(){var k="";for(var l=0;l0?"EXDATE:"+g()+"\n":"")+(c.subject?f("SUMMARY:"+c.subject)+"\n":"")+"TRANSP:OPAQUE\n"+(c.status?f("STATUS:"+e)+"\n":"")+(c.description?f("DESCRIPTION:"+c.description)+"\n":"")+(c.location?f("LOCATION:"+c.location)+"\n":"")+"END:VEVENT"};c.range=function(){if(!c.allDay){return{from:c.from,to:c.to}}else{return{from:a.jqx.scheduler.utilities.getStartOfDay(c.from),to:a.jqx.scheduler.utilities.getEndOfDay(c.to)}}};c.clearRecurrence=function(){if(c.recurrencePattern){c.exceptions=new Array();c.exceptionDates=new Array();c.recurrencePattern=null;c.recurrenceException=new Array();c.hidden=false}};c.isAllDayAppointment=function(){return this.duration().days()>=1||this.allDay};c.cloneAppointmentAttributes=function(e){e.subject=c.subject;e.description=c.description;e.location=c.location;e.tooltip=c.tooltip;e.resourceId=c.resourceId;e.category=c.category;e.status=c.status;e.rootAppointment=c;e.color=c.color;e.borderColor=c.borderColor;e.background=c.background;e.hidden=c.hidden;e.timezone=c.timeZone;e.style=c.style;e.hiddenByResourceId=c.hiddenByResourceId};c.createOccurrence=function(g){if(g==null){return null}var f=new a.jqx.scheduler.appointment();f.allDay=c.allDay;var e=c.duration();if(c.allDay){e=new a.jqx.timeSpan(10000*(c.to-c.from))}f.from=g;f.to=g.add(e);f.occurrenceFrom=g.clone();f.subject=c.subject;f.description=c.description;f.location=c.location;f.tooltip=c.tooltip;f.resourceId=c.resourceId;f.category=c.category;f.status=c.status;f.rootAppointment=c;f.color=c.color;f.draggable=c.draggable;f.resizable=c.resizable;f.borderColor=c.borderColor;f.background=c.background;f.recurrentAppointment=true;f.timeZone=c.timeZone;f.style=c.style;f.hiddenByResourceId=c.hiddenByResourceId;f.boundAppointment=c.boundAppointment;if(c.hiddenByResourceId){f.hidden=true}f.id=c.id+"."+a.jqx.scheduler.utilities.guid();c.hidden=true;c.occurrenceIndex++;return f};c.clone=function(){var e=new a.jqx.scheduler.appointment();e.allDay=c.allDay;e.from=c.from.clone();e.to=c.to.clone();e.subject=c.subject;e.description=c.description;e.location=c.location;e.tooltip=c.tooltip;e.resourceId=c.resourceId;e.category=c.category;e.status=c.status;e.color=c.color;e.borderColor=c.borderColor;e.background=c.background;e.style=c.style;e.timeZone=c.timeZone;e.hiddenByResourceId=c.hiddenByResourceId;if(c.hiddenByResourceId){e.hidden=true}e.id=c.id+"."+a.jqx.scheduler.utilities.guid();return e};c.isRecurrentAppointment=function(){return c.recurrentAppointment||c.recurrencePattern!=null};c.anyExceptions=function(){return c.exceptions!=null&&c.exceptions.length>0};c.anyOccurrences=function(){return c.occurrenceEnumerator!=null&&c.occurrenceEnumerator.getNextAppointment()};c.isException=function(){var g=c.rootAppointment||this;if(!g.recurrenceException){return false}for(var f=0;f=k)||(b.to=k)){b.currentTime=null;return true}if(a.jqx.scheduler.utilities.getEndOfDay(h.to).addDays(f)h.count){return false}return true}return false};b.getCanSetTime=function(c,e,d){if(!c.canCreateNewOccurence(e,b.calendar)){d=false}if(e0){b.recurrentAppointment=arguments[0];if(arguments[1]){b.calendar=arguments[1]}if(arguments[2]){b.from=arguments[2]}if(arguments[3]){b.to=arguments[3]}if(arguments[4]){b.scheduler=arguments[4]}if(arguments[2]===undefined){b.from=new a.jqx.date(0);b.to=new a.jqx.date(9999,12,31)}if(b.scheduler&&b.scheduler.localization){b.calendar.firstDay=b.scheduler.localization.firstDay}b.fillList()}return b};a.jqx.scheduler.recurrencePattern=function(){var c=this;var b={from:new a.jqx.date(0),to:new a.jqx.date(9999,12,31),count:1000,interval:1,exceptions:new Array(),newExceptions:new Array(),month:1,day:1,current:0,currentYearDay:0,step:0,days:[],bynweekday:[],isEveryWeekDay:true,timeZone:null,weekDays:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},freq:"daily",bymonth:null,bymonthday:null,byyearday:null,byweekno:null,byweekday:null};a.extend(true,c,b);c.getNewOccurenceDate=function(){var o=function(n,C){var k=0,D=[];if(n instanceof Array){for(;k0){var g=new a.jqx.date(c.from.year(),c.from.month(),1,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addMonths(c.step*c.interval);q(g.year());var B=g.month();var f=[c.mrange.slice(B-1,B+1)][0];var h=f[0];var m=f[1];m-=1;c.nwdaymask=o(0,c.yearlen);c.step++;for(var y=0;y0){var g=new a.jqx.date(c.from.year(),c.from.month(),c.bymonthday[c.current],c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addMonths(c.step*c.interval);c.current++;if(!c.bymonthday[c.current]){c.current=0;c.step++}}else{var g=new a.jqx.date(c.from.year(),c.from.month(),c.day,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addMonths(c.step*c.interval);c.step++}}return g;case"yearly":if(c.bymonth&&c.bymonth.length>0){if(c.bynweekday.length>0){var g=new a.jqx.date(c.from.year(),c.bymonth[c.current],1,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);q(g.year());var B=g.month();var f=[c.mrange.slice(B-1,B+1)][0];var h=f[0];var m=f[1];m-=1;c.nwdaymask=o(0,c.yearlen);for(var y=0;y0){var g=new a.jqx.date(c.from.year(),c.bymonth[c.current],c.byyearday[c.currentYearDay],c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.currentYearDay++;if(!c.byyearday[c.currentYearDay]){c.currentYearDay=0;c.current++;if(!c.bymonth[c.current]){c.current=0;c.step++}}}else{var g=new a.jqx.date(c.from.year(),c.bymonth[c.current],c.from.day(),c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.current++;if(!c.bymonth[c.current]){c.current=0;c.step++}}}}else{if(c.byyearday&&c.byyearday.length>0){var g=new a.jqx.date(c.from.year(),c.from.month(),c.byyearday[c.current],c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.current++;if(!c.byyearday[c.current]){c.current=0;c.step++}}else{if(c.byweekno!=null){var p=function(n,k){var i=1;var C=new a.jqx.date(k.year(),1,1,k.hour(),k.minute(),k.second());C.timeZone=c.timeZone;while(i!=n){C=C.addDays(7);i++;if(i>53){break}}while(a.jqx.scheduler.utilities.getWeekday(C.toDate())!=c.wkst){C=C.addDays(1)}return C};var g=c.from.addYears(c.step*c.interval);g=p(c.byweekno[c.current],g);if(c.byweekday){var e=g;for(var z=0;z<7;z++){if(j[e.dayOfWeek()]===c.byweekday[c.currentYearDay]){break}e=e.addDays(1)}g=e;c.currentYearDay++;if(!c.byweekday[c.currentYearDay]){c.currentYearDay=0;c.current++;if(!c.byweekno[c.current]){c.current=0;c.step++}}}else{c.current++;if(!c.byweekno[c.current]){c.current=0;c.step++}}}else{var g=new a.jqx.date(c.from.year(),c.month,c.day,c.from.hour(),c.from.minute(),c.from.second());g.timeZone=c.timeZone;g=g.addYears(c.step*c.interval);c.step++}}}return g}};c.isDateInExceptionAppointment=function(d,e,f){switch(c.freq){case"daily":case"weekly":default:return d.year()==f.from.year()&&d.dayOfYear()==f.from.dayOfYear()}};c.createNewPattern=function(){if(c.ical){var d=new a.jqx.scheduler.recurrencePattern(c.ical);return d}else{var d=new a.jqx.scheduler.recurrencePattern();d.from=c.from;d.to=c.to;d.count=c.count;d.interval=c.interval;d.exceptions=c.exceptions;d.newExceptions=c.newExceptions;d.weekDays=c.weekDays;d.isEveryWeekDay=c.isEveryWeekDay;d.month=c.month;d.day=c.day;d.current=c.current;d.currentYearDay=c.currentYearDay;d.step=c.step;d.days=c.days;d.bynweekday=c.bynweekday;d.bymonth=c.bymonth;d.bymonthday=c.bymonthday;d.byyearday=c.byyearday;d.byweekno=c.byweekno;d.byweekday=c.byweekday;d.freq=d.freq;d.timeZone=d.timeZone;return d}};c.equals=function(e){var d=c.from==e.from&&c.to==e.to&&c.count===e.count&&c.interval===e.interval&&c.day===e.day&&c.month===e.month;return d};c.isDayOfWeekIncluded=function(e){var d=e.dayOfWeek();return a.jqx.scheduler.utilities.areWeekDaysIncluded(c.weekDays,d)};c.getWeekIndexFromDate=function(g,f){var e=f.firstDay;var h=a.jqx.scheduler.utilities.getStartOfWeek(c.from,f,e);var d=new a.jqx.timeSpan(g.subtract(h));return parseInt(d.days()/7)};c.canCreateNewOccurence=function(e,g){var d=e.toDate();switch(c.freq){case"daily":default:if(c.bymonth){if(c.bymonth.indexOf(e.month())==-1){return false}}if(c.isEveryWeekDay){if(!c.isDayOfWeekIncluded(e,g)){return false}else{return true}}else{return true}break;case"weekly":var f=c.getWeekIndexFromDate(e,g);if(c.bymonth){if(c.bymonth.indexOf(e.month())==-1){return false}}if((f%c.interval)!=0){return false}if(c.weekDays=={}){var h=e;if(c.from.dayOfWeek()!=h.dayOfWeek()){return false}}else{if(!c.isDayOfWeekIncluded(e,g)){return false}}break;case"monthly":case"yearly":if(c.bymonth){if(c.bymonth.indexOf(e.month())==-1){return false}}if(e0){c.month=c.bymonth[0]}else{c.month=c.from.month()}c.day=c.from.day();if(f.byweekday!=undefined){var h={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};c.weekDays={};for(var g=0;g0?"+":"")+String(i.n)+v}return v};this.getJsWeekday=function(){return i.weekday==6?0:i.weekday+1}};this.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"];this.YEARLY=0;this.MONTHLY=1;this.WEEKLY=2;this.DAILY=3;this.HOURLY=4;this.MINUTELY=5;this.SECONDLY=6;this.MO=new f(0);this.TU=new f(1);this.WE=new f(2);this.TH=new f(3);this.FR=new f(4);this.SA=new f(5);this.SU=new f(6);var d={freq:null,dtstart:null,interval:1,wkst:D.MO,count:null,until:null,bysetpos:null,bymonth:null,bymonthday:null,byyearday:null,byweekno:null,byweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null};this._string=null;this.toString=function(){var aa=this.origOptions;var Y,Z,V,W,U,k=[];Z=Object.keys(aa);V=Object.keys(d);for(var R=0;R>>0;if(typeof V!=="function"){throw new TypeError(V+" is not a function")}if(arguments.length>1){R=j}v=0;while(v0){Q.push(H)}else{if(H<0){I.push(H)}}}x.bymonthday=Q;x.bynmonthday=I}else{if(x.bymonthday<0){x.bynmonthday=[x.bymonthday];x.bymonthday=[]}else{x.bynmonthday=[];x.bymonthday=[x.bymonthday]}}}if(x.byweekno!==null&&!(x.byweekno instanceof Array)){x.byweekno=[x.byweekno]}if(x.byweekday===null){x.bynweekday=null}else{if(typeof x.byweekday=="number"){x.byweekday=[x.byweekday];x.bynweekday=null}else{if(x.byweekday instanceof f){if(!x.byweekday.n||x.freq>this.MONTHLY){x.byweekday=[x.byweekday.weekday];x.bynweekday=null}else{x.bynweekday=[[x.byweekday.weekday,x.byweekday.n]];x.byweekday=null}}else{var r=[],F=[];for(N=0;Nthis.MONTHLY){r.push(o.weekday)}else{F.push([o.weekday,o.n])}}}x.byweekday=C(r)?r:null;x.bynweekday=C(F)?F:null}}}if(x.byhour===null){x.byhour=(x.freq=this.HOURLY){this.timeset=null}else{this.timeset=[];if(x.byhour){for(N=0;N1&&C&&q.resourcesInMultipleICSFiles){var t=this.getAppointments();for(var E=0;E>16,d=h>>8&255,j=h&255;return"#"+(16777216+(Math.round((c-e)*i)+e)*65536+(Math.round((c-d)*i)+d)*256+(Math.round((c-j)*i)+j)).toString(16).slice(1)},hexToRgba:function(c,e){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(c);var d=function(){var f=a.jqx.browser.msie&&a.jqx.browser.version<10;if(this.alpha==undefined||f){return"rgb("+this.r+", "+this.g+", "+this.b+")"}if(this.alpha>1){this.alpha=1}else{if(this.alpha<0){this.alpha=0}}return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"};if(e==undefined){return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16),toString:d}:null}if(e>1){e=1}else{if(e<0){e=0}}return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16),alpha:e,toString:d}:null},getAppointmentColors:function(f){var e="";var d="";var c="";e=this.hexToRgba(f,this.appointmentOpacity).toString();d=f;var b=function(h){var g=105;var i=(h.r*0.299)+(h.g*0.587)+(h.b*0.114);var j=(255-ib.length-1){var j=parseInt(i.substring(6));if(j>=27){j=0}b=b.concat(this.colorSchemes[j].colors);j++}c=b[g];c=this.hexToRgba(b[g],this.appointmentOpacity).toString();e=b[g];var h=function(l){var k=105;var m=(l.r*0.299)+(l.g*0.587)+(l.b*0.114);var n=(255-m');this.columnsheader.children().remove();var b=this.columnsHeight;b=this._preparecolumnGroups();this.columnsheader.height(b);this._rendercolumnheaders()},_refreshColumnTitles:function(){var p=this._views[this._view].type;var o=this._views[this._view];var l=this;var d=new Array();if(l.columns.records[0].timeColumn){d.push({})}if(o.timeRuler&&o.timeRuler.timeZones){for(var v=0;v23){z=0}if(J>23){J=23}K=J-z+1}var D=60;var H=2;if(B){switch(B){case"sixtyMinutes":case"hour":H=1;break;case"thirdyMinutes":case"halfHour":H=2;break;case"fifteenMinutes":case"quarterHour":H=4;break;case"tenMinutes":H=6;break;case"fiveMinutes":H=12;break}}var M=new Array();var L="auto";if(o.timeRuler&&o.timeRuler.formatString){L=o.timeRuler.formatString}var y=z;var E=K;var j=A.addHours(y);if(l.rtl){var j=A.addHours(J)}for(var F=0;F");i.append(b);var j=a("
    "+h.schedulerLocalization.editDialogRepeatString+"
    ").appendTo(b);var l=a("
    ").appendTo(b);var k=a("
    ").appendTo(l);var r=a("
    ");i.append(r);var m=a("
    ");r.append(m);var o=function(H,A){var u=a("
    ").appendTo(H);var E=a("
    "+h.schedulerLocalization.editDialogRepeatEndString+"
    ").appendTo(u);var D=a("
    ").appendTo(u);var G=a("
    "+h.schedulerLocalization.editDialogRepeatNeverString+"
    ").appendTo(D);G.jqxRadioButton({rtl:h.rtl,groupName:"end"+A,theme:h.theme,width:200,checked:true});h.editDialogFields[A].repeatEndNever=G;h.editDialogFields[A].repeatEndNeverLabel=E;var z=a("
    ").appendTo(u);var y=a("
    ").appendTo(u);var F=a("
    "+h.schedulerLocalization.editDialogRepeatAfterString+"
    ").appendTo(y);F.jqxRadioButton({rtl:h.rtl,groupName:"end"+A,theme:h.theme,width:60,checked:false});var B=a("
    ").appendTo(y);B.jqxNumberInput({rtl:h.rtl,decimal:10,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var v=a("
    "+h.schedulerLocalization.editDialogRepeatOccurrencesString+"
    ").appendTo(y);h.editDialogFields[A].repeatEndAfter=F;h.editDialogFields[A].repeatEndAfterValue=B;h.editDialogFields[A].repeatEndAfterLabel=z;var x=a("
    ").appendTo(u);var w=a("
    ").appendTo(u);var t=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(w);t.jqxRadioButton({rtl:h.rtl,groupName:"end"+A,theme:h.theme,width:60,checked:false});var C=a("
    ").appendTo(w);C.jqxDateTimeInput({dropDownWidth:220,dropDownHeight:220,rtl:h.rtl,localization:h._getDateTimeInputLocalization(),firstDayOfWeek:h.schedulerLocalization.firstDay,todayString:h.schedulerLocalization.todayString,clearString:h.schedulerLocalization.clearString,value:c,formatString:h.editDialogDateFormatString,width:150,theme:h.theme});var s=C.jqxDateTimeInput("getInstance");h.editDialogFields[A].repeatEndOn=t;h.editDialogFields[A].repeatEndOnValue=C;h.editDialogFields[A].repeatEndOnLabel=x;return u};m.detach();h.editDialogFields.repeatEndPanel={};h.editDialogFields.repeatEndPanelContainer=m;o(m,"repeatEndPanel");var q=function(){var z=a("
    ").appendTo(a(document.body));var ad=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(z);var ay=a("
    ").appendTo(z);var am=a("
    ").appendTo(ay);am.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var V=a("
    "+h.schedulerLocalization.editDialogRepeatEveryDayString+"
    ").appendTo(ay);h.editDialogFields.daily={};h.editDialogFields.daily.repeatDayInterval=am;h.editDialogFields.daily.repeatDayLabel=ad;h.editDialogFields.daily.panel=z;z.detach();h.editDialogFields.weekly={};var E=a("
    ").appendTo(a(document.body));var ag=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(E);var t=a("
    ").appendTo(E);var at=a("
    ").appendTo(t);at.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var W=a("
    "+h.schedulerLocalization.editDialogRepeatEveryWeekString+"
    ").appendTo(t);h.editDialogFields.weekly.repeatWeekInterval=at;h.editDialogFields.weekly.repeatWeekIntervalLabel=ag;var F=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(E);var Z=a("
    ").appendTo(E);var T=a("
    ").appendTo(Z);h.editDialogFields.weekly.repeatDaysLabel=F;h.editDialogFields.weekly.repeatDays=new Array();for(var aw=0;aw<7;aw++){var P=h._getDayName(aw,"firstTwoLetters");var B=a("
    "+P+"
    ");T.append(B);var Y=aw==1?true:false;B.jqxCheckBox({rtl:h.rtl,checked:Y,width:50,theme:h.theme});h.editDialogFields.weekly.repeatDays.push(B)}h.editDialogFields.weekly.panel=E;E.detach();h.editDialogFields.monthly={};var U=a("
    ").appendTo(a(document.body));var av=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(U);var M=a("
    ").appendTo(U);var A=a("
    ").appendTo(M);A.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var ai=a("
    "+h.schedulerLocalization.editDialogRepeatEveryMonthString+"
    ").appendTo(M);h.editDialogFields.monthly.repeatMonth=A;h.editDialogFields.monthly.repeatMonthLabel=av;var an=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(U);var H=a("
    ").appendTo(U);var x=a("
    ").appendTo(H);var al=a("
    "+h.schedulerLocalization.editDialogRepeatEveryMonthDayString+"
    ").appendTo(x);al.jqxRadioButton({rtl:h.rtl,groupName:"month",width:60,checked:true,theme:h.theme});var ao=a("
    ").appendTo(x);ao.jqxNumberInput({rtl:h.rtl,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});h.editDialogFields.monthly.repeatMonthDay=ao;h.editDialogFields.monthly.repeatMonthDayBool=al;h.editDialogFields.monthly.repeatMonthDayLabel=an;var O=a("
    ").appendTo(U);var aj=a("
    ").appendTo(U);var aa=a("
    ").appendTo(aj);var G=a("
    ").appendTo(aa);G.jqxRadioButton({groupName:"month",width:25,checked:false,theme:h.theme});var L=a("
    ").appendTo(aa);var Q=new Array();Q.push(h.schedulerLocalization.editDialogRepeatFirstString);Q.push(h.schedulerLocalization.editDialogRepeatSecondString);Q.push(h.schedulerLocalization.editDialogRepeatThirdString);Q.push(h.schedulerLocalization.editDialogRepeatFourthString);Q.push(h.schedulerLocalization.editDialogRepeatLastString);L.jqxDropDownList({height:27,dropDownWidth:150,selectedIndex:0,source:Q,autoDropDownHeight:true,width:"auto",theme:h.theme});var S=a("
    ").appendTo(aa);var ac=new Array();for(var aw=0;aw<7;aw++){var P=h._getDayName(aw);ac.push(P)}S.jqxDropDownList({height:27,rtl:h.rtl,dropDownWidth:150,autoDropDownHeight:true,selectedIndex:1,source:ac,width:"auto",theme:h.theme});h.editDialogFields.monthly.repeatDayOfWeekBool=G;h.editDialogFields.monthly.repeatDayOfWeek=S;h.editDialogFields.monthly.repeatDayOfWeekLabel=O;h.editDialogFields.monthly.repeatDayOfWeekType=L;h.editDialogFields.monthly.panel=U;U.detach();h.editDialogFields.yearly={};var aq=a("
    ").appendTo(a(document.body));var R=a("
    "+h.schedulerLocalization.editDialogRepeatEveryString+"
    ").appendTo(aq);var ak=a("
    ").appendTo(aq);var ab=a("
    ").appendTo(ak);ab.jqxNumberInput({decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});var D=a("
    "+h.schedulerLocalization.editDialogRepeatEveryYearString+"
    ").appendTo(ak);h.editDialogFields.yearly.repeatYear=ab;h.editDialogFields.yearly.repeatYearLabel=R;var N=a("
    "+h.schedulerLocalization.editDialogRepeatOnString+"
    ").appendTo(aq);var ah=a("
    ").appendTo(aq);var X=a("
    ").appendTo(ah);var af=a("
    ").appendTo(X);af.jqxRadioButton({rtl:h.rtl,groupName:"year",width:25,checked:true,theme:h.theme});h.editDialogFields.yearly.repeatYearBool=af;h.editDialogFields.yearly.repeatYearBoolLabel=N;var v=a("
    ").appendTo(X);var ap=new Array();for(var aw=0;aw<12;aw++){var ax=h.schedulerLocalization.months.names[aw];ap.push(ax)}v.jqxDropDownList({height:27,selectedIndex:0,dropDownWidth:150,width:"auto",source:ap,theme:h.theme});h.editDialogFields.yearly.repeatYearMonth=v;var y=a("
    ").appendTo(X);y.jqxNumberInput({height:25,decimal:1,min:1,inputMode:"simple",width:50,spinButtons:true,decimalDigits:0,theme:h.theme});h.editDialogFields.yearly.repeatYearDay=y;var ae=a("
    ").appendTo(aq);var s=a("
    ").appendTo(aq);var ar=a("
    ").appendTo(s);var C=a("
    ").appendTo(ar);C.jqxRadioButton({rtl:h.rtl,groupName:"year",width:25,checked:false,theme:h.theme});var au=a("
    ").appendTo(ar);h.editDialogFields.yearly.repeatDayOfWeekBool=C;h.editDialogFields.yearly.repeatDayOfWeekType=au;h.editDialogFields.yearly.repeatDayOfWeekLabel=ae;var K=new Array();K.push(h.schedulerLocalization.editDialogRepeatFirstString);K.push(h.schedulerLocalization.editDialogRepeatSecondString);K.push(h.schedulerLocalization.editDialogRepeatThirdString);K.push(h.schedulerLocalization.editDialogRepeatFourthString);K.push(h.schedulerLocalization.editDialogRepeatLastString);au.jqxDropDownList({height:27,dropDownWidth:150,selectedIndex:0,source:K,autoDropDownHeight:true,width:"auto",theme:h.theme});var I=a("
    ").appendTo(ar);h.editDialogFields.yearly.repeatDayOfWeek=I;var u=new Array();for(var aw=0;aw<7;aw++){var P=h._getDayName(aw);u.push(P)}I.jqxDropDownList({height:27,rtl:h.rtl,dropDownWidth:150,selectedIndex:1,autoDropDownHeight:true,source:u,width:"auto",theme:h.theme});var ap=new Array();var J=a("
    "+h.schedulerLocalization.editDialogRepeatOfString+"
    ").appendTo(ar);var w=a("
    ").appendTo(ar);for(var aw=0;aw<12;aw++){var ax=h.schedulerLocalization.months.names[aw];ap.push(ax)}h.editDialogFields.yearly.repeatDayOfWeekMonth=w;w.jqxDropDownList({height:27,rtl:h.rtl,dropDownWidth:150,selectedIndex:0,source:ap,width:"auto",theme:h.theme});h.editDialogFields.yearly.panel=aq;aq.detach()};if(h.editAppointment&&h.editAppointment.rootAppointment){q()}else{q()}var g=a("
    ");i.append(g);var f=a("
    "+h.schedulerLocalization.editDialogExceptionsString+"
    ").appendTo(g);var e=a("
    ").appendTo(g);var d=a("
    "+h.schedulerLocalization.editDialogResetExceptionsString+"
    ").appendTo(e);d.jqxCheckBox({width:"100%",theme:h.theme});g.hide();h.editDialogFields.resetExceptions=d;h.editDialogFields.resetExceptionsLabel=f;h.editDialogFields.resetExceptionsContainer=g;var n=new Array();n.push(h.schedulerLocalization.editDialogRepeatNeverString);n.push(h.schedulerLocalization.editDialogRepeatDailyString);n.push(h.schedulerLocalization.editDialogRepeatWeeklyString);n.push(h.schedulerLocalization.editDialogRepeatMonthlyString);n.push(h.schedulerLocalization.editDialogRepeatYearlyString);k.jqxDropDownList({rtl:h.rtl,height:27,width:"100%",autoDropDownHeight:true,theme:h.theme,source:n,selectedIndex:0});h.editDialogFields.repeat=k;h.editDialogFields.repeatLabel=j;h.editDialogFields.repeatContainer=b;h.editDialogFields.repeatPanel=r;this.addHandler(k,"change",function(u){var t=u.args.item.index;var s=function(){r.children().detach();switch(t){case 0:break;case 1:h.editDialogFields.daily.panel.css("visibility","visible");r.append(h.editDialogFields.daily.panel);break;case 2:h.editDialogFields.weekly.panel.css("visibility","visible");r.append(h.editDialogFields.weekly.panel);break;case 3:h.editDialogFields.monthly.panel.css("visibility","visible");r.append(h.editDialogFields.monthly.panel);break;case 4:h.editDialogFields.yearly.panel.css("visibility","visible");r.append(h.editDialogFields.yearly.panel);break}r.append(m);if(t==0){h.editDialogFields.repeatEndPanelContainer.hide()}else{h.editDialogFields.repeatEndPanelContainer.show()}if(!h.isTouchDevice()){p.jqxWindow({height:150});p.jqxWindow({height:i[0].scrollHeight+40})}}()})},_initMenu:function(){var c=this;if(this.host.jqxMenu){if(this.menu){if(this._hasOpenedMenu){return}this.removeHandler(this.menu,"keydown");this.removeHandler(this.menu,"closed");this.removeHandler(this.menu,"itemclick");this.menu.jqxMenu("destroy");this.menu.removeData();this.menu.remove()}this.menuitemsarray=new Array();this.menu=a('');this.host.append(this.menu);this.addHandler(a(window),"orientationchange.jqxscheduler"+this.element.id,function(){c.menu.jqxMenu("close");c._hasOpenedMenu=false});this.addHandler(a(window),"orientationchanged.jqxscheduler"+this.element.id,function(){c.menu.jqxMenu("close");c._hasOpenedMenu=false});this.removeHandler(this.menu,"keydown");this.addHandler(this.menu,"keydown",function(e){if(e.keyCode==27){c.menu.jqxMenu("close");c._hasOpenedMenu=false;c.focus()}});this.addHandler(this.menu,"open",function(e){if(c.contextMenuOpen){c.contextMenuOpen(c.menu,c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null,e)}c._raiseEvent("contextMenuOpen",{menu:c.menu,appointment:c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null});c._removeFeedbackAndStopResize()});this.addHandler(this.menu,"close",function(e){if(c.contextMenuClose){c.contextMenuClose(c.menu,c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null,e)}c._hasOpenedMenu=false;if(document.activeElement&&document.activeElement.className.indexOf("jqx-menu")>=0&&!c.menuOpening){c.focus()}c._raiseEvent("contextMenuClose",{menu:c.menu,appointment:c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null})});this.addHandler(this.host,"contextmenu",function(e){e.preventDefault();e.stopPropagation();return false});this.addHandler(this.menu,"itemclick",function(h){var g=c.menu.jqxMenu("getItem",h.args.id);c._raiseEvent("contextMenuItemClick",{item:g,menu:c.menu,appointment:c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null});if(c.contextMenuItemClick){var f=c.contextMenuItemClick(c.menu,c.selectedJQXAppointment?c.selectedJQXAppointment.boundAppointment:null,h);if(f==true){if(new Date()-c.renderedTime>500){c._renderrows()}c.menu.jqxMenu("close");c._hasOpenedMenu=false;return}}if(g.id=="createAppointment"){c._initDialog();c._openDialog();if(h.args.clickType=="keyboard"){c.menu.jqxMenu("close");c._hasOpenedMenu=false}}else{if(g.id=="editAppointment"){var e=c.getJQXAppointmentByElement(c.selectedAppointment);if(!e.readOnly){var f=c._initDialog(e);if(f!==false){c._openDialog()}}if(h.args.clickType=="keyboard"){c.menu.jqxMenu("close");c._hasOpenedMenu=false}}else{if(h.args.clickType=="keyboard"){c.menu.jqxMenu("close");c._hasOpenedMenu=false}return true}}});var d=new Array();d.push({label:this.schedulerLocalization.contextMenuEditAppointmentString,id:"editAppointment"});d.push({label:this.schedulerLocalization.contextMenuCreateAppointmentString,id:"createAppointment"});var b={rtl:this.rtl,keyboardNavigation:true,source:d,popupZIndex:999999,autoOpenPopup:false,mode:"popup",theme:this.theme,animationShowDuration:0,animationHideDuration:0,animationShowDelay:0};if(c.contextMenuCreate){c.contextMenuCreate(c.menu,b)}c._raiseEvent("contextMenuCreate",{menu:c.menu,settings:b});this.menu.jqxMenu(b)}},_initDialog:function(b,c){var m=this;var k=null;if(b&&b.isRecurrentAppointment()&&!m.editRecurrenceDialog.jqxWindow("isOpen")){var l=m.host.coord();var o=l.top+m.host.height()/2-m.editRecurrenceDialog.height()/2;var g=l.left+m.host.width()/2-m.editRecurrenceDialog.width()/2;m.editRecurrenceDialog.find("button:first").focus();setTimeout(function(){m.editRecurrenceDialog.find("button:first").focus()},25);m.editRecurrenceDialog.jqxWindow("move",g,o);m.editRecurrenceDialog.jqxWindow("open");m.editSeries=function(i){if(i){m._initDialog(b.rootAppointment);m._openDialog()}else{m._initDialog(b);m._openDialog()}};m.overlay.show();m.overlay.width(m.host.width());m.overlay.height(m.host.height());var l=m.host.coord();m.overlay.offset(l);if(!m._editDialog){m._initDialog()}return false}m.editAppointment=b;if(!b){k=m.getSelection();if(!k){m.focus();if(!m.focusedCell){m._updateFocusedCell()}if(m.focusedCell){m.focusedCell.setAttribute("data-selected","true");m._lastSelectedCell=m.focusedCell;m._updateCellsSelection(m.focusedCell);k=m.getSelection()}}}if(k||b){var d=k?k.from:b.from;var h=k?k.to:b.to;var n=m.getSelectedCells();if(n.length>0){var f=n[n.length-1].getAttribute("data-end-date");if(f){h=a.jqx.scheduler.utilities.getEndOfDay(h)}}m._editStart=d;m._editEnd=h}if(m.editDialogFields&&m.editDialogFields.resourceContainer&&m._resources.length>0){var e=new Array();for(var j=0;j10){r=false}m.editDialogFields.resource.jqxDropDownList({source:e,selectedIndex:0,autoDropDownHeight:r});if(!b){m.editDialogFields.resource.val(k.resourceId)}}if(m.editDialogFields&&m.editDialogFields.repeatContainer){if(b&&b.rootAppointment){m.editDialogFields.repeatContainer.hide();m.editDialogFields.repeatPanel.hide()}else{m.editDialogFields.repeatContainer.show();m.editDialogFields.repeatPanel.show()}}if(m._editDialog==null){m._editDialog=null;var p=b==null?m.schedulerLocalization.editDialogCreateTitleString:m.schedulerLocalization.editDialogTitleString;var q=a("
    "+p+"
    ");a(q).jqxWindow({rtl:m.rtl,autoFocus:false,autoOpen:false,animationType:"none",theme:m.theme,width:540,maxHeight:800,minHeight:110,resizable:false,initContent:function(){m.editDialogFields={};if(d==null&&h==null&&m._editStart&&m._editEnd){d=m._editStart;h=m._editEnd}q.jqxWindow("setTitle",p);var H=a(q.children()[1]);var A=a("
    ");H.append(A);var C=a("
    "+m.schedulerLocalization.editDialogSubjectString+"
    ").appendTo(A);var ad=a("
    ").appendTo(A);var U=a("").appendTo(ad);U.jqxInput({height:25,rtl:m.rtl,width:"100%",theme:m.theme});U.css("box-sizing","border-box");m.editDialogFields.subject=U;m.editDialogFields.subjectLabel=C;m.editDialogFields.subjectContainer=A;var P=a("
    ");H.append(P);var z=a("
    "+m.schedulerLocalization.editDialogLocationString+"
    ").appendTo(P);var Z=a("
    ").appendTo(P);var T=a("").appendTo(Z);T.jqxInput({height:25,rtl:m.rtl,width:"100%",theme:m.theme});T.css("box-sizing","border-box");m.editDialogFields.location=T;m.editDialogFields.locationLabel=z;m.editDialogFields.locationContainer=P;var L=a("
    ");H.append(L);var X=a("
    "+m.schedulerLocalization.editDialogFromString+"
    ").appendTo(L);var av=a("
    ").appendTo(L);var aq=a("
    ").appendTo(av);var V=null;if(!d){var ay=new Date();ay.setHours(9,0,0);V=ay;d=new a.jqx.date(ay)}else{V=d.toDate()}aq.jqxDateTimeInput({height:27,dropDownWidth:220,dropDownHeight:220,rtl:m.rtl,localization:m._getDateTimeInputLocalization(),firstDayOfWeek:m.schedulerLocalization.firstDay,todayString:m.schedulerLocalization.todayString,clearString:m.schedulerLocalization.clearString,value:V,formatString:m.editDialogDateTimeFormatString,width:"100%",showTimeButton:true,theme:m.theme});m.editDialogFields.from=aq;m.editDialogFields.fromLabel=X;m.editDialogFields.fromContainer=L;var aC=a("
    ");H.append(aC);var y=a("
    "+m.schedulerLocalization.editDialogToString+"
    ").appendTo(aC);var Y=a("
    ").appendTo(aC);var S=a("
    ").appendTo(Y);var x=null;if(!h){var ay=new Date();ay.setHours(10,0,0);x=ay;h=new a.jqx.date(ay)}else{x=h.toDate()}S.jqxDateTimeInput({height:27,dropDownWidth:220,dropDownHeight:220,rtl:m.rtl,localization:m._getDateTimeInputLocalization(),firstDayOfWeek:m.schedulerLocalization.firstDay,todayString:m.schedulerLocalization.todayString,clearString:m.schedulerLocalization.clearString,value:x,formatString:m.editDialogDateTimeFormatString,width:"100%",showTimeButton:true,theme:m.theme});m.editDialogFields.to=S;m.editDialogFields.toLabel=y;m.editDialogFields.toContainer=aC;m._changeFromUser=true;m.addHandler(aq,"change",function(aH){if(!m._changeFromUser){return}var aF=aH.args;var aK=aH.args.oldValue;var aJ=S.val("date");var aE=new a.jqx.date(aJ)-new a.jqx.date(aK);if(aE>0){var aG=aE*10000;var aI=a.jqx.timeSpan(aG);var i=new a.jqx.date(aH.args.newValue).add(aI);S.val(i.toDate())}});m.addHandler(S,"change",function(aE){if(!m._changeFromUser){return}var i=aE.args;var aG=aE.args.oldValue;var aF=S.val("date");if(aq.val("date")>=aF){S.val(aG)}});var t=a("
    ");H.append(t);var R=a("
    "+m.schedulerLocalization.editDialogAllDayString+"
    ").appendTo(t);var ar=a("
    ").appendTo(t);var ai=a("
    ").appendTo(ar);ai.jqxCheckBox({rtl:m.rtl,width:25,theme:m.theme});m.editDialogFields.allDay=ai;m.editDialogFields.allDayLabel=R;m.editDialogFields.allDayContainer=t;m.addHandler(t,"change",function(i){if(i.args.checked){S.jqxDateTimeInput({showTimeButton:false,formatString:m.editDialogDateFormatString});aq.jqxDateTimeInput({showTimeButton:false,formatString:m.editDialogDateFormatString})}else{S.jqxDateTimeInput({showTimeButton:true,formatString:m.editDialogDateTimeFormatString});aq.jqxDateTimeInput({showTimeButton:true,formatString:m.editDialogDateTimeFormatString})}});if(a.jqx.scheduler.utilities.getStartOfDay(d).equals(d)&&a.jqx.scheduler.utilities.getEndOfDay(h).equals(h)){m.editDialogFields.allDay.val(true)}if(m._views[m._view].type.indexOf("month")>=0||(d&&d.equals(h))||(h&&h.equals(a.jqx.scheduler.utilities.getEndOfDay(h))&&d&&d.equals(a.jqx.scheduler.utilities.getStartOfDay(d)))){m.editDialogFields.allDay.val(true)}var w=a("
    ");H.append(w);var W=a("
    "+m.schedulerLocalization.editDialogTimeZoneString+"
    ").appendTo(w);var at=a("
    ").appendTo(w);var ao=a("
    ").appendTo(at);var u=new Array();u.push({displayName:m.schedulerLocalization.editDialogSelectTimeZoneString,id:null});u=u.concat(m.timeZones);for(var aw=0;aw=0){var af=au.displayName.substring(2+G)}else{var af=au.displayName}au.searchName=af}ao.jqxDropDownList({height:27,rtl:m.rtl,placeHolder:m.schedulerLocalization.editDialogSelectTimeZoneString,width:"100%",theme:m.theme,searchMember:"searchName",source:u,displayMember:"displayName",valueMember:"id"});m.editDialogFields.timeZone=ao;m.editDialogFields.timeZoneLabel=W;m.editDialogFields.timeZoneContainer=w;m.initRepeatPanels(q,H,h.toDate());if(m.editDialogFields&&m.editDialogFields.repeatContainer){if(m.editAppointment&&m.editAppointment.rootAppointment){m.editDialogFields.repeatContainer.hide();m.editDialogFields.repeatPanel.hide()}else{m.editDialogFields.repeatContainer.show();m.editDialogFields.repeatPanel.show()}}var K=a("
    ");H.append(K);var aA=a("
    "+m.schedulerLocalization.editDialogDescriptionString+"
    ").appendTo(K);var O=a("
    ").appendTo(K);var D=a("").appendTo(O);D.jqxInput({rtl:m.rtl,height:40,width:"100%",theme:m.theme});D.css("box-sizing","border-box");m.editDialogFields.description=D;m.editDialogFields.descriptionLabel=aA;m.editDialogFields.descriptionContainer=K;var ac=a("
    ");H.append(ac);var aD=a("
    "+m.schedulerLocalization.editDialogColorString+"
    ").appendTo(ac);var Q=a("
    ").appendTo(ac);var F=a("
    ").appendTo(Q);var I=function(aE){if(aE==-1){return""}var i=m.colors[aE];var aF="";var aF="";aF+="
    ";return aF};var an=function(aG,aE){if(aE<0){aG.css("top","4px");aG.css("position","relative");return aG[0].outerHTML}var i=m.colors[aE];var aF="";aF+="
    ";return aF};F.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:-1,placeHolder:m.schedulerLocalization.editDialogColorPlaceHolderString,selectionRenderer:an,renderer:I,source:m.colors,width:"100%",theme:m.theme});m.editDialogFields.color=F;m.editDialogFields.colorLabel=aD;m.editDialogFields.colorContainer=ac;var ah=a("
    ");H.append(ah);var az=a("
    "+m.schedulerLocalization.editDialogStatusString+"
    ").appendTo(ah);var N=a("
    ").appendTo(ah);var B=a("
    ").appendTo(N);B.jqxDropDownList({height:27,rtl:m.rtl,selectedIndex:2,autoDropDownHeight:true,source:m.schedulerLocalization.editDialogStatuses,width:"100%",theme:m.theme});m.editDialogFields.status=B;m.editDialogFields.statusLabel=az;m.editDialogFields.statusContainer=ah;var ag=a("
    ");H.append(ag);var M=a("
    "+m.schedulerLocalization.editDialogResourceIdString+"
    ").appendTo(ag);var am=a("
    ").appendTo(ag);var ab=a("
    ").appendTo(am);var E=new Array();for(var aw=0;aw10){v=false}ab.jqxDropDownList({height:27,rtl:m.rtl,source:E,selectedIndex:0,autoDropDownHeight:v,width:"100%",theme:m.theme});m.editDialogFields.resource=ab;m.editDialogFields.resourceLabel=M;m.editDialogFields.resourceContainer=ag;if(E.length==0){ag.hide()}if(!b&&k){m.editDialogFields.resource.val(k.resourceId)}var ae=a("
    ");H.append(ae);var al=a("
    ").appendTo(ae);var ap=a("").appendTo(al);var aj=a("").appendTo(al);var ak=a("").appendTo(al);var J=a("").appendTo(al);var aa=a("").appendTo(al);var aB=a("").appendTo(al);var s=a("").appendTo(al);var ax=25;if(m.isTouchDevice()){ax=null}aj.jqxButton({rtl:m.rtl,theme:m.theme});ak.jqxButton({rtl:m.rtl,theme:m.theme});J.jqxButton({rtl:m.rtl,theme:m.theme});aa.jqxButton({rtl:m.rtl,theme:m.theme});ap.jqxButton({rtl:m.rtl,theme:m.theme});aB.jqxButton({rtl:m.rtl,theme:m.theme});s.jqxButton({rtl:m.rtl,theme:m.theme});aB.hide();s.hide();m.editDialogFields.saveOccurrenceButton=s;m.editDialogFields.saveSeriesButton=aB;m.editDialogFields.saveButton=aa;m.editDialogFields.cancelButton=ap;m.editDialogFields.deleteButton=aj;m.editDialogFields.deleteSeriesButton=ak;m.editDialogFields.deleteExceptionsButton=J;m.editDialogFields.buttons=al;m.addHandler(aj,"click",function(){q.jqxWindow("close");m.overlay.hide();m._deleteAppointment(m.editAppointment)});m.addHandler(ap,"click",function(){q.jqxWindow("close");m.overlay.hide()});m.addHandler(s,"click",function(){if(!m.editAppointment.isException()){if(m.editAppointment.rootAppointment!=null){m.editAppointment.rootAppointment.exceptions.push(m.editAppointment);m.editAppointment.rootAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}else{m.editAppointment.exceptions.push(m.editAppointment);m.editAppointment.recurrenceException.push(m.editAppointment.occurrenceFrom)}}else{var aG=m.editAppointment.rootAppointment?m.editAppointment.rootAppointment.exceptions:m.editAppointment.exceptions;for(var aF=0;aF=0){m.editDialogFields.color.val(b.borderColor)}else{m.editDialogFields.color.jqxDropDownList("clearSelection")}m.editDialogFields.allDay.val(b.allDay);m.editDialogFields.resource.val(b.resourceId);m.editDialogFields.status.val(b.status);if(b.timeZone){b.from=b.from.toTimeZone(b.timeZone);b.to=b.to.toTimeZone(b.timeZone)}d=b.from;h=b.to;if(a.jqx.scheduler.utilities.getStartOfDay(d).equals(d)&&a.jqx.scheduler.utilities.getEndOfDay(h).equals(h)){m.editDialogFields.allDay.val(true)}m._setAppointmentPropertiesToDialog(b,d,h,k?k.resourceId:null)}else{m.editDialogFields.saveButton.show();m._setAppointmentPropertiesToDialog(null,d,h,k?k.resourceId:null)}if(d&&h){m._changeFromUser=false;m.editDialogFields.from.val(d.toDate());m.editDialogFields.to.val(h.toDate());m._changeFromUser=true}if(!m.isTouchDevice()){m._editDialog.jqxWindow({height:150});m._editDialog.jqxWindow({height:a(m._editDialog.children())[1].scrollHeight+40})}}});m.removeHandler(m._editDialog,"keydown");m.addHandler(m._editDialog,"keydown",function(s){if(m.editDialogKeyDown){var i=m.editDialogKeyDown(q,m.editDialogFields,m.editAppointment,s);if(i!=undefined){return i}}if(s.keyCode==13){if(a(document.activeElement).ischildof(m._editDialog)){if(document.activeElement.nodeName.toLowerCase()=="button"){return true}if(b){if(b.isException()||b.rootAppointment){m.editDialogFields.saveOccurrenceButton.trigger("click")}else{if(b.isRecurrentAppointment()){m.editDialogFields.saveSeriesButton.trigger("click")}else{m.editDialogFields.saveButton.trigger("click")}}}else{m.editDialogFields.saveButton.trigger("click")}}}else{if(s.keyCode==27){m.editDialogFields.cancelButton.trigger("click")}}})},openMenu:function(e,c){var d=this;if(!d.menu){d._initMenu()}var b=d._views[d._view].type;if(d.contextMenu&&d.menu){if(!d.selectedAppointment){d.menu.jqxMenu("hideItem","editAppointment")}else{d.menu.jqxMenu("showItem","editAppointment")}if(arguments.length<2){if(d.selectedAppointment){var f=d.selectedAppointment.coord();e=f.left;c=f.top}else{if(d.focusedCell){var f=a(d.focusedCell).coord()}}e=f.left;c=f.top}d.menu.jqxMenu("open",e,c);d._hasOpenedMenu=true}},closeMenu:function(){var b=this;if(b.contextMenu&&b.menu){setTimeout(function(){b.menu.jqxMenu("close")})}},closeDialog:function(){var b=this;b._editDialog.jqxWindow("close")},openDialog:function(d,e){var f=this;var c=f._views[f._view].type;if(f.selectedJQXAppointment){var b=f._initDialog(f.selectedJQXAppointment);if(b!==false){f._openDialog(d,e)}}else{if(f.getSelection()==null){f.focus();f.focusedCell.setAttribute("data-selected","true");f._lastSelectedCell=f.focusedCell;f._updateCellsSelection(f.focusedCell)}f._initDialog();f._openDialog(d,e)}},_openDialog:function(d,c){var f=this;var j=f._views[f._view].type;if(!f.editDialog){return}var e=f.host.coord();f.overlay.show();f.overlay.css("z-index",9999999);f.overlay.width(f.host.width());f.overlay.height(f.host.height());f.overlay.offset(e);var g=f.isTouchDevice();if(g){f._editDialog.jqxWindow("move",e.left,e.top);f._editDialog.jqxWindow({draggable:false,maxWidth:f.host.width(),maxHeight:f.host.height()});f._editDialog.jqxWindow({width:f.host.width(),height:f.host.height()});f._editDialog.jqxWindow("open");f._editDialog.jqxWindow("move",e.left,e.top)}else{if(d!=undefined&&c!=undefined){f._editDialog.jqxWindow("move",d,c);f._editDialog.jqxWindow("open")}else{var i=f._editDialog.height();if(i<400){i=400}var h=e.top+f.host.height()/2-i/2;var b=e.left+f.host.width()/2-f._editDialog.width()/2;f._editDialog.jqxWindow("move",b,h);f._editDialog.jqxWindow("open")}}setTimeout(function(){f.overlay.css("z-index",999)},50)},_setAppointmentPropertiesFromDialog:function(c,d){var e=this;var b=function(n){var x=e._views[e._view].type;var u=e._views[e._view];var A=e.editDialogFields.from.val("date");var h=e.editDialogFields.to.val("date");if(A>h){e.editDialogFields.from.jqxDateTimeInput("focus");return false}if(A==h){if(x.indexOf("month")>=0){return true}return false}n.resourceId=e.editDialogFields.resource.val();if(e.editDialogFields.resourceContainer.css("display")=="none"){n.resourceId=""}n.description=e.editDialogFields.description.val();n.allDay=e.editDialogFields.allDay.val();n.status=e.editDialogFields.status.val();n.location=e.editDialogFields.location.val();n.timeZone=e.editDialogFields.timeZone.val();if(n.timeZone==""&&e.timeZone!=""){n.timeZone=e.timeZone}n.from=new a.jqx.date(A,n.timeZone);n.to=new a.jqx.date(h,n.timeZone);if(e.timeZone){n.from=n.from.toTimeZone(e.timeZone);n.to=n.to.toTimeZone(e.timeZone)}else{n.from=n.from.toTimeZone(null);n.to=n.to.toTimeZone(null)}if(n.allDay){n.from=a.jqx.scheduler.utilities.getStartOfDay(n.from);n.to=a.jqx.scheduler.utilities.getEndOfDay(n.to)}if(e.editDialogFields.color.val()){var v=e.getAppointmentColors(e.editDialogFields.color.val());n.color=v.color;n.background=v.background;n.borderColor=v.border}n.subject=e.editDialogFields.subject.val();var f=e.editDialogFields.repeat.jqxDropDownList("selectedIndex");var r=new a.jqx.scheduler.recurrencePattern();var j=e.editDialogFields.repeatEndPanel;r.timeZone=e.timeZone;r.from=n.from.clone();if(d=="occurrence"){if(n.rootAppointment){r.from=n.rootAppointment.from.clone()}}if(e.editDialogFields.resetExceptions.val()){n.exceptions=new Array();n.recurrenceException=new Array()}if(j.repeatEndNever.val()){r.count=1000;r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndAfter.val()){r.count=j.repeatEndAfterValue.val();r.to=new a.jqx.date(9999,12,31)}else{if(j.repeatEndOn.val()){r.count=1000;var h=new a.jqx.date(j.repeatEndOnValue.jqxDateTimeInput("getDate"),e.timeZone);r.to=h}}}switch(f){case 0:default:n.clearRecurrence();break;case 1:var k=e.editDialogFields.daily;var F=k.repeatDayInterval.val();r.interval=F;r.freq="daily";break;case 2:var w=e.editDialogFields.weekly;var F=w.repeatWeekInterval.val();var q=[{Sunday:0},{Monday:1},{Tuesday:2},{Wednesday:3},{Thursday:4},{Friday:5},{Saturday:6}];var p=w.repeatDays;var o=new Array();r.weekDays={};for(var C=0;C<7;C++){var B=p[C].val();if(B){if(C==0){o.push(6)}else{o.push(C-1)}a.extend(r.weekDays,q[C])}}r.freq="weekly";r.byweekday=o;r.interval=F;break;case 3:var D=e.editDialogFields.monthly;var F=D.repeatMonth.val();if(D.repeatMonthDayBool.val()){r.day=D.repeatMonthDay.val();r.bymonthday=new Array();r.bymonthday.push(r.day)}else{var y=D.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=D.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="monthly";r.interval=F;break;case 4:var G=e.editDialogFields.yearly;var F=G.repeatYear.val();if(G.repeatYearBool.val()){r.day=G.repeatYearDay.val();r.month=G.repeatYearMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);r.byyearday=new Array();r.byyearday.push(r.day)}else{r.month=G.repeatDayOfWeekMonth.jqxDropDownList("selectedIndex");r.bymonth=new Array();r.bymonth.push(1+r.month);var y=G.repeatDayOfWeek.jqxDropDownList("selectedIndex");var s=new Array();if(y==0){y=6}else{y--}var l=G.repeatDayOfWeekType.jqxDropDownList("selectedIndex");var E="";switch(l){case 0:E=1;break;case 1:E=2;break;case 2:E=3;break;case 3:E=4;break;case 4:E=-1;break}s.push([y,E]);r.bynweekday=s}r.freq="yearly";r.interval=F;break}if(n.rootAppointment){n.rootAppointment.recurrencePattern=r}else{if(f>0){n.recurrencePattern=r}}var m={};var t={};for(var H in e.appointmentDataFields){var g=e.appointmentDataFields[H];var z=n[H];m[H]=z;if(H=="from"||H=="to"){z=z.toDate()}t[g]=z}m.originalData=t;m.jqxAppointment=n;n.boundAppointment=m;return true}(c);return b},_setAppointmentPropertiesToDialog:function(e,h,d,g){var f=this;var c=function(){var p=f.editDialogFields.repeatEndPanel;p.repeatEndNever.jqxRadioButton({checked:true});p.repeatEndAfter.jqxRadioButton({checked:false});p.repeatEndAfterValue.val(1);p.repeatEndOnValue.val(l);var l=d.toDate();if(f.editDialogFields.daily){var j=f.editDialogFields.daily;j.repeatDayInterval.val(1)}if(f.editDialogFields.weekly){var o=f.editDialogFields.weekly;for(var m=0;m=0||(h&&h.equals(d))||(d&&d.equals(a.jqx.scheduler.utilities.getEndOfDay(d))&&h&&h.equals(a.jqx.scheduler.utilities.getStartOfDay(h)))){f.editDialogFields.allDay.val(true)}f.editDialogFields.color.jqxDropDownList("clearSelection");f.editDialogFields.description.val("");f.editDialogFields.subject.val("");f.editDialogFields.repeat.jqxDropDownList("selectIndex",0);return}var b=function(j){var r=j.recurrencePattern;if(j.rootAppointment){var r=j.rootAppointment.recurrencePattern}if(r==null){return}var k=r.freq;var p=0;if(k=="daily"){p=1}if(k=="weekly"){p=2}if(k=="monthly"){p=3}if(k=="yearly"){p=4}var n=f.editDialogFields.repeatEndPanel;if(r.count!=1000){n.repeatEndNever.jqxRadioButton({checked:false});n.repeatEndAfter.jqxRadioButton({checked:true});n.repeatEndAfterValue.val(r.count)}else{if(r.to.year()!=9999){n.repeatEndOn.jqxRadioButton({checked:true});n.repeatEndOnValue.val(r.to.toDate())}else{n.repeatEndNever.jqxRadioButton({checked:true})}}f.editDialogFields.repeat.jqxDropDownList("selectIndex",p);switch(p){case 1:var l=r.interval;var q=f.editDialogFields.daily;q.repeatDayInterval.val(l);break;case 2:var l=r.interval;var z=f.editDialogFields.weekly;z.repeatWeekInterval.val(l);var y=r.byweekday;for(var o=0;o<7;o++){var w=z.repeatDays[o];w.val(false)}for(var o=0;o0){u.repeatMonthDayBool.jqxRadioButton({checked:true});u.repeatMonthDay.val(r.day)}else{u.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}u.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}u.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break;case 4:var t=f.editDialogFields.yearly;if(r.byyearday&&r.byyearday.length>0){t.repeatYearDay.val(r.byyearday[0]);t.repeatYearBool.val(true)}if(r.bymonth&&r.bymonth.length>0){t.repeatYearMonth.jqxDropDownList("selectIndex",r.bymonth[0]-1);t.repeatYearBool.val(true)}if(!r.byyearday||(r.byyearday&&r.byyearday.length==0)){t.repeatDayOfWeekMonth.jqxDropDownList("selectIndex",r.bymonth[0]-1);t.repeatDayOfWeekBool.jqxRadioButton({checked:true});var s=r.bynweekday;var m=s[0][0];m++;if(m==7){m=0}t.repeatDayOfWeek.jqxDropDownList("selectIndex",m);var x=s[0][1];var v="";switch(x){case 1:v=0;break;case 2:v=1;break;case 3:v=2;break;case 4:v=3;break;case -1:v=4;break}t.repeatDayOfWeekType.jqxDropDownList("selectIndex",v)}break}};b(e)}});a.jqx.scheduler.column=function(b,c){this.owner=b;this.datafield=null;this.displayfield=null;this.text="";this.sortable=true;this.editable=true;this.hidden=false;this.hideable=true;this.groupable=true;this.renderer=null;this.cellsRenderer=null;this.columntype=null;this.cellsFormat="";this.align="center";this.cellsalign="center";this.width="auto";this.minwidth=60;this.maxwidth="auto";this.pinned=false;this.visibleindex=-1;this.filterable=true;this.filter=null;this.resizable=true;this.draggable=true;this.initeditor=null;this.createeditor=null;this.destroyeditor=null;this.geteditorvalue=null;this.autoCellHeight=true;this.validation=null;this.classname="";this.cellclassname="";this.rendered=null;this.exportable=true;this.nullable=true;this.columngroup=null;this.columntype="textbox";this.getcolumnproperties=function(){return{nullable:this.nullable,sortable:this.sortable,hidden:this.hidden,groupable:this.groupable,width:this.width,align:this.align,editable:this.editable,minwidth:this.minwidth,maxwidth:this.maxwidth,resizable:this.resizable,datafield:this.datafield,text:this.text,exportable:this.exportable,cellsalign:this.cellsalign,pinned:this.pinned,cellsFormat:this.cellsFormat,columntype:this.columntype,classname:this.classname,cellclassname:this.cellclassname,menu:this.menu}},this.setproperty=function(d,e){if(this[d]){var f=this[d];this[d]=e;this.owner._columnPropertyChanged(this,d,e,f)}else{if(this[d.toLowerCase()]){var f=this[d.toLowerCase()];this[d.toLowerCase()]=e;this.owner._columnPropertyChanged(this,d.toLowerCase(),e,f)}}};this._initfields=function(e){if(e!=null){var d=this;if(a.jqx.hasProperty(e,"dataField")){this.datafield=a.jqx.get(e,"dataField")}if(a.jqx.hasProperty(e,"displayField")){this.displayfield=a.jqx.get(e,"displayField")}else{this.displayfield=this.datafield}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"validation")){this.validation=a.jqx.get(e,"validation")}if(a.jqx.hasProperty(e,"autoCellHeight")){this.autoCellHeight=a.jqx.get(e,"autoCellHeight")}if(a.jqx.hasProperty(e,"text")){this.text=a.jqx.get(e,"text")}else{this.text=this.displayfield}if(a.jqx.hasProperty(e,"sortable")){this.sortable=a.jqx.get(e,"sortable")}if(a.jqx.hasProperty(e,"hidden")){this.hidden=a.jqx.get(e,"hidden")}if(a.jqx.hasProperty(e,"groupable")){this.groupable=a.jqx.get(e,"groupable")}if(a.jqx.hasProperty(e,"renderer")){this.renderer=a.jqx.get(e,"renderer")}if(a.jqx.hasProperty(e,"align")){this.align=a.jqx.get(e,"align")}if(a.jqx.hasProperty(e,"cellsAlign")){this.cellsalign=a.jqx.get(e,"cellsAlign")}if(a.jqx.hasProperty(e,"cellsFormat")){this.cellsFormat=a.jqx.get(e,"cellsFormat")}if(a.jqx.hasProperty(e,"width")){this.width=a.jqx.get(e,"width")}if(a.jqx.hasProperty(e,"minWidth")){this.minwidth=a.jqx.get(e,"minWidth")}if(a.jqx.hasProperty(e,"maxWidth")){this.maxwidth=a.jqx.get(e,"maxWidth")}if(a.jqx.hasProperty(e,"cellsRenderer")){this.cellsRenderer=a.jqx.get(e,"cellsRenderer")}if(a.jqx.hasProperty(e,"columnType")){this.columntype=a.jqx.get(e,"columnType")}if(a.jqx.hasProperty(e,"pinned")){this.pinned=a.jqx.get(e,"pinned")}if(a.jqx.hasProperty(e,"filterable")){this.filterable=a.jqx.get(e,"filterable")}if(a.jqx.hasProperty(e,"filter")){this.filter=a.jqx.get(e,"filter")}if(a.jqx.hasProperty(e,"resizable")){this.resizable=a.jqx.get(e,"resizable")}if(a.jqx.hasProperty(e,"draggable")){this.draggable=a.jqx.get(e,"draggable")}if(a.jqx.hasProperty(e,"editable")){this.editable=a.jqx.get(e,"editable")}if(a.jqx.hasProperty(e,"initEditor")){this.initeditor=a.jqx.get(e,"initEditor")}if(a.jqx.hasProperty(e,"createEditor")){this.createeditor=a.jqx.get(e,"createEditor")}if(a.jqx.hasProperty(e,"destroyEditor")){this.destroyeditor=a.jqx.get(e,"destroyEditor")}if(a.jqx.hasProperty(e,"getEditorValue")){this.geteditorvalue=a.jqx.get(e,"getEditorValue")}if(a.jqx.hasProperty(e,"className")){this.classname=a.jqx.get(e,"className")}if(a.jqx.hasProperty(e,"cellClassName")){this.cellclassname=a.jqx.get(e,"cellClassName")}if(a.jqx.hasProperty(e,"rendered")){this.rendered=a.jqx.get(e,"rendered")}if(a.jqx.hasProperty(e,"exportable")){this.exportable=a.jqx.get(e,"exportable")}if(a.jqx.hasProperty(e,"nullable")){this.nullable=a.jqx.get(e,"nullable")}if(a.jqx.hasProperty(e,"columnGroup")){this.columngroup=a.jqx.get(e,"columnGroup")}if(!e instanceof String&&!(typeof e=="string")){for(var f in e){if(!d.hasOwnProperty(f)){if(!d.hasOwnProperty(f.toLowerCase())){b.host.remove();throw new Error("jqxScheduler: Invalid property name - "+f+".")}}}}}};this._initfields(c);return this};a.jqx.schedulerDataCollection=function(b){this.records=new Array();this.owner=b;this.updating=false;this.beginUpdate=function(){this.updating=true};this.resumeupdate=function(){this.updating=false};this.clear=function(){this.records=new Array()};this.replace=function(d,c){this.records[d]=c};this.isempty=function(c){if(this.records[c]==undefined){return true}return false};this.initialize=function(c){if(c<1){c=1}this.records[c-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(c){return this.records.indexOf(c)};this.add=function(c){if(c==null){return false}this.records[this.records.length]=c;return true};this.insertAt=function(d,c){if(d==null||d==undefined){return false}if(c==null){return false}if(d>=0){if(dc){return 1}return 0;case"date":case"time":if(dc){return 1}return 0;case"string":case"text":d=String(d).toLowerCase();c=String(c).toLowerCase();break}}else{if(a.jqx.dataFormat.isNumber(d)&&a.jqx.dataFormat.isNumber(c)){if(dc){return 1}return 0}else{if(a.jqx.dataFormat.isDate(d)&&a.jqx.dataFormat.isDate(c)){if(dc){return 1}return 0}else{if(!a.jqx.dataFormat.isNumber(d)&&!a.jqx.dataFormat.isNumber(c)){d=String(d).toLowerCase();c=String(c).toLowerCase()}}}}}try{if(dc){return 1}}catch(e){var g=e}return 0};this._equals=function(d,c){return(this._compare(d,c)===0)};this.evaluate=function(l){if(this.scheduler.serverProcessing){return l}var c=new Array();if(this.filters.length){var f=new Array();var k=function(o,s){for(var q=0;q0)){var j=new Array();var g=function(n,o){for(var m=0;m0){g(p,p.records)}}};g(null,l);k.call(this,j,c);for(var d=0;d0){return a(j,d).text()}if(this.rows&&j!=""&&j!=undefined&&this.rows.length>0){var h=this.rows[this.rows.length-1][j];if(h==null){h=null}for(var f=1;f<=100;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}if(j!=undefined){if(j.toString().length>0){var c=a(d).attr(j);if(c!=null&&c.toString().length>0){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){return"jqx"+c}return c}}}if(this.rows&&this.rows.length>0){var g=this.scheduler.appointmentsByKey[e];if(g){var h=this.rows[this.rows.length-1][j];if(h==null){h=""}for(var f=1;f<=1000;f++){var g=this.scheduler.appointmentsByKey[f+h];if(!g){if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+h+f];if(g){continue}return"jqx"+h+f}return h+f}}}}if(this.scheduler&&this.scheduler.treeGrid&&this.scheduler.treescheduler.virtualModeCreateRecords){var g=this.scheduler.appointmentsByKey["jqx"+e];if(!g){return"jqx"+e}else{for(var f=e+1;f<=100;f++){var g=this.scheduler.appointmentsByKey["jqx"+f];if(!g){var g=this.scheduler.appointmentsByKey["jqx"+f];if(g){continue}return"jqx"+f}}}}return e};this.generatekey=function(){var c=function(){return(((1+Math.random())*16)|0)};return(""+c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c())};return this}})(jqxBaseFramework); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxscheduler.js --- a/www/jqwidgets/jqxscheduler.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxscheduler.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(a){if(!a.jqx.scheduler){a.jqx.scheduler={}}a.jqx.jqxWidget("jqxScheduler","",{});a.extend(a.jqx._jqxScheduler.prototype,{defineInstance:function(){var b={altRows:false,autoShowLoadElement:true,columnsHeight:30,columns:[],columnGroups:null,dataview:null,disabled:false,enableHover:true,appointmentOpacity:0.8,headerZIndex:235,height:600,timeRulerWidth:60,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",localization:null,ready:null,renderToolBar:null,renderAppointment:null,rendered:null,rendering:null,rtl:false,showToolbar:true,showLegend:false,legendPosition:"bottom",legendHeight:34,rowsHeight:27,touchRowsHeight:36,appointmentsMinHeight:18,touchAppointmentsMinHeight:27,appointmentsRenderMode:"default",serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:a.jqx.utilities.scrollBarSize,touchScrollBarSize:a.jqx.utilities.touchScrollBarSize,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,showAllDayRow:true,changedAppointments:new Array(),renderMode:"simple",views:new Array(),view:0,min:new a.jqx.date(0),max:new a.jqx.date(9999,12,31),date:new a.jqx.date("todayDate"),colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF","#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8","#E8601A","#FF9639","#F5BD6A","#599994","#115D6E","#D02841","#FF7C41","#FFC051","#5B5F4D","#364651","#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00","#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B","#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63","#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6","#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F","#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825","#993144","#FFA257","#CCA56A","#ADA072","#949681","#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932","#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54","#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3","#444546","#FFBB6E","#F28D00","#D94F00","#7F203B","#583C39","#674E49","#948658","#F0E99A","#564E49","#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17","#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5","#844341","#D5CC92","#BBA146","#897B26","#55591C","#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472","#96003A","#FF7347","#FFBC7B","#FF4154","#642223","#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E","#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7","#7B1A25","#BF5322","#9DA860","#CEA457","#B67818","#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46","#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800","#FF6800","#A0A700","#FF8D00","#678900","#0069A5"],colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],resources:null,contextMenu:true,contextMenuOpen:null,contextMenuClose:null,contextMenuItemClick:null,contextMenuCreate:null,timeZone:null,statuses:{free:"white",tentative:"tentative",busy:"transparent",outOfOffice:"#800080"},appointmentDataFields:{from:"from",to:"to",id:"id",calendarId:"calendarId",description:"description",location:"location",subject:"subject",background:"background",color:"color",borderColor:"borderColor",style:"style",recurrencePattern:"recurrencePattern",recurrenceException:"recurrenceException",draggable:"draggable",resizable:"resizable",resourceId:"resourceId",status:"status",tooltip:"tooltip",hidden:"hidden",allDay:"allDay",timeZone:"timeZone",ownerId:"ownerId"},appointmentTooltips:true,tableColumns:1,tableRows:1,dayNameFormat:"full",touchDayNameFormat:"abbr",toolBarRangeFormat:"dd MMMM yyyy",toolBarRangeFormatAbbr:"dd MM yyyy",columnRenderer:null,exportSettings:{serverURL:null,characterSet:null,fileName:"jqxScheduler",dateTimeFormatString:"S",resourcesInMultipleICSFiles:false,ICSXWRCALNAME:"jqxScheduler",ICSXWRCALDESC:"jqxScheduler Description"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},editDialogDateTimeFormatString:"dd/MM/yyyy hh:mm tt",editDialogDateFormatString:"dd/MM/yyyy",editDialogOpen:null,editDialogCreate:null,editDialogKeyDown:null,editDialogClose:null,editDialog:true,toolbarHeight:54,tableZIndex:469,_updating:false,touchMode:"auto",width:800,that:this,beginDrag:null,endDrag:null,dragging:null,timeZones:[{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:false},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:false},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:false},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:true},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:true},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:false},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:true},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:false},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:false},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:true},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:false},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:true},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:false},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:true},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:true},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:true},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:true},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus",supportsDaylightSavingTime:false},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:true},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:false},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:true},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:true},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:true},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:true},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:true},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:false},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:true},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:true},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:false},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:true},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:false},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:true},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:false},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:true},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:true},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:false},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Rome",supportsDaylightSavingTime:true},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Budapest, Prague",supportsDaylightSavingTime:true},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:true},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia",supportsDaylightSavingTime:true},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:false},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:true},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:true},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:true},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:true},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:true},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:true},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:true},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:true},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:true},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:false},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:false},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:true},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:true},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:true},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:true},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:false},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:true},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:false},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:true},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:true},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:false},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:true},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:false},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:false},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:false},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:false},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:false},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:true},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:true},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:false},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:false},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:true},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:false},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong",supportsDaylightSavingTime:false},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:false},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:true},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:false},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:true},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:false},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:true},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:false},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:false},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:true},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:false},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:true},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:false},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:true},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:true},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:true},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:false},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:true},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:true},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:true},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:true},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:false},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:false},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:true}]};if(this===a.jqx._jqxScheduler.prototype){return b}a.extend(true,this,b);this.that=this;return b},createInstance:function(c){var e=this;e._views=new Array();e._view=e.view;for(var d=0;d0){e._camelCase=e.source._source.dataFields!==undefined;e.selectionMode=e.selectionMode.toLowerCase()}if(e.host.attr("tabindex")==null){e.host.attr("tabindex","0")}e.host.attr("role","grid");e.host.attr("align","left");e.host.addClass(e.toTP("jqx-grid"));e.host.addClass(e.toTP("jqx-scheduler"));e.host.addClass(e.toTP("jqx-reset"));e.host.addClass(e.toTP("jqx-rc-all"));e.host.addClass(e.toTP("jqx-widget"));e.host.addClass(e.toTP("jqx-widget-content jqx-disableselect"));if(e._testmodules()){return}e.overlay=a("
    ");e.overlay.hide();e.overlay.appendTo(e.host);e.render(true);a.jqx.utilities.resize(e.host,function(){var h=a(window).width();var f=a(window).height();e._hostWidth=null;e._hostHeight=null;var g=e.host.width();var i=e.host.height();e._hostWidth=g;e._hostHeight=i;if(e._lastHostWidth!=g||e._lastHostHeight!=i){e._updatesize(e._lastHostWidth!=g,e._lastHostHeight!=i)}e._lastWidth=h;e._lastHeight=f;e._lastHostWidth=g;e._lastHostHeight=i});e.createEditRecurrenceDialog()},createEditRecurrenceDialog:function(){var d=this;d.editRecurrenceDialog=null;var b=a("
    "+d.schedulerLocalization.editRecurringAppointmentDialogTitleString+"
    "+d.schedulerLocalization.editRecurringAppointmentDialogContentString+"
    ");d.editRecurrenceDialog=b;a(b).jqxWindow({rtl:d.rtl,autoFocus:false,animationType:"none",autoOpen:false,theme:d.theme,minWidth:300,minHeight:110,resizable:false});var c=b.find("button");c.jqxButton({theme:d.theme,width:"50%"});var e=false;c.mousedown(function(){e=true;var f=this.id;if(f.indexOf("editRecurringAppointmentOccurrence")>=0){d.editSeries(false)}else{d.editSeries(true)}a(b).jqxWindow("close")});this.addHandler(a(b),"open",function(f){d._raiseEvent("editRecurrenceDialogOpen",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null})});d.addHandler(a(b),"keydown",function(f){if(f.keyCode==13){if(a(document.activeElement).ischildof(a(b))){if(document.activeElement.nodeName.toLowerCase()=="button"){a(document.activeElement).trigger("mousedown");a(document.activeElement).trigger("mouseup");return true}}}});this.addHandler(a(b),"close",function(f){if(!e){d._removeFeedbackAndStopResize();d.overlay.hide();d.focus();d._raiseEvent("editRecurrenceDialogClose",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null});return false}e=false;d.overlay.hide();d.focus();d._raiseEvent("editRecurrenceDialogClose",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null})});d.editRecurrenceDialog=b},getViewStart:function(){var d=this.getVisibleDate();var b=this._views[this._view].type;var e=this._views[this._view];switch(b){case"dayView":case"timelineDayView":return d}var c=this.getFirstDayOfWeek(d);return c},getViewEnd:function(){var e=this.getViewStart();var d=1;var b=this._views[this._view].type;var c=this._views[this._view];switch(b){case"dayView":d=1;break;case"timelineDayView":d=1;if(c.days){d=c.days}break;case"weekView":case"timelineWeekView":d=7;if(c.days){d=c.days}break;case"monthView":d=41;break;case"timelineMonthView":d=41;if(c.days){d=c.days}break;case"agendaView":d=7;if(c.days){d=c.days}break}return e.addDays(d)},getFirstDayOfWeek:function(d){var c=d;var b=this.schedulerLocalization.firstDay;if(b<0||b>6){b=6}while(c.dayOfWeek()!=b){c.addDays(-1,false)}return c},getVisibleDate:function(){var d=this.date;if(dthis.max){d=this.max}var b=this._views[this._view].type;var f=this._views[this._view];d=d.clearTime();switch(b){case"dayView":case"weekView":case"timelineDayView":case"timelineWeekView":case"agendaView":return d}var e=d.day();var c=d.addDays(-e+1);d=c;return d},_builddataloadelement:function(){if(this.dataloadelement){this.dataloadelement.remove()}this.dataloadelement=a('
    ');var c=a('
    '+this.schedulerLocalization.loadString+"
    ");c.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));c.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(c);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var b=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){b=true}}if(b){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var d=false;if(this.width==="auto"||this.width===null||this.autoWidth){d=true}if(d){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(c){var b=a("measure Text");b.addClass(this.toTP("jqx-widget"));a(document.body).append(b);if(c=="cell"){this._cellheight=b.height()}else{this._columnheight=b.height()}b.remove()},_testmodules:function(){var e="";var c=this;var b=function(){if(e.length!=""){e+=","}};if(!this.host.jqxScrollBar){b();e+=" jqxscrollbar.js"}if(!this.host.jqxButton){b();e+=" jqxbuttons.js"}if(!a.jqx.dataAdapter){b();e+=" jqxdata.js"}if(!this.host.jqxDateTimeInput){b();e+=" jqxdatetimeinput.js"}if(!this.host.jqxCalendar){b();e+=" jqxcalendar.js"}try{if(!Globalize){b();e+=" globalize.js"}}catch(d){}if(e!=""){throw new Error("jqxScheduler: Missing references to the following module(s): "+e);this.host.remove();return true}return false},focus:function(){try{if(this.isTouchDevice()){return}if(this._editDialog&&this._editDialog.jqxWindow("isOpen")){var c=this;setTimeout(function(){c.editDialogFields.subject.focus();c.editDialogFields.subject.select()},1);this.focused=true;return}if(document.activeElement==this.element){return}this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25);this.focused=true}catch(b){}},hiddenParent:function(){return a.jqx.isHidden(this.host)},_updatesize:function(h,g){if(this._loading){return}var e=this;var f=e.host.width();var d=e.host.height();if(!e._oldWidth){e._oldWidth=f}if(!e._oldHeight){e._oldHeight=d}if(e._resizeTimer!=undefined){clearTimeout(e._resizeTimer);e._resizeTimer=null}var c=300;var b=function(){if(e._resizeTimer){clearTimeout(e._resizeTimer)}e.resizingGrid=true;if(a.jqx.isHidden(e.host)){return}e._updatecolumnwidths();e.refresh();e._oldWidth=f;e._oldHeight=d;e.resizingGrid=false};b();e._resizeTimer=setTimeout(function(){var j=e.host.width();var i=e.host.height();if(e._oldWidth!=j||e._oldHeight!=i){b()}},c)},resize:function(c,b){if(c!=undefined){this.width=c}if(b!=undefined){this.height=b}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var b=a.jqx.mobile.isTouchDevice();this.touchDevice=b;if(this.touchMode==true){b=true;a.jqx.mobile.setMobileSimulator(this.element);this.touchDevice=b}else{if(this.touchMode==false){b=false}}if(b){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return b},toTP:function(b){return this.toThemeProperty(b)},localizestrings:function(b,c){this._cellscache=new Array();if(a.jqx.dataFormat){a.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxScheduler: "+this.loadingErrorMessage);return false}if(b!=null){for(var d in this.schedulerLocalization){if(b[d]){this.schedulerLocalization[d]=b[d]}}if(b.loadingErrorMessage){this.loadingErrorMessage=b.loadingErrorMessage}if(c!==false){this._builddataloadelement();a(this.dataloadelement).css("visibility","hidden");a(this.dataloadelement).css("display","none")}}else{this.schedulerLocalization={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},agendaDateColumn:"Date",agendaTimeColumn:"Time",agendaAppointmentColumn:"Appointment",backString:"Back",forwardString:"Forward",toolBarPreviousButtonString:"previous",toolBarNextButtonString:"next",emptyDataString:"No data to display",loadString:"Loading...",clearString:"Clear",todayString:"Today",dayViewString:"Day",weekViewString:"Week",monthViewString:"Month",agendaViewString:"Agenda",timelineDayViewString:"Timeline Day",timelineWeekViewString:"Timeline Week",timelineMonthViewString:"Timeline Month",agendaAllDayString:"all day",loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",editRecurringAppointmentDialogTitleString:"Edit Recurring Appointment",editRecurringAppointmentDialogContentString:"Do you want to edit only this occurrence or the series?",editRecurringAppointmentDialogOccurrenceString:"Edit Occurrence",editRecurringAppointmentDialogSeriesString:"Edit The Series",editDialogTitleString:"Edit Appointment",editDialogCreateTitleString:"Create New Appointment",contextMenuEditAppointmentString:"Edit Appointment",contextMenuCreateAppointmentString:"Create New Appointment",editDialogSubjectString:"Subject",editDialogLocationString:"Location",editDialogFromString:"From",editDialogToString:"To",editDialogAllDayString:"All day",editDialogExceptionsString:"Exceptions",editDialogResetExceptionsString:"Reset on Save",editDialogDescriptionString:"Description",editDialogResourceIdString:"Owner",editDialogStatusString:"Status",editDialogColorString:"Color",editDialogColorPlaceHolderString:"Select Color",editDialogTimeZoneString:"Time Zone",editDialogSelectTimeZoneString:"Select Time Zone",editDialogSaveString:"Save",editDialogDeleteString:"Delete",editDialogCancelString:"Cancel",editDialogRepeatString:"Repeat",editDialogRepeatEveryString:"Repeat every",editDialogRepeatEveryWeekString:"week(s)",editDialogRepeatEveryYearString:"year(s)",editDialogRepeatEveryDayString:"day(s)",editDialogRepeatNeverString:"Never",editDialogRepeatDailyString:"Daily",editDialogRepeatWeeklyString:"Weekly",editDialogRepeatMonthlyString:"Monthly",editDialogRepeatYearlyString:"Yearly",editDialogRepeatEveryMonthString:"month(s)",editDialogRepeatEveryMonthDayString:"Day",editDialogRepeatFirstString:"first",editDialogRepeatSecondString:"second",editDialogRepeatThirdString:"third",editDialogRepeatFourthString:"fourth",editDialogRepeatLastString:"last",editDialogRepeatEndString:"End",editDialogRepeatAfterString:"After",editDialogRepeatOnString:"On",editDialogRepeatOfString:"of",editDialogRepeatOccurrencesString:"occurrence(s)",editDialogRepeatSaveString:"Save Occurrence",editDialogRepeatSaveSeriesString:"Save Series",editDialogRepeatDeleteString:"Delete Occurrence",editDialogRepeatDeleteSeriesString:"Delete Series",editDialogStatuses:{free:"Free",tentative:"Tentative",busy:"Busy",outOfOffice:"Out of Office"}}}},_updateScrollbars:function(r){var j=false;var d=this;if(d.width==="auto"||d.width===null||d.autowidth){if(d.maxWidth==999999){j=true}}var h=d._views[d._view].type;var g=d._views[d._view];if(h=="monthView"&&d.resources&&d.resources.orientation=="none"&&!g.monthRowAutoHeight){var k=d.vScrollBar[0].style.visibility;d.hScrollBar[0].style.visibility="hidden";d.vScrollBar[0].style.visibility="hidden";if((k!=d.vScrollBar[0].style.visibility)){d._updatecolumnwidths()}return}var b=parseInt(d.scrollBarSize);var s=d.table?d.table.height():0;var i=0;var n="inherit";var k=d.vScrollBar[0].style.visibility;var o=d.hScrollBar[0].style.visibility;if(!r){var f=d.host.height()}else{var f=r}if(!d.columnGroups){f-=d.showHeader?d.columnsHeight:0}else{f-=d.showHeader?d.columnsheader.height():0}if(d.filterable){f-=d.filter.height()}if(d.pageable){f-=d.pagerHeight;if(d.pagerPosition==="both"){f-=d.pagerHeight}}if(d.showToolbar){f-=d.toolbarHeight}if(d.showLegend&&d._resources.length>0){f-=d.legendHeight}var m=false;if(d.height==="auto"||d.height===null||d.autoheight){if(d.maxHeight==999999){m=true}}if(!m&&s>f&&(d.getRows().length>0)){d.vScrollBar[0].style.visibility=n;i=4+parseInt(b);d.vScrollBar.jqxScrollBar({max:s-f})}else{d.vScrollBar[0].style.visibility="hidden"}if((k!=d.vScrollBar[0].style.visibility)){d._updatecolumnwidths()}var p=d.table?d.table.width():0;if(p>4){p-=4}var q=parseInt(d.host.css("border-left-width"))+parseInt(d.host.css("border-right-width"));var l=q+d.host.width()-i;if(p>l&&!j){d.hScrollBar[0].style.visibility=n;d.hScrollBar.jqxScrollBar({max:2+q+p-l});i=4+parseInt(b);if(b==0){i=0}if(!m&&s!=f){if(s>f-i+4&&(d.getRows().length>0)){d.hScrollBar.jqxScrollBar({max:q+p-l});var c=d.vScrollBar[0].style.visibility==="hidden";d.vScrollBar[0].style.visibility=n;d._updatecolumnwidths();if(c){d.hScrollBar.jqxScrollBar({max:p-l+q})}var e=d.table?d.table.width():0;if(e>3){e-=3}if(e!=p){if(el){d.hScrollBar.jqxScrollBar({max:q+e-l})}}}}}if(s-f>0){d.vScrollBar.jqxScrollBar({max:s-f+i})}else{d.vScrollBar[0].style.visibility="hidden"}}}else{d.hScrollBar[0].style.visibility="hidden"}if(d.getRows().length===0){d.vScrollBar[0].style.visibility="hidden";d.bottomRight[0].style.visibility="hidden"}if(d.vScrollBar[0].style.visibility=="hidden"){if(d.vScrollInstance.value!=0){d.vScrollInstance.setPosition(0)}}},_measureElementWidth:function(d){var c=a(""+d+"");c.addClass(this.toTP("jqx-widget"));c.addClass(this.toTP("jqx-grid"));c.addClass(this.toTP("jqx-grid-column-header"));c.addClass(this.toTP("jqx-widget-header"));a(document.body).append(c);var b=c.outerWidth()+20;c.remove();return b},_arrangeAutoHeight:function(d){if(!d){d=0}if(this.height==="auto"||this.height===null||this.autoheight){var g=this.table.height();var f=0;this._hostHeight=null;if(!this.columnGroups){f+=this.showHeader?this.columnsHeight:-1}else{f+=this.showHeader?this.columnsheader.height():-1}f+=this.showLegend&&this._resources.length>0?this.legendHeight:0;f+=this.showToolbar?this.toolbarHeight:0;f+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){f+=this.pageable?this.pagerHeight:0}f+=g;if(this.filterable){var e=this.filter.find(".filterrow");var b=this.filter.find(".filterrow-hidden");var c=1;if(b.length>0){c=0}f+=this.filterHeight-1+this.filterHeight*e.length*c}if(f+d>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(f+d)}return true}return false},_arrangeAutoWidth:function(d){if(!d){d=0}if(this.width==="auto"||this.width===null||this.autowidth){this._hostWidth=null;var c=0;for(var e=0;ethis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(f+d)}return true}return false},_measureTopAndHeight:function(){var b=this.host.height();var c=0;if(this.showToolbar){c+=this.toolbarHeight;b-=parseInt(this.toolbarHeight)}if(this.showLegend&&this.legendPosition!="bottom"&&this._resources.length>0){c+=parseInt(this.legendHeight)+1}return{top:c,height:b}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var d=this.legendHeight;if(this._resources.length==0){d=0}var t=this._hostWidth?this._hostWidth:this.host.width();var q=this._hostHeight?this._hostHeight:this.host.height();var j=q;var i=this;if(this.showLegend&&this.legendPosition=="top"){this.legendbartop[0].style.visibility="inherit"}else{this.legendbartop[0].style.visibility="hidden"}var p=0;if(this.showToolbar){this.toolbar.width(t);this.toolbar[0].style.height=this.toolbarHeight-1+"px";this.toolbar[0].style.top="0px";p+=this.toolbarHeight;q-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.showLegend&&this.legendPosition=="bottom"){this.legendbarbottom[0].style.width=t+"px";this.legendbarbottom[0].style.height=d+"px"}else{this.legendbarbottom[0].style.height="0px"}if(this.showLegend&&this.legendPosition=="top"){if(this.legendbartop[0].style.width!=t+"px"){this.legendbartop[0].style.width=parseInt(t)+"px"}if(this.legendbartop[0].style.height!=d+"px"){this.legendbartop[0].style.height=parseInt(d-1)+"px"}if(this.legendbartop[0].style.top!=p+"px"){this.legendbartop[0].style.top=p+"px"}var e=p+d+"px";p=p+d;if(this.content[0].style.top!=e){this.content[0].style.top=p+"px"}}if(!this.showLegend){this.legendbartop[0].style.display="none";this.legendbarbottom[0].style.display="none"}this._updateScrollbars(j);var b=parseInt(this.scrollBarSize);var m=4;var f=2;var g=0;if(this.vScrollBar[0].style.visibility!="hidden"){g=b+m}if(this.hScrollBar[0].style.visibility!="hidden"){f=b+m+2}if(b==0){f=0;g=0}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var u=this._arrangeAutoHeight(f-2);var r=this._arrangeAutoWidth(g+1);if(u||r){this.legendbartop[0].style.width=parseInt(t)+"px";this.toolbar[0].style.width=parseInt(t)+"px";this.legendbarbottom[0].style.width=parseInt(t)+"px";this.filter[0].style.width=parseInt(t)+"px"}if(u){var w=this._measureTopAndHeight();p=w.top;q=w.height}}var n=0;if(this.showLegend&&this.legendPosition=="bottom"){f+=d;n+=d}else{if(this.showLegend){f+=d}}if(this.hScrollBar[0].style.height!=b+"px"){this.hScrollBar[0].style.height=parseInt(b)+"px"}if(this.hScrollBar[0].style.top!=p+q-m-b-n+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=p+q-m-b-n-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var h=false;var v=false;if(g==0){if(l!=(t-2)+"px"){this.hScrollBar[0].style.width=(t-2)+"px";h=true}}else{if(l!=(t-b-m)+"px"){this.hScrollBar[0].style.width=(t-b-m+"px");h=true}}if(this.vScrollBar[0].style.width!=b+"px"){this.vScrollBar[0].style.width=b+"px";v=true}if(this.vScrollBar[0].style.height!=parseInt(q)-f+"px"){this.vScrollBar[0].style.height=(parseInt(q)-f+"px");v=true}if(this.vScrollBar[0].style.left!=parseInt(t)-parseInt(b)-m+"px"||this.vScrollBar[0].style.top!=p+"px"){this.vScrollBar[0].style.top=p+"px";this.vScrollBar[0].style.left=parseInt(t)-parseInt(b)-m+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:p});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:b+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var s=this.hScrollInstance;s.disabled=this.disabled;if(h){s.refresh()}if(v){k.refresh()}var o=function(x){if((x.vScrollBar[0].style.visibility!="hidden")&&(x.hScrollBar[0].style.visibility!="hidden")){x.bottomRight[0].style.visibility="inherit";x.bottomRight[0].style.left=1+parseInt(x.vScrollBar.css("left"))+"px";x.bottomRight[0].style.top=parseInt(x.hScrollBar.css("top"))+"px";if(x.rtl){x.bottomRight.css("left","0px")}x.bottomRight[0].style.width=parseInt(b)+3+"px";x.bottomRight[0].style.height=parseInt(b)+4+"px"}else{x.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=t-g+"px"){this.content[0].style.width=t-g+"px"}if(this.content[0].style.height!=q-f+3+"px"){this.content[0].style.height=q-f+3+"px"}if(this.content[0].style.top!=p+"px"){this.content[0].style.top=parseInt(p)+"px"}if(this.rtl){this.content.css("left",g)}if(this.showLegend&&this.legendPosition=="bottom"){this.legendbarbottom.css("top",p-1+q-d-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.legendbarbottom.css("left",this.content.css("left"))}else{this.legendbarbottom.css("left","0px")}}}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(t!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(q!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostWidth=t;this._hostHeight=j;var c=this.schedulercontent.coord();this._tableOffset=c},scrollOffset:function(d,c){if(arguments.length==0||(d!=null&&typeof(d)=="object"&&!d.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(d!=null&&typeof(d)=="object"){var c=d.left;var b=d.top;var d=b}if(d==null||c==null||d==undefined||c==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",d);this.hScrollBar.jqxScrollBar("setPosition",c)},scrollleft:function(b){if(b==null||b==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",b)}},scrolltop:function(b){if(b==null||b==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",b)}},beginAppointmentsUpdate:function(){this._appupdating=true},endAppointmentsUpdate:function(){this._appupdating=false;this._renderrows()},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(b){this._updating=false;if(b===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(b,g,f){if(this.loadingstate===true){return}var j=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){a(this.dataloadelement).css("visibility","visible");a(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{a(this.dataloadelement).css("visibility","hidden");a(this.dataloadelement).css("display","none")}}var h=this;if(b==null){b={}}if(b.sortcomparer==undefined||b.sortcomparer==null){b.sortcomparer=null}if(b.filter==undefined||b.filter==null){b.filter=null}if(b.sort==undefined||b.sort==null){b.sort=null}if(b.data==undefined||b.data==null){b.data=null}var d=null;if(b!=null){d=b._source!=undefined?b._source.url:b.url}this.dataview=this.dataview||new a.jqx.scheduler.dataView("dataView");this.resourcesDataView=this.resourcesDataView||new a.jqx.scheduler.dataView("resourcesDataView");this.dataview.pageable=this.pageable;this.dataview.scheduler=this;this.resourcesDataView.scheduler=this;this._loading=true;this.appointments=new Array();this.uiappointments=new Array();var e=1;if(this.resources&&this.resources.source){e=2}var c=0;var i=function(){if(c==e){h._resourcesBinding=false;var m=h._resources.length>1?h._resources.length:1;if(h.resources&&h.resources.orientation==="horizontal"){h.tableColumns=m;h.tableRows=1}else{if(h.resources&&h.resources.orientation==="vertical"){h.tableRows=m;h.tableColumns=1}else{h.tableColumns=1;h.tableRows=1}}h._render();if(h.autoShowLoadElement&&!h._loading){a(h.dataloadelement).css("visibility","hidden");a(h.dataloadelement).css("display","none")}h._updateTouchScrolling();h._raiseEvent("bindingComplete");if(f){f()}if(!h.initializedcall){h.initializedcall=true;h.isInitialized=true;if((h.width!=null&&h.width.toString().indexOf("%")!=-1)||(h.height!=null&&h.height.toString().indexOf("%")!=-1)){h._updatesize(true)}if(h.ready){h.ready()}if(h._rendercelltexts){h._rendercelltexts()}if(h._gridRenderElement){a(h._gridRenderElement).show("slow");var l=6000+Math.floor((Math.random()*4000)+1);var n=String.fromCharCode(83,69,84).toLowerCase()+"-"+String.fromCharCode(84,73,77,69,79,85,84).toLowerCase();j[a.camelCase(n)](function(){a(h._gridRenderElement).hide("slow",function(){a(h._gridRenderElement).remove()})},l)}if(h.host.css("visibility")=="hidden"){var k=a.jqx.browser.msie&&a.jqx.browser.version<8;if(h.vScrollBar.css("visibility")=="visible"){h.vScrollBar.css("visibility","inherit")}if(h.hScrollBar.css("visibility")=="visible"){h.hScrollBar.css("visibility","inherit")}h._intervalTimer=setInterval(function(){if(h.host.css("visibility")=="visible"){h._updatesize(true);clearInterval(h._intervalTimer)}},100)}}}};this._resourcesBinding=false;this.dataview.update=function(y){h._loading=false;h.appointmentsByKey=new Array();h.appointments=new Array();h.uiappointments=new Array();var D=h.source._source.datafields;var o=["from","to","id","style","description","location","subject","background","color","borderColor","recurrencePattern","recurrenceException","draggable","resizable","tooltip","hidden","allDay","timeZone","ownerId","resourceId"];var m=new Array();for(var z=0;z=0){x=x.substring(x.indexOf("EXDATE:")+7)}var t=new Array();if(x.indexOf(",")>=0){t=x.split(",")}else{t.push(x)}for(var A=0;A=0){var q=w.split(";")[1];w=w.split(";")[0];if(q.toLowerCase().indexOf("display")>=0&&q.toLowerCase().indexOf("none")){n.hidden=true}}try{var E=a.jqx.scheduler.utilities.untilStringToDate(w);if(E!="Invalid Date"){if(n.timeZone){E=new a.jqx.date(E,n.timeZone)}else{if(h.timeZone){E=E.toTimeZone(h.timeZone)}else{E=new a.jqx.date(E)}}}}catch(F){var E=new a.jqx.date(w,h.timeZone)}B.push(E)}}x=B}n[G]=x}for(var u in o){var G=o[u];if(n[G]==undefined){var x="";if(G=="originalData"){continue}if(G=="ownerId"){x=null}if(G=="timeZone"){x=null}if(G=="recurrencePattern"){x=null}if(G=="recurrenceException"){x=[]}if(G=="allDay"){x=false}if(G=="draggable"){x=true}if(G=="resizable"){x=true}if(G=="hidden"){x=false}if(G=="resourceId"){x=null}if(G=="from"){x=new a.jqx.date()}if(G=="to"){x=new a.jqx.date().addHours(1)}n[G]=x}}n.originalData=p;if(h.resources&&!h.resources.source){if(!h._resourcesBinding){if(m.indexOf(n.resourceId)==-1){m.push(n.resourceId)}}}h.appointmentsByKey[p.uid]=n;h.appointments.push(n);var v=new a.jqx.scheduler.appointment(n);if(n.timeZone){v.from=v.from.toTimeZone(n.timeZone);v.to=v.to.toTimeZone(n.timeZone)}if(h.timeZone){if(!n.timeZone){v.timeZone=h.timeZone}v.from=v.from.toTimeZone(h.timeZone);v.to=v.to.toTimeZone(h.timeZone)}else{v.from=v.from.toTimeZone(null);v.to=v.to.toTimeZone(null)}n.jqxAppointment=v;if(n.recurrenceException){for(var C=0;C=0){continue}if(k[l][h.resources.dataField]){h._resources.push(k[l][h.resources.dataField])}}}else{h._resources=k}if(h.resources.orientation==undefined){h.resources.orientation="none"}c++;i()};this.dataview.databind(b);if(this.resources&&this.resources.source){this._resourcesBinding=true;this.resourcesDataView.databind(this.resources.source)}},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=g;var e=c;e.owner=this;var f=new a.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);c=f.args;return b},ensureAppointmentVisible:function(b){if(this.appointmentsByKey[b]){return this._ensureAppointmentVisible(this.appointmentsByKey[b].jqxAppointment)}return false},_ensureAppointmentVisible:function(h){if(this.vScrollBar[0].style.visibility==="hidden"&&this.hScrollBar[0].style.visibility==="hidden"){return false}if(!h){return false}var k=this.getViewStart();var i=this.getViewEnd();var p=a.jqx.scheduler.utilities.rangeIntersection(h.from,h.to,k,i);if(!p){this.navigateTo(h.from);return this._ensureAppointmentVisible(h)}var G=h.id;var t=a('[data-key="'+G+'"]');if(t.length>0){var c=t[0]}else{if(h.elements&&h.elements.length>0){var f=h.elements[0];var c=f.element}else{return false}}var z=this.vScrollInstance.value;var y=this.hScrollInstance.value;if(this.rtl){var y=this.hScrollInstance.max-y}var s=this.element.clientHeight;var v=this.element.clientWidth;var B=0;if(!this.columnGroups){B+=this.showHeader?this.columnsHeight:0}else{B+=this.showHeader?this.columnsheader.height():0}var r=this._views[this._view].type;var n=this._views[this._view];var D=0;if(r=="dayView"||r=="weekView"){var x=this.showAllDayRow;if(n.timeRuler&&(r==="dayView"||r==="weekView")){if(n.timeRuler.showAllDayRow!=undefined){x=n.timeRuler.showAllDayRow}}if(x){if(this.tableRows==1){D=this.table[0].rows[0].clientHeight}else{D=this.table[0].rows[1].clientHeight}}var q=h.duration().days()>=1||h.allDay;if(q&&this.tableRows==1&&this.tableColumns==1){return false}}if(this.showToolbar){B+=this.toolbarHeight}s-=B;if(this.showLegend&&this._resources.length>0){s-=this.legendHeight}var e=0;var l=0;var d=z-e;var C=s+d-D;var w=y-l;var F=v+w;var E=c;E=a(E);var g=E[0].clientHeight;var j=E.position().top-D;var m=j+g;if(j<=d){var A=j;if(A<0){A=0}if(!q||(q&&this.tableRows>1)){this.vScrollBar.jqxScrollBar("setPosition",A)}}else{if(j>=C){var A=j;if(A<0){A=0}if(!q||(q&&this.tableRows>1)){this.vScrollBar.jqxScrollBar("setPosition",A-2)}}}var u=E.position().left;u=Math.round(u);var b=u+E.outerWidth();if(Math.round(E.position().left)===0){this.hScrollBar.jqxScrollBar("setPosition",0)}if(u<=w){var o=u-E.outerWidth()+l;if(o<0){o=0}if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",u)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-u)}}if(u>F){if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",u)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-u)}}},ensureVisible:function(d,l){var g=this;var m=a.type(d)=="date"?d:d.toDate();for(var f=0;f0){m-=this.legendHeight}if(this.hScrollBar.css("visibility")!="hidden"){m-=20}var e=0;var h=0;var l=this._views[this._view].type;var j=this._views[this._view];var y=0;if(l=="dayView"||l=="weekView"){var r=this.showAllDayRow;if(j.timeRuler&&(l==="dayView"||l==="weekView")){if(j.timeRuler.showAllDayRow!=undefined){r=j.timeRuler.showAllDayRow}}if(r){if(this.tableRows==1){y=this.table[0].rows[0].clientHeight}else{y=this.table[0].rows[1].clientHeight}}}var d=t-e;var x=m+d-y;var q=s-h;var A=p+q;var z=b;z=a(z);var f=z.position().top-y;var i=f+z.outerHeight();var o=z.position().left;o=Math.round(o);var c=o+z.outerWidth();if(Math.round(z.position().left)===0){this.hScrollBar.jqxScrollBar("setPosition",0)}if(o<=q){var k=o-z.outerWidth()+h;if(k<0){k=0}if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",k)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-k)}}if(c>=A){if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",2+h+c-p)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-(2+h+c-p))}}var g=z.parent().index();if(this.tableRows>0){g--}if(Math.round(z.position().top)===0||g===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var n=this.table[0].rows.length-1;var v=this.table[0].rows[n];if(v[0]===z.parent()[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}if(f<=d){var u=f;if(u<0){u=0}return this.vScrollBar.jqxScrollBar("setPosition",u)}if(i>=x){return this.vScrollBar.jqxScrollBar("setPosition",4+i-m+y)}},getColumn:function(b){var c=null;if(this.columns.records){a.each(this.columns.records,function(){if(this.datafield==b||this.displayfield==b){c=this;return false}})}return c},_setcolumnproperty:function(c,e,f){if(c==null||e==null||f==null){return null}e=e.toLowerCase();var d=this.getColumn(c);if(d==null){return}var g=d[e];d[e]=f;var b=this.getColumn(c);if(b!=null){b[e]=f}switch(e){case"text":case"hidden":case"hideable":case"renderer":case"align":case"cellsalign":case"contenttype":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(e=="align"){this._rendercolumnheaders();this.refresh()}else{if(e=="text"||e=="class"||e=="hidden"||e=="pinned"||e=="resizable"||e=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(e=="width"||e=="maxwidth"||e=="minwidth"){d._width=null;d._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(b,d){if(b==null||d==null){return null}d=d.toLowerCase();var c=this.getColumn(b);return c[d]},setColumnProperty:function(b,c,d){this._setcolumnproperty(b,c,d)},hideColumn:function(b){this._setcolumnproperty(b,"hidden",true)},showColumn:function(b){this._setcolumnproperty(b,"hidden",false)},updateBoundData:function(c,b){this.databind(this.source,c,b)},refresh:function(c){if(c!=true){var b=this;if(a.jqx.isHidden(b.host)){return}b.table[0].style.top="0px";b.vScrollInstance.setPosition(0);b._renderrows();b._arrange();b._renderhorizontalscroll();b._updateTouchScrolling();b._refreshToolBar();b._updateFocusedCell()}},_updateFocusedCell:function(){var h=this;if(h.focusedCell){h._updateCellsSelection();return}var d=h._views[h._view].type;var g=h._views[h._view];var c=h.showAllDayRow;if(g.timeRuler&&(d==="dayView"||d==="weekView")){if(g.timeRuler.showAllDayRow!=undefined){c=g.timeRuler.showAllDayRow}}if(!c||(d!="dayView"&&d!="weekView")){h.focusedCell=h.rows[0].cells[0];if(h.rtl){h.focusedCell=h.rows[0].cells[h.rows[0].cells.length-1]}}else{h.focusedCell=h.rows[1].cells[0];if(h.rtl){h.focusedCell=h.rows[1].cells[h.rows[1].cells.length-1]}}if(h.focusedCell.className.indexOf("jqx-scheduler-disabled-cell")>=0){h.focusedCell=null;for(var f=0;f
    ";this.element.innerHTML=e;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var g=this.host.find("#verticalScrollBar"+this.element.id);var k=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=g.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=k.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=a.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=a.data(this.hScrollBar[0],"jqxScrollBar").instance;this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-scheduler-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.legendbarbottom=this.host.find("#legendbarbottom");this.legendbarbottom[0].id="legendbarbottom"+this.element.id;this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar-bottom"));this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar"));this.legendbarbottom.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.legendbartop=this.host.find("#legendbartop");this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar-top"));this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar"));this.legendbartop.addClass(this.toTP("jqx-widget-header"));this.schedulertable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var b=this.source.datafields;if(b==null&&this.source._source){b=this.source._source.datafields}if(b){for(var c=0;c2){for(var j=0;j');g.columnsheader.remove();g.columnsheader.addClass(g.toTP("jqx-widget-header"));g.columnsheader.addClass(g.toTP("jqx-grid-header"));if(!g.showHeader){g.columnsheader.css("display","none")}else{if(g.columnsheader){g.columnsheader.css("display","block")}}g.schedulercontent=g.schedulercontent||a('
    ');g.schedulercontent.remove();var e=g.columnsHeight;e=g._preparecolumnGroups();g.columnsheader.height(e);g.content.append(g.columnsheader);g.content.append(g.schedulercontent);g._rendercolumnheaders();g.tableheight=null;g.schedulercontent.find("#contenttable"+g.element.id).remove();if(g.table!=null){g.table.remove();g.table=null}if(g.pinnedtable!=null){g.pinnedtable.remove();g.pinnedtable=null}g.table=a('
    ');g.pinnedtable=a('');g.schedulercontent.addClass(g.toTP("jqx-grid-content"));g.schedulercontent.addClass(g.toTP("jqx-widget-content"));g.schedulercontent.append(g.table);if(g.tableRows==1){g.schedulercontent.append(g.pinnedtable)}g._renderrows();g._arrange();g._resourcesElements=new Array();var d=function(h,i){h.children().remove();var h=a("
    ").appendTo(h);g._resourcesElements[i]=new Array();a.each(g._resources,function(n){var l=g.getColors(n);var m=this.toString();var o=a("
    ");o.appendTo(h);var k=a("
    "+m+"
    ");k.appendTo(h);g._resourcesElements[i][m]=o;var j=function(){if(o.attr("data-toggle")=="on"){g.hideAppointmentsByResource(m)}else{g.showAppointmentsByResource(m)}};g.addHandler(o,"mousedown",function(){j();return false});g.addHandler(k,"mousedown",function(){j();return false})})};d(g.legendbarbottom,"bottom");d(g.legendbartop,"top");if(g.legendPosition=="top"){g.legendbarbottom.hide()}else{g.legendbartop.hide()}if(g._resources.length==0){g.legendbarbottom.hide();g.legendbartop.hide()}if(g.renderToolBar){g.renderToolBar(g.toolbar)}else{g._renderToolBar()}if(g.disabled){g.host.addClass(g.toThemeProperty("jqx-fill-state-disabled"))}g._renderhorizontalscroll();g._addHandlers();g.clearSelection();var c=g._views[g._view].type;var f=g._views[g._view];var b=g.showAllDayRow;if(f.timeRuler&&(c==="dayView"||c==="weekView")){if(f.timeRuler.showAllDayRow!=undefined){b=f.timeRuler.showAllDayRow}}if(!b||(c!="dayView"&&c!="weekView")){g.focusedCell=g.rows[0].cells[0]}else{g.focusedCell=g.rows[1].cells[0]}g._lastSelectedCell=g.focusedCell;g._updateCellsSelection()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},getAppointmentElement:function(e){var b=null;if(e.className.indexOf("jqx-scheduler-appointment")>=0&&e.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&e.className.indexOf("jqx-scheduler-appointment-content")==-1&&e.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){b=e}var d=e;for(var c=0;c<4;c++){if(d.parentNode){if(d.className.indexOf("jqx-scheduler-appointment")>=0&&d.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&d.className.indexOf("jqx-scheduler-appointment-content")==-1&&d.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){b=d}d=d.parentNode}else{break}}return b},getJQXAppointmentByElement:function(d){var f=this;var e=d.getAttribute?d.getAttribute("data-key"):d.attr("data-key");if(e.indexOf(".")>=0){var c=e.substring(0,e.indexOf("."));var h=e.substring(e.indexOf(".")+1);var g=f.appointmentsByKey[c];var b=g.jqxAppointment.renderedAppointments[e]}else{var g=f.appointmentsByKey[e];var b=g.jqxAppointment}return b},_renderToolBar:function(){var i=this;var b=a('
    ');var k=(this.toolbarHeight-20)/2;b.css("top",k);i.toolbarLeftButton=a('
    ');i.toolbarRightButton=a('
    ');i.toolbarLeftButton.attr("title",i.schedulerLocalization.toolBarPreviousButtonString);i.toolbarRightButton.attr("title",i.schedulerLocalization.toolBarNextButtonString);i.toolbarRightButton.jqxButton({enableHover:false,enableDefault:false,enablePressed:false,cursor:"pointer",disabled:i.disabled,theme:i.theme});i.toolbarLeftButton.jqxButton({enableHover:false,enableDefault:false,enablePressed:false,cursor:"pointer",disabled:i.disabled,theme:i.theme});i.dateTimeInput=a('
    ');i.toolbarLeftButton.find(".jqx-icon-arrow-left").remove();i.toolbarRightButton.find(".jqx-icon-arrow-right").remove();var e=a("
    ");e.addClass(i.toThemeProperty("jqx-icon-arrow-left"));i.toolbarLeftButton.wrapInner(e);var j=a("
    ");j.addClass(i.toThemeProperty("jqx-icon-arrow-right"));i.toolbarRightButton.wrapInner(j);if(i.rtl){i.toolbarLeftButton.css("float","right");i.toolbarRightButton.css("float","right");i.dateTimeInput.css("float","right")}i.addHandler(i.toolbarRightButton,"mouseenter",function(){j.addClass(i.toThemeProperty("jqx-icon-arrow-right-hover"))});i.addHandler(i.toolbarLeftButton,"mouseenter",function(){e.addClass(i.toThemeProperty("jqx-icon-arrow-left-hover"))});i.addHandler(i.toolbarRightButton,"mouseleave",function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-hover"))});i.addHandler(i.toolbarLeftButton,"mouseleave",function(){e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-hover"))});i.addHandler(i.toolbarRightButton,"mousedown",function(){j.addClass(i.toThemeProperty("jqx-icon-arrow-right-selected"))});i.addHandler(i.toolbarRightButton,"mouseup",function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-selected"))});i.addHandler(i.toolbarLeftButton,"mousedown",function(){e.addClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(i.toolbarLeftButton,"mouseup",function(){e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(a(document),"mouseup.pagerbuttons"+i.element.id,function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-selected"));e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(i.toolbarRightButton,"click",function(){if(!i.toolbarRightButton.jqxButton("disabled")){if(!i.rtl){i.navigateForward()}else{i.navigateBackward()}i.focus()}});i.addHandler(i.toolbarLeftButton,"click",function(){if(!i.toolbarLeftButton.jqxButton("disabled")){if(!i.rtl){i.navigateBackward()}else{i.navigateForward()}i.focus()}});i.toolbar.children().remove();i.toolbar.append(b);if(!i.rtl){b.append(i.toolbarLeftButton);b.append(i.dateTimeInput);b.append(i.toolbarRightButton)}else{b.append(i.toolbarRightButton);b.append(i.dateTimeInput);b.append(i.toolbarLeftButton)}i.toolbarDetails=a('
    ');i.toolbarViews=a('
    ');if(i.rtl){i.toolbarDetails.css("float","right");i.toolbarDetails.css("margin-left","0px");i.toolbarDetails.css("margin-right","7px");i.toolbarViews.css("margin-left","10px");i.toolbarViews.css("margin-right","0px");i.toolbarViews.css("float","left")}var h=new Array();if(!i.rtl){h.push(i.toolbarLeftButton);h.push(i.dateTimeInput);h.push(i.toolbarRightButton)}else{h.push(i.toolbarRightButton);h.push(i.dateTimeInput);h.push(i.toolbarLeftButton)}var l=i._views.length-1;a.each(i._views,function(p){var q="";var n=p;if(i.rtl){n=l-p}if(i._views[n].text!=undefined){q=i._views[n].text}else{switch(i._views[n].type){case"dayView":q=i.schedulerLocalization.dayViewString;break;case"weekView":q=i.schedulerLocalization.weekViewString;break;case"monthView":q=i.schedulerLocalization.monthViewString;break;case"agendaView":q=i.schedulerLocalization.agendaViewString;break;case"timelineDayView":q=i.schedulerLocalization.timelineDayViewString;break;case"timelineWeekView":q=i.schedulerLocalization.timelineWeekViewString;break;case"timelineMonthView":q=i.schedulerLocalization.timelineMonthViewString;break}}var o=''+q+"";var m=a(o);m.addClass(i.toTP("jqx-group-button-normal jqx-button jqx-fill-state-normal"));h.push(m);if(n==0){if(!i.rtl){m.addClass(i.toTP("jqx-rc-l"))}else{m.addClass(i.toTP("jqx-rc-r"))}}if(n==i._views.length-1){if(!i.rtl){m.addClass(i.toTP("jqx-rc-r"))}else{m.addClass(i.toTP("jqx-rc-l"))}}if(n===i._view){m.addClass(i.toTP("jqx-fill-state-pressed"))}m.mouseenter(function(){m.addClass(i.toTP("jqx-fill-state-hover"))});m.mouseleave(function(){m.removeClass(i.toTP("jqx-fill-state-hover"))});m.mousedown(function(){i._setView(n);i.focus()});a(i.toolbarViews).append(m)});b.append(i.toolbarDetails);b.append(i.toolbarViews);if(i._views.length<2){i.toolbarViews.hide()}i.dateTimeInput.jqxDateTimeInput({dropDownWidth:220,dropDownHeight:220,rtl:i.rtl,localization:i._getDateTimeInputLocalization(),firstDayOfWeek:i.schedulerLocalization.firstDay,todayString:i.schedulerLocalization.todayString,clearString:i.schedulerLocalization.clearString,showFooter:true,height:19,width:18,renderMode:"simple"});i.addHandler(i.dateTimeInput,"change",function(m){if(!i.fromNavigate){i.navigateTo(new a.jqx.date(m.args.date,i.timeZone));i.focus()}});i.tabKeyElements=h;var g=i._views[i._view].type;var d=function(m){var o=a.jqx.formatDate(i.getViewStart().toDate(),m,i.schedulerLocalization);var n=a.jqx.formatDate(i.getViewEnd().toDate(),m,i.schedulerLocalization);if(g==="dayView"||g==="timelineDayView"){i.toolbarDetails.html(o)}else{i.toolbarDetails.html(o+" - "+n)}if(i.rtl){i.toolbarDetails.addClass("jqx-rtl");i.toolbarDetails.html(""+n+" - "+o+"")}else{i.toolbarDetails[0].style.direction="ltr"}};d(i.toolBarRangeFormat);var c=i.toolbarViews.width()+i.toolbarDetails.width()+120;var f=i.toolBarRangeFormat;if(c>i.host.width()){f=i.toolBarRangeFormatAbbr;d(f);var c=i.toolbarViews.width()+i.toolbarDetails.width()+120;if(c>i.host.width()){i.toolbarDetails.hide();var c=i.toolbarViews.width()+120;if(c>i.host.width()){i.toolbarViews.hide()}}}else{i.currentToolbarFormat=i.toolBarRangeFormat}},_setView:function(g){var f=this;f.toolbarViews.find(".jqx-fill-state-pressed").removeClass(f.toTP("jqx-fill-state-pressed"));if(!f.rtl){a(f.toolbarViews.children()[g]).addClass(f.toTP("jqx-fill-state-pressed"))}else{a(f.toolbarViews.children()[f._views.length-1-g]).addClass(f.toTP("jqx-fill-state-pressed"))}if(f._view===g){return}var b=f.vScrollBar[0].style.visibility;if(b){if(!f._scrollPosition){f._scrollPosition=new Array()}f._scrollPosition[f._view]=f.vScrollInstance.value}var c=f.hScrollBar[0].style.visibility;if(c){if(!f._hscrollPosition){f._hscrollPosition=new Array()}f._hscrollPosition[f._view]=f.hScrollInstance.value}var i=f._views[f._view].type;var e=f._views[g].type;f._view=g;f._refreshColumns();f.refresh();var h=f.hScrollBar[0].style.visibility;if(c!==h){f._renderrows();f._updateTouchScrolling()}if(f._scrollPosition[f._view]){f.vScrollInstance.setPosition(f._scrollPosition[f._view])}if(f._hscrollPosition[f._view]){f.hScrollInstance.setPosition(f._hscrollPosition[f._view])}if(f.selectedJQXAppointment){f._ensureAppointmentVisible(f.selectedJQXAppointment)}var d=f.getViewStart();var j=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._raiseEvent("viewChange",{date:f.date,from:d,to:j,oldViewType:i,newViewType:e})},_getDateTimeInputLocalization:function(){var b=this;var c={};c.backString=b.schedulerLocalization.backString;c.forwardString=b.schedulerLocalization.forwardString;c.todayString=b.schedulerLocalization.todayString;c.clearString=b.schedulerLocalization.clearString;c.calendar=b.schedulerLocalization;return c},setView:function(b){switch(b){case"dayView":this._setView(0);break;case"weekView":this._setView(1);break;case"monthView":this._setView(2);break;case"timelineDayView":this._setView(3);break;case"timelineWeekView":this._setView(4);break;case"timelineMonthView":this._setView(5);break}this.view=b},navigateForward:function(){var d=this;var h=this._views[this._view].type;var i=this._views[this._view];var c=new a.jqx.date(this.date,d.timeZone);var j=function(){while((c.dayOfWeek()==0||c.dayOfWeek()==6)&&false===i.showWeekends){c=c.addDays(1)}return c};switch(h){case"dayView":case"timelineDayView":c=c.addDays(1);c=j();break;case"weekView":case"timelineWeekView":c=c.addDays(7);break;case"monthView":case"timelineMonthView":var g=c.day();var e=c.month();var f=c.year();var b=new a.jqx.date(f,e,1);b.timeZone=d.timeZone;c=b.addMonths(1);break;case"agendaView":if(i.days){c=c.addDays(i.days)}else{c=c.addDays(7)}break}return this.navigateTo(c)},navigateBackward:function(){var d=this;var h=this._views[this._view].type;var i=this._views[this._view];var c=new a.jqx.date(this.date,d.timeZone);var j=function(){while((c.dayOfWeek()==0||c.dayOfWeek()==6)&&false===i.showWeekends){c=c.addDays(-1)}return c};switch(h){case"dayView":case"timelineDayView":c=c.addDays(-1);c=j();break;case"weekView":case"timelineWeekView":c=c.addDays(-7);break;case"monthView":case"timelineMonthView":var g=c.day();var e=c.month();var f=c.year();var b=new a.jqx.date(f,e,1);b.timeZone=d.timeZone;c=b.addMonths(-1);break;case"agendaView":if(i.days){c=c.addDays(-i.days)}else{c=c.addDays(-7)}break}return this.navigateTo(c)},_refreshToolBar:function(d){var f=this;var g=f.getViewStart();var e=f.getViewEnd();var c=function(i){var l=a.jqx.formatDate(g.toDate(),i,f.schedulerLocalization);var j=a.jqx.formatDate(e.toDate(),i,f.schedulerLocalization);var h=f._views[f._view].type;var k=f._views[f._view];if(k.showWeekends===false){if(g.dayOfWeek()==0||g.dayOfWeek()==6){g=g.addDays(1)}if(g.dayOfWeek()==0||g.dayOfWeek()==6){g=g.addDays(1)}if(e.dayOfWeek()==0||e.dayOfWeek()==6){e=e.addDays(-1)}if(e.dayOfWeek()==0||e.dayOfWeek()==6){e=e.addDays(-1)}var l=a.jqx.formatDate(g.toDate(),i,f.schedulerLocalization);var j=a.jqx.formatDate(e.toDate(),i,f.schedulerLocalization)}if(h==="dayView"||h==="timelineDayView"){f.toolbarDetails.html(l)}else{f.toolbarDetails.html(l+" - "+j)}if(f.rtl){f.toolbarDetails.addClass("jqx-rtl");f.toolbarDetails.html(""+j+" - "+l+"")}else{f.toolbarDetails[0].style.direction="ltr"}};if(d){c(f._lastFormatString||f.toolBarRangeFormat);return}c(f.toolBarRangeFormat);f.toolbarDetails.show();f.toolbarViews.show();var b=f.toolbarViews.width()+f.toolbarDetails.width()+120;if(b>f.host.width()){c(f.toolBarRangeFormatAbbr);var b=f.toolbarViews.width()+f.toolbarDetails.width()+120;if(b>f.host.width()){f.toolbarDetails.hide();var b=f.toolbarViews.width()+120;if(b>f.host.width()){f.toolbarViews.hide()}}}},navigateTo:function(b){var d=this;if(a.type(b)=="date"){b=new a.jqx.date(b)}if(bthis.max){return}b.timeZone=d.timeZone;d.date=b;d._refreshToolBar(true);d.fromNavigate=true;d.dateTimeInput.val(b.toDate());d.fromNavigate=false;d._refreshColumnTitles();d._renderrows();d._updateFocusedCell();if(d.resources){d._renderhorizontalscroll()}var e=d.getViewStart();var c=a.jqx.scheduler.utilities.getEndOfDay(d.getViewEnd());d._raiseEvent("dateChange",{date:b,from:e,to:c})},_preparecolumnGroups:function(){var n=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var l=this;for(var f=0;fi){return 1}return 0});for(var h=1;h0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){h.selectedJQXAppointment=d;if(!i){h.selectedAppointment=a(c[0])}else{h.selectedAppointment=a(i)}var b=h._views[h._view].type;var g=h._views[h._view];if(b=="agendaView"){h.clearSelection();return}c.addClass(h.toTP("jqx-scheduler-selected-appointment"));if(d.resizable){c.find(".jqx-scheduler-appointment-resize-indicator").show()}switch(b){case"dayView":a(c).find(".jqx-scheduler-appointment-left-resize-indicator").hide();a(c).find(".jqx-scheduler-appointment-right-resize-indicator").hide();break;case"weekView":break;case"monthView":case"timeLineMonthView":case"timeLineDayView":case"timeLineWeekView":if(c.length>1){a.each(c,function(j){if(!h.rtl){if(j>0){a(this).find(".jqx-scheduler-appointment-left-resize-indicator").hide()}if(j0){a(this).find(".jqx-scheduler-appointment-right-resize-indicator").hide()}if(jthis.max){n=this.max}var f=m.toDate();var d=n.toDate();var g=false;for(var h=0;h=f.valueOf()&&c.valueOf()<=d.valueOf()){o.setAttribute("data-selected","true")}}else{if(!q&&o.getAttribute("data-end-date")){continue}}if(c.valueOf()>=f.valueOf()&&c.valueOf()<=d.valueOf()){o.setAttribute("data-selected","true");if(!g){k._lastSelectedCell=o;k.focusedCell=o;g=true}}}}k._updateCellsSelection()},_selectRange:function(b,r){var h=this;if(h._views[h._view].type=="agendaView"){return}var k=b;var v=r.getAttribute("data-view");if(b.getAttribute("data-view")!==v){return}var q=r.getAttribute("data-date");var m=k.getAttribute("data-date");if(null==q||null==m){return}var C=r.getAttribute("data-end-date");var F=k.getAttribute("data-end-date");var H=C!=null||F!=null;var s=C!=null&&F!=null;var n=h._getDateByString;var u=n(q);var t=n(m);if(uthis.max.toDate()){u=this.max.toDate()}if(t>this.max.toDate()){t=this.max.toDate()}var w=Math.min(u,t);var A=Math.max(u,t);var p=h.rows;var f=0;var e=0;if(f>0&&h.rtl){f=0;e=1}var d=p.length;if(H){d=1;if(b.getAttribute("data-end-date")==null){t.setHours(0,0,0,0);var B=new a.jqx.date(t,h.timeZone).toString();var E=a(k).parent().index();a.each(p[0].cells,function(){var i=this.getAttribute("data-date");if(i===B){b=this;s=r.getAttribute("data-end-date")!=null&&b.getAttribute("data-end-date")!=null;var I=r.getAttribute("data-date");var j=b.getAttribute("data-date");var K=n(I);var J=n(j);w=Math.min(K,J);A=Math.max(K,J);return false}})}}for(var z=0;z1){var y=parseInt(b.getAttribute("data-view"));var l=p.length/h.tableRows;var o=(-1+y)*l;c=p[o];g=p[o]}var c=g.cells;for(var x=f;xe+k._hostHeight){return null}if(s>n+k._hostWidth){return null}var q=false;var r=k.rows;var o=k._views[k._view];var t=o.type;var D=0;var m=k.vScrollInstance.value;var u=k.hScrollInstance.value;for(var B=0;B=1||b.allDay;var e=function(t,q){if(q.allDay||c){var w=f.getMaxAllDayAppointments(f.appointmentsToRender)}if(g){if(f.resizeTo){if(f.resizeTo>f.max){f.resizeTo=f.max}if(f.resizeTof.max){f.resizeFrom=f.max}if(f.resizeFromf.max){o=f.max}if(f.rtl&&c&&D){q.to=a.jqx.scheduler.utilities.getEndOfDay(o)}else{if(f.rtl&&(x=="monthView"||x=="timelineMonthView")){q.to=a.jqx.scheduler.utilities.getEndOfDay(o)}else{if(f.rtl&&(x=="timelineDayView"||x=="timelineWeekView")){var n=f.getMinutesPerScale();q.to=o.addMinutes(n)}else{q.from=o}}}if(x==="dayView"||x==="weekView"){if(!c&&!D){q.to=o.add(d);q.allDay=false}else{if(!c&&D){q.to=a.jqx.scheduler.utilities.getEndOfDay(o);q.allDay=true}else{if(c&&D&&!f.rtl){q.to=o.add(d);if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{if(c&&D&&f.rtl){q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)));if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{if(c&&!D){var A=30;var E=u.timeRuler&&u.timeRuler.scale;switch(E){case"sixtyMinutes":case"hour":A=60;break;case"fifteenMinutes":case"quarterHour":A=15;break;case"tenMinutes":A=10;break;case"fiveMinutes":A=5;break}q.to=o.addMinutes(A);q.allDay=false}}}}}}else{if(x==="monthView"){if(!f.rtl){q.to=o.add(d)}else{q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)))}}else{if(x==="timelineDayView"||x==="timelineWeekView"||x==="timelineMonthView"){if(!f.rtl){q.to=o.add(d)}else{if(x=="timelineMonthView"){q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)))}else{var n=f.getMinutesPerScale();q.from=o.addMinutes(n).add(new a.jqx.timeSpan(-d))}}}}}}f._saveChangesAfterDragOrResize(t,q,i,f.resizing);var x=a(i).attr("data-view");var y=f._resources[parseInt(x)-1];if(y!=null){q.resourceId=y}f.resizing=false;f.resizeFrom=null;f._dragCell=null;f.resizeTo=null;var p={};var v={};for(var F in f.appointmentDataFields){var m=f.appointmentDataFields[F];var z=q[F];p[F]=z;if(F=="from"||F=="to"){z=z.toDate()}v[m]=z}p.jqxAppointment=q;p.originalData=v;q.boundAppointment=p;f._raiseEvent("appointmentChange",{appointment:q.boundAppointment});f.changedAppointments[q.id]={type:"Update",appointment:q.boundAppointment};f.table.find(".jqx-icon-arrow-down").hide();if(f._views[f._view].type=="monthView"&&f._views[f._view].monthRowAutoHeight){f._renderrows()}else{if((f._views[f._view].type=="weekView"||f._views[f._view].type=="dayView")&&(q.allDay||c)){if(f.tableRows>1){f._renderrows()}else{var s=f.getViewStart();var r=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(s,r);f._renderAppointments(s,r);var l=f.getMaxAllDayAppointments(f.appointmentsToRender);if(l!=w){var B=l*(f._defaultRowHeight-2);if(f.isTouchDevice()){B=Math.max(22+f._defaultRowHeight,17+B)}else{B=Math.max(3*f._defaultRowHeight,17+B)}if(f.tableRows==1){a(a(f.table[0].rows[0]).find("td")).css("height",B+"px")}else{a(a(f.table[0].rows[1]).find("td")).css("height",B+"px")}a(f.oldRow).find("td").css("height",B+"px");a(f.pinnedTableRow).find("td").css("height",B+"px");f.pinnedtable.height(B);f._updateScrollbars(f._hostHeight?f._hostHeight:f.host.height())}}}else{var s=f.getViewStart();var r=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(s,r);f._renderAppointments(s,r)}}f._removeFeedbackAndStopResize()};if(b.isRecurrentAppointment()){e(false,b)}else{e(null,b)}},_handleDayWeekViewResize:function(E,D,h,F,n){var C=this;var f=C._views[C._view].type;var B=C._views[C._view];var r=n.duration().days()>=1||n.allDay;if(!r&&!h.getAttribute("data-end-date")){var e=function(i){if(i<10){return false}return true};var j=C.findCell(C.feedback.coord().left,D);if(C.topResize){if(!C._lastResizeY){C._lastResizeY=C.mouseDownPosition.top}if(D>C._lastResizeY+a(h).height()/2){var v=C.selectedAppointmentTableBounds.height+C.selectedAppointmentTableBounds.top-F.top-a(h).height()-3;if(e(v)){C.feedback.css("top",2+F.top+a(h).height());C.feedback.height(v);C._lastResizeY=C.feedback.coord().top;var M=new a.jqx.date(j.getAttribute("data-date"),C.timeZone);C.resizeFrom=M.addMinutes(C.getMinutesPerScale())}}else{if(DC._lastResizeY+a(h).height()/2){var G=-5+a(h).height()+F.top-C.selectedAppointmentTableBounds.height-C.selectedAppointmentTableBounds.top;var v=C.selectedAppointmentTableBounds.height+G;if(e(v)){C.feedback.height(v);C._lastResizeY=C.selectedAppointmentTableBounds.height+G+C.feedback.coord().top;C.resizeTo=new a.jqx.date(j.getAttribute("data-date"),C.timeZone).addMinutes(C.getMinutesPerScale())}}else{if(DC._lastResizeX+a(h).width()/2){var d=C.selectedAppointmentTableBounds.width+C.selectedAppointmentTableBounds.left-F.left-C.cellWidth;if(p(d)){C.feedback.css("left",5+F.left+C.cellWidth);C.feedback.width(d-5);C.feedback.hide();C.pinnedfeedback.css("left",5+F.left+C.cellWidth);C.pinnedfeedback.width(d-5);C._lastResizeX=C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone).addDays(1)}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone)).addDays(-1)}}}else{if(EC._lastResizeX+m){var G=a(h).width()+F.left-C.selectedAppointmentTableBounds.width-C.selectedAppointmentTableBounds.left;var d=C.selectedAppointmentTableBounds.width+G;if(p(d)){C.feedback.hide();C.feedback.width(d-6);C.feedback.css("left",5+F.left);C.pinnedfeedback.width(d-6);C._lastResizeX=C.selectedAppointmentTableBounds.width+G+C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone))}else{C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone)}}}else{if(EC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.to);J=t.length-1}}}if(C.rtl){t.push(k);b.push(H.addDays(-L-1));if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.to);J=t.length-1}}}k+=c}else{if(!C.rtl){if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(kC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.to);J=t.length-1}}k+=c;t.push(k);b.push(s.addDays(L))}else{if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.to);J=t.length-1}}k+=c;t.push(k);b.push(H.addDays(-L-1))}}}if(C.leftResize){for(var L=0;L=F&&O<=N:O>=F;if(g){var c=-F+C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width;var q=C.pinnedfeedback.width();var I=C.pinnedfeedback.css("left");var l=C.resizeTo;var w=C.resizeFrom;if(c>0){C.pinnedfeedback.css("left",F);C.pinnedfeedback.width(c);if(L==K){if(!C.rtl){C.resizeFrom=n.from}else{C.resizeTo=n.from}}else{if(L==J){if(!C.rtl){C.resizeFrom=n.to}else{C.resizeTo=n.to}}else{if(!C.rtl){C.resizeFrom=b[L]}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(b[L])}}}}}}var o=C.resizeFrom;var P=C.resizeTo;if(C.rtl){o=n.from}else{P=n.to}var u=new a.jqx.timeSpan(10000*(P-o));if(u.days()<1){C.pinnedfeedback.css("left",I);C.pinnedfeedback.width(q);C.resizeFrom=w;C.resizeTo=l}}else{if(C.rightResize){for(var L=0;L=F-this.cellWidth/3&&E<=N-this.cellWidth/3:E>=F-this.cellWidth/3;if(g){var c=F-C.selectedAppointmentTableBounds.left-15;var q=C.pinnedfeedback.width();C.pinnedfeedback.width(c);var l=C.resizeTo;var w=C.resizeFrom;if(L==K){if(!C.rtl){C.resizeTo=n.from}else{C.resizeFrom=n.from}var c=F-C.selectedAppointmentTableBounds.left-9;C.pinnedfeedback.width(c);break}else{if(L==J){if(!C.rtl){C.resizeTo=n.to}else{C.resizeFrom=n.to}var c=F-C.selectedAppointmentTableBounds.left-9;C.pinnedfeedback.width(c);break}else{if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(b[L])}else{C.resizeFrom=b[L]}break}}}}var o=C.resizeFrom;var P=C.resizeTo;if(!C.rtl){o=n.from}else{P=n.to}var u=new a.jqx.timeSpan(10000*(P-o));if(u.days()<1){C.pinnedfeedback.width(q);C.resizeFrom=w;C.resizeTo=l}}}}}},_handleTimelineMonthViewResize:function(t,s,q,M,k){var p=this;var w=p._views[p._view].type;var r=p._views[p._view];var D=function(i){if(i<10){return false}return true};var E=p.findCell(t,p.feedback.coord().top);if(k.allDay){if(p.leftResize){if(!p._lastResizeX){p._lastResizeX=p.mouseDownPosition.left}if(t>p._lastResizeX+a(q).width()/2){var v=p.selectedAppointmentTableBounds.width+p.selectedAppointmentTableBounds.left-M.left-a(q).width();if(D(v)){p.feedback.css("left",M.left+a(q).width());p.feedback.width(v);p._lastResizeX=p.feedback.coord().left;if(!p.rtl){p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(1)}else{p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(-1))}}}else{if(tp._lastResizeX+a(q).width()/2){var n=a(q).width()+M.left-p.selectedAppointmentTableBounds.width-p.selectedAppointmentTableBounds.left;var v=p.selectedAppointmentTableBounds.width+n-5;if(D(v)){p.feedback.width(v);p._lastResizeX=p.selectedAppointmentTableBounds.width+n+p.feedback.coord().left;if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone))}else{p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone)}}}else{if(tp.selectedAppointmentTableBounds.left){o.push(p.selectedAppointmentTableBounds.left);L.push(k.from);u=o.length-1}}if(k.to.hour()!=23||(k.to.hour()==23&&k.to.minute()!=59)){if(jp.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width){o.push(p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width+8);L.push(k.to);A=o.length-1}}j+=C}else{if(k.from.hour()!=0||(k.from.hour()==0&&k.from.minute()!=0)){if(jp.selectedAppointmentTableBounds.left){o.push(p.selectedAppointmentTableBounds.left);L.push(k.from);u=o.length-1}}if(k.to.hour()!=23||(k.to.hour()==23&&k.to.minute()!=59)){if(jp.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width){o.push(p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width);L.push(k.to);A=o.length-1}}j+=C;o.push(j);if(!p.rtl){L.push(m.addDays(J))}else{L.push(l.addDays(-J-1))}}}if(p.leftResize){for(var J=0;J=c&&d<=H:d>=c;if(I){var C=-c+p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width;var B=p.feedback.width();var f=p.feedback.css("left");var F=p.resizeTo;var K=p.resizeFrom;p.feedback.css("left",c);p.feedback.width(C);if(J==u){if(!p.rtl){p.resizeFrom=k.from}else{p.resizeTo=k.from}}else{if(J==A){if(!p.rtl){p.resizeFrom=k.to}else{p.resizeTo=k.to}}else{if(!p.rtl){p.resizeFrom=L[J]}else{p.resizeTo=L[J]}}}}}var G=p.resizeFrom;var e=p.resizeTo;if(p.rtl){G=k.from}else{e=k.to}var b=new a.jqx.timeSpan(10000*(e-G));if(p.feedback.width()<20){p.feedback.css("left",f);p.feedback.width(B);p.resizeFrom=K;p.resizeTo=F}}else{if(p.rightResize){for(var J=0;J=c-this.cellWidth/3&&d<=H-this.cellWidth/3:d>=c-this.cellWidth/3;if(I){var C=c-p.selectedAppointmentTableBounds.left-12;var B=p.feedback.width();p.feedback.width(C);var F=p.resizeTo;var K=p.resizeFrom;if(J==u){if(!p.rtl){p.resizeTo=k.from}else{p.resizeFrom=k.from}var C=c-p.selectedAppointmentTableBounds.left;p.feedback.width(C);break}else{if(J==A){if(!p.rtl){p.resizeTo=k.to}else{p.resizeFrom=k.to}var C=c-p.selectedAppointmentTableBounds.left;p.feedback.width(C);break}else{if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(L[J])}else{p.resizeFrom=L[J]}break}}}}var G=p.resizeFrom;var e=p.resizeTo;if(!p.rtl){G=k.from}else{e=k.to}var b=new a.jqx.timeSpan(10000*(e-G));if(p.feedback.width()<20){p.feedback.width(B);p.resizeFrom=K;p.resizeTo=F}}}}},_handleMonthViewResize:function(K,I,g,L,r){var H=this;if(!H.selectedJQXAppointment){return}var f=H._views[H._view].type;var G=H._views[H._view];var v=function(i){if(i<10){return false}return true};var s=-5;if(H.tableColumns>1){s=parseInt(-5/H.tableColumns)}for(var R=0;R1){H.feedbacks[R][0].style.top=parseInt(H.rows[6*k+R].top)+E+"px"}a(H.feedbacks[R][0]).find(".jqx-scheduler-appointment-resize-indicator").css("visibility","inherit")}var l=H.selectedJQXAppointment.elements;var c=l[0].cells[0].cell;var J=l[l.length-1];var N=J.lastCellY;var h=J.lastCellX;var n=l[0].cellY;var B=l[0].cellX;var t=parseInt(L.top);var S=parseInt(L.left);if(!H.rtl){if(H.leftResize){var O=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A=u.x&&K-b<=u.x+M+2){C[0].style.left=m+"px";C[0].style.width=u.width+"px";O=true}}}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(tN){C[0].style.display="none"}if(A=N){for(var Q=0;QN||(t==N&&S>h)){if(o==A){C[0].style.display="block";C[0].style.width=l[Q].width+"px";C[0].style.left=l[Q].x+"px"}}else{if(t==N&&S<=h){if(n!=N){C[0].style.width=l[Q].width-L.left+parseInt(e)+"px"}}}}}}var D=new a.jqx.date(g.getAttribute("data-date"),H.timeZone);if(D=B){C[0].style.width=S+F-m-5+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=h&&K-b<=u.x+u.width+15){C[0].style.width=u.width+"px";p=true}}}else{C[0].style.width=u.width+"px"}}else{if(tn){C[0].style.left=m+"px";C[0].style.width=s-m+parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=S+F-5-parseInt(e)+"px"}}if(At&&A>n){C[0].style.display="none"}if(t<=n){for(var Q=0;QH.selectedJQXAppointment.from&&!p){H.resizeTo=D}else{H.resizeTo=H.selectedJQXAppointment.to}}}}else{if(H.leftResize){var p=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(Au.x+u.width){C[0].style.width=u.width+"px";C[0].style.left=u.x+"px"}if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=u.x-10&&K-b<=u.cellX+H.cellWidth){C[0].style.width=u.width+"px";C[0].style.left=u.x+"px";p=true}}}else{if(tn){C[0].style.left=e;C[0].style.width=u.x+u.width-parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=s-L.left+parseInt(e)+"px";C[0].style.left=L.left+"px"}}if(At){C[0].style.display="none"}if(tu.x+u.width){C[0].style.left=u.x+"px"}C[0].style.width=-1+u.x+u.width-L.left+"px"}}}}}var D=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(g.getAttribute("data-date"),H.timeZone));if(D>H.selectedJQXAppointment.from&&!p){H.resizeTo=D}else{H.resizeTo=H.selectedJQXAppointment.to}}else{if(H.rightResize){var O=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A=B){C[0].style.width=S+F-m-5+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=u.lastCellX&&K-b<=u.x+u.width+15){C[0].style.width=u.width+"px";O=true}}}else{C[0].style.width=u.width+"px"}}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(tN){C[0].style.display="none"}if(AN){for(var Q=0;Q0){a(this).find(".jqx-scheduler-appointment-left-resize-indicator")[0].style.visibility="hidden"}if(i0){a(this).find(".jqx-scheduler-appointment-right-resize-indicator")[0].style.visibility="hidden"}if(ii._lastResizeX+a(d).width()/2){var g=i.selectedAppointmentTableBounds.width+i.selectedAppointmentTableBounds.left-h.left-a(d).width();if(j(g)){i.feedback.css("left",2+h.left+a(d).width());i.feedback.width(g);i._lastResizeX=i.feedback.coord().left;if(!i.rtl){i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}else{i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}}}else{if(mi._lastResizeX+a(d).width()/2){var f=a(d).width()+h.left-i.selectedAppointmentTableBounds.width-i.selectedAppointmentTableBounds.left;var g=i.selectedAppointmentTableBounds.width+f;if(j(g)){i.feedback.width(g);i._lastResizeX=i.selectedAppointmentTableBounds.width+f+i.feedback.coord().left;if(!i.rtl){i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}else{i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}}}else{if(ml){g.hScrollInstance.setPosition(g.hScrollInstance.value+5)}}}else{if(c>l){g.hScrollInstance.setPosition(g.hScrollInstance.value-5)}else{if(c=1||e.allDay;if(j&&l){q-=20}else{if(j&&g.resizing){q+=a(g.table[0].rows[0]).height();n-=a(g.table[0].rows[0]).height()}}var p=q+25;var o=n+p-45;if(io){g.vScrollInstance.setPosition(g.vScrollInstance.value+5)}}},5)}}g.resizing=true},_startTimers:function(b,h,d){var f=this;var g=f.host.coord();var e=0;var c=0;if(f.hScrollInstance.element.style.visibility!="hidden"){clearInterval(f._horizontalIntervalDragVelocity);f._horizontalIntervalDragVelocity=setInterval(function(){e++;if(e>40){e=40}},100);clearInterval(f._horizontalIntervalDrag);f._horizontalIntervalDrag=setInterval(function(){var j=f._hostWidth;var l=g.left;var i=l+30;var k=j+i-60;if(!f.rtl){if(bk){f.hScrollInstance.setPosition(f.hScrollInstance.value+10+e)}else{e=0}}}else{if(bk){f.hScrollInstance.setPosition(f.hScrollInstance.value-10-e)}else{e=0}}}},10)}if(f.vScrollInstance.element.style.visibility!="hidden"){clearInterval(f._verticalIntervalDragVelocity);f._verticalIntervalDragVelocity=setInterval(function(){c++;if(c>40){c=40}},100);clearInterval(f._intervalDrag);f._intervalDrag=setInterval(function(){var m=f._hostHeight;var o=0;if(!f.columnGroups){o+=f.showHeader?f.columnsHeight:0}else{o+=f.showHeader?f.columnsheader.height():0}var p=f._views[f._view].type;var r=f._views[f._view];if(f.showToolbar){o+=f.toolbarHeight}m-=o;if(f.showLegend&&f._resources.length>0){m-=f.legendHeight}var k=g.top;var q=o+k;if(p=="dayView"||p=="weekView"){var j=f.showAllDayRow;if(r.timeRuler&&(p==="dayView"||p==="weekView")){if(r.timeRuler.showAllDayRow!=undefined){j=r.timeRuler.showAllDayRow}}var l=d.duration().days()>=1||d.allDay;if(j&&l){q-=20}else{if(j&&f.resizing){q+=a(f.table[0].rows[0]).height()}}}var n=q+30;var i=k+m+o-30;if(hi){f.vScrollInstance.setPosition(f.vScrollInstance.value+10+c)}else{c=0}}},10)}},_hoverCell:function(b){var c=this;if(!c.enableHover){return true}if(c._resources.length>0){if(b.className.indexOf("pinned")>=0){return true}}if(b.className.indexOf("time-column")>=0){return true}if(b.className.indexOf("jqx-scheduler-disabled-cell")>=0){return true}if(b&&b==c.hoveredCell){return true}c.hoveredCell=b;if(!b){return true}c._removeHoveredCell();c.hoveredCell=b;b.className+=" "+c.toTP("jqx-fill-state-hover")+" "+c.toTP("jqx-grid-cell-hover")+" "+c.toTP("jqx-scheduler-cell-hover");b.jqxClassName=b.className},_removeHoveredCell:function(){var d=this;if(d.hoveredCell){var c=d.hoveredCell;var b=function(e){var f=c.className;f=f.replace(" "+d.toTP("jqx-fill-state-hover"),"");f=f.replace(" "+d.toTP("jqx-grid-cell-hover"),"");f=f.replace(" "+d.toTP("jqx-scheduler-cell-hover"),"");c.className=f;c.jqxClassName=f};b(c)}d.hoveredCell=null},_addHandlers:function(){var i=this;this._mousewheelfunc=this._mousewheelfunc||function(m){i.wheel(m,i);return false};this.focused=false;var g=false;this.addHandler(a(document),"keydown.scheduler"+i.element.id,function(m){g=false;if(m.keyCode===9&&m.shiftKey&&!i.focused){g=true}});this.addHandler(this.host,"focus",function(n){if(i.focusedCell&&!i.selectedAppointment&&!g){a(i.focusedCell).addClass(i.toThemeProperty("jqx-scheduler-cell-focus"))}i.focused=true;if(g){if(i.appointmentsToRender.length>0){var m=i.appointmentsToRender[i.appointmentsToRender.length-1];i._selectAppointment(m);i._lastSelectedAppointment=m}else{if(!i.focusedCell){i._updateFocusedCell()}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();return false}}}}}});this.addHandler(this.host,"blur",function(m){if(i.focusedCell){if(document.activeElement==i.element){return true}if(a(document.activeElement).ischildof(i.host)){return true}a(i.focusedCell).removeClass(i.toThemeProperty("jqx-scheduler-cell-focus"));i.focused=false}});this.addHandler(this.host,"dragstart."+this.element.id,function(m){return false});this.addHandler(this.host,"selectstart."+this.element.id,function(m){if(i.enableBrowserSelection){return true}if(i.showToolBar){if(a(m.target).ischildof(i.toolbar)){return true}}if(i.rowDetails){if(a(m.target).parents("[data-role=details]").length>0){return true}}if(undefined==i.editKey){return false}});this.addHandler(a(window),"jqxReady."+this.element.id,function(){});this.removeHandler(this.host,"mousewheel",this._mousewheelfunc);this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var d=this.isTouchDevice();this.vScrollInstance.valueChanged=function(m){if(i._timer){clearTimeout(i._timer)}if(d){if(i.table){i.table[0].style.top=0-i.vScrollInstance.value+"px"}}else{i._timer=setTimeout(function(){if(i.table){i.table[0].style.top=0-i.vScrollInstance.value+"px"}},1)}};this.hScrollInstance.valueChanged=function(m){if(i._htimer){clearTimeout(i._htimer)}if(d){if(i.table){i._renderhorizontalscroll()}}else{i._htimer=setTimeout(function(){if(i.table){i._renderhorizontalscroll()}},1)}};var c="mousedown";if(this.isTouchDevice()){c=a.jqx.mobile.getTouchEventName("touchstart");if(a.jqx.browser.msie&&a.jqx.browser.version<10){c="mousedown"}}this.addHandler(this.table,"mouseleave",function(m){i._removeHoveredCell()});if(i.isTouchDevice()){i.enableHover=false}var h="mousemove.scheduler"+this.element.id;var e="mouseup.scheduler"+this.element.id;if(this.isTouchDevice()&&this.touchMode!==true){h=a.jqx.mobile.getTouchEventName("touchmove")+".scheduler"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchend")+".scheduler"+this.element.id}this.addHandler(a(document),h,function(X){var M=X.pageX;var L=X.pageY;if(i.isTouchDevice()){var N=a.jqx.position(X);M=N.left;L=N.top;if(isNaN(M)||isNaN(L)){var N=a.jqx.position(X.originalEvent);M=N.left;L=N.top}}if(i.disabled||X.which===3){return true}if(!i.isMouseDown){return true}if(i.hScrollInstance.isScrolling()||i.vScrollInstance.isScrolling()){return true}if(i._hostWidth){var D=i.host.coord();if(D.left+i._hostWidth=3&&Math.abs(i.mouseDownPosition.left-M)<=10)||(Math.abs(i.mouseDownPosition.top-L)>=3&&Math.abs(i.mouseDownPosition.top-L)<=10)){i.dragOrResize=true}}if(i.selectedAppointment&&i.dragOrResize){var w=null;if(i._hasOpenedMenu){return true}if(i.editRecurrenceDialog.jqxWindow("isOpen")){return true}var o=i._views[i._view].type;var K=i._views[i._view];var A=false;if(X.target.nodeName.toLowerCase()==="td"){var q=X.target}else{var q=i.findCell(M,L)}if(!q){return true}if(q.getAttribute("data-time-slot")!=undefined){return true}if(q.className.indexOf("jqx-grid-cell-pinned")>=0){return true}if(!i.feedback){w=i.getJQXAppointmentByElement(i.selectedAppointment);if(!w.draggable&&!w.resizable){w=null;return true}if(i.beginDrag){var t=i.beginDrag(w);if(!t){return true}}var T=a('[data-key="'+w.id+'"]');var B=i.selectedAppointment.position();i.feedback=i.selectedAppointment.clone(true);i.pinnedfeedback=i.selectedAppointment.clone(true);var V=!(i.selectedAppointment[0].style.cursor=="row-resize"||i.selectedAppointment[0].style.cursor=="col-resize"||i.resizing);var p=function(x){if(V){x.find(".jqx-scheduler-appointment-resize-indicator").hide()}T.addClass(i.toTP("jqx-scheduler-feedback-appointment jqx-disableselect"));x.find(".jqx-scheduler-appointment-duration-status").hide();x.addClass(i.toTP("jqx-scheduler-feedback-appointment"));x.addClass(i.toTP("jqx-scheduler-feedback-drag-appointment"));if(!V){x.css("z-index",400)}else{x.css("z-index",401)}};p(i.feedback);p(i.pinnedfeedback);if(i._views[i._view].type!="monthView"||V){i.table.append(i.feedback);if(i.tableRows==1){i.pinnedtable.append(i.pinnedfeedback)}else{i.table.append(i.pinnedfeedback)}i.feedback.css("left",B.left);i.feedback.css("top",B.top);i.pinnedfeedback.css("left",B.left);i.pinnedfeedback.css("top",B.top);if(i._views[i._view].type=="monthView"&&i.isTouchDevice()){i.feedbacks=new Array();for(var S=0;S<6;S++){i.feedbacks.push(i.feedback.clone(true));a(i.feedbacks[S]).hide();i.table.append(a(i.feedbacks[S]))}}}else{i.feedbacks=new Array();for(var S=0;S<6;S++){i.feedbacks.push(i.feedback.clone(true));a(i.feedbacks[S]).hide();i.table.append(a(i.feedbacks[S]))}}}if(i.dragging){var t=i.dragging(w,q,i.feedback);if(false===t){return true}}var N=a(q).position();if(i.endDrag){var I=i.feedback.css("left");var J=i.feedback.css("top");var z=i.feedback.width();var F=i.feedback.height}if(!w){w=i.selectedJQXAppointment}if(!w){i.selectAppointment(i.uiappointments[0].id);w=i.selectedJQXAppointment}var v=w.resourceId;var r=i._resources.indexOf(v);if(i.resources&&i.resources.orientation=="none"){r=-1}var Q=false;var U=i.isTouchDevice();if(U&&i.touchMode!==true&&i._dragCell==null&&!(i.leftResize||i.rightResize||i.topResize||i.bottomResize||i.resizing)){switch(o){case"dayView":case"weekView":var A=w.duration().days()>=1||w.allDay;if(!A){if(L>=i.selectedAppointmentBounds.top-15&&L<=i.selectedAppointmentBounds.top+15){Q=true;i.topResize=true}if(L>=i.selectedAppointmentBounds.top-15+i.selectedAppointmentBounds.height&&L<=i.selectedAppointmentBounds.top+i.selectedAppointmentBounds.height+15){Q=true;i.bottomResize=true}}else{if(M>=i.selectedAppointmentBounds.left-15&&M<=i.selectedAppointmentBounds.left+15){Q=true;i.leftResize=true}if(M>=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width-15&&M<=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width+15){Q=true;i.rightResize=true}}break;default:if(M>=i.selectedAppointmentBounds.left-15&&M<=i.selectedAppointmentBounds.left+15){Q=true;i.leftResize=true}if(M>=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width-15&&M<=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width+15){Q=true;i.rightResize=true}break}}if(U&&(i.leftResize||i.rightResize||i.topResize||i.bottomResize||i.resizing)||Q){if(q.getAttribute("data-view")!=r+1&&i._resources.length>0){if(i.resources.orientation!="none"){return true}}var W=i._getDateByString(q.getAttribute("data-date"));if(Wi.max.toDate()){return}i._handleResize(M,L,q,N,w);i._oldResizeTD=q}else{if(!U&&i.selectedAppointment[0].style.cursor=="row-resize"||i.selectedAppointment[0].style.cursor=="col-resize"||i.resizing){if(q.getAttribute("data-view")!=r+1&&i._resources.length>0){if(i.resources&&i.resources.orientation!="none"){return true}}var W=i._getDateByString(q.getAttribute("data-date"));if(Wi.max.toDate()){return}i._handleResize(M,L,q,N,w);i._oldResizeTD=q}else{if(!w.draggable){i._removeFeedbackAndStopResize();return true}if(i._dragCell==q){i._startTimers(M,L,w);if(i.isTouchDevice()&&i.touchMode!==true){X.stopPropagation();return false}else{return}}var W=i._getDateByString(q.getAttribute("data-date"));if(Wi.max.toDate()){return}var E=w.duration();if(o.indexOf("month")>=0&&new a.jqx.date(W).add(E)>i.max){return}var P=i.vScrollBar[0].style.visibility=="hidden"?0:6+i.vScrollBar.outerWidth();i._dragCell=q;i.feedback[0].style.left=2+N.left+"px";i.feedback[0].style.top=2+N.top+"px";if(o==="dayView"||o==="weekView"){i.pinnedfeedback.css("left",2+N.left);i.pinnedfeedback.css("top",2+N.top);var m=0;if(q.getAttribute("data-end-date")){var s=i.appointmentsMinHeight;if(i.isTouchDevice()){s=i.touchAppointmentsMinHeight}if(K.appointmentHeight){s=K.appointmentHeight}A=w.duration().days()>=1||w.allDay;i.feedback.css("top",2+N.top+s);i.pinnedfeedback.css("top",2+N.top+18);if(o=="dayView"){var R=i.selectedAppointment.coord().left-9;i.feedback.css("left",R);i.pinnedfeedback.css("left",R)}if(A){i.pinnedfeedback.css("top",w.elements[0].y);m=i.selectedAppointment.width();if(2+N.left+m>i.host.width()-P){var C=2+N.left+m-i.host.width()+P+6;m-=C}i.feedback.width(m);i.feedback.height(s);i.pinnedfeedback.width(m);i.pinnedfeedback.height(s)}else{m=a(q).width()-4;i.feedback.width(m);i.feedback.height(s);i.pinnedfeedback.width(m);i.pinnedfeedback.height(s)}i.feedback.hide();i.pinnedfeedback.show()}else{i.feedback.show();i.pinnedfeedback.hide();var u=2;var O=30;var H=K.timeRuler&&K.timeRuler.scale;switch(H){case"sixtyMinutes":case"hour":u=1;break;case"thirtyMinutes":case"halfHour":u=2;break;case"fifteenMinutes":case"quarterHour":u=4;break;case"tenMinutes":u=6;break;case"fiveMinutes":u=12;break}m=a(q).width()-4;i.feedback.width(m);A=w.duration().days()>=1||w.allDay;if(A){i.feedback.height((a(q).height())-6)}else{i.feedback.height(i.selectedAppointment.height())}}i._startTimers(M,L,w)}else{if(o==="monthView"){i.feedback.css("left",1+N.left);var n=i.selectedAppointmentTableBounds;var G=parseInt(n.top);if(G>N.top&&GN.top&&G=0&&o.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&o.target.className.indexOf("jqx-scheduler-appointment-content")==-1&&o.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){n=o.target}var u=o.target;for(var v=0;v<4;v++){if(u.parentNode){if(u.className.indexOf("jqx-scheduler-appointment")>=0&&u.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&u.className.indexOf("jqx-scheduler-appointment-content")==-1&&u.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){n=u}u=u.parentNode}else{break}}if(n){var B=i._views[i._view].type;var E=i._views[i._view];var D=i.getJQXAppointmentByElement(n);if(D.resizable){var t=D.duration();var p=D.allDay||t.days()>=1||(t.hours()==23&&t.minutes==59&&t.seconds==59);var z=a(n).coord();var w=a(n).position();i.selectedAppointmentBounds={top:z.top,left:z.left,width:a(n).width(),height:a(n).height()};i.selectedAppointmentTableBounds={top:w.top,left:w.left,width:a(n).width(),height:a(n).height()};var m=i.selectedAppointmentBounds;if(B=="weekView"||B=="dayView"){if(!p){if(A>=m.top-3&&A<=m.top+6){n.style.cursor="row-resize";i.topResize=true;i.bottomResize=false}else{if(A>=m.top+m.height-6&&A<=m.top+m.height+3){n.style.cursor="row-resize";i.topResize=false;i.bottomResize=true}else{n.style.cursor="pointer"}}}else{if(B!="dayView"){if(C>=m.left-3&&C<=m.left+6){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false}else{if(C>=m.left+m.width-6&&C<=m.left+m.width+3){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true}else{n.style.cursor="pointer"}}}else{n.style.cursor="pointer"}}}else{if(B=="monthView"&&D.elements.length>1){var s=i.table.coord();for(var v=0;v=m.left-3&&C<=m.left+6){if(A>=m.top&&A<=m.top+m.height){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false;i.selectedAppointment=a(n);break}else{n.style.cursor="pointer"}}else{n.style.cursor="pointer"}}else{if((v==D.elements.length-1&&!i.rtl)||(v==0&&i.rtl)){if(C>=m.left+m.width-6&&C<=m.left+m.width+3){if(A>=m.top&&A<=m.top+m.height){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true;i.selectedAppointment=a(n);break}else{n.style.cursor="pointer"}}else{n.style.cursor="pointer"}}}}}else{if(C>=m.left-3&&C<=m.left+6){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false}else{if(C>=m.left+m.width-6&&C<=m.left+m.width+3){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true}else{n.style.cursor="pointer"}}}}}}if(!i.enableHover){return true}if(o.target.nodeName.toLowerCase()==="td"){var r=o.target}else{var r=i.findCell(C,A)}if(!r){return true}i._removeHoveredCell();if(i.renderedRecords&&i.renderedRecords.length===0){return true}if(i.isMouseDown){if(Math.abs(i.mousecaptureposition.left-C)>3||Math.abs(i.mousecaptureposition.top-A)>3){if(i.mousecaptureposition.clickedcell.length===0){i.selectionarea[0].style.visibility="hidden";return}if(i.lastHoveredCell!=r){if(i._selectRangeTimer){clearTimeout(i._selectRangeTimer)}i._selectRangeTimer=setTimeout(function(){var x=i._views[i._view].type;if(x!="agendaView"){i._selectRange(r,i.mousecaptureposition.clickedcell[0])}},1)}i.lastHoveredCell=r}}else{if(!n){if(i.rows.length==1&&i.rows[0].cells.length==1){return true}i._hoverCell(r)}}return true});this.addHandler(a(document),"keydown.jqxscheduler"+i.element.id,function(m){if(i.focused&&m.ctrlKey){if(m.keyCode==68){return false}}});this.addHandler(this.host,"keydown",function(m){return i._handleKey(m)});if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.addHandler(this.table,"dblclick",function(m){i.table.trigger("mousedown",m)})}var j=function(K){var M=K.target;var u=null;if(i.disabled){return true}if(!i.menu&&K.which==3){i._initMenu()}var n=i.table.coord();var B=K.pageX;var w=K.pageY;if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(arguments&&arguments.length==2){B=arguments[1].pageX;w=arguments[1].pageY}}if(i.isTouchDevice()){var N=a.jqx.position(K);B=N.left;w=N.top;if(isNaN(B)||isNaN(w)){var N=a.jqx.position(K.originalEvent);B=N.left;w=N.top}}i.mouseDown={top:w,left:B};var u=i.findCell(B,w);if(K.target.nodeName.toLowerCase()==="td"){var u=K.target}else{var u=i.findCell(B,w)}var D=i._views[i._view].type;var v=i._views[i._view];if(D==="monthView"&&v.weekViewNavigation){if(u&&u.getAttribute("data-time-slot")){var z=i._getDateByString(u.getAttribute("data-date"));var J=new a.jqx.date(z);i.date=J;i.setView("weekView")}}if(D==="monthView"&&v.dayViewNavigation){var m=a(u).coord().top;if(u&&w>=m&&m+16>=w){var z=i._getDateByString(u.getAttribute("data-date"));var J=new a.jqx.date(z);i.date=J;i.setView("dayView")}}if(K.target.nodeName.toLowerCase()==="span"&&(K.target.className.indexOf("jqx-icon-arrow-down")>=0||K.target.className.indexOf("jqx-icon-close")>=0)){if(K.target.mousedown){K.target.mousedown()}return true}var t=a(u).parent();var P=t.attr("data-key");i.mousecaptureposition={left:K.pageX,top:K.pageY,clickedrow:a(t).index(),clickedcell:a(u)};if(K.which!==3){i.isMouseDown=true;i.isMouseDownDate=new Date()}else{i.isMouseDown=false}if(i.contextMenu&&i.menu&&K.which!==3){i.menu.jqxMenu("close");i._hasOpenedMenu=false}var r=function(y){if(K.which===3){if(i.contextMenu&&i.menu){if(y){i.menu.find("li:first").show()}else{i.menu.find("li:first").hide()}var x=i.menu.coord();if(i.menu.css("display")=="block"&&x.left==K.pageX&&x.top==K.pageY){i._hasOpenedMenu=true;K.preventDefault();K.stopPropagation();return}if(D==="agendaView"){}i.menuOpening=true;i.menu.jqxMenu("open",K.pageX,K.pageY);i.menuOpening=false;i._hasOpenedMenu=true;K.preventDefault();K.stopPropagation();setTimeout(function(){i.menu.jqxMenu("focus")},50)}}};var I=function(){for(var Q=0;Q=0&&K.target.className.indexOf("jqx-scheduler-appointment-duration-status")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-status")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-content")==-1?a(K.target):a(K.target).parents(".jqx-scheduler-appointment");if(q.length==0){q=null}if(q&&q[0].className.indexOf("feedback")==-1){if(q.parents(".jqx-scheduler-month-cell-popup").length>0){return true}i.mouseDownPosition={top:w,left:B};var H=a(q).coord();i.selectedAppointmentBounds={top:H.top,left:H.left,width:a(q).width(),height:a(q).height()};var N=a(q).position();i.selectedAppointmentTableBounds={top:N.top,left:N.left,width:a(q).width(),height:a(q).height()};if(!i._dragStartCell){i._dragStartCell=i.findCell(H.left,H.top)}var p=i.getJQXAppointmentByElement(q);i._selectAppointment(p,q,"mouse");i._raiseEvent("appointmentClick",{appointment:p.boundAppointment});i.clearSelection();var s=new Date().getTime();var F=300;if(a.jqx.browser.msie&&a.jqx.browser.version<9){F=1000}if(!i.clickTime){i.clickTime=new Date()}if((s-i.clickTime.getTime()F){if(u.getAttribute("data-time-slot")=="true"){return}if(!K.shiftKey){i.shiftSelectedCell=null}if(K.shiftKey&&i._lastSelectedCell&&D!="agendaView"){if(!i.shiftSelectedCell){i.shiftSelectedCell=i._lastSelectedCell}if(u.getAttribute("data-view")===i.shiftSelectedCell.getAttribute("data-view")){I()}i._selectRange(u,i.shiftSelectedCell)}if(!K.shiftKey){I();var z=i._getDateByString(u.getAttribute("data-date"));if(z>=i.min.toDate()&&z<=i.max.toDate()){u.setAttribute("data-selected","true")}else{u.setAttribute("data-selected","false")}}a('[data-key="'+P+'"]').removeClass(i.toTP("jqx-scheduler-selected-appointment"));i.selectedAppointment=null;var z=i._getDateByString(u.getAttribute("data-date"));if(z>=i.min.toDate()&&z<=i.max.toDate()){i._lastSelectedCell=u;i.focusedCell=u}i._updateCellsSelection(u);if(i.openedMonthCellPopup){i.openedMonthCellPopup.remove()}}i._raiseEvent("cellClick",{cell:u,date:L});i.clickTime=new Date();if(K.stopPropagation){K.stopPropagation()}}};this.addHandler(this.pinnedtable,c,function(n){var m=j(n);if(m!=undefined){return m}});this.addHandler(this.table,c,function(n){var m=j(n);if(m!=undefined){return m}})},moveAppointment:function(k,c,g,f,j){var h=this;var i=f.getAttribute("data-end-date");if(k){if(h.editRecurrenceDialog.jqxWindow("isOpen")){return}clearInterval(h._verticalIntervalDragVelocity);clearInterval(h._horizontalIntervalDragVelocity);clearInterval(h._intervalDrag);clearInterval(h._horizontalIntervalDrag);var d=k.duration();var b=k.duration().days()>=1||k.allDay;var e=function(r){if(!j){var l=h._views[h._view].type;var o=h._views[h._view];var p=c;k.from=p;if(l==="dayView"||l==="weekView"){if(!b&&!i){k.to=p.add(d);k.allDay=false}else{if(!b&&i){k.to=a.jqx.scheduler.utilities.getEndOfDay(p);k.allDay=true}else{if(b&&i){k.to=p.add(d)}else{if(b&&!i){var n=30;var q=o.timeRuler&&o.timeRuler.scale;switch(q){case"sixtyMinutes":case"hour":n=60;break;case"fifteenMinutes":case"quarterHour":n=15;break;case"tenMinutes":n=10;break;case"fiveMinutes":n=5;break}k.to=p.addMinutes(n);k.allDay=false}}}}}else{if(l==="monthView"){k.to=p.add(d)}else{if(l==="timelineDayView"||l==="timelineWeekView"||l==="timelineMonthView"){k.to=p.add(d)}}}}h._saveChangesAfterDragOrResize(r,k,f,j);if(g!=null){k.resourceId=g}h.table.find(".jqx-icon-arrow-down").hide();if(k.allDay||b){h._renderrows()}else{var s=h.getViewStart();var m=a.jqx.scheduler.utilities.getEndOfDay(h.getViewEnd());h._prepareAppointmentsInView(s,m);h._renderAppointments(s,m)}h._raiseEvent("appointmentChange",{appointment:k.boundAppointment});h.changedAppointments[k.id]={type:"Update",appointment:k.boundAppointment};h._ensureAppointmentVisible(h.selectedJQXAppointment)};if(k.isRecurrentAppointment()){e(false)}else{e(null)}}},getAppointmentProperty:function(d,b){var e=this;var c=null;if(this.appointmentsByKey[d]){c=this.appointmentsByKey[d].jqxAppointment}if(!c){return}return c[b]},setAppointmentProperty:function(e,b,g){var f=this;var c=null;if(this.appointmentsByKey[e]){c=this.appointmentsByKey[e].jqxAppointment}if(!c){return}c[b]=g;f.changedAppointments[e]={type:b,appointment:c.boundAppointment};switch(e){case"draggable":case"resizable":break;case"background":case"color":case"borderColor":case"status":case"tooltip":case"subject":case"location":case"description":case"style":var h=f.getViewStart();var d=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(h,d);f._renderAppointments(h,d);break;case"hidden":case"timeZone":if(c.isAllDayAppointment()){f._renderrows()}else{var h=f.getViewStart();var d=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(h,d);f._renderAppointments(h,d)}break;default:f._renderrows()}},deleteAppointment:function(b){if(this.appointmentsByKey[b]){this._deleteAppointment(this.appointmentsByKey[b].jqxAppointment)}},_deleteAppointment:function(b){var g=this;if(b.rootAppointment){if(!b.isException()){if(b.rootAppointment!=null){b.rootAppointment.exceptions.push(g.editAppointment);b.rootAppointment.recurrenceException.push(g.editAppointment.occurrenceFrom)}else{b.exceptions.push(g.editAppointment);b.recurrenceException.push(g.editAppointment.occurrenceFrom)}}else{var f=b.rootAppointment?b.rootAppointment.exceptions:b.exceptions;for(var e=0;e=0){q=q.substring(q.indexOf("EXDATE:")+7)}var l=new Array();if(q.indexOf(",")>=0){l=q.split(",")}else{l.push(q)}for(var s=0;s=0){var h=p.split(";")[1];p=p.split(";")[0];if(h.toLowerCase().indexOf("display")>=0&&h.toLowerCase().indexOf("none")){d.hidden=true}}try{var u=a.jqx.scheduler.utilities.untilStringToDate(p);if(u!="Invalid Date"){if(d.timeZone){u=new a.jqx.date(u,d.timeZone)}else{if(g.timeZone){u=u.toTimeZone(g.timeZone)}else{u=new a.jqx.date(u)}}}}catch(v){var u=new a.jqx.date(p,g.timeZone)}t.push(u)}}q=t}d[w]=q}for(var m in e){var w=e[m];if(d[w]==undefined){var q="";if(w=="originalData"){continue}if(w=="ownerId"){q=null}if(w=="timeZone"){q=null}if(w=="recurrencePattern"){q=null}if(w=="recurrenceException"){q=null}if(w=="allDay"){q=false}if(w=="draggable"){q=true}if(w=="resizable"){q=true}if(w=="hidden"){q=false}if(w=="resourceId"){q=null}if(w=="from"){q=new a.jqx.date()}if(w=="to"){q=new a.jqx.date().addHours(1)}d[w]=q}}d.originalData=f;d.scheduler=this;var o=new a.jqx.scheduler.appointment(d);if(d.timeZone){o.from=o.from.toTimeZone(d.timeZone);o.to=o.to.toTimeZone(d.timeZone)}if(g.timeZone){if(!d.timeZone){o.timeZone=g.timeZone}o.from=o.from.toTimeZone(g.timeZone);o.to=o.to.toTimeZone(g.timeZone)}else{o.from=o.from.toTimeZone(null);o.to=o.to.toTimeZone(null)}}else{var i=new a.jqx.scheduler.appointment();for(var w in o){i[w]=o[w]}o=i}}var w=g.dataview.generatekey();o.id=w;g.appointmentsByKey[w]=o;g.appointments.push(o);var c={};var j={};for(var r in g.appointmentDataFields){var b=g.appointmentDataFields[r];var q=o[r];c[r]=q;if(r=="from"||r=="to"){if(q.toDate){q=q.toDate()}else{q=new a.jqx.date(q).toDate()}}j[b]=q}c.originalData=j;o.boundAppointment=c;c.jqxAppointment=o;o.jqxAppointment=o;g._raiseEvent("appointmentAdd",{appointment:o.boundAppointment});g.uiappointments.push(o);g.changedAppointments[w]={type:"Add",appointment:o.boundAppointment};if(g.hiddenResources&&g.hiddenResources[o.resourceId]){g.hideAppointmentsByResource(o.resourceId)}else{g._renderrows()}g._selectAppointment(o);g._lastSelectedAppointment=o;if(g.resources){var n=o.resourceId;if(g._resources.indexOf(n)===-1){g._resources.push(n);g._renderrows()}}},_updateCellsSelection:function(){var f=this;var l=f.rows;var b=0;var c=0;if(b>0&&f.rtl){b=0;c=1}for(var e=0;e=0){if(h!=f.focusedCell){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"")}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}}}if(h.className!=g){h.className=g}h.jqxClassName=g;continue}g=g.replace(" jqx-fill-state-pressed","");g=g.replace(" jqx-fill-state-pressed-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");g=g.replace(" jqx-grid-cell-selected","");g=g.replace(" jqx-grid-cell-selected-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-selected","");g=g.replace(" jqx-scheduler-cell-selected-"+f.theme,"");g=g+=" "+f.toTP("jqx-fill-state-pressed jqx-grid-cell-selected jqx-scheduler-cell-selected");if(h==f.focusedCell&&f.focused&&!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g}else{var g=h.jqxClassName||h.className;if(g.indexOf("jqx-fill-state-pressed")==-1){if(h!=f.focusedCell){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"")}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}}}if(h.className!=g){h.className=g}h.jqxClassName=g;continue}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g}}g=g.replace(" jqx-fill-state-pressed","");g=g.replace(" jqx-fill-state-pressed-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");g=g.replace(" jqx-grid-cell-selected","");g=g.replace(" jqx-grid-cell-selected-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-selected","");g=g.replace(" jqx-scheduler-cell-selected-"+f.theme,"");if(h==f.focusedCell&&f.focused&&!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g;h.removeAttribute("data-selected")}}}},_getuikey:function(c,f){var e=null;var d=this.table[0].rows;e=a(d[c]).attr("data-key");if(a(d[c]).attr("data-role")){var b=a(d[c]);if(f=="next"){while(b){b=b.next();if(b){var g=b.attr("data-role");if(!g){e=b.attr("data-key");return e}}}}else{if(f=="prev"){while(b){b=b.prev();if(b){var g=b.attr("data-role");if(!g){e=b.attr("data-key");return e}}}}}return null}return e},getRows:function(){var h=this._views[this._view].type;var k=this._views[this._view];var d="halfHour";if(k.timeRuler&&k.timeRuler.scale){d=k.timeRuler.scale}var j=24;var b=this.showAllDayRow;if(k.timeRuler&&(h==="dayView"||h==="weekView")){var c=0;var f=23;if(k.timeRuler.scaleStartHour!=undefined){var c=parseInt(k.timeRuler.scaleStartHour)}if(k.timeRuler.scaleEndHour!=undefined){var f=parseInt(k.timeRuler.scaleEndHour)}if(c<0){c=0}if(f<0){f=23}if(c>23){c=0}if(f>23){f=23}j=f-c+1;if(k.timeRuler.showAllDayRow!=undefined){b=k.timeRuler.showAllDayRow}}var l=new Array();var g=0;switch(h){case"dayView":case"weekView":default:var g=j*2;if(d==="hour"||d==="sixtyMinutes"){var g=j}else{if(d==="quarterHour"||d==="fifteenMinutes"){var g=j*4}else{if(d==="tenMinutes"){var g=j*6}else{if(d==="fiveMinutes"){var g=j*12}}}}if(b){g++}break;case"monthView":var g=6;break;case"timelineDayView":case"timelineWeekView":case"timelineMonthView":var g=1;break;case"agendaView":var g=this.appointments?this.appointments.length:0;break}for(var e=0;e0&&!t){I=D.cells[F-1]}else{if(H=="monthView"&&!t){var A=D.aboveRow;if(A){I=A.cells[A.cells.length-1]}}}break;case"right":var D=i.rowByCell[x.getAttribute("data-key")];var F=D.indexOf(x);if(F1||i.rtl)){if(!i.rtl){y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(-1))}else{y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(1))}C=true}else{if(z=="right"){if(!i.rtl||(i.rtl&&y.elements[0].cells.length>1)){y.to=a.jqx.scheduler.utilities.getEndOfDay(M)}C=true}}}else{if(z=="up"&&y.elements[0].cells.length>1){y.to=M;C=true}else{if(z=="down"){y.to=M.addMinutes(i.getMinutesPerScale());C=true}}}}else{if(H.indexOf("month")>=0){if(z=="left"&&(y.elements[0].cells.length>1||y.elements.length>1)){y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(-1));C=true}else{if(z=="right"){y.to=a.jqx.scheduler.utilities.getEndOfDay(M);C=true}}}else{if((!i.rtl&&z=="left"&&y.elements[0].cells.length>1)||(i.rtl&&z=="right"&&y.elements[0].cells.length>1)){y.to=M;if(i.rtl){y.to=M.addMinutes(i.getMinutesPerScale())}C=true}else{if((!i.rtl&&z=="right")||(i.rtl&&z=="left")){y.to=M.addMinutes(i.getMinutesPerScale());if(i.rtl){y.to=y.to.addMinutes(i.getMinutesPerScale())}C=true}}}}if(C){i.moveAppointment(y,M,J,I,true)}}else{if(m){i.moveAppointment(y,M,J,I)}else{i.clearAppointmentsSelection();var K=true;if(z=="down"){K=false}i.selectCell(M,K,H);i._ensureVisible(I)}}if(i.selectedAppointment){i.selectedAppointment.removeClass(i.toTP("jqx-scheduler-selected-appointment"));var O=i.selectedAppointment.attr("data-key");a('[data-key="'+O+'"]').addClass(i.toTP("jqx-scheduler-selected-appointment"));i.clearSelection()}};if(s.altKey&&i._resourcesElements&&i._resources&&i._resources.length>0){var g=function(x){var y=i._resourcesElements.bottom[x];if(y.attr("data-toggle")=="on"){i.hideAppointmentsByResource(x)}else{i.showAppointmentsByResource(x)}};var j=w>=49&&w<=58?j=w-48:-1;if(j>=1){a.each(i._resources,function(x,y){if(x==j-1){g(y);return false}});return false}}if(s.ctrlKey){if(!i.selectedAppointment){if(w==37){i.toolbarLeftButton.trigger("click");i._ensureVisible(i.focusedCell);return false}else{if(w==39){i.toolbarRightButton.trigger("click");i._ensureVisible(i.focusedCell);return false}}}if(w==49){i._setView(0);return false}else{if(w==50){i._setView(1);return false}else{if(w==51){i._setView(2);return false}else{if(w==52){i._setView(3);return false}else{if(w==53){i._setView(4);return false}else{if(w==54){i._setView(5);return false}else{if(w==68){i.dateTimeInput.jqxDateTimeInput("open");return false}else{if(w==77){i.openMenu();return false}}}}}}}}}if(w==9){if(!s.shiftKey){if(i.selectedAppointment){i.clearSelection();var d=i.selectedAppointment;var c=i.getJQXAppointmentByElement(d);var h=i.tabKeyAppointments.indexOf(c);if(h0){c=i.tabKeyAppointments[h-1];i._selectAppointment(c);i._lastSelectedAppointment=c;i._ensureAppointmentVisible(c);return false}else{i.clearAppointmentsSelection();if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell);return false}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}return true}}}else{if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell)}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}}}}if(i.selectedAppointment){if(w==37){r("left")}else{if(w==38){r("up")}else{if(w==40){r("down")}else{if(w==39){r("right")}}}}if(w>=37&&w<=40){return false}return}var k=this._lastSelectedCell;if(!k){return}if(!a(this._lastSelectedCell).parent()[0]){this._lastSelectedCell=this.rows[0].cells[0];k=this._lastSelectedCell}var n=this.rows;var p=this._views[this._view].type;var l=this._views[this._view];var v="halfHour";if(l.timeRuler&&l.timeRuler.scale){v=l.timeRuler.scale}var q=function(K,F){var B=30;switch(v){case"sixtyMinutes":case"hour":B=60;break;case"thirtyMinutes":case"halfHour":B=30;break;case"fifteenMinutes":case"quarterHour":B=15;break;case"tenMinutes":B=10;break;case"fiveMinutes":B=5;break}var I=K.getAttribute("data-date");var H=function(U,N,P){if(U&&(U.getAttribute("rowspan")==null||p=="agendaView")&&U.getAttribute("data-time-slot")==null){if(Pi.max){return}var S=i.rows;var R=i._lastSelectedCell;i._lastSelectedCell=U;if(s.shiftKey&&i._lastSelectedCell){if(!i.shiftSelectedCell){i.shiftSelectedCell=k}}else{if(!s.shiftKey){i.shiftSelectedCell=null}}if(!i.shiftSelectedCell){for(var Q=0;Q0){var C=M.cells[E-1];var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone)}H(C,K,J);break;case"right":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);if(E=0){if(i.rows[G].cells[0]==C){G--}else{C=i.rows[G].cells[0];break}}}var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone);H(C,K,J)}break;case"down":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);var D=M.belowRow;if(D){var C=D.cells[E];if(E==0&&C.getAttribute("rowspan")){var G=1+i.rows.indexOf(M);var C=K;while(G=0){d=0}if(b[0].getAttribute("data-end-date")){d=0}g=new a.jqx.date(g,e.timeZone).addMinutes(d);var c=parseInt(b[0].getAttribute("data-view"))-1;var f=e._resources[c];if(e._views[e._view].type.toLowerCase().indexOf("month")>=0){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}if(e._views[e._view].type.toLowerCase().indexOf("day")>=0||e._views[e._view].type.toLowerCase().indexOf("week")>=0){h=new a.jqx.date(h,e.timeZone);if(g.minute()===0&&g.hour()===0&&h.hour()===0&&h.minute()===0){if(g.day()===h.day()){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}else{return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g).addDays(-1),resourceId:f}}}return{from:new a.jqx.date(h,e.timeZone),to:g,resourceId:f}}if(e._views[e._view].type.toLowerCase().indexOf("agenda")>=0){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}},clearSelection:function(){var f=this;var g=f.rows;var e=g.length;for(var d=0;d=c&&h==-1){h=f}if(d>k+c){e=f;break}}}e++;if(e>g+i){e=g+i}if(h==-1){h=0}return{start:h,end:e}},_renderhorizontalscroll:function(){var k=this;var r=k.hScrollInstance;var s=r.value;if(k.hScrollBar[0].style.visibility==="hidden"){r.value=0;s=0}var d=parseInt(s);if(k.table==null){return}var j=function(i){if(i.parentNode&&i.parentNode.nodeName!="#document-fragment"){return true}return false};var q=k._getvirtualcolumnsindexes(d,k._hostWidth,0,k.columns.records.length,false);var l=q.start;var n=q.end;var b=k.rows;for(var m=0;m0&&k.tableRows>0){for(var u=0;u=7){b-=7}if(!d){d=this.dayNameFormat;if(this.isTouchDevice()){d=this.touchDayNameFormat}}var c=this.schedulerLocalization.days.names[b];switch(d){case"full":c=this.schedulerLocalization.days.names[b];break;case"abbr":c=this.schedulerLocalization.days.namesAbbr[b];break;case"shortest":c=this.schedulerLocalization.days.namesShort[b];break;case"firstTwoLetters":c=c.substring(0,2);break;case"firstLetter":c=c.substring(0,1);break}return c},_initializeColumns:function(){if(this._views.length===0){this._views.push({type:"dayView"})}if(!this._views[this._view]){throw new Error("jqxScheduler: View is undefined. You need to define the View in the Views Array when you create jqxScheduler")}var p=this._views[this._view].type;var m=this._views[this._view];if(m.timeSlotWidth){m.timeSlotWidth=Math.max(m.timeSlotWidth,30);m.columnWidth=m.timeSlotWidth}if(m.columnWidth){if(m.columnWidth<30){m.columnWidth=30}}if(this.columns&&this.columns.records){for(var z=0;z23){G=0}if(P>23){P=23}Q=P-G+1}var K=60;var O=2;if(I){switch(I){case"sixtyMinutes":case"hour":O=1;break;case"thirtyMinutes":case"halfHour":O=2;break;case"fifteenMinutes":case"quarterHour":O=4;break;case"tenMinutes":O=6;break;case"fiveMinutes":O=12;break}}var S=new Array();var R="auto";if(m.timeRuler&&m.timeRuler.formatString){R=m.timeRuler.formatString}var F=G;var L=Q;var D=H.addHours(F);var j="auto";if(m.columnWidth){j=O*m.columnWidth}else{j=O*80}for(var M=0;M1){var f=h._resources[x]?h._resources[x]:"Resource"+x;B.push({text:f,name:f})}var w="left";if(this.rtl){w="right"}switch(p){case"dayView":var g=this.getViewStart();if(false===m.showWeekends){if(g.dayOfWeek()===0||g.dayOfWeek()===6){g=g.addDays(1)}if(g.dayOfWeek()===0||g.dayOfWeek()===6){g=g.addDays(1)}}var v="auto";if(m&&m.columnWidth){v=m.columnWidth}var f=h._resources[x]?h._resources[x]:"Resource"+x;this.columns.push({align:w,width:v,columnGroup:f,text:this._getDayName(g.dayOfWeek())});break;case"weekView":case"monthView":for(var z=0;z<7;z++){var y=this.schedulerLocalization.firstDay+z;if(y>6){y=0}if(false===m.showWeekends){if(y===0||y===6){continue}}var v="auto";if(m&&m.columnWidth){v=m.columnWidth}var f=h._resources[x]?h._resources[x]:"Resource"+x;this.columns.push({align:p=="weekView"?w:"center",width:v,columnGroup:f,text:this._getDayName(y)})}break;case"timelineDayView":var f=h._resources[x]?h._resources[x]:"Resource"+x;q(h.getViewStart(),f);break;case"timelineWeekView":for(var z=0;z<7;z++){var y=this.schedulerLocalization.firstDay+z;if(false===m.showWeekends){if(z===0||z===6){continue}}var f=h._resources[x]?h._resources[x]:"Resource"+x;B.push({align:h.rtl?"right":"left",parentGroup:f,name:this._getDayName(y)+x,text:this._getDayName(y)});q(h.getViewStart().addDays(z),this._getDayName(y)+x)}break;case"timelineMonthView":var k=h.getViewStart();var A="auto";if(m.timeRuler&&m.timeRuler.formatString){A=m.timeRuler.formatString}for(var z=0;z<41;z++){var y=k.dayOfWeek();if(false===m.showWeekends){if(y===0||y===6){continue}}var v="auto";if(m.columnWidth){v=m.columnWidth}else{v=100}var r=k.toDate();if(A==="auto"){var c="dd";r=k.toDate();if(r.getDate()===1){c="MMM dd"}}else{if(a.isFunction(A)){var c=A(r)}else{c=A}}if(a.jqx.dataFormat.isDate(r)){r=a.jqx.dataFormat.formatdate(r,c,h.schedulerLocalization)}k=k.addDays(1);var f=h._resources[x]?h._resources[x]:"Resource"+x;h.columns.push({minwidth:30,columnGroup:f,text:r,width:v})}break;case"agendaView":var l=m.dateColumnWidth;var u=m.timeColumnWidth;var o=m.appointmentColumnWidth;if(!o){o="70%"}if(!u){u="auto"}if(!l){l="auto"}h.columns.push({text:h.schedulerLocalization.agendaDateColumn,width:l});h.columns.push({text:h.schedulerLocalization.agendaTimeColumn,width:u});h.columns.push({text:h.schedulerLocalization.agendaAppointmentColumn,width:o});break}}if(B.length>0){this.columnGroups=B}var h=this;var s=new a.jqx.schedulerDataCollection(this.element);var d=0;this._columns=this.columns;var C="left";var e=new a.jqx.scheduler.column(h,this);e.visibleindex=d++;e.text="";e.width=h.timeRulerWidth;e.editable=false;e.timeColumn=true;C="left";e.text="";e.hidden=false;e.width=h.timeRulerWidth;var b=false;if(m.timeRuler&&(p==="dayView"||p==="weekView")){e._text=m.timeRuler.text||"";C=m.timeRuler.position||"left";e.hidden=m.timeRuler.hidden||false;e.width=m.timeRuler.width||h.timeRulerWidth;if(m.timeRuler.timeZones){b=true}}else{if(p!=="dayView"&&p!=="weekView"){e.hidden=true}}var n=function(i){var j=new a.jqx.scheduler.column(h,h);j.visibleindex=d++;j.text="";j.width=h.timeRulerWidth;j.editable=false;j.timeColumn=true;C="left";j.text="";j.hidden=false;j.timeZone=m.timeRuler.timeZones[i].id;j.width=h.timeRulerWidth;if(m.timeRuler&&(p==="dayView"||p==="weekView")){j._text=m.timeRuler.timeZones[z].text||"";j.hidden=m.timeRuler.hidden||false;j.width=m.timeRuler.width||h.timeRulerWidth;s.add(j)}};if(C==="left"&&(p==="dayView"||p==="weekView")){if(m.timeRuler&&m.timeRuler.timeZones){for(var z=0;z";var G=ab.columns.records.length;for(var aq=0;aqX.maxwidth){c=X.maxwidth}c-=ax;if(c<0){c=0}if(av){var ae=c;if(aq==F){ae++}v+=""}else{v+=""}Z+=c}v+="";if(R==0){var l='';var f=this.host.height();var U=0;if(!ab.columnGroups){U+=ab.showHeader?ab.columnsHeight:0}else{U+=ab.showHeader?ab.columnsheader.height():0}if(ab.showToolbar){U+=ab.toolbarHeight}if(ab.showLegend&&ab._resources.length>0){U+=ab.legendHeight}f-=U;var e='';e+=this.schedulerLocalization.emptyDataString;e+="";l+=e;l+="";v+=l;this.table[0].style.width=Z+2+"px";N=Z}var k=ab.rowsHeight;if(ab.isTouchDevice()){k=ab.touchRowsHeight}for(var at=0;at';O=0;var u=au.appointments[ai];for(var aq=0;aqah.maxwidth){c=ah.maxwidth}c-=ax;if(c<0){c=0}var E=ab.toTP("jqx-cell")+" "+ab.toTP("jqx-grid-cell")+" "+ab.toTP("jqx-item");if(ab.rtl){E+=" "+ab.toTP("jqx-cell-rtl")}var J="";var H=ab.dataview.generatekey();var s=-1;var g=au.date;var f=k+"px";var e='';var an="";if(ao==0&&ai==0){var D=g.toString("dddd",ab.schedulerLocalization);var am=g.toString("MMMM, yyyy",ab.schedulerLocalization);var ar=ab.toTP("jqx-scheduler-agenda-date");var o=ab.toTP("jqx-scheduler-agenda-day");var n=ab.toTP("jqx-scheduler-agenda-week");an='
    '+g.day()+'
    '+D+'
    '+am+"
    "}if(ao==1){var Q="auto";var aa=this._views[this._view];var z=u.from;var ay=u.to;if(aa.timeRuler&&aa.timeRuler.formatString){Q=aa.timeRuler.formatString}var ad=Q;var I=Q;if(Q==="auto"){if((z.hour()==0&&z.minute()==0)||(z.hour()==12&&z.minute()==0)){var ad="hh tt"}else{var ad="hh:mm"}if((ay.hour()==0&&ay.minute()==0)||(ay.hour()==12&&ay.minute()==0)){var I="hh tt"}else{var I="hh:mm"}}var ar=ab.toTP("jqx-scheduler-agenda-time");if(u.allDay){an=""+ab.schedulerLocalization.agendaAllDayString+""}else{if(!ab.rtl){an=""+z.toString(ad,ab.schedulerLocalization)+" - "+ay.toString(I,ab.schedulerLocalization)+""}else{an=""+ay.toString(I,ab.schedulerLocalization)+" - "+z.toString(ad,ab.schedulerLocalization)+""}}}else{if(ao==2){if(u.resourceId){a.each(ab._resources,function(r,x){if(u.resourceId==x){var i=ab.getColors(r);var j=this.toString();var w=ab.toTP("jqx-scheduler-agenda-appointment-resource jqx-scheduler-legend");if(ab.rtl){var w=ab.toTP("jqx-scheduler-agenda-appointment-resource-rtl jqx-scheduler-legend")}var t="
    ";an=t}})}var W=u.subject?u.subject:"(No Title)";var C=u.location;var y=u.description;var T=u.status?ab.schedulerLocalization.editDialogStatuses[u.status]:"";var b=u.isRecurrentAppointment();var B=u.isException();var Y=""+ab.schedulerLocalization.editDialogSubjectString+": "+W+"";if(C){Y+="\n"+ab.schedulerLocalization.editDialogLocationString+": "+C+""}if(y){Y+="\n"+ab.schedulerLocalization.editDialogDescriptionString+": "+y+""}if(T){Y+="\n"+ab.schedulerLocalization.editDialogStatusString+": "+T+""}if(b){Y+="\n"+ab.schedulerLocalization.editDialogRepeatString+": "+b+""}var ar=ab.toTP("jqx-scheduler-agenda-appointment jqx-scheduler-legend-label");if(ab.rtl){var ar=ab.toTP("jqx-scheduler-agenda-appointment-rtl jqx-scheduler-legend-label")}an+=""+W+""}}e+=an;e+="";l+=e}if(N==0){ab.table[0].style.width=m+2+"px";ab.pinnedtable[0].style.width=m+2+"px";N=m}l+="";v+=l}}v+="";ab.table[0].innerHTML=v;ab.pinnedtable[0].innerHTML=v;ab.pinnedtable[0].style.display="none";var ag=a(ab.table[0].firstChild);var V=a(ab.pinnedtable[0].firstChild);ab._table=ag;ab._pinnedtable=V;if(a.jqx.browser.msie&&a.jqx.browser.version<10){ab._table[0].style.width=N+"px";ab._pinnedtable[0].style.width=N+"px"}if(R===0){ab._table[0].style.width=(2+N)+"px";ab._pinnedtable[0].style.width=(2+N)+"px";ab._pinnedtable[0].style.display="none"}ab._pinnedtable[0].style.display="none";ab._table.addClass("jqx-grid-table-one-cell jqx-disableselect");ab.table[0].rows=ab.table[0].firstChild.rows;ab.rowByCell=new Array();ab.columnCells=new Array();function p(){var i={};i.cells=new Array();i.indexOf=function(j){for(var r=0;r0){A.aboveRow=ab.rows[ab.rows.length-1];ab.rows[ab.rows.length-1].belowRow=A}A.element=ak;ab.rows.push(A);var S=false;for(var aq=0;aq=0){var aw=ab.table[0].rows[ac];if(ab.table[0].rows[ac].cells.length==ab.columns.records.length){var P=aw.cells[0];if(!ab.columnCells[A.cells.length]){ab.columnCells[A.cells.length]=new Array()}ab.columnCells[A.cells.length].push(P);if(ab.cellWidth==0){ab.cellWidth=P.clientWidth}if(ab.cellHeight==0&&(L==1||at>1)){ab.cellHeight=P.clientHeight}A.cells.push(P);S=true;break}ac--}}var P=ak.cells[aq];if(P.style.display==="none"){continue}if(P.className.indexOf("jqx-grid-cell-pinned")>=0){continue}if(!ab.columnCells[A.cells.length]){ab.columnCells[A.cells.length]=new Array()}ab.columnCells[A.cells.length].push(P);if(ab.cellWidth==0){ab.cellWidth=P.clientWidth}if(ab.cellHeight==0&&(L==1||at>1)){ab.cellHeight=P.clientHeight}A.cells.push(P);ab.rowByCell[P.getAttribute("data-key")]=A}}if(R===0){ab._table[0].style.tableLayout="auto"}ab._updateScrollbars(ab.host.height());ab._arrange();if(ab.rendered){ab.rendered()}ab.renderedTime=new Date()},_renderrows:function(){var V=this;if(V._loading){return}if(V._updating||V._appupdating){return}if(V.rendering){V.rendering()}var V=this;var aF=V._views[V._view].type;var G=V._views[V._view];if(aF=="agendaView"){V._renderagenda();return}var az=1;var d=V.getViewStart();var aN=a.jqx.scheduler.utilities.getEndOfDay(V.getViewEnd());V._prepareAppointmentsInView(d,aN);var N=new Array();if(aF==="weekView"||aF==="dayView"){var az=V.getMaxAllDayAppointments(V.appointmentsToRender)}else{if(aF==="monthView"&&G.monthRowAutoHeight&&V.rows&&V.rows.length==6){N=V._getMonthAppointmentsPerWeek()}}var aa=V.tableRows>1?V.tableRows:0;var aL="halfHour";var B=null;var aQ;if(G.rowHeight){B=G.rowHeight}if(G&&G.allDayRowHeight){aQ=G.allDayRowHeight}if(G.timeRuler&&G.timeRuler.scale){aL=G.timeRuler.scale}var aM=0;V.table[0].rows=new Array();V.rows=new Array();var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-widget-content");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}var b=V.columns.records.length;var av=V._getColumnsLengthPerView();var W=a.jqx.browser.msie&&a.jqx.browser.version<8;if(W){V.host.attr("hideFocus","true")}V._lastSelectedCell=null;V.focusedCell=null;var E=new Array();var aD=V.source.records;aD=V.dataview.evaluate(aD);V.dataViewRecords=aD;V.cells=new Array();var E=V.dataViewRecords;V.renderedRecords=V.getRows();var aZ=V.tableZIndex;var ai=V.getRows().length;var o=0;var aH=0;if(W){for(var X=0;Xac.maxwidth){aK=ac.maxwidth}var aJ=a('
    ');a(document.body).append(aJ);var at=aJ.find("td");o=1+parseInt(at.css("padding-left"))+parseInt(at.css("padding-right"));aJ.remove();break}}var K=V.rtl?" "+V.toTP("jqx-grid-table-rtl"):"";var H="";var aY=0;var a4=b;var aS=2;var an=30;switch(aL){case"sixtyMinutes":case"hour":an=60;aS=1;break;case"thirtyMinutes":case"halfHour":an=30;aS=2;break;case"fifteenMinutes":case"quarterHour":an=15;aS=4;break;case"tenMinutes":an=10;aS=6;break;case"fiveMinutes":an=5;aS=12;break}var a3=1;if(aF==="timelineDayView"||aF==="timelineWeekView"){b=aS*b;a3=aS;av=b/V.tableColumns}else{if(aF==="timelineMonthView"){av=b/V.tableColumns}else{if(aF==="monthView"){if(G.showWeekNumbers){av=(b-V.tableColumns)/V.tableColumns}else{av=b/V.tableColumns}}}}var g=function(i){var c=V.columns.records[i];if(c){return c}while(i>=V.columns.records.length){i-=V.columns.records.length}var c=V.columns.records[i];return c};for(var X=0;Xac.maxwidth){aK=ac.maxwidth/a3}aK-=o;if(aK<0){aK=0}if(aF=="monthView"&&V.rtl&&ac.timeColumn){aK++}if(W){var P=aK;if(X==aY){P++}H+=""}else{H+=""}aH+=aK}H+="";V._hiddencolumns=false;if(ai===0){var u='';var z=V.host.height();if(V.pageable){z-=V.pagerHeight;if(V.pagerPosition==="both"){z-=V.pagerHeight}}z-=V.columnsHeight;if(V.showLegend&&V._resources.length>0){z-=V.legendHeight}if(z<25){z=25}if(V.hScrollBar[0].style.visibility!="hidden"){z-=V.hScrollBar.outerHeight()}if(V.height==="auto"||V.height===null||V.autoheight){z=300}var aJ='";u+=aJ;H+=u;V.table[0].style.width=aH+2+"px";aM=aH}var au=V.getRows();var d=V.getViewStart();var z=V._hostHeight?V._hostHeight:V.host.height();var a2=0;if(!V.columnGroups){a2+=V.showHeader?V.columnsHeight:0}else{a2+=V.showHeader?V.columnsheader.height():0}if(V.showToolbar){a2+=V.toolbarHeight}if(V.showLegend&&V._resources.length>0){a2+=V.legendHeight}var f=V.showAllDayRow;var m=23;if(G.resourceHeaderRowHeight){m=G.resourcesRowHeight}m+=2;if(G.showAllDayRow!=undefined){f=G.showAllDayRow}var h=V._columnswidth>V._hostWidth;var al=h?(3+V.scrollBarSize):0;var ag=V.tableRows>1?V.resources.unitsInView:1;if(ag==undefined){ag=V._resources.length}if(V.resources&&V.resources.resourceRowHeight){B=V.resources.resourceRowHeight}if(B==null||B=="auto"){var p=V.rowsHeight;var ap=3*p;if(V.isTouchDevice()){p=V.touchRowsHeight;var ap=22+p}if(V.tableRows==1){B=z>0?(z-a2):p;if(V.columns.records.length>10){B=z>0?(z-V.scrollBarSize-5-a2):p}}else{B=z>0?(z-a2-m)/(ai):p;if(V.columns.records.length>10){B=z>0?(z-V.scrollBarSize-5-a2-ag*m)/(ag*ai):p}}if(aF==="dayView"||aF==="weekView"){if(f){if(aQ==null||aQ=="auto"){B=z>0?(z-a2)/(V.tableRows*(ai)):ap;aQ=B}else{B=z>0?(z-a2-aQ-ag*m)/(ag*(ai-1)):p}}}else{if(aF==="monthView"){if(V.hScrollBar[0].style.visibility=="hidden"){al=0}if(V.tableRows==1){B=z>0?(z-a2-al)/ai:p}else{B=z>0?(z-a2-m-al)/(ai):p}}}B=Math.max(p,B);if(!aQ){aQ=ap}aQ=Math.max(ap,aQ);V._allDayRowHeight=aQ;V._defaultRowHeight=p;aQ=az*(p-2);aQ=Math.max(ap,17+aQ);V._allDayRowFullHeight=aQ;if(G.allDayRowHeight){V._allDayRowHeight=G.allDayRowHeight;aQ=az*(G.allDayRowHeight-2);V._allDayRowFullHeight=aQ}}var aB=new Array();if(V.resources&&V.resources.colorScheme){for(var ao=0;aoaB.length-1){var aW=parseInt(V.resources.colorScheme.substring(6));if(aW>=27){aW=0}aB=aB.concat(V.colorSchemes[aW].colors);aW++}}for(var aE=0;aE1){var u='';var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(!W){a5+=" "+V.toTP("jqx-grid-cell-pinned");Z+=' colspan="'+b+'"';var P=0;for(var Q=0;Qab.maxwidth){aK=ab.maxwidth/a3}ak-=o;if(ak<0){ak=0}if(!ab.hidden){P+=ak}}aK=P}else{a5+=" "+V.toTP("jqx-grid-cell-pinned")}var aJ='";u+=aJ;H+=u}for(var Y=0;Y';var ad=0;var x=0;if(ar[0]&&Y>k){var an=30;if(aF!="monthView"){switch(aL){case"sixtyMinutes":case"hour":an=60;break;case"thirtyMinutes":case"halfHour":an=30;break;case"fifteenMinutes":case"quarterHour":an=15;break;case"tenMinutes":an=10;break;case"fiveMinutes":an=5;break}for(var T=0;T=av){ax=0;aU=0;aw=0;if(V.rtl){aw=1}ae++}if(!ar[X]){if(!V.rtl){if(aF.toString().indexOf("timelineDayView")>=0){var I=X;ar[X]=A.addHours(S).addMinutes(I*an,false)}else{if(aF.toString().indexOf("timelineWeekView")>=0){ar[X]=A.addDays(aU).addHours(S,false).addMinutes(aw*an,false)}else{ar[X]=A.addDays(ax).addHours(S,false)}}if(V.timeZone){ar[X].timeZone=V.timeZone}}else{if(aF.toString().indexOf("timelineDayView")>=0){var I=1+X;ar[X]=A.addHours(1+e).addMinutes(-I*an,false)}else{if(aF.toString().indexOf("timelineWeekView")>=0){if(G.showWeekends||G.showWeekends==undefined){ar[X]=A.addDays(6-aU).addHours(1+e,false).addMinutes(-aw*an,false)}else{ar[X]=A.addDays(4-aU).addHours(1+e,false).addMinutes(-aw*an,false)}}else{if(aF=="dayView"||aF=="monthView"||aF=="weekView"){if(G.showWeekends||G.showWeekends==undefined){ar[X]=A.addDays(6-ax).addHours(S,false)}else{ar[X]=A.addDays(4-ax).addHours(S,false)}}else{ar[X]=A.addDays(av-ax-1).addHours(S,false)}}}if(V.timeZone){ar[X].timeZone=V.timeZone}}}aw++;if(aw>=aj){aw=0;aU++}if(!R.timeColumn&&(aF==="dayView"||aF==="weekView")){ax++}else{if(!R.timeColumn&&(aF==="monthView"&&G.showWeekNumbers)){ax++}else{if((aF==="monthView"&&!(G.showWeekNumbers))||aF==="timelineMonthView"){ax++}else{if(aF=="timelineDayView"||aF=="timelineWeekView"){ax++}}}}var C=ar[X];var aK=R.width/a3;if(aKR.maxwidth){aK=R.maxwidth/a3}aK-=o;if(aK<0){aK=0}var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(R.pinned){a5+=" "+V.toTP("jqx-grid-cell-pinned")}if(V.sortcolumn===R.displayfield){a5+=" "+V.toTP("jqx-grid-cell-sort")}if(V.altRows&&Y%2!=0){a5+=" "+V.toTP("jqx-grid-cell-alt")}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")){a5+=" "+V.toTP("jqx-grid-cell-alt")}if(C>V.max||C0){if(N[Y]&&N[Y]!="auto"){if(B0&&V.resources.colorScheme&&V.resources.orientation!=="none"){var aO="";var y="";aO=aB[aE+ae-1];if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){aO=V.hexToRgba(aB[aE+ae-1],0.3).toString()}else{aO=V.shadeColor(aB[aE+ae-1],0.3).toString()}if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){if(aF.indexOf("month")==-1){if(!R.timeColumn){if(G.showWorkTime!==false){var O=1;var J=5;var ay=8;var l=18;if(G.workTime){var O=G.workTime.fromDayOfWeek?G.workTime.fromDayOfWeek:0;var J=G.workTime.toDayOfWeek?G.workTime.toDayOfWeek:0;var ay=G.workTime.fromHour?G.workTime.fromHour:8;var l=G.workTime.toHour?G.workTime.toHour:8}if(C.dayOfWeek()>=O&&C.dayOfWeek()<=J){if(C.hour()>=ay&&C.hour()1){var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(C.minute()===0){var aJ='";u+=aJ}if(aM==0){V.table[0].style.width=ad+2+"px";V.pinnedtable[0].style.width=ad+2+"px";aM=ad}u+="";H+=u;if(!V.rowinfo[aI.uid]){V.rowinfo[aI.uid]={row:aI}}else{if(!("row" in V.rowinfo[aI.uid])){V.rowinfo[aI.uid].row=aI}}}}H+="
    ';aJ+=V.schedulerLocalization.emptyDataString;aJ+="
    0&&V.resources.colorScheme&&V.resources.orientation!="none"){var aO="";var y="";var D="";var L=function(i){var c=105;var j=(i.r*0.299)+(i.g*0.587)+(i.b*0.114);var q=(255-j"+aX+"";aJ+="1){var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(Y>0){if(C.minute()===0){var aJ='1){aJ+="background: "+aO+";";aJ+="border-color: "+y+";"}}}else{if(Y>0){var n="border-left-width: 1px;";if(V.rtl&&X==0&&aF=="monthView"&&G.showWeekNumbers){n="border-left-width: 0px;"}aJ+=n}}if(R.cellsalign!="left"){if(R.cellsalign==="right"){a5+=" "+V.toTP("jqx-right-align")}else{a5+=" "+V.toTP("jqx-center-align")}}if(!R.timeColumn){if(V.rowinfo[aI.uid]){if(V.rowinfo[aI.uid].selected){if(V.editKey!==aI.uid){if(V.selectionMode!=="none"){a5+=" "+V.toTP("jqx-grid-cell-selected");a5+=" "+V.toTP("jqx-fill-state-pressed");a5+=" "+V.toTP("jqx-scheduler-cell-selected")}}}}}if(!(R.hidden)){ad+=o+aK;if(x==0&&!V.rtl){aJ+="border-left-width: 0px;"}x++}else{aJ+="display: none;";V._hiddencolumns=true}if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){if(aF.indexOf("month")==-1){a5+=" "+V.toTP("jqx-grid-cell-nowrap");if(Y%2==1&&!R.timeColumn){a5+=" "+V.toTP("jqx-scheduler-middle-cell")}if(!R.timeColumn){if(G.showWorkTime!==false){var O=1;var J=5;var ay=8;var l=18;if(G.workTime){var O=G.workTime.fromDayOfWeek?G.workTime.fromDayOfWeek:0;var J=G.workTime.toDayOfWeek?G.workTime.toDayOfWeek:0;var ay=G.workTime.fromHour?G.workTime.fromHour:8;var l=G.workTime.toHour?G.workTime.toHour:8}if(C.dayOfWeek()>=O&&C.dayOfWeek()<=J){if(C.hour()>=ay&&C.hour()16){ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}else{ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}}else{if(B>16){ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}else{ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}}}else{if(aF==="timelineWeekView"||aF==="timelineDayView"||aF==="timelineMonthView"){a5+=" "+V.toTP("jqx-right-align jqx-bottom-align");ah=""}}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")&&!R.timeColumn){a5+=" "+V.toTP("jqx-top-align");a5+=" "+V.toTP("jqx-scheduler-all-day-cell");if(V.rtl){a5+=" "+V.toTP("jqx-rtl")}ah=C.toDate();ah=""+a.jqx.dataFormat.formatdate(ah,"dd",V.schedulerLocalization)+""}var r=R.cellsFormat;if(R.timeColumn&&!R.hidden){ah=C.toDate();if(R.timeZone){ah=C.clone().toTimeZone(R.timeZone);ah=ah.toDate()}var s="auto";if(G.timeRuler&&G.timeRuler.formatString){r=G.timeRuler.formatString}else{if(!R.timeColumn.format){if(ah.getHours()==0||ah.getHours()==12){r="hh tt"}else{r="hh:mm"}}}if(a.jqx.dataFormat.isDate(ah)){ah=a.jqx.dataFormat.formatdate(ah,r,V.schedulerLocalization)}if(Y0){if(X';aJ+=ah;aJ+="
    ";V.table[0].innerHTML=H;V.pinnedtable[0].innerHTML=H;V.table[0].rows=V.table[0].firstChild.rows;var aR=a.jqx.browser.msie&&a.jqx.browser.version<9;var aP=null;if(f&&(aF==="dayView"||aF==="weekView")&&V.tableRows==1){V.pinnedtable[0].style.display="block";V.pinnedtable[0].style.zIndex="400";V.pinnedtable[0].style.position="absolute";V.pinnedtable[0].style.top="0px";V.pinnedtable[0].style.height=aQ+"px";if(!aR){if(V.tableRows==1){V.oldRow=V.table[0].rows[0];try{V.table[0].rows[0]=V.pinnedtable.find("tr")[0]}catch(aC){}aP=V.pinnedtable.find("tr")[0];V.pinnedTableRow=aP}else{V.oldRow=V.table[0].rows[1];try{V.table[0].rows[1]=V.pinnedtable.find("tr")[1]}catch(aC){}aP=V.pinnedtable.find("tr")[1];V.pinnedTableRow=aP}}}else{V.pinnedtable[0].style.display="none"}var Q=a(V.table[0].firstChild);var aV=a(V.pinnedtable[0].firstChild);V._table=Q;V._pinnedtable=aV;if(a.jqx.browser.msie&&a.jqx.browser.version<10){V._table[0].style.width=aM+"px";V._pinnedtable[0].style.width=aM+"px"}if(ai===0){V._table[0].style.width=(2+aM)+"px";V._pinnedtable[0].style.width=(2+aM)+"px"}V._table.addClass("jqx-grid-table-one-cell jqx-disableselect");V._pinnedtable.addClass("jqx-grid-table-one-cell jqx-disableselect");V.rowByCell=new Array();V.columnCells=new Array();function F(){var c={};c.cells=new Array();c.indexOf=function(j){for(var q=0;q0){aI.aboveRow=V.rows[V.rows.length-1];V.rows[V.rows.length-1].belowRow=aI}aI.element=v;V.rows.push(aI);for(var X=0;X=0){continue}if(!V.columnCells[aI.cells.length]){V.columnCells[aI.cells.length]=new Array()}V.columnCells[aI.cells.length].push(M);if(V.cellWidth==0){V.cellWidth=M.clientWidth}if(V.cellHeight==0&&(U==1||Y>1)){V.cellHeight=M.clientHeight}if(V._views[V._view].type=="monthView"){if(aI.top==undefined){aI.top=parseInt(a(M).position().top)}}aI.cells.push(M);V.rowByCell[M.getAttribute("data-key")]=aI}}if(ai===0){V._table[0].style.tableLayout="auto"}V._renderAppointments(d,aN);if(V.pinnedtable[0].style.display!="none"||((aF=="dayView"||aF=="weekView")&&V.tableRows>1)){V._updateScrollbars(V.host.height())}if(aF==="monthView"&&G.monthRowAutoHeight){if(N.length==0){V._renderrows()}else{V._updateScrollbars(V.host.height())}}if(V.rendered){V.rendered()}V.renderedTime=new Date()},showAppointmentsByResource:function(f){var e=this;for(var d=0;d0){this.tabKeyAppointments.sort(function(j,i){return h._sortAppointmentsByResourceId(j,i,h)})}else{this.tabKeyAppointments.sort(this._sortAppointmentsByFrom)}this.appointmentsToRender=b},_renderDayWeekAppointments:function(){var N=this;var ab=N._views[N._view].type;var M=N._views[N._view];var A=new Array();var K=new Array();var Z=this.rows;var E=N.showAllDayRow;var ad=N.getMinutesPerScale();if(M.timeRuler&&M.timeRuler.showAllDayRow!=undefined){E=M.timeRuler.showAllDayRow}for(var f=0;fi.date){return 1}};if(!s.allDay&&s.duration().days()<1||!E){var q=ae.toDate();var I=false;if(q.getHours()==0&&q.getMinutes()==0){I=true}for(var X=0;Xae){continue}if((B<=m&&m=m&&H>=k)){if(h!=-1){if((1+h)!=w[W].getAttribute("data-view")){continue}}if(D!=Y.getDate()){G.sort(af);r.push(G);G=new Array();D=u.addDays(1).day()}G.push({cell:w[W],date:Y})}}}G.sort(af);r.push(G);var C=new Array();for(var X=0;X1){var U=Z.length/N.tableRows;var b=h*U;w=Z[b].cells}for(var W=0;WV){continue}if(u<=Y&&Y<=V){if(h!=-1){if((1+h)!=w[W].getAttribute("data-view")){continue}}if(G.length==0){Y=a.jqx.scheduler.utilities.getStartOfDay(Y)}G.push({cell:w[W],date:Y})}}G.sort(af);r.push(G);var C=new Array();for(var X=0;X=0){for(var aj=s;ajc){an=c}Y.rowsCount=an}}}}for(var am=0;amag){L=0}z.timewidth-=K;if(L>0){z.timewidth-=ac.cellWidth;z.timewidth+=L}if(ab.appointmentsRenderMode=="exactTime"){z.width=z.timewidth;z.x+=K}}else{var K=parseFloat(ac.cellWidth/24)*(z.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.to.minute()/30);var L=(parseFloat(ac.cellWidth/24)*(z.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.from.minute()/30));if(K>0){K=ac.cellWidth-K}if(z.appointment.fromag){K=0}if(ab.appointmentsRenderMode=="exactTime"){z.x+=K;z.width-=K;z.width-=L}if(z.appointment.duration().days()<1){if(z.width<15){z.width=15}}z.timewidth=z.width;if(ab.appointmentsRenderMode=="exactTimeStatus"){z.timewidth-=K;z.timewidth-=L}z.timex=K}}}for(var ae=0;ae0){t=", "+t}if(!aa){aa=ah.background}if(!X){X=ah.border}if(!M){M=ah.color}var b=ak.appointment.isRecurrentAppointment();var r=ak.appointment.isException();var g=u+"-"+v;if(e){u="";v=""}var ao="";var w=ac.toTP("jqx-scheduler-appointment-status");var S="";var R=ac.statuses[ak.appointment.status];var k=false;if(R){if(R=="transparent"){k=false}else{S="
    ";if(R=="tentative"){w=ac.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}k=true}}var E=ac.toTP("jqx-scheduler-appointment-duration-status");var al="
    ";if(e){al=""}var G="";if(ab.appointmentsRenderMode!="exactTimeStatus"){al=""}if(ac.rtl){var w=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");S="
    ";if(R=="tentative"){w=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}G=S;S=""}var W="";var Q=T+t;if(!e){Q=T+t+al}if(ac.renderAppointment){var au=ac.renderAppointment({appointment:ak.appointment.boundAppointment,textColor:M,background:aa,borderColor:X,html:Q,cssClass:"",style:"",width:ak.width,height:ak.height,view:ac._views[ac._view].type});if(au){var N=au.html;if(N!=Q){Q=N}M=au.textColor;aa=au.background;X=au.borderColor;if(au.cssClass){W=au.cssClass+" "}if(au.style!=""){var ah=ac.getAppointmentColors(au.style);aa=ah.background;X=ah.border;M=ah.color}}}if(ao===""){if(k){var ao="
    "+S+"
    "+Q+"
    "+G+"
    "}else{var ao="
    "+Q+"
    "}}var at="";if(ac.rtl){at=ac.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(r){var h=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-exception-white"):ac.toTP("jqx-icon-recurrence-exception");N="
    "+ao+"
    "}else{if(b){var q=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-white"):ac.toTP("jqx-icon-recurrence");N="
    "+ao+"
    "}else{N="
    "+ao+"
    "}}var V=a(N);if(this.tableRows==1){V.appendTo(this.pinnedtable)}else{V.appendTo(this.table)}ak.element=V;if(this.appointmentTooltips){if(!ak.appointment.tooltip){var Z=ak.appointment.subject;if(u){Z=u+" - "+v+" "+Z}if(Z){var t=ak.appointment.location;if(t){Z+="\n"+t}V[0].setAttribute("title",Z)}}else{V[0].setAttribute("title",ak.appointment.tooltip)}}}},_renderAppointmentsInDay:function(an,am){if(an.length==0){return}var Z=this;var Y=this._views[this._view];var B=an;var C=this.getViewStart();var ac=this.getViewEnd();var ai=1;var o=0;if(Y.timeRuler){o=this.columns.records[1].width;if(Y.timeRuler.timeZones){o=this.columns.records[1+Y.timeRuler.timeZones.length].width}}else{o=this.columns.records[1].width}ai=this.getMaxColumnsInADay(an);var n=o/ai;if(n<0){return}for(var al=0;al=0){for(var ag=t;agc){g=c}V.columnsCount=g}}}}for(var aj=0;aj
    ";if(O=="tentative"){y=Z.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");P="
    "}l=true}}var F="";if(Z.rtl){var y=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");P="
    ";if(O=="tentative"){y=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");P="
    "}F=P;P=""}var T="";var N=Q+"
    "+u;if(!u){var N=Q}if(Z.renderAppointment){var aq=Z.renderAppointment({appointment:ah.appointment.boundAppointment,textColor:I,background:X,borderColor:U,html:N,cssClass:"",style:"",width:ah.width,height:ah.height,view:Z._views[Z._view].type});if(aq){var K=aq.html;if(K!=N){N=K}I=aq.textColor;X=aq.background;U=aq.borderColor;if(aq.cssClass){T=aq.cssClass+" "}if(aq.style!=""){var ad=Z.getAppointmentColors(aq.style);X=ad.background;U=ad.border;I=ad.color}}}if(ak===""){if(l){var ak="
    "+P+"
    "+N+"
    "+F+"
    "}else{var ak="
    "+N+"
    "}}var ao="";if(Z.rtl){ao=Z.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(s){var h=I.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-exception-white"):Z.toTP("jqx-icon-recurrence-exception");K="
    "+ak+"
    "}else{if(b){var r=I.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-white"):Z.toTP("jqx-icon-recurrence");K="
    "+ak+"
    "}else{K="
    "+ak+"
    "}}var S=a(K);S.appendTo(this.table);ah.element=S;if(this.appointmentTooltips){if(!ah.appointment.tooltip){var W=ah.appointment.subject;if(W){var u=ah.appointment.location;if(u){W+="\n"+u}S[0].setAttribute("title",W)}}else{S[0].setAttribute("title",ah.appointment.tooltip)}}}},getCollisionAppointments:function(b,f){var j=new Array();var g=b.from;var h=b.to;for(var d=0;di.date){return 1}};var q=E.rows[0];var m=o.resourceId;var f=E._resources.indexOf(m);if(E._resources.length>0){if(E.resources.orientation!=="horizontal"){if(f>=1){q=E.rows[f]}}}if(E.resources&&E.resources.orientation=="none"){f=-1;var q=E.rows[0]}var s=q.cells;for(var M=0;MS){continue}if((v<=h&&h=h&&v<=B&&g<=B)){if(f!=-1){if((1+f)!=s[M].getAttribute("data-view")){continue}}A.push({cell:s[M],date:O});q=N}}A.sort(T);var w=new Array();var s=A;if(s.length==0){break}var l=E.appointmentsMinHeight;if(E.isTouchDevice()){l=E.touchAppointmentsMinHeight}if(D.appointmentHeight){l=D.appointmentHeight}var H=a(s[0].cell).position();var c=l;var b=a(s[s.length-1].cell).position().left-H.left+K;var G=H.left;var F=H.top;if(E.rtl){var H=a(s[s.length-1].cell).position();var b=a(s[0].cell).position().left-H.left+K;var G=H.left;var F=H.top}var n=new a.jqx.date(s[s.length-1].date,E.timeZone).addMinutes(J);if(Q==="timelineMonthView"){var n=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(s[s.length-1].date,E.timeZone))}var R={cellX:G,cellY:F,cellHeight:L,cells:s,x:G,y:F,height:c,width:b,appointment:o,from:new a.jqx.date(s[0].date,E.timeZone),to:n};if(D.appointmentsRenderMode==="exactTime"){R.from=o.from;R.to=o.to}w.push(R);u.push(R);o.elements=w;if(o.rootAppointment){o.rootAppointment.elements=o.rootAppointment.elements.concat(o.elements)}}if(this._resources.length<2||this.resources.orientation=="none"){this._renderUITimelineAppointments(u,t,I)}else{for(var M=0;M=0){for(var aj=t;ajc){al=c}U.rowsCount=al}}}}for(var ak=0;akY.cellWidth){var D=Y.cellWidth-F-15;g.x+=D}}}}}else{var F=parseFloat(Y.cellWidth/24)*(g.appointment.to.hour())+parseFloat(Y.cellWidth/48)*(g.appointment.to.minute()/30);var G=(parseFloat(Y.cellWidth/24)*(g.appointment.from.hour())+parseFloat(Y.cellWidth/48)*(g.appointment.from.minute()/30));if(F>0){F=Y.cellWidth-F}if(X.appointmentsRenderMode=="exactTime"){g.x+=F;g.width-=F;g.width-=G}if(g.appointment.duration().days()<1){if(g.width<15){g.width=15}}g.timewidth=g.width;g.timex=F}}}else{if(X.appointmentsRenderMode){if(X.appointmentsRenderMode=="exactTime"){var ae=Y.getMinutesPerScale();if(g.appointment.from.minute()%ae!=0){var au=g.appointment.from.minute()%ae;var F=parseFloat(Y.cellWidth/ae)*au;if(Y.rtl){var F=parseFloat(Y.cellWidth/ae)*au}}else{var F=0}if(g.appointment.to.minute()%ae!=0){var au=g.appointment.to.minute()%ae;var G=Y.cellWidth-parseFloat(Y.cellWidth/ae)*au;if(Y.rtl){var G=Y.cellWidth-parseFloat(Y.cellWidth/ae)*au}}else{G=0}if(!Y.rtl){g.x+=F;g.width-=F;g.width-=G}else{g.x+=G;g.width-=F;g.width-=G}}}}}var ah="";for(var aa=0;aa1){u=", "+u}var H=ai.appointment.color;var k=ai.appointment.resourceId;var ad=Y.getColors(Y._resources.indexOf(k));var af=" data-resourceId='"+k+"' ";var S=ai.appointment.borderColor;if(!W){W=ad.background}if(!S){S=ad.border}if(!H){H=ad.color}var b=ai.appointment.isRecurrentAppointment();var s=ai.appointment.isException();var am="";var v=Y.toTP("jqx-scheduler-appointment-status");var N="";var M=Y.statuses[ai.appointment.status];var l=false;if(M){if(M=="transparent"){l=false}else{N="
    ";if(M=="tentative"){v=Y.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");N="
    "}l=true}}var A="";if(Y.rtl){var v=Y.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");N="
    ";if(M=="tentative"){v=Y.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");N="
    "}A=N;N=""}var R="";var L=O+"
    "+u;if(Y.renderAppointment){var ar=Y.renderAppointment({appointment:ai.appointment.boundAppointment,textColor:H,background:W,borderColor:S,html:L,cssClass:"",style:"",width:ai.width,height:ai.height,view:Y._views[Y._view].type});if(ar){var I=ar.html;if(I!=L){L=I}H=ar.textColor;W=ar.background;S=ar.borderColor;if(ar.cssClass){R=ar.cssClass+" "}if(ar.style!=""){var ad=Y.getAppointmentColors(ar.style);W=ad.background;S=ad.border;H=ad.color}}}if(am===""){if(l){var am="
    "+N+"
    "+L+"
    "+A+"
    "}else{var am="
    "+L+"
    "}}var aq="";if(Y.rtl){aq=Y.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(s){var i=H.toLowerCase()=="white"?Y.toTP("jqx-icon-recurrence-exception-white"):Y.toTP("jqx-icon-recurrence-exception");I="
    "+am+"
    "}else{if(b){var r=H.toLowerCase()=="white"?Y.toTP("jqx-icon-recurrence-white"):Y.toTP("jqx-icon-recurrence");I="
    "+am+"
    "}else{I="
    "+am+"
    "}}ah=I;var Q=a(I);Q.appendTo(this.table);ai.element=Q;if(this.appointmentTooltips){if(!ai.appointment.tooltip){var V=ai.appointment.subject;if(V){var u=ai.appointment.location;if(u){V+="\n"+u}Q[0].setAttribute("title",V)}}else{Q[0].setAttribute("title",ai.appointment.tooltip)}}}var ag=Y.table.find(".jqx-scheduler-appointment");var B=function(m){for(var j=0;j=aw+j-12){Q[0].style.visibility="hidden";var x=m.find(".jqx-icon-arrow-down");if(x.length>0){x[0].style.display="block";x[0].mousedown=function(){if(Y.openedMonthCellPopup){Y.openedMonthCellPopup.remove()}var ax=a("
    ");var aA=new a.jqx.date(m.attr("data-date"),Y.timeZone);var aD=a("
    ");aD.height(16);aD.find("span")[0].mousedown=function(){ax.remove()};aD.addClass(Y.toTP("jqx-widget-header"));ax.addClass(Y.toTP("jqx-widget"));ax.addClass(Y.toTP("jqx-window"));ax.addClass(Y.toTP("jqx-scheduler-month-cell-popup"));ax.addClass(Y.toTP("jqx-popup"));var aE=a("
    ");ax.append(aD);ax.append(aE);aE.addClass(Y.toTP("jqx-widget-content"));var ay=m.width();var aG=21;for(var aB=0;aB0){O=a(this.host.find(".jqx-scheduler-month-cell")[0]).height()}for(var e=0;ei.date){return 1}};var u=-1;var o=r.resourceId;var h=K._resources.indexOf(o);if(K.resources&&K.resources.orientation=="none"){h=-1}for(var Q=0;QW){continue}w[P].appointments=new Array();if(h!=-1){if((1+h)!=w[P].getAttribute("data-view")){continue}}if(B<=l&&l0){this._renderUIMonthAppointments(T[Q])}}}else{for(var P=0;P0){this._renderUIMonthAppointments(T[Q])}}}}},_getMonthAppointmentsPerWeek:function(){var M=this;var W=M._views[M._view].type;var L=M._views[M._view];var C=new Array();var U=this.rows;var Q=0;if(this.host.find(".jqx-scheduler-month-cell").length>0){Q=a(this.host.find(".jqx-scheduler-month-cell")[0]).height()}if(!M.rows){return new Array()}var B=this.getViewStart();var P=this.getViewEnd();for(var e=0;ei.date){return 1}};var v=-1;var p=s.resourceId;var k=M._resources.indexOf(p);if(M.resources&&M.resources.orientation=="none"){k=-1}for(var S=0;SY){continue}if(k!=-1){if((1+k)!=A[R].getAttribute("data-view")){continue}}if(D<=m&&m0){var w=this.getMaxMonthAppointments(V[S]);var o=M.appointmentsMinHeight;if(M.isTouchDevice()){o=M.touchAppointmentsMinHeight}if(L.appointmentHeight){o=L.appointmentHeight}f.push((w*(o+3))+22)}else{f.push("auto")}}return f}else{var f=new Array();for(var R=0;R0){var w=this.getMaxMonthAppointments(V[S]);f.push((w*(o+3))+22)}else{f.push("auto")}}return f}}},_renderUIMonthAppointments:function(ar){var ab=this._views[this._view];var I=ar;var B=this.getViewStart();var ah=this.getViewEnd();var G=1;var ac=this;G=this.getMaxMonthAppointments(ar);var i=ac.appointmentsMinHeight;if(ac.isTouchDevice()){i=ac.touchAppointmentsMinHeight}if(ab.appointmentHeight){i=ab.appointmentHeight}var f=this._sortAppointmentsByFrom;if(this.rtl){f=this._sortAppointmentsByTo}for(var aq=0;aq=0){for(var ak=u;akc){ao=c}Y.rowsCount=ao}}}}for(var an=0;an1){if(h.appointment.elements[0]!=h){K=0}}var L=parseFloat(ac.cellWidth/24)*(h.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.to.minute()/30);if(h.appointment.elements.length>1){if(h.appointment.elements[h.appointment.elements.length-1]!=h){L=0}}h.timewidth-=K;if(L>0){h.timewidth-=ac.cellWidth;h.timewidth+=L}if(ab.appointmentsRenderMode=="exactTime"){if(h.from.clearTime().toString()==h.appointment.from.clearTime().toString()){h.x+=K}h.width=h.timewidth;if(h.appointment.duration().days()<1){if(h.width<15){h.width=15;if(K+15>ac.cellWidth){var H=ac.cellWidth-K-15;h.x+=H}}}}}else{var K=parseFloat(ac.cellWidth/24)*(h.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.to.minute()/30);var L=parseFloat(ac.cellWidth/24)*(h.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.from.minute()/30);if(h.appointment.elements.length>1){if(h==h.appointment.elements[0]){if(L>0){if(ab.appointmentsRenderMode=="exactTime"){h.width-=(ac.cellWidth-K);h.width-=L}else{h.timewidth=h.width-ac.cellWidth+K-L}}else{h.timewidth=h.width;h.timex=0}}else{if(h==h.appointment.elements[h.appointment.elements.length-1]){if(ab.appointmentsRenderMode=="exactTime"){h.x+=ac.cellWidth;h.x-=K;h.width+=K;h.width-=ac.cellWidth}h.timewidth=h.width-ac.cellWidth+K;h.timex=ac.cellWidth-K}}}else{if(ab.appointmentsRenderMode=="exactTime"){h.x+=ac.cellWidth;h.x-=K;h.width-=(ac.cellWidth-K);h.width-=L}if(h.appointment.duration().days()<1){if(h.width<15){h.width=15}}h.timewidth=h.width-ac.cellWidth+K-L;h.timex=ac.cellWidth-K}}}}for(var ae=0;ae1){v=", "+v}if(!aa){aa=ai.background}if(!X){X=ai.border}if(!M){M=ai.color}var b=al.appointment.isRecurrentAppointment();var t=al.appointment.isException();var ap="";var z=ac.toTP("jqx-scheduler-appointment-status");var S="";var R=ac.statuses[al.appointment.status];var n=false;if(R){if(R=="transparent"){n=false}else{S="
    ";if(R=="tentative"){z=ac.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}n=true}}var D=ac.toTP("jqx-scheduler-appointment-duration-status");var am="
    ";if(e){am=""}if(ab.appointmentsRenderMode!="exactTimeStatus"){am=""}var F="";if(ac.rtl){var z=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");S="
    ";if(R=="tentative"){z=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}F=S;S=""}var W="";var Q=T+v;if(!e){Q=T+v+am}if(ac.renderAppointment){var au=ac.renderAppointment({appointment:al.appointment.boundAppointment,textColor:M,background:aa,borderColor:X,html:Q,cssClass:"",style:"",width:al.width,height:al.height,view:ac._views[ac._view].type});if(au){var N=au.html;if(N!=Q){Q=N}M=au.textColor;aa=au.background;X=au.borderColor;if(au.cssClass){W=au.cssClass+" "}if(au.style!=""){var ai=ac.getAppointmentColors(au.style);aa=ai.background;X=ai.border;M=ai.color}}}if(ap===""){if(n){var ap="
    "+S+"
    "+Q+"
    "+F+"
    "}else{var ap="
    "+Q+"
    "}}var at="";if(ac.rtl){at=ac.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(t){var k=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-exception-white"):ac.toTP("jqx-icon-recurrence-exception");N="
    "+ap+"
    "}else{if(b){var s=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-white"):ac.toTP("jqx-icon-recurrence");N="
    "+ap+"
    "}else{N="
    "+ap+"
    "}}var V=a(N);V.appendTo(this.table);al.element=V;if(this.appointmentTooltips){if(!al.appointment.tooltip){var Z=al.appointment.subject;if(w&&!e){Z=w+" - "+y+" "+Z}if(Z){var v=al.appointment.location;if(v){Z+="\n"+v}V[0].setAttribute("title",Z)}}else{V[0].setAttribute("title",al.appointment.tooltip)}}var af=false;a.each(al.cells,function(){var m=a(this.cell);var j=m.position();if(!m[0].appointments){m[0].appointments=new Array()}m[0].appointments.push({ui:V,appointment:al});if(al.y+al.height+2>=j.top+m.height()){V.css("visibility","hidden");var p=m.find(".jqx-icon-arrow-down");p.show();if(p[0]){p[0].mousedown=function(){if(ac.openedMonthCellPopup){ac.openedMonthCellPopup.remove()}var aw=a("
    ");var aB=m.find("div").clone(true);aB.find("span").removeClass().addClass(ac.toTP("jqx-icon-close"));aB.find("span")[0].mousedown=function(){aw.remove()};aB.addClass(ac.toTP("jqx-widget-header"));aw.addClass(ac.toTP("jqx-widget"));aw.addClass(ac.toTP("jqx-window"));aw.addClass(ac.toTP("jqx-scheduler-month-cell-popup"));aw.addClass(ac.toTP("jqx-popup"));var az=a("
    ");aw.append(aB);aw.append(az);az.addClass(ac.toTP("jqx-widget-content jqx-disableselect"));var ay=m.width();var x=5+m.find("div").outerHeight();for(var ax=0;axc){return 1}if(d==c){return 0}},_sortAppointmentsByFrom:function(b,f){if(b.from.equals(f.from)){var d=b.to-b.from;var e=d*10000;var d=f.to-f.from;var c=d*10000;if(e>c){return -1}}if(b.fromf.from){return 1}if(b.from==f.from){return 0}},_sortAppointmentsByTo:function(b,f){if(b.to.equals(f.to)){var d=b.to-b.from;var e=d*10000;var d=f.to-f.from;var c=d*10000;if(e>c){return -1}}if(b.tof.to){return 1}if(b.to==f.to){return 0}},_sortAppointmentsByResourceId:function(b,f,e){var d=e._resources.indexOf(b.resourceId);var c=e._resources.indexOf(f.resourceId);if(d==c){return 0}if(dc){return -1}},isBusyRow:function(e,d){for(var c=0;c=1){var o=i.from;var j=i.to;var w=a.jqx.scheduler.utilities.rangeIntersection(t,u,o,j);if(w){x++}}}y=Math.max(x,y);s=s.addDays(1,false)}return y};if(this._resources.length<2||(!this.resources.orientation||this.resources.orientation=="none")){var m=n(e)}else{var k=1;for(var c=0;c0){j-=parseInt(this.scrollBarSize)+6;if(this.rtl){j+=3}b=j}var i="";if(this.columns==undefined||this.columns.records==undefined){return}var h=this;var g=false;var k=new Array();a.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=h.vScrollBar[0].style.visibility=="hidden"?0:h.scrollBarSize+5;if(h.scrollBarSize==0){n=0}m=parseFloat(this.width)*b/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(b)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}j-=Math.round(m)}else{if(this.width!="auto"&&!this._width){j-=this.width}else{i+=this.text}}if(this._width=="auto"){k[k.length]=this}}});var e=this.columnsheader.find("#columntable"+this.element.id);if(e.length==0){return}var c=0;var f=e.find(".jqx-grid-column-header");var d=0;a.each(this.columns.records,function(o,t){var m=this.element;var w=false;var v=this.width;var q=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){v=parseFloat(this._percentagewidth)*b/100}else{v=parseFloat(this.width)*b/100}v=Math.round(v);w=true}if(this.width!="auto"&&!this._width&&!w){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(w){if(vthis.maxwidth&&this.maxwidth!="auto"){v=this.maxwidth;this.width=v}if(parseInt(m[0].style.width)!=v){m.width(v);this.width=v}}else{var n=h.columns.records.length;var p=h._views[h._view].type;if(p==="dayView"||p==="weekView"){var r=h._views[h._view];if(r.timeRuler){if(r.timeRuler.timeZones){n-=r.timeRuler.timeZones.length}n--}else{n--}}else{if(p==="monthView"&&h._views[h._view].showWeekNumbers){n--}}var l=Math.floor(j*(1/n));if(h.resources&&h.resources.resourceColumnWidth&&h.resources.resourceColumnWidth!="auto"){l=h.resources.resourceColumnWidth}else{if(h.resources&&h.resources.resourceColumnWidth&&h.resources.resourceColumnWidth=="auto"){if(h.resources.orientation=="horizontal"){l=Math.round((2+j)*(1/h._getColumnsLengthPerView()))}}}var s=(j*(1/n))-l;c+=s;if(c>=1){c-=1;l++}if(c>=0.5&&o==h.columns.records.length-1){l++}if(p=="agendaView"){l=j/k.length;l++}if(l<0){var u=a(""+this.text+"");a(document.body).append(u);l=10+u.width();u.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=parseInt(l);m.width(this.width)}}if(parseInt(m[0].style.left)!=d){m.css("left",d)}if(!(this.hidden)){d+=this.width}this._requirewidthupdate=true;if(q!==this.width){g=true}});this.columnsheader.width(2+d);e.width(this.columnsheader.width());this._resizecolumnGroups();if(g){this._renderrows();h._arrange()}},_rendercolumnheaders:function(){var g=this;if(this._updating){return}var l=this._views[this._view];this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var h=a('
    ');h[0].cells=new Array();var r=0;var d=0;var n="";var p=this._hostWidth;if(!p){this._hostWidth=this.host.width()}var v=this._hostWidth;var m=v;var w=this.getRows().length;var u=this.rowsHeight;if(this.isTouchDevice()){u=this.touchRowsHeight}if(w*u>this.host.height()){this.vScrollBar[0].style.visibility="inherit"}if(this.vScrollBar.css("visibility")!=="hidden"&&this.scrollBarSize>0){v-=parseInt(this.scrollBarSize)+6;if(this.rtl){v+=3}m=v}var q=new Array();var s=new Array();a.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){v-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*m/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}v-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}v-=this.width}}}}else{n+=this.text}}if(this.width==null||this.width=="auto"){s[s.length]=this}q[q.length]=this});if(this.rtl){for(var t=0;tthis.maxwidth&&this.maxwidth!="auto"){K=this.maxwidth}z[0].style.width=parseInt(K)+"px"}else{if(L){if(Kthis.maxwidth&&this.maxwidth!="auto"){K=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}z.width(K);this.width=K}else{var A=g.columns.records.length;var C=g._views[g._view].type;if(C==="dayView"||C==="weekView"){var G=g._views[g._view];if(G.timeRuler){if(G.timeRuler.timeZones){A-=G.timeRuler.timeZones.length}A--}else{A--}}else{if(C==="monthView"&&g._views[g._view].showWeekNumbers){A--}}var j=Math.floor(v*(1/A));if(g.resources&&g.resources.resourceColumnWidth&&g.resources.resourceColumnWidth!="auto"){j=g.resources.resourceColumnWidth}else{if(g.resources&&g.resources.resourceColumnWidth&&g.resources.resourceColumnWidth=="auto"){if(g.resources.orientation=="horizontal"){j=Math.round((2+v)*(1/g._getColumnsLengthPerView()))}}}var H=(v*(1/A))-j;o+=H;if(o>=1){o-=1;j++}if(o>=0.5&&D==g.columns.records.length-1){j++}if(isNaN(j)){j=this.minwidth}if(C=="agendaView"){j=v/s.length;j++}if(j<0){var J=a(""+this.text+"");a(document.body).append(J);j=10+J.width();J.remove()}if(jthis.maxwidth){j=this.maxwidth}this._width="auto";this.width=parseInt(j);K=this.width;z.width(this.width)}}if(this.timeColumn){z.css("border-bottom-color","transparent");if(l.timeRuler&&l.timeRuler.timeZones){if(D0){this.columnsheader[0].style.width=2+d+"px"}else{this.columnsheader[0].style.width=d+"px"}this._columnswidth=d;this.columnsrow=h;g.columnsheader.append(h);h[0].style.width=d+"px";if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var r=this.headerZIndex+this.columns.records.length;var m=this;var f=m.toTP("jqx-grid-column-header")+" "+m.toTP("jqx-grid-columngroup-header")+" "+m.toTP("jqx-widget-header");if(m.rtl){f+=" "+m.toTP("jqx-grid-columngroup-header-rtl")}var d=this.columnsheader.find("#columntable"+this.element.id);d.find("jqx-grid-columngroup-header").remove();for(var g=0;g
    ');var h=a(this._rendercolumnheader(o.text,o.align,this.columnsHeight,this));if(o.renderer){o.renderer(e,o.text)}e.append(h);e[0].style.left=c+"px";if(c===0){e[0].style.borderLeftColor="transparent"}e[0].style.top=n+"px";e[0].style.height=p+"px";e[0].style.width=-1+o.width+"px";d.append(e);o.element=e}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var c=0;c0){c.removeHandler(b,"mouseenter");c.removeHandler(b,"mouseleave");var d=a(e.filtericon);c.removeHandler(d,"mousedown");c.removeHandler(d,"click");c.removeHandler(b,"click")}},destroy:function(){var b=this;b._removeHandlers();if(b._editDialog){b._editDialog.jqxWindow("destroy")}if(b.menu){b.menu.jqxMenu("destroy")}if(b.editRecurrenceDialog){b.editRecurrenceDialog.jqxWindow("destroy")}b.vScrollBar.jqxScrollBar("destroy");b.hScrollBar.jqxScrollBar("destroy");delete b.vScrollBar;delete b.hScrollBar;delete b._mousewheelfunc;a.jqx.utilities.resize(b.host,null,true);b.host.remove()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d.host.height(d.height);d.host.width(d.width);d._updatesize(false,true)}},propertyChangedHandler:function(b,d,f,e){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(e!==f){if(d=="filterable"){b._render()}else{if(d=="view"){b.setView(e)}else{if(d=="views"){b._columns=null;b._views=new Array();b._view=b.view;for(var c=0;c'+g+"
    ";if(this.columnRenderer){var b=this.columnRenderer(g,h,d,c);if(b!=undefined){return b}}return c}})})(jqxBaseFramework); +(function(a){if(!a.jqx.scheduler){a.jqx.scheduler={}}a.jqx.jqxWidget("jqxScheduler","",{});a.extend(a.jqx._jqxScheduler.prototype,{defineInstance:function(){var b={altRows:false,autoShowLoadElement:true,columnsHeight:30,columns:[],columnGroups:null,dataview:null,disabled:false,enableHover:true,appointmentOpacity:0.8,headerZIndex:235,height:600,timeRulerWidth:60,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",localization:null,ready:null,renderToolBar:null,renderAppointment:null,rendered:null,rendering:null,rtl:false,showToolbar:true,showLegend:false,legendPosition:"bottom",legendHeight:34,rowsHeight:27,touchRowsHeight:36,appointmentsMinHeight:18,touchAppointmentsMinHeight:27,appointmentsRenderMode:"default",serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:a.jqx.utilities.scrollBarSize,touchScrollBarSize:a.jqx.utilities.touchScrollBarSize,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,showAllDayRow:true,changedAppointments:new Array(),renderMode:"simple",views:new Array(),view:0,min:new a.jqx.date(0),max:new a.jqx.date(9999,12,31),date:new a.jqx.date("todayDate"),colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF","#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8","#E8601A","#FF9639","#F5BD6A","#599994","#115D6E","#D02841","#FF7C41","#FFC051","#5B5F4D","#364651","#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00","#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B","#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63","#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6","#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F","#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825","#993144","#FFA257","#CCA56A","#ADA072","#949681","#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932","#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54","#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3","#444546","#FFBB6E","#F28D00","#D94F00","#7F203B","#583C39","#674E49","#948658","#F0E99A","#564E49","#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17","#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5","#844341","#D5CC92","#BBA146","#897B26","#55591C","#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472","#96003A","#FF7347","#FFBC7B","#FF4154","#642223","#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E","#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7","#7B1A25","#BF5322","#9DA860","#CEA457","#B67818","#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46","#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800","#FF6800","#A0A700","#FF8D00","#678900","#0069A5"],colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],resources:null,contextMenu:true,contextMenuOpen:null,contextMenuClose:null,contextMenuItemClick:null,contextMenuCreate:null,timeZone:null,statuses:{free:"white",tentative:"tentative",busy:"transparent",outOfOffice:"#800080"},appointmentDataFields:{from:"from",to:"to",id:"id",calendarId:"calendarId",description:"description",location:"location",subject:"subject",background:"background",color:"color",borderColor:"borderColor",style:"style",recurrencePattern:"recurrencePattern",recurrenceException:"recurrenceException",draggable:"draggable",resizable:"resizable",resourceId:"resourceId",status:"status",tooltip:"tooltip",hidden:"hidden",allDay:"allDay",timeZone:"timeZone",ownerId:"ownerId"},appointmentTooltips:true,tableColumns:1,tableRows:1,dayNameFormat:"full",touchDayNameFormat:"abbr",toolBarRangeFormat:"dd MMMM yyyy",toolBarRangeFormatAbbr:"dd MM yyyy",columnRenderer:null,exportSettings:{serverURL:null,characterSet:null,fileName:"jqxScheduler",dateTimeFormatString:"S",resourcesInMultipleICSFiles:false,ICSXWRCALNAME:"jqxScheduler",ICSXWRCALDESC:"jqxScheduler Description"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},editDialogDateTimeFormatString:"dd/MM/yyyy hh:mm tt",editDialogDateFormatString:"dd/MM/yyyy",editDialogOpen:null,editDialogCreate:null,editDialogKeyDown:null,editDialogClose:null,editDialog:true,toolbarHeight:54,tableZIndex:469,_updating:false,touchMode:"auto",width:800,that:this,beginDrag:null,endDrag:null,dragging:null,timeZones:[{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:false},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:false},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:false},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:true},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:true},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:false},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:true},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:false},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:false},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:true},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:false},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:true},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:false},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:true},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:true},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:true},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:true},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus",supportsDaylightSavingTime:false},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:true},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:false},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:true},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:true},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:true},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:true},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:true},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:false},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:true},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:true},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:false},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:true},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:false},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:true},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:false},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:true},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:true},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:false},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Rome",supportsDaylightSavingTime:true},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Budapest, Prague",supportsDaylightSavingTime:true},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:true},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia",supportsDaylightSavingTime:true},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:false},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:true},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:true},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:true},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:true},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:true},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:true},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:true},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:true},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:true},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:false},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:false},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:true},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:true},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:true},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:true},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:false},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:true},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:false},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:true},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:true},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:false},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:true},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:false},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:false},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:false},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:false},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:false},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:true},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:true},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:false},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:false},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:true},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:false},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong",supportsDaylightSavingTime:false},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:false},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:true},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:false},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:true},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:false},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:true},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:false},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:false},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:true},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:false},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:true},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:false},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:true},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:true},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:true},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:false},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:true},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:true},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:true},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:true},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:false},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:false},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:true}]};if(this===a.jqx._jqxScheduler.prototype){return b}a.extend(true,this,b);this.that=this;return b},createInstance:function(c){var e=this;e._views=new Array();e._view=e.view;for(var d=0;d0){e._camelCase=e.source._source.dataFields!==undefined;e.selectionMode=e.selectionMode.toLowerCase()}if(e.host.attr("tabindex")==null){e.host.attr("tabindex","0")}e.host.attr("role","grid");e.host.attr("align","left");e.host.addClass(e.toTP("jqx-grid"));e.host.addClass(e.toTP("jqx-scheduler"));e.host.addClass(e.toTP("jqx-reset"));e.host.addClass(e.toTP("jqx-rc-all"));e.host.addClass(e.toTP("jqx-widget"));e.host.addClass(e.toTP("jqx-widget-content jqx-disableselect"));if(e._testmodules()){return}e.overlay=a("
    ");e.overlay.hide();e.overlay.appendTo(e.host);e.render(true);a.jqx.utilities.resize(e.host,function(){var h=a(window).width();var f=a(window).height();e._hostWidth=null;e._hostHeight=null;var g=e.host.width();var i=e.host.height();e._hostWidth=g;e._hostHeight=i;if(e._lastHostWidth!=g||e._lastHostHeight!=i){e._updatesize(e._lastHostWidth!=g,e._lastHostHeight!=i)}e._lastWidth=h;e._lastHeight=f;e._lastHostWidth=g;e._lastHostHeight=i});e.createEditRecurrenceDialog()},createEditRecurrenceDialog:function(){var d=this;d.editRecurrenceDialog=null;var b=a("
    "+d.schedulerLocalization.editRecurringAppointmentDialogTitleString+"
    "+d.schedulerLocalization.editRecurringAppointmentDialogContentString+"
    ");d.editRecurrenceDialog=b;a(b).jqxWindow({rtl:d.rtl,autoFocus:false,animationType:"none",autoOpen:false,theme:d.theme,minWidth:300,minHeight:110,resizable:false});var c=b.find("button");c.jqxButton({theme:d.theme,width:"50%"});var e=false;c.mousedown(function(){e=true;var f=this.id;if(f.indexOf("editRecurringAppointmentOccurrence")>=0){d.editSeries(false)}else{d.editSeries(true)}a(b).jqxWindow("close")});this.addHandler(a(b),"open",function(f){d._raiseEvent("editRecurrenceDialogOpen",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null})});d.addHandler(a(b),"keydown",function(f){if(f.keyCode==13){if(a(document.activeElement).ischildof(a(b))){if(document.activeElement.nodeName.toLowerCase()=="button"){a(document.activeElement).trigger("mousedown");a(document.activeElement).trigger("mouseup");return true}}}});this.addHandler(a(b),"close",function(f){if(!e){d._removeFeedbackAndStopResize();d.overlay.hide();d.focus();d._raiseEvent("editRecurrenceDialogClose",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null});return false}e=false;d.overlay.hide();d.focus();d._raiseEvent("editRecurrenceDialogClose",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null})});d.editRecurrenceDialog=b},getViewStart:function(){var d=this.getVisibleDate();var b=this._views[this._view].type;var e=this._views[this._view];switch(b){case"dayView":case"timelineDayView":return d}var c=this.getFirstDayOfWeek(d);return c},getViewEnd:function(){var e=this.getViewStart();var d=1;var b=this._views[this._view].type;var c=this._views[this._view];switch(b){case"dayView":d=1;break;case"timelineDayView":d=1;if(c.days){d=c.days}break;case"weekView":case"timelineWeekView":d=7;if(c.days){d=c.days}break;case"monthView":d=41;break;case"timelineMonthView":d=41;if(c.days){d=c.days}break;case"agendaView":d=7;if(c.days){d=c.days}break}return e.addDays(d)},getFirstDayOfWeek:function(d){var c=d;var b=this.schedulerLocalization.firstDay;if(b<0||b>6){b=6}while(c.dayOfWeek()!=b){c.addDays(-1,false)}return c},getVisibleDate:function(){var d=this.date;if(dthis.max){d=this.max}var b=this._views[this._view].type;var f=this._views[this._view];d=d.clearTime();switch(b){case"dayView":case"weekView":case"timelineDayView":case"timelineWeekView":case"agendaView":return d}var e=d.day();var c=d.addDays(-e+1);d=c;return d},_builddataloadelement:function(){if(this.dataloadelement){this.dataloadelement.remove()}this.dataloadelement=a('
    ');var c=a('
    '+this.schedulerLocalization.loadString+"
    ");c.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));c.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(c);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var b=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){b=true}}if(b){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var d=false;if(this.width==="auto"||this.width===null||this.autoWidth){d=true}if(d){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(c){var b=a("measure Text");b.addClass(this.toTP("jqx-widget"));a(document.body).append(b);if(c=="cell"){this._cellheight=b.height()}else{this._columnheight=b.height()}b.remove()},_testmodules:function(){var e="";var c=this;var b=function(){if(e.length!=""){e+=","}};if(!this.host.jqxScrollBar){b();e+=" jqxscrollbar.js"}if(!this.host.jqxButton){b();e+=" jqxbuttons.js"}if(!a.jqx.dataAdapter){b();e+=" jqxdata.js"}if(!this.host.jqxDateTimeInput){b();e+=" jqxdatetimeinput.js"}if(!this.host.jqxCalendar){b();e+=" jqxcalendar.js"}try{if(!Globalize){b();e+=" globalize.js"}}catch(d){}if(e!=""){throw new Error("jqxScheduler: Missing references to the following module(s): "+e);this.host.remove();return true}return false},focus:function(){try{if(this.isTouchDevice()){return}if(this._editDialog&&this._editDialog.jqxWindow("isOpen")){var c=this;setTimeout(function(){c.editDialogFields.subject.focus();c.editDialogFields.subject.select()},1);this.focused=true;return}if(document.activeElement==this.element){return}this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25);this.focused=true}catch(b){}},hiddenParent:function(){return a.jqx.isHidden(this.host)},_updatesize:function(h,g){if(this._loading){return}var e=this;var f=e.host.width();var d=e.host.height();if(!e._oldWidth){e._oldWidth=f}if(!e._oldHeight){e._oldHeight=d}if(e._resizeTimer!=undefined){clearTimeout(e._resizeTimer);e._resizeTimer=null}var c=300;var b=function(){if(e._resizeTimer){clearTimeout(e._resizeTimer)}e.resizingGrid=true;if(a.jqx.isHidden(e.host)){return}e._updatecolumnwidths();e.refresh();e._oldWidth=f;e._oldHeight=d;e.resizingGrid=false};b();e._resizeTimer=setTimeout(function(){var j=e.host.width();var i=e.host.height();if(e._oldWidth!=j||e._oldHeight!=i){b()}},c)},resize:function(c,b){if(c!=undefined){this.width=c}if(b!=undefined){this.height=b}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var b=a.jqx.mobile.isTouchDevice();this.touchDevice=b;if(this.touchMode==true){b=true;a.jqx.mobile.setMobileSimulator(this.element);this.touchDevice=b}else{if(this.touchMode==false){b=false}}if(b){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return b},toTP:function(b){return this.toThemeProperty(b)},localizestrings:function(b,c){this._cellscache=new Array();if(a.jqx.dataFormat){a.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxScheduler: "+this.loadingErrorMessage);return false}if(b!=null){for(var d in this.schedulerLocalization){if(b[d]){this.schedulerLocalization[d]=b[d]}}if(b.loadingErrorMessage){this.loadingErrorMessage=b.loadingErrorMessage}if(c!==false){this._builddataloadelement();a(this.dataloadelement).css("visibility","hidden");a(this.dataloadelement).css("display","none")}}else{this.schedulerLocalization={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},agendaDateColumn:"Date",agendaTimeColumn:"Time",agendaAppointmentColumn:"Appointment",backString:"Back",forwardString:"Forward",toolBarPreviousButtonString:"previous",toolBarNextButtonString:"next",emptyDataString:"No data to display",loadString:"Loading...",clearString:"Clear",todayString:"Today",dayViewString:"Day",weekViewString:"Week",monthViewString:"Month",agendaViewString:"Agenda",timelineDayViewString:"Timeline Day",timelineWeekViewString:"Timeline Week",timelineMonthViewString:"Timeline Month",agendaAllDayString:"all day",loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",editRecurringAppointmentDialogTitleString:"Edit Recurring Appointment",editRecurringAppointmentDialogContentString:"Do you want to edit only this occurrence or the series?",editRecurringAppointmentDialogOccurrenceString:"Edit Occurrence",editRecurringAppointmentDialogSeriesString:"Edit The Series",editDialogTitleString:"Edit Appointment",editDialogCreateTitleString:"Create New Appointment",contextMenuEditAppointmentString:"Edit Appointment",contextMenuCreateAppointmentString:"Create New Appointment",editDialogSubjectString:"Subject",editDialogLocationString:"Location",editDialogFromString:"From",editDialogToString:"To",editDialogAllDayString:"All day",editDialogExceptionsString:"Exceptions",editDialogResetExceptionsString:"Reset on Save",editDialogDescriptionString:"Description",editDialogResourceIdString:"Owner",editDialogStatusString:"Status",editDialogColorString:"Color",editDialogColorPlaceHolderString:"Select Color",editDialogTimeZoneString:"Time Zone",editDialogSelectTimeZoneString:"Select Time Zone",editDialogSaveString:"Save",editDialogDeleteString:"Delete",editDialogCancelString:"Cancel",editDialogRepeatString:"Repeat",editDialogRepeatEveryString:"Repeat every",editDialogRepeatEveryWeekString:"week(s)",editDialogRepeatEveryYearString:"year(s)",editDialogRepeatEveryDayString:"day(s)",editDialogRepeatNeverString:"Never",editDialogRepeatDailyString:"Daily",editDialogRepeatWeeklyString:"Weekly",editDialogRepeatMonthlyString:"Monthly",editDialogRepeatYearlyString:"Yearly",editDialogRepeatEveryMonthString:"month(s)",editDialogRepeatEveryMonthDayString:"Day",editDialogRepeatFirstString:"first",editDialogRepeatSecondString:"second",editDialogRepeatThirdString:"third",editDialogRepeatFourthString:"fourth",editDialogRepeatLastString:"last",editDialogRepeatEndString:"End",editDialogRepeatAfterString:"After",editDialogRepeatOnString:"On",editDialogRepeatOfString:"of",editDialogRepeatOccurrencesString:"occurrence(s)",editDialogRepeatSaveString:"Save Occurrence",editDialogRepeatSaveSeriesString:"Save Series",editDialogRepeatDeleteString:"Delete Occurrence",editDialogRepeatDeleteSeriesString:"Delete Series",editDialogStatuses:{free:"Free",tentative:"Tentative",busy:"Busy",outOfOffice:"Out of Office"}}}},_updateScrollbars:function(r){var j=false;var d=this;if(d.width==="auto"||d.width===null||d.autowidth){if(d.maxWidth==999999){j=true}}var h=d._views[d._view].type;var g=d._views[d._view];if(h=="monthView"&&d.resources&&d.resources.orientation=="none"&&!g.monthRowAutoHeight){var k=d.vScrollBar[0].style.visibility;d.hScrollBar[0].style.visibility="hidden";d.vScrollBar[0].style.visibility="hidden";if((k!=d.vScrollBar[0].style.visibility)){d._updatecolumnwidths()}return}var b=parseInt(d.scrollBarSize);var s=d.table?d.table.height():0;var i=0;var n="inherit";var k=d.vScrollBar[0].style.visibility;var o=d.hScrollBar[0].style.visibility;if(!r){var f=d.host.height()}else{var f=r}if(!d.columnGroups){f-=d.showHeader?d.columnsHeight:0}else{f-=d.showHeader?d.columnsheader.height():0}if(d.filterable){f-=d.filter.height()}if(d.pageable){f-=d.pagerHeight;if(d.pagerPosition==="both"){f-=d.pagerHeight}}if(d.showToolbar){f-=d.toolbarHeight}if(d.showLegend&&d._resources.length>0){f-=d.legendHeight}var m=false;if(d.height==="auto"||d.height===null||d.autoheight){if(d.maxHeight==999999){m=true}}if(!m&&s>f&&(d.getRows().length>0)){d.vScrollBar[0].style.visibility=n;i=4+parseInt(b);d.vScrollBar.jqxScrollBar({max:s-f})}else{d.vScrollBar[0].style.visibility="hidden"}if((k!=d.vScrollBar[0].style.visibility)){d._updatecolumnwidths()}var p=d.table?d.table.width():0;if(p>4){p-=4}var q=parseInt(d.host.css("border-left-width"))+parseInt(d.host.css("border-right-width"));var l=q+d.host.width()-i;if(p>l&&!j){d.hScrollBar[0].style.visibility=n;d.hScrollBar.jqxScrollBar({max:2+q+p-l});i=4+parseInt(b);if(b==0){i=0}if(!m&&s!=f){if(s>f-i+4&&(d.getRows().length>0)){d.hScrollBar.jqxScrollBar({max:q+p-l});var c=d.vScrollBar[0].style.visibility==="hidden";d.vScrollBar[0].style.visibility=n;d._updatecolumnwidths();if(c){d.hScrollBar.jqxScrollBar({max:p-l+q})}var e=d.table?d.table.width():0;if(e>3){e-=3}if(e!=p){if(el){d.hScrollBar.jqxScrollBar({max:q+e-l})}}}}}if(s-f>0){d.vScrollBar.jqxScrollBar({max:s-f+i})}else{d.vScrollBar[0].style.visibility="hidden"}}}else{d.hScrollBar[0].style.visibility="hidden"}if(d.getRows().length===0){d.vScrollBar[0].style.visibility="hidden";d.bottomRight[0].style.visibility="hidden"}if(d.vScrollBar[0].style.visibility=="hidden"){if(d.vScrollInstance.value!=0){d.vScrollInstance.setPosition(0)}}},_measureElementWidth:function(d){var c=a(""+d+"");c.addClass(this.toTP("jqx-widget"));c.addClass(this.toTP("jqx-grid"));c.addClass(this.toTP("jqx-grid-column-header"));c.addClass(this.toTP("jqx-widget-header"));a(document.body).append(c);var b=c.outerWidth()+20;c.remove();return b},_arrangeAutoHeight:function(d){if(!d){d=0}if(this.height==="auto"||this.height===null||this.autoheight){var g=this.table.height();var f=0;this._hostHeight=null;if(!this.columnGroups){f+=this.showHeader?this.columnsHeight:-1}else{f+=this.showHeader?this.columnsheader.height():-1}f+=this.showLegend&&this._resources.length>0?this.legendHeight:0;f+=this.showToolbar?this.toolbarHeight:0;f+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){f+=this.pageable?this.pagerHeight:0}f+=g;if(this.filterable){var e=this.filter.find(".filterrow");var b=this.filter.find(".filterrow-hidden");var c=1;if(b.length>0){c=0}f+=this.filterHeight-1+this.filterHeight*e.length*c}if(f+d>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(f+d)}return true}return false},_arrangeAutoWidth:function(d){if(!d){d=0}if(this.width==="auto"||this.width===null||this.autowidth){this._hostWidth=null;var c=0;for(var e=0;ethis.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(f+d)}return true}return false},_measureTopAndHeight:function(){var b=this.host.height();var c=0;if(this.showToolbar){c+=this.toolbarHeight;b-=parseInt(this.toolbarHeight)}if(this.showLegend&&this.legendPosition!="bottom"&&this._resources.length>0){c+=parseInt(this.legendHeight)+1}return{top:c,height:b}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var d=this.legendHeight;if(this._resources.length==0){d=0}var t=this._hostWidth?this._hostWidth:this.host.width();var q=this._hostHeight?this._hostHeight:this.host.height();var j=q;var i=this;if(this.showLegend&&this.legendPosition=="top"){this.legendbartop[0].style.visibility="inherit"}else{this.legendbartop[0].style.visibility="hidden"}var p=0;if(this.showToolbar){this.toolbar.width(t);this.toolbar[0].style.height=this.toolbarHeight-1+"px";this.toolbar[0].style.top="0px";p+=this.toolbarHeight;q-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.showLegend&&this.legendPosition=="bottom"){this.legendbarbottom[0].style.width=t+"px";this.legendbarbottom[0].style.height=d+"px"}else{this.legendbarbottom[0].style.height="0px"}if(this.showLegend&&this.legendPosition=="top"){if(this.legendbartop[0].style.width!=t+"px"){this.legendbartop[0].style.width=parseInt(t)+"px"}if(this.legendbartop[0].style.height!=d+"px"){this.legendbartop[0].style.height=parseInt(d-1)+"px"}if(this.legendbartop[0].style.top!=p+"px"){this.legendbartop[0].style.top=p+"px"}var e=p+d+"px";p=p+d;if(this.content[0].style.top!=e){this.content[0].style.top=p+"px"}}if(!this.showLegend){this.legendbartop[0].style.display="none";this.legendbarbottom[0].style.display="none"}this._updateScrollbars(j);var b=parseInt(this.scrollBarSize);var m=4;var f=2;var g=0;if(this.vScrollBar[0].style.visibility!="hidden"){g=b+m}if(this.hScrollBar[0].style.visibility!="hidden"){f=b+m+2}if(b==0){f=0;g=0}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var u=this._arrangeAutoHeight(f-2);var r=this._arrangeAutoWidth(g+1);if(u||r){this.legendbartop[0].style.width=parseInt(t)+"px";this.toolbar[0].style.width=parseInt(t)+"px";this.legendbarbottom[0].style.width=parseInt(t)+"px";this.filter[0].style.width=parseInt(t)+"px"}if(u){var w=this._measureTopAndHeight();p=w.top;q=w.height}}var n=0;if(this.showLegend&&this.legendPosition=="bottom"){f+=d;n+=d}else{if(this.showLegend){f+=d}}if(this.hScrollBar[0].style.height!=b+"px"){this.hScrollBar[0].style.height=parseInt(b)+"px"}if(this.hScrollBar[0].style.top!=p+q-m-b-n+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=p+q-m-b-n-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var h=false;var v=false;if(g==0){if(l!=(t-2)+"px"){this.hScrollBar[0].style.width=(t-2)+"px";h=true}}else{if(l!=(t-b-m)+"px"){this.hScrollBar[0].style.width=(t-b-m+"px");h=true}}if(this.vScrollBar[0].style.width!=b+"px"){this.vScrollBar[0].style.width=b+"px";v=true}if(this.vScrollBar[0].style.height!=parseInt(q)-f+"px"){this.vScrollBar[0].style.height=(parseInt(q)-f+"px");v=true}if(this.vScrollBar[0].style.left!=parseInt(t)-parseInt(b)-m+"px"||this.vScrollBar[0].style.top!=p+"px"){this.vScrollBar[0].style.top=p+"px";this.vScrollBar[0].style.left=parseInt(t)-parseInt(b)-m+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:p});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:b+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var s=this.hScrollInstance;s.disabled=this.disabled;if(h){s.refresh()}if(v){k.refresh()}var o=function(x){if((x.vScrollBar[0].style.visibility!="hidden")&&(x.hScrollBar[0].style.visibility!="hidden")){x.bottomRight[0].style.visibility="inherit";x.bottomRight[0].style.left=1+parseInt(x.vScrollBar.css("left"))+"px";x.bottomRight[0].style.top=parseInt(x.hScrollBar.css("top"))+"px";if(x.rtl){x.bottomRight.css("left","0px")}x.bottomRight[0].style.width=parseInt(b)+3+"px";x.bottomRight[0].style.height=parseInt(b)+4+"px"}else{x.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=t-g+"px"){this.content[0].style.width=t-g+"px"}if(this.content[0].style.height!=q-f+3+"px"){this.content[0].style.height=q-f+3+"px"}if(this.content[0].style.top!=p+"px"){this.content[0].style.top=parseInt(p)+"px"}if(this.rtl){this.content.css("left",g)}if(this.showLegend&&this.legendPosition=="bottom"){this.legendbarbottom.css("top",p-1+q-d-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.legendbarbottom.css("left",this.content.css("left"))}else{this.legendbarbottom.css("left","0px")}}}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(t!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(q!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostWidth=t;this._hostHeight=j;var c=this.schedulercontent.coord();this._tableOffset=c},scrollOffset:function(d,c){if(arguments.length==0||(d!=null&&typeof(d)=="object"&&!d.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(d!=null&&typeof(d)=="object"){var c=d.left;var b=d.top;var d=b}if(d==null||c==null||d==undefined||c==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",d);this.hScrollBar.jqxScrollBar("setPosition",c)},scrollleft:function(b){if(b==null||b==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",b)}},scrolltop:function(b){if(b==null||b==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",b)}},beginAppointmentsUpdate:function(){this._appupdating=true},endAppointmentsUpdate:function(){this._appupdating=false;this._renderrows()},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(b){this._updating=false;if(b===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(b,g,f){if(this.loadingstate===true){return}var j=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){a(this.dataloadelement).css("visibility","visible");a(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{a(this.dataloadelement).css("visibility","hidden");a(this.dataloadelement).css("display","none")}}var h=this;if(b==null){b={}}if(b.sortcomparer==undefined||b.sortcomparer==null){b.sortcomparer=null}if(b.filter==undefined||b.filter==null){b.filter=null}if(b.sort==undefined||b.sort==null){b.sort=null}if(b.data==undefined||b.data==null){b.data=null}var d=null;if(b!=null){d=b._source!=undefined?b._source.url:b.url}this.dataview=this.dataview||new a.jqx.scheduler.dataView("dataView");this.resourcesDataView=this.resourcesDataView||new a.jqx.scheduler.dataView("resourcesDataView");this.dataview.pageable=this.pageable;this.dataview.scheduler=this;this.resourcesDataView.scheduler=this;this._loading=true;this.appointments=new Array();this.uiappointments=new Array();var e=1;if(this.resources&&this.resources.source){e=2}var c=0;var i=function(){if(c==e){h._resourcesBinding=false;var m=h._resources.length>1?h._resources.length:1;if(h.resources&&h.resources.orientation==="horizontal"){h.tableColumns=m;h.tableRows=1}else{if(h.resources&&h.resources.orientation==="vertical"){h.tableRows=m;h.tableColumns=1}else{h.tableColumns=1;h.tableRows=1}}h._render();if(h.autoShowLoadElement&&!h._loading){a(h.dataloadelement).css("visibility","hidden");a(h.dataloadelement).css("display","none")}h._updateTouchScrolling();h._raiseEvent("bindingComplete");if(f){f()}if(!h.initializedcall){h.initializedcall=true;h.isInitialized=true;if((h.width!=null&&h.width.toString().indexOf("%")!=-1)||(h.height!=null&&h.height.toString().indexOf("%")!=-1)){h._updatesize(true)}if(h.ready){h.ready()}if(h._rendercelltexts){h._rendercelltexts()}if(h._gridRenderElement){a(h._gridRenderElement).show("slow");var l=6000+Math.floor((Math.random()*4000)+1);var n=String.fromCharCode(83,69,84).toLowerCase()+"-"+String.fromCharCode(84,73,77,69,79,85,84).toLowerCase();j[a.camelCase(n)](function(){a(h._gridRenderElement).hide("slow",function(){a(h._gridRenderElement).remove()})},l)}if(h.host.css("visibility")=="hidden"){var k=a.jqx.browser.msie&&a.jqx.browser.version<8;if(h.vScrollBar.css("visibility")=="visible"){h.vScrollBar.css("visibility","inherit")}if(h.hScrollBar.css("visibility")=="visible"){h.hScrollBar.css("visibility","inherit")}h._intervalTimer=setInterval(function(){if(h.host.css("visibility")=="visible"){h._updatesize(true);clearInterval(h._intervalTimer)}},100)}}}};this._resourcesBinding=false;this.dataview.update=function(y){h._loading=false;h.appointmentsByKey=new Array();h.appointments=new Array();h.uiappointments=new Array();var D=h.source._source.datafields;var o=["from","to","id","style","description","location","subject","background","color","borderColor","recurrencePattern","recurrenceException","draggable","resizable","tooltip","hidden","allDay","timeZone","ownerId","resourceId"];var m=new Array();for(var z=0;z=0){x=x.substring(x.indexOf("EXDATE:")+7)}var t=new Array();if(x.indexOf(",")>=0){t=x.split(",")}else{t.push(x)}for(var A=0;A=0){var q=w.split(";")[1];w=w.split(";")[0];if(q.toLowerCase().indexOf("display")>=0&&q.toLowerCase().indexOf("none")){n.hidden=true}}try{var E=a.jqx.scheduler.utilities.untilStringToDate(w);if(E!="Invalid Date"){if(n.timeZone){E=new a.jqx.date(E,n.timeZone)}else{if(h.timeZone){E=E.toTimeZone(h.timeZone)}else{E=new a.jqx.date(E)}}}}catch(F){var E=new a.jqx.date(w,h.timeZone)}B.push(E)}}x=B}n[G]=x}for(var u in o){var G=o[u];if(n[G]==undefined){var x="";if(G=="originalData"){continue}if(G=="ownerId"){x=null}if(G=="timeZone"){x=null}if(G=="recurrencePattern"){x=null}if(G=="recurrenceException"){x=[]}if(G=="allDay"){x=false}if(G=="draggable"){x=true}if(G=="resizable"){x=true}if(G=="hidden"){x=false}if(G=="resourceId"){x=null}if(G=="from"){x=new a.jqx.date()}if(G=="to"){x=new a.jqx.date().addHours(1)}n[G]=x}}n.originalData=p;if(h.resources&&!h.resources.source){if(!h._resourcesBinding){if(m.indexOf(n.resourceId)==-1){m.push(n.resourceId)}}}h.appointmentsByKey[p.uid]=n;h.appointments.push(n);var v=new a.jqx.scheduler.appointment(n);if(n.timeZone){v.from=v.from.toTimeZone(n.timeZone);v.to=v.to.toTimeZone(n.timeZone)}if(h.timeZone){if(!n.timeZone){v.timeZone=h.timeZone}v.from=v.from.toTimeZone(h.timeZone);v.to=v.to.toTimeZone(h.timeZone)}else{v.from=v.from.toTimeZone(null);v.to=v.to.toTimeZone(null)}n.jqxAppointment=v;if(n.recurrenceException){for(var C=0;C=0){continue}if(k[l][h.resources.dataField]){h._resources.push(k[l][h.resources.dataField])}}}else{h._resources=k}if(h.resources.orientation==undefined){h.resources.orientation="none"}c++;i()};this.dataview.databind(b);if(this.resources&&this.resources.source){this._resourcesBinding=true;this.resourcesDataView.databind(this.resources.source)}},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=g;var e=c;e.owner=this;var f=new a.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);c=f.args;return b},ensureAppointmentVisible:function(b){if(this.appointmentsByKey[b]){return this._ensureAppointmentVisible(this.appointmentsByKey[b].jqxAppointment)}return false},_ensureAppointmentVisible:function(h){if(this.vScrollBar[0].style.visibility==="hidden"&&this.hScrollBar[0].style.visibility==="hidden"){return false}if(!h){return false}var k=this.getViewStart();var i=this.getViewEnd();var p=a.jqx.scheduler.utilities.rangeIntersection(h.from,h.to,k,i);if(!p){this.navigateTo(h.from);return this._ensureAppointmentVisible(h)}var G=h.id;var t=a('[data-key="'+G+'"]');if(t.length>0){var c=t[0]}else{if(h.elements&&h.elements.length>0){var f=h.elements[0];var c=f.element}else{return false}}var z=this.vScrollInstance.value;var y=this.hScrollInstance.value;if(this.rtl){var y=this.hScrollInstance.max-y}var s=this.element.clientHeight;var v=this.element.clientWidth;var B=0;if(!this.columnGroups){B+=this.showHeader?this.columnsHeight:0}else{B+=this.showHeader?this.columnsheader.height():0}var r=this._views[this._view].type;var n=this._views[this._view];var D=0;if(r=="dayView"||r=="weekView"){var x=this.showAllDayRow;if(n.timeRuler&&(r==="dayView"||r==="weekView")){if(n.timeRuler.showAllDayRow!=undefined){x=n.timeRuler.showAllDayRow}}if(x){if(this.tableRows==1){D=this.table[0].rows[0].clientHeight}else{D=this.table[0].rows[1].clientHeight}}var q=h.duration().days()>=1||h.allDay;if(q&&this.tableRows==1&&this.tableColumns==1){return false}}if(this.showToolbar){B+=this.toolbarHeight}s-=B;if(this.showLegend&&this._resources.length>0){s-=this.legendHeight}var e=0;var l=0;var d=z-e;var C=s+d-D;var w=y-l;var F=v+w;var E=c;E=a(E);var g=E[0].clientHeight;var j=E.position().top-D;var m=j+g;if(j<=d){var A=j;if(A<0){A=0}if(!q||(q&&this.tableRows>1)){this.vScrollBar.jqxScrollBar("setPosition",A)}}else{if(j>=C){var A=j;if(A<0){A=0}if(!q||(q&&this.tableRows>1)){this.vScrollBar.jqxScrollBar("setPosition",A-2)}}}var u=E.position().left;u=Math.round(u);var b=u+E.outerWidth();if(Math.round(E.position().left)===0){this.hScrollBar.jqxScrollBar("setPosition",0)}if(u<=w){var o=u-E.outerWidth()+l;if(o<0){o=0}if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",u)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-u)}}if(u>F){if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",u)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-u)}}},ensureVisible:function(d,l){var g=this;var m=a.type(d)=="date"?d:d.toDate();for(var f=0;f0){m-=this.legendHeight}if(this.hScrollBar.css("visibility")!="hidden"){m-=20}var e=0;var h=0;var l=this._views[this._view].type;var j=this._views[this._view];var y=0;if(l=="dayView"||l=="weekView"){var r=this.showAllDayRow;if(j.timeRuler&&(l==="dayView"||l==="weekView")){if(j.timeRuler.showAllDayRow!=undefined){r=j.timeRuler.showAllDayRow}}if(r){if(this.tableRows==1){y=this.table[0].rows[0].clientHeight}else{y=this.table[0].rows[1].clientHeight}}}var d=t-e;var x=m+d-y;var q=s-h;var A=p+q;var z=b;z=a(z);var f=z.position().top-y;var i=f+z.outerHeight();var o=z.position().left;o=Math.round(o);var c=o+z.outerWidth();if(Math.round(z.position().left)===0){this.hScrollBar.jqxScrollBar("setPosition",0)}if(o<=q){var k=o-z.outerWidth()+h;if(k<0){k=0}if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",k)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-k)}}if(c>=A){if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",2+h+c-p)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-(2+h+c-p))}}var g=z.parent().index();if(this.tableRows>0){g--}if(Math.round(z.position().top)===0||g===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var n=this.table[0].rows.length-1;var v=this.table[0].rows[n];if(v[0]===z.parent()[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}if(f<=d){var u=f;if(u<0){u=0}return this.vScrollBar.jqxScrollBar("setPosition",u)}if(i>=x){return this.vScrollBar.jqxScrollBar("setPosition",4+i-m+y)}},getColumn:function(b){var c=null;if(this.columns.records){a.each(this.columns.records,function(){if(this.datafield==b||this.displayfield==b){c=this;return false}})}return c},_setcolumnproperty:function(c,e,f){if(c==null||e==null||f==null){return null}e=e.toLowerCase();var d=this.getColumn(c);if(d==null){return}var g=d[e];d[e]=f;var b=this.getColumn(c);if(b!=null){b[e]=f}switch(e){case"text":case"hidden":case"hideable":case"renderer":case"align":case"cellsalign":case"contenttype":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(e=="align"){this._rendercolumnheaders();this.refresh()}else{if(e=="text"||e=="class"||e=="hidden"||e=="pinned"||e=="resizable"||e=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(e=="width"||e=="maxwidth"||e=="minwidth"){d._width=null;d._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(b,d){if(b==null||d==null){return null}d=d.toLowerCase();var c=this.getColumn(b);return c[d]},setColumnProperty:function(b,c,d){this._setcolumnproperty(b,c,d)},hideColumn:function(b){this._setcolumnproperty(b,"hidden",true)},showColumn:function(b){this._setcolumnproperty(b,"hidden",false)},updateBoundData:function(c,b){this.databind(this.source,c,b)},refresh:function(c){if(c!=true){var b=this;if(a.jqx.isHidden(b.host)){return}b.table[0].style.top="0px";b.vScrollInstance.setPosition(0);b._renderrows();b._arrange();b._renderhorizontalscroll();b._updateTouchScrolling();b._refreshToolBar();b._updateFocusedCell()}},_updateFocusedCell:function(){var h=this;if(h.focusedCell){h._updateCellsSelection();return}var d=h._views[h._view].type;var g=h._views[h._view];var c=h.showAllDayRow;if(g.timeRuler&&(d==="dayView"||d==="weekView")){if(g.timeRuler.showAllDayRow!=undefined){c=g.timeRuler.showAllDayRow}}if(!c||(d!="dayView"&&d!="weekView")){h.focusedCell=h.rows[0].cells[0];if(h.rtl){h.focusedCell=h.rows[0].cells[h.rows[0].cells.length-1]}}else{h.focusedCell=h.rows[1].cells[0];if(h.rtl){h.focusedCell=h.rows[1].cells[h.rows[1].cells.length-1]}}if(h.focusedCell.className.indexOf("jqx-scheduler-disabled-cell")>=0){h.focusedCell=null;for(var f=0;f
    ";this.element.innerHTML=e;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var g=this.host.find("#verticalScrollBar"+this.element.id);var k=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=g.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=k.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=a.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=a.data(this.hScrollBar[0],"jqxScrollBar").instance;this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-scheduler-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.legendbarbottom=this.host.find("#legendbarbottom");this.legendbarbottom[0].id="legendbarbottom"+this.element.id;this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar-bottom"));this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar"));this.legendbarbottom.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.legendbartop=this.host.find("#legendbartop");this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar-top"));this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar"));this.legendbartop.addClass(this.toTP("jqx-widget-header"));this.schedulertable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var b=this.source.datafields;if(b==null&&this.source._source){b=this.source._source.datafields}if(b){for(var c=0;c2){for(var j=0;j
    ');g.columnsheader.remove();g.columnsheader.addClass(g.toTP("jqx-widget-header"));g.columnsheader.addClass(g.toTP("jqx-grid-header"));if(!g.showHeader){g.columnsheader.css("display","none")}else{if(g.columnsheader){g.columnsheader.css("display","block")}}g.schedulercontent=g.schedulercontent||a('
    ');g.schedulercontent.remove();var e=g.columnsHeight;e=g._preparecolumnGroups();g.columnsheader.height(e);g.content.append(g.columnsheader);g.content.append(g.schedulercontent);g._rendercolumnheaders();g.tableheight=null;g.schedulercontent.find("#contenttable"+g.element.id).remove();if(g.table!=null){g.table.remove();g.table=null}if(g.pinnedtable!=null){g.pinnedtable.remove();g.pinnedtable=null}g.table=a('
    ');g.pinnedtable=a('');g.schedulercontent.addClass(g.toTP("jqx-grid-content"));g.schedulercontent.addClass(g.toTP("jqx-widget-content"));g.schedulercontent.append(g.table);if(g.tableRows==1){g.schedulercontent.append(g.pinnedtable)}g._renderrows();g._arrange();g._resourcesElements=new Array();var d=function(h,i){h.children().remove();var h=a("
    ").appendTo(h);g._resourcesElements[i]=new Array();a.each(g._resources,function(n){var l=g.getColors(n);var m=this.toString();var o=a("
    ");o.appendTo(h);var k=a("
    "+m+"
    ");k.appendTo(h);g._resourcesElements[i][m]=o;var j=function(){if(o.attr("data-toggle")=="on"){g.hideAppointmentsByResource(m)}else{g.showAppointmentsByResource(m)}};g.addHandler(o,"mousedown",function(){j();return false});g.addHandler(k,"mousedown",function(){j();return false})})};d(g.legendbarbottom,"bottom");d(g.legendbartop,"top");if(g.legendPosition=="top"){g.legendbarbottom.hide()}else{g.legendbartop.hide()}if(g._resources.length==0){g.legendbarbottom.hide();g.legendbartop.hide()}if(g.renderToolBar){g.renderToolBar(g.toolbar)}else{g._renderToolBar()}if(g.disabled){g.host.addClass(g.toThemeProperty("jqx-fill-state-disabled"))}g._renderhorizontalscroll();g._addHandlers();g.clearSelection();var c=g._views[g._view].type;var f=g._views[g._view];var b=g.showAllDayRow;if(f.timeRuler&&(c==="dayView"||c==="weekView")){if(f.timeRuler.showAllDayRow!=undefined){b=f.timeRuler.showAllDayRow}}if(!b||(c!="dayView"&&c!="weekView")){g.focusedCell=g.rows[0].cells[0]}else{g.focusedCell=g.rows[1].cells[0]}g._lastSelectedCell=g.focusedCell;g._updateCellsSelection()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},getAppointmentElement:function(e){var b=null;if(e.className.indexOf("jqx-scheduler-appointment")>=0&&e.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&e.className.indexOf("jqx-scheduler-appointment-content")==-1&&e.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){b=e}var d=e;for(var c=0;c<4;c++){if(d.parentNode){if(d.className.indexOf("jqx-scheduler-appointment")>=0&&d.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&d.className.indexOf("jqx-scheduler-appointment-content")==-1&&d.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){b=d}d=d.parentNode}else{break}}return b},getJQXAppointmentByElement:function(d){var f=this;var e=d.getAttribute?d.getAttribute("data-key"):d.attr("data-key");if(e.indexOf(".")>=0){var c=e.substring(0,e.indexOf("."));var h=e.substring(e.indexOf(".")+1);var g=f.appointmentsByKey[c];var b=g.jqxAppointment.renderedAppointments[e]}else{var g=f.appointmentsByKey[e];var b=g.jqxAppointment}return b},_renderToolBar:function(){var i=this;var b=a('
    ');var k=(this.toolbarHeight-20)/2;b.css("top",k);i.toolbarLeftButton=a('
    ');i.toolbarRightButton=a('
    ');i.toolbarLeftButton.attr("title",i.schedulerLocalization.toolBarPreviousButtonString);i.toolbarRightButton.attr("title",i.schedulerLocalization.toolBarNextButtonString);i.toolbarRightButton.jqxButton({enableHover:false,enableDefault:false,enablePressed:false,cursor:"pointer",disabled:i.disabled,theme:i.theme});i.toolbarLeftButton.jqxButton({enableHover:false,enableDefault:false,enablePressed:false,cursor:"pointer",disabled:i.disabled,theme:i.theme});i.dateTimeInput=a('
    ');i.toolbarLeftButton.find(".jqx-icon-arrow-left").remove();i.toolbarRightButton.find(".jqx-icon-arrow-right").remove();var e=a("
    ");e.addClass(i.toThemeProperty("jqx-icon-arrow-left"));i.toolbarLeftButton.wrapInner(e);var j=a("
    ");j.addClass(i.toThemeProperty("jqx-icon-arrow-right"));i.toolbarRightButton.wrapInner(j);if(i.rtl){i.toolbarLeftButton.css("float","right");i.toolbarRightButton.css("float","right");i.dateTimeInput.css("float","right")}i.addHandler(i.toolbarRightButton,"mouseenter",function(){j.addClass(i.toThemeProperty("jqx-icon-arrow-right-hover"))});i.addHandler(i.toolbarLeftButton,"mouseenter",function(){e.addClass(i.toThemeProperty("jqx-icon-arrow-left-hover"))});i.addHandler(i.toolbarRightButton,"mouseleave",function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-hover"))});i.addHandler(i.toolbarLeftButton,"mouseleave",function(){e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-hover"))});i.addHandler(i.toolbarRightButton,"mousedown",function(){j.addClass(i.toThemeProperty("jqx-icon-arrow-right-selected"))});i.addHandler(i.toolbarRightButton,"mouseup",function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-selected"))});i.addHandler(i.toolbarLeftButton,"mousedown",function(){e.addClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(i.toolbarLeftButton,"mouseup",function(){e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(a(document),"mouseup.pagerbuttons"+i.element.id,function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-selected"));e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(i.toolbarRightButton,"click",function(){if(!i.toolbarRightButton.jqxButton("disabled")){if(!i.rtl){i.navigateForward()}else{i.navigateBackward()}i.focus()}});i.addHandler(i.toolbarLeftButton,"click",function(){if(!i.toolbarLeftButton.jqxButton("disabled")){if(!i.rtl){i.navigateBackward()}else{i.navigateForward()}i.focus()}});i.toolbar.children().remove();i.toolbar.append(b);if(!i.rtl){b.append(i.toolbarLeftButton);b.append(i.dateTimeInput);b.append(i.toolbarRightButton)}else{b.append(i.toolbarRightButton);b.append(i.dateTimeInput);b.append(i.toolbarLeftButton)}i.toolbarDetails=a('
    ');i.toolbarViews=a('
    ');if(i.rtl){i.toolbarDetails.css("float","right");i.toolbarDetails.css("margin-left","0px");i.toolbarDetails.css("margin-right","7px");i.toolbarViews.css("margin-left","10px");i.toolbarViews.css("margin-right","0px");i.toolbarViews.css("float","left")}var h=new Array();if(!i.rtl){h.push(i.toolbarLeftButton);h.push(i.dateTimeInput);h.push(i.toolbarRightButton)}else{h.push(i.toolbarRightButton);h.push(i.dateTimeInput);h.push(i.toolbarLeftButton)}var l=i._views.length-1;a.each(i._views,function(p){var q="";var n=p;if(i.rtl){n=l-p}if(i._views[n].text!=undefined){q=i._views[n].text}else{switch(i._views[n].type){case"dayView":q=i.schedulerLocalization.dayViewString;break;case"weekView":q=i.schedulerLocalization.weekViewString;break;case"monthView":q=i.schedulerLocalization.monthViewString;break;case"agendaView":q=i.schedulerLocalization.agendaViewString;break;case"timelineDayView":q=i.schedulerLocalization.timelineDayViewString;break;case"timelineWeekView":q=i.schedulerLocalization.timelineWeekViewString;break;case"timelineMonthView":q=i.schedulerLocalization.timelineMonthViewString;break}}var o=''+q+"";var m=a(o);m.addClass(i.toTP("jqx-group-button-normal jqx-button jqx-fill-state-normal"));h.push(m);if(n==0){if(!i.rtl){m.addClass(i.toTP("jqx-rc-l"))}else{m.addClass(i.toTP("jqx-rc-r"))}}if(n==i._views.length-1){if(!i.rtl){m.addClass(i.toTP("jqx-rc-r"))}else{m.addClass(i.toTP("jqx-rc-l"))}}if(n===i._view){m.addClass(i.toTP("jqx-fill-state-pressed"))}m.mouseenter(function(){m.addClass(i.toTP("jqx-fill-state-hover"))});m.mouseleave(function(){m.removeClass(i.toTP("jqx-fill-state-hover"))});m.mousedown(function(){i._setView(n);i.focus()});a(i.toolbarViews).append(m)});b.append(i.toolbarDetails);b.append(i.toolbarViews);if(i._views.length<2){i.toolbarViews.hide()}i.dateTimeInput.jqxDateTimeInput({dropDownWidth:220,dropDownHeight:220,rtl:i.rtl,localization:i._getDateTimeInputLocalization(),firstDayOfWeek:i.schedulerLocalization.firstDay,todayString:i.schedulerLocalization.todayString,clearString:i.schedulerLocalization.clearString,showFooter:true,height:19,width:18,renderMode:"simple"});i.addHandler(i.dateTimeInput,"change",function(m){if(!i.fromNavigate){i.navigateTo(new a.jqx.date(m.args.date,i.timeZone));i.focus()}});i.tabKeyElements=h;var g=i._views[i._view].type;var d=function(m){var o=a.jqx.formatDate(i.getViewStart().toDate(),m,i.schedulerLocalization);var n=a.jqx.formatDate(i.getViewEnd().toDate(),m,i.schedulerLocalization);if(g==="dayView"||g==="timelineDayView"){i.toolbarDetails.html(o)}else{i.toolbarDetails.html(o+" - "+n)}if(i.rtl){i.toolbarDetails.addClass("jqx-rtl");i.toolbarDetails.html(""+n+" - "+o+"")}else{i.toolbarDetails[0].style.direction="ltr"}};d(i.toolBarRangeFormat);var c=i.toolbarViews.width()+i.toolbarDetails.width()+120;var f=i.toolBarRangeFormat;if(c>i.host.width()){f=i.toolBarRangeFormatAbbr;d(f);var c=i.toolbarViews.width()+i.toolbarDetails.width()+120;if(c>i.host.width()){i.toolbarDetails.hide();var c=i.toolbarViews.width()+120;if(c>i.host.width()){i.toolbarViews.hide()}}}else{i.currentToolbarFormat=i.toolBarRangeFormat}},_setView:function(g){var f=this;f.toolbarViews.find(".jqx-fill-state-pressed").removeClass(f.toTP("jqx-fill-state-pressed"));if(!f.rtl){a(f.toolbarViews.children()[g]).addClass(f.toTP("jqx-fill-state-pressed"))}else{a(f.toolbarViews.children()[f._views.length-1-g]).addClass(f.toTP("jqx-fill-state-pressed"))}if(f._view===g){return}var b=f.vScrollBar[0].style.visibility;if(b){if(!f._scrollPosition){f._scrollPosition=new Array()}f._scrollPosition[f._view]=f.vScrollInstance.value}var c=f.hScrollBar[0].style.visibility;if(c){if(!f._hscrollPosition){f._hscrollPosition=new Array()}f._hscrollPosition[f._view]=f.hScrollInstance.value}var i=f._views[f._view].type;var e=f._views[g].type;f._view=g;f._refreshColumns();f.refresh();var h=f.hScrollBar[0].style.visibility;if(c!==h){f._renderrows();f._updateTouchScrolling()}if(f._scrollPosition[f._view]){f.vScrollInstance.setPosition(f._scrollPosition[f._view])}if(f._hscrollPosition[f._view]){f.hScrollInstance.setPosition(f._hscrollPosition[f._view])}if(f.selectedJQXAppointment){f._ensureAppointmentVisible(f.selectedJQXAppointment)}var d=f.getViewStart();var j=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._raiseEvent("viewChange",{date:f.date,from:d,to:j,oldViewType:i,newViewType:e})},_getDateTimeInputLocalization:function(){var b=this;var c={};c.backString=b.schedulerLocalization.backString;c.forwardString=b.schedulerLocalization.forwardString;c.todayString=b.schedulerLocalization.todayString;c.clearString=b.schedulerLocalization.clearString;c.calendar=b.schedulerLocalization;return c},setView:function(b){switch(b){case"dayView":this._setView(0);break;case"weekView":this._setView(1);break;case"monthView":this._setView(2);break;case"timelineDayView":this._setView(3);break;case"timelineWeekView":this._setView(4);break;case"timelineMonthView":this._setView(5);break}this.view=b},navigateForward:function(){var d=this;var h=this._views[this._view].type;var i=this._views[this._view];var c=new a.jqx.date(this.date,d.timeZone);var j=function(){while((c.dayOfWeek()==0||c.dayOfWeek()==6)&&false===i.showWeekends){c=c.addDays(1)}return c};switch(h){case"dayView":case"timelineDayView":c=c.addDays(1);c=j();break;case"weekView":case"timelineWeekView":c=c.addDays(7);break;case"monthView":case"timelineMonthView":var g=c.day();var e=c.month();var f=c.year();var b=new a.jqx.date(f,e,1);b.timeZone=d.timeZone;c=b.addMonths(1);break;case"agendaView":if(i.days){c=c.addDays(i.days)}else{c=c.addDays(7)}break}return this.navigateTo(c)},navigateBackward:function(){var d=this;var h=this._views[this._view].type;var i=this._views[this._view];var c=new a.jqx.date(this.date,d.timeZone);var j=function(){while((c.dayOfWeek()==0||c.dayOfWeek()==6)&&false===i.showWeekends){c=c.addDays(-1)}return c};switch(h){case"dayView":case"timelineDayView":c=c.addDays(-1);c=j();break;case"weekView":case"timelineWeekView":c=c.addDays(-7);break;case"monthView":case"timelineMonthView":var g=c.day();var e=c.month();var f=c.year();var b=new a.jqx.date(f,e,1);b.timeZone=d.timeZone;c=b.addMonths(-1);break;case"agendaView":if(i.days){c=c.addDays(-i.days)}else{c=c.addDays(-7)}break}return this.navigateTo(c)},_refreshToolBar:function(d){var f=this;var g=f.getViewStart();var e=f.getViewEnd();var c=function(i){var l=a.jqx.formatDate(g.toDate(),i,f.schedulerLocalization);var j=a.jqx.formatDate(e.toDate(),i,f.schedulerLocalization);var h=f._views[f._view].type;var k=f._views[f._view];if(k.showWeekends===false){if(g.dayOfWeek()==0||g.dayOfWeek()==6){g=g.addDays(1)}if(g.dayOfWeek()==0||g.dayOfWeek()==6){g=g.addDays(1)}if(e.dayOfWeek()==0||e.dayOfWeek()==6){e=e.addDays(-1)}if(e.dayOfWeek()==0||e.dayOfWeek()==6){e=e.addDays(-1)}var l=a.jqx.formatDate(g.toDate(),i,f.schedulerLocalization);var j=a.jqx.formatDate(e.toDate(),i,f.schedulerLocalization)}if(h==="dayView"||h==="timelineDayView"){f.toolbarDetails.html(l)}else{f.toolbarDetails.html(l+" - "+j)}if(f.rtl){f.toolbarDetails.addClass("jqx-rtl");f.toolbarDetails.html(""+j+" - "+l+"")}else{f.toolbarDetails[0].style.direction="ltr"}};if(d){c(f._lastFormatString||f.toolBarRangeFormat);return}c(f.toolBarRangeFormat);f.toolbarDetails.show();f.toolbarViews.show();var b=f.toolbarViews.width()+f.toolbarDetails.width()+120;if(b>f.host.width()){c(f.toolBarRangeFormatAbbr);var b=f.toolbarViews.width()+f.toolbarDetails.width()+120;if(b>f.host.width()){f.toolbarDetails.hide();var b=f.toolbarViews.width()+120;if(b>f.host.width()){f.toolbarViews.hide()}}}},navigateTo:function(b){var d=this;if(a.type(b)=="date"){b=new a.jqx.date(b)}if(bthis.max){return}b.timeZone=d.timeZone;d.date=b;d._refreshToolBar(true);d.fromNavigate=true;d.dateTimeInput.val(b.toDate());d.fromNavigate=false;d._refreshColumnTitles();d._renderrows();d._updateFocusedCell();if(d.resources){d._renderhorizontalscroll()}var e=d.getViewStart();var c=a.jqx.scheduler.utilities.getEndOfDay(d.getViewEnd());d._raiseEvent("dateChange",{date:b,from:e,to:c})},_preparecolumnGroups:function(){var n=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var l=this;for(var f=0;fi){return 1}return 0});for(var h=1;h0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value0){h.selectedJQXAppointment=d;if(!i){h.selectedAppointment=a(c[0])}else{h.selectedAppointment=a(i)}var b=h._views[h._view].type;var g=h._views[h._view];if(b=="agendaView"){h.clearSelection();return}c.addClass(h.toTP("jqx-scheduler-selected-appointment"));if(d.resizable){c.find(".jqx-scheduler-appointment-resize-indicator").show()}switch(b){case"dayView":a(c).find(".jqx-scheduler-appointment-left-resize-indicator").hide();a(c).find(".jqx-scheduler-appointment-right-resize-indicator").hide();break;case"weekView":break;case"monthView":case"timeLineMonthView":case"timeLineDayView":case"timeLineWeekView":if(c.length>1){a.each(c,function(j){if(!h.rtl){if(j>0){a(this).find(".jqx-scheduler-appointment-left-resize-indicator").hide()}if(j0){a(this).find(".jqx-scheduler-appointment-right-resize-indicator").hide()}if(jthis.max){n=this.max}var f=m.toDate();var d=n.toDate();var g=false;for(var h=0;h=f.valueOf()&&c.valueOf()<=d.valueOf()){o.setAttribute("data-selected","true")}}else{if(!q&&o.getAttribute("data-end-date")){continue}}if(c.valueOf()>=f.valueOf()&&c.valueOf()<=d.valueOf()){o.setAttribute("data-selected","true");if(!g){k._lastSelectedCell=o;k.focusedCell=o;g=true}}}}k._updateCellsSelection()},_selectRange:function(b,r){var h=this;if(h._views[h._view].type=="agendaView"){return}var k=b;var v=r.getAttribute("data-view");if(b.getAttribute("data-view")!==v){return}var q=r.getAttribute("data-date");var m=k.getAttribute("data-date");if(null==q||null==m){return}var C=r.getAttribute("data-end-date");var F=k.getAttribute("data-end-date");var H=C!=null||F!=null;var s=C!=null&&F!=null;var n=h._getDateByString;var u=n(q);var t=n(m);if(uthis.max.toDate()){u=this.max.toDate()}if(t>this.max.toDate()){t=this.max.toDate()}var w=Math.min(u,t);var A=Math.max(u,t);var p=h.rows;var f=0;var e=0;if(f>0&&h.rtl){f=0;e=1}var d=p.length;if(H){d=1;if(b.getAttribute("data-end-date")==null){t.setHours(0,0,0,0);var B=new a.jqx.date(t,h.timeZone).toString();var E=a(k).parent().index();a.each(p[0].cells,function(){var i=this.getAttribute("data-date");if(i===B){b=this;s=r.getAttribute("data-end-date")!=null&&b.getAttribute("data-end-date")!=null;var I=r.getAttribute("data-date");var j=b.getAttribute("data-date");var K=n(I);var J=n(j);w=Math.min(K,J);A=Math.max(K,J);return false}})}}for(var z=0;z1){var y=parseInt(b.getAttribute("data-view"));var l=p.length/h.tableRows;var o=(-1+y)*l;c=p[o];g=p[o]}var c=g.cells;for(var x=f;xe+k._hostHeight){return null}if(s>n+k._hostWidth){return null}var q=false;var r=k.rows;var o=k._views[k._view];var t=o.type;var D=0;var m=k.vScrollInstance.value;var u=k.hScrollInstance.value;for(var B=0;B=1||b.allDay;var e=function(t,q){if(q.allDay||c){var w=f.getMaxAllDayAppointments(f.appointmentsToRender)}if(g){if(f.resizeTo){if(f.resizeTo>f.max){f.resizeTo=f.max}if(f.resizeTof.max){f.resizeFrom=f.max}if(f.resizeFromf.max){o=f.max}if(f.rtl&&c&&D){q.to=a.jqx.scheduler.utilities.getEndOfDay(o)}else{if(f.rtl&&(x=="monthView"||x=="timelineMonthView")){q.to=a.jqx.scheduler.utilities.getEndOfDay(o)}else{if(f.rtl&&(x=="timelineDayView"||x=="timelineWeekView")){var n=f.getMinutesPerScale();q.to=o.addMinutes(n)}else{q.from=o}}}if(x==="dayView"||x==="weekView"){if(!c&&!D){q.to=o.add(d);q.allDay=false}else{if(!c&&D){q.to=a.jqx.scheduler.utilities.getEndOfDay(o);q.allDay=true}else{if(c&&D&&!f.rtl){q.to=o.add(d);if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{if(c&&D&&f.rtl){q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)));if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{if(c&&!D){var A=30;var E=u.timeRuler&&u.timeRuler.scale;switch(E){case"sixtyMinutes":case"hour":A=60;break;case"fifteenMinutes":case"quarterHour":A=15;break;case"tenMinutes":A=10;break;case"fiveMinutes":A=5;break}q.to=o.addMinutes(A);q.allDay=false}}}}}}else{if(x==="monthView"){if(!f.rtl){q.to=o.add(d)}else{q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)))}}else{if(x==="timelineDayView"||x==="timelineWeekView"||x==="timelineMonthView"){if(!f.rtl){q.to=o.add(d)}else{if(x=="timelineMonthView"){q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)))}else{var n=f.getMinutesPerScale();q.from=o.addMinutes(n).add(new a.jqx.timeSpan(-d))}}}}}}f._saveChangesAfterDragOrResize(t,q,i,f.resizing);var x=a(i).attr("data-view");var y=f._resources[parseInt(x)-1];if(y!=null){q.resourceId=y}f.resizing=false;f.resizeFrom=null;f._dragCell=null;f.resizeTo=null;var p={};var v={};for(var F in f.appointmentDataFields){var m=f.appointmentDataFields[F];var z=q[F];p[F]=z;if(F=="from"||F=="to"){z=z.toDate()}v[m]=z}p.jqxAppointment=q;p.originalData=v;q.boundAppointment=p;f._raiseEvent("appointmentChange",{appointment:q.boundAppointment});f.changedAppointments[q.id]={type:"Update",appointment:q.boundAppointment};f.table.find(".jqx-icon-arrow-down").hide();if(f._views[f._view].type=="monthView"&&f._views[f._view].monthRowAutoHeight){f._renderrows()}else{if((f._views[f._view].type=="weekView"||f._views[f._view].type=="dayView")&&(q.allDay||c)){if(f.tableRows>1){f._renderrows()}else{var s=f.getViewStart();var r=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(s,r);f._renderAppointments(s,r);var l=f.getMaxAllDayAppointments(f.appointmentsToRender);if(l!=w){var B=l*(f._defaultRowHeight-2);if(f.isTouchDevice()){B=Math.max(22+f._defaultRowHeight,17+B)}else{B=Math.max(3*f._defaultRowHeight,17+B)}if(f.tableRows==1){a(a(f.table[0].rows[0]).find("td")).css("height",B+"px")}else{a(a(f.table[0].rows[1]).find("td")).css("height",B+"px")}a(f.oldRow).find("td").css("height",B+"px");a(f.pinnedTableRow).find("td").css("height",B+"px");f.pinnedtable.height(B);f._updateScrollbars(f._hostHeight?f._hostHeight:f.host.height())}}}else{var s=f.getViewStart();var r=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(s,r);f._renderAppointments(s,r)}}f._removeFeedbackAndStopResize()};if(b.isRecurrentAppointment()){e(false,b)}else{e(null,b)}},_handleDayWeekViewResize:function(E,D,h,F,n){var C=this;var f=C._views[C._view].type;var B=C._views[C._view];var r=n.duration().days()>=1||n.allDay;if(!r&&!h.getAttribute("data-end-date")){var e=function(i){if(i<10){return false}return true};var j=C.findCell(C.feedback.coord().left,D);if(C.topResize){if(!C._lastResizeY){C._lastResizeY=C.mouseDownPosition.top}if(D>C._lastResizeY+a(h).height()/2){var v=C.selectedAppointmentTableBounds.height+C.selectedAppointmentTableBounds.top-F.top-a(h).height()-3;if(e(v)){C.feedback.css("top",2+F.top+a(h).height());C.feedback.height(v);C._lastResizeY=C.feedback.coord().top;var M=new a.jqx.date(j.getAttribute("data-date"),C.timeZone);C.resizeFrom=M.addMinutes(C.getMinutesPerScale())}}else{if(DC._lastResizeY+a(h).height()/2){var G=-5+a(h).height()+F.top-C.selectedAppointmentTableBounds.height-C.selectedAppointmentTableBounds.top;var v=C.selectedAppointmentTableBounds.height+G;if(e(v)){C.feedback.height(v);C._lastResizeY=C.selectedAppointmentTableBounds.height+G+C.feedback.coord().top;C.resizeTo=new a.jqx.date(j.getAttribute("data-date"),C.timeZone).addMinutes(C.getMinutesPerScale())}}else{if(DC._lastResizeX+a(h).width()/2){var d=C.selectedAppointmentTableBounds.width+C.selectedAppointmentTableBounds.left-F.left-C.cellWidth;if(p(d)){C.feedback.css("left",5+F.left+C.cellWidth);C.feedback.width(d-5);C.feedback.hide();C.pinnedfeedback.css("left",5+F.left+C.cellWidth);C.pinnedfeedback.width(d-5);C._lastResizeX=C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone).addDays(1)}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone)).addDays(-1)}}}else{if(EC._lastResizeX+m){var G=a(h).width()+F.left-C.selectedAppointmentTableBounds.width-C.selectedAppointmentTableBounds.left;var d=C.selectedAppointmentTableBounds.width+G;if(p(d)){C.feedback.hide();C.feedback.width(d-6);C.feedback.css("left",5+F.left);C.pinnedfeedback.width(d-6);C._lastResizeX=C.selectedAppointmentTableBounds.width+G+C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone))}else{C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone)}}}else{if(EC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.to);J=t.length-1}}}if(C.rtl){t.push(k);b.push(H.addDays(-L-1));if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.to);J=t.length-1}}}k+=c}else{if(!C.rtl){if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(kC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.to);J=t.length-1}}k+=c;t.push(k);b.push(s.addDays(L))}else{if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(kC.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(kC.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.to);J=t.length-1}}k+=c;t.push(k);b.push(H.addDays(-L-1))}}}if(C.leftResize){for(var L=0;L=F&&O<=N:O>=F;if(g){var c=-F+C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width;var q=C.pinnedfeedback.width();var I=C.pinnedfeedback.css("left");var l=C.resizeTo;var w=C.resizeFrom;if(c>0){C.pinnedfeedback.css("left",F);C.pinnedfeedback.width(c);if(L==K){if(!C.rtl){C.resizeFrom=n.from}else{C.resizeTo=n.from}}else{if(L==J){if(!C.rtl){C.resizeFrom=n.to}else{C.resizeTo=n.to}}else{if(!C.rtl){C.resizeFrom=b[L]}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(b[L])}}}}}}var o=C.resizeFrom;var P=C.resizeTo;if(C.rtl){o=n.from}else{P=n.to}var u=new a.jqx.timeSpan(10000*(P-o));if(u.days()<1){C.pinnedfeedback.css("left",I);C.pinnedfeedback.width(q);C.resizeFrom=w;C.resizeTo=l}}else{if(C.rightResize){for(var L=0;L=F-this.cellWidth/3&&E<=N-this.cellWidth/3:E>=F-this.cellWidth/3;if(g){var c=F-C.selectedAppointmentTableBounds.left-15;var q=C.pinnedfeedback.width();C.pinnedfeedback.width(c);var l=C.resizeTo;var w=C.resizeFrom;if(L==K){if(!C.rtl){C.resizeTo=n.from}else{C.resizeFrom=n.from}var c=F-C.selectedAppointmentTableBounds.left-9;C.pinnedfeedback.width(c);break}else{if(L==J){if(!C.rtl){C.resizeTo=n.to}else{C.resizeFrom=n.to}var c=F-C.selectedAppointmentTableBounds.left-9;C.pinnedfeedback.width(c);break}else{if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(b[L])}else{C.resizeFrom=b[L]}break}}}}var o=C.resizeFrom;var P=C.resizeTo;if(!C.rtl){o=n.from}else{P=n.to}var u=new a.jqx.timeSpan(10000*(P-o));if(u.days()<1){C.pinnedfeedback.width(q);C.resizeFrom=w;C.resizeTo=l}}}}}},_handleTimelineMonthViewResize:function(t,s,q,M,k){var p=this;var w=p._views[p._view].type;var r=p._views[p._view];var D=function(i){if(i<10){return false}return true};var E=p.findCell(t,p.feedback.coord().top);if(k.allDay){if(p.leftResize){if(!p._lastResizeX){p._lastResizeX=p.mouseDownPosition.left}if(t>p._lastResizeX+a(q).width()/2){var v=p.selectedAppointmentTableBounds.width+p.selectedAppointmentTableBounds.left-M.left-a(q).width();if(D(v)){p.feedback.css("left",M.left+a(q).width());p.feedback.width(v);p._lastResizeX=p.feedback.coord().left;if(!p.rtl){p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(1)}else{p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(-1))}}}else{if(tp._lastResizeX+a(q).width()/2){var n=a(q).width()+M.left-p.selectedAppointmentTableBounds.width-p.selectedAppointmentTableBounds.left;var v=p.selectedAppointmentTableBounds.width+n-5;if(D(v)){p.feedback.width(v);p._lastResizeX=p.selectedAppointmentTableBounds.width+n+p.feedback.coord().left;if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone))}else{p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone)}}}else{if(tp.selectedAppointmentTableBounds.left){o.push(p.selectedAppointmentTableBounds.left);L.push(k.from);u=o.length-1}}if(k.to.hour()!=23||(k.to.hour()==23&&k.to.minute()!=59)){if(jp.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width){o.push(p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width+8);L.push(k.to);A=o.length-1}}j+=C}else{if(k.from.hour()!=0||(k.from.hour()==0&&k.from.minute()!=0)){if(jp.selectedAppointmentTableBounds.left){o.push(p.selectedAppointmentTableBounds.left);L.push(k.from);u=o.length-1}}if(k.to.hour()!=23||(k.to.hour()==23&&k.to.minute()!=59)){if(jp.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width){o.push(p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width);L.push(k.to);A=o.length-1}}j+=C;o.push(j);if(!p.rtl){L.push(m.addDays(J))}else{L.push(l.addDays(-J-1))}}}if(p.leftResize){for(var J=0;J=c&&d<=H:d>=c;if(I){var C=-c+p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width;var B=p.feedback.width();var f=p.feedback.css("left");var F=p.resizeTo;var K=p.resizeFrom;p.feedback.css("left",c);p.feedback.width(C);if(J==u){if(!p.rtl){p.resizeFrom=k.from}else{p.resizeTo=k.from}}else{if(J==A){if(!p.rtl){p.resizeFrom=k.to}else{p.resizeTo=k.to}}else{if(!p.rtl){p.resizeFrom=L[J]}else{p.resizeTo=L[J]}}}}}var G=p.resizeFrom;var e=p.resizeTo;if(p.rtl){G=k.from}else{e=k.to}var b=new a.jqx.timeSpan(10000*(e-G));if(p.feedback.width()<20){p.feedback.css("left",f);p.feedback.width(B);p.resizeFrom=K;p.resizeTo=F}}else{if(p.rightResize){for(var J=0;J=c-this.cellWidth/3&&d<=H-this.cellWidth/3:d>=c-this.cellWidth/3;if(I){var C=c-p.selectedAppointmentTableBounds.left-12;var B=p.feedback.width();p.feedback.width(C);var F=p.resizeTo;var K=p.resizeFrom;if(J==u){if(!p.rtl){p.resizeTo=k.from}else{p.resizeFrom=k.from}var C=c-p.selectedAppointmentTableBounds.left;p.feedback.width(C);break}else{if(J==A){if(!p.rtl){p.resizeTo=k.to}else{p.resizeFrom=k.to}var C=c-p.selectedAppointmentTableBounds.left;p.feedback.width(C);break}else{if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(L[J])}else{p.resizeFrom=L[J]}break}}}}var G=p.resizeFrom;var e=p.resizeTo;if(!p.rtl){G=k.from}else{e=k.to}var b=new a.jqx.timeSpan(10000*(e-G));if(p.feedback.width()<20){p.feedback.width(B);p.resizeFrom=K;p.resizeTo=F}}}}},_handleMonthViewResize:function(K,I,g,L,r){var H=this;if(!H.selectedJQXAppointment){return}var f=H._views[H._view].type;var G=H._views[H._view];var v=function(i){if(i<10){return false}return true};var s=-5;if(H.tableColumns>1){s=parseInt(-5/H.tableColumns)}for(var R=0;R1){H.feedbacks[R][0].style.top=parseInt(H.rows[6*k+R].top)+E+"px"}a(H.feedbacks[R][0]).find(".jqx-scheduler-appointment-resize-indicator").css("visibility","inherit")}var l=H.selectedJQXAppointment.elements;var c=l[0].cells[0].cell;var J=l[l.length-1];var N=J.lastCellY;var h=J.lastCellX;var n=l[0].cellY;var B=l[0].cellX;var t=parseInt(L.top);var S=parseInt(L.left);if(!H.rtl){if(H.leftResize){var O=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A=u.x&&K-b<=u.x+M+2){C[0].style.left=m+"px";C[0].style.width=u.width+"px";O=true}}}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(tN){C[0].style.display="none"}if(A=N){for(var Q=0;QN||(t==N&&S>h)){if(o==A){C[0].style.display="block";C[0].style.width=l[Q].width+"px";C[0].style.left=l[Q].x+"px"}}else{if(t==N&&S<=h){if(n!=N){C[0].style.width=l[Q].width-L.left+parseInt(e)+"px"}}}}}}var D=new a.jqx.date(g.getAttribute("data-date"),H.timeZone);if(D=B){C[0].style.width=S+F-m-5+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=h&&K-b<=u.x+u.width+15){C[0].style.width=u.width+"px";p=true}}}else{C[0].style.width=u.width+"px"}}else{if(tn){C[0].style.left=m+"px";C[0].style.width=s-m+parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=S+F-5-parseInt(e)+"px"}}if(At&&A>n){C[0].style.display="none"}if(t<=n){for(var Q=0;QH.selectedJQXAppointment.from&&!p){H.resizeTo=D}else{H.resizeTo=H.selectedJQXAppointment.to}}}}else{if(H.leftResize){var p=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(Au.x+u.width){C[0].style.width=u.width+"px";C[0].style.left=u.x+"px"}if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=u.x-10&&K-b<=u.cellX+H.cellWidth){C[0].style.width=u.width+"px";C[0].style.left=u.x+"px";p=true}}}else{if(tn){C[0].style.left=e;C[0].style.width=u.x+u.width-parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=s-L.left+parseInt(e)+"px";C[0].style.left=L.left+"px"}}if(At){C[0].style.display="none"}if(tu.x+u.width){C[0].style.left=u.x+"px"}C[0].style.width=-1+u.x+u.width-L.left+"px"}}}}}var D=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(g.getAttribute("data-date"),H.timeZone));if(D>H.selectedJQXAppointment.from&&!p){H.resizeTo=D}else{H.resizeTo=H.selectedJQXAppointment.to}}else{if(H.rightResize){var O=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A=B){C[0].style.width=S+F-m-5+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=u.lastCellX&&K-b<=u.x+u.width+15){C[0].style.width=u.width+"px";O=true}}}else{C[0].style.width=u.width+"px"}}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(tN){C[0].style.display="none"}if(AN){for(var Q=0;Q0){a(this).find(".jqx-scheduler-appointment-left-resize-indicator")[0].style.visibility="hidden"}if(i0){a(this).find(".jqx-scheduler-appointment-right-resize-indicator")[0].style.visibility="hidden"}if(ii._lastResizeX+a(d).width()/2){var g=i.selectedAppointmentTableBounds.width+i.selectedAppointmentTableBounds.left-h.left-a(d).width();if(j(g)){i.feedback.css("left",2+h.left+a(d).width());i.feedback.width(g);i._lastResizeX=i.feedback.coord().left;if(!i.rtl){i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}else{i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}}}else{if(mi._lastResizeX+a(d).width()/2){var f=a(d).width()+h.left-i.selectedAppointmentTableBounds.width-i.selectedAppointmentTableBounds.left;var g=i.selectedAppointmentTableBounds.width+f;if(j(g)){i.feedback.width(g);i._lastResizeX=i.selectedAppointmentTableBounds.width+f+i.feedback.coord().left;if(!i.rtl){i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}else{i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}}}else{if(ml){g.hScrollInstance.setPosition(g.hScrollInstance.value+5)}}}else{if(c>l){g.hScrollInstance.setPosition(g.hScrollInstance.value-5)}else{if(c=1||e.allDay;if(j&&l){q-=20}else{if(j&&g.resizing){q+=a(g.table[0].rows[0]).height();n-=a(g.table[0].rows[0]).height()}}var p=q+25;var o=n+p-45;if(io){g.vScrollInstance.setPosition(g.vScrollInstance.value+5)}}},5)}}g.resizing=true},_startTimers:function(b,h,d){var f=this;var g=f.host.coord();var e=0;var c=0;if(f.hScrollInstance.element.style.visibility!="hidden"){clearInterval(f._horizontalIntervalDragVelocity);f._horizontalIntervalDragVelocity=setInterval(function(){e++;if(e>40){e=40}},100);clearInterval(f._horizontalIntervalDrag);f._horizontalIntervalDrag=setInterval(function(){var j=f._hostWidth;var l=g.left;var i=l+30;var k=j+i-60;if(!f.rtl){if(bk){f.hScrollInstance.setPosition(f.hScrollInstance.value+10+e)}else{e=0}}}else{if(bk){f.hScrollInstance.setPosition(f.hScrollInstance.value-10-e)}else{e=0}}}},10)}if(f.vScrollInstance.element.style.visibility!="hidden"){clearInterval(f._verticalIntervalDragVelocity);f._verticalIntervalDragVelocity=setInterval(function(){c++;if(c>40){c=40}},100);clearInterval(f._intervalDrag);f._intervalDrag=setInterval(function(){var m=f._hostHeight;var o=0;if(!f.columnGroups){o+=f.showHeader?f.columnsHeight:0}else{o+=f.showHeader?f.columnsheader.height():0}var p=f._views[f._view].type;var r=f._views[f._view];if(f.showToolbar){o+=f.toolbarHeight}m-=o;if(f.showLegend&&f._resources.length>0){m-=f.legendHeight}var k=g.top;var q=o+k;if(p=="dayView"||p=="weekView"){var j=f.showAllDayRow;if(r.timeRuler&&(p==="dayView"||p==="weekView")){if(r.timeRuler.showAllDayRow!=undefined){j=r.timeRuler.showAllDayRow}}var l=d.duration().days()>=1||d.allDay;if(j&&l){q-=20}else{if(j&&f.resizing){q+=a(f.table[0].rows[0]).height()}}}var n=q+30;var i=k+m+o-30;if(hi){f.vScrollInstance.setPosition(f.vScrollInstance.value+10+c)}else{c=0}}},10)}},_hoverCell:function(b){var c=this;if(!c.enableHover){return true}if(c._resources.length>0){if(b.className.indexOf("pinned")>=0){return true}}if(b.className.indexOf("time-column")>=0){return true}if(b.className.indexOf("jqx-scheduler-disabled-cell")>=0){return true}if(b&&b==c.hoveredCell){return true}c.hoveredCell=b;if(!b){return true}c._removeHoveredCell();c.hoveredCell=b;b.className+=" "+c.toTP("jqx-fill-state-hover")+" "+c.toTP("jqx-grid-cell-hover")+" "+c.toTP("jqx-scheduler-cell-hover");b.jqxClassName=b.className},_removeHoveredCell:function(){var d=this;if(d.hoveredCell){var c=d.hoveredCell;var b=function(e){var f=c.className;f=f.replace(" "+d.toTP("jqx-fill-state-hover"),"");f=f.replace(" "+d.toTP("jqx-grid-cell-hover"),"");f=f.replace(" "+d.toTP("jqx-scheduler-cell-hover"),"");c.className=f;c.jqxClassName=f};b(c)}d.hoveredCell=null},_addHandlers:function(){var i=this;this._mousewheelfunc=this._mousewheelfunc||function(m){i.wheel(m,i);return false};this.focused=false;var g=false;this.addHandler(a(document),"keydown.scheduler"+i.element.id,function(m){g=false;if(m.keyCode===9&&m.shiftKey&&!i.focused){g=true}});this.addHandler(this.host,"focus",function(n){if(i.focusedCell&&!i.selectedAppointment&&!g){a(i.focusedCell).addClass(i.toThemeProperty("jqx-scheduler-cell-focus"))}i.focused=true;if(g){if(i.appointmentsToRender.length>0){var m=i.appointmentsToRender[i.appointmentsToRender.length-1];i._selectAppointment(m);i._lastSelectedAppointment=m}else{if(!i.focusedCell){i._updateFocusedCell()}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();return false}}}}}});this.addHandler(this.host,"blur",function(m){if(i.focusedCell){if(document.activeElement==i.element){return true}if(a(document.activeElement).ischildof(i.host)){return true}a(i.focusedCell).removeClass(i.toThemeProperty("jqx-scheduler-cell-focus"));i.focused=false}});this.addHandler(this.host,"dragstart."+this.element.id,function(m){return false});this.addHandler(this.host,"selectstart."+this.element.id,function(m){if(i.enableBrowserSelection){return true}if(i.showToolBar){if(a(m.target).ischildof(i.toolbar)){return true}}if(i.rowDetails){if(a(m.target).parents("[data-role=details]").length>0){return true}}if(undefined==i.editKey){return false}});this.addHandler(a(window),"jqxReady."+this.element.id,function(){});this.removeHandler(this.host,"mousewheel",this._mousewheelfunc);this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var d=this.isTouchDevice();this.vScrollInstance.valueChanged=function(m){if(i._timer){clearTimeout(i._timer)}if(d){if(i.table){i.table[0].style.top=0-i.vScrollInstance.value+"px"}}else{i._timer=setTimeout(function(){if(i.table){i.table[0].style.top=0-i.vScrollInstance.value+"px"}},1)}};this.hScrollInstance.valueChanged=function(m){if(i._htimer){clearTimeout(i._htimer)}if(d){if(i.table){i._renderhorizontalscroll()}}else{i._htimer=setTimeout(function(){if(i.table){i._renderhorizontalscroll()}},1)}};var c="mousedown";if(this.isTouchDevice()){c=a.jqx.mobile.getTouchEventName("touchstart");if(a.jqx.browser.msie&&a.jqx.browser.version<10){c="mousedown"}}this.addHandler(this.table,"mouseleave",function(m){i._removeHoveredCell()});if(i.isTouchDevice()){i.enableHover=false}var h="mousemove.scheduler"+this.element.id;var e="mouseup.scheduler"+this.element.id;if(this.isTouchDevice()&&this.touchMode!==true){h=a.jqx.mobile.getTouchEventName("touchmove")+".scheduler"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchend")+".scheduler"+this.element.id}this.addHandler(a(document),h,function(X){var M=X.pageX;var L=X.pageY;if(i.isTouchDevice()){var N=a.jqx.position(X);M=N.left;L=N.top;if(isNaN(M)||isNaN(L)){var N=a.jqx.position(X.originalEvent);M=N.left;L=N.top}}if(i.disabled||X.which===3){return true}if(!i.isMouseDown){return true}if(i.hScrollInstance.isScrolling()||i.vScrollInstance.isScrolling()){return true}if(i._hostWidth){var D=i.host.coord();if(D.left+i._hostWidth=3&&Math.abs(i.mouseDownPosition.left-M)<=10)||(Math.abs(i.mouseDownPosition.top-L)>=3&&Math.abs(i.mouseDownPosition.top-L)<=10)){i.dragOrResize=true}}if(i.selectedAppointment&&i.dragOrResize){var w=null;if(i._hasOpenedMenu){return true}if(i.editRecurrenceDialog.jqxWindow("isOpen")){return true}var o=i._views[i._view].type;var K=i._views[i._view];var A=false;if(X.target.nodeName.toLowerCase()==="td"){var q=X.target}else{var q=i.findCell(M,L)}if(!q){return true}if(q.getAttribute("data-time-slot")!=undefined){return true}if(q.className.indexOf("jqx-grid-cell-pinned")>=0){return true}if(!i.feedback){w=i.getJQXAppointmentByElement(i.selectedAppointment);if(!w.draggable&&!w.resizable){w=null;return true}if(i.beginDrag){var t=i.beginDrag(w);if(!t){return true}}var T=a('[data-key="'+w.id+'"]');var B=i.selectedAppointment.position();i.feedback=i.selectedAppointment.clone(true);i.pinnedfeedback=i.selectedAppointment.clone(true);var V=!(i.selectedAppointment[0].style.cursor=="row-resize"||i.selectedAppointment[0].style.cursor=="col-resize"||i.resizing);var p=function(x){if(V){x.find(".jqx-scheduler-appointment-resize-indicator").hide()}T.addClass(i.toTP("jqx-scheduler-feedback-appointment jqx-disableselect"));x.find(".jqx-scheduler-appointment-duration-status").hide();x.addClass(i.toTP("jqx-scheduler-feedback-appointment"));x.addClass(i.toTP("jqx-scheduler-feedback-drag-appointment"));if(!V){x.css("z-index",400)}else{x.css("z-index",401)}};p(i.feedback);p(i.pinnedfeedback);if(i._views[i._view].type!="monthView"||V){i.table.append(i.feedback);if(i.tableRows==1){i.pinnedtable.append(i.pinnedfeedback)}else{i.table.append(i.pinnedfeedback)}i.feedback.css("left",B.left);i.feedback.css("top",B.top);i.pinnedfeedback.css("left",B.left);i.pinnedfeedback.css("top",B.top);if(i._views[i._view].type=="monthView"&&i.isTouchDevice()){i.feedbacks=new Array();for(var S=0;S<6;S++){i.feedbacks.push(i.feedback.clone(true));a(i.feedbacks[S]).hide();i.table.append(a(i.feedbacks[S]))}}}else{i.feedbacks=new Array();for(var S=0;S<6;S++){i.feedbacks.push(i.feedback.clone(true));a(i.feedbacks[S]).hide();i.table.append(a(i.feedbacks[S]))}}}if(i.dragging){var t=i.dragging(w,q,i.feedback);if(false===t){return true}}var N=a(q).position();if(i.endDrag){var I=i.feedback.css("left");var J=i.feedback.css("top");var z=i.feedback.width();var F=i.feedback.height}if(!w){w=i.selectedJQXAppointment}if(!w){i.selectAppointment(i.uiappointments[0].id);w=i.selectedJQXAppointment}var v=w.resourceId;var r=i._resources.indexOf(v);if(i.resources&&i.resources.orientation=="none"){r=-1}var Q=false;var U=i.isTouchDevice();if(U&&i.touchMode!==true&&i._dragCell==null&&!(i.leftResize||i.rightResize||i.topResize||i.bottomResize||i.resizing)){switch(o){case"dayView":case"weekView":var A=w.duration().days()>=1||w.allDay;if(!A){if(L>=i.selectedAppointmentBounds.top-15&&L<=i.selectedAppointmentBounds.top+15){Q=true;i.topResize=true}if(L>=i.selectedAppointmentBounds.top-15+i.selectedAppointmentBounds.height&&L<=i.selectedAppointmentBounds.top+i.selectedAppointmentBounds.height+15){Q=true;i.bottomResize=true}}else{if(M>=i.selectedAppointmentBounds.left-15&&M<=i.selectedAppointmentBounds.left+15){Q=true;i.leftResize=true}if(M>=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width-15&&M<=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width+15){Q=true;i.rightResize=true}}break;default:if(M>=i.selectedAppointmentBounds.left-15&&M<=i.selectedAppointmentBounds.left+15){Q=true;i.leftResize=true}if(M>=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width-15&&M<=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width+15){Q=true;i.rightResize=true}break}}if(U&&(i.leftResize||i.rightResize||i.topResize||i.bottomResize||i.resizing)||Q){if(q.getAttribute("data-view")!=r+1&&i._resources.length>0){if(i.resources.orientation!="none"){return true}}var W=i._getDateByString(q.getAttribute("data-date"));if(Wi.max.toDate()){return}i._handleResize(M,L,q,N,w);i._oldResizeTD=q}else{if(!U&&i.selectedAppointment[0].style.cursor=="row-resize"||i.selectedAppointment[0].style.cursor=="col-resize"||i.resizing){if(q.getAttribute("data-view")!=r+1&&i._resources.length>0){if(i.resources&&i.resources.orientation!="none"){return true}}var W=i._getDateByString(q.getAttribute("data-date"));if(Wi.max.toDate()){return}i._handleResize(M,L,q,N,w);i._oldResizeTD=q}else{if(!w.draggable){i._removeFeedbackAndStopResize();return true}if(i._dragCell==q){i._startTimers(M,L,w);if(i.isTouchDevice()&&i.touchMode!==true){X.stopPropagation();return false}else{return}}var W=i._getDateByString(q.getAttribute("data-date"));if(Wi.max.toDate()){return}var E=w.duration();if(o.indexOf("month")>=0&&new a.jqx.date(W).add(E)>i.max){return}var P=i.vScrollBar[0].style.visibility=="hidden"?0:6+i.vScrollBar.outerWidth();i._dragCell=q;i.feedback[0].style.left=2+N.left+"px";i.feedback[0].style.top=2+N.top+"px";if(o==="dayView"||o==="weekView"){i.pinnedfeedback.css("left",2+N.left);i.pinnedfeedback.css("top",2+N.top);var m=0;if(q.getAttribute("data-end-date")){var s=i.appointmentsMinHeight;if(i.isTouchDevice()){s=i.touchAppointmentsMinHeight}if(K.appointmentHeight){s=K.appointmentHeight}A=w.duration().days()>=1||w.allDay;i.feedback.css("top",2+N.top+s);i.pinnedfeedback.css("top",2+N.top+18);if(o=="dayView"){var R=i.selectedAppointment.coord().left-9;i.feedback.css("left",R);i.pinnedfeedback.css("left",R)}if(A){i.pinnedfeedback.css("top",w.elements[0].y);m=i.selectedAppointment.width();if(2+N.left+m>i.host.width()-P){var C=2+N.left+m-i.host.width()+P+6;m-=C}i.feedback.width(m);i.feedback.height(s);i.pinnedfeedback.width(m);i.pinnedfeedback.height(s)}else{m=a(q).width()-4;i.feedback.width(m);i.feedback.height(s);i.pinnedfeedback.width(m);i.pinnedfeedback.height(s)}i.feedback.hide();i.pinnedfeedback.show()}else{i.feedback.show();i.pinnedfeedback.hide();var u=2;var O=30;var H=K.timeRuler&&K.timeRuler.scale;switch(H){case"sixtyMinutes":case"hour":u=1;break;case"thirtyMinutes":case"halfHour":u=2;break;case"fifteenMinutes":case"quarterHour":u=4;break;case"tenMinutes":u=6;break;case"fiveMinutes":u=12;break}m=a(q).width()-4;i.feedback.width(m);A=w.duration().days()>=1||w.allDay;if(A){i.feedback.height((a(q).height())-6)}else{i.feedback.height(i.selectedAppointment.height())}}i._startTimers(M,L,w)}else{if(o==="monthView"){i.feedback.css("left",1+N.left);var n=i.selectedAppointmentTableBounds;var G=parseInt(n.top);if(G>N.top&&GN.top&&G=0&&o.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&o.target.className.indexOf("jqx-scheduler-appointment-content")==-1&&o.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){n=o.target}var u=o.target;for(var v=0;v<4;v++){if(u.parentNode){if(u.className.indexOf("jqx-scheduler-appointment")>=0&&u.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&u.className.indexOf("jqx-scheduler-appointment-content")==-1&&u.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){n=u}u=u.parentNode}else{break}}if(n){var B=i._views[i._view].type;var E=i._views[i._view];var D=i.getJQXAppointmentByElement(n);if(D.resizable){var t=D.duration();var p=D.allDay||t.days()>=1||(t.hours()==23&&t.minutes==59&&t.seconds==59);var z=a(n).coord();var w=a(n).position();i.selectedAppointmentBounds={top:z.top,left:z.left,width:a(n).width(),height:a(n).height()};i.selectedAppointmentTableBounds={top:w.top,left:w.left,width:a(n).width(),height:a(n).height()};var m=i.selectedAppointmentBounds;if(B=="weekView"||B=="dayView"){if(!p){if(A>=m.top-3&&A<=m.top+6){n.style.cursor="row-resize";i.topResize=true;i.bottomResize=false}else{if(A>=m.top+m.height-6&&A<=m.top+m.height+3){n.style.cursor="row-resize";i.topResize=false;i.bottomResize=true}else{n.style.cursor="pointer"}}}else{if(B!="dayView"){if(C>=m.left-3&&C<=m.left+6){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false}else{if(C>=m.left+m.width-6&&C<=m.left+m.width+3){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true}else{n.style.cursor="pointer"}}}else{n.style.cursor="pointer"}}}else{if(B=="monthView"&&D.elements.length>1){var s=i.table.coord();for(var v=0;v=m.left-3&&C<=m.left+6){if(A>=m.top&&A<=m.top+m.height){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false;i.selectedAppointment=a(n);break}else{n.style.cursor="pointer"}}else{n.style.cursor="pointer"}}else{if((v==D.elements.length-1&&!i.rtl)||(v==0&&i.rtl)){if(C>=m.left+m.width-6&&C<=m.left+m.width+3){if(A>=m.top&&A<=m.top+m.height){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true;i.selectedAppointment=a(n);break}else{n.style.cursor="pointer"}}else{n.style.cursor="pointer"}}}}}else{if(C>=m.left-3&&C<=m.left+6){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false}else{if(C>=m.left+m.width-6&&C<=m.left+m.width+3){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true}else{n.style.cursor="pointer"}}}}}}if(!i.enableHover){return true}if(o.target.nodeName.toLowerCase()==="td"){var r=o.target}else{var r=i.findCell(C,A)}if(!r){return true}i._removeHoveredCell();if(i.renderedRecords&&i.renderedRecords.length===0){return true}if(i.isMouseDown){if(Math.abs(i.mousecaptureposition.left-C)>3||Math.abs(i.mousecaptureposition.top-A)>3){if(i.mousecaptureposition.clickedcell.length===0){i.selectionarea[0].style.visibility="hidden";return}if(i.lastHoveredCell!=r){if(i._selectRangeTimer){clearTimeout(i._selectRangeTimer)}i._selectRangeTimer=setTimeout(function(){var x=i._views[i._view].type;if(x!="agendaView"){i._selectRange(r,i.mousecaptureposition.clickedcell[0])}},1)}i.lastHoveredCell=r}}else{if(!n){if(i.rows.length==1&&i.rows[0].cells.length==1){return true}i._hoverCell(r)}}return true});this.addHandler(a(document),"keydown.jqxscheduler"+i.element.id,function(m){if(i.focused&&m.ctrlKey){if(m.keyCode==68){return false}}});this.addHandler(this.host,"keydown",function(m){return i._handleKey(m)});if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.addHandler(this.table,"dblclick",function(m){i.table.trigger("mousedown",m)})}var j=function(K){var M=K.target;var u=null;if(i.disabled){return true}if(!i.menu&&K.which==3){i._initMenu()}var n=i.table.coord();var B=K.pageX;var w=K.pageY;if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(arguments&&arguments.length==2){B=arguments[1].pageX;w=arguments[1].pageY}}if(i.isTouchDevice()){var N=a.jqx.position(K);B=N.left;w=N.top;if(isNaN(B)||isNaN(w)){var N=a.jqx.position(K.originalEvent);B=N.left;w=N.top}}i.mouseDown={top:w,left:B};var u=i.findCell(B,w);if(K.target.nodeName.toLowerCase()==="td"){var u=K.target}else{var u=i.findCell(B,w)}var D=i._views[i._view].type;var v=i._views[i._view];if(D==="monthView"&&v.weekViewNavigation){if(u&&u.getAttribute("data-time-slot")){var z=i._getDateByString(u.getAttribute("data-date"));var J=new a.jqx.date(z);i.date=J;i.setView("weekView")}}if(D==="monthView"&&v.dayViewNavigation){var m=a(u).coord().top;if(u&&w>=m&&m+16>=w){var z=i._getDateByString(u.getAttribute("data-date"));var J=new a.jqx.date(z);i.date=J;i.setView("dayView")}}if(K.target.nodeName.toLowerCase()==="span"&&(K.target.className.indexOf("jqx-icon-arrow-down")>=0||K.target.className.indexOf("jqx-icon-close")>=0)){if(K.target.mousedown){K.target.mousedown()}return true}var t=a(u).parent();var P=t.attr("data-key");i.mousecaptureposition={left:K.pageX,top:K.pageY,clickedrow:a(t).index(),clickedcell:a(u)};if(K.which!==3){i.isMouseDown=true;i.isMouseDownDate=new Date()}else{i.isMouseDown=false}if(i.contextMenu&&i.menu&&K.which!==3){i.menu.jqxMenu("close");i._hasOpenedMenu=false}var r=function(y){if(K.which===3){if(i.contextMenu&&i.menu){if(y){i.menu.find("li:first").show()}else{i.menu.find("li:first").hide()}var x=i.menu.coord();if(i.menu.css("display")=="block"&&x.left==K.pageX&&x.top==K.pageY){i._hasOpenedMenu=true;K.preventDefault();K.stopPropagation();return}if(D==="agendaView"){}i.menuOpening=true;i.menu.jqxMenu("open",K.pageX,K.pageY);i.menuOpening=false;i._hasOpenedMenu=true;K.preventDefault();K.stopPropagation();setTimeout(function(){i.menu.jqxMenu("focus")},50)}}};var I=function(){for(var Q=0;Q=0&&K.target.className.indexOf("jqx-scheduler-appointment-duration-status")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-status")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-content")==-1?a(K.target):a(K.target).parents(".jqx-scheduler-appointment");if(q.length==0){q=null}if(q&&q[0].className.indexOf("feedback")==-1){if(q.parents(".jqx-scheduler-month-cell-popup").length>0){return true}i.mouseDownPosition={top:w,left:B};var H=a(q).coord();i.selectedAppointmentBounds={top:H.top,left:H.left,width:a(q).width(),height:a(q).height()};var N=a(q).position();i.selectedAppointmentTableBounds={top:N.top,left:N.left,width:a(q).width(),height:a(q).height()};if(!i._dragStartCell){i._dragStartCell=i.findCell(H.left,H.top)}var p=i.getJQXAppointmentByElement(q);i._selectAppointment(p,q,"mouse");i._raiseEvent("appointmentClick",{appointment:p.boundAppointment});i.clearSelection();var s=new Date().getTime();var F=300;if(a.jqx.browser.msie&&a.jqx.browser.version<9){F=1000}if(!i.clickTime){i.clickTime=new Date()}if((s-i.clickTime.getTime()F){if(u.getAttribute("data-time-slot")=="true"){return}if(!K.shiftKey){i.shiftSelectedCell=null}if(K.shiftKey&&i._lastSelectedCell&&D!="agendaView"){if(!i.shiftSelectedCell){i.shiftSelectedCell=i._lastSelectedCell}if(u.getAttribute("data-view")===i.shiftSelectedCell.getAttribute("data-view")){I()}i._selectRange(u,i.shiftSelectedCell)}if(!K.shiftKey){I();var z=i._getDateByString(u.getAttribute("data-date"));if(z>=i.min.toDate()&&z<=i.max.toDate()){u.setAttribute("data-selected","true")}else{u.setAttribute("data-selected","false")}}a('[data-key="'+P+'"]').removeClass(i.toTP("jqx-scheduler-selected-appointment"));i.selectedAppointment=null;var z=i._getDateByString(u.getAttribute("data-date"));if(z>=i.min.toDate()&&z<=i.max.toDate()){i._lastSelectedCell=u;i.focusedCell=u}i._updateCellsSelection(u);if(i.openedMonthCellPopup){i.openedMonthCellPopup.remove()}}i._raiseEvent("cellClick",{cell:u,date:L});i.clickTime=new Date();if(K.stopPropagation){K.stopPropagation()}}};this.addHandler(this.pinnedtable,c,function(n){var m=j(n);if(m!=undefined){return m}});this.addHandler(this.table,c,function(n){var m=j(n);if(m!=undefined){return m}})},moveAppointment:function(k,c,g,f,j){var h=this;var i=f.getAttribute("data-end-date");if(k){if(h.editRecurrenceDialog.jqxWindow("isOpen")){return}clearInterval(h._verticalIntervalDragVelocity);clearInterval(h._horizontalIntervalDragVelocity);clearInterval(h._intervalDrag);clearInterval(h._horizontalIntervalDrag);var d=k.duration();var b=k.duration().days()>=1||k.allDay;var e=function(r){if(!j){var l=h._views[h._view].type;var o=h._views[h._view];var p=c;k.from=p;if(l==="dayView"||l==="weekView"){if(!b&&!i){k.to=p.add(d);k.allDay=false}else{if(!b&&i){k.to=a.jqx.scheduler.utilities.getEndOfDay(p);k.allDay=true}else{if(b&&i){k.to=p.add(d)}else{if(b&&!i){var n=30;var q=o.timeRuler&&o.timeRuler.scale;switch(q){case"sixtyMinutes":case"hour":n=60;break;case"fifteenMinutes":case"quarterHour":n=15;break;case"tenMinutes":n=10;break;case"fiveMinutes":n=5;break}k.to=p.addMinutes(n);k.allDay=false}}}}}else{if(l==="monthView"){k.to=p.add(d)}else{if(l==="timelineDayView"||l==="timelineWeekView"||l==="timelineMonthView"){k.to=p.add(d)}}}}h._saveChangesAfterDragOrResize(r,k,f,j);if(g!=null){k.resourceId=g}h.table.find(".jqx-icon-arrow-down").hide();if(k.allDay||b){h._renderrows()}else{var s=h.getViewStart();var m=a.jqx.scheduler.utilities.getEndOfDay(h.getViewEnd());h._prepareAppointmentsInView(s,m);h._renderAppointments(s,m)}h._raiseEvent("appointmentChange",{appointment:k.boundAppointment});h.changedAppointments[k.id]={type:"Update",appointment:k.boundAppointment};h._ensureAppointmentVisible(h.selectedJQXAppointment)};if(k.isRecurrentAppointment()){e(false)}else{e(null)}}},getAppointmentProperty:function(d,b){var e=this;var c=null;if(this.appointmentsByKey[d]){c=this.appointmentsByKey[d].jqxAppointment}if(!c){return}return c[b]},setAppointmentProperty:function(e,b,g){var f=this;var c=null;if(this.appointmentsByKey[e]){c=this.appointmentsByKey[e].jqxAppointment}if(!c){return}c[b]=g;f.changedAppointments[e]={type:b,appointment:c.boundAppointment};switch(e){case"draggable":case"resizable":break;case"background":case"color":case"borderColor":case"status":case"tooltip":case"subject":case"location":case"description":case"style":var h=f.getViewStart();var d=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(h,d);f._renderAppointments(h,d);break;case"hidden":case"timeZone":if(c.isAllDayAppointment()){f._renderrows()}else{var h=f.getViewStart();var d=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(h,d);f._renderAppointments(h,d)}break;default:f._renderrows()}},deleteAppointment:function(b){if(this.appointmentsByKey[b]){this._deleteAppointment(this.appointmentsByKey[b].jqxAppointment)}},_deleteAppointment:function(b){var g=this;if(b.rootAppointment){if(!b.isException()){if(b.rootAppointment!=null){b.rootAppointment.exceptions.push(g.editAppointment);b.rootAppointment.recurrenceException.push(g.editAppointment.occurrenceFrom)}else{b.exceptions.push(g.editAppointment);b.recurrenceException.push(g.editAppointment.occurrenceFrom)}}else{var f=b.rootAppointment?b.rootAppointment.exceptions:b.exceptions;for(var e=0;e=0){q=q.substring(q.indexOf("EXDATE:")+7)}var l=new Array();if(q.indexOf(",")>=0){l=q.split(",")}else{l.push(q)}for(var s=0;s=0){var h=p.split(";")[1];p=p.split(";")[0];if(h.toLowerCase().indexOf("display")>=0&&h.toLowerCase().indexOf("none")){d.hidden=true}}try{var u=a.jqx.scheduler.utilities.untilStringToDate(p);if(u!="Invalid Date"){if(d.timeZone){u=new a.jqx.date(u,d.timeZone)}else{if(g.timeZone){u=u.toTimeZone(g.timeZone)}else{u=new a.jqx.date(u)}}}}catch(v){var u=new a.jqx.date(p,g.timeZone)}t.push(u)}}q=t}d[w]=q}for(var m in e){var w=e[m];if(d[w]==undefined){var q="";if(w=="originalData"){continue}if(w=="ownerId"){q=null}if(w=="timeZone"){q=null}if(w=="recurrencePattern"){q=null}if(w=="recurrenceException"){q=null}if(w=="allDay"){q=false}if(w=="draggable"){q=true}if(w=="resizable"){q=true}if(w=="hidden"){q=false}if(w=="resourceId"){q=null}if(w=="from"){q=new a.jqx.date()}if(w=="to"){q=new a.jqx.date().addHours(1)}d[w]=q}}d.originalData=f;d.scheduler=this;var o=new a.jqx.scheduler.appointment(d);if(d.timeZone){o.from=o.from.toTimeZone(d.timeZone);o.to=o.to.toTimeZone(d.timeZone)}if(g.timeZone){if(!d.timeZone){o.timeZone=g.timeZone}o.from=o.from.toTimeZone(g.timeZone);o.to=o.to.toTimeZone(g.timeZone)}else{o.from=o.from.toTimeZone(null);o.to=o.to.toTimeZone(null)}}else{var i=new a.jqx.scheduler.appointment();for(var w in o){i[w]=o[w]}o=i}}var w=g.dataview.generatekey();o.id=w;g.appointmentsByKey[w]=o;g.appointments.push(o);var c={};var j={};for(var r in g.appointmentDataFields){var b=g.appointmentDataFields[r];var q=o[r];c[r]=q;if(r=="from"||r=="to"){if(q.toDate){q=q.toDate()}else{q=new a.jqx.date(q).toDate()}}j[b]=q}c.originalData=j;o.boundAppointment=c;c.jqxAppointment=o;o.jqxAppointment=o;g._raiseEvent("appointmentAdd",{appointment:o.boundAppointment});g.uiappointments.push(o);g.changedAppointments[w]={type:"Add",appointment:o.boundAppointment};if(g.hiddenResources&&g.hiddenResources[o.resourceId]){g.hideAppointmentsByResource(o.resourceId)}else{g._renderrows()}g._selectAppointment(o);g._lastSelectedAppointment=o;if(g.resources){var n=o.resourceId;if(g._resources.indexOf(n)===-1){g._resources.push(n);g._renderrows()}}},_updateCellsSelection:function(){var f=this;var l=f.rows;var b=0;var c=0;if(b>0&&f.rtl){b=0;c=1}for(var e=0;e=0){if(h!=f.focusedCell){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"")}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}}}if(h.className!=g){h.className=g}h.jqxClassName=g;continue}g=g.replace(" jqx-fill-state-pressed","");g=g.replace(" jqx-fill-state-pressed-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");g=g.replace(" jqx-grid-cell-selected","");g=g.replace(" jqx-grid-cell-selected-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-selected","");g=g.replace(" jqx-scheduler-cell-selected-"+f.theme,"");g=g+=" "+f.toTP("jqx-fill-state-pressed jqx-grid-cell-selected jqx-scheduler-cell-selected");if(h==f.focusedCell&&f.focused&&!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g}else{var g=h.jqxClassName||h.className;if(g.indexOf("jqx-fill-state-pressed")==-1){if(h!=f.focusedCell){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"")}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}}}if(h.className!=g){h.className=g}h.jqxClassName=g;continue}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g}}g=g.replace(" jqx-fill-state-pressed","");g=g.replace(" jqx-fill-state-pressed-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");g=g.replace(" jqx-grid-cell-selected","");g=g.replace(" jqx-grid-cell-selected-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-selected","");g=g.replace(" jqx-scheduler-cell-selected-"+f.theme,"");if(h==f.focusedCell&&f.focused&&!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g;h.removeAttribute("data-selected")}}}},_getuikey:function(c,f){var e=null;var d=this.table[0].rows;e=a(d[c]).attr("data-key");if(a(d[c]).attr("data-role")){var b=a(d[c]);if(f=="next"){while(b){b=b.next();if(b){var g=b.attr("data-role");if(!g){e=b.attr("data-key");return e}}}}else{if(f=="prev"){while(b){b=b.prev();if(b){var g=b.attr("data-role");if(!g){e=b.attr("data-key");return e}}}}}return null}return e},getRows:function(){var h=this._views[this._view].type;var k=this._views[this._view];var d="halfHour";if(k.timeRuler&&k.timeRuler.scale){d=k.timeRuler.scale}var j=24;var b=this.showAllDayRow;if(k.timeRuler&&(h==="dayView"||h==="weekView")){var c=0;var f=23;if(k.timeRuler.scaleStartHour!=undefined){var c=parseInt(k.timeRuler.scaleStartHour)}if(k.timeRuler.scaleEndHour!=undefined){var f=parseInt(k.timeRuler.scaleEndHour)}if(c<0){c=0}if(f<0){f=23}if(c>23){c=0}if(f>23){f=23}j=f-c+1;if(k.timeRuler.showAllDayRow!=undefined){b=k.timeRuler.showAllDayRow}}var l=new Array();var g=0;switch(h){case"dayView":case"weekView":default:var g=j*2;if(d==="hour"||d==="sixtyMinutes"){var g=j}else{if(d==="quarterHour"||d==="fifteenMinutes"){var g=j*4}else{if(d==="tenMinutes"){var g=j*6}else{if(d==="fiveMinutes"){var g=j*12}}}}if(b){g++}break;case"monthView":var g=6;break;case"timelineDayView":case"timelineWeekView":case"timelineMonthView":var g=1;break;case"agendaView":var g=this.appointments?this.appointments.length:0;break}for(var e=0;e0&&!t){I=D.cells[F-1]}else{if(H=="monthView"&&!t){var A=D.aboveRow;if(A){I=A.cells[A.cells.length-1]}}}break;case"right":var D=i.rowByCell[x.getAttribute("data-key")];var F=D.indexOf(x);if(F1||i.rtl)){if(!i.rtl){y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(-1))}else{y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(1))}C=true}else{if(z=="right"){if(!i.rtl||(i.rtl&&y.elements[0].cells.length>1)){y.to=a.jqx.scheduler.utilities.getEndOfDay(M)}C=true}}}else{if(z=="up"&&y.elements[0].cells.length>1){y.to=M;C=true}else{if(z=="down"){y.to=M.addMinutes(i.getMinutesPerScale());C=true}}}}else{if(H.indexOf("month")>=0){if(z=="left"&&(y.elements[0].cells.length>1||y.elements.length>1)){y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(-1));C=true}else{if(z=="right"){y.to=a.jqx.scheduler.utilities.getEndOfDay(M);C=true}}}else{if((!i.rtl&&z=="left"&&y.elements[0].cells.length>1)||(i.rtl&&z=="right"&&y.elements[0].cells.length>1)){y.to=M;if(i.rtl){y.to=M.addMinutes(i.getMinutesPerScale())}C=true}else{if((!i.rtl&&z=="right")||(i.rtl&&z=="left")){y.to=M.addMinutes(i.getMinutesPerScale());if(i.rtl){y.to=y.to.addMinutes(i.getMinutesPerScale())}C=true}}}}if(C){i.moveAppointment(y,M,J,I,true)}}else{if(m){i.moveAppointment(y,M,J,I)}else{i.clearAppointmentsSelection();var K=true;if(z=="down"){K=false}i.selectCell(M,K,H);i._ensureVisible(I)}}if(i.selectedAppointment){i.selectedAppointment.removeClass(i.toTP("jqx-scheduler-selected-appointment"));var O=i.selectedAppointment.attr("data-key");a('[data-key="'+O+'"]').addClass(i.toTP("jqx-scheduler-selected-appointment"));i.clearSelection()}};if(s.altKey&&i._resourcesElements&&i._resources&&i._resources.length>0){var g=function(x){var y=i._resourcesElements.bottom[x];if(y.attr("data-toggle")=="on"){i.hideAppointmentsByResource(x)}else{i.showAppointmentsByResource(x)}};var j=w>=49&&w<=58?j=w-48:-1;if(j>=1){a.each(i._resources,function(x,y){if(x==j-1){g(y);return false}});return false}}if(s.ctrlKey){if(!i.selectedAppointment){if(w==37){i.toolbarLeftButton.trigger("click");i._ensureVisible(i.focusedCell);return false}else{if(w==39){i.toolbarRightButton.trigger("click");i._ensureVisible(i.focusedCell);return false}}}if(w==49){i._setView(0);return false}else{if(w==50){i._setView(1);return false}else{if(w==51){i._setView(2);return false}else{if(w==52){i._setView(3);return false}else{if(w==53){i._setView(4);return false}else{if(w==54){i._setView(5);return false}else{if(w==68){i.dateTimeInput.jqxDateTimeInput("open");return false}else{if(w==77){i.openMenu();return false}}}}}}}}}if(w==9){if(!s.shiftKey){if(i.selectedAppointment){i.clearSelection();var d=i.selectedAppointment;var c=i.getJQXAppointmentByElement(d);var h=i.tabKeyAppointments.indexOf(c);if(h0){c=i.tabKeyAppointments[h-1];i._selectAppointment(c);i._lastSelectedAppointment=c;i._ensureAppointmentVisible(c);return false}else{i.clearAppointmentsSelection();if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell);return false}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}return true}}}else{if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell)}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}}}}if(i.selectedAppointment){if(w==37){r("left")}else{if(w==38){r("up")}else{if(w==40){r("down")}else{if(w==39){r("right")}}}}if(w>=37&&w<=40){return false}return}var k=this._lastSelectedCell;if(!k){return}if(!a(this._lastSelectedCell).parent()[0]){this._lastSelectedCell=this.rows[0].cells[0];k=this._lastSelectedCell}var n=this.rows;var p=this._views[this._view].type;var l=this._views[this._view];var v="halfHour";if(l.timeRuler&&l.timeRuler.scale){v=l.timeRuler.scale}var q=function(K,F){var B=30;switch(v){case"sixtyMinutes":case"hour":B=60;break;case"thirtyMinutes":case"halfHour":B=30;break;case"fifteenMinutes":case"quarterHour":B=15;break;case"tenMinutes":B=10;break;case"fiveMinutes":B=5;break}var I=K.getAttribute("data-date");var H=function(U,N,P){if(U&&(U.getAttribute("rowspan")==null||p=="agendaView")&&U.getAttribute("data-time-slot")==null){if(Pi.max){return}var S=i.rows;var R=i._lastSelectedCell;i._lastSelectedCell=U;if(s.shiftKey&&i._lastSelectedCell){if(!i.shiftSelectedCell){i.shiftSelectedCell=k}}else{if(!s.shiftKey){i.shiftSelectedCell=null}}if(!i.shiftSelectedCell){for(var Q=0;Q0){var C=M.cells[E-1];var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone)}H(C,K,J);break;case"right":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);if(E=0){if(i.rows[G].cells[0]==C){G--}else{C=i.rows[G].cells[0];break}}}var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone);H(C,K,J)}break;case"down":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);var D=M.belowRow;if(D){var C=D.cells[E];if(E==0&&C.getAttribute("rowspan")){var G=1+i.rows.indexOf(M);var C=K;while(G=0){d=0}if(b[0].getAttribute("data-end-date")){d=0}g=new a.jqx.date(g,e.timeZone).addMinutes(d);var c=parseInt(b[0].getAttribute("data-view"))-1;var f=e._resources[c];if(e._views[e._view].type.toLowerCase().indexOf("month")>=0){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}if(e._views[e._view].type.toLowerCase().indexOf("day")>=0||e._views[e._view].type.toLowerCase().indexOf("week")>=0){h=new a.jqx.date(h,e.timeZone);if(g.minute()===0&&g.hour()===0&&h.hour()===0&&h.minute()===0){if(g.day()===h.day()){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}else{return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g).addDays(-1),resourceId:f}}}return{from:new a.jqx.date(h,e.timeZone),to:g,resourceId:f}}if(e._views[e._view].type.toLowerCase().indexOf("agenda")>=0){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}},clearSelection:function(){var f=this;var g=f.rows;var e=g.length;for(var d=0;d=c&&h==-1){h=f}if(d>k+c){e=f;break}}}e++;if(e>g+i){e=g+i}if(h==-1){h=0}return{start:h,end:e}},_renderhorizontalscroll:function(){var k=this;var r=k.hScrollInstance;var s=r.value;if(k.hScrollBar[0].style.visibility==="hidden"){r.value=0;s=0}var d=parseInt(s);if(k.table==null){return}var j=function(i){if(i.parentNode&&i.parentNode.nodeName!="#document-fragment"){return true}return false};var q=k._getvirtualcolumnsindexes(d,k._hostWidth,0,k.columns.records.length,false);var l=q.start;var n=q.end;var b=k.rows;for(var m=0;m0&&k.tableRows>0){for(var u=0;u=7){b-=7}if(!d){d=this.dayNameFormat;if(this.isTouchDevice()){d=this.touchDayNameFormat}}var c=this.schedulerLocalization.days.names[b];switch(d){case"full":c=this.schedulerLocalization.days.names[b];break;case"abbr":c=this.schedulerLocalization.days.namesAbbr[b];break;case"shortest":c=this.schedulerLocalization.days.namesShort[b];break;case"firstTwoLetters":c=c.substring(0,2);break;case"firstLetter":c=c.substring(0,1);break}return c},_initializeColumns:function(){if(this._views.length===0){this._views.push({type:"dayView"})}if(!this._views[this._view]){throw new Error("jqxScheduler: View is undefined. You need to define the View in the Views Array when you create jqxScheduler")}var p=this._views[this._view].type;var m=this._views[this._view];if(m.timeSlotWidth){m.timeSlotWidth=Math.max(m.timeSlotWidth,30);m.columnWidth=m.timeSlotWidth}if(m.columnWidth){if(m.columnWidth<30){m.columnWidth=30}}if(this.columns&&this.columns.records){for(var z=0;z23){G=0}if(P>23){P=23}Q=P-G+1}var K=60;var O=2;if(I){switch(I){case"sixtyMinutes":case"hour":O=1;break;case"thirtyMinutes":case"halfHour":O=2;break;case"fifteenMinutes":case"quarterHour":O=4;break;case"tenMinutes":O=6;break;case"fiveMinutes":O=12;break}}var S=new Array();var R="auto";if(m.timeRuler&&m.timeRuler.formatString){R=m.timeRuler.formatString}var F=G;var L=Q;var D=H.addHours(F);var j="auto";if(m.columnWidth){j=O*m.columnWidth}else{j=O*80}for(var M=0;M1){var f=h._resources[x]?h._resources[x]:"Resource"+x;B.push({text:f,name:f})}var w="left";if(this.rtl){w="right"}switch(p){case"dayView":var g=this.getViewStart();if(false===m.showWeekends){if(g.dayOfWeek()===0||g.dayOfWeek()===6){g=g.addDays(1)}if(g.dayOfWeek()===0||g.dayOfWeek()===6){g=g.addDays(1)}}var v="auto";if(m&&m.columnWidth){v=m.columnWidth}var f=h._resources[x]?h._resources[x]:"Resource"+x;this.columns.push({align:w,width:v,columnGroup:f,text:this._getDayName(g.dayOfWeek())});break;case"weekView":case"monthView":for(var z=0;z<7;z++){var y=this.schedulerLocalization.firstDay+z;if(y>6){y=0}if(false===m.showWeekends){if(y===0||y===6){continue}}var v="auto";if(m&&m.columnWidth){v=m.columnWidth}var f=h._resources[x]?h._resources[x]:"Resource"+x;this.columns.push({align:p=="weekView"?w:"center",width:v,columnGroup:f,text:this._getDayName(y)})}break;case"timelineDayView":var f=h._resources[x]?h._resources[x]:"Resource"+x;q(h.getViewStart(),f);break;case"timelineWeekView":for(var z=0;z<7;z++){var y=this.schedulerLocalization.firstDay+z;if(false===m.showWeekends){if(z===0||z===6){continue}}var f=h._resources[x]?h._resources[x]:"Resource"+x;B.push({align:h.rtl?"right":"left",parentGroup:f,name:this._getDayName(y)+x,text:this._getDayName(y)});q(h.getViewStart().addDays(z),this._getDayName(y)+x)}break;case"timelineMonthView":var k=h.getViewStart();var A="auto";if(m.timeRuler&&m.timeRuler.formatString){A=m.timeRuler.formatString}for(var z=0;z<41;z++){var y=k.dayOfWeek();if(false===m.showWeekends){if(y===0||y===6){continue}}var v="auto";if(m.columnWidth){v=m.columnWidth}else{v=100}var r=k.toDate();if(A==="auto"){var c="dd";r=k.toDate();if(r.getDate()===1){c="MMM dd"}}else{if(a.isFunction(A)){var c=A(r)}else{c=A}}if(a.jqx.dataFormat.isDate(r)){r=a.jqx.dataFormat.formatdate(r,c,h.schedulerLocalization)}k=k.addDays(1);var f=h._resources[x]?h._resources[x]:"Resource"+x;h.columns.push({minwidth:30,columnGroup:f,text:r,width:v})}break;case"agendaView":var l=m.dateColumnWidth;var u=m.timeColumnWidth;var o=m.appointmentColumnWidth;if(!o){o="70%"}if(!u){u="auto"}if(!l){l="auto"}h.columns.push({text:h.schedulerLocalization.agendaDateColumn,width:l});h.columns.push({text:h.schedulerLocalization.agendaTimeColumn,width:u});h.columns.push({text:h.schedulerLocalization.agendaAppointmentColumn,width:o});break}}if(B.length>0){this.columnGroups=B}var h=this;var s=new a.jqx.schedulerDataCollection(this.element);var d=0;this._columns=this.columns;var C="left";var e=new a.jqx.scheduler.column(h,this);e.visibleindex=d++;e.text="";e.width=h.timeRulerWidth;e.editable=false;e.timeColumn=true;C="left";e.text="";e.hidden=false;e.width=h.timeRulerWidth;var b=false;if(m.timeRuler&&(p==="dayView"||p==="weekView")){e._text=m.timeRuler.text||"";C=m.timeRuler.position||"left";e.hidden=m.timeRuler.hidden||false;e.width=m.timeRuler.width||h.timeRulerWidth;if(m.timeRuler.timeZones){b=true}}else{if(p!=="dayView"&&p!=="weekView"){e.hidden=true}}var n=function(i){var j=new a.jqx.scheduler.column(h,h);j.visibleindex=d++;j.text="";j.width=h.timeRulerWidth;j.editable=false;j.timeColumn=true;C="left";j.text="";j.hidden=false;j.timeZone=m.timeRuler.timeZones[i].id;j.width=h.timeRulerWidth;if(m.timeRuler&&(p==="dayView"||p==="weekView")){j._text=m.timeRuler.timeZones[z].text||"";j.hidden=m.timeRuler.hidden||false;j.width=m.timeRuler.width||h.timeRulerWidth;s.add(j)}};if(C==="left"&&(p==="dayView"||p==="weekView")){if(m.timeRuler&&m.timeRuler.timeZones){for(var z=0;z";var G=ab.columns.records.length;for(var aq=0;aqX.maxwidth){c=X.maxwidth}c-=ax;if(c<0){c=0}if(av){var ae=c;if(aq==F){ae++}v+=""}else{v+=""}Z+=c}v+="";if(R==0){var l='';var f=this.host.height();var U=0;if(!ab.columnGroups){U+=ab.showHeader?ab.columnsHeight:0}else{U+=ab.showHeader?ab.columnsheader.height():0}if(ab.showToolbar){U+=ab.toolbarHeight}if(ab.showLegend&&ab._resources.length>0){U+=ab.legendHeight}f-=U;var e='';e+=this.schedulerLocalization.emptyDataString;e+="";l+=e;l+="";v+=l;this.table[0].style.width=Z+2+"px";N=Z}var k=ab.rowsHeight;if(ab.isTouchDevice()){k=ab.touchRowsHeight}for(var at=0;at';O=0;var u=au.appointments[ai];for(var aq=0;aqah.maxwidth){c=ah.maxwidth}c-=ax;if(c<0){c=0}var E=ab.toTP("jqx-cell")+" "+ab.toTP("jqx-grid-cell")+" "+ab.toTP("jqx-item");if(ab.rtl){E+=" "+ab.toTP("jqx-cell-rtl")}var J="";var H=ab.dataview.generatekey();var s=-1;var g=au.date;var f=k+"px";var e='';var an="";if(ao==0&&ai==0){var D=g.toString("dddd",ab.schedulerLocalization);var am=g.toString("MMMM, yyyy",ab.schedulerLocalization);var ar=ab.toTP("jqx-scheduler-agenda-date");var o=ab.toTP("jqx-scheduler-agenda-day");var n=ab.toTP("jqx-scheduler-agenda-week");an='
    '+g.day()+'
    '+D+'
    '+am+"
    "}if(ao==1){var Q="auto";var aa=this._views[this._view];var z=u.from;var ay=u.to;if(aa.timeRuler&&aa.timeRuler.formatString){Q=aa.timeRuler.formatString}var ad=Q;var I=Q;if(Q==="auto"){if((z.hour()==0&&z.minute()==0)||(z.hour()==12&&z.minute()==0)){var ad="hh tt"}else{var ad="hh:mm"}if((ay.hour()==0&&ay.minute()==0)||(ay.hour()==12&&ay.minute()==0)){var I="hh tt"}else{var I="hh:mm"}}var ar=ab.toTP("jqx-scheduler-agenda-time");if(u.allDay){an=""+ab.schedulerLocalization.agendaAllDayString+""}else{if(!ab.rtl){an=""+z.toString(ad,ab.schedulerLocalization)+" - "+ay.toString(I,ab.schedulerLocalization)+""}else{an=""+ay.toString(I,ab.schedulerLocalization)+" - "+z.toString(ad,ab.schedulerLocalization)+""}}}else{if(ao==2){if(u.resourceId){a.each(ab._resources,function(r,x){if(u.resourceId==x){var i=ab.getColors(r);var j=this.toString();var w=ab.toTP("jqx-scheduler-agenda-appointment-resource jqx-scheduler-legend");if(ab.rtl){var w=ab.toTP("jqx-scheduler-agenda-appointment-resource-rtl jqx-scheduler-legend")}var t="
    ";an=t}})}var W=u.subject?u.subject:"(No Title)";var C=u.location;var y=u.description;var T=u.status?ab.schedulerLocalization.editDialogStatuses[u.status]:"";var b=u.isRecurrentAppointment();var B=u.isException();var Y=""+ab.schedulerLocalization.editDialogSubjectString+": "+W+"";if(C){Y+="\n"+ab.schedulerLocalization.editDialogLocationString+": "+C+""}if(y){Y+="\n"+ab.schedulerLocalization.editDialogDescriptionString+": "+y+""}if(T){Y+="\n"+ab.schedulerLocalization.editDialogStatusString+": "+T+""}if(b){Y+="\n"+ab.schedulerLocalization.editDialogRepeatString+": "+b+""}var ar=ab.toTP("jqx-scheduler-agenda-appointment jqx-scheduler-legend-label");if(ab.rtl){var ar=ab.toTP("jqx-scheduler-agenda-appointment-rtl jqx-scheduler-legend-label")}an+=""+W+""}}e+=an;e+="";l+=e}if(N==0){ab.table[0].style.width=m+2+"px";ab.pinnedtable[0].style.width=m+2+"px";N=m}l+="";v+=l}}v+="";ab.table[0].innerHTML=v;ab.pinnedtable[0].innerHTML=v;ab.pinnedtable[0].style.display="none";var ag=a(ab.table[0].firstChild);var V=a(ab.pinnedtable[0].firstChild);ab._table=ag;ab._pinnedtable=V;if(a.jqx.browser.msie&&a.jqx.browser.version<10){ab._table[0].style.width=N+"px";ab._pinnedtable[0].style.width=N+"px"}if(R===0){ab._table[0].style.width=(2+N)+"px";ab._pinnedtable[0].style.width=(2+N)+"px";ab._pinnedtable[0].style.display="none"}ab._pinnedtable[0].style.display="none";ab._table.addClass("jqx-grid-table-one-cell jqx-disableselect");ab.table[0].rows=ab.table[0].firstChild.rows;ab.rowByCell=new Array();ab.columnCells=new Array();function p(){var i={};i.cells=new Array();i.indexOf=function(j){for(var r=0;r0){A.aboveRow=ab.rows[ab.rows.length-1];ab.rows[ab.rows.length-1].belowRow=A}A.element=ak;ab.rows.push(A);var S=false;for(var aq=0;aq=0){var aw=ab.table[0].rows[ac];if(ab.table[0].rows[ac].cells.length==ab.columns.records.length){var P=aw.cells[0];if(!ab.columnCells[A.cells.length]){ab.columnCells[A.cells.length]=new Array()}ab.columnCells[A.cells.length].push(P);if(ab.cellWidth==0){ab.cellWidth=P.clientWidth}if(ab.cellHeight==0&&(L==1||at>1)){ab.cellHeight=P.clientHeight}A.cells.push(P);S=true;break}ac--}}var P=ak.cells[aq];if(P.style.display==="none"){continue}if(P.className.indexOf("jqx-grid-cell-pinned")>=0){continue}if(!ab.columnCells[A.cells.length]){ab.columnCells[A.cells.length]=new Array()}ab.columnCells[A.cells.length].push(P);if(ab.cellWidth==0){ab.cellWidth=P.clientWidth}if(ab.cellHeight==0&&(L==1||at>1)){ab.cellHeight=P.clientHeight}A.cells.push(P);ab.rowByCell[P.getAttribute("data-key")]=A}}if(R===0){ab._table[0].style.tableLayout="auto"}ab._updateScrollbars(ab.host.height());ab._arrange();if(ab.rendered){ab.rendered()}ab.renderedTime=new Date()},_renderrows:function(){var V=this;if(V._loading){return}if(V._updating||V._appupdating){return}if(V.rendering){V.rendering()}var V=this;var aF=V._views[V._view].type;var G=V._views[V._view];if(aF=="agendaView"){V._renderagenda();return}var az=1;var d=V.getViewStart();var aN=a.jqx.scheduler.utilities.getEndOfDay(V.getViewEnd());V._prepareAppointmentsInView(d,aN);var N=new Array();if(aF==="weekView"||aF==="dayView"){var az=V.getMaxAllDayAppointments(V.appointmentsToRender)}else{if(aF==="monthView"&&G.monthRowAutoHeight&&V.rows&&V.rows.length==6){N=V._getMonthAppointmentsPerWeek()}}var aa=V.tableRows>1?V.tableRows:0;var aL="halfHour";var B=null;var aQ;if(G.rowHeight){B=G.rowHeight}if(G&&G.allDayRowHeight){aQ=G.allDayRowHeight}if(G.timeRuler&&G.timeRuler.scale){aL=G.timeRuler.scale}var aM=0;V.table[0].rows=new Array();V.rows=new Array();var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-widget-content");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}var b=V.columns.records.length;var av=V._getColumnsLengthPerView();var W=a.jqx.browser.msie&&a.jqx.browser.version<8;if(W){V.host.attr("hideFocus","true")}V._lastSelectedCell=null;V.focusedCell=null;var E=new Array();var aD=V.source.records;aD=V.dataview.evaluate(aD);V.dataViewRecords=aD;V.cells=new Array();var E=V.dataViewRecords;V.renderedRecords=V.getRows();var aZ=V.tableZIndex;var ai=V.getRows().length;var o=0;var aH=0;if(W){for(var X=0;Xac.maxwidth){aK=ac.maxwidth}var aJ=a('
    ');a(document.body).append(aJ);var at=aJ.find("td");o=1+parseInt(at.css("padding-left"))+parseInt(at.css("padding-right"));aJ.remove();break}}var K=V.rtl?" "+V.toTP("jqx-grid-table-rtl"):"";var H="";var aY=0;var a4=b;var aS=2;var an=30;switch(aL){case"sixtyMinutes":case"hour":an=60;aS=1;break;case"thirtyMinutes":case"halfHour":an=30;aS=2;break;case"fifteenMinutes":case"quarterHour":an=15;aS=4;break;case"tenMinutes":an=10;aS=6;break;case"fiveMinutes":an=5;aS=12;break}var a3=1;if(aF==="timelineDayView"||aF==="timelineWeekView"){b=aS*b;a3=aS;av=b/V.tableColumns}else{if(aF==="timelineMonthView"){av=b/V.tableColumns}else{if(aF==="monthView"){if(G.showWeekNumbers){av=(b-V.tableColumns)/V.tableColumns}else{av=b/V.tableColumns}}}}var g=function(i){var c=V.columns.records[i];if(c){return c}while(i>=V.columns.records.length){i-=V.columns.records.length}var c=V.columns.records[i];return c};for(var X=0;Xac.maxwidth){aK=ac.maxwidth/a3}aK-=o;if(aK<0){aK=0}if(aF=="monthView"&&V.rtl&&ac.timeColumn){aK++}if(W){var P=aK;if(X==aY){P++}H+=""}else{H+=""}aH+=aK}H+="";V._hiddencolumns=false;if(ai===0){var u='';var z=V.host.height();if(V.pageable){z-=V.pagerHeight;if(V.pagerPosition==="both"){z-=V.pagerHeight}}z-=V.columnsHeight;if(V.showLegend&&V._resources.length>0){z-=V.legendHeight}if(z<25){z=25}if(V.hScrollBar[0].style.visibility!="hidden"){z-=V.hScrollBar.outerHeight()}if(V.height==="auto"||V.height===null||V.autoheight){z=300}var aJ='";u+=aJ;H+=u;V.table[0].style.width=aH+2+"px";aM=aH}var au=V.getRows();var d=V.getViewStart();var z=V._hostHeight?V._hostHeight:V.host.height();var a2=0;if(!V.columnGroups){a2+=V.showHeader?V.columnsHeight:0}else{a2+=V.showHeader?V.columnsheader.height():0}if(V.showToolbar){a2+=V.toolbarHeight}if(V.showLegend&&V._resources.length>0){a2+=V.legendHeight}var f=V.showAllDayRow;var m=23;if(G.resourceHeaderRowHeight){m=G.resourcesRowHeight}m+=2;if(G.showAllDayRow!=undefined){f=G.showAllDayRow}var h=V._columnswidth>V._hostWidth;var al=h?(3+V.scrollBarSize):0;var ag=V.tableRows>1?V.resources.unitsInView:1;if(ag==undefined){ag=V._resources.length}if(V.resources&&V.resources.resourceRowHeight){B=V.resources.resourceRowHeight}if(B==null||B=="auto"){var p=V.rowsHeight;var ap=3*p;if(V.isTouchDevice()){p=V.touchRowsHeight;var ap=22+p}if(V.tableRows==1){B=z>0?(z-a2):p;if(V.columns.records.length>10){B=z>0?(z-V.scrollBarSize-5-a2):p}}else{B=z>0?(z-a2-m)/(ai):p;if(V.columns.records.length>10){B=z>0?(z-V.scrollBarSize-5-a2-ag*m)/(ag*ai):p}}if(aF==="dayView"||aF==="weekView"){if(f){if(aQ==null||aQ=="auto"){B=z>0?(z-a2)/(V.tableRows*(ai)):ap;aQ=B}else{B=z>0?(z-a2-aQ-ag*m)/(ag*(ai-1)):p}}}else{if(aF==="monthView"){if(V.hScrollBar[0].style.visibility=="hidden"){al=0}if(V.tableRows==1){B=z>0?(z-a2-al)/ai:p}else{B=z>0?(z-a2-m-al)/(ai):p}}}B=Math.max(p,B);if(!aQ){aQ=ap}aQ=Math.max(ap,aQ);V._allDayRowHeight=aQ;V._defaultRowHeight=p;aQ=az*(p-2);aQ=Math.max(ap,17+aQ);V._allDayRowFullHeight=aQ;if(G.allDayRowHeight){V._allDayRowHeight=G.allDayRowHeight;aQ=az*(G.allDayRowHeight-2);V._allDayRowFullHeight=aQ}}var aB=new Array();if(V.resources&&V.resources.colorScheme){for(var ao=0;aoaB.length-1){var aW=parseInt(V.resources.colorScheme.substring(6));if(aW>=27){aW=0}aB=aB.concat(V.colorSchemes[aW].colors);aW++}}for(var aE=0;aE1){var u='';var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(!W){a5+=" "+V.toTP("jqx-grid-cell-pinned");Z+=' colspan="'+b+'"';var P=0;for(var Q=0;Qab.maxwidth){aK=ab.maxwidth/a3}ak-=o;if(ak<0){ak=0}if(!ab.hidden){P+=ak}}aK=P}else{a5+=" "+V.toTP("jqx-grid-cell-pinned")}var aJ='";u+=aJ;H+=u}for(var Y=0;Y';var ad=0;var x=0;if(ar[0]&&Y>k){var an=30;if(aF!="monthView"){switch(aL){case"sixtyMinutes":case"hour":an=60;break;case"thirtyMinutes":case"halfHour":an=30;break;case"fifteenMinutes":case"quarterHour":an=15;break;case"tenMinutes":an=10;break;case"fiveMinutes":an=5;break}for(var T=0;T=av){ax=0;aU=0;aw=0;if(V.rtl){aw=1}ae++}if(!ar[X]){if(!V.rtl){if(aF.toString().indexOf("timelineDayView")>=0){var I=X;ar[X]=A.addHours(S).addMinutes(I*an,false)}else{if(aF.toString().indexOf("timelineWeekView")>=0){ar[X]=A.addDays(aU).addHours(S,false).addMinutes(aw*an,false)}else{ar[X]=A.addDays(ax).addHours(S,false)}}if(V.timeZone){ar[X].timeZone=V.timeZone}}else{if(aF.toString().indexOf("timelineDayView")>=0){var I=1+X;ar[X]=A.addHours(1+e).addMinutes(-I*an,false)}else{if(aF.toString().indexOf("timelineWeekView")>=0){if(G.showWeekends||G.showWeekends==undefined){ar[X]=A.addDays(6-aU).addHours(1+e,false).addMinutes(-aw*an,false)}else{ar[X]=A.addDays(4-aU).addHours(1+e,false).addMinutes(-aw*an,false)}}else{if(aF=="dayView"||aF=="monthView"||aF=="weekView"){if(G.showWeekends||G.showWeekends==undefined){ar[X]=A.addDays(6-ax).addHours(S,false)}else{ar[X]=A.addDays(4-ax).addHours(S,false)}}else{ar[X]=A.addDays(av-ax-1).addHours(S,false)}}}if(V.timeZone){ar[X].timeZone=V.timeZone}}}aw++;if(aw>=aj){aw=0;aU++}if(!R.timeColumn&&(aF==="dayView"||aF==="weekView")){ax++}else{if(!R.timeColumn&&(aF==="monthView"&&G.showWeekNumbers)){ax++}else{if((aF==="monthView"&&!(G.showWeekNumbers))||aF==="timelineMonthView"){ax++}else{if(aF=="timelineDayView"||aF=="timelineWeekView"){ax++}}}}var C=ar[X];var aK=R.width/a3;if(aKR.maxwidth){aK=R.maxwidth/a3}aK-=o;if(aK<0){aK=0}var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(R.pinned){a5+=" "+V.toTP("jqx-grid-cell-pinned")}if(V.sortcolumn===R.displayfield){a5+=" "+V.toTP("jqx-grid-cell-sort")}if(V.altRows&&Y%2!=0){a5+=" "+V.toTP("jqx-grid-cell-alt")}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")){a5+=" "+V.toTP("jqx-grid-cell-alt")}if(C>V.max||C0){if(N[Y]&&N[Y]!="auto"){if(B0&&V.resources.colorScheme&&V.resources.orientation!=="none"){var aO="";var y="";aO=aB[aE+ae-1];if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){aO=V.hexToRgba(aB[aE+ae-1],0.3).toString()}else{aO=V.shadeColor(aB[aE+ae-1],0.3).toString()}if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){if(aF.indexOf("month")==-1){if(!R.timeColumn){if(G.showWorkTime!==false){var O=1;var J=5;var ay=8;var l=18;if(G.workTime){var O=G.workTime.fromDayOfWeek?G.workTime.fromDayOfWeek:0;var J=G.workTime.toDayOfWeek?G.workTime.toDayOfWeek:0;var ay=G.workTime.fromHour!==undefined?G.workTime.fromHour:8;var l=G.workTime.toHour?G.workTime.toHour:8}if(C.dayOfWeek()>=O&&C.dayOfWeek()<=J){if(C.hour()>=ay&&C.hour()1){var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(C.minute()===0){var aJ='";u+=aJ}if(aM==0){V.table[0].style.width=ad+2+"px";V.pinnedtable[0].style.width=ad+2+"px";aM=ad}u+="";H+=u;if(!V.rowinfo[aI.uid]){V.rowinfo[aI.uid]={row:aI}}else{if(!("row" in V.rowinfo[aI.uid])){V.rowinfo[aI.uid].row=aI}}}}H+="
    ';aJ+=V.schedulerLocalization.emptyDataString;aJ+="
    0&&V.resources.colorScheme&&V.resources.orientation!="none"){var aO="";var y="";var D="";var L=function(i){var c=105;var j=(i.r*0.299)+(i.g*0.587)+(i.b*0.114);var q=(255-j"+aX+"";aJ+="1){var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(Y>0){if(C.minute()===0){var aJ='1){aJ+="background: "+aO+";";aJ+="border-color: "+y+";"}}}else{if(Y>0){var n="border-left-width: 1px;";if(V.rtl&&X==0&&aF=="monthView"&&G.showWeekNumbers){n="border-left-width: 0px;"}aJ+=n}}if(R.cellsalign!="left"){if(R.cellsalign==="right"){a5+=" "+V.toTP("jqx-right-align")}else{a5+=" "+V.toTP("jqx-center-align")}}if(!R.timeColumn){if(V.rowinfo[aI.uid]){if(V.rowinfo[aI.uid].selected){if(V.editKey!==aI.uid){if(V.selectionMode!=="none"){a5+=" "+V.toTP("jqx-grid-cell-selected");a5+=" "+V.toTP("jqx-fill-state-pressed");a5+=" "+V.toTP("jqx-scheduler-cell-selected")}}}}}if(!(R.hidden)){ad+=o+aK;if(x==0&&!V.rtl){aJ+="border-left-width: 0px;"}x++}else{aJ+="display: none;";V._hiddencolumns=true}if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){if(aF.indexOf("month")==-1){a5+=" "+V.toTP("jqx-grid-cell-nowrap");if(Y%2==1&&!R.timeColumn){a5+=" "+V.toTP("jqx-scheduler-middle-cell")}if(!R.timeColumn){if(G.showWorkTime!==false){var O=1;var J=5;var ay=8;var l=18;if(G.workTime){var O=G.workTime.fromDayOfWeek?G.workTime.fromDayOfWeek:0;var J=G.workTime.toDayOfWeek?G.workTime.toDayOfWeek:0;var ay=G.workTime.fromHour!==undefined?G.workTime.fromHour:8;var l=G.workTime.toHour?G.workTime.toHour:8}if(C.dayOfWeek()>=O&&C.dayOfWeek()<=J){if(C.hour()>=ay&&C.hour()16){ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}else{ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}}else{if(B>16){ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}else{ah="
    "+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"
    "}}}else{if(aF==="timelineWeekView"||aF==="timelineDayView"||aF==="timelineMonthView"){a5+=" "+V.toTP("jqx-right-align jqx-bottom-align");ah=""}}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")&&!R.timeColumn){a5+=" "+V.toTP("jqx-top-align");a5+=" "+V.toTP("jqx-scheduler-all-day-cell");if(V.rtl){a5+=" "+V.toTP("jqx-rtl")}ah=C.toDate();ah=""+a.jqx.dataFormat.formatdate(ah,"dd",V.schedulerLocalization)+""}var r=R.cellsFormat;if(R.timeColumn&&!R.hidden){ah=C.toDate();if(R.timeZone){ah=C.clone().toTimeZone(R.timeZone);ah=ah.toDate()}var s="auto";if(G.timeRuler&&G.timeRuler.formatString){r=G.timeRuler.formatString}else{if(!R.timeColumn.format){if(ah.getHours()==0||ah.getHours()==12){r="hh tt"}else{r="hh:mm"}}}if(a.jqx.dataFormat.isDate(ah)){ah=a.jqx.dataFormat.formatdate(ah,r,V.schedulerLocalization)}if(Y0){if(X';aJ+=ah;aJ+="
    ";V.table[0].innerHTML=H;V.pinnedtable[0].innerHTML=H;V.table[0].rows=V.table[0].firstChild.rows;var aR=a.jqx.browser.msie&&a.jqx.browser.version<9;var aP=null;if(f&&(aF==="dayView"||aF==="weekView")&&V.tableRows==1){V.pinnedtable[0].style.display="block";V.pinnedtable[0].style.zIndex="400";V.pinnedtable[0].style.position="absolute";V.pinnedtable[0].style.top="0px";V.pinnedtable[0].style.height=aQ+"px";if(!aR){if(V.tableRows==1){V.oldRow=V.table[0].rows[0];try{V.table[0].rows[0]=V.pinnedtable.find("tr")[0]}catch(aC){}aP=V.pinnedtable.find("tr")[0];V.pinnedTableRow=aP}else{V.oldRow=V.table[0].rows[1];try{V.table[0].rows[1]=V.pinnedtable.find("tr")[1]}catch(aC){}aP=V.pinnedtable.find("tr")[1];V.pinnedTableRow=aP}}}else{V.pinnedtable[0].style.display="none"}var Q=a(V.table[0].firstChild);var aV=a(V.pinnedtable[0].firstChild);V._table=Q;V._pinnedtable=aV;if(a.jqx.browser.msie&&a.jqx.browser.version<10){V._table[0].style.width=aM+"px";V._pinnedtable[0].style.width=aM+"px"}if(ai===0){V._table[0].style.width=(2+aM)+"px";V._pinnedtable[0].style.width=(2+aM)+"px"}V._table.addClass("jqx-grid-table-one-cell jqx-disableselect");V._pinnedtable.addClass("jqx-grid-table-one-cell jqx-disableselect");V.rowByCell=new Array();V.columnCells=new Array();function F(){var c={};c.cells=new Array();c.indexOf=function(j){for(var q=0;q0){aI.aboveRow=V.rows[V.rows.length-1];V.rows[V.rows.length-1].belowRow=aI}aI.element=v;V.rows.push(aI);for(var X=0;X=0){continue}if(!V.columnCells[aI.cells.length]){V.columnCells[aI.cells.length]=new Array()}V.columnCells[aI.cells.length].push(M);if(V.cellWidth==0){V.cellWidth=M.clientWidth}if(V.cellHeight==0&&(U==1||Y>1)){V.cellHeight=M.clientHeight}if(V._views[V._view].type=="monthView"){if(aI.top==undefined){aI.top=parseInt(a(M).position().top)}}aI.cells.push(M);V.rowByCell[M.getAttribute("data-key")]=aI}}if(ai===0){V._table[0].style.tableLayout="auto"}V._renderAppointments(d,aN);if(V.pinnedtable[0].style.display!="none"||((aF=="dayView"||aF=="weekView")&&V.tableRows>1)){V._updateScrollbars(V.host.height())}if(aF==="monthView"&&G.monthRowAutoHeight){if(N.length==0){V._renderrows()}else{V._updateScrollbars(V.host.height())}}if(V.rendered){V.rendered()}V.renderedTime=new Date()},showAppointmentsByResource:function(f){var e=this;for(var d=0;d0){this.tabKeyAppointments.sort(function(j,i){return h._sortAppointmentsByResourceId(j,i,h)})}else{this.tabKeyAppointments.sort(this._sortAppointmentsByFrom)}this.appointmentsToRender=b},_renderDayWeekAppointments:function(){var N=this;var ab=N._views[N._view].type;var M=N._views[N._view];var A=new Array();var K=new Array();var Z=this.rows;var E=N.showAllDayRow;var ad=N.getMinutesPerScale();if(M.timeRuler&&M.timeRuler.showAllDayRow!=undefined){E=M.timeRuler.showAllDayRow}for(var f=0;fi.date){return 1}};if(!s.allDay&&s.duration().days()<1||!E){var q=ae.toDate();var I=false;if(q.getHours()==0&&q.getMinutes()==0){I=true}for(var X=0;Xae){continue}if((B<=m&&m=m&&H>=k)){if(h!=-1){if((1+h)!=w[W].getAttribute("data-view")){continue}}if(D!=Y.getDate()){G.sort(af);r.push(G);G=new Array();D=u.addDays(1).day()}G.push({cell:w[W],date:Y})}}}G.sort(af);r.push(G);var C=new Array();for(var X=0;X1){var U=Z.length/N.tableRows;var b=h*U;w=Z[b].cells}for(var W=0;WV){continue}if(u<=Y&&Y<=V){if(h!=-1){if((1+h)!=w[W].getAttribute("data-view")){continue}}if(G.length==0){Y=a.jqx.scheduler.utilities.getStartOfDay(Y)}G.push({cell:w[W],date:Y})}}G.sort(af);r.push(G);var C=new Array();for(var X=0;X=0){for(var aj=s;ajc){an=c}Y.rowsCount=an}}}}for(var am=0;amag){L=0}z.timewidth-=K;if(L>0){z.timewidth-=ac.cellWidth;z.timewidth+=L}if(ab.appointmentsRenderMode=="exactTime"){z.width=z.timewidth;z.x+=K}}else{var K=parseFloat(ac.cellWidth/24)*(z.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.to.minute()/30);var L=(parseFloat(ac.cellWidth/24)*(z.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.from.minute()/30));if(K>0){K=ac.cellWidth-K}if(z.appointment.fromag){K=0}if(ab.appointmentsRenderMode=="exactTime"){z.x+=K;z.width-=K;z.width-=L}if(z.appointment.duration().days()<1){if(z.width<15){z.width=15}}z.timewidth=z.width;if(ab.appointmentsRenderMode=="exactTimeStatus"){z.timewidth-=K;z.timewidth-=L}z.timex=K}}}for(var ae=0;ae0){t=", "+t}if(!aa){aa=ah.background}if(!X){X=ah.border}if(!M){M=ah.color}var b=ak.appointment.isRecurrentAppointment();var r=ak.appointment.isException();var g=u+"-"+v;if(e){u="";v=""}var ao="";var w=ac.toTP("jqx-scheduler-appointment-status");var S="";var R=ac.statuses[ak.appointment.status];var k=false;if(R){if(R=="transparent"){k=false}else{S="
    ";if(R=="tentative"){w=ac.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}k=true}}var E=ac.toTP("jqx-scheduler-appointment-duration-status");var al="
    ";if(e){al=""}var G="";if(ab.appointmentsRenderMode!="exactTimeStatus"){al=""}if(ac.rtl){var w=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");S="
    ";if(R=="tentative"){w=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}G=S;S=""}var W="";var Q=T+t;if(!e){Q=T+t+al}if(ac.renderAppointment){var au=ac.renderAppointment({appointment:ak.appointment.boundAppointment,textColor:M,background:aa,borderColor:X,html:Q,cssClass:"",style:"",width:ak.width,height:ak.height,view:ac._views[ac._view].type});if(au){var N=au.html;if(N!=Q){Q=N}M=au.textColor;aa=au.background;X=au.borderColor;if(au.cssClass){W=au.cssClass+" "}if(au.style!=""){var ah=ac.getAppointmentColors(au.style);aa=ah.background;X=ah.border;M=ah.color}}}if(ao===""){if(k){var ao="
    "+S+"
    "+Q+"
    "+G+"
    "}else{var ao="
    "+Q+"
    "}}var at="";if(ac.rtl){at=ac.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(r){var h=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-exception-white"):ac.toTP("jqx-icon-recurrence-exception");N="
    "+ao+"
    "}else{if(b){var q=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-white"):ac.toTP("jqx-icon-recurrence");N="
    "+ao+"
    "}else{N="
    "+ao+"
    "}}var V=a(N);if(this.tableRows==1){V.appendTo(this.pinnedtable)}else{V.appendTo(this.table)}ak.element=V;if(this.appointmentTooltips){if(!ak.appointment.tooltip){var Z=ak.appointment.subject;if(u){Z=u+" - "+v+" "+Z}if(Z){var t=ak.appointment.location;if(t){Z+="\n"+t}V[0].setAttribute("title",Z)}}else{V[0].setAttribute("title",ak.appointment.tooltip)}}}},_renderAppointmentsInDay:function(an,am){if(an.length==0){return}var Z=this;var Y=this._views[this._view];var B=an;var C=this.getViewStart();var ac=this.getViewEnd();var ai=1;var o=0;if(Y.timeRuler){o=this.columns.records[1].width;if(Y.timeRuler.timeZones){o=this.columns.records[1+Y.timeRuler.timeZones.length].width}}else{o=this.columns.records[1].width}ai=this.getMaxColumnsInADay(an);var n=o/ai;if(n<0){return}for(var al=0;al=0){for(var ag=t;agc){g=c}V.columnsCount=g}}}}for(var aj=0;aj
    ";if(O=="tentative"){y=Z.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");P="
    "}l=true}}var F="";if(Z.rtl){var y=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");P="
    ";if(O=="tentative"){y=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");P="
    "}F=P;P=""}var T="";var N=Q+"
    "+u;if(!u){var N=Q}if(Z.renderAppointment){var aq=Z.renderAppointment({appointment:ah.appointment.boundAppointment,textColor:I,background:X,borderColor:U,html:N,cssClass:"",style:"",width:ah.width,height:ah.height,view:Z._views[Z._view].type});if(aq){var K=aq.html;if(K!=N){N=K}I=aq.textColor;X=aq.background;U=aq.borderColor;if(aq.cssClass){T=aq.cssClass+" "}if(aq.style!=""){var ad=Z.getAppointmentColors(aq.style);X=ad.background;U=ad.border;I=ad.color}}}if(ak===""){if(l){var ak="
    "+P+"
    "+N+"
    "+F+"
    "}else{var ak="
    "+N+"
    "}}var ao="";if(Z.rtl){ao=Z.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(s){var h=I.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-exception-white"):Z.toTP("jqx-icon-recurrence-exception");K="
    "+ak+"
    "}else{if(b){var r=I.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-white"):Z.toTP("jqx-icon-recurrence");K="
    "+ak+"
    "}else{K="
    "+ak+"
    "}}var S=a(K);S.appendTo(this.table);ah.element=S;if(this.appointmentTooltips){if(!ah.appointment.tooltip){var W=ah.appointment.subject;if(W){var u=ah.appointment.location;if(u){W+="\n"+u}S[0].setAttribute("title",W)}}else{S[0].setAttribute("title",ah.appointment.tooltip)}}}},getCollisionAppointments:function(b,f){var j=new Array();var g=b.from;var h=b.to;for(var d=0;di.date){return 1}};var q=E.rows[0];var m=o.resourceId;var f=E._resources.indexOf(m);if(E._resources.length>0){if(E.resources.orientation!=="horizontal"){if(f>=1){q=E.rows[f]}}}if(E.resources&&E.resources.orientation=="none"){f=-1;var q=E.rows[0]}var s=q.cells;for(var M=0;MS){continue}if((v<=h&&h=h&&v<=B&&g<=B)){if(f!=-1){if((1+f)!=s[M].getAttribute("data-view")){continue}}A.push({cell:s[M],date:O});q=N}}A.sort(T);var w=new Array();var s=A;if(s.length==0){continue}var l=E.appointmentsMinHeight;if(E.isTouchDevice()){l=E.touchAppointmentsMinHeight}if(D.appointmentHeight){l=D.appointmentHeight}var H=a(s[0].cell).position();var c=l;var b=a(s[s.length-1].cell).position().left-H.left+K;var G=H.left;var F=H.top;if(E.rtl){var H=a(s[s.length-1].cell).position();var b=a(s[0].cell).position().left-H.left+K;var G=H.left;var F=H.top}var n=new a.jqx.date(s[s.length-1].date,E.timeZone).addMinutes(J);if(Q==="timelineMonthView"){var n=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(s[s.length-1].date,E.timeZone))}var R={cellX:G,cellY:F,cellHeight:L,cells:s,x:G,y:F,height:c,width:b,appointment:o,from:new a.jqx.date(s[0].date,E.timeZone),to:n};if(D.appointmentsRenderMode==="exactTime"){R.from=o.from;R.to=o.to}w.push(R);u.push(R);o.elements=w;if(o.rootAppointment){o.rootAppointment.elements=o.rootAppointment.elements.concat(o.elements)}}if(this._resources.length<2||this.resources.orientation=="none"){this._renderUITimelineAppointments(u,t,I)}else{for(var M=0;M=0){for(var aj=t;ajc){al=c}U.rowsCount=al}}}}for(var ak=0;akY.cellWidth){var D=Y.cellWidth-F-15;g.x+=D}}}}}else{var F=parseFloat(Y.cellWidth/24)*(g.appointment.to.hour())+parseFloat(Y.cellWidth/48)*(g.appointment.to.minute()/30);var G=(parseFloat(Y.cellWidth/24)*(g.appointment.from.hour())+parseFloat(Y.cellWidth/48)*(g.appointment.from.minute()/30));if(F>0){F=Y.cellWidth-F}if(X.appointmentsRenderMode=="exactTime"){g.x+=F;g.width-=F;g.width-=G}if(g.appointment.duration().days()<1){if(g.width<15){g.width=15}}g.timewidth=g.width;g.timex=F}}}else{if(X.appointmentsRenderMode){if(X.appointmentsRenderMode=="exactTime"){var ae=Y.getMinutesPerScale();if(g.appointment.from.minute()%ae!=0){var au=g.appointment.from.minute()%ae;var F=parseFloat(Y.cellWidth/ae)*au;if(Y.rtl){var F=parseFloat(Y.cellWidth/ae)*au}}else{var F=0}if(g.appointment.to.minute()%ae!=0){var au=g.appointment.to.minute()%ae;var G=Y.cellWidth-parseFloat(Y.cellWidth/ae)*au;if(Y.rtl){var G=Y.cellWidth-parseFloat(Y.cellWidth/ae)*au}}else{G=0}if(!Y.rtl){g.x+=F;g.width-=F;g.width-=G}else{g.x+=G;g.width-=F;g.width-=G}}}}}var ah="";for(var aa=0;aa1){u=", "+u}var H=ai.appointment.color;var k=ai.appointment.resourceId;var ad=Y.getColors(Y._resources.indexOf(k));var af=" data-resourceId='"+k+"' ";var S=ai.appointment.borderColor;if(!W){W=ad.background}if(!S){S=ad.border}if(!H){H=ad.color}var b=ai.appointment.isRecurrentAppointment();var s=ai.appointment.isException();var am="";var v=Y.toTP("jqx-scheduler-appointment-status");var N="";var M=Y.statuses[ai.appointment.status];var l=false;if(M){if(M=="transparent"){l=false}else{N="
    ";if(M=="tentative"){v=Y.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");N="
    "}l=true}}var A="";if(Y.rtl){var v=Y.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");N="
    ";if(M=="tentative"){v=Y.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");N="
    "}A=N;N=""}var R="";var L=O+"
    "+u;if(Y.renderAppointment){var ar=Y.renderAppointment({appointment:ai.appointment.boundAppointment,textColor:H,background:W,borderColor:S,html:L,cssClass:"",style:"",width:ai.width,height:ai.height,view:Y._views[Y._view].type});if(ar){var I=ar.html;if(I!=L){L=I}H=ar.textColor;W=ar.background;S=ar.borderColor;if(ar.cssClass){R=ar.cssClass+" "}if(ar.style!=""){var ad=Y.getAppointmentColors(ar.style);W=ad.background;S=ad.border;H=ad.color}}}if(am===""){if(l){var am="
    "+N+"
    "+L+"
    "+A+"
    "}else{var am="
    "+L+"
    "}}var aq="";if(Y.rtl){aq=Y.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(s){var i=H.toLowerCase()=="white"?Y.toTP("jqx-icon-recurrence-exception-white"):Y.toTP("jqx-icon-recurrence-exception");I="
    "+am+"
    "}else{if(b){var r=H.toLowerCase()=="white"?Y.toTP("jqx-icon-recurrence-white"):Y.toTP("jqx-icon-recurrence");I="
    "+am+"
    "}else{I="
    "+am+"
    "}}ah=I;var Q=a(I);Q.appendTo(this.table);ai.element=Q;if(this.appointmentTooltips){if(!ai.appointment.tooltip){var V=ai.appointment.subject;if(V){var u=ai.appointment.location;if(u){V+="\n"+u}Q[0].setAttribute("title",V)}}else{Q[0].setAttribute("title",ai.appointment.tooltip)}}}var ag=Y.table.find(".jqx-scheduler-appointment");var B=function(m){for(var j=0;j=aw+j-12){Q[0].style.visibility="hidden";var x=m.find(".jqx-icon-arrow-down");if(x.length>0){x[0].style.display="block";x[0].mousedown=function(){if(Y.openedMonthCellPopup){Y.openedMonthCellPopup.remove()}var ax=a("
    ");var aA=new a.jqx.date(m.attr("data-date"),Y.timeZone);var aD=a("
    ");aD.height(16);aD.find("span")[0].mousedown=function(){ax.remove()};aD.addClass(Y.toTP("jqx-widget-header"));ax.addClass(Y.toTP("jqx-widget"));ax.addClass(Y.toTP("jqx-window"));ax.addClass(Y.toTP("jqx-scheduler-month-cell-popup"));ax.addClass(Y.toTP("jqx-popup"));var aE=a("
    ");ax.append(aD);ax.append(aE);aE.addClass(Y.toTP("jqx-widget-content"));var ay=m.width();var aG=21;for(var aB=0;aB0){O=a(this.host.find(".jqx-scheduler-month-cell")[0]).height()}for(var e=0;ei.date){return 1}};var u=-1;var o=r.resourceId;var h=K._resources.indexOf(o);if(K.resources&&K.resources.orientation=="none"){h=-1}for(var Q=0;QW){continue}w[P].appointments=new Array();if(h!=-1){if((1+h)!=w[P].getAttribute("data-view")){continue}}if(B<=l&&l0){this._renderUIMonthAppointments(T[Q])}}}else{for(var P=0;P0){this._renderUIMonthAppointments(T[Q])}}}}},_getMonthAppointmentsPerWeek:function(){var M=this;var W=M._views[M._view].type;var L=M._views[M._view];var C=new Array();var U=this.rows;var Q=0;if(this.host.find(".jqx-scheduler-month-cell").length>0){Q=a(this.host.find(".jqx-scheduler-month-cell")[0]).height()}if(!M.rows){return new Array()}var B=this.getViewStart();var P=this.getViewEnd();for(var e=0;ei.date){return 1}};var v=-1;var p=s.resourceId;var k=M._resources.indexOf(p);if(M.resources&&M.resources.orientation=="none"){k=-1}for(var S=0;SY){continue}if(k!=-1){if((1+k)!=A[R].getAttribute("data-view")){continue}}if(D<=m&&m0){var w=this.getMaxMonthAppointments(V[S]);var o=M.appointmentsMinHeight;if(M.isTouchDevice()){o=M.touchAppointmentsMinHeight}if(L.appointmentHeight){o=L.appointmentHeight}f.push((w*(o+3))+22)}else{f.push("auto")}}return f}else{var f=new Array();for(var R=0;R0){var w=this.getMaxMonthAppointments(V[S]);f.push((w*(o+3))+22)}else{f.push("auto")}}return f}}},_renderUIMonthAppointments:function(ar){var ab=this._views[this._view];var I=ar;var B=this.getViewStart();var ah=this.getViewEnd();var G=1;var ac=this;G=this.getMaxMonthAppointments(ar);var i=ac.appointmentsMinHeight;if(ac.isTouchDevice()){i=ac.touchAppointmentsMinHeight}if(ab.appointmentHeight){i=ab.appointmentHeight}var f=this._sortAppointmentsByFrom;if(this.rtl){f=this._sortAppointmentsByTo}for(var aq=0;aq=0){for(var ak=u;akc){ao=c}Y.rowsCount=ao}}}}for(var an=0;an1){if(h.appointment.elements[0]!=h){K=0}}var L=parseFloat(ac.cellWidth/24)*(h.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.to.minute()/30);if(h.appointment.elements.length>1){if(h.appointment.elements[h.appointment.elements.length-1]!=h){L=0}}h.timewidth-=K;if(L>0){h.timewidth-=ac.cellWidth;h.timewidth+=L}if(ab.appointmentsRenderMode=="exactTime"){if(h.from.clearTime().toString()==h.appointment.from.clearTime().toString()){h.x+=K}h.width=h.timewidth;if(h.appointment.duration().days()<1){if(h.width<15){h.width=15;if(K+15>ac.cellWidth){var H=ac.cellWidth-K-15;h.x+=H}}}}}else{var K=parseFloat(ac.cellWidth/24)*(h.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.to.minute()/30);var L=parseFloat(ac.cellWidth/24)*(h.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.from.minute()/30);if(h.appointment.elements.length>1){if(h==h.appointment.elements[0]){if(L>0){if(ab.appointmentsRenderMode=="exactTime"){h.width-=(ac.cellWidth-K);h.width-=L}else{h.timewidth=h.width-ac.cellWidth+K-L}}else{h.timewidth=h.width;h.timex=0}}else{if(h==h.appointment.elements[h.appointment.elements.length-1]){if(ab.appointmentsRenderMode=="exactTime"){h.x+=ac.cellWidth;h.x-=K;h.width+=K;h.width-=ac.cellWidth}h.timewidth=h.width-ac.cellWidth+K;h.timex=ac.cellWidth-K}}}else{if(ab.appointmentsRenderMode=="exactTime"){h.x+=ac.cellWidth;h.x-=K;h.width-=(ac.cellWidth-K);h.width-=L}if(h.appointment.duration().days()<1){if(h.width<15){h.width=15}}h.timewidth=h.width-ac.cellWidth+K-L;h.timex=ac.cellWidth-K}}}}for(var ae=0;ae1){v=", "+v}if(!aa){aa=ai.background}if(!X){X=ai.border}if(!M){M=ai.color}var b=al.appointment.isRecurrentAppointment();var t=al.appointment.isException();var ap="";var z=ac.toTP("jqx-scheduler-appointment-status");var S="";var R=ac.statuses[al.appointment.status];var n=false;if(R){if(R=="transparent"){n=false}else{S="
    ";if(R=="tentative"){z=ac.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}n=true}}var D=ac.toTP("jqx-scheduler-appointment-duration-status");var am="
    ";if(e){am=""}if(ab.appointmentsRenderMode!="exactTimeStatus"){am=""}var F="";if(ac.rtl){var z=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");S="
    ";if(R=="tentative"){z=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="
    "}F=S;S=""}var W="";var Q=T+v;if(!e){Q=T+v+am}if(ac.renderAppointment){var au=ac.renderAppointment({appointment:al.appointment.boundAppointment,textColor:M,background:aa,borderColor:X,html:Q,cssClass:"",style:"",width:al.width,height:al.height,view:ac._views[ac._view].type});if(au){var N=au.html;if(N!=Q){Q=N}M=au.textColor;aa=au.background;X=au.borderColor;if(au.cssClass){W=au.cssClass+" "}if(au.style!=""){var ai=ac.getAppointmentColors(au.style);aa=ai.background;X=ai.border;M=ai.color}}}if(ap===""){if(n){var ap="
    "+S+"
    "+Q+"
    "+F+"
    "}else{var ap="
    "+Q+"
    "}}var at="";if(ac.rtl){at=ac.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(t){var k=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-exception-white"):ac.toTP("jqx-icon-recurrence-exception");N="
    "+ap+"
    "}else{if(b){var s=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-white"):ac.toTP("jqx-icon-recurrence");N="
    "+ap+"
    "}else{N="
    "+ap+"
    "}}var V=a(N);V.appendTo(this.table);al.element=V;if(this.appointmentTooltips){if(!al.appointment.tooltip){var Z=al.appointment.subject;if(w&&!e){Z=w+" - "+y+" "+Z}if(Z){var v=al.appointment.location;if(v){Z+="\n"+v}V[0].setAttribute("title",Z)}}else{V[0].setAttribute("title",al.appointment.tooltip)}}var af=false;a.each(al.cells,function(){var m=a(this.cell);var j=m.position();if(!m[0].appointments){m[0].appointments=new Array()}m[0].appointments.push({ui:V,appointment:al});if(al.y+al.height+2>=j.top+m.height()){V.css("visibility","hidden");var p=m.find(".jqx-icon-arrow-down");p.show();if(p[0]){p[0].mousedown=function(){if(ac.openedMonthCellPopup){ac.openedMonthCellPopup.remove()}var aw=a("
    ");var aB=m.find("div").clone(true);aB.find("span").removeClass().addClass(ac.toTP("jqx-icon-close"));aB.find("span")[0].mousedown=function(){aw.remove()};aB.addClass(ac.toTP("jqx-widget-header"));aw.addClass(ac.toTP("jqx-widget"));aw.addClass(ac.toTP("jqx-window"));aw.addClass(ac.toTP("jqx-scheduler-month-cell-popup"));aw.addClass(ac.toTP("jqx-popup"));var az=a("
    ");aw.append(aB);aw.append(az);az.addClass(ac.toTP("jqx-widget-content jqx-disableselect"));var ay=m.width();var x=5+m.find("div").outerHeight();for(var ax=0;axc){return 1}if(d==c){return 0}},_sortAppointmentsByFrom:function(b,f){if(b.from.equals(f.from)){var d=b.to-b.from;var e=d*10000;var d=f.to-f.from;var c=d*10000;if(e>c){return -1}}if(b.fromf.from){return 1}if(b.from==f.from){return 0}},_sortAppointmentsByTo:function(b,f){if(b.to.equals(f.to)){var d=b.to-b.from;var e=d*10000;var d=f.to-f.from;var c=d*10000;if(e>c){return -1}}if(b.tof.to){return 1}if(b.to==f.to){return 0}},_sortAppointmentsByResourceId:function(b,f,e){var d=e._resources.indexOf(b.resourceId);var c=e._resources.indexOf(f.resourceId);if(d==c){return 0}if(dc){return -1}},isBusyRow:function(e,d){for(var c=0;c=1){var o=i.from;var j=i.to;var w=a.jqx.scheduler.utilities.rangeIntersection(t,u,o,j);if(w){x++}}}y=Math.max(x,y);s=s.addDays(1,false)}return y};if(this._resources.length<2||(!this.resources.orientation||this.resources.orientation=="none")){var m=n(e)}else{var k=1;for(var c=0;c0){j-=parseInt(this.scrollBarSize)+6;if(this.rtl){j+=3}b=j}var i="";if(this.columns==undefined||this.columns.records==undefined){return}var h=this;var g=false;var k=new Array();a.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=h.vScrollBar[0].style.visibility=="hidden"?0:h.scrollBarSize+5;if(h.scrollBarSize==0){n=0}m=parseFloat(this.width)*b/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(b)/100}if(mthis.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}j-=Math.round(m)}else{if(this.width!="auto"&&!this._width){j-=this.width}else{i+=this.text}}if(this._width=="auto"){k[k.length]=this}}});var e=this.columnsheader.find("#columntable"+this.element.id);if(e.length==0){return}var c=0;var f=e.find(".jqx-grid-column-header");var d=0;a.each(this.columns.records,function(o,t){var m=this.element;var w=false;var v=this.width;var q=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){v=parseFloat(this._percentagewidth)*b/100}else{v=parseFloat(this.width)*b/100}v=Math.round(v);w=true}if(this.width!="auto"&&!this._width&&!w){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(w){if(vthis.maxwidth&&this.maxwidth!="auto"){v=this.maxwidth;this.width=v}if(parseInt(m[0].style.width)!=v){m.width(v);this.width=v}}else{var n=h.columns.records.length;var p=h._views[h._view].type;if(p==="dayView"||p==="weekView"){var r=h._views[h._view];if(r.timeRuler){if(r.timeRuler.timeZones){n-=r.timeRuler.timeZones.length}n--}else{n--}}else{if(p==="monthView"&&h._views[h._view].showWeekNumbers){n--}}var l=Math.floor(j*(1/n));if(h.resources&&h.resources.resourceColumnWidth&&h.resources.resourceColumnWidth!="auto"){l=h.resources.resourceColumnWidth}else{if(h.resources&&h.resources.resourceColumnWidth&&h.resources.resourceColumnWidth=="auto"){if(h.resources.orientation=="horizontal"){l=Math.round((2+j)*(1/h._getColumnsLengthPerView()))}}}var s=(j*(1/n))-l;c+=s;if(c>=1){c-=1;l++}if(c>=0.5&&o==h.columns.records.length-1){l++}if(p=="agendaView"){l=j/k.length;l++}if(l<0){var u=a(""+this.text+"");a(document.body).append(u);l=10+u.width();u.remove()}if(lthis.maxwidth){l=this.maxwidth}this._width="auto";this.width=parseInt(l);m.width(this.width)}}if(parseInt(m[0].style.left)!=d){m.css("left",d)}if(!(this.hidden)){d+=this.width}this._requirewidthupdate=true;if(q!==this.width){g=true}});this.columnsheader.width(2+d);e.width(this.columnsheader.width());this._resizecolumnGroups();if(g){this._renderrows();h._arrange()}},_rendercolumnheaders:function(){var g=this;if(this._updating){return}var l=this._views[this._view];this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var h=a('
    ');h[0].cells=new Array();var r=0;var d=0;var n="";var p=this._hostWidth;if(!p){this._hostWidth=this.host.width()}var v=this._hostWidth;var m=v;var w=this.getRows().length;var u=this.rowsHeight;if(this.isTouchDevice()){u=this.touchRowsHeight}if(w*u>this.host.height()){this.vScrollBar[0].style.visibility="inherit"}if(this.vScrollBar.css("visibility")!=="hidden"&&this.scrollBarSize>0){v-=parseInt(this.scrollBarSize)+6;if(this.rtl){v+=3}m=v}var q=new Array();var s=new Array();a.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.widththis.maxwidth&&this.maxwidth!="auto"){v-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*m/100;if(kthis.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}v-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}v-=this.width}}}}else{n+=this.text}}if(this.width==null||this.width=="auto"){s[s.length]=this}q[q.length]=this});if(this.rtl){for(var t=0;tthis.maxwidth&&this.maxwidth!="auto"){K=this.maxwidth}z[0].style.width=parseInt(K)+"px"}else{if(L){if(Kthis.maxwidth&&this.maxwidth!="auto"){K=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}z.width(K);this.width=K}else{var A=g.columns.records.length;var C=g._views[g._view].type;if(C==="dayView"||C==="weekView"){var G=g._views[g._view];if(G.timeRuler){if(G.timeRuler.timeZones){A-=G.timeRuler.timeZones.length}A--}else{A--}}else{if(C==="monthView"&&g._views[g._view].showWeekNumbers){A--}}var j=Math.floor(v*(1/A));if(g.resources&&g.resources.resourceColumnWidth&&g.resources.resourceColumnWidth!="auto"){j=g.resources.resourceColumnWidth}else{if(g.resources&&g.resources.resourceColumnWidth&&g.resources.resourceColumnWidth=="auto"){if(g.resources.orientation=="horizontal"){j=Math.round((2+v)*(1/g._getColumnsLengthPerView()))}}}var H=(v*(1/A))-j;o+=H;if(o>=1){o-=1;j++}if(o>=0.5&&D==g.columns.records.length-1){j++}if(isNaN(j)){j=this.minwidth}if(C=="agendaView"){j=v/s.length;j++}if(j<0){var J=a(""+this.text+"");a(document.body).append(J);j=10+J.width();J.remove()}if(jthis.maxwidth){j=this.maxwidth}this._width="auto";this.width=parseInt(j);K=this.width;z.width(this.width)}}if(this.timeColumn){z.css("border-bottom-color","transparent");if(l.timeRuler&&l.timeRuler.timeZones){if(D0){this.columnsheader[0].style.width=2+d+"px"}else{this.columnsheader[0].style.width=d+"px"}this._columnswidth=d;this.columnsrow=h;g.columnsheader.append(h);h[0].style.width=d+"px";if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var r=this.headerZIndex+this.columns.records.length;var m=this;var f=m.toTP("jqx-grid-column-header")+" "+m.toTP("jqx-grid-columngroup-header")+" "+m.toTP("jqx-widget-header");if(m.rtl){f+=" "+m.toTP("jqx-grid-columngroup-header-rtl")}var d=this.columnsheader.find("#columntable"+this.element.id);d.find("jqx-grid-columngroup-header").remove();for(var g=0;g
    ');var h=a(this._rendercolumnheader(o.text,o.align,this.columnsHeight,this));if(o.renderer){o.renderer(e,o.text)}e.append(h);e[0].style.left=c+"px";if(c===0){e[0].style.borderLeftColor="transparent"}e[0].style.top=n+"px";e[0].style.height=p+"px";e[0].style.width=-1+o.width+"px";d.append(e);o.element=e}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var c=0;c0){c.removeHandler(b,"mouseenter");c.removeHandler(b,"mouseleave");var d=a(e.filtericon);c.removeHandler(d,"mousedown");c.removeHandler(d,"click");c.removeHandler(b,"click")}},destroy:function(){var b=this;b._removeHandlers();if(b._editDialog){b._editDialog.jqxWindow("destroy")}if(b.menu){b.menu.jqxMenu("destroy")}if(b.editRecurrenceDialog){b.editRecurrenceDialog.jqxWindow("destroy")}b.vScrollBar.jqxScrollBar("destroy");b.hScrollBar.jqxScrollBar("destroy");delete b.vScrollBar;delete b.hScrollBar;delete b._mousewheelfunc;a.jqx.utilities.resize(b.host,null,true);b.host.remove()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d.host.height(d.height);d.host.width(d.width);d._updatesize(false,true)}},propertyChangedHandler:function(b,d,f,e){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(e!==f){if(d=="filterable"){b._render()}else{if(d=="view"){b.setView(e)}else{if(d=="views"){b._columns=null;b._views=new Array();b._view=b.view;for(var c=0;c'+g+"
    ";if(this.columnRenderer){var b=this.columnRenderer(g,h,d,c);if(b!=undefined){return b}}return c}})})(jqxBaseFramework); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxscrollbar.js --- a/www/jqwidgets/jqxscrollbar.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxscrollbar.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxscrollview.js --- a/www/jqwidgets/jqxscrollview.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxscrollview.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxslider.js --- a/www/jqwidgets/jqxslider.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxslider.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxsortable.js --- a/www/jqwidgets/jqxsortable.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxsortable.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxsplitter.js --- a/www/jqwidgets/jqxsplitter.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxsplitter.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxswitchbutton.js --- a/www/jqwidgets/jqxswitchbutton.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxswitchbutton.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtabs.js --- a/www/jqwidgets/jqxtabs.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtabs.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(a){a.jqx.jqxWidget("jqxTabs","",{});a.extend(a.jqx._jqxTabs.prototype,{defineInstance:function(){var b={scrollAnimationDuration:200,enabledHover:true,disabled:false,collapsible:false,animationType:"none",enableScrollAnimation:true,contentTransitionDuration:450,toggleMode:"click",selectedItem:0,height:"auto",width:"auto",position:"top",selectionTracker:false,scrollable:true,scrollPosition:"right",scrollStep:70,autoHeight:true,headerHeight:null,showCloseButtons:false,canCloseAllTabs:true,closeButtonSize:16,arrowButtonSize:16,keyboardNavigation:true,reorder:false,selectionTrackerAnimationDuration:300,_isTouchDevice:false,roundedCorners:true,_headerExpandingBalance:0,_dragStarted:false,_tabCaptured:false,_lastUnorderedListPosition:0,_selectedItem:0,_titleList:[],_contentList:[],_contentWrapper:null,_unorderedList:null,_scrollTimeout:null,isCollapsed:false,touchMode:false,initTabContent:null,enableDropAnimation:false,_currentEvent:null,_needScroll:true,_isAnimated:{},_events:["created","selected","add","removed","enabled","disabled","selecting","unselecting","unselected","dragStart","dragEnd","locked","unlocked","collapsed","expanded","tabclick"],_initTabContentList:[],_invalidArgumentExceptions:{invalidScrollAnimationDuration:"The scroll animation duration is not valid!",invalidWidth:"Width you've entered is invalid!",invalidHeight:"Height you've entered is invalid!",invalidAnimationType:"You've entered invalid animation type!",invalidcontentTransitionDuration:"You've entered invalid value for contentTransitionDuration!",invalidToggleMode:"You've entered invalid value for toggleMode!",invalidPosition:"You've entered invalid position!",invalidScrollPosition:"You've entered invalid scroll position!",invalidScrollStep:"You've entered invalid scroll step!",invalidStructure:"Invalid structure!",invalidArrowSize:"Invalid scroll button size!",invalidCloseSize:"Invalid close button size!"},aria:{"aria-disabled":{name:"disabled",type:"boolean"}},rtl:false};if(this===a.jqx._jqxTabs.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._IE8=a.jqx.browser.msie&&a.jqx.browser.version<9;a.jqx.aria(this);this.element.className+=" "+this.toThemeProperty("jqx-tabs jqx-widget jqx-widget-content");this.element.setAttribute("role","tablist");var e=this.host.children();for(var b=0;b0&&f._contentList[f.selectedItem]){a(f._contentList[f.selectedItem]).trigger(j)}},50+f.selectionTrackerAnimationDuration)}else{var d=new a.Event("loadContent");if(!f._initTabContentList[f.selectedItem]){if(f.initTabContent){f.initTabContent(f.selectedItem);f._initTabContentList[f.selectedItem]=true}}d.owner=this;var h=new a.Event("resize");this.host.trigger(h)}}}catch(c){if(c&&console){console.log(c)}}return b},_getArrowsDisplacement:function(){if(!this._needScroll){return 0}var d;var c=this.arrowButtonSize;var b=this.arrowButtonSize;if(this.scrollPosition==="left"){d=c+b}else{if(this.scrollPosition==="both"){d=c}else{d=0}}return d},_scrollRight:function(e){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var f=parseInt(this._width(this._unorderedList)+parseInt(this._unorderedListHelper.css("margin-left"),10),10),h=this._width(this.element),g,i,b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),d=0,j;if(this.scrollable){g=this._leftArrow.offsetWidth;i=this._rightArrow.offsetWidth}else{g=0;i=0}e=(this.enableScrollAnimation)?e:0;if(this._width(this._headerWrapper)>parseInt(this._unorderedListHelper.css("margin-left"),10)+this._width(this._unorderedList)){d=c}else{if(Math.abs(b)+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){j=h-f-g-i+parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(d,j,e)},_scrollLeft:function(f){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),e=0,d;f=(this.enableScrollAnimation)?f:0;if(this._width(this._headerWrapper)>=this._width(this._unorderedList)){e=c}else{if(b+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){d=parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(e,d,f)},_performScrollAnimation:function(e,d,c){var b=this;if(d!==undefined){this._moveSelectionTrack(this._selectedItem,0,d)}this._lockAnimation("unorderedList");b._refreshBarPosition();this._unorderedListHelper.animate({left:e},c,function(){b._moveSelectionTrack(b.selectedItem,0);b._unlockAnimation("unorderedList");b._refreshBarPosition()})},_addKeyboardHandlers:function(){var b=this;if(this.keyboardNavigation){this.addHandler(this.host,"keydown",function(e){if(!b._activeAnimation()){var f=b._selectedItem;var d=b.selectionTracker;var c=b.getContentAt(f);if(a(e.target).ischildof(c)){return true}if(a(document.activeElement).ischildof(a(c))){return true}switch(e.keyCode){case 37:if(b.rtl){b.next()}else{b.previous()}return false;case 39:if(b.rtl){b.previous()}else{b.next()}return false;case 36:b.first();return false;case 35:b.last();return false;case 27:if(b._tabCaptured){b._cancelClick=true;b._uncapture(null,b.selectedItem);b._tabCaptured=false}break}b.selectionTracker=d}return true})}},_addScrollHandlers:function(){var b=this;this.addHandler(this._leftArrow,"mousedown",function(){b._startScrollRepeat(true,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mousedown",function(){b._startScrollRepeat(false,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(this._leftArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(a(document),"mouseup.tab"+this.element.id,this._mouseUpScrollDocumentHandler,this);this.addHandler(a(document),"mouseleave.tab"+this.element.id,this._mouseLeaveScrollDocumentHandler,this)},_mouseLeaveScrollDocumentHandler:function(c){var b=c.data;if(!b._scrollTimeout){return}clearTimeout(b._scrollTimeout)},_mouseUpScrollDocumentHandler:function(c){var b=c.data;clearTimeout(b._scrollTimeout)},_mouseUpDragDocumentHandler:function(c){var b=c.data;if(b._tabCaptured&&b._dragStarted){b._uncapture(c)}b._tabCaptured=false},_addReorderHandlers:function(){var b=this;b.addHandler(a(document),"mousemove.tab"+b.element.id,b._moveElement,b);b.addHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpDragDocumentHandler,b)},_addEventHandlers:function(){var e=this.length();while(e){e--;this._addEventListenerAt(e)}if(this.keyboardNavigation){this._addKeyboardHandlers()}if(this.scrollable){this._addScrollHandlers()}if(this.reorder&&!this._isTouchDevice){this._addReorderHandlers()}var d=this;try{if(document.referrer!==""||window.frameElement){if(window.top!==null&&window.top!==window.self){var c=function(){if(d._tabCaptured){d._cancelClick=true;d._uncapture(null,d.selectedItem);d._tabCaptured=false}};var f=null;if(window.parent&&document.referrer){f=document.referrer}if(f&&f.indexOf(document.location.host)!==-1){if(window.top.document){this.addHandler(a(window.top.document),"mouseup.tabs"+this.element.id,c)}}}}}catch(b){}},focus:function(){try{this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25)}catch(b){}},_getFocusedItem:function(c){var d=this.length();while(d){d--;var b=this._titleList[d],g=this._outerWidth(b,true),f=parseInt(a(b).offset().left,10),e=f;if((e<=c&&e+g>=c)&&(b!==this._capturedElement)&&(!this._titleList[d].locked)&&(this._titleList[d].disabled!==true)){return d}}return -1},_uncapture:function(f){var e=this.selectionTracker;this._unorderedListLeftBackup=this._unorderedListHelper.css("left");this._dragStarted=false;this._tabCaptured=false;var b=this._indexOf(this._capturedElement);if(!this._capturedElement){return}switch(this.position){case"top":this._capturedElement.style.bottom="0px";break;case"bottom":this._capturedElement.style.top="0px";break}var d;if(f){d=this._getFocusedItem(f.clientX)}if(d===-1||!f){this._capturedElement.style.left="0px"}else{this._raiseEvent(10,{item:b,dropIndex:d});this._reorderItems(d,b)}for(var c=0;c=e;c--){this._titleList[c]=this._titleList[c-1];this._contentList[c]=this._contentList[c-1]}this._contentList[e]=f;this._titleList[e]=this._capturedElement}},getSelectedItem:function(){return this.selectedItem},_getSelectedItem:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c){this._selectedItem=this.selectedItem=b;break}}},_moveElement:function(d){var c=d.data;if(c._tabCaptured){if(document.selection){document.selection.clear()}if(!c._dragStarted){var b=-parseInt(c._unorderedListHelper.css("left"),10);if(d.clientX+b>c._startX+3||d.clientX+be.offset().left+c._width(this._headerWrapper)){this._scrollRight(this.scrollAnimationDuration);this._capturedElement.style.left=parseInt(a(this._capturedElement).css("left"),10)+this._lastUnorderedListPosition-b}else{c._stop(c._unorderedListHelper);this._unlockAnimation("unorderedList");clearTimeout(this._scrollTimeout)}}this._scrollTimeout=setTimeout(function(){c._dragScroll(d)},this.scrollAnimationDuration);this._lastUnorderedListPosition=b},_captureElement:function(d,c){if(!this._tabCaptured&&!this._titleList[c].locked&&this._titleList[c].disabled!==true&&!this._activeAnimation()){var b=-parseInt(this._unorderedListHelper.css("left"),10);this._startX=b+d.clientX;this._startY=d.clientY;this._lastX=d.clientX;this._lastY=d.clientY;this._tabCaptured=true;this._capturedElement=this._titleList[c]}},_titleInteractionTrigger:function(b){if(this._headerExpandingBalance>0){this._removeOppositeBorder()}if(this._selectedItem!==b){this.select(this._titleList[b],"toggle");this._titleList[b].collapsed=false;if(!this.collapsible){if(this.height!=="auto"){this._contentWrapper.style.visibility="visible"}else{this._contentWrapper.style.display="block"}}}else{if(this.collapsible){if(this.isCollapsed){this.expand()}else{this.collapse()}}}},collapse:function(){var b=this._selectedItem,c=this;this.isCollapsed=true;if(c.height!=="auto"){c._contentWrapper.style.visibility="hidden"}else{c._contentWrapper.style.display="none"}c._raiseEvent(13,{item:b});if(this.position==="top"){c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed")}else{c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed-bottom");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed-bottom")}},expand:function(){var b=this._selectedItem,c=this;this.isCollapsed=false;this._select(b,c.contentTransitionDuration,null,false,true);if(c.height!=="auto"){c._contentWrapper.style.visibility="visible"}else{c._contentWrapper.style.display="block"}c._raiseEvent(14,{item:b});if(this.position==="top"){c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed"))}else{c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed-bottom"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed-bottom"))}},_addSelectHandler:function(b){var c=this;this.addHandler(this._titleList[b],"selectstart",function(){return false});this.addHandler(this._titleList[b],this.toggleMode,(function(d){return function(){c._raiseEvent("15",{item:d});if(!c._tabCaptured&&!c._cancelClick){c._titleInteractionTrigger(d)}return true}}(b)))},_addDragDropHandlers:function(b){var c=this;this.addHandler(this._titleList[b],"mousedown",function(d){c._captureElement(d,b)});this.addHandler(this._titleList[b],"mouseup",function(d){if(c._tabCaptured&&c._dragStarted){c._cancelClick=true;c._uncapture(d,b)}else{c._cancelClick=false}c._tabCaptured=false;return false})},_removeHoverStates:function(){var b=this;a.each(this._titleList,function(){b._removeClass(this,b.toThemeProperty("jqx-tabs-title-hover-top jqx-tabs-title-hover-bottom"))})},_addHoverHandlers:function(b){var d=this;var c=this._titleList[b];this.addHandler(c,"mouseenter mouseleave",function(g){if(b!==d._selectedItem){var f="jqx-fill-state-hover";if(d.position==="top"){f+=" jqx-tabs-title-hover-top"}else{f+=" jqx-tabs-title-hover-bottom"}if(g.type==="mouseenter"){c.className+=" "+d.toThemeProperty(f)}else{d._removeClass(c,d.toThemeProperty(f))}if(d.showCloseButtons){var e=d._closeButtonList[b];if(g.type==="mouseenter"){e.className+=" "+d.toThemeProperty("jqx-tabs-close-button-hover",true)}else{d._removeClass(e,d.toThemeProperty("jqx-tabs-close-button-hover",true))}}}})},_addEventListenerAt:function(c){var d=this;if(this._titleList[c].disabled){return}if(this.reorder&&!this._isTouchDevice){this._addDragDropHandlers(c)}this._addSelectHandler(c);if(this.enabledHover){this._addHoverHandlers(c)}var b=d._closeButtonList[c];this.removeHandler(b,"click");this.addHandler(b,"click",function(){d.removeAt(c);return false})},_removeEventHandlers:function(){var c=this;var b=c.length();while(b){b--;c._removeEventListenerAt(b)}if(c.scrollable){c.removeHandler(c._leftArrow,"mousedown");c.removeHandler(c._rightArrow,"mousedown")}c.removeHandler(a(document),"mousemove.tab"+c.element.id,c._moveElement);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpScrollDocumentHandler);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpDragDocumentHandler);c.removeHandler(c.host,"keydown")},_removeEventListenerAt:function(b){var c=this;c.removeHandler(c._titleList[b],c.toggleMode);c.removeHandler(c._titleList[b],"mouseenter");c.removeHandler(c._titleList[b],"mouseleave");c.removeHandler(c._titleList[b],"mousedown");c.removeHandler(c._titleList[b],"mouseup");c.removeHandler(c._closeButtonList[b],"click")},_moveSelectionTrack:function(n,c,b){var h=this;if(n===-1){return}if(this._titleList.length===0){return}if(n>=this._titleList.length){return}var m=this._titleList[n],o=a(m);h._refreshBarPosition();if(this.selectionTracker&&this._selectionTracker){var i;h._stop(h._selectionTrackerHelper);this._unlockAnimation("selectionTracker");if(b===undefined){i=parseInt(o.position().left,10);if(!isNaN(parseInt(this._unorderedListHelper.css("left"),10))){i+=parseInt(this._unorderedListHelper.css("left"),10)}if(!isNaN(parseInt(this._unorderedListHelper.css("margin-left"),10))){i+=parseInt(this._unorderedListHelper.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-left"),10))){i+=parseInt(o.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-right"),10))){}}else{i=b}var g=0;var e=0;if(this.position==="top"){g=this._height(h._headerWrapper)-m.offsetHeight;if(!this.autoHeight){e+=parseInt(o.css("margin-top"),10)}}this._lockAnimation("selectionTracker");var l=parseInt(o.css("padding-left"),10)+parseInt(o.css("padding-right"),10);var f=this.position==="top"?0:1;var k=parseInt(a(this._headerWrapper).css("padding-top"),10);var j=parseInt(o.css("padding-top"),10)+parseInt(o.css("padding-bottom"),10);this._selectionTracker.style.visibility="visible";this._moveSelectionTrackerContainer.style.visibility="visible";var d=parseInt(o.css("margin-top"),10);if(isNaN(d)){d=0}h._refreshBarPosition();h._selectionTrackerHelper.animate({top:k+d-f,left:i+"px",height:parseInt(this._height(m)+j,10),width:h._width(m)+l},c,function(){h._unlockAnimation("selectionTracker");h._selectionTracker.style.visibility="hidden";h._addSelectStyle(n,true);h._moveSelectionTrackerContainer.style.visibility="hidden"})}},destroy:function(){a.jqx.utilities.resize(this.host,null,true);if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){this.removeHandler(a(window.top.document),"mouseup.tabs"+this.element.id)}}this.host.remove()},_switchTabs:function(b,d){if(b!==d&&!this._activeAnimation()&&!this._tabCaptured){var c=this;this._raiseEvent(7,{item:d});this._raiseEvent(6,{item:b});if(this._currentEvent){if(this._currentEvent.cancel){this._currentEvent=null;return}}this._unselect(d,null,true);this._select(b,c.contentTransitionDuration,null,true);return true}return false},_activeAnimation:function(){for(var b in this._isAnimated){if(this._isAnimated.hasOwnProperty(b)){if(this._isAnimated[b]){return true}}}return false},_indexOf:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c||this._contentList[b]===c){return b}}return -1},_validateProperties:function(){try{if(this.scrollAnimationDuration<0||isNaN(this.scrollAnimationDuration)){throw new Error(this._invalidArgumentExceptions.invalidScrollAnimationDuration)}if(parseInt(this.width,10)<0&&this.width!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(parseInt(this.height,10)<0&&this.height!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.animationType!=="none"&&this.animationType!=="fade"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(this.contentTransitionDuration<0||isNaN(this.contentTransitionDuration)){throw new Error(this._invalidArgumentExceptions.invalidcontentTransitionDuration)}if(this.toggleMode!=="click"&&this.toggleMode!=="dblclick"&&this.toggleMode!=="mouseenter"&&this.toggleMode!=="none"){throw new Error(this._invalidArgumentExceptions.invalidToggleMode)}if(this.position!=="top"&&this.position!=="bottom"){throw new Error(this._invalidArgumentExceptions.invalidPosition)}if(this.scrollPosition!=="left"&&this.scrollPosition!=="right"&&this.scrollPosition!=="both"){throw new Error(this._invalidArgumentExceptions.invalidScrollPosition)}if(this.scrollStep<0||isNaN(this.scrollStep)){throw new Error(this._invalidArgumentExceptions.invalidScrollStep)}if(this._titleList.length!==this._contentList.length||this._titleList.length===0){throw new Error(this._invalidArgumentExceptions.invalidStructure)}if(this.arrowButtonSize<0||isNaN(this.arrowButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidArrowSize)}if(this.closeButtonSize<0||isNaN(this.closeButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidCloseSize)}}catch(b){try{console.log(b)}catch(c){}}},_startScrollRepeat:function(d,c){var b=this;if(d){this._scrollLeft(c)}else{this._scrollRight(c)}if(this._scrollTimeout){clearTimeout(this._scrollTimeout)}this._scrollTimeout=setTimeout(function(){b._startScrollRepeat(d,b.scrollAnimationDuration)},c)},_performLayout:function(){var b=this.length();while(b){b--;if(this.position==="top"||this.position==="bottom"){if(this.rtl){this._titleList[b].style["float"]="right"}else{this._titleList[b].style["float"]="left"}}}this._fitToSize();this._performHeaderLayout();this._fitToSize()},updatetabsheader:function(){this._performHeaderLayout()},_setSize:function(){var b=this;b._fitToSize();b._positionArrows(b._totalItemsWidth);if(b._totalItemsWidth>b.element.offsetWidth){b._unorderedList.style.width=b._toPx(b._totalItemsWidth)}else{b._unorderedList.style.width=b.element.offsetWidth-2+"px"}b._fitToSize()},_addArrows:function(){if(this._leftArrow&&this._rightArrow){a(this._leftArrow).remove();a(this._rightArrow).remove()}this._leftArrow=document.createElement("div");this._leftArrow.innerHTML='';this._leftArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._leftArrow.style.zIndex=30;this._leftArrow.style.display="none";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.height="100%";this._rightArrow=document.createElement("div");this._rightArrow.innerHTML='';this._rightArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._rightArrow.style.zIndex=30;this._rightArrow.style.display="none";this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.height="100%";this._headerWrapper.appendChild(this._leftArrow);this._headerWrapper.appendChild(this._rightArrow)},_tabsWithVisibleCloseButtons:function(){if(!this.showCloseButtons){return 0}var b=this.length();a.each(this._titleList,function(){var c=this.attr("hasclosebutton");if(c!==undefined&&c!==null){if(c==="false"||c===false){b--}}});return b},_calculateTitlesSize:function(){var g=this;function f(n,m){if(n){if(m){n.style.display="block"}else{n.style.display="none"}}}var l=0;var k=0;var h=this.length();if(this.rtl&&a.jqx.browser.msie&&a.jqx.browser.version<8){this._measureItem=document.createElement("span");this._measureItem.style.position="relative";this._measureItem.style.visibility="hidden";document.body.appendChild(this._measureItem)}while(h){h--;var j=this._titleList[h],b=g._closeButtonList[h];if(this._measureItem){this._measureItem.innerHTML=j.innerHTML;this._measureItem.html(this._titleList[h].html());j.style.width=g._toPx(g._width(this._measureItem))}j.style.position="static";f(b,false);k+=g._outerWidth(j,true);var e=g._outerHeight(j,true);if(l1)){d=false;if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[h]===1){f(b,false);d=true}}if(!d){k+=this.closeButtonSize;f(b,true)}}}j.style.height=this._toPx(g._height(j))}if(this._measureItem){a(this._measureItem).remove()}return{height:l,width:10+k}},_reorderHeaderElements:function(){if(this.selectionTracker){this._moveSelectionTrackerContainer.style.position="absolute";this._moveSelectionTrackerContainer.style.height="100%";this._moveSelectionTrackerContainer.style.top="0px";this._moveSelectionTrackerContainer.style.left="0px";this._moveSelectionTrackerContainer.style.width="100%"}this._headerWrapper.style.position="relative";this._headerWrapper.style.left="0px";this._headerWrapper.style.top="0px";if(this.scrollable){this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.position="absolute";this._rightArrow.style.top="0px";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.position="absolute";this._leftArrow.style.top="0px";var c=this.theme&&this.theme.indexOf("ui-")!==-1?3:0;if(c>0){this._rightArrow.className+=" "+this.toThemeProperty("jqx-rc-r");this._leftArrow.className+=" "+this.toThemeProperty("jqx-rc-l")}var b=this.scrollPosition;if(this.rtl){if(b==="left"){b="right"}if(b==="right"){b="left"}}switch(b){case"both":this._rightArrow.style.right="0px";this._leftArrow.style.left="0px";break;case"left":this._rightArrow.style.left=this._toPx(this.arrowButtonSize);this._leftArrow.style.left="0px";break;case"right":this._rightArrow.style.right=this._toPx(-c);this._leftArrow.style.right=this._toPx(parseInt(this.arrowButtonSize,10)-c);break}}},_positionArrows:function(b){if(b>=this._headerWrapper.offsetWidth&&this.scrollable){this._needScroll=true;if(this._unorderedListHelper.position().left===0){this._unorderedListLeftBackup=this._getArrowsDisplacement()+"px"}this._leftArrow.style.display="block";this._rightArrow.style.display="block"}else{this._needScroll=false;this._leftArrow.style.display="none";this._rightArrow.style.display="none";this._unorderedList.style.left="0px"}},_performHeaderLayout:function(){this._removeSelectStyle();var b=this._calculateTitlesSize();var e=b.height;var c=b.width;this._headerWrapper.style.height=this._toPx(e);this._unorderedList.style.height=this._toPx(e);if(this.headerHeight!==null&&this.headerHeight!=="auto"){this._headerWrapper.style.height=this._toPx(this.headerHeight);this._unorderedList.style.height=this._toPx(this.headerHeight)}var d=this._width(this.element);if(c>d){this._unorderedList.style.width=this._toPx(c)}else{this._unorderedList.style.width=this._toPx(d)}if(a.jqx.browser.msie&&a.jqx.browser.version<8){this._unorderedList.style.position="relative";this._unorderedList.style.overflow="hidden"}this._reorderHeaderElements();c=c+parseInt(this._unorderedListHelper.css("margin-left"),10);this._totalItemsWidth=c;this._positionArrows(c);this._unorderedList.style.position="relative";this._unorderedList.style.top="0px";this._verticalAlignElements();this._moveSelectionTrack(this._selectedItem,0);this._addSelectStyle(this.selectedItem)},_verticalAlignElements:function(){var j=this.length();while(j){j--;var n=this._titleList[j],p=a(n),b=p.children()[0],m=this._closeButtonList[j],k=parseInt(p.css("padding-top"),10);if(!k){k=0}if(this.autoHeight){var c=parseInt(p.css("padding-top"),10),o=parseInt(p.css("padding-bottom"),10),i=p.css("border-top-width"),f=p.css("border-bottom-width");if(i.indexOf("px")===-1){i=1}else{i=parseInt(i,10)}if(f.indexOf("px")===-1){f=1}else{f=parseInt(f,10)}n.style.height=this._toPx(this._outerHeight(this._unorderedList,true)-(c+o+i+f))}else{if(this.position==="top"){var h=this._height(this._unorderedList)-parseInt(this._outerHeight(n,true),10);if(parseInt(p.css("margin-top"),10)!==h&&h!==0){n.style.marginTop=this._toPx(h)}}else{n.style.height=this._toPx(this._height(n))}}b.style.height="100%";var e=this._height(n);if(m){var g=e/2-this._height(m)/2;m.style.marginTop=this._toPx(1+g)}var l=e/2-this._height(b)/2;b.style.marginTop=this._toPx(l)}if(this.scrollable){var d=(parseInt(this._headerWrapper.offsetHeight,10)-this.arrowButtonSize)/2;a(this._rightArrow).children()[0].style.marginTop=this._toPx(d);this._rightArrow.style.height="100%";a(this._leftArrow).children()[0].style.marginTop=this._toPx(d);this._leftArrow.style.height="100%"}},_getImageUrl:function(c){var b=c.css("background-image");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},_fitToSize:function(){var c=false;var e=false;var d=this;if(d.width!==null&&d.width.toString().indexOf("%")!==-1){c=true}if(d.height!==null&&d.height.toString().indexOf("%")!==-1){e=true}if(c){this.element.style.width=this.width;this._contentWrapper.style.width="100%"}else{d.element.style.width=d._toPx(d.width);if(this.width!=="auto"){this._contentWrapper.style.width="100%"}}var b;if(e){this.element.style.height=this.height;this._contentWrapper.style.width="100%";this._contentWrapper.style.height="auto";b=this.element.offsetHeight-this._headerWrapper.offsetHeight-2;this._contentWrapper.style.height=b+"px"}else{if(this.height!=="auto"){d.element.style.height=d._toPx(d.height);b=this._height(d.element)-this._headerWrapper.offsetHeight;this._contentWrapper.style.height=d._toPx(b)}else{this._contentWrapper.style.height="auto"}}},_maxHeightTab:function(){var c=this.length();var d=-1;var b=-1;while(c){c--;if(d0){a(g).find(".jqx-tabs-close-button").remove()}d.style["float"]=f;d.innerHTML=g.innerHTML;g.innerHTML="";var b=document.createElement("div");b.className=this.toThemeProperty("jqx-tabs-close-button");b.style.height=this._toPx(this.closeButtonSize);b.style.width=this._toPx(this.closeButtonSize);b.style["float"]=f;b.style.fontSize="1px";g.appendChild(d);g.appendChild(b);if(e===true){this._closeButtonList[c]=b}else{this._closeButtonList.splice(c,0,b)}if(!this.showCloseButtons){b.style.display="none"}else{if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[c]===1){b.style.display="none"}}}},_addCloseButtons:function(){var b=this.length();while(b){b--;this._addCloseButton(b,true)}},_prepareTabs:function(){var c=this.length();var b=this.selectionTracker;this.selectionTracker=false;while(c){c--;if(this._selectedItem!==c){this._unselect(c,null,false)}}this._select(this._selectedItem,0,null,false);this.selectionTracker=b;if(this.initTabContent){if(!this._initTabContentList[this.selectedItem]){if(!this._hiddenParent()){this.initTabContent(this.selectedItem);this._initTabContentList[this.selectedItem]=true}}}},_isValidIndex:function(b){return(b>=0&&b=0&&f!==undefined){var c=null;if(this.showCloseButtons){c=this._closeButtonList[d];if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[d]===1){c=null}}}var b="jqx-fill-state-hover",e=" jqx-fill-state-pressed";if(this.position==="top"){b+=" jqx-tabs-title-hover-top";e+=" jqx-tabs-title-selected-top"}else{b+=" jqx-tabs-title-hover-bottom";e+=" jqx-tabs-title-selected-bottom"}this._removeClass(f,this.toThemeProperty(b));f.className+=this.toThemeProperty(e);if(c!==null){c.className+=" "+this.toThemeProperty("jqx-tabs-close-button-selected")}}}},_addItemTo:function(g,c,e){if(c");a(this._headerWrapper).append(b);b.addClass(this.toThemeProperty("jqx-tabs-bar"));this.bar=b}setTimeout(function(){var d=parseInt(c._unorderedListHelper.css("left"),10);var e=parseInt(c._unorderedListHelper.css("margin-left"));c.bar.css("left",e+c._titleList[c._selectedItem].offsetLeft+d);c.bar.width(a(c._titleList[c._selectedItem]).outerWidth()-2)})},_select:function(h,e,l,b,c){if(!this._tabCaptured){this.host.attr("hideFocus","true");var g=this;if(c===undefined){this._addSelectStyle(h)}else{this._addSelectStyle(h,c)}var k=a(g._titleList[h]),d=g._titleList[h].getAttribute("id"),j=a(g._contentList[h]);if(this.isCollapsed&&this.collapsible){j[0].style.display="none";this._selectCallback(h,l,b);return}g._refreshBarPosition();switch(this.animationType){case"none":if(!g.selectionTracker){for(var f=0;f=0){if(!this._tabCaptured){var g=this,e=g._contentList[d],c=a(e),h=g._titleList[d],f=a(h);if(c.initAnimate&&c.animate===undefined){c.initAnimate()}g._stop(c);if(this.animationType==="fade"){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}else{if(this.selectionTracker){setTimeout(function(){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)},this.selectionTrackerAnimationDuration)}else{e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}}this._unselectCallback(d,i,b);if(!this.selectionTracker){g._removeClass(h,g.toThemeProperty("jqx-tabs-title-selected jqx-fill-state-pressed"))}}}},_unselectCallback:function(c,d,b){if(b){this._raiseEvent(8,{item:c})}if(d){d()}},disable:function(){var b=this.length();while(b){b--;this.disableAt(b)}},enable:function(){var b=this.length();while(b){b--;this.enableAt(b)}},getEnabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(!this.disabled){b++}});return b},getDisabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(this.disabled){b++}});return b},removeAt:function(b){if(this._isValidIndex(b)&&(this.canCloseAllTabs||this.length()>1)){this._removeHoverStates();var d=this,c=d._outerWidth(this._titleList[b],true),g=this.getTitleAt(b);this._unorderedList.style.width=d._toPx(d._width(this._unorderedList)-c);a(this._titleList[b]).remove();a(this._contentList[b]).remove();this._titleList.splice(b,1);this._contentList.splice(b,1);d._closeButtonList.splice(b,1);this._addStyles();this._performHeaderLayout();this._removeEventHandlers();this._addEventHandlers();this._raiseEvent(3,{item:b,title:g});this._isAnimated={};var f;if(this.selectedItem>0){this._selectedItem=-1;if(this.selectedItem>=b){f=this._getPreviousIndex(this.selectedItem);this.select(f)}else{this.select(d.selectedItem)}}else{this._selectedItem=-1;f=this._getNextIndex(this.selectedItem);this.select(f)}if(parseInt(this._unorderedListHelper.css("left"),10)>this._getArrowsDisplacement()){this._unorderedList.style.left=d._toPx(this._getArrowsDisplacement())}if(d._width(this._unorderedList)<=d._width(this._headerWrapper)){var e=(this.enableScrollAnimation)?this.scrollAnimationDuration:0;this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:0},e,function(){d._unlockAnimation("unorderedList")})}}},removeFirst:function(){this.removeAt(0)},removeLast:function(){this.removeAt(this.length()-1)},disableAt:function(b){var d=this._titleList[b];if(!d.disabled||d.disabled===undefined){if(this.selectedItem===b){var c=this.next();if(!c){c=this.previous()}}d.disabled=true;this.removeHandler(d,this.toggleMode);if(this.enabledHover){a(d).off("mouseenter").off("mouseleave")}this._removeEventListenerAt(b);d.className+=" "+this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled");this._raiseEvent(5,{item:b})}},enableAt:function(b){var c=this._titleList[b];if(c.disabled){c.disabled=false;this._addEventListenerAt(b);this._removeClass(c,this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled"));this._raiseEvent(4,{item:b})}},addAt:function(d,g,e){if(d>=0&&d<=this.length()){this._removeHoverStates();var b=document.createElement("li");b.innerHTML=g;b.className=this.toThemeProperty("jqx-tabs-title jqx-item");var f=document.createElement("div");f.innerHTML=e;f.className=this.toThemeProperty("jqx-tabs-content-element");if(this.position==="bottom"){b.className+=" "+this.toThemeProperty("jqx-tabs-title-bottom")}var c=false;if(this._titleList.length===0){this._unorderedList.appendChild(b)}else{if(d=0){this._unorderedList.insertBefore(b,this._titleList[d])}else{this._unorderedList.appendChild(b)}}this._contentWrapper.appendChild(f);this._addItemTo(this._titleList,d,b);this._addItemTo(this._contentList,d,f);this._addCloseButton(d);if(this._selectedItem>d){this._selectedItem++}this._switchTabs(d,this._selectedItem);this._selectedItem=d;this._uiRefresh(c);this._raiseEvent(2,{item:d});this._moveSelectionTrack(this._selectedItem,0)}},addFirst:function(c,b){this.addAt(0,c,b)},addLast:function(c,b){this.addAt(this.length(),c,b)},val:function(b){if(arguments.length===0||typeof(b)==="object"){return this._selectedItem}this.select(b);return this._selectedItem},select:function(b){if(typeof(b)==="object"){b=this._indexOf(b)}var d=b>=0&&b0&&b0&&c<=this._titleList.length){c--;if(!this._titleList[c].disabled){return c}}return b}else{return 0}},_getNextIndex:function(c){if(c!==undefined&&!isNaN(c)){var b=c;while(c>=0&&c=0&&bb-this._getArrowsDisplacement()){h=-l+k-f-((this.scrollable)?(2*this.arrowButtonSize-this._getArrowsDisplacement()):0);c=k-f-this._getArrowsDisplacement()}else{this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration);return true}}this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:h},this.scrollAnimationDuration,function(){d._unlockAnimation("unorderedList");d._moveSelectionTrack(d._selectedItem,0);return true});this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration,c);return true},isVisibleAt:function(d){var c=this;if(d===undefined||d===-1||d===null){d=c.selectedItem}if(!c._isValidIndex(d)){return false}var h=c._titleList[d];var j=parseInt(a(h).position().left,10)+parseInt(c._unorderedListHelper.css("margin-left"),10);var f=parseInt(c._unorderedListHelper.css("left"),10);var i=c._outerWidth(c._headerWrapper,true);var e=c._outerWidth(h,true);var g=f-c._getArrowsDisplacement();var b=i-c._getArrowsDisplacement()-g;if(j<-g){return false}else{if(j+e>b){return false}else{return true}}return true},isDisabled:function(b){return this._titleList[b].disabled},_lockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=true}},_unlockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=false}},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length===2){d._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length===2){return}this._validateProperties();switch(c){case"touchMode":if(d){b.enabledHover=false;b.keyboardNavigation=false}break;case"width":case"height":b._setSize();return;case"disabled":if(d){this.disable()}else{this.enable()}return;case"showCloseButtons":if(d){this.showAllCloseButtons()}else{this.hideAllCloseButtons()}this._performHeaderLayout();return;case"selectedItem":if(this._isValidIndex(d)){this.select(d)}return;case"scrollStep":case"contentTransitionDuration":case"scrollAnimationDuration":case"enableScrollAnimation":return;case"selectionTracker":if(d){this._refresh();this.select(this._selectedItem)}else{if(this._selectionTracker){this._selectionTrackerHelper.remove()}}return;case"scrollable":if(d){this._refresh();this.select(this._selectedItem)}else{a(this._leftArrow).remove();a(this._rightArrow).remove();this._performHeaderLayout()}return;case"autoHeight":this._performHeaderLayout();return;case"theme":a.jqx.utilities.setTheme(e,d,this.host);return}this._unorderedList.style.left="0px";this._refresh();this.select(this._selectedItem);this._addSelectStyle(this._selectedItem,true)},_toPx:function(b){if(typeof b==="number"){return b+"px"}else{return b}},_removeClass:function(c,b){a(c).removeClass(b)},_width:function(e){var b=a(e),g=b.css("border-left-width"),c=b.css("border-right-width"),d=parseInt(b.css("padding-left"),10),h=parseInt(b.css("padding-right"),10);if(g.indexOf("px")===-1){g=1}else{g=parseInt(g,10)}if(c.indexOf("px")===-1){c=1}else{c=parseInt(c,10)}var f=e.offsetWidth-(g+c+d+h);return f},_outerWidth:function(c,g){var f=c.offsetWidth;if(g){var b=a(c),d=parseInt(b.css("margin-left"),10),e=parseInt(b.css("margin-right"),10);f+=d+e}return f},_height:function(e){var c=a(e),h=c.css("border-top-width"),d=c.css("border-bottom-width"),f=parseInt(c.css("padding-top"),10),g=parseInt(c.css("padding-bottom"),10);if(h.indexOf("px")===-1){h=1}else{h=parseInt(h,10)}if(d.indexOf("px")===-1){d=1}else{d=parseInt(d,10)}var b=e.offsetHeight-(h+d+f+g);return b},_outerHeight:function(e,g){var f=e.offsetHeight;if(g){var b=a(e),c=parseInt(b.css("margin-top"),10),d=parseInt(b.css("margin-bottom"),10);f+=c+d}return f},_stop:function(b){if(b.stop){b.stop()}else{b.animate("stop",true)}}})}(jqxBaseFramework)); +(function(a){a.jqx.jqxWidget("jqxTabs","",{});a.extend(a.jqx._jqxTabs.prototype,{defineInstance:function(){var b={scrollAnimationDuration:200,enabledHover:true,disabled:false,collapsible:false,animationType:"none",enableScrollAnimation:true,contentTransitionDuration:450,toggleMode:"click",selectedItem:0,height:"auto",width:"auto",position:"top",selectionTracker:false,scrollable:true,scrollPosition:"right",scrollStep:70,autoHeight:true,headerHeight:null,showCloseButtons:false,canCloseAllTabs:true,closeButtonSize:16,arrowButtonSize:16,keyboardNavigation:true,reorder:false,selectionTrackerAnimationDuration:300,_isTouchDevice:false,roundedCorners:true,_headerExpandingBalance:0,_dragStarted:false,_tabCaptured:false,_lastUnorderedListPosition:0,_selectedItem:0,_titleList:[],_contentList:[],_contentWrapper:null,_unorderedList:null,_scrollTimeout:null,isCollapsed:false,touchMode:false,initTabContent:null,enableDropAnimation:false,_currentEvent:null,_needScroll:true,_isAnimated:{},_events:["created","selected","add","removed","enabled","disabled","selecting","unselecting","unselected","dragStart","dragEnd","locked","unlocked","collapsed","expanded","tabclick"],_initTabContentList:[],_invalidArgumentExceptions:{invalidScrollAnimationDuration:"The scroll animation duration is not valid!",invalidWidth:"Width you've entered is invalid!",invalidHeight:"Height you've entered is invalid!",invalidAnimationType:"You've entered invalid animation type!",invalidcontentTransitionDuration:"You've entered invalid value for contentTransitionDuration!",invalidToggleMode:"You've entered invalid value for toggleMode!",invalidPosition:"You've entered invalid position!",invalidScrollPosition:"You've entered invalid scroll position!",invalidScrollStep:"You've entered invalid scroll step!",invalidStructure:"Invalid structure!",invalidArrowSize:"Invalid scroll button size!",invalidCloseSize:"Invalid close button size!"},aria:{"aria-disabled":{name:"disabled",type:"boolean"}},rtl:false};if(this===a.jqx._jqxTabs.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._IE8=a.jqx.browser.msie&&a.jqx.browser.version<9;a.jqx.aria(this);this.element.className+=" "+this.toThemeProperty("jqx-tabs jqx-widget jqx-widget-content");this.element.setAttribute("role","tablist");var e=this.host.children();for(var b=0;b0&&f._contentList[f.selectedItem]){a(f._contentList[f.selectedItem]).trigger(j)}},50+f.selectionTrackerAnimationDuration)}else{var d=new a.Event("loadContent");if(!f._initTabContentList[f.selectedItem]){if(f.initTabContent){f.initTabContent(f.selectedItem);f._initTabContentList[f.selectedItem]=true}}d.owner=this;var h=new a.Event("resize");this.host.trigger(h)}}}catch(c){if(c&&console){console.log(c)}}return b},_getArrowsDisplacement:function(){if(!this._needScroll){return 0}var d;var c=this.arrowButtonSize;var b=this.arrowButtonSize;if(this.scrollPosition==="left"){d=c+b}else{if(this.scrollPosition==="both"){d=c}else{d=0}}return d},_scrollRight:function(e){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var f=parseInt(this._width(this._unorderedList)+parseInt(this._unorderedListHelper.css("margin-left"),10),10),h=this._width(this.element),g,i,b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),d=0,j;if(this.scrollable){g=this._leftArrow.offsetWidth;i=this._rightArrow.offsetWidth}else{g=0;i=0}e=(this.enableScrollAnimation)?e:0;if(this._width(this._headerWrapper)>parseInt(this._unorderedListHelper.css("margin-left"),10)+this._width(this._unorderedList)){d=c}else{if(Math.abs(b)+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){j=h-f-g-i+parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(d,j,e)},_scrollLeft:function(f){this._stop(this._unorderedListHelper);this._unlockAnimation("unorderedList");var b=parseInt(this._unorderedListHelper.css("left"),10),c=this._getArrowsDisplacement(),e=0,d;f=(this.enableScrollAnimation)?f:0;if(this._width(this._headerWrapper)>=this._width(this._unorderedList)){e=c}else{if(b+this.scrollStepparseInt(this._unorderedListHelper.css("left"),10)+4){d=parseInt(a(this._titleList[this._selectedItem]).position().left,10)}}}this._performScrollAnimation(e,d,f)},_performScrollAnimation:function(e,d,c){var b=this;if(d!==undefined){this._moveSelectionTrack(this._selectedItem,0,d)}this._lockAnimation("unorderedList");b._refreshBarPosition();this._unorderedListHelper.animate({left:e},c,function(){b._moveSelectionTrack(b.selectedItem,0);b._unlockAnimation("unorderedList");b._refreshBarPosition()})},_addKeyboardHandlers:function(){var b=this;if(this.keyboardNavigation){this.addHandler(this.host,"keydown",function(e){if(!b._activeAnimation()){var f=b._selectedItem;var d=b.selectionTracker;var c=b.getContentAt(f);if(a(e.target).ischildof(c)){return true}if(a(document.activeElement).ischildof(a(c))){return true}switch(e.keyCode){case 37:if(b.rtl){b.next()}else{b.previous()}return false;case 39:if(b.rtl){b.previous()}else{b.next()}return false;case 36:b.first();return false;case 35:b.last();return false;case 27:if(b._tabCaptured){b._cancelClick=true;b._uncapture(null,b.selectedItem);b._tabCaptured=false}break}b.selectionTracker=d}return true})}},_addScrollHandlers:function(){var b=this;this.addHandler(this._leftArrow,"mousedown",function(){b._startScrollRepeat(true,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mousedown",function(){b._startScrollRepeat(false,b.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(this._leftArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)});this.addHandler(a(document),"mouseup.tab"+this.element.id,this._mouseUpScrollDocumentHandler,this);this.addHandler(a(document),"mouseleave.tab"+this.element.id,this._mouseLeaveScrollDocumentHandler,this)},_mouseLeaveScrollDocumentHandler:function(c){var b=c.data;if(!b._scrollTimeout){return}clearTimeout(b._scrollTimeout)},_mouseUpScrollDocumentHandler:function(c){var b=c.data;clearTimeout(b._scrollTimeout)},_mouseUpDragDocumentHandler:function(c){var b=c.data;if(b._tabCaptured&&b._dragStarted){b._uncapture(c)}b._tabCaptured=false},_addReorderHandlers:function(){var b=this;b.addHandler(a(document),"mousemove.tab"+b.element.id,b._moveElement,b);b.addHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpDragDocumentHandler,b)},_addEventHandlers:function(){var e=this.length();while(e){e--;this._addEventListenerAt(e)}if(this.keyboardNavigation){this._addKeyboardHandlers()}if(this.scrollable){this._addScrollHandlers()}if(this.reorder&&!this._isTouchDevice){this._addReorderHandlers()}var d=this;try{if(document.referrer!==""||window.frameElement){if(window.top!==null&&window.top!==window.self){var c=function(){if(d._tabCaptured){d._cancelClick=true;d._uncapture(null,d.selectedItem);d._tabCaptured=false}};var f=null;if(window.parent&&document.referrer){f=document.referrer}if(f&&f.indexOf(document.location.host)!==-1){if(window.top.document){this.addHandler(a(window.top.document),"mouseup.tabs"+this.element.id,c)}}}}}catch(b){}},focus:function(){try{this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25)}catch(b){}},_getFocusedItem:function(c){var d=this.length();while(d){d--;var b=this._titleList[d],g=this._outerWidth(b,true),f=parseInt(a(b).offset().left,10),e=f;if((e<=c&&e+g>=c)&&(b!==this._capturedElement)&&(!this._titleList[d].locked)&&(this._titleList[d].disabled!==true)){return d}}return -1},_uncapture:function(f){var e=this.selectionTracker;this._unorderedListLeftBackup=this._unorderedListHelper.css("left");this._dragStarted=false;this._tabCaptured=false;var b=this._indexOf(this._capturedElement);if(!this._capturedElement){return}switch(this.position){case"top":this._capturedElement.style.bottom="0px";break;case"bottom":this._capturedElement.style.top="0px";break}var d;if(f){d=this._getFocusedItem(f.clientX)}if(d===-1||!f){this._capturedElement.style.left="0px"}else{this._raiseEvent(10,{item:b,dropIndex:d});this._reorderItems(d,b)}for(var c=0;c=e;c--){this._titleList[c]=this._titleList[c-1];this._contentList[c]=this._contentList[c-1]}this._contentList[e]=f;this._titleList[e]=this._capturedElement}},getSelectedItem:function(){return this.selectedItem},_getSelectedItem:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c){this._selectedItem=this.selectedItem=b;break}}},_moveElement:function(d){var c=d.data;if(c._tabCaptured){if(document.selection){document.selection.clear()}if(!c._dragStarted){var b=-parseInt(c._unorderedListHelper.css("left"),10);if(d.clientX+b>c._startX+3||d.clientX+be.offset().left+c._width(this._headerWrapper)){this._scrollRight(this.scrollAnimationDuration);this._capturedElement.style.left=parseInt(a(this._capturedElement).css("left"),10)+this._lastUnorderedListPosition-b}else{c._stop(c._unorderedListHelper);this._unlockAnimation("unorderedList");clearTimeout(this._scrollTimeout)}}this._scrollTimeout=setTimeout(function(){c._dragScroll(d)},this.scrollAnimationDuration);this._lastUnorderedListPosition=b},_captureElement:function(d,c){if(!this._tabCaptured&&!this._titleList[c].locked&&this._titleList[c].disabled!==true&&!this._activeAnimation()){var b=-parseInt(this._unorderedListHelper.css("left"),10);this._startX=b+d.clientX;this._startY=d.clientY;this._lastX=d.clientX;this._lastY=d.clientY;this._tabCaptured=true;this._capturedElement=this._titleList[c]}},_titleInteractionTrigger:function(b){if(this._headerExpandingBalance>0){this._removeOppositeBorder()}if(this._selectedItem!==b){this.select(this._titleList[b],"toggle");this._titleList[b].collapsed=false;if(!this.collapsible){if(this.height!=="auto"){this._contentWrapper.style.visibility="visible"}else{this._contentWrapper.style.display="block"}}}else{if(this.collapsible){if(this.isCollapsed){this.expand()}else{this.collapse()}}}},collapse:function(){var b=this._selectedItem,c=this;this.isCollapsed=true;if(c.height!=="auto"){c._contentWrapper.style.visibility="hidden"}else{c._contentWrapper.style.display="none"}c._raiseEvent(13,{item:b});if(this.position==="top"){c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed")}else{c._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed-bottom");c.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed-bottom")}},expand:function(){var b=this._selectedItem,c=this;this.isCollapsed=false;this._select(b,c.contentTransitionDuration,null,false,true);if(c.height!=="auto"){c._contentWrapper.style.visibility="visible"}else{c._contentWrapper.style.display="block"}c._raiseEvent(14,{item:b});if(this.position==="top"){c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed"))}else{c._removeClass(c._headerWrapper,c.toThemeProperty("jqx-tabs-header-collapsed-bottom"));c._removeClass(c.element,c.toThemeProperty("jqx-tabs-collapsed-bottom"))}},_addSelectHandler:function(b){var c=this;this.addHandler(this._titleList[b],"selectstart",function(){return false});this.addHandler(this._titleList[b],this.toggleMode,(function(d){return function(){c._raiseEvent("15",{item:d});if(!c._tabCaptured&&!c._cancelClick){c._titleInteractionTrigger(d)}return true}}(b)))},_addDragDropHandlers:function(b){var c=this;this.addHandler(this._titleList[b],"mousedown",function(d){c._captureElement(d,b)});this.addHandler(this._titleList[b],"mouseup",function(d){if(c._tabCaptured&&c._dragStarted){c._cancelClick=true;c._uncapture(d,b)}else{c._cancelClick=false}c._tabCaptured=false;return false})},_removeHoverStates:function(){var b=this;a.each(this._titleList,function(){b._removeClass(this,b.toThemeProperty("jqx-tabs-title-hover-top jqx-tabs-title-hover-bottom"))})},_addHoverHandlers:function(b){var d=this;var c=this._titleList[b];this.addHandler(c,"mouseenter mouseleave",function(g){if(b!==d._selectedItem){var f="jqx-fill-state-hover";if(d.position==="top"){f+=" jqx-tabs-title-hover-top"}else{f+=" jqx-tabs-title-hover-bottom"}if(g.type==="mouseenter"){c.className+=" "+d.toThemeProperty(f)}else{d._removeClass(c,d.toThemeProperty(f))}if(d.showCloseButtons){var e=d._closeButtonList[b];if(g.type==="mouseenter"){e.className+=" "+d.toThemeProperty("jqx-tabs-close-button-hover",true)}else{d._removeClass(e,d.toThemeProperty("jqx-tabs-close-button-hover",true))}}}})},_addEventListenerAt:function(c){var d=this;if(this._titleList[c].disabled){return}if(this.reorder&&!this._isTouchDevice){this._addDragDropHandlers(c)}this._addSelectHandler(c);if(this.enabledHover){this._addHoverHandlers(c)}var b=d._closeButtonList[c];this.removeHandler(b,"click");this.addHandler(b,"click",function(){var e=a(this).parents("li").index();d.removeAt(e);return false})},_removeEventHandlers:function(){var c=this;var b=c.length();while(b){b--;c._removeEventListenerAt(b)}if(c.scrollable){c.removeHandler(c._leftArrow,"mousedown");c.removeHandler(c._rightArrow,"mousedown")}c.removeHandler(a(document),"mousemove.tab"+c.element.id,c._moveElement);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpScrollDocumentHandler);c.removeHandler(a(document),"mouseup.tab"+c.element.id,c._mouseUpDragDocumentHandler);c.removeHandler(c.host,"keydown")},_removeEventListenerAt:function(b){var c=this;c.removeHandler(c._titleList[b],c.toggleMode);c.removeHandler(c._titleList[b],"mouseenter");c.removeHandler(c._titleList[b],"mouseleave");c.removeHandler(c._titleList[b],"mousedown");c.removeHandler(c._titleList[b],"mouseup");c.removeHandler(c._closeButtonList[b],"click")},_moveSelectionTrack:function(n,c,b){var h=this;if(n===-1){return}if(this._titleList.length===0){return}if(n>=this._titleList.length){return}var m=this._titleList[n],o=a(m);h._refreshBarPosition();if(this.selectionTracker&&this._selectionTracker){var i;h._stop(h._selectionTrackerHelper);this._unlockAnimation("selectionTracker");if(b===undefined){i=parseInt(o.position().left,10);if(!isNaN(parseInt(this._unorderedListHelper.css("left"),10))){i+=parseInt(this._unorderedListHelper.css("left"),10)}if(!isNaN(parseInt(this._unorderedListHelper.css("margin-left"),10))){i+=parseInt(this._unorderedListHelper.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-left"),10))){i+=parseInt(o.css("margin-left"),10)}if(!isNaN(parseInt(o.css("margin-right"),10))){}}else{i=b}var g=0;var e=0;if(this.position==="top"){g=this._height(h._headerWrapper)-m.offsetHeight;if(!this.autoHeight){e+=parseInt(o.css("margin-top"),10)}}this._lockAnimation("selectionTracker");var l=parseInt(o.css("padding-left"),10)+parseInt(o.css("padding-right"),10);var f=this.position==="top"?0:1;var k=parseInt(a(this._headerWrapper).css("padding-top"),10);var j=parseInt(o.css("padding-top"),10)+parseInt(o.css("padding-bottom"),10);this._selectionTracker.style.visibility="visible";this._moveSelectionTrackerContainer.style.visibility="visible";var d=parseInt(o.css("margin-top"),10);if(isNaN(d)){d=0}h._refreshBarPosition();h._selectionTrackerHelper.animate({top:k+d-f,left:i+"px",height:parseInt(this._height(m)+j,10),width:h._width(m)+l},c,function(){h._unlockAnimation("selectionTracker");h._selectionTracker.style.visibility="hidden";h._addSelectStyle(n,true);h._moveSelectionTrackerContainer.style.visibility="hidden"})}},destroy:function(){a.jqx.utilities.resize(this.host,null,true);if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){this.removeHandler(a(window.top.document),"mouseup.tabs"+this.element.id)}}this.host.remove()},_switchTabs:function(b,d){if(b!==d&&!this._activeAnimation()&&!this._tabCaptured){var c=this;this._raiseEvent(7,{item:d});this._raiseEvent(6,{item:b});if(this._currentEvent){if(this._currentEvent.cancel){this._currentEvent=null;return}}this._unselect(d,null,true);this._select(b,c.contentTransitionDuration,null,true);return true}return false},_activeAnimation:function(){for(var b in this._isAnimated){if(this._isAnimated.hasOwnProperty(b)){if(this._isAnimated[b]){return true}}}return false},_indexOf:function(c){var b=this.length();while(b){b--;if(this._titleList[b]===c||this._contentList[b]===c){return b}}return -1},_validateProperties:function(){try{if(this.scrollAnimationDuration<0||isNaN(this.scrollAnimationDuration)){throw new Error(this._invalidArgumentExceptions.invalidScrollAnimationDuration)}if(parseInt(this.width,10)<0&&this.width!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(parseInt(this.height,10)<0&&this.height!=="auto"){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.animationType!=="none"&&this.animationType!=="fade"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(this.contentTransitionDuration<0||isNaN(this.contentTransitionDuration)){throw new Error(this._invalidArgumentExceptions.invalidcontentTransitionDuration)}if(this.toggleMode!=="click"&&this.toggleMode!=="dblclick"&&this.toggleMode!=="mouseenter"&&this.toggleMode!=="none"){throw new Error(this._invalidArgumentExceptions.invalidToggleMode)}if(this.position!=="top"&&this.position!=="bottom"){throw new Error(this._invalidArgumentExceptions.invalidPosition)}if(this.scrollPosition!=="left"&&this.scrollPosition!=="right"&&this.scrollPosition!=="both"){throw new Error(this._invalidArgumentExceptions.invalidScrollPosition)}if(this.scrollStep<0||isNaN(this.scrollStep)){throw new Error(this._invalidArgumentExceptions.invalidScrollStep)}if(this._titleList.length!==this._contentList.length||this._titleList.length===0){throw new Error(this._invalidArgumentExceptions.invalidStructure)}if(this.arrowButtonSize<0||isNaN(this.arrowButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidArrowSize)}if(this.closeButtonSize<0||isNaN(this.closeButtonSize)){throw new Error(this._invalidArgumentExceptions.invalidCloseSize)}}catch(b){try{console.log(b)}catch(c){}}},_startScrollRepeat:function(d,c){var b=this;if(d){this._scrollLeft(c)}else{this._scrollRight(c)}if(this._scrollTimeout){clearTimeout(this._scrollTimeout)}this._scrollTimeout=setTimeout(function(){b._startScrollRepeat(d,b.scrollAnimationDuration)},c)},_performLayout:function(){var b=this.length();while(b){b--;if(this.position==="top"||this.position==="bottom"){if(this.rtl){this._titleList[b].style["float"]="right"}else{this._titleList[b].style["float"]="left"}}}this._fitToSize();this._performHeaderLayout();this._fitToSize()},updatetabsheader:function(){this._performHeaderLayout()},_setSize:function(){var b=this;b._fitToSize();b._positionArrows(b._totalItemsWidth);if(b._totalItemsWidth>b.element.offsetWidth){b._unorderedList.style.width=b._toPx(b._totalItemsWidth)}else{b._unorderedList.style.width=b.element.offsetWidth-2+"px"}b._fitToSize()},_addArrows:function(){if(this._leftArrow&&this._rightArrow){a(this._leftArrow).remove();a(this._rightArrow).remove()}this._leftArrow=document.createElement("div");this._leftArrow.innerHTML='';this._leftArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._leftArrow.style.zIndex=30;this._leftArrow.style.display="none";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.height="100%";this._rightArrow=document.createElement("div");this._rightArrow.innerHTML='';this._rightArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header");this._rightArrow.style.zIndex=30;this._rightArrow.style.display="none";this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.height="100%";this._headerWrapper.appendChild(this._leftArrow);this._headerWrapper.appendChild(this._rightArrow)},_tabsWithVisibleCloseButtons:function(){if(!this.showCloseButtons){return 0}var b=this.length();a.each(this._titleList,function(){var c=this.attr("hasclosebutton");if(c!==undefined&&c!==null){if(c==="false"||c===false){b--}}});return b},_calculateTitlesSize:function(){var g=this;function f(n,m){if(n){if(m){n.style.display="block"}else{n.style.display="none"}}}var l=0;var k=0;var h=this.length();if(this.rtl&&a.jqx.browser.msie&&a.jqx.browser.version<8){this._measureItem=document.createElement("span");this._measureItem.style.position="relative";this._measureItem.style.visibility="hidden";document.body.appendChild(this._measureItem)}while(h){h--;var j=this._titleList[h],b=g._closeButtonList[h];if(this._measureItem){this._measureItem.innerHTML=j.innerHTML;this._measureItem.html(this._titleList[h].html());j.style.width=g._toPx(g._width(this._measureItem))}j.style.position="static";f(b,false);k+=g._outerWidth(j,true);var e=g._outerHeight(j,true);if(l1)){d=false;if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[h]===1){f(b,false);d=true}}if(!d){k+=this.closeButtonSize;f(b,true)}}}j.style.height=this._toPx(g._height(j))}if(this._measureItem){a(this._measureItem).remove()}return{height:l,width:10+k}},_reorderHeaderElements:function(){if(this.selectionTracker){this._moveSelectionTrackerContainer.style.position="absolute";this._moveSelectionTrackerContainer.style.height="100%";this._moveSelectionTrackerContainer.style.top="0px";this._moveSelectionTrackerContainer.style.left="0px";this._moveSelectionTrackerContainer.style.width="100%"}this._headerWrapper.style.position="relative";this._headerWrapper.style.left="0px";this._headerWrapper.style.top="0px";if(this.scrollable){this._rightArrow.style.width=this._toPx(this.arrowButtonSize);this._rightArrow.style.position="absolute";this._rightArrow.style.top="0px";this._leftArrow.style.width=this._toPx(this.arrowButtonSize);this._leftArrow.style.position="absolute";this._leftArrow.style.top="0px";var c=this.theme&&this.theme.indexOf("ui-")!==-1?3:0;if(c>0){this._rightArrow.className+=" "+this.toThemeProperty("jqx-rc-r");this._leftArrow.className+=" "+this.toThemeProperty("jqx-rc-l")}var b=this.scrollPosition;if(this.rtl){if(b==="left"){b="right"}if(b==="right"){b="left"}}switch(b){case"both":this._rightArrow.style.right="0px";this._leftArrow.style.left="0px";break;case"left":this._rightArrow.style.left=this._toPx(this.arrowButtonSize);this._leftArrow.style.left="0px";break;case"right":this._rightArrow.style.right=this._toPx(-c);this._leftArrow.style.right=this._toPx(parseInt(this.arrowButtonSize,10)-c);break}}},_positionArrows:function(b){if(b>=this._headerWrapper.offsetWidth&&this.scrollable){this._needScroll=true;if(this._unorderedListHelper.position().left===0){this._unorderedListLeftBackup=this._getArrowsDisplacement()+"px"}this._leftArrow.style.display="block";this._rightArrow.style.display="block"}else{this._needScroll=false;this._leftArrow.style.display="none";this._rightArrow.style.display="none";this._unorderedList.style.left="0px"}},_performHeaderLayout:function(){this._removeSelectStyle();var b=this._calculateTitlesSize();var e=b.height;var c=b.width;this._headerWrapper.style.height=this._toPx(e);this._unorderedList.style.height=this._toPx(e);if(this.headerHeight!==null&&this.headerHeight!=="auto"){this._headerWrapper.style.height=this._toPx(this.headerHeight);this._unorderedList.style.height=this._toPx(this.headerHeight)}var d=this._width(this.element);if(c>d){this._unorderedList.style.width=this._toPx(c)}else{this._unorderedList.style.width=this._toPx(d)}if(a.jqx.browser.msie&&a.jqx.browser.version<8){this._unorderedList.style.position="relative";this._unorderedList.style.overflow="hidden"}this._reorderHeaderElements();c=c+parseInt(this._unorderedListHelper.css("margin-left"),10);this._totalItemsWidth=c;this._positionArrows(c);this._unorderedList.style.position="relative";this._unorderedList.style.top="0px";this._verticalAlignElements();this._moveSelectionTrack(this._selectedItem,0);this._addSelectStyle(this.selectedItem)},_verticalAlignElements:function(){var j=this.length();while(j){j--;var n=this._titleList[j],p=a(n),b=p.children()[0],m=this._closeButtonList[j],k=parseInt(p.css("padding-top"),10);if(!k){k=0}if(this.autoHeight){var c=parseInt(p.css("padding-top"),10),o=parseInt(p.css("padding-bottom"),10),i=p.css("border-top-width"),f=p.css("border-bottom-width");if(i.indexOf("px")===-1){i=1}else{i=parseInt(i,10)}if(f.indexOf("px")===-1){f=1}else{f=parseInt(f,10)}n.style.height=this._toPx(this._outerHeight(this._unorderedList,true)-(c+o+i+f))}else{if(this.position==="top"){var h=this._height(this._unorderedList)-parseInt(this._outerHeight(n,true),10);if(parseInt(p.css("margin-top"),10)!==h&&h!==0){n.style.marginTop=this._toPx(h)}}else{n.style.height=this._toPx(this._height(n))}}b.style.height="100%";var e=this._height(n);if(m){var g=e/2-this._height(m)/2;m.style.marginTop=this._toPx(1+g)}var l=e/2-this._height(b)/2;b.style.marginTop=this._toPx(l)}if(this.scrollable){var d=(parseInt(this._headerWrapper.offsetHeight,10)-this.arrowButtonSize)/2;a(this._rightArrow).children()[0].style.marginTop=this._toPx(d);this._rightArrow.style.height="100%";a(this._leftArrow).children()[0].style.marginTop=this._toPx(d);this._leftArrow.style.height="100%"}},_getImageUrl:function(c){var b=c.css("background-image");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},_fitToSize:function(){var c=false;var e=false;var d=this;if(d.width!==null&&d.width.toString().indexOf("%")!==-1){c=true}if(d.height!==null&&d.height.toString().indexOf("%")!==-1){e=true}if(c){this.element.style.width=this.width;this._contentWrapper.style.width="100%"}else{d.element.style.width=d._toPx(d.width);if(this.width!=="auto"){this._contentWrapper.style.width="100%"}}var b;if(e){this.element.style.height=this.height;this._contentWrapper.style.width="100%";this._contentWrapper.style.height="auto";b=this.element.offsetHeight-this._headerWrapper.offsetHeight-2;this._contentWrapper.style.height=b+"px"}else{if(this.height!=="auto"){d.element.style.height=d._toPx(d.height);b=this._height(d.element)-this._headerWrapper.offsetHeight;this._contentWrapper.style.height=d._toPx(b)}else{this._contentWrapper.style.height="auto"}}},_maxHeightTab:function(){var c=this.length();var d=-1;var b=-1;while(c){c--;if(d0){a(g).find(".jqx-tabs-close-button").remove()}d.style["float"]=f;d.innerHTML=g.innerHTML;g.innerHTML="";var b=document.createElement("div");b.className=this.toThemeProperty("jqx-tabs-close-button");b.style.height=this._toPx(this.closeButtonSize);b.style.width=this._toPx(this.closeButtonSize);b.style["float"]=f;b.style.fontSize="1px";g.appendChild(d);g.appendChild(b);if(e===true){this._closeButtonList[c]=b}else{this._closeButtonList.splice(c,0,b)}if(!this.showCloseButtons){b.style.display="none"}else{if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[c]===1){b.style.display="none"}}}},_addCloseButtons:function(){var b=this.length();while(b){b--;this._addCloseButton(b,true)}},_prepareTabs:function(){var c=this.length();var b=this.selectionTracker;this.selectionTracker=false;while(c){c--;if(this._selectedItem!==c){this._unselect(c,null,false)}}this._select(this._selectedItem,0,null,false);this.selectionTracker=b;if(this.initTabContent){if(!this._initTabContentList[this.selectedItem]){if(!this._hiddenParent()){this.initTabContent(this.selectedItem);this._initTabContentList[this.selectedItem]=true}}}},_isValidIndex:function(b){return(b>=0&&b=0&&f!==undefined){var c=null;if(this.showCloseButtons){c=this._closeButtonList[d];if(this.hiddenCloseButtons){if(this.hiddenCloseButtons[d]===1){c=null}}}var b="jqx-fill-state-hover",e=" jqx-fill-state-pressed";if(this.position==="top"){b+=" jqx-tabs-title-hover-top";e+=" jqx-tabs-title-selected-top"}else{b+=" jqx-tabs-title-hover-bottom";e+=" jqx-tabs-title-selected-bottom"}this._removeClass(f,this.toThemeProperty(b));f.className+=this.toThemeProperty(e);if(c!==null){c.className+=" "+this.toThemeProperty("jqx-tabs-close-button-selected")}}}},_addItemTo:function(g,c,e){if(c");a(this._headerWrapper).append(b);b.addClass(this.toThemeProperty("jqx-tabs-bar"));this.bar=b}setTimeout(function(){var d=parseInt(c._unorderedListHelper.css("left"),10);var e=parseInt(c._unorderedListHelper.css("margin-left"));if(d){c.bar.css("left",e+c._titleList[c._selectedItem].offsetLeft+d)}else{c.bar.css("left",e+c._titleList[c._selectedItem].offsetLeft)}c.bar.width(a(c._titleList[c._selectedItem]).outerWidth()-2)})},_select:function(h,e,l,b,c){if(!this._tabCaptured){this.host.attr("hideFocus","true");var g=this;if(c===undefined){this._addSelectStyle(h)}else{this._addSelectStyle(h,c)}var k=a(g._titleList[h]),d=g._titleList[h].getAttribute("id"),j=a(g._contentList[h]);if(this.isCollapsed&&this.collapsible){j[0].style.display="none";this._selectCallback(h,l,b);return}g._refreshBarPosition();switch(this.animationType){case"none":if(!g.selectionTracker){for(var f=0;f=0){if(!this._tabCaptured){var g=this,e=g._contentList[d],c=a(e),h=g._titleList[d],f=a(h);if(c.initAnimate&&c.animate===undefined){c.initAnimate()}g._stop(c);if(this.animationType==="fade"){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}else{if(this.selectionTracker){setTimeout(function(){e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)},this.selectionTrackerAnimationDuration)}else{e.style.display="none";a.jqx.aria(f,"aria-selected",false);a.jqx.aria(c,"aria-hidden",true)}}this._unselectCallback(d,i,b);if(!this.selectionTracker){g._removeClass(h,g.toThemeProperty("jqx-tabs-title-selected jqx-fill-state-pressed"))}}}},_unselectCallback:function(c,d,b){if(b){this._raiseEvent(8,{item:c})}if(d){d()}},disable:function(){var b=this.length();while(b){b--;this.disableAt(b)}},enable:function(){var b=this.length();while(b){b--;this.enableAt(b)}},getEnabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(!this.disabled){b++}});return b},getDisabledTabsCount:function(){var b=0;a.each(this._titleList,function(){if(this.disabled){b++}});return b},removeAt:function(b){if(this._isValidIndex(b)&&(this.canCloseAllTabs||this.length()>1)){this._removeHoverStates();this._initTabContentList[b]=false;var d=this,c=d._outerWidth(this._titleList[b],true),g=this.getTitleAt(b);this._unorderedList.style.width=d._toPx(d._width(this._unorderedList)-c);a(this._titleList[b]).remove();a(this._contentList[b]).remove();this._titleList.splice(b,1);this._contentList.splice(b,1);d._closeButtonList.splice(b,1);this._addStyles();this._performHeaderLayout();this._removeEventHandlers();this._addEventHandlers();this._raiseEvent(3,{item:b,title:g});this._isAnimated={};var f;if(this.selectedItem>0){this._selectedItem=-1;if(this.selectedItem>=b){f=this._getPreviousIndex(this.selectedItem);this.select(f)}else{this.select(d.selectedItem)}}else{this._selectedItem=-1;f=this._getNextIndex(this.selectedItem);this.select(f)}if(parseInt(this._unorderedListHelper.css("left"),10)>this._getArrowsDisplacement()){this._unorderedList.style.left=d._toPx(this._getArrowsDisplacement())}if(d._width(this._unorderedList)<=d._width(this._headerWrapper)){var e=(this.enableScrollAnimation)?this.scrollAnimationDuration:0;this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:0},e,function(){d._unlockAnimation("unorderedList")})}}},removeFirst:function(){this.removeAt(0)},removeLast:function(){this.removeAt(this.length()-1)},disableAt:function(b){var d=this._titleList[b];if(!d.disabled||d.disabled===undefined){if(this.selectedItem===b){var c=this.next();if(!c){c=this.previous()}}d.disabled=true;this.removeHandler(d,this.toggleMode);if(this.enabledHover){a(d).off("mouseenter").off("mouseleave")}this._removeEventListenerAt(b);d.className+=" "+this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled");this._raiseEvent(5,{item:b})}},enableAt:function(b){var c=this._titleList[b];if(c.disabled){c.disabled=false;this._addEventListenerAt(b);this._removeClass(c,this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled"));this._raiseEvent(4,{item:b})}},addAt:function(d,g,e){if(d>=0&&d<=this.length()){this._removeHoverStates();var b=document.createElement("li");b.innerHTML=g;b.className=this.toThemeProperty("jqx-tabs-title jqx-item");var f=document.createElement("div");f.innerHTML=e;f.className=this.toThemeProperty("jqx-tabs-content-element");if(this.position==="bottom"){b.className+=" "+this.toThemeProperty("jqx-tabs-title-bottom")}var c=false;if(this._titleList.length===0){this._unorderedList.appendChild(b)}else{if(d=0){this._unorderedList.insertBefore(b,this._titleList[d])}else{this._unorderedList.appendChild(b)}}this._contentWrapper.appendChild(f);this._addItemTo(this._titleList,d,b);this._addItemTo(this._contentList,d,f);this._addCloseButton(d);if(this._selectedItem>d){this._selectedItem++}this._switchTabs(d,this._selectedItem);this._selectedItem=d;this._uiRefresh(c);this._raiseEvent(2,{item:d});this._moveSelectionTrack(this._selectedItem,0)}},addFirst:function(c,b){this.addAt(0,c,b)},addLast:function(c,b){this.addAt(this.length(),c,b)},val:function(b){if(arguments.length===0||typeof(b)==="object"){return this._selectedItem}this.select(b);return this._selectedItem},select:function(b){if(typeof(b)==="object"){b=this._indexOf(b)}var d=b>=0&&b0&&b0&&c<=this._titleList.length){c--;if(!this._titleList[c].disabled){return c}}return b}else{return 0}},_getNextIndex:function(c){if(c!==undefined&&!isNaN(c)){var b=c;while(c>=0&&c=0&&bb-this._getArrowsDisplacement()){h=-l+k-f-((this.scrollable)?(2*this.arrowButtonSize-this._getArrowsDisplacement()):0);c=k-f-this._getArrowsDisplacement()}else{this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration);return true}}this._lockAnimation("unorderedList");this._unorderedListHelper.animate({left:h},this.scrollAnimationDuration,function(){d._unlockAnimation("unorderedList");d._moveSelectionTrack(d._selectedItem,0);return true});this._moveSelectionTrack(e,this.selectionTrackerAnimationDuration,c);return true},isVisibleAt:function(d){var c=this;if(d===undefined||d===-1||d===null){d=c.selectedItem}if(!c._isValidIndex(d)){return false}var h=c._titleList[d];var j=parseInt(a(h).position().left,10)+parseInt(c._unorderedListHelper.css("margin-left"),10);var f=parseInt(c._unorderedListHelper.css("left"),10);var i=c._outerWidth(c._headerWrapper,true);var e=c._outerWidth(h,true);var g=f-c._getArrowsDisplacement();var b=i-c._getArrowsDisplacement()-g;if(j<-g){return false}else{if(j+e>b){return false}else{return true}}return true},isDisabled:function(b){return this._titleList[b].disabled},_lockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=true}},_unlockAnimation:function(b){if(this._isAnimated){this._isAnimated[b]=false}},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length===2){d._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length===2){return}this._validateProperties();switch(c){case"touchMode":if(d){b.enabledHover=false;b.keyboardNavigation=false}break;case"width":case"height":b._setSize();return;case"disabled":if(d){this.disable()}else{this.enable()}return;case"showCloseButtons":if(d){this.showAllCloseButtons()}else{this.hideAllCloseButtons()}this._performHeaderLayout();return;case"selectedItem":if(this._isValidIndex(d)){this.select(d)}return;case"scrollStep":case"contentTransitionDuration":case"scrollAnimationDuration":case"enableScrollAnimation":return;case"selectionTracker":if(d){this._refresh();this.select(this._selectedItem)}else{if(this._selectionTracker){this._selectionTrackerHelper.remove()}}return;case"scrollable":if(d){this._refresh();this.select(this._selectedItem)}else{a(this._leftArrow).remove();a(this._rightArrow).remove();this._performHeaderLayout()}return;case"autoHeight":this._performHeaderLayout();return;case"theme":a.jqx.utilities.setTheme(e,d,this.host);return}this._unorderedList.style.left="0px";this._refresh();this.select(this._selectedItem);this._addSelectStyle(this._selectedItem,true)},_toPx:function(b){if(typeof b==="number"){return b+"px"}else{return b}},_removeClass:function(c,b){a(c).removeClass(b)},_width:function(e){var b=a(e),g=b.css("border-left-width"),c=b.css("border-right-width"),d=parseInt(b.css("padding-left"),10),h=parseInt(b.css("padding-right"),10);if(g.indexOf("px")===-1){g=1}else{g=parseInt(g,10)}if(c.indexOf("px")===-1){c=1}else{c=parseInt(c,10)}var f=e.offsetWidth-(g+c+d+h);return f},_outerWidth:function(c,g){var f=c.offsetWidth;if(g){var b=a(c),d=parseInt(b.css("margin-left"),10),e=parseInt(b.css("margin-right"),10);f+=d+e}return f},_height:function(e){var c=a(e),h=c.css("border-top-width"),d=c.css("border-bottom-width"),f=parseInt(c.css("padding-top"),10),g=parseInt(c.css("padding-bottom"),10);if(h.indexOf("px")===-1){h=1}else{h=parseInt(h,10)}if(d.indexOf("px")===-1){d=1}else{d=parseInt(d,10)}var b=e.offsetHeight-(h+d+f+g);return b},_outerHeight:function(e,g){var f=e.offsetHeight;if(g){var b=a(e),c=parseInt(b.css("margin-top"),10),d=parseInt(b.css("margin-bottom"),10);f+=c+d}return f},_stop:function(b){if(b.stop){b.stop()}else{b.animate("stop",true)}}})}(jqxBaseFramework)); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtagcloud.js --- a/www/jqwidgets/jqxtagcloud.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtagcloud.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtextarea.js --- a/www/jqwidgets/jqxtextarea.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtextarea.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtimepicker.js --- a/www/jqwidgets/jqxtimepicker.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtimepicker.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtoolbar.js --- a/www/jqwidgets/jqxtoolbar.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtoolbar.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtooltip.js --- a/www/jqwidgets/jqxtooltip.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtooltip.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtouch.js --- a/www/jqwidgets/jqxtouch.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtouch.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtree.js --- a/www/jqwidgets/jqxtree.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtree.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxtreegrid.js --- a/www/jqwidgets/jqxtreegrid.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxtreegrid.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(a){a.jqx.jqxWidget("jqxTreeGrid","jqxDataTable",{});a.extend(a.jqx._jqxTreeGrid.prototype,{defineInstance:function(){if(this.base){this.base.treeGrid=this;this.base.exportSettings={recordsInView:false,columnsHeader:true,hiddenColumns:false,serverURL:null,characterSet:null,collapsedRecords:false,fileName:"jqxTreeGrid"}}var b={pageSizeMode:"default",checkboxes:false,hierarchicalCheckboxes:false,icons:false,showSubAggregates:false,aggregatesPosition:"top",rowDetailsRenderer:null,virtualModeCreateRecords:null,virtualModeRecordCreating:null,loadingFailed:false};if(this===a.jqx._jqxTreeGrid.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){this.theme=this.base.theme;var c=this},deleteRow:function(b){var c=this.base;c.deleterowbykey(b)},updateRow:function(b,d){var c=this.base;c.updaterowbykey(b,d)},setCellValue:function(c,b,e){var d=this.base;d.setCellValueByKey(c,b,e)},getCellValue:function(c,b){var d=this.base;return d.getCellValueByKey(c,b)},lockRow:function(b){var c=this.base;c.lockrowbykey(b)},unlockRow:function(b){var c=this.base;c.unlockrowbykey(b)},selectRow:function(b){var c=this.base;c.selectrowbykey(b)},unselectRow:function(b){var c=this.base;c.unselectrowbykey(b)},ensureRowVisible:function(b){var c=this.base;c.ensurerowvisiblebykey(b)},beginCellEdit:function(c,b){var e=this.base;var d=e.getColumn(b);e.beginroweditbykey(c,d)},beginRowEdit:function(b){var c=this.base;c.beginroweditbykey(b)},endCellEdit:function(c,b,e){var d=this.base;d.endroweditbykey(c,e)},endRowEdit:function(b,d){var c=this.base;c.endroweditbykey(b,d)},_showLoadElement:function(){var b=this.base;if(b.host.css("display")=="block"){if(b.autoShowLoadElement){a(b.dataloadelement).css("visibility","visible");a(b.dataloadelement).css("display","block");b.dataloadelement.width(b.host.width());b.dataloadelement.height(b.host.height())}}},_hideLoadElement:function(){var b=this.base;if(b.host.css("display")=="block"){if(b.autoShowLoadElement){a(b.dataloadelement).css("visibility","hidden");a(b.dataloadelement).css("display","none");b.dataloadelement.width(b.host.width());b.dataloadelement.height(b.host.height())}}},getKey:function(b){if(b){return b.uid}},getRows:function(){var b=this.base;if(b.source.hierarchy){if(b.source.hierarchy.length!=0){return b.source.hierarchy}}return b.source.records},getCheckedRows:function(){var c=this.base;var d=c._names();var e=new Array();var b=function(j,g){if(!g){return}for(var h=0;h0){var aL=aG(c.records,new Array());for(var x=0;x0){if(c[c.length-1]){if(!c[c.length-1].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(c[c.length-2]){if(!c[c.length-2].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}}}}}for(var j=0;jN.dataview.pagesize*N.dataview.pagenum&&w<=N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){i.push(j)}if(w>N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){break}}return i};if(N.source.hierarchy.length===0){if(N.dataview.pagesize=="all"||!N.pageable||N.serverProcessing){var al=ap;if(N.pageable&&N.serverProcessing&&ap.length>N.dataview.pagesize){var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}}else{var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}var v=al}else{var ap=aG.call(N,ap,new Array());if(N.dataview.pagesize=="all"||!N.pageable){var al=ap}else{var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){al=aq(ap)}}var v=al;var I=N.dataview.pagenum;N.updatepagerdetails();if(N.dataview.pagenum!=I){if(N.dataview.pagesize=="all"||!N.pageable){var al=ap}else{var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){al=aq(ap)}}var v=al}}N.renderedRecords=v;var D=v.length;var aH=N.tableZIndex;var k=0;var ar=0;if(P){for(var Q=0;QU.maxwidth){ax=U.maxwidth}var aw=a('
    ');a(document.body).append(aw);var ah=aw.find("td");k=1+parseInt(ah.css("padding-left"))+parseInt(ah.css("padding-right"));aw.remove();break}}var B=N.rtl?" "+N.toTP("jqx-grid-table-rtl"):"";var y="";var X="
    ";var ac=null;for(var Q=0;QU.maxwidth){ax=U.maxwidth}ax-=k;if(ax<0){ax=0}if(P){var H=ax;if(Q==0){H++}X+="";y+=""}else{X+="";y+=""}ar+=ax}y+="";X+="";N._hiddencolumns=false;var r=false;if(D===0){var n='';var q=N.host.height();if(N.pageable){q-=N.pagerHeight;if(N.pagerPosition==="both"){q-=N.pagerHeight}}q-=N.columnsHeight;if(N.filterable){var aC=N.filter.find(".filterrow");var A=N.filter.find(".filterrow-hidden");var E=1;if(A.length>0){E=0}q-=N.filterHeight+N.filterHeight*aC.length*E}if(N.showstatusbar){q-=N.statusBarHeight}if(N.showAggregates){q-=N.aggregatesHeight}if(q<25){q=25}if(N.hScrollBar[0].style.visibility!="hidden"){q-=N.hScrollBar.outerHeight()}if(N.height==="auto"||N.height===null||N.autoheight){q=100}var ax=N.host.width()+2;var aw='";n+=aw;y+=n;X+=n;N.table[0].style.width=ar+2+"px";az=ar}var m=N.source._source.hierarchy&&N.source._source.hierarchy.groupingDataFields?N.source._source.hierarchy.groupingDataFields.length:0;for(var R=0;R0){if(au[J.level]';var ao='';if(au.aggregate){var n='';var ao=''}var V=0;if(!N.rowinfo[ad]){var z=au[J.checked];if(z===undefined){z=false}N.rowinfo[ad]={selected:au[J.selected],checked:z,icon:au[J.icon],aggregate:au.aggregate,row:au,leaf:au[J.leaf],expanded:au[J.expanded]}}else{if(N.rowinfo[ad].checked===undefined){N.rowinfo[ad].checked=au[J.checked]}if(N.rowinfo[ad].icon===undefined){N.rowinfo[ad].icon=au[J.icon]}if(N.rowinfo[ad].aggregate===undefined){N.rowinfo[ad].aggregate=au[J.aggregate]}if(N.rowinfo[ad].row===undefined){N.rowinfo[ad].row=au}if(N.rowinfo[ad].leaf===undefined){N.rowinfo[ad].leaf=au[J.leaf]}if(N.rowinfo[ad].expanded===undefined){N.rowinfo[ad].expanded=au[J.expanded]}}var h=N.rowinfo[ad];h.row=au;if(au.originalRecord){h.originalRecord=au.originalRecord}var o=0;for(var Q=0;QM.maxwidth){ax=M.maxwidth}ax-=k;if(ax<0){ax=0}var aJ=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");if(M.pinned){aJ+=" "+N.toTP("jqx-grid-cell-pinned")}if(N.sortcolumn===M.displayfield){aJ+=" "+N.toTP("jqx-grid-cell-sort")}if(N.altRows&&R%2!=0){aJ+=" "+N.toTP("jqx-grid-cell-alt")}if(N.rtl){aJ+=" "+N.toTP("jqx-cell-rtl")}var S="";if(m>0&&!P&&!au.aggregate){if(au[J.level]T.maxwidth){ax=T.maxwidth}aa-=k;if(aa<0){aa=0}H+=aa}ax=H}}var aw='";ak+='" class="'+aJ+'">';ak+=W;ak+="";if(!M.pinned){n+=aw;if(r){ao+=ak}}else{ao+=aw;n+=aw}if(m>0&&!P){if(au[J.level]";ao+="";y+=n;X+=ao;if(N.rowDetails&&!au.aggregate&&this.rowDetailsRenderer){var l='";y+=l;X+=l}}}y+="
    ';if(!N._loading){aw+=N.gridlocalization.emptydatastring}aw+="
    0&&au[J.level]0){h.leaf=false}if(N.dataview.filters.length>0){if(au.records&&au.records.length>0){var ab=false;for(var L=0;L0&&!au.aggregate){if(au[J.level]";W+=j;au[M.displayfield]+=c+":"+i[s]+"\n"}})}}else{W=""}}}if((o===1&&!N.rtl)||(M==ac&&N.rtl)||(m>0&&au[J.level]"}var am="";var aA="";var e="";if(this.checkboxes&&!au.aggregate){var aD=N.toThemeProperty("jqx-tree-grid-checkbox")+" "+d+" "+N.toThemeProperty("jqx-checkbox-default")+" "+N.toThemeProperty("jqx-fill-state-normal")+" "+N.toThemeProperty("jqx-rc-all");var g=true;if(a.isFunction(this.checkboxes)){g=this.checkboxes(ad,au);if(g==undefined){g=false}}if(g){if(h){var ay=h.checked;if(this.hierarchicalCheckboxes==false&&ay===null){ay=false}if(ay){aA+="
    "}else{if(ay===false){aA+=""}else{aA+="
    "}}}else{aA+=""}}}if(this.icons&&!au.aggregate){var ag=N.toThemeProperty("jqx-tree-grid-icon")+" "+d;if(N.rtl){var ag=N.toThemeProperty("jqx-tree-grid-icon")+" "+N.toThemeProperty("jqx-tree-grid-icon-rtl")+" "+d}var aB=N.toThemeProperty("jqx-tree-grid-icon-size")+" "+d;var f=h.icon;if(a.isFunction(this.icons)){h.icon=this.icons(ad,au);if(h.icon){f=true}}if(f){if(h.icon){e+=""}else{e+=""}}}var ae=N.autoRowHeight&&o===1&&M.autoCellHeight?" "+N.toTP("jqx-grid-cell-wrap"):"";var aj=af+am+aA+e+""+W+"";if(!N.rtl){W=aj}else{W=""+W+""+e+aA+am+af}}if(m>0&&P&&Q>=m){if(au[J.level]';aw+=W;aw+="
    '+ai+"
    ";X+="";if(r){if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(X+y)})}else{N.table[0].innerHTML=X+y}var aE=N.table.find("#table"+N.element.id);var aF=N.table.find("#pinnedtable"+N.element.id);aF.css("float","left");aF.css("pointer-events","none");aE.css("float","left");aF[0].style.position="absolute";aE[0].style.position="relative";aE[0].style.zIndex=aH-10;aF[0].style.zIndex=aH+10;N._table=aE;N._table[0].style.left="0px";N._pinnedTable=aF;if(P){aF[0].style.left="0px"}N._table[0].style.width=az+"px";N._pinnedTable[0].style.width=az+"px";if(N.rtl&&N._haspinned){N._pinnedTable[0].style.left=3-az+parseInt(N.element.style.width)+"px"}}else{if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(y)})}else{N.table[0].innerHTML=y}var K=N.table.find("#table"+N.element.id);N._table=K;if(a.jqx.browser.msie&&a.jqx.browser.version<10){N._table[0].style.width=az+"px"}if(D===0){N._table[0].style.width=(2+az)+"px"}}if(D===0){N._table[0].style.tableLayout="auto";if(N._pinnedTable){N._pinnedTable[0].style.tableLayout="auto"}}if(N.showAggregates){N._updatecolumnsaggregates()}if(N._loading&&D==0){N._arrange();this._showLoadElement()}if(N.rendered){N.rendered()}},propertyChangedHandler:function(d,l,c,k){if(d.isInitialized==undefined||d.isInitialized==false){return}var f=d.base;if(l=="pageSizeMode"||l=="hierarchicalCheckboxes"){d._renderrows()}else{if(l=="filterable"){f._render()}else{if(l==="height"){f.host.height(d.height);f.host.width(d.width);f._updatesize(false,true)}else{if(l==="width"){f.host.height(d.height);f.host.width(d.width);f._updatesize(true,false)}else{if(l==="source"){f.updateBoundData()}else{if(l==="columns"||l==="columnGroups"){f._columns=null;f._render()}else{if(l==="rtl"){f.content.css("left","");d.columns=d._columns;f.vScrollBar.jqxScrollBar({rtl:k});f.hScrollBar.jqxScrollBar({rtl:k});f._render()}else{if(l==="pagerMode"){d.pagerMode=k;f._initpager()}else{if(l=="pageSizeOptions"){f._initpager();var j=false;for(var e=0;e0){b.jqxDropDownList({theme:f.theme})}if(f.filtercolumnsList){f.filtercolumnsList.jqxDropDownList({theme:f.theme})}}f.refresh()}else{f.refresh()}}}}}}}}}}}}}}}}}},checkRow:function(c,d,b){var e=this.base;var g=e._names();if(e._loading){return}var f=e.rowinfo[c];if(f){f.checked=true;f.row[g.checked]=true;if(f.originalRecord){f.originalRecord[g.checked]=true}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(f.row,f.row)}if(d!==false){e._renderrows()}e._raiseEvent("rowCheck",{key:c,row:f.row})}else{var h=this.getRow(c);if(h){e.rowinfo[c]={row:h,checked:true};e.rowinfo[c].row[g.checked]=true;if(h.originalRecord){e.rowinfo[c].originalRecord=h.originalRecord}e._raiseEvent("rowCheck",{key:c,row:h});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(h,h)}if(d!==false){e._renderrows()}}}},checkRows:function(d,n){var e=this.base;var j=this;var i=e._names();var l=function(o){var p=new Array();var q=function(s){for(var r=0;r0){this.indeterminateRow(d.uid,false,"tree")}else{this.uncheckRow(d.uid,false,"tree")}}}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}var m=d[i.parent]?d[i.parent]:null;this.checkRows(m,n)}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}},indeterminateRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=null;g.row[h.checked]=null;if(g.originalRecord){g.originalRecord[h.checked]=null}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:null};f.rowinfo[c].row[h.checked]=null;if(i.originalRecord){f.rowinfo[c].originalRecord=i.originalRecord}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},uncheckRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=false;g.row[h.checked]=false;if(g.originalRecord){g.originalRecord[h.checked]=false}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}f._raiseEvent("rowUncheck",{key:c,row:g.row})}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:false};f.rowinfo[c].row[h.checked]=false;if(i.originalRecord){f.rowinfo[c].originalRecord=i.originalRecord}f._raiseEvent("rowUncheck",{key:c,row:i});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},expandRows:function(c){var e=this;if(!c){return}if(e.virtualModeCreateRecords){a.each(c,function(){var f=this;var g=function(){e.base._loading=false;e.expandRows(f.records)};e.base._loading=false;e.expandRow(f.uid,g)})}else{for(var d=0;d0){var aL=aG(c.records,new Array());for(var x=0;x0){if(c[c.length-1]){if(!c[c.length-1].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(c[c.length-2]){if(!c[c.length-2].aggregate){c.push({_visible:true,level:s,siblings:c,aggregate:true,leaf:true})}}}}}}for(var j=0;jN.dataview.pagesize*N.dataview.pagenum&&w<=N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){i.push(j)}if(w>N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize){break}}return i};if(N.source.hierarchy.length===0){if(N.dataview.pagesize=="all"||!N.pageable||N.serverProcessing){var al=ap;if(N.pageable&&N.serverProcessing&&ap.length>N.dataview.pagesize){var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}}else{var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize)}var v=al}else{var ap=aG.call(N,ap,new Array());if(N.dataview.pagesize=="all"||!N.pageable){var al=ap}else{var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){al=aq(ap)}}var v=al;var I=N.dataview.pagenum;N.updatepagerdetails();if(N.dataview.pagenum!=I){if(N.dataview.pagesize=="all"||!N.pageable){var al=ap}else{var al=ap.slice(N.dataview.pagesize*N.dataview.pagenum,N.dataview.pagesize*N.dataview.pagenum+N.dataview.pagesize);if(this.pageSizeMode=="root"){al=aq(ap)}}var v=al}}N.renderedRecords=v;var D=v.length;var aH=N.tableZIndex;var k=0;var ar=0;if(P){for(var Q=0;QU.maxwidth){ax=U.maxwidth}var aw=a('
    ');a(document.body).append(aw);var ah=aw.find("td");k=1+parseInt(ah.css("padding-left"))+parseInt(ah.css("padding-right"));aw.remove();break}}var B=N.rtl?" "+N.toTP("jqx-grid-table-rtl"):"";var y="";var X="
    ";var ac=null;for(var Q=0;QU.maxwidth){ax=U.maxwidth}ax-=k;if(ax<0){ax=0}if(P){var H=ax;if(Q==0){H++}X+="";y+=""}else{X+="";y+=""}ar+=ax}y+="";X+="";N._hiddencolumns=false;var r=false;if(D===0){var n='';var q=N.host.height();if(N.pageable){q-=N.pagerHeight;if(N.pagerPosition==="both"){q-=N.pagerHeight}}q-=N.columnsHeight;if(N.filterable){var aC=N.filter.find(".filterrow");var A=N.filter.find(".filterrow-hidden");var E=1;if(A.length>0){E=0}q-=N.filterHeight+N.filterHeight*aC.length*E}if(N.showstatusbar){q-=N.statusBarHeight}if(N.showAggregates){q-=N.aggregatesHeight}if(q<25){q=25}if(N.hScrollBar[0].style.visibility!="hidden"){q-=N.hScrollBar.outerHeight()}if(N.height==="auto"||N.height===null||N.autoheight){q=100}var ax=N.host.width()+2;var aw='";n+=aw;y+=n;X+=n;N.table[0].style.width=ar+2+"px";az=ar}var m=N.source._source.hierarchy&&N.source._source.hierarchy.groupingDataFields?N.source._source.hierarchy.groupingDataFields.length:0;for(var R=0;R0){if(au[J.level]';var ao='';if(au.aggregate){var n='';var ao=''}var V=0;if(!N.rowinfo[ad]){var z=au[J.checked];if(z===undefined){z=false}N.rowinfo[ad]={selected:au[J.selected],checked:z,icon:au[J.icon],aggregate:au.aggregate,row:au,leaf:au[J.leaf],expanded:au[J.expanded]}}else{if(N.rowinfo[ad].checked===undefined){N.rowinfo[ad].checked=au[J.checked]}if(N.rowinfo[ad].icon===undefined){N.rowinfo[ad].icon=au[J.icon]}if(N.rowinfo[ad].aggregate===undefined){N.rowinfo[ad].aggregate=au[J.aggregate]}if(N.rowinfo[ad].row===undefined){N.rowinfo[ad].row=au}if(N.rowinfo[ad].leaf===undefined){N.rowinfo[ad].leaf=au[J.leaf]}if(N.rowinfo[ad].expanded===undefined){N.rowinfo[ad].expanded=au[J.expanded]}}var h=N.rowinfo[ad];h.row=au;if(au.originalRecord){h.originalRecord=au.originalRecord}var o=0;for(var Q=0;QM.maxwidth){ax=M.maxwidth}ax-=k;if(ax<0){ax=0}var aJ=N.toTP("jqx-cell")+" "+N.toTP("jqx-grid-cell")+" "+N.toTP("jqx-item");if(M.pinned){aJ+=" "+N.toTP("jqx-grid-cell-pinned")}if(N.sortcolumn===M.displayfield){aJ+=" "+N.toTP("jqx-grid-cell-sort")}if(N.altRows&&R%2!=0){aJ+=" "+N.toTP("jqx-grid-cell-alt")}if(N.rtl){aJ+=" "+N.toTP("jqx-cell-rtl")}var S="";if(m>0&&!P&&!au.aggregate){if(au[J.level]T.maxwidth){ax=T.maxwidth}aa-=k;if(aa<0){aa=0}H+=aa}ax=H}}var aw='";ak+='" class="'+aJ+'">';ak+=W;ak+="";if(!M.pinned){n+=aw;if(r){ao+=ak}}else{ao+=aw;n+=aw}if(m>0&&!P){if(au[J.level]";ao+="";y+=n;X+=ao;if(N.rowDetails&&!au.aggregate&&this.rowDetailsRenderer){var l='";y+=l;X+=l}}}y+="
    ';if(!N._loading){aw+=N.gridlocalization.emptydatastring}aw+="
    0&&au[J.level]0){h.leaf=false}if(N.dataview.filters.length>0){if(au.records&&au.records.length>0){var ab=false;for(var L=0;L0&&!au.aggregate){if(au[J.level]";W+=j;au[M.displayfield]+=c+":"+i[s]+"\n"}})}}else{W=""}}}if((o===1&&!N.rtl)||(M==ac&&N.rtl)||(m>0&&au[J.level]"}var am="";var aA="";var e="";if(this.checkboxes&&!au.aggregate){var aD=N.toThemeProperty("jqx-tree-grid-checkbox")+" "+d+" "+N.toThemeProperty("jqx-checkbox-default")+" "+N.toThemeProperty("jqx-fill-state-normal")+" "+N.toThemeProperty("jqx-rc-all");var g=true;if(a.isFunction(this.checkboxes)){g=this.checkboxes(ad,au);if(g==undefined){g=false}}if(g){if(h){var ay=h.checked;if(ay===undefined){ay=false}if(this.hierarchicalCheckboxes==false&&ay===null){ay=false}if(ay){aA+="
    "}else{if(ay===false){aA+=""}else{aA+="
    "}}}else{aA+=""}}}if(this.icons&&!au.aggregate){var ag=N.toThemeProperty("jqx-tree-grid-icon")+" "+d;if(N.rtl){var ag=N.toThemeProperty("jqx-tree-grid-icon")+" "+N.toThemeProperty("jqx-tree-grid-icon-rtl")+" "+d}var aB=N.toThemeProperty("jqx-tree-grid-icon-size")+" "+d;var f=h.icon;if(a.isFunction(this.icons)){h.icon=this.icons(ad,au);if(h.icon){f=true}}if(f){if(h.icon){e+=""}else{e+=""}}}var ae=N.autoRowHeight&&o===1&&M.autoCellHeight?" "+N.toTP("jqx-grid-cell-wrap"):"";var aj=af+am+aA+e+""+W+"";if(!N.rtl){W=aj}else{W=""+W+""+e+aA+am+af}}if(m>0&&P&&Q>=m){if(au[J.level]';aw+=W;aw+="
    '+ai+"
    ";X+="";if(r){if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(X+y)})}else{N.table[0].innerHTML=X+y}var aE=N.table.find("#table"+N.element.id);var aF=N.table.find("#pinnedtable"+N.element.id);aF.css("float","left");aF.css("pointer-events","none");aE.css("float","left");aF[0].style.position="absolute";aE[0].style.position="relative";aE[0].style.zIndex=aH-10;aF[0].style.zIndex=aH+10;N._table=aE;N._table[0].style.left="0px";N._pinnedTable=aF;if(P){aF[0].style.left="0px"}N._table[0].style.width=az+"px";N._pinnedTable[0].style.width=az+"px";if(N.rtl&&N._haspinned){N._pinnedTable[0].style.left=3-az+parseInt(N.element.style.width)+"px"}}else{if(N.WinJS){MSApp.execUnsafeLocalFunction(function(){N.table.html(y)})}else{N.table[0].innerHTML=y}var K=N.table.find("#table"+N.element.id);N._table=K;if(a.jqx.browser.msie&&a.jqx.browser.version<10){N._table[0].style.width=az+"px"}if(D===0){N._table[0].style.width=(2+az)+"px"}}if(D===0){N._table[0].style.tableLayout="auto";if(N._pinnedTable){N._pinnedTable[0].style.tableLayout="auto"}}if(N.showAggregates){N._updatecolumnsaggregates()}if(N._loading&&D==0){N._arrange();this._showLoadElement()}if(N.rendered){N.rendered()}},propertyChangedHandler:function(d,m,c,l){if(d.isInitialized==undefined||d.isInitialized==false){return}var g=d.base;if(m=="pageSizeMode"||m=="hierarchicalCheckboxes"){d._renderrows()}else{if(m=="filterable"){g._render()}else{if(m==="height"){g.host.height(d.height);g.host.width(d.width);g._updatesize(false,true)}else{if(m==="width"){g.host.height(d.height);g.host.width(d.width);g._updatesize(true,false)}else{if(m==="source"){g.updateBoundData()}else{if(m==="columns"||m==="columnGroups"){g._columns=null;g._render()}else{if(m==="rtl"){g.content.css("left","");d.columns=d._columns;g.vScrollBar.jqxScrollBar({rtl:l});g.hScrollBar.jqxScrollBar({rtl:l});g._render()}else{if(m==="pagerMode"){d.pagerMode=l;g._initpager()}else{if(m=="pageSizeOptions"){g._initpager();var k=false;for(var f=0;f0){b.jqxDropDownList({theme:e})}if(g.filtercolumnsList){g.filtercolumnsList.jqxDropDownList({theme:e})}}g.refresh()}else{g.refresh()}}}}}}}}}}}}}}}}}},checkRow:function(c,d,b){var e=this.base;var g=e._names();if(e._loading){return}var f=e.rowinfo[c];if(f){f.checked=true;f.row[g.checked]=true;if(f.originalRecord){f.originalRecord[g.checked]=true}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(f.row,f.row)}if(d!==false){e._renderrows()}e._raiseEvent("rowCheck",{key:c,row:f.row})}else{var h=this.getRow(c);if(h){e.rowinfo[c]={row:h,checked:true};e.rowinfo[c].row[g.checked]=true;if(h.originalRecord){e.rowinfo[c].originalRecord=h.originalRecord}e._raiseEvent("rowCheck",{key:c,row:h});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(h,h)}if(d!==false){e._renderrows()}}}},checkRows:function(d,n){var e=this.base;var j=this;var i=e._names();var l=function(o){var p=new Array();var q=function(s){for(var r=0;r0){this.indeterminateRow(d.uid,false,"tree")}else{this.uncheckRow(d.uid,false,"tree")}}}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}var m=d[i.parent]?d[i.parent]:null;this.checkRows(m,n)}else{var k=n[i.checked];var h=l(n);a.each(h,function(){if(k===true){j.checkRow(this.uid,false,"tree")}else{if(k===false){j.uncheckRow(this.uid,false,"tree")}else{j.indeterminateRow(this.uid,false,"tree")}}})}},indeterminateRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=null;g.row[h.checked]=null;if(g.originalRecord){g.originalRecord[h.checked]=null}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:null};f.rowinfo[c].row[h.checked]=null;if(i.originalRecord){f.rowinfo[c].originalRecord=i.originalRecord}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},uncheckRow:function(c,d,b){var f=this.base;var h=f._names();if(f._loading){return}var e=this;var g=f.rowinfo[c];if(g){g.checked=false;g.row[h.checked]=false;if(g.originalRecord){g.originalRecord[h.checked]=false}if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(g.row,g.row)}if(d!==false){f._renderrows()}f._raiseEvent("rowUncheck",{key:c,row:g.row})}else{var i=this.getRow(c);if(i){f.rowinfo[c]={row:i,checked:false};f.rowinfo[c].row[h.checked]=false;if(i.originalRecord){f.rowinfo[c].originalRecord=i.originalRecord}f._raiseEvent("rowUncheck",{key:c,row:i});if(b==undefined&&this.hierarchicalCheckboxes){this.checkRows(i,i)}if(d!==false){f._renderrows()}}}},expandRows:function(c){var e=this;if(!c){return}if(e.virtualModeCreateRecords){a.each(c,function(){var f=this;var g=function(){e.base._loading=false;e.expandRows(f.records)};e.base._loading=false;e.expandRow(f.uid,g)})}else{for(var d=0;dj){f=j;h=c}}}d--;if(d==0){if(typeof q==="function"){l._handleValidation(b,f,h,k);if(q){q(b)}}}};this._validateRule(this.rules[g],m)}else{p=this._validateRule(this.rules[g])}if(false==p){b=false;c=a(this.rules[g].input);k.push(c);var e=c.offset();if(e){j=e.top;if(f>j){f=j;h=c}}}}if(d==0){this._handleValidation(b,f,h,k);return b}else{return undefined}},validateInput:function(b){var e=this._getRulesForInput(b),d=true;for(var c=0;c0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.find(".jqx-text-area").length>0){c.find(".jqx-text-area").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}};if(e){f=e.hint;if(f){if(this.positions){if(this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]){this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]=null}}if(this.animation==="fade"){f.fadeOut(this.animationDuration,function(){f.remove();d()})}else{f.remove();d()}}e.hint=null}},_handleValidation:function(b,e,d,c){if(!b){this._scrollHandler(e);if(this.focus){d.focus()}this._raiseEvent(0,{invalidInputs:c});if(typeof this.onError==="function"){this.onError(c)}}else{this._raiseEvent(1);if(typeof this.onSuccess==="function"){this.onSuccess()}}},_scrollHandler:function(c){if(this.scroll){var b=this;a("html,body").animate({scrollTop:c},this.scrollDuration,function(){if(typeof b.scrollCallback==="function"){b.scrollCallback.call(b)}})}},_higherPriorityActive:function(d){var e=false,c;for(var b=this.rules.length-1;b>=0;b-=1){c=this.rules[b];if(e&&c.input===d.input&&c.hint){return true}if(c===d){e=true}}return false},_removeLowPriorityHints:function(d){var e=false,c;for(var b=0;b0){var b=this;var g=function(){b.updatePosition()};var e=this.host.parents(".jqx-window");this.addHandler(e,"closed",function(){b.hide()});this.addHandler(e,"moved",g);this.addHandler(e,"moving",g);this.addHandler(e,"resized",g);this.addHandler(e,"resizing",g);this.addHandler(a(document.parentWindow),"scroll",function(){if(b.scroll){g()}})}for(var d=0;d=0){c=c.split("=");d=c[1].split(",");c=c[0]}e=this["_"+c];if(e){f.rule=function(g,h){return e.apply(this,[g].concat(d))}}else{b=true}}else{if(typeof c!=="function"){b=true}else{f.rule=c}}if(b){throw new Error("Wrong parameter!")}},_required:function(b){switch(this._getType(b)){case"jqx-input-inner":if(b.find("input").length>0){return a.trim(b.find("input").val())!==""}break;case"textarea":case"password":case"jqx-input":case"jqx-text-area":case"text":var d=a.data(b[0]);if(d.jqxMaskedInput){var e=b.jqxMaskedInput("promptChar"),c=b.jqxMaskedInput("value");return c&&c.indexOf(e)<0}else{if(d.jqxNumberInput){return b.jqxNumberInput("inputValue")!==""}else{if(d.jqxDateTimeInput){return true}else{return a.trim(b.val())!==""}}}case"checkbox":return b.is(":checked");case"radio":return b.is(":checked");case"jqx-check-box":case"jqx-radio-button":return b[0].val();case"jqxCheckBox":case"jqxcheckbox":case"jqxradiobutton":case"jqxRadioButton":var c=b.find("input").val();if(c===true||c===1||c==="true"){return true}return false;break;case"div":if(b.is(".jqx-checkbox")){return b.jqxCheckBox("checked")}if(b.is(".jqx-radiobutton")){return b.jqxRadioButton("checked")}return false}return false},_notNumber:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d)})},_startWithLetter:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d.substring(0,1))})},_number:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=new Number(d);return !isNaN(c)&&isFinite(c)})},_phone:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^\(\d{3}\)(\d){3}-(\d){4}$/;return c.test(d)})},_length:function(c,d,b){return this._minLength(c,d)&&this._maxLength(c,b)},_maxLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length<=b})},_minLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length>=b})},_email:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return c.test(d)})},_zipCode:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(^\d{5}$)|(^\d{5}-\d{4}$)|(\d{3}-\d{2}-\d{4})$/;return c.test(d)})},_ssn:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d{3}-\d{2}-\d{4}/;return c.test(d)})},_validateText:function(b,d){var c;if(this._isTextInput(b)){if(this._isjQWidget(b)){if(b.find("input").length>0){c=b.find("input").val()}else{c=b.val()}}else{c=b.val()}return d(c)}return false},_isjQWidget:function(b){var c=a.data(b[0]);if(c.jqxMaskedInput||c.jqxNumberInput||c.jqxDateTimeInput){return true}if(b[0].tagName.toLowerCase().indexOf("jqx")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-password-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-complex-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-formatted-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-masked-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-date-time-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-number-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-check-box")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-radio-button")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqxcheckbox")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("angular")>=0){return true}return false},_isTextInput:function(b){var c=this._getType(b);return c==="text"||c==="textarea"||c==="password"||c==="jqx-input-inner"||b.is(".jqx-input")||b.is(".jqx-text-area")},_getType:function(c){if(!c[0]){return}var b=c[0].tagName.toLowerCase(),d;if(b==="textarea"){return"textarea"}else{if(c.is(".jqx-input")){return"jqx-input"}else{if(c.is(".jqx-text-area")){return"jqx-text-area"}else{if(c.find(".jqx-input").length>0){return"jqx-input-inner"}else{if(b==="input"){d=a(c).attr("type")?a(c).attr("type").toLowerCase():"text";return d}}}}}if(b==="jqx-password-input"){return"password"}if(b==="jqx-check-box"){return"jqx-check-box"}if(b==="jqx-radio-button"){return"jqx-radio-button"}return b},_hintRender:function(f,c){if(this.hintType=="label"){var g=a('');g.html(f);var d=false;if(c.parent().find(".jqx-input-label").length>0){g=c.parent().find(".jqx-input-label");if(c.data().jqxWidget.hint){g.html(f);g.addClass(this.toThemeProperty("jqx-validator-error-label"));c.data().jqxWidget.host.attr("hint",true)}d=true;this.hasHint=true}var e=this;if(this.closeOnClick){g.click(function(){e.hideHint(c.selector)})}if(!d){if(this.position=="left"||this.position=="top"){g.insertBefore(a(c))}else{g.insertAfter(a(c))}}return g}var g=a('
    '),b=this;g.html(f);if(this.closeOnClick){g.click(function(){b.hideHint(c.selector)})}if(this.ownerElement==null){g.appendTo(document.body)}else{if(this.ownerElement.innerHTML){g.appendTo(a(this.ownerElement))}else{g.appendTo(this.ownerElement)}}return g},_hintLayout:function(h,c,b,f){if(this._hintRender===f.hintRender){var i;i=this._getPosition(c,b,h,f);if(this.hintType=="label"){var e="2px";if(this.position=="left"||this.position=="top"){e="-2px"}if(c[0].nodeName.toLowerCase()!="input"&&c[0].nodeName.toLowerCase()!="textarea"){if(c.find(".jqx-text-area").length>0){c.find(".jqx-text-area").addClass(this.toThemeProperty("jqx-validator-error-element"))}if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.find(".jqx-text-area").length>0){c.find(".jqx-text-area").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}}}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}var d=a("");d.addClass(this.toThemeProperty("jqx-validator-hint"));d.html(h.text());d.appendTo(a(document.body));var g=d.outerWidth();d.remove();if(!this.hasHint){h.css({position:"relative",left:a(c).css("margin-left"),width:a(c).width(),top:e});if(b=="center"){h.css("width",g);h.css("left","0px");h.css("margin-left","auto");h.css("margin-right","auto")}}return}h.css({position:"absolute",left:i.left,top:i.top});if(this.arrow){this._addArrow(c,h,b,i)}}},_showHint:function(b){if(b){if(this.animation==="fade"){b.fadeOut(0);b.fadeIn(this.animationDuration)}}},_getPosition:function(i,f,d,g){var e=i.offset(),h,c;var b=i.outerWidth();var j=i.outerHeight();if(this.rtl&&f.indexOf("left")>=0){f="right"}if(this.rtl&&f.indexOf("right")>=0){f="left"}if(this.ownerElement!=null){e={left:0,top:0};e.top=parseInt(e.top)+i.position().top;e.left=parseInt(e.left)+i.position().left}if(g&&g.hintPositionRelativeElement){var k=a(g.hintPositionRelativeElement);e=k.offset();b=k.width();j=k.height()}if(f.indexOf("top")>=0){h=e.top-j}else{if(f.indexOf("bottom")>=0){h=e.top+d.outerHeight()+this.hintPositionOffset+5}else{h=e.top}}if(f.indexOf("center")>=0){c=e.left+this.hintPositionOffset+(b-d.outerWidth())/2}else{if(f.indexOf("left")>=0){c=e.left-d.outerWidth()-this.hintPositionOffset}else{if(f.indexOf("right")>=0){c=e.left+b+this.hintPositionOffset}else{c=e.left+this.hintPositionOffset}}}if(f.indexOf(":")>=0){f=f.split(":")[1].split(",");c+=parseInt(f[0],10);h+=parseInt(f[1],10)}if(!this.positions){this.positions=new Array()}if(this.positions[Math.round(h)+"_"+Math.round(c)]){if(this.positions[Math.round(h)+"_"+Math.round(c)].top==h){h+=i.outerHeight()}}this.positions[Math.round(h)+"_"+Math.round(c)]={left:c,top:h};return{left:c,top:h}},_addArrow:function(j,e,g,k){var l=a('
    '),d,i;if(this.rtl&&g.indexOf("left")>=0){g="right"}if(this.rtl&&g.indexOf("right")>=0){g="left"}e.children(".jqx-validator-hint-arrow").remove();e.append(l);var c=l.outerHeight(),f=l.outerWidth(),h=e.outerHeight(),b=e.outerWidth();this._addImage(l);if(g.indexOf("top")>=0){i=h-c}else{if(g.indexOf("bottom")>=0){i=-c}else{i=(h-c)/2-c/2}}if(g.indexOf("center")>=0){d=(b-f)/2}else{if(g.indexOf("left")>=0){d=b-f/2-1}else{if(g.indexOf("right")>=0){d=-f/2}}}if(g.indexOf("topright")>=0||g.indexOf("bottomright")>=0){d=0}if(g.indexOf("topleft")>=0||g.indexOf("bottomleft")>=0){d=b-f}l.css({position:"absolute",left:d,top:i})},_addImage:function(b){var c=b.css("background-image");c=c.replace('url("',"");c=c.replace('")',"");c=c.replace("url(","");c=c.replace(")","");b.css("background-image","none");b.append('Arrow')},_raiseEvent:function(b,d){var c=a.Event(this._events[b]);c.args=d;return this.host.trigger(c)},propertyChangedHandler:function(b,c,e,d){if(c==="rules"){this._configureInputs();this._removeEventListeners();this._addEventListeners()}}})})(jqxBaseFramework); +(function(a){a.jqx.jqxWidget("jqxValidator","",{});a.extend(a.jqx._jqxValidator.prototype,{defineInstance:function(){var b={rules:null,scroll:true,focus:true,scrollDuration:300,scrollCallback:null,position:"right",arrow:true,animation:"fade",animationDuration:150,closeOnClick:true,onError:null,onSuccess:null,ownerElement:null,_events:["validationError","validationSuccess"],hintPositionOffset:5,_inputHint:[],rtl:false,hintType:"tooltip"};if(this===a.jqx._jqxValidator.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){if(this.hintType=="label"&&this.animationDuration==150){this.animationDuration=0}this._configureInputs();this._removeEventListeners();this._addEventListeners()},destroy:function(){this._removeEventListeners();this.hide()},validate:function(q){var b=true,p,f=Infinity,j,h,c,k=[],o;this.updatePosition();var l=this;var d=0;for(var g=0;gj){f=j;h=c}}}d--;if(d==0){if(typeof q==="function"){l._handleValidation(b,f,h,k);if(q){q(b)}}}};this._validateRule(this.rules[g],m)}else{p=this._validateRule(this.rules[g])}if(false==p){b=false;c=a(this.rules[g].input);k.push(c);var e=c.offset();if(e){j=e.top;if(f>j){f=j;h=c}}}}if(d==0){this._handleValidation(b,f,h,k);return b}else{return undefined}},validateInput:function(b){var e=this._getRulesForInput(b),d=true;for(var c=0;c0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.find(".jqx-text-area").length>0){c.find(".jqx-text-area").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}};if(e){f=e.hint;if(f){if(this.positions){if(this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]){this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]=null}}if(this.animation==="fade"){f.fadeOut(this.animationDuration,function(){f.remove();d()})}else{f.remove();d()}}e.hint=null}},_handleValidation:function(b,e,d,c){if(!b){this._scrollHandler(e);if(this.focus){d.focus()}this._raiseEvent(0,{invalidInputs:c});if(typeof this.onError==="function"){this.onError(c)}}else{this._raiseEvent(1);if(typeof this.onSuccess==="function"){this.onSuccess()}}},_scrollHandler:function(c){if(this.scroll){var b=this;a("html,body").animate({scrollTop:c},this.scrollDuration,function(){if(typeof b.scrollCallback==="function"){b.scrollCallback.call(b)}})}},_higherPriorityActive:function(d){var e=false,c;for(var b=this.rules.length-1;b>=0;b-=1){c=this.rules[b];if(e&&c.input===d.input&&c.hint){return true}if(c===d){e=true}}return false},_removeLowPriorityHints:function(d){var e=false,c;for(var b=0;b0){var b=this;var g=function(){b.updatePosition()};var e=this.host.parents(".jqx-window");this.addHandler(e,"closed",function(){b.hide()});this.addHandler(e,"moved",g);this.addHandler(e,"moving",g);this.addHandler(e,"resized",g);this.addHandler(e,"resizing",g);this.addHandler(a(document.parentWindow),"scroll",function(){if(b.scroll){g()}})}for(var d=0;d=0){c=c.split("=");d=c[1].split(",");c=c[0]}e=this["_"+c];if(e){f.rule=function(g,h){return e.apply(this,[g].concat(d))}}else{b=true}}else{if(typeof c!=="function"){b=true}else{f.rule=c}}if(b){throw new Error("Wrong parameter!")}},_required:function(b){switch(this._getType(b)){case"jqx-input-inner":if(b.find("input").length>0){return a.trim(b.find("input").val())!==""}break;case"textarea":case"password":case"jqx-input":case"jqx-text-area":case"text":var d=a.data(b[0]);if(d.jqxMaskedInput){var e=b.jqxMaskedInput("promptChar"),c=b.jqxMaskedInput("value");return c&&c.indexOf(e)<0}else{if(d.jqxNumberInput){return b.jqxNumberInput("inputValue")!==""}else{if(d.jqxDateTimeInput){return true}else{return a.trim(b.val())!==""}}}case"checkbox":return b.is(":checked");case"radio":return b.is(":checked");case"jqx-check-box":case"jqx-radio-button":return b[0].val();case"jqxCheckBox":case"jqxcheckbox":case"jqxradiobutton":case"jqxRadioButton":var c=b.find("input").val();if(c===true||c===1||c==="true"){return true}return false;break;case"div":if(b.is(".jqx-checkbox")){return b.jqxCheckBox("checked")}if(b.is(".jqx-radiobutton")){return b.jqxRadioButton("checked")}return false}return false},_notNumber:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d)})},_startWithLetter:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d.substring(0,1))})},_number:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=new Number(d);return !isNaN(c)&&isFinite(c)})},_phone:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^\(\d{3}\)(\d){3}-(\d){4}$/;return c.test(d)})},_length:function(c,d,b){return this._minLength(c,d)&&this._maxLength(c,b)},_maxLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length<=b})},_minLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length>=b})},_email:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return c.test(d)})},_zipCode:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(^\d{5}$)|(^\d{5}-\d{4}$)|(\d{3}-\d{2}-\d{4})$/;return c.test(d)})},_ssn:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d{3}-\d{2}-\d{4}/;return c.test(d)})},_validateText:function(b,d){var c;if(this._isTextInput(b)){if(this._isjQWidget(b)){if(b.find("input").length>0){c=b.find("input").val()}else{c=b.val()}}else{c=b.val()}return d(c)}return false},_isjQWidget:function(b){var c=a.data(b[0]);if(c.jqxMaskedInput||c.jqxNumberInput||c.jqxDateTimeInput){return true}if(b[0].tagName.toLowerCase().indexOf("jqx")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-password-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-complex-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-formatted-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-masked-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-date-time-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-number-input")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-check-box")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqx-radio-button")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("jqxcheckbox")>=0){return true}if(b[0].tagName.toLowerCase().indexOf("angular")>=0){return true}return false},_isTextInput:function(b){var c=this._getType(b);return c==="text"||c==="textarea"||c==="password"||c==="jqx-input-inner"||b.is(".jqx-input")||b.is(".jqx-text-area")},_getType:function(c){if(!c[0]){return}var b=c[0].tagName.toLowerCase(),d;if(b==="textarea"){return"textarea"}else{if(c.is(".jqx-input")){return"jqx-input"}else{if(c.is(".jqx-text-area")){return"jqx-text-area"}else{if(c.find(".jqx-input").length>0){return"jqx-input-inner"}else{if(b==="input"){d=a(c).attr("type")?a(c).attr("type").toLowerCase():"text";return d}}}}}if(b==="jqx-password-input"){return"password"}if(b==="jqx-check-box"){return"jqx-check-box"}if(b==="jqx-radio-button"){return"jqx-radio-button"}return b},_hintRender:function(f,c){if(this.hintType=="label"){var g=a('');g.html(f);var d=false;if(c.parent().find(".jqx-input-label").length>0&&!c.hasClass("jqx-dropdownlist")&&!c.hasClass("jqx-combobox")&&!c.hasClass("jqx-datetimeinput")){g=c.parent().find(".jqx-input-label");if(c.data().jqxWidget.hint){g.html(f);g.addClass(this.toThemeProperty("jqx-validator-error-label"));c.data().jqxWidget.host.attr("hint",true)}d=true;this.hasHint=true}var e=this;if(this.closeOnClick){g.click(function(){e.hideHint(c.selector)})}if(!d){if(this.position=="left"||this.position=="top"){g.insertBefore(a(c))}else{g.insertAfter(a(c))}}return g}var g=a('
    '),b=this;g.html(f);if(this.closeOnClick){g.click(function(){b.hideHint(c.selector)})}if(this.ownerElement==null){g.appendTo(document.body)}else{if(this.ownerElement.innerHTML){g.appendTo(a(this.ownerElement))}else{g.appendTo(this.ownerElement)}}return g},_hintLayout:function(h,c,b,f){if(this._hintRender===f.hintRender){var i;i=this._getPosition(c,b,h,f);if(this.hintType=="label"){var e="2px";if(this.position=="left"||this.position=="top"){e="-2px"}if(c[0].nodeName.toLowerCase()!="input"&&c[0].nodeName.toLowerCase()!="textarea"){if(c.find(".jqx-text-area").length>0){c.find(".jqx-text-area").addClass(this.toThemeProperty("jqx-validator-error-element"))}if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.find(".jqx-text-area").length>0){c.find(".jqx-text-area").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}}}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}var d=a("");d.addClass(this.toThemeProperty("jqx-validator-hint"));d.html(h.text());d.appendTo(a(document.body));var g=d.outerWidth();d.remove();if(!this.hasHint){h.css({position:"relative",left:a(c).css("margin-left"),width:a(c).width(),top:e});if(b=="center"){h.css("width",g);h.css("left","0px");h.css("margin-left","auto");h.css("margin-right","auto")}}return}h.css({position:"absolute",left:i.left,top:i.top});if(this.arrow){this._addArrow(c,h,b,i)}}},_showHint:function(b){if(b){if(this.animation==="fade"){b.fadeOut(0);b.fadeIn(this.animationDuration)}}},_getPosition:function(i,f,d,g){var e=i.offset(),h,c;var b=i.outerWidth();var j=i.outerHeight();if(this.rtl&&f.indexOf("left")>=0){f="right"}if(this.rtl&&f.indexOf("right")>=0){f="left"}if(this.ownerElement!=null){e={left:0,top:0};e.top=parseInt(e.top)+i.position().top;e.left=parseInt(e.left)+i.position().left}if(g&&g.hintPositionRelativeElement){var k=a(g.hintPositionRelativeElement);e=k.offset();b=k.width();j=k.height()}if(f.indexOf("top")>=0){h=e.top-j}else{if(f.indexOf("bottom")>=0){h=e.top+d.outerHeight()+this.hintPositionOffset+5}else{h=e.top}}if(f.indexOf("center")>=0){c=e.left+this.hintPositionOffset+(b-d.outerWidth())/2}else{if(f.indexOf("left")>=0){c=e.left-d.outerWidth()-this.hintPositionOffset}else{if(f.indexOf("right")>=0){c=e.left+b+this.hintPositionOffset}else{c=e.left+this.hintPositionOffset}}}if(f.indexOf(":")>=0){f=f.split(":")[1].split(",");c+=parseInt(f[0],10);h+=parseInt(f[1],10)}if(!this.positions){this.positions=new Array()}if(this.positions[Math.round(h)+"_"+Math.round(c)]){if(this.positions[Math.round(h)+"_"+Math.round(c)].top==h){h+=i.outerHeight()}}this.positions[Math.round(h)+"_"+Math.round(c)]={left:c,top:h};return{left:c,top:h}},_addArrow:function(j,e,g,k){var l=a('
    '),d,i;if(this.rtl&&g.indexOf("left")>=0){g="right"}if(this.rtl&&g.indexOf("right")>=0){g="left"}e.children(".jqx-validator-hint-arrow").remove();e.append(l);var c=l.outerHeight(),f=l.outerWidth(),h=e.outerHeight(),b=e.outerWidth();this._addImage(l);if(g.indexOf("top")>=0){i=h-c}else{if(g.indexOf("bottom")>=0){i=-c}else{i=(h-c)/2-c/2}}if(g.indexOf("center")>=0){d=(b-f)/2}else{if(g.indexOf("left")>=0){d=b-f/2-1}else{if(g.indexOf("right")>=0){d=-f/2}}}if(g.indexOf("topright")>=0||g.indexOf("bottomright")>=0){d=0}if(g.indexOf("topleft")>=0||g.indexOf("bottomleft")>=0){d=b-f}l.css({position:"absolute",left:d,top:i})},_addImage:function(b){var c=b.css("background-image");c=c.replace('url("',"");c=c.replace('")',"");c=c.replace("url(","");c=c.replace(")","");b.css("background-image","none");b.append('Arrow')},_raiseEvent:function(b,d){var c=a.Event(this._events[b]);c.args=d;return this.host.trigger(c)},propertyChangedHandler:function(b,c,e,d){if(c==="rules"){this._configureInputs();this._removeEventListeners();this._addEventListeners()}}})})(jqxBaseFramework); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/jqxwindow.js --- a/www/jqwidgets/jqxwindow.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/jqxwindow.js Fri May 01 16:37:31 2020 +0200 @@ -1,9 +1,9 @@ /* -jQWidgets v8.1.4 (2019-July) -Copyright (c) 2011-2019 jQWidgets. +jQWidgets v9.0.0 (2020-Jan) +Copyright (c) 2011-2020 jQWidgets. License: https://jqwidgets.com/license/ */ /* eslint-disable */ -(function(a){a.jqx.jqxWidget("jqxWindow","",{});a.extend(a.jqx._jqxWindow.prototype,{defineInstance:function(){var e={height:"auto",width:200,minHeight:50,maxHeight:1200,minWidth:50,maxWidth:1200,showCloseButton:true,disabled:false,autoOpen:true,keyboardCloseKey:"esc",title:"",content:"",draggable:true,resizable:true,animationType:"fade",closeAnimationDuration:250,showAnimationDuration:250,isModal:false,position:"center",closeButtonSize:16,closeButtonAction:"hide",modalOpacity:0.3,dragArea:null,okButton:null,cancelButton:null,dialogResult:{OK:false,Cancel:false,None:true},collapsed:false,showCollapseButton:false,collapseAnimationDuration:150,collapseButtonSize:16,rtl:false,keyboardNavigation:true,headerHeight:null,_events:["created","closed","moving","moved","open","collapse","expand","open","close","resize"],initContent:null,enableResize:true,restricter:null,autoFocus:true,closing:null,_invalidArgumentExceptions:{invalidHeight:"Invalid height!",invalidWidth:"Invalid width!",invalidMinHeight:"Invalid minHeight!",invalidMaxHeight:"Invalid maxHeight!",invalidMinWidth:"Invalid minWidth!",invalidMaxWidth:"Invalid maxWidth",invalidKeyCode:"Invalid keyCode!",invalidAnimationType:"Invalid animationType!",invalidCloseAnimationDuration:"Invalid closeAnimationDuration!",invalidShowAnimationDuration:"Invalid showAnimationDuration!",invalidPosition:"Invalid position!",invalidCloseButtonSize:"Invalid closeButtonSize!",invalidCollapseButtonSize:"Invalid collapseButtonSize!",invalidCloseButtonAction:"Invalid cluseButtonAction!",invalidModalOpacity:"Invalid modalOpacity!",invalidDragArea:"Invalid dragArea!",invalidDialogResult:"Invalid dialogResult!",invalidIsModal:"You can have just one modal window!"},_enableResizeCollapseBackup:null,_enableResizeBackup:undefined,_heightBeforeCollapse:null,_minHeightBeforeCollapse:null,_mouseDown:false,_isDragging:false,_rightContentWrapper:null,_leftContentWrapper:null,_headerContentWrapper:null,_closeButton:null,_collapseButton:null,_title:null,_content:null,_mousePosition:{},_windowPosition:{},_modalBackground:null,_SCROLL_WIDTH:21,_visible:true,modalBackgroundZIndex:1299,modalZIndex:1800,zIndex:1000,_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave",click:a.jqx.mobile.getTouchEventName("touchstart")}};if(this===a.jqx._jqxWindow.prototype){return e}a.extend(true,this,e);return e},createInstance:function(){if(this.host.initAnimate){this.host.initAnimate()}this.host.attr("role","dialog");this.host.removeAttr("data-bind");this.host.appendTo(document.body);var g=this;var f=function(l){for(var k=0;k=0){g[j]=parseInt(g[j],10)}}};f(["minWidth","minHeight","maxWidth","maxHeight","width","height"]);var h=function(){var j=parseInt(a(g.restricter).css("padding-top"),10);var i=parseInt(a(g.restricter).css("padding-left"),10);var k=parseInt(a(g.restricter).css("padding-bottom"),10);var m=parseInt(a(g.restricter).css("padding-right"),10);var l=a(g.restricter).coord();g.dragArea={left:i+l.left,top:j+l.top,width:1+m+a(g.restricter).width(),height:1+k+a(g.restricter).height()}};if(this.restricter){h()}if(this.restricter){this.addHandler(a(window),"resize."+this.element.id,function(){h()});this.addHandler(a(window),"orientationchanged."+this.element.id,function(){h()});this.addHandler(a(window),"orientationchange."+this.element.id,function(){h()})}this._isTouchDevice=a.jqx.mobile.isTouchDevice();this._validateProperties();this._createStructure();this._refresh();if(!this.autoOpen){this.element.style.display="none"}if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}if(!this.isModal){this._fixWindowZIndex()}this._setStartupSettings();this._positionWindow();this._raiseEvent(0);if(this.autoOpen){this._performLayout();var e=this;if(this.isModal){this._fixWindowZIndex("modal-show")}if(e.initContent){e.initContent();e._contentInitialized=true}this._raiseEvent(7);this._raiseEvent(9)}},refresh:function(){this._performLayout()},_setStartupSettings:function(){if(this.disabled){this.disable()}if(this.collapsed){this.collapsed=false;this.collapse(0)}if(!this.autoOpen){this.hide(null,0.001,true);this._visible=false}if(this.title!==null&&this.title!==""){this.setTitle(this.title)}if(this.content!==null&&this.content!==""){this.setContent(this.content)}this.title=this._headerContentWrapper.html();this.content=this._content.html()},_fixWindowZIndex:function(h){var g=a.data(document.body,"jqxwindows-list")||[],l=this.zIndex;if(!this.isModal){if(this._indexOf(this.host,g)<0){g.push(this.host)}a.data(document.body,"jqxwindows-list",g);if(g.length>1){var k=g[g.length-2];if(k.css("z-index")=="auto"){l=this.zIndex+g.length+1}else{var i=this.zIndex;l=parseInt(k.css("z-index"),10)+1;if(l1){throw new Error(this._invalidArgumentExceptions.invalidModalOpacity)}if(this.isModal&&!this._singleModalCheck()){throw new Error(this._invalidArgumentExceptions.invalidIsModal)}},_validateSize:function(){this._validateSizeLimits();if(this.height!=="auto"&&isNaN(parseInt(this.height,10))){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.width!=="auto"&&isNaN(parseInt(this.width,10))){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(this.height!=="auto"&&this.heightthis.maxHeight){this.height=this.maxHeight}if(this.width>this.maxWidth){this.width=this.maxWidth}if(this.dragArea===null){return}if(this.dragArea&&((this.dragArea.height!==null&&this.host.height()>this.dragArea.height)||(parseInt(this.height,10)>this.dragArea.height))||(this.dragArea.width!==null&&this.width>this.dragArea.width)||(this.maxHeight>this.dragArea.height||this.maxWidth>this.dragArea.width)){}},_validateSizeLimits:function(){if(this.maxHeight==null){this.maxHeight=9999}if(this.minWidth==null){this.minWidth=0}if(this.maxWidth==null){this.maxWidth=9999}if(this.minHeight==null){this.minHeight=0}if(isNaN(parseInt(this.minHeight,10))){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}if(isNaN(parseInt(this.maxHeight,10))){throw new Error(this._invalidArgumentExceptions.invalidMaxHeight)}if(isNaN(parseInt(this.minWidth,10))){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}if(isNaN(parseInt(this.maxWidth,10))){throw new Error(this._invalidArgumentExceptions.invalidMaxWidth)}if(this.minHeight&&this.maxHeight){if(parseInt(this.minHeight,10)>parseInt(this.maxHeight,10)&&this.maxHeight!=Number.MAX_VALUE){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}}if(this.minWidth&&this.maxWidth){if(parseInt(this.minWidth,10)>parseInt(this.maxWidth,10)&&this.maxWidth!=Number.MAX_VALUE){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}}},_validateAnimationProperties:function(){if(this.animationType!=="fade"&&this.animationType!=="slide"&&this.animationType!=="combined"&&this.animationType!=="none"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(isNaN(parseInt(this.closeAnimationDuration,10))||this.closeAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidCloseAnimationDuration)}if(isNaN(parseInt(this.showAnimationDuration,10))||this.showAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidShowAnimationDuration)}},_validateInteractionProperties:function(){if(parseInt(this.keyCode,10)<0||parseInt(this.keyCode,10)>130&&this.keyCode!=="esc"){throw new Error(this._invalidArgumentExceptions.invalidKeyCode)}if(this.dragArea!==null&&(typeof this.dragArea.width==="undefined"||typeof this.dragArea.height==="undefined"||typeof this.dragArea.left==="undefined"||typeof this.dragArea.top==="undefined")){throw new Error(this._invalidArgumentExceptions.invalidDragArea)}if(!this.dialogResult||(!this.dialogResult.OK&&!this.dialogResult.Cancel&&!this.dialogResult.None)){throw new Error(this._invalidArgumentExceptions.invalidDialogResult)}if(this.closeButtonAction!=="hide"&&this.closeButtonAction!=="close"){throw new Error(this._invalidArgumentExceptions.invalidCloseButtonAction)}},_singleModalCheck:function(){var e=a.data(document.body,"jqxwindows-list")||[],f=e.length;while(f){f-=1;if(a(e[f].attr("id")).length>0){if(a(e[f].attr("id")).jqxWindow("isModal")){return false}}}return true},_createStructure:function(){var e=this.host.children();if(e.length===1){this._content=e[0];this._header=document.createElement("div");this._header.innerHTML=this.host.attr("caption");this.element.insertBefore(this._header,this._content);this.host.attr("caption","");this._header=a(this._header);this._content=a(this._content)}else{if(e.length===2){this._header=a(e[0]);this._content=a(e[1])}else{throw new Error("Invalid structure!")}}},_refresh:function(){this._render();this._addStyles();this._performLayout();this._removeEventHandlers();this._addEventHandlers();this._initializeResize()},_render:function(){this._addHeaderWrapper();this._addCloseButton();this._addCollapseButton();this._removeModal();this._makeModal()},_addHeaderWrapper:function(){if(!this._headerContentWrapper){this._header[0].innerHTML='
    '+this._header[0].innerHTML+"
    ";this._headerContentWrapper=a(this._header.children()[0]);if(this.headerHeight!==null){this._header.height(this.headerHeight)}}},_addCloseButton:function(){if(!this._closeButton){this._closeButtonWrapper=document.createElement("div");this._closeButtonWrapper.className=this.toThemeProperty("jqx-window-close-button-background");this._closeButton=document.createElement("div");this._closeButton.className=this.toThemeProperty("jqx-window-close-button jqx-icon-close");this._closeButton.style.width="100%";this._closeButton.style.height="100%";this._closeButtonWrapper.appendChild(this._closeButton);this._header[0].appendChild(this._closeButtonWrapper);this._closeButtonWrapper=a(this._closeButtonWrapper);this._closeButton=a(this._closeButton)}},_addCollapseButton:function(){if(!this._collapseButton){this._collapseButtonWrapper=document.createElement("div");this._collapseButtonWrapper.className=this.toThemeProperty("jqx-window-collapse-button-background");this._collapseButton=document.createElement("div");this._collapseButton.className=this.toThemeProperty("jqx-window-collapse-button jqx-icon-arrow-up");this._collapseButton.style.width="100%";this._collapseButton.style.height="100%";this._collapseButtonWrapper.appendChild(this._collapseButton);this._header[0].appendChild(this._collapseButtonWrapper);this._collapseButtonWrapper=a(this._collapseButtonWrapper);this._collapseButton=a(this._collapseButton)}},_removeModal:function(){if(!this.isModal&&typeof this._modalBackground==="object"&&this._modalBackground!==null){a("."+this.toThemeProperty("jqx-window-modal")).remove();this._modalBackground=null}},focus:function(){try{this.host.focus();var f=this;setTimeout(function(){f.host.focus()},10)}catch(e){}},_makeModal:function(){if(this.isModal&&!this._modalBackground){var g=a.data(document.body,"jqxwindows-list");if(g){this._removeFromArray(this.host,g);a.data(document.body,"jqxwindows-list",g)}this._modalBackground=document.createElement("div");this._modalBackground.className=this.toThemeProperty("jqx-window-modal");this._setModalBackgroundStyles();document.body.appendChild(this._modalBackground);this.addHandler(this._modalBackground,this._getEvent("click"),function(){return false});var f=this;var e=function(h,i){return i.contains(h)};this.addHandler(this._modalBackground,"mouseup",function(h){f._stopResizing(f);h.preventDefault()});this.addHandler(this._modalBackground,"mousedown",function(i){var h=f._getTabbables();if(h.length>0){h[0].focus();setTimeout(function(){h[0].focus()},100)}i.preventDefault();return false});this.addHandler(a(document),"keydown.window"+this.element.id,function(k){if(k.keyCode!==9){return}var h=a.data(document.body,"jqxwindows-modallist");if(h.length>1){if(h[h.length-1][0]!=f.element){return}}var j=f._getTabbables();var l=null;var i=null;if(f.element.offsetWidth===0||f.element.offsetHeight===0){return}if(j.length>0){l=j[0];i=j[j.length-1]}if(k.target==f.element){return}if(l==null){return}if(!e(k.target,f.element)){l.focus();return false}if(k.target===i&&!k.shiftKey){l.focus();return false}else{if(k.target===l&&k.shiftKey){i.focus();return false}}})}},_addStyles:function(){this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-window"));this.host.addClass(this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-window-header"));this._content.addClass(this.toThemeProperty("jqx-window-content"));this._header.addClass(this.toThemeProperty("jqx-widget-header"));this._content.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-disableselect"));this._header.addClass(this.toThemeProperty("jqx-rc-t"));this._content.addClass(this.toThemeProperty("jqx-rc-b"));if(!this.host.attr("tabindex")){this.element.tabIndex=0;this._header[0].tabIndex=0;this._content[0].tabIndex=0}this.element.setAttribute("hideFocus","true");this.element.style.outline="none"},_performHeaderLayout:function(){this._handleHeaderButtons();this._header[0].style.position="relative";if(this.rtl){this._headerContentWrapper[0].style.direction="rtl";this._headerContentWrapper[0].style["float"]="right"}else{this._headerContentWrapper[0].style.direction="ltr";this._headerContentWrapper[0].style["float"]="left"}this._performHeaderCloseButtonLayout();this._performHeaderCollapseButtonLayout();this._centerElement(this._headerContentWrapper,this._header,"y","margin");if(this.headerHeight){this._centerElement(this._closeButtonWrapper,this._header,"y","margin");this._centerElement(this._collapseButtonWrapper,this._header,"y","margin")}},_handleHeaderButtons:function(){if(!this._closeButtonWrapper){return}if(!this.showCloseButton){this._closeButtonWrapper[0].style.visibility="hidden"}else{this._closeButtonWrapper[0].style.visibility="visible";var e=this._toPx(this.closeButtonSize);this._closeButtonWrapper[0].style.width=e;this._closeButtonWrapper[0].style.height=e}if(!this.showCollapseButton){this._collapseButtonWrapper[0].style.visibility="hidden"}else{this._collapseButtonWrapper[0].style.visibility="visible";var f=this._toPx(this.collapseButtonSize);this._collapseButtonWrapper[0].style.width=f;this._collapseButtonWrapper[0].style.height=f}},_performHeaderCloseButtonLayout:function(){if(!this._closeButtonWrapper){return}var e=parseInt(this._header.css("padding-right"),10);if(!isNaN(e)){this._closeButtonWrapper.width(this._closeButton.width());if(!this.rtl){this._closeButtonWrapper[0].style.marginRight=this._toPx(e);this._closeButtonWrapper[0].style.marginLeft="0px"}else{this._closeButtonWrapper[0].style.marginRight="0px";this._closeButtonWrapper[0].style.marginLeft=this._toPx(e)}}this._closeButtonWrapper[0].style.position="absolute";if(!this.rtl){this._closeButtonWrapper[0].style.right="0px";this._closeButtonWrapper[0].style.left=""}else{this._closeButtonWrapper[0].style.right="";this._closeButtonWrapper[0].style.left="0px"}},_performHeaderCollapseButtonLayout:function(){if(!this._closeButtonWrapper){return}var g=parseInt(this._header.css("padding-right"),10);if(!isNaN(g)){var f=this._toPx(this.collapseButtonSize);this._collapseButtonWrapper[0].style.width=f;this._collapseButtonWrapper[0].style.height=f;if(!this.rtl){this._collapseButtonWrapper[0].style.marginRight=this._toPx(g);this._collapseButtonWrapper[0].style.marginLeft="0px"}else{this._collapseButtonWrapper[0].style.marginRight="0px";this._collapseButtonWrapper[0].style.marginLeft=this._toPx(g)}}this._collapseButtonWrapper[0].style.position="absolute";var e=this._toPx(this.showCloseButton?this._closeButton.outerWidth(true):0);if(!this.rtl){this._collapseButtonWrapper[0].style.right=e;this._collapseButtonWrapper[0].style.left=""}else{this._collapseButtonWrapper[0].style.right="";this._collapseButtonWrapper[0].style.left=e}this._centerElement(this._collapseButton,a(this._collapseButton[0].parentElement),"y")},_performWidgetLayout:function(){var e;if(this.width!=="auto"){if(this.width&&this.width.toString().indexOf("%")>=0){this.element.style.width=this.width}else{this.element.style.width=this._toPx(this.width)}}if(!this.collapsed){if(this.height!=="auto"){if(this.height&&this.height.toString().indexOf("%")>=0){this.element.style.height=this.height}else{this.element.style.height=this._toPx(this.height)}}else{this.element.style.height=this.host.height()+"px"}this.element.style.minHeight=this._toPx(this.minHeight)}this._setChildrenLayout();e=this._validateMinSize();this.element.style.maxHeight=this._toPx(this.maxHeight);this.element.style.minWidth=this._toPx(this.minWidth);this.element.style.maxWidth=this._toPx(this.maxWidth);if(!e){this._setChildrenLayout()}},_setChildrenLayout:function(){this._header.width(this.host.width()-(this._header.outerWidth(true)-this._header.width()));this._content.width(this.host.width()-(this._content.outerWidth(true)-this._content.width()));this._content.height(this.host.height()-this._header.outerHeight(true)-(this._content.outerHeight(true)-this._content.height()))},_validateMinSize:function(){var f=true;if(this.minHeight=0){if(n){e[0].style.display="block"}var i=e.outerHeight(true),l;if(n){e[0].style.display="none"}l=o.height();var k=(Math.max(0,l-i))/2;e[0].style[f]=k+"px"}if(j.indexOf("x")>=0){if(n){e[0].style.display="block"}var q=e.outerWidth(true),p;if(n){e[0].style.display="none"}p=o.width();var m=(Math.max(0,p-q))/2;e[0].style[h]=m+"px"}},_centerElementInArea:function(f,e,h){h=h.toLowerCase();if(h.indexOf("y")>=0){var g=f.outerHeight(true);var j=e.height;var i=(j-g)/2;f[0].style.top=i+e.top+"px"}if(h.indexOf("x")>=0){var m=f.outerWidth(true);var l=e.width;var k=(l-m)/2;f[0].style.left=k+e.left+"px"}},_removeEventHandlers:function(){this.removeHandler(this._header,this._getEvent("mousedown"));this.removeHandler(this._header,this._getEvent("mousemove"));this.removeHandler(this._header,"focus");this.removeHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"));this.removeHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"));this.removeHandler(this.host,"keydown");this.removeHandler(this._closeButton,this._getEvent("click"));this.removeHandler(this._closeButton,this._getEvent("mouseenter"));this.removeHandler(this._closeButton,this._getEvent("mouseleave"));this.removeHandler(this._collapseButton,this._getEvent("click"));this.removeHandler(this._collapseButton,this._getEvent("mouseenter"));this.removeHandler(this._collapseButton,this._getEvent("mouseleave"));this.removeHandler(this.host,this._getEvent("mousedown"));if(this.okButton){this.removeHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler)}if(this.cancelButton){this.removeHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler)}this.removeHandler(this._header,this._getEvent("mouseenter"));this.removeHandler(this._header,this._getEvent("mouseleave"));this.removeHandler(this.host,"resizing",this._windowResizeHandler)},_removeFromArray:function(e,g){var f=this._indexOf(e,g);if(f>=0){return g.splice(this._indexOf(e,g),1)}else{return g}},_sortByStyle:function(e,l){for(var h=0;hh;f--){var m=l[f],k=l[f-1],g;if(parseInt(m.css(e),10)=0){var g=a(document.body).width()/100;var f=1/g;e.width=(f*h.args.width)+"%"}else{e.width=h.args.width}if(e.height&&e.height.toString().indexOf("%")>=0){var g=a(document.body).height()/100;var f=1/g;e.height=(f*h.args.height)+"%"}else{e.height=h.args.height}},_addHeaderHoverEffect:function(){var e=this;this.addHandler(this._header,this._getEvent("mouseenter"),function(){a(this).addClass(e.toThemeProperty("jqx-window-header-hover"))});this.addHandler(this._header,this._getEvent("mouseleave"),function(){a(this).removeClass(e.toThemeProperty("jqx-window-header-hover"))})},_addDialogButtonsHandlers:function(){if(this.okButton){this.addHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"ok"})}if(this.cancelButton){this.addHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"cancel"})}},_documentResizeHandlers:function(){var e=this;if(this.isModal){this.addHandler(a(window),"resize.window"+this.element.id,function(){if(typeof e._modalBackground==="object"&&e._modalBackground!==null){if(e.isOpen()){e._modalBackground.style.display="none"}if(!e.restricter){var f=e._getDocumentSize();e._modalBackground.style.width=f.width+"px";e._modalBackground.style.height=f.height+"px"}else{e._modalBackground.style.left=e._toPx(e.dragArea.left);e._modalBackground.style.top=e._toPx(e.dragArea.top);e._modalBackground.style.width=e._toPx(e.dragArea.width);e._modalBackground.style.height=e._toPx(e.dragArea.height)}if(e.isOpen()){e._modalBackground.style.display="block"}}})}},_setDialogResultHandler:function(f){var e=f.data.self;e._setDialogResult(f.data.result);e.closeWindow()},_setDialogResult:function(e){this.dialogResult.OK=false;this.dialogResult.None=false;this.dialogResult.Cancel=false;e=e.toLowerCase();switch(e){case"ok":this.dialogResult.OK=true;break;case"cancel":this.dialogResult.Cancel=true;break;default:this.dialogResult.None=true}},_getDocumentSize:function(){var e=a.jqx.browser.msie&&a.jqx.browser.version<9;var f=e?4:0;var g=f;if(document.body.scrollHeight>document.body.clientHeight&&e){f=this._SCROLL_WIDTH}if(document.body.scrollWidth>document.body.clientWidth&&e){g=this._SCROLL_WIDTH}return{width:a(document).width()-f,height:a(document).height()-g}},_closeButtonHover:function(){var e=this;this.addHandler(this._closeButton,this._getEvent("mouseenter"),function(){e._closeButton.addClass(e.toThemeProperty("jqx-window-close-button-hover"))});this.addHandler(this._closeButton,this._getEvent("mouseleave"),function(){e._closeButton.removeClass(e.toThemeProperty("jqx-window-close-button-hover"))})},_collapseButtonHover:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("mouseenter"),function(){e._collapseButton.addClass(e.toThemeProperty("jqx-window-collapse-button-hover"))});this.addHandler(this._collapseButton,this._getEvent("mouseleave"),function(){e._collapseButton.removeClass(e.toThemeProperty("jqx-window-collapse-button-hover"))})},_setModalBackgroundStyles:function(){if(this.isModal){var e=this._getDocumentSize();if(!(a.jqx.browser.msie&&a.jqx.browser.version<9)){this._modalBackground.style.opacity=this.modalOpacity}else{this._modalBackground.style.filter="alpha(opacity="+(this.modalOpacity*100)+")"}this._modalBackground.style.position="absolute";this._modalBackground.style.top="0px";this._modalBackground.style.left="0px";this._modalBackground.style.width=e.width;this._modalBackground.style.height=e.height;this._modalBackground.style.zIndex=this.modalBackgroundZIndex;if(!this.autoOpen){this._modalBackground.style.display="none"}}},_addFocusHandlers:function(){var e=this;this.addHandler(this.host,this._getEvent("mousedown"),function(){if(!e.isModal){e.bringToFront()}})},_indexOf:function(f,g){for(var e=0;e=0){this.move(j-i,l)}}}else{if(this.resizable){this.resize(h-i,n)}}o=false;break;case 38:if(!e){if(this.draggable){if(l-i>=0){this.move(j,l-i)}}}else{if(this.resizable){this.resize(h,n-i)}}o=false;break;case 39:if(!e){if(this.draggable){if(j+h+i<=g.width){this.move(j+i,l)}}}else{if(this.resizable){this.resize(h+i,n)}}o=false;break;case 40:if(!e){if(this.draggable){if(l+n+i<=g.height){this.move(j,l+i)}}}else{if(this.resizable){this.resize(h,n+i)}}o=false;break}if(!o){if(f.preventDefault){f.preventDefault()}if(f.stopPropagation){f.stopPropagation()}}return o},_addCollapseHandlers:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("click"),function(){if(!e.collapsed){e.collapse()}else{e.expand()}})},_closeWindow:function(){this.closeWindow();return false},_addHeaderCursorHandlers:function(e){if(e.resizeArea&&e.resizable&&!e.collapsed){e._header[0].style.cursor=e._resizeWrapper.style.cursor;return}else{if(e.draggable){e._header[0].style.cursor="move";return}}e._header[0].style.cursor="default";if(e._resizeWrapper){e._resizeWrapper.style.cursor="default"}},_addDragDropHandlers:function(){if(this.draggable){var e=this;this.addHandler(this.host,"focus",function(){e._headerFocused=true});this.addHandler(this.host,"blur",function(){e._headerFocused=false});this.addHandler(this._header,"focus",function(){e._headerFocused=true;return false});this.addHandler(this._header,this._getEvent("mousedown"),function(j,i,k){if(i){j.pageX=i}if(k){j.pageY=k}e._headerMouseDownHandler(e,j);return true});this.addHandler(this._header,"dragstart",function(i){if(i.preventDefault){i.preventDefault()}return false});this.addHandler(this._header,this._getEvent("mousemove"),function(i){return e._headerMouseMoveHandler(e,i)});this.addHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"),function(i){return e._dragHandler(e,i)});this.addHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"),function(i){return e._dropHandler(e,i)});try{if(document.referrer!==""||window.frameElement){var h=null;if(window.top!=null&&window.top!=window.self){if(window.parent&&document.referrer){h=document.referrer}}if(h&&h.indexOf(document.location.host)!=-1){var g=function(i){e._dropHandler(e,i)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}catch(f){}}},_headerMouseDownHandler:function(f,g){if(!f.isModal){f.bringToFront()}if(f._resizeDirection==null){var e=a.jqx.position(g);f._mousePosition.x=e.left;f._mousePosition.y=e.top;f._mouseDown=true;f._isDragging=false}},_headerMouseMoveHandler:function(f,i){if(f._mouseDown&&!f._isDragging){var j=a.jqx.mobile.getTouches(i);var k=j[0];var h=k.pageX,g=k.pageY;var e=a.jqx.position(i);h=e.left;g=e.top;if((h+3f._mousePosition.x)||(g+3f._mousePosition.y)){f._isDragging=true;f._mousePosition={x:h,y:g};f._windowPosition={x:f.host.coord().left,y:f.host.coord().top};a(document.body).addClass(f.toThemeProperty("jqx-disableselect"))}if(f._isTouchDevice){i.preventDefault();return true}return false}if(f._isDragging){if(f._isTouchDevice){i.preventDefault();return true}return false}return true},_dropHandler:function(g,j){var f=true;if(g._isDragging&&!g.isResizing&&!g._resizeDirection){var e=parseInt(g.host.css("left"),10),k=parseInt(g.host.css("top"),10),i=(g._isTouchDevice)?0:j.pageX,h=(g._isTouchDevice)?0:j.pageY;g.enableResize=g._enableResizeBackup;g._enableResizeBackup="undefined";g._raiseEvent(3,e,k,i,h);f=false;if(j.preventDefault!="undefined"){j.preventDefault()}if(j.originalEvent!=null){j.originalEvent.mouseHandled=true}if(j.stopPropagation!="undefined"){j.stopPropagation()}}g._isDragging=false;g._mouseDown=false;a(document.body).removeClass(g.toThemeProperty("jqx-disableselect"));return f},_dragHandler:function(m,h){if(m._isDragging&&!m.isResizing&&!m._resizeDirection){var l=(m._isTouchDevice)?h.originalEvent.which:h.which;if(typeof m._enableResizeBackup==="undefined"){m._enableResizeBackup=m.enableResize}m.enableResize=false;if(l===0&&a.jqx.browser.msie&&a.jqx.browser.version<8){return m._dropHandler(m,h)}var k=a.jqx.position(h);var j=k.left,i=k.top,g=j-m._mousePosition.x,f=i-m._mousePosition.y,e=m._windowPosition.x+g,n=m._windowPosition.y+f;m.move(e,n,h);h.preventDefault();return false}return true},_validateCoordinates:function(e,k,i,j){var h=this._getDraggingArea();e=(e=h.width+h.left-2*j){e=h.width+h.left-f-j}if(k+g>=h.height+h.top-i){k=h.height+h.top-g-i}return{x:e,y:k}},_performLayout:function(){this._performHeaderLayout();this._performWidgetLayout()},_parseDragAreaAttributes:function(){if(this.dragArea!==null){this.dragArea.height=parseInt(this.dragArea.height,10);this.dragArea.width=parseInt(this.dragArea.width,10);this.dragArea.top=parseInt(this.dragArea.top,10);this.dragArea.left=parseInt(this.dragArea.left,10)}},_positionWindow:function(){this._parseDragAreaAttributes();if(this.position instanceof Array&&this.position.length===2&&typeof this.position[0]==="number"&&typeof this.position[1]==="number"){this.element.style.left=this._toPx(this.position[0]);this.element.style.top=this._toPx(this.position[1])}else{if(this.position instanceof Object){if(this.position.left){this.host.offset(this.position)}else{if(this.position.x!==undefined&&this.position.y!==undefined){this.element.style.left=this._toPx(this.position.x);this.element.style.top=this._toPx(this.position.y)}else{if(this.position.center){this._centerElement(this.host,this.position.center,"xy");var g=this.position.center.coord();var f=parseInt(this.host.css("left"),10);var e=parseInt(this.host.css("top"),10);this.element.style.left=this._toPx(f+g.left);this.element.style.top=this._toPx(e+g.top)}}}}else{this._positionFromLiteral()}}},_getDraggingArea:function(){var e={};e.left=((this.dragArea&&this.dragArea.left)?this.dragArea.left:0);e.top=((this.dragArea&&this.dragArea.top)?this.dragArea.top:0);e.width=((this.dragArea&&this.dragArea.width)?this.dragArea.width:this._getDocumentSize().width);e.height=((this.dragArea&&this.dragArea.height)?this.dragArea.height:this._getDocumentSize().height);return e},_positionFromLiteral:function(){if(!(this.position instanceof Array)){this.position=this.position.split(",")}var e=this.position.length,f=this._getDraggingArea();while(e){e-=1;this.position[e]=this.position[e].replace(/ /g,"");switch(this.position[e]){case"top":this.element.style.top=this._toPx(f.top);break;case"left":this.element.style.left=this._toPx(f.left);break;case"bottom":this.element.style.top=this._toPx(f.height-this.host.height()+f.top);break;case"right":this.element.style.left=this._toPx(f.left+f.width-this.host.width());break;default:if(!this.dragArea){f=a(window)}this._centerElement(this.host,f,"xy");break}}},_raiseEvent:function(g){var f=this._events[g],h=a.Event(f),e={};if(g===2||g===3){e.x=arguments[1];e.y=arguments[2];e.pageX=arguments[3];e.pageY=arguments[4]}if(f==="closed"||f==="close"){e.dialogResult=this.dialogResult}h.args=e;return this.host.trigger(h)},destroy:function(){this.removeHandler(a(window),"resize.window"+this.element.id);this._removeEventHandlers();this._destroy()},_destroy:function(){if(this.isModal){if(this._modalBackground!==null){a(this._modalBackground).remove()}this.host.jqxWindow({isModal:false})}if(this.restricter){this.removeHandler(a(window),"resize."+this.element.id);this.removeHandler(a(window),"orientationchanged."+this.element.id);this.removeHandler(a(window),"orientationchange."+this.element.id)}this.host.remove();if(this._modalBackground!==null){a(this._modalBackground).remove()}},_toClose:function(f,e){return((f&&e[0]===this.element)||(e[0]!==this.element&&typeof e[0]==="object"))},propertyChangedHandler:function(e,g,m,k){this._validateProperties();switch(g){case"rtl":this._performLayout();break;case"dragArea":this._positionWindow();break;case"collapseButtonSize":this._performLayout();break;case"closeButtonSize":this._performLayout();break;case"isModal":this._refresh();this._fixWindowZIndex();if(k===false){var h=a.data(document.body,"jqxwindows-modallist");var l=[];for(var f=0;fg;e-=1){var h=parseInt(f[e].css("z-index"),10)-1;f[e][0].style.zIndex=h}this.element.style.zIndex=j;this._sortByStyle("z-index",f)},hide:function(i,h,e){var g=this;if(this.closing){var f=this.closing();if(f===false){return}}h=h||this.closeAnimationDuration;switch(this.animationType){case"none":this.element.style.display="none";break;case"fade":g._animationInProgress=true;this.host.fadeOut({duration:h,callback:function(){g._animationInProgress=false;if(i instanceof Function){i()}}});break;case"slide":g._animationInProgress=true;this.host.slideUp({duration:h,callback:function(){g._animationInProgress=false;if(i instanceof Function){i()}}});break;case"combined":g._animationInProgress=true;this.host.animate({opacity:0,width:"0px",height:"0px"},{duration:h,complete:function(){g._animationInProgress=false;g.element.style.display="none";if(i instanceof Function){i()}}});break}this._visible=false;if(this.isModal){a(this._modalBackground).hide();this._fixWindowZIndex("modal-hide")}if(e!==true){this._raiseEvent(1);this._raiseEvent(8)}},open:function(f,e){this.show(f,e)},close:function(g,f,e){this.hide(g,f,e)},show:function(k,j){var i=this;this._setDialogResult("none");j=j||this.showAnimationDuration;switch(this.animationType){case"none":this.element.style.display="block";break;case"fade":i._animationInProgress=true;this.host.fadeIn({duration:j,complete:function(){i._animationInProgress=false;if(k instanceof Function){k()}}});break;case"slide":i._animationInProgress=true;this.host.slideDown({duration:j,callback:function(){i._animationInProgress=false;if(k instanceof Function){k()}}});break;case"combined":this.element.style.display="block";var g=i.host.width();var e=i.host.height();this.element.style.minWidth="0px";this.element.style.minHeight="0px";this.element.style.opacity=0;this.element.style.width="0px";this.element.style.height="0px";i._animationInProgress=true;this.host.animate({opacity:1,width:g+"px",height:e+"px"},{duration:j,complete:function(){i._animationInProgress=false;i._performLayout();if(k instanceof Function){k()}}});break}if(this.isModal){a(this._modalBackground).show();this._fixWindowZIndex("modal-show")}var h=this;if(!this._visible){if(j>150&&this.animationType!="none"){setTimeout(function(){if(!h._contentInitialized){if(h.initContent){h.initContent();h._contentInitialized=true}}h._raiseEvent(7);h._raiseEvent(9)},j-150)}else{if(!h._contentInitialized){if(h.initContent){h.initContent();h._contentInitialized=true}}this._raiseEvent(7);h._raiseEvent(9)}}this._visible=true;if(i.animationType!=="combined"){this._performLayout()}if(this.autoFocus){var f=function(){if(!h._isTouchDevice){h._content[0].focus()}};f();setTimeout(function(){f()},100)}},_getTabbables:function(){var f;if(a.jqx.browser.msie&&a.jqx.browser.version<9){f=this._content.find("*")}else{f=this._content[0].querySelectorAll("*")}var e=[];a.each(f,function(){if(d(this)){e[e.length]=this}});return e},move:function(n,m,e,h){var g=0,f=0,k,j,i;n=parseInt(n,10);m=parseInt(m,10);if(a.jqx.browser.msie){if(a(window).width()>a(document).width()&&!this.dragArea){f=this._SCROLL_WIDTH}if(a(window).height()document.documentElement.scrollWidth&&!this.dragArea){g=this._SCROLL_WIDTH}}k=this._validateCoordinates(n,m,f,g);if(parseInt(this.host.css("left"),10)!==k.x||parseInt(this.host.css("top"),10)!==k.y){if(e){var l=a.jqx.position(e);j=l.left;i=l.top}if(j===undefined){j=n}if(i===undefined){i=m}if(h!==false){this._raiseEvent(2,k.x,k.y,j,i)}}this.element.style.left=k.x+"px";this.element.style.top=k.y+"px";this._moved=true},_toPx:function(e){if(typeof e==="number"){return e+"px"}else{return e}}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(f){var e=a(f);return e.css("display")!=="none"&&e.css("visibility")!=="hidden"}function d(g){var e=g.getAttribute("tabindex"),f=e===null;return(f||e>=0)&&c(g,!f)}}(jqxBaseFramework));(function(b){var a=(function(c){return{resizeConfig:function(){this.resizeTarget=null;this.resizeIndicatorSize=5;this.resizeTargetChildren=null;this.isResizing=false;this.resizeArea=false;this.minWidth=1;this.maxWidth=100;this.minHeight=1;this.maxHeight=100;this.resizeParent=null;this.enableResize=true;this._resizeEvents=["resizing","resized","resize"];this._resizeMouseDown=false;this._resizeCurrentMode=null;this._mouseResizePosition={};this._resizeMethods=null;this._SCROLL_WIDTH=21},_resizeExceptions:{invalidTarget:"Invalid target!",invalidMinHeight:"Invalid minimal height!",invalidMaxHeight:"Invalid maximum height!",invalidMinWidth:"Invalid minimum width!",invalidMaxWidth:"Invalid maximum width!",invalidIndicatorSize:"Invalid indicator size!",invalidSize:"Invalid size!"},removeResize:function(){if(this.resizeTarget){var f=c(this.resizeTarget.children(".jqx-resize"));f.detach();var e=f.children();this._removeResizeEventListeners();for(var d=0;dthis.minWidth)?3*this.resizeIndicatorSize:this.minWidth);this.resizeTarget.maxHeight=this.maxHeight;this.resizeTarget.minHeight=((3*this.resizeIndicatorSize>this.minHeight)?3*this.resizeIndicatorSize:this.minHeight)},_parseResizeParentProperties:function(){if(this.resizeParent){this.resizeParent.left=parseInt(this.resizeParent.left,10);this.resizeParent.top=parseInt(this.resizeParent.top,10);this.resizeParent.width=parseInt(this.resizeParent.width,10);this.resizeParent.height=parseInt(this.resizeParent.height,10)}},_getChildren:function(h,e,g,i,d){this.resizeTargetChildren=c(d);this.resizeTargetChildren=this.resizeTargetChildren.toArray();var f=this.resizeTargetChildren.length;while(f){f-=1;this.resizeTargetChildren[f]=c(this.resizeTargetChildren[f])}},_refreshResize:function(){this._renderResize();this._performResizeLayout();this._removeResizeEventListeners();this._addResizeEventHandlers()},_renderResize:function(){var d=this;if(d._resizeWrapper!==undefined&&c(d._resizeWrapper).parents().length>0){return}var e=document.createElement("div");e.className="jqx-resize jqx-rc-all";e.style.zIndex=8000;e.appendChild(d._header[0]);e.appendChild(d._content[0]);d.resizeTarget[0].appendChild(e);d._resizeWrapper=e},_performResizeLayout:function(){this._resizeWrapper.style.height=this.resizeTarget.height()+"px";this._resizeWrapper.style.width=this.resizeTarget.width()+"px"},_removeResizeEventListeners:function(){var d=this.resizeTarget.attr("id");this.removeHandler(this._resizeWrapper,"mousemove.resize"+d);this.removeHandler(this._resizeWrapper,"mousedown.resize"+d);this.removeHandler(c(document),"mousemove.resize"+d);this.removeHandler(c(document),"mouseup.resize"+d)},_addResizeEventHandlers:function(){var g=this.resizeTarget.attr("id");var d=this;if(d._isTouchDevice){this.addHandler(this._resizeWrapper,"touchmove.resize."+g,function(h){d._resizeCursorChangeHandler(d,h)});this.addHandler(this._resizeWrapper,"touchstart.resize."+g,function(h){d._resizeCursorChangeHandler(d,h);d._resizeMouseDownHandler(d,h)});this.addHandler(c(document),"touchmove.resize."+g,function(h){return d._resizeHandler(d,h)});this.addHandler(c(document),"touchend.resize."+g,function(h){d._stopResizing(d,h)})}else{this.addHandler(this._resizeWrapper,"mousemove.resize."+g,function(h){d._resizeCursorChangeHandler(d,h)});this.addHandler(this._resizeWrapper,"mousedown.resize."+g,function(h){d._resizeMouseDownHandler(d,h)});this.addHandler(c(document),"mousemove.resize."+g,function(h){return d._resizeHandler(d,h)});this.addHandler(c(document),"mouseup.resize."+g,function(h){d._stopResizing(d,h)})}try{if(document.referrer!==""||window.frameElement){var f=function(h){d._stopResizing(d,h)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",f,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",f)}}}}catch(e){}},_stopResizing:function(d){if(d.enableResize){if(d.isResizing){d._raiseResizeEvent(1)}d._resizeMouseDown=false;d.isResizing=false;d._resizeDirection=null;if(d.resizeTarget){d.resizeTarget.removeClass("jqx-disableselect")}}if(d._cursorBackup=="undefined"){d._cursorBackup="default"}if(d._resizeWrapper){d._resizeWrapper.style.cursor=d._cursorBackup}},_resizeHandler:function(e,f){if(e.enableResize&&!e.collapsed){if(e.isResizing&&e._resizeDirection){if(f.which===0&&c.jqx.browser.msie&&c.jqx.browser.version<9){e._stopResizing(f)}if(e._isTouchDevice){var d=c.jqx.position(f);e._performResize(d.left,d.top);return false}e._performResize(f.pageX,f.pageY);return false}else{if(e._isTouchDevice){var d=c.jqx.position(f);return e._resizeCaptureCursor(d.left,d.top)}return e._resizeCaptureCursor(f.pageX,f.pageY)}}},_resizeCaptureCursor:function(e,d){if(this._resizeMouseDown&&!this.isResizing&&this._resizeDirection){var f=3;if(this._isTouchDevice){this._changeCursor(e-parseInt(this.resizeTarget.css("left"),10),d-parseInt(this.resizeTarget.css("top"),10));this._mouseResizePosition={x:e,y:d};this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this.resizeTarget.addClass("jqx-disableselect");return false}if((e+fthis._mouseResizePosition.x)||(d+fthis._mouseResizePosition.y)){this._changeCursor(e-parseInt(this.resizeTarget.css("left"),10),d-parseInt(this.resizeTarget.css("top"),10));this._mouseResizePosition={x:e,y:d};this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this.resizeTarget.addClass("jqx-disableselect");return false}}},_resizeBackupData:function(){this.resizeTarget.lastWidth=this.resizeTarget.width();this.resizeTarget.lastHeight=this.resizeTarget.height();this.resizeTarget.x=parseInt(this.resizeTarget.css("left"),10);this.resizeTarget.y=parseInt(this.resizeTarget.css("top"),10);this._resizeBackupChildrenSize()},_resizeBackupChildrenSize:function(){var d=this.resizeTargetChildren.length,e;while(d){d-=1;e=this.resizeTargetChildren[d];this.resizeTargetChildren[d].lastWidth=e.width();this.resizeTargetChildren[d].lastHeight=e.height()}},_performResize:function(g,f){var e=g-this._mouseResizePosition.x,d=f-this._mouseResizePosition.y;if(this._resizeDirection){this._resize(this.resizeTarget,e,d)}},_resizeCursorChangeHandler:function(e,f){if(e.enableResize&&!e.collapsed){if(!e.isResizing){if(e._isTouchDevice){var d=c.jqx.position(f);e._changeCursor(d.left-parseInt(e.resizeTarget.css("left"),10),d.top-parseInt(e.resizeTarget.css("top"),10));return}e._changeCursor(f.pageX-parseInt(e.resizeTarget.css("left"),10),f.pageY-parseInt(e.resizeTarget.css("top"),10))}}},_resizeMouseDownHandler:function(e,f){if(e.enableResize){if(e._resizeDirection!==null){e._resizeMouseDown=true;if(e._isTouchDevice){var d=c.jqx.position(f);e._mouseResizePosition.x=d.left;e._mouseResizePosition.y=d.top}else{e._mouseResizePosition.x=f.pageX;e._mouseResizePosition.y=f.pageY}f.preventDefault()}}},_validateResizeProperties:function(){try{if(!this.resizeTarget||this.resizeTarget.length!==1){throw new Error(this._resizeExceptions.invalidTarget)}if(this.minHeight<0||isNaN(parseInt(this.minHeight,10))){throw new Error(this._resizeExceptions.invalidMinHeight)}if(this.maxHeight<=0||isNaN(parseInt(this.maxHeight,10))){throw new Error(this._resizeExceptions.invalidMaxHeight)}if(this.minWidth<0||isNaN(parseInt(this.minWidth,10))){throw new Error(this._resizeExceptions.invalidMinWidth)}if(this.maxWidth<0||isNaN(parseInt(this.maxWidth,10))){throw new Error(this._resizeExceptions.invalidMaxWidth)}if(this.resizeIndicatorSize<0||isNaN(parseInt(this.resizeIndicatorSize,10))){throw new Error(this._resizeExceptions.invalidIndicatorSize)}if(this.minHeight>this.maxHeight||this.minWidth>this.maxWidth){throw new Error(this._resizeExceptions.invalidSize)}}catch(d){throw new Error(d)}},_changeCursor:function(d,e){if(this.isResizing||this._resizeMouseDown){return}this.resizeArea=true;if(d<=this.resizeIndicatorSize&&d>=0&&e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.style.cursor="nw-resize";this._resizeDirection="topleft"}else{if(e<=this.resizeIndicatorSize&&e>0&&d>=this.resizeTarget.width()-this.resizeIndicatorSize){this._resizeWrapper.style.cursor="ne-resize";this._resizeDirection="topright"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e=0){this._resizeWrapper.style.cursor="sw-resize";this._resizeDirection="bottomleft"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e=this.resizeTarget.width()-this.resizeIndicatorSize&&d=0){this._resizeWrapper.style.cursor="e-resize";this._resizeDirection="left"}else{if(e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.style.cursor="n-resize";this._resizeDirection="top"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e=this.resizeTarget.width()-this.resizeIndicatorSize&&d=0){this._resizeMethods.push(this._resizeLeft)}if(d.indexOf("top")>=0){this._resizeMethods.push(this._resizeTop)}if(d.indexOf("right")>=0){this._resizeMethods.push(this._resizeRight)}if(d.indexOf("bottom")>=0){this._resizeMethods.push(this._resizeBottom)}},_validateResize:function(g,d,h,f,e){if(h==="horizontal"||h==="both"){return this._validateWidth(g,f,e)}else{if(h==="vertical"||h==="both"){return this._validateHeight(d,f,e)}}return{result:false,fix:0}},_getParent:function(){if(this.resizeParent!==null&&this.resizeParent!=="undefined"&&this.resizeParent.height&&this.resizeParent.width&&this.resizeParent.top&&this.resizeParent.left){return this.resizeParent}return{left:0,top:0,width:c(document).width(),height:c(document).height()}},_validateHeight:function(e,h,g){var i=0,d=2,f=this._getParent();if(c(window).width()>c(document).width()&&c.jqx.browser.msie&&f.height===c(document).height()){i=this._SCROLL_WIDTH}if(g==="bottom"&&(e+h.position().top+i+d>f.height+f.top)){return{fix:f.height-h.position().top-i-d+f.top,result:false}}if(g==="top"&&h.lastHeight-e+h.yh.maxHeight){return{fix:h.maxHeight,result:false}}return{result:true,fix:e}},_validateWidth:function(h,g,f){var i=0,d=2,e=this._getParent();if(c(window).height()=document.documentElement.scrollWidth&&e.width===c(document).width()){i=this._SCROLL_WIDTH}if(f==="right"&&(h+g.position().left+i+d>e.width+e.left)){return{fix:e.width-g.position().left-i-d+e.left,result:false}}if(f==="left"&&(g.lastWidth-h+g.xg.maxWidth){return{fix:g.maxWidth,result:false}}return{result:true,fix:h}},_resize:function(h,e,d){var j=this._resizeMethods.length;for(var g=0;g0){this.resizeTargetChildren[h].width(g)}}else{var d=this.resizeTargetChildren[h].lastHeight-(this.resizeTarget.lastHeight-e);if(d0){this.resizeTargetChildren[h].height(d)}}}},_resizeRight:function(g){var h=g.element.lastWidth+g.x,d=g.self._validateResize(h,0,"horizontal",g.element,"right");if(!d.result){h=d.fix}if(g.element.width()!==h){g.self._setResizeChildrenSize(h,"width");g.element.width(h);if(g.self.width.toString().indexOf("%")>=0){var f=c(document.body).width()/100;var e=1/f;g.element[0].style.width=(e*h)+"%";g.self._setChildrenLayout()}g.self._raiseResizeEvent(0)}return h},_resizeLeft:function(h){var i=h.element.lastWidth-h.x,e=h.self._validateResize(i,0,"horizontal",h.element,"left"),d=h.element.x+h.x;if(!e.result){d=h.element.x+(h.element.lastWidth-e.fix);i=e.fix;return}if(h.element.width()!==i){h.self._setResizeChildrenSize(i,"width");h.element.width(i);if(h.self.width.toString().indexOf("%")>=0){var g=c(document.body).width()/100;var f=1/g;h.element[0].style.width=(f*i)+"%";h.self._setChildrenLayout()}h.element[0].style.left=h.self._toPx(d);h.self._raiseResizeEvent(0)}return i},_resizeBottom:function(h){var e=h.element.lastHeight+h.y,d=h.self._validateResize(0,e,"vertical",h.element,"bottom");if(!d.result){e=d.fix}if(h.element.height()!==e){h.self._setResizeChildrenSize(e,"height");h.element.height(e);if(h.self.height.toString().indexOf("%")>=0){var g=c(document.body).height()/100;var f=1/g;h.element[0].style.height=(f*e)+"%";h.self._setChildrenLayout()}h.self._raiseResizeEvent(0)}return e},_resizeTop:function(h){var e=h.element.lastHeight-h.y,d=h.self._validateResize(0,e,"vertical",h.element,"top"),i=h.element.y+h.y;if(!d.result){i=h.element.y+(h.element.lastHeight-d.fix);e=d.fix;return}if(h.element.height()!==e){h.self._setResizeChildrenSize(e,"height");h.element.height(e);if(h.self.height.toString().indexOf("%")>=0){var g=c(document.body).height()/100;var f=1/g;h.element[0].style.height=(f*e)+"%";h.self._setChildrenLayout()}h.element[0].style.top=h.self._toPx(i);h.self._raiseResizeEvent(0)}return e},_raiseResizeEvent:function(f){var e=this._resizeEvents[f],g=c.Event(e),d={};d.width=parseInt(this.resizeTarget[0].style.width,10);d.height=parseInt(this.resizeTarget[0].style.height,10);g.args=d;if(f===0){e=this._resizeEvents[2];var h=c.Event(e);h.args=d;this.resizeTarget.trigger(h)}return this.resizeTarget.trigger(g)}}}(jqxBaseFramework));b.extend(b.jqx._jqxWindow.prototype,a)}(jqxBaseFramework)); +(function(a){a.jqx.jqxWidget("jqxWindow","",{});a.extend(a.jqx._jqxWindow.prototype,{defineInstance:function(){var e={height:"auto",width:200,minHeight:50,maxHeight:1200,minWidth:50,maxWidth:1200,showCloseButton:true,disabled:false,autoOpen:true,keyboardCloseKey:"esc",title:"",content:"",draggable:true,resizable:true,animationType:"fade",closeAnimationDuration:250,showAnimationDuration:250,isModal:false,position:"center",closeButtonSize:16,closeButtonAction:"hide",modalOpacity:0.3,dragArea:null,okButton:null,cancelButton:null,dialogResult:{OK:false,Cancel:false,None:true},collapsed:false,showCollapseButton:false,collapseAnimationDuration:150,collapseButtonSize:16,rtl:false,keyboardNavigation:true,headerHeight:null,_events:["created","closed","moving","moved","open","collapse","expand","open","close","resize"],initContent:null,enableResize:true,restricter:null,autoFocus:true,closing:null,_invalidArgumentExceptions:{invalidHeight:"Invalid height!",invalidWidth:"Invalid width!",invalidMinHeight:"Invalid minHeight!",invalidMaxHeight:"Invalid maxHeight!",invalidMinWidth:"Invalid minWidth!",invalidMaxWidth:"Invalid maxWidth",invalidKeyCode:"Invalid keyCode!",invalidAnimationType:"Invalid animationType!",invalidCloseAnimationDuration:"Invalid closeAnimationDuration!",invalidShowAnimationDuration:"Invalid showAnimationDuration!",invalidPosition:"Invalid position!",invalidCloseButtonSize:"Invalid closeButtonSize!",invalidCollapseButtonSize:"Invalid collapseButtonSize!",invalidCloseButtonAction:"Invalid cluseButtonAction!",invalidModalOpacity:"Invalid modalOpacity!",invalidDragArea:"Invalid dragArea!",invalidDialogResult:"Invalid dialogResult!",invalidIsModal:"You can have just one modal window!"},_enableResizeCollapseBackup:null,_enableResizeBackup:undefined,_heightBeforeCollapse:null,_minHeightBeforeCollapse:null,_mouseDown:false,_isDragging:false,_rightContentWrapper:null,_leftContentWrapper:null,_headerContentWrapper:null,_closeButton:null,_collapseButton:null,_title:null,_content:null,_mousePosition:{},_windowPosition:{},_modalBackground:null,_SCROLL_WIDTH:21,_visible:true,modalBackgroundZIndex:1299,modalZIndex:1800,zIndex:1000,_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave",click:a.jqx.mobile.getTouchEventName("touchstart")}};if(this===a.jqx._jqxWindow.prototype){return e}a.extend(true,this,e);return e},createInstance:function(){if(this.host.initAnimate){this.host.initAnimate()}this.host.attr("role","dialog");this.host.removeAttr("data-bind");this.host.appendTo(document.body);var g=this;var f=function(l){for(var k=0;k=0){g[j]=parseInt(g[j],10)}}};f(["minWidth","minHeight","maxWidth","maxHeight","width","height"]);var h=function(){var j=parseInt(a(g.restricter).css("padding-top"),10);var i=parseInt(a(g.restricter).css("padding-left"),10);var k=parseInt(a(g.restricter).css("padding-bottom"),10);var m=parseInt(a(g.restricter).css("padding-right"),10);var l=a(g.restricter).coord();g.dragArea={left:i+l.left,top:j+l.top,width:1+m+a(g.restricter).width(),height:1+k+a(g.restricter).height()}};if(this.restricter){h()}if(this.restricter){this.addHandler(a(window),"resize."+this.element.id,function(){h()});this.addHandler(a(window),"orientationchanged."+this.element.id,function(){h()});this.addHandler(a(window),"orientationchange."+this.element.id,function(){h()})}this._isTouchDevice=a.jqx.mobile.isTouchDevice();this._validateProperties();this._createStructure();this._refresh();if(!this.autoOpen){this.element.style.display="none"}if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}if(!this.isModal){this._fixWindowZIndex()}this._setStartupSettings();this._positionWindow();this._raiseEvent(0);if(this.autoOpen){this._performLayout();var e=this;if(this.isModal){this._fixWindowZIndex("modal-show")}if(e.initContent){e.initContent();e._contentInitialized=true}this._raiseEvent(7);this._raiseEvent(9)}},refresh:function(){this._performLayout()},_setStartupSettings:function(){if(this.disabled){this.disable()}if(this.collapsed){this.collapsed=false;this.collapse(0)}if(!this.autoOpen){this.hide(null,0.001,true);this._visible=false}if(this.title!==null&&this.title!==""){this.setTitle(this.title)}if(this.content!==null&&this.content!==""){this.setContent(this.content)}this.title=this._headerContentWrapper.html();this.content=this._content.html()},_fixWindowZIndex:function(h){var g=a.data(document.body,"jqxwindows-list")||[],l=this.zIndex;if(!this.isModal){if(this._indexOf(this.host,g)<0){g.push(this.host)}a.data(document.body,"jqxwindows-list",g);if(g.length>1){var k=g[g.length-2];if(k.css("z-index")=="auto"){l=this.zIndex+g.length+1}else{var i=this.zIndex;l=parseInt(k.css("z-index"),10)+1;if(l1){throw new Error(this._invalidArgumentExceptions.invalidModalOpacity)}if(this.isModal&&!this._singleModalCheck()){throw new Error(this._invalidArgumentExceptions.invalidIsModal)}},_validateSize:function(){this._validateSizeLimits();if(this.height!=="auto"&&isNaN(parseInt(this.height,10))){throw new Error(this._invalidArgumentExceptions.invalidHeight)}if(this.width!=="auto"&&isNaN(parseInt(this.width,10))){throw new Error(this._invalidArgumentExceptions.invalidWidth)}if(this.height!=="auto"&&this.heightthis.maxHeight){this.height=this.maxHeight}if(this.width>this.maxWidth){this.width=this.maxWidth}if(this.dragArea===null){return}if(this.dragArea&&((this.dragArea.height!==null&&this.host.height()>this.dragArea.height)||(parseInt(this.height,10)>this.dragArea.height))||(this.dragArea.width!==null&&this.width>this.dragArea.width)||(this.maxHeight>this.dragArea.height||this.maxWidth>this.dragArea.width)){}},_validateSizeLimits:function(){if(this.maxHeight==null){this.maxHeight=9999}if(this.minWidth==null){this.minWidth=0}if(this.maxWidth==null){this.maxWidth=9999}if(this.minHeight==null){this.minHeight=0}if(isNaN(parseInt(this.minHeight,10))){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}if(isNaN(parseInt(this.maxHeight,10))){throw new Error(this._invalidArgumentExceptions.invalidMaxHeight)}if(isNaN(parseInt(this.minWidth,10))){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}if(isNaN(parseInt(this.maxWidth,10))){throw new Error(this._invalidArgumentExceptions.invalidMaxWidth)}if(this.minHeight&&this.maxHeight){if(parseInt(this.minHeight,10)>parseInt(this.maxHeight,10)&&this.maxHeight!=Number.MAX_VALUE){throw new Error(this._invalidArgumentExceptions.invalidMinHeight)}}if(this.minWidth&&this.maxWidth){if(parseInt(this.minWidth,10)>parseInt(this.maxWidth,10)&&this.maxWidth!=Number.MAX_VALUE){throw new Error(this._invalidArgumentExceptions.invalidMinWidth)}}},_validateAnimationProperties:function(){if(this.animationType!=="fade"&&this.animationType!=="slide"&&this.animationType!=="combined"&&this.animationType!=="none"){throw new Error(this._invalidArgumentExceptions.invalidAnimationType)}if(isNaN(parseInt(this.closeAnimationDuration,10))||this.closeAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidCloseAnimationDuration)}if(isNaN(parseInt(this.showAnimationDuration,10))||this.showAnimationDuration<0){throw new Error(this._invalidArgumentExceptions.invalidShowAnimationDuration)}},_validateInteractionProperties:function(){if(parseInt(this.keyCode,10)<0||parseInt(this.keyCode,10)>130&&this.keyCode!=="esc"){throw new Error(this._invalidArgumentExceptions.invalidKeyCode)}if(this.dragArea!==null&&(typeof this.dragArea.width==="undefined"||typeof this.dragArea.height==="undefined"||typeof this.dragArea.left==="undefined"||typeof this.dragArea.top==="undefined")){throw new Error(this._invalidArgumentExceptions.invalidDragArea)}if(!this.dialogResult||(!this.dialogResult.OK&&!this.dialogResult.Cancel&&!this.dialogResult.None)){throw new Error(this._invalidArgumentExceptions.invalidDialogResult)}if(this.closeButtonAction!=="hide"&&this.closeButtonAction!=="close"){throw new Error(this._invalidArgumentExceptions.invalidCloseButtonAction)}},_singleModalCheck:function(){var e=a.data(document.body,"jqxwindows-list")||[],f=e.length;while(f){f-=1;if(a(e[f].attr("id")).length>0){if(a(e[f].attr("id")).jqxWindow("isModal")){return false}}}return true},_createStructure:function(){var e=this.host.children();if(e.length===1){this._content=e[0];this._header=document.createElement("div");this._header.innerHTML=this.host.attr("caption");this.element.insertBefore(this._header,this._content);this.host.attr("caption","");this._header=a(this._header);this._content=a(this._content)}else{if(e.length===2){this._header=a(e[0]);this._content=a(e[1])}else{throw new Error("Invalid structure!")}}},_refresh:function(){this._render();this._addStyles();this._performLayout();this._removeEventHandlers();this._addEventHandlers();this._initializeResize()},_render:function(){this._addHeaderWrapper();this._addCloseButton();this._addCollapseButton();this._removeModal();this._makeModal()},_addHeaderWrapper:function(){if(!this._headerContentWrapper){this._header[0].innerHTML='
    '+this._header[0].innerHTML+"
    ";this._headerContentWrapper=a(this._header.children()[0]);if(this.headerHeight!==null){this._header.height(this.headerHeight)}}},_addCloseButton:function(){if(!this._closeButton){this._closeButtonWrapper=document.createElement("div");this._closeButtonWrapper.className=this.toThemeProperty("jqx-window-close-button-background");this._closeButton=document.createElement("div");this._closeButton.className=this.toThemeProperty("jqx-window-close-button jqx-icon-close");this._closeButton.style.width="100%";this._closeButton.style.height="100%";this._closeButtonWrapper.appendChild(this._closeButton);this._header[0].appendChild(this._closeButtonWrapper);this._closeButtonWrapper=a(this._closeButtonWrapper);this._closeButton=a(this._closeButton)}},_addCollapseButton:function(){if(!this._collapseButton){this._collapseButtonWrapper=document.createElement("div");this._collapseButtonWrapper.className=this.toThemeProperty("jqx-window-collapse-button-background");this._collapseButton=document.createElement("div");this._collapseButton.className=this.toThemeProperty("jqx-window-collapse-button jqx-icon-arrow-up");this._collapseButton.style.width="100%";this._collapseButton.style.height="100%";this._collapseButtonWrapper.appendChild(this._collapseButton);this._header[0].appendChild(this._collapseButtonWrapper);this._collapseButtonWrapper=a(this._collapseButtonWrapper);this._collapseButton=a(this._collapseButton)}},_removeModal:function(){if(!this.isModal&&typeof this._modalBackground==="object"&&this._modalBackground!==null){a("."+this.toThemeProperty("jqx-window-modal")).remove();this._modalBackground=null}},focus:function(){try{this.host.focus();var f=this;setTimeout(function(){f.host.focus()},10)}catch(e){}},_makeModal:function(){if(this.isModal&&!this._modalBackground){var g=a.data(document.body,"jqxwindows-list");if(g){this._removeFromArray(this.host,g);a.data(document.body,"jqxwindows-list",g)}this._modalBackground=document.createElement("div");this._modalBackground.className=this.toThemeProperty("jqx-window-modal");this._setModalBackgroundStyles();document.body.appendChild(this._modalBackground);this.addHandler(this._modalBackground,this._getEvent("click"),function(){return false});var f=this;var e=function(h,i){return i.contains(h)};this.addHandler(this._modalBackground,"mouseup",function(h){f._stopResizing(f);h.preventDefault()});this.addHandler(this._modalBackground,"mousedown",function(i){var h=f._getTabbables();if(h.length>0){h[0].focus();setTimeout(function(){h[0].focus()},100)}i.preventDefault();return false});this.addHandler(a(document),"keydown.window"+this.element.id,function(k){if(k.keyCode!==9){return}var h=a.data(document.body,"jqxwindows-modallist");if(h.length>1){if(h[h.length-1][0]!=f.element){return}}var j=f._getTabbables();var l=null;var i=null;if(f.element.offsetWidth===0||f.element.offsetHeight===0){return}if(j.length>0){l=j[0];i=j[j.length-1]}if(k.target==f.element){return}if(l==null){return}if(!e(k.target,f.element)){l.focus();return false}if(k.target===i&&!k.shiftKey){l.focus();return false}else{if(k.target===l&&k.shiftKey){i.focus();return false}}})}},_addStyles:function(){this.host.addClass(this.toThemeProperty("jqx-rc-all"));this.host.addClass(this.toThemeProperty("jqx-window"));this.host.addClass(this.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){this.host.addClass(this.toThemeProperty("jqx-noshadow"))}this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-window-header"));this._content.addClass(this.toThemeProperty("jqx-window-content"));this._header.addClass(this.toThemeProperty("jqx-widget-header"));this._content.addClass(this.toThemeProperty("jqx-widget-content"));this._header.addClass(this.toThemeProperty("jqx-disableselect"));this._header.addClass(this.toThemeProperty("jqx-rc-t"));this._content.addClass(this.toThemeProperty("jqx-rc-b"));if(!this.host.attr("tabindex")){this.element.tabIndex=0;this._header[0].tabIndex=0;this._content[0].tabIndex=0}this.element.setAttribute("hideFocus","true");this.element.style.outline="none"},_performHeaderLayout:function(){this._handleHeaderButtons();this._header[0].style.position="relative";if(this.rtl){this._headerContentWrapper[0].style.direction="rtl";this._headerContentWrapper[0].style["float"]="right"}else{this._headerContentWrapper[0].style.direction="ltr";this._headerContentWrapper[0].style["float"]="left"}this._performHeaderCloseButtonLayout();this._performHeaderCollapseButtonLayout();this._centerElement(this._headerContentWrapper,this._header,"y","margin");if(this.headerHeight){this._centerElement(this._closeButtonWrapper,this._header,"y","margin");this._centerElement(this._collapseButtonWrapper,this._header,"y","margin")}},_handleHeaderButtons:function(){if(!this._closeButtonWrapper){return}if(!this.showCloseButton){this._closeButtonWrapper[0].style.visibility="hidden"}else{this._closeButtonWrapper[0].style.visibility="visible";var e=this._toPx(this.closeButtonSize);this._closeButtonWrapper[0].style.width=e;this._closeButtonWrapper[0].style.height=e}if(!this.showCollapseButton){this._collapseButtonWrapper[0].style.visibility="hidden"}else{this._collapseButtonWrapper[0].style.visibility="visible";var f=this._toPx(this.collapseButtonSize);this._collapseButtonWrapper[0].style.width=f;this._collapseButtonWrapper[0].style.height=f}},_performHeaderCloseButtonLayout:function(){if(!this._closeButtonWrapper){return}var e=parseInt(this._header.css("padding-right"),10);if(!isNaN(e)){this._closeButtonWrapper.width(this._closeButton.width());if(!this.rtl){this._closeButtonWrapper[0].style.marginRight=this._toPx(e);this._closeButtonWrapper[0].style.marginLeft="0px"}else{this._closeButtonWrapper[0].style.marginRight="0px";this._closeButtonWrapper[0].style.marginLeft=this._toPx(e)}}this._closeButtonWrapper[0].style.position="absolute";if(!this.rtl){this._closeButtonWrapper[0].style.right="0px";this._closeButtonWrapper[0].style.left=""}else{this._closeButtonWrapper[0].style.right="";this._closeButtonWrapper[0].style.left="0px"}},_performHeaderCollapseButtonLayout:function(){if(!this._closeButtonWrapper){return}var g=parseInt(this._header.css("padding-right"),10);if(!isNaN(g)){var f=this._toPx(this.collapseButtonSize);this._collapseButtonWrapper[0].style.width=f;this._collapseButtonWrapper[0].style.height=f;if(!this.rtl){this._collapseButtonWrapper[0].style.marginRight=this._toPx(g);this._collapseButtonWrapper[0].style.marginLeft="0px"}else{this._collapseButtonWrapper[0].style.marginRight="0px";this._collapseButtonWrapper[0].style.marginLeft=this._toPx(g)}}this._collapseButtonWrapper[0].style.position="absolute";var e=this._toPx(this.showCloseButton?this._closeButton.outerWidth(true):0);if(!this.rtl){this._collapseButtonWrapper[0].style.right=e;this._collapseButtonWrapper[0].style.left=""}else{this._collapseButtonWrapper[0].style.right="";this._collapseButtonWrapper[0].style.left=e}this._centerElement(this._collapseButton,a(this._collapseButton[0].parentElement),"y")},_performWidgetLayout:function(){var e;if(this.width!=="auto"){if(this.width&&this.width.toString().indexOf("%")>=0){this.element.style.width=this.width}else{this.element.style.width=this._toPx(this.width)}}if(!this.collapsed){if(this.height!=="auto"){if(this.height&&this.height.toString().indexOf("%")>=0){this.element.style.height=this.height}else{this.element.style.height=this._toPx(this.height)}}else{this.element.style.height=this.host.height()+"px"}this.element.style.minHeight=this._toPx(this.minHeight)}this._setChildrenLayout();e=this._validateMinSize();this.element.style.maxHeight=this._toPx(this.maxHeight);this.element.style.minWidth=this._toPx(this.minWidth);this.element.style.maxWidth=this._toPx(this.maxWidth);if(!e){this._setChildrenLayout()}},_setChildrenLayout:function(){this._header.width(this.host.width()-(this._header.outerWidth(true)-this._header.width()));this._content.width(this.host.width()-(this._content.outerWidth(true)-this._content.width()));this._content.height(this.host.height()-this._header.outerHeight(true)-(this._content.outerHeight(true)-this._content.height()))},_validateMinSize:function(){var f=true;if(this.minHeight=0){if(n){e[0].style.display="block"}var i=e.outerHeight(true),l;if(n){e[0].style.display="none"}l=o.height();var k=(Math.max(0,l-i))/2;e[0].style[f]=k+"px"}if(j.indexOf("x")>=0){if(n){e[0].style.display="block"}var q=e.outerWidth(true),p;if(n){e[0].style.display="none"}p=o.width();var m=(Math.max(0,p-q))/2;e[0].style[h]=m+"px"}},_centerElementInArea:function(f,e,h){h=h.toLowerCase();if(h.indexOf("y")>=0){var g=f.outerHeight(true);var j=e.height;var i=(j-g)/2;f[0].style.top=i+e.top+"px"}if(h.indexOf("x")>=0){var m=f.outerWidth(true);var l=e.width;var k=(l-m)/2;f[0].style.left=k+e.left+"px"}},_removeEventHandlers:function(){this.removeHandler(this._header,this._getEvent("mousedown"));this.removeHandler(this._header,this._getEvent("mousemove"));this.removeHandler(this._header,"focus");this.removeHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"));this.removeHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"));this.removeHandler(this.host,"keydown");this.removeHandler(this._closeButton,this._getEvent("click"));this.removeHandler(this._closeButton,this._getEvent("mouseenter"));this.removeHandler(this._closeButton,this._getEvent("mouseleave"));this.removeHandler(this._collapseButton,this._getEvent("click"));this.removeHandler(this._collapseButton,this._getEvent("mouseenter"));this.removeHandler(this._collapseButton,this._getEvent("mouseleave"));this.removeHandler(this.host,this._getEvent("mousedown"));if(this.okButton){this.removeHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler)}if(this.cancelButton){this.removeHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler)}this.removeHandler(this._header,this._getEvent("mouseenter"));this.removeHandler(this._header,this._getEvent("mouseleave"));this.removeHandler(this.host,"resizing",this._windowResizeHandler)},_removeFromArray:function(e,g){var f=this._indexOf(e,g);if(f>=0){return g.splice(this._indexOf(e,g),1)}else{return g}},_sortByStyle:function(e,l){for(var h=0;hh;f--){var m=l[f],k=l[f-1],g;if(parseInt(m.css(e),10)=0){var g=a(document.body).width()/100;var f=1/g;e.width=(f*h.args.width)+"%"}else{e.width=h.args.width}if(e.height&&e.height.toString().indexOf("%")>=0){var g=a(document.body).height()/100;var f=1/g;e.height=(f*h.args.height)+"%"}else{e.height=h.args.height}},_addHeaderHoverEffect:function(){var e=this;this.addHandler(this._header,this._getEvent("mouseenter"),function(){a(this).addClass(e.toThemeProperty("jqx-window-header-hover"))});this.addHandler(this._header,this._getEvent("mouseleave"),function(){a(this).removeClass(e.toThemeProperty("jqx-window-header-hover"))})},_addDialogButtonsHandlers:function(){if(this.okButton){this.addHandler(a(this.okButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"ok"})}if(this.cancelButton){this.addHandler(a(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler,{self:this,result:"cancel"})}},_documentResizeHandlers:function(){var e=this;if(this.isModal){this.addHandler(a(window),"resize.window"+this.element.id,function(){if(typeof e._modalBackground==="object"&&e._modalBackground!==null){if(e.isOpen()){e._modalBackground.style.display="none"}if(!e.restricter){var f=e._getDocumentSize();e._modalBackground.style.width=f.width+"px";e._modalBackground.style.height=f.height+"px"}else{e._modalBackground.style.left=e._toPx(e.dragArea.left);e._modalBackground.style.top=e._toPx(e.dragArea.top);e._modalBackground.style.width=e._toPx(e.dragArea.width);e._modalBackground.style.height=e._toPx(e.dragArea.height)}if(e.isOpen()){e._modalBackground.style.display="block"}}})}},_setDialogResultHandler:function(f){var e=f.data.self;e._setDialogResult(f.data.result);e.closeWindow()},_setDialogResult:function(e){this.dialogResult.OK=false;this.dialogResult.None=false;this.dialogResult.Cancel=false;e=e.toLowerCase();switch(e){case"ok":this.dialogResult.OK=true;break;case"cancel":this.dialogResult.Cancel=true;break;default:this.dialogResult.None=true}},_getDocumentSize:function(){var e=a.jqx.browser.msie&&a.jqx.browser.version<9;var f=e?4:0;var g=f;if(document.body.scrollHeight>document.body.clientHeight&&e){f=this._SCROLL_WIDTH}if(document.body.scrollWidth>document.body.clientWidth&&e){g=this._SCROLL_WIDTH}return{width:a(document).width()-f,height:a(document).height()-g}},_closeButtonHover:function(){var e=this;this.addHandler(this._closeButton,this._getEvent("mouseenter"),function(){e._closeButton.addClass(e.toThemeProperty("jqx-window-close-button-hover"))});this.addHandler(this._closeButton,this._getEvent("mouseleave"),function(){e._closeButton.removeClass(e.toThemeProperty("jqx-window-close-button-hover"))})},_collapseButtonHover:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("mouseenter"),function(){e._collapseButton.addClass(e.toThemeProperty("jqx-window-collapse-button-hover"))});this.addHandler(this._collapseButton,this._getEvent("mouseleave"),function(){e._collapseButton.removeClass(e.toThemeProperty("jqx-window-collapse-button-hover"))})},_setModalBackgroundStyles:function(){if(this.isModal){var e=this._getDocumentSize();if(!(a.jqx.browser.msie&&a.jqx.browser.version<9)){this._modalBackground.style.opacity=this.modalOpacity}else{this._modalBackground.style.filter="alpha(opacity="+(this.modalOpacity*100)+")"}this._modalBackground.style.position="absolute";this._modalBackground.style.top="0px";this._modalBackground.style.left="0px";this._modalBackground.style.width=e.width;this._modalBackground.style.height=e.height;this._modalBackground.style.zIndex=this.modalBackgroundZIndex;if(!this.autoOpen){this._modalBackground.style.display="none"}}},_addFocusHandlers:function(){var e=this;this.addHandler(this.host,this._getEvent("mousedown"),function(){if(!e.isModal){e.bringToFront()}})},_indexOf:function(f,g){for(var e=0;e=0){this.move(j-i,l)}}}else{if(this.resizable){this.resize(h-i,n)}}o=false;break;case 38:if(!e){if(this.draggable){if(l-i>=0){this.move(j,l-i)}}}else{if(this.resizable){this.resize(h,n-i)}}o=false;break;case 39:if(!e){if(this.draggable){if(j+h+i<=g.width){this.move(j+i,l)}}}else{if(this.resizable){this.resize(h+i,n)}}o=false;break;case 40:if(!e){if(this.draggable){if(l+n+i<=g.height){this.move(j,l+i)}}}else{if(this.resizable){this.resize(h,n+i)}}o=false;break}if(!o){if(f.preventDefault){f.preventDefault()}if(f.stopPropagation){f.stopPropagation()}}return o},_addCollapseHandlers:function(){var e=this;this.addHandler(this._collapseButton,this._getEvent("click"),function(){if(!e.collapsed){e.collapse()}else{e.expand()}})},_closeWindow:function(){this.closeWindow();return false},_addHeaderCursorHandlers:function(e){if(e.resizeArea&&e.resizable&&!e.collapsed){e._header[0].style.cursor=e._resizeWrapper.style.cursor;return}else{if(e.draggable){e._header[0].style.cursor="move";return}}e._header[0].style.cursor="default";if(e._resizeWrapper){e._resizeWrapper.style.cursor="default"}},_addDragDropHandlers:function(){if(this.draggable){var e=this;this.addHandler(this.host,"focus",function(){e._headerFocused=true});this.addHandler(this.host,"blur",function(){e._headerFocused=false});this.addHandler(this._header,"focus",function(){e._headerFocused=true;return false});this.addHandler(this._header,this._getEvent("mousedown"),function(j,i,k){if(i){j.pageX=i}if(k){j.pageY=k}e._headerMouseDownHandler(e,j);return true});this.addHandler(this._header,"dragstart",function(i){if(i.preventDefault){i.preventDefault()}return false});this.addHandler(this._header,this._getEvent("mousemove"),function(i){return e._headerMouseMoveHandler(e,i)});this.addHandler(a(document),this._getEvent("mousemove")+"."+this.host.attr("id"),function(i){return e._dragHandler(e,i)});this.addHandler(a(document),this._getEvent("mouseup")+"."+this.host.attr("id"),function(i){return e._dropHandler(e,i)});try{if(document.referrer!==""||window.frameElement){var h=null;if(window.top!=null&&window.top!=window.self){if(window.parent&&document.referrer){h=document.referrer}}if(h&&h.indexOf(document.location.host)!=-1){var g=function(i){e._dropHandler(e,i)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}catch(f){}}},_headerMouseDownHandler:function(f,g){if(!f.isModal){f.bringToFront()}if(f._resizeDirection==null){var e=a.jqx.position(g);f._mousePosition.x=e.left;f._mousePosition.y=e.top;f._mouseDown=true;f._isDragging=false}},_headerMouseMoveHandler:function(f,i){if(f._mouseDown&&!f._isDragging){var j=a.jqx.mobile.getTouches(i);var k=j[0];var h=k.pageX,g=k.pageY;var e=a.jqx.position(i);h=e.left;g=e.top;if((h+3f._mousePosition.x)||(g+3f._mousePosition.y)){f._isDragging=true;f._mousePosition={x:h,y:g};f._windowPosition={x:f.host.coord().left,y:f.host.coord().top};a(document.body).addClass(f.toThemeProperty("jqx-disableselect"))}if(f._isTouchDevice){i.preventDefault();return true}return false}if(f._isDragging){if(f._isTouchDevice){i.preventDefault();return true}return false}return true},_dropHandler:function(g,j){var f=true;if(g._isDragging&&!g.isResizing&&!g._resizeDirection){var e=parseInt(g.host.css("left"),10),k=parseInt(g.host.css("top"),10),i=(g._isTouchDevice)?0:j.pageX,h=(g._isTouchDevice)?0:j.pageY;g.enableResize=g._enableResizeBackup;g._enableResizeBackup="undefined";g._raiseEvent(3,e,k,i,h);f=false;if(j.preventDefault!="undefined"){j.preventDefault()}if(j.originalEvent!=null){j.originalEvent.mouseHandled=true}if(j.stopPropagation!="undefined"){j.stopPropagation()}}g._isDragging=false;g._mouseDown=false;a(document.body).removeClass(g.toThemeProperty("jqx-disableselect"));return f},_dragHandler:function(m,h){if(m._isDragging&&!m.isResizing&&!m._resizeDirection){var l=(m._isTouchDevice)?h.originalEvent.which:h.which;if(typeof m._enableResizeBackup==="undefined"){m._enableResizeBackup=m.enableResize}m.enableResize=false;if(l===0&&a.jqx.browser.msie&&a.jqx.browser.version<8){return m._dropHandler(m,h)}var k=a.jqx.position(h);var j=k.left,i=k.top,g=j-m._mousePosition.x,f=i-m._mousePosition.y,e=m._windowPosition.x+g,n=m._windowPosition.y+f;m.move(e,n,h);h.preventDefault();return false}return true},_validateCoordinates:function(e,k,i,j){var h=this._getDraggingArea();e=(e=h.width+h.left-2*j){e=h.width+h.left-f-j}if(k+g>=h.height+h.top-i){k=h.height+h.top-g-i}return{x:e,y:k}},_performLayout:function(){this._performHeaderLayout();this._performWidgetLayout()},_parseDragAreaAttributes:function(){if(this.dragArea!==null){this.dragArea.height=parseInt(this.dragArea.height,10);this.dragArea.width=parseInt(this.dragArea.width,10);this.dragArea.top=parseInt(this.dragArea.top,10);this.dragArea.left=parseInt(this.dragArea.left,10)}},_positionWindow:function(){this._parseDragAreaAttributes();if(this.position instanceof Array&&this.position.length===2&&typeof this.position[0]==="number"&&typeof this.position[1]==="number"){this.element.style.left=this._toPx(this.position[0]);this.element.style.top=this._toPx(this.position[1])}else{if(this.position instanceof Object){if(this.position.left){this.host.offset(this.position)}else{if(this.position.x!==undefined&&this.position.y!==undefined){this.element.style.left=this._toPx(this.position.x);this.element.style.top=this._toPx(this.position.y)}else{if(this.position.center){this._centerElement(this.host,this.position.center,"xy");var g=this.position.center.coord();var f=parseInt(this.host.css("left"),10);var e=parseInt(this.host.css("top"),10);this.element.style.left=this._toPx(f+g.left);this.element.style.top=this._toPx(e+g.top)}}}}else{this._positionFromLiteral()}}},_getDraggingArea:function(){var e={};e.left=((this.dragArea&&this.dragArea.left)?this.dragArea.left:0);e.top=((this.dragArea&&this.dragArea.top)?this.dragArea.top:0);e.width=((this.dragArea&&this.dragArea.width)?this.dragArea.width:this._getDocumentSize().width);e.height=((this.dragArea&&this.dragArea.height)?this.dragArea.height:this._getDocumentSize().height);return e},_positionFromLiteral:function(){if(!(this.position instanceof Array)){this.position=this.position.split(",")}var e=this.position.length,f=this._getDraggingArea();while(e){e-=1;this.position[e]=this.position[e].replace(/ /g,"");switch(this.position[e]){case"top":this.element.style.top=this._toPx(f.top);break;case"left":this.element.style.left=this._toPx(f.left);break;case"bottom":this.element.style.top=this._toPx(f.height-this.host.height()+f.top);break;case"right":this.element.style.left=this._toPx(f.left+f.width-this.host.width());break;default:if(!this.dragArea){f=a(window)}this._centerElement(this.host,f,"xy");break}}},_raiseEvent:function(g){var f=this._events[g],h=a.Event(f),e={};if(g===2||g===3){e.x=arguments[1];e.y=arguments[2];e.pageX=arguments[3];e.pageY=arguments[4]}if(f==="closed"||f==="close"){e.dialogResult=this.dialogResult}h.args=e;return this.host.trigger(h)},destroy:function(){this.removeHandler(a(window),"resize.window"+this.element.id);this._removeEventHandlers();this._destroy()},_destroy:function(){if(this.isModal){if(this._modalBackground!==null){a(this._modalBackground).remove()}this.host.jqxWindow({isModal:false})}if(this.restricter){this.removeHandler(a(window),"resize."+this.element.id);this.removeHandler(a(window),"orientationchanged."+this.element.id);this.removeHandler(a(window),"orientationchange."+this.element.id)}this.host.remove();if(this._modalBackground!==null){a(this._modalBackground).remove()}},_toClose:function(f,e){return((f&&e[0]===this.element)||(e[0]!==this.element&&typeof e[0]==="object"))},propertyChangedHandler:function(e,g,m,k){this._validateProperties();switch(g){case"rtl":this._performLayout();break;case"dragArea":this._positionWindow();break;case"collapseButtonSize":this._performLayout();break;case"closeButtonSize":this._performLayout();break;case"isModal":this._refresh();this._fixWindowZIndex();if(k===false){var h=a.data(document.body,"jqxwindows-modallist");var l=[];for(var f=0;fg;e-=1){var h=parseInt(f[e].css("z-index"),10)-1;f[e][0].style.zIndex=h}this.element.style.zIndex=j;this._sortByStyle("z-index",f)},hide:function(i,h,e){var g=this;if(this.closing){var f=this.closing();if(f===false){return}}h=h||this.closeAnimationDuration;switch(this.animationType){case"none":this.element.style.display="none";break;case"fade":g._animationInProgress=true;this.host.fadeOut({duration:h,callback:function(){g._animationInProgress=false;if(i instanceof Function){i()}}});break;case"slide":g._animationInProgress=true;this.host.slideUp({duration:h,callback:function(){g._animationInProgress=false;if(i instanceof Function){i()}}});break;case"combined":g._animationInProgress=true;this.host.animate({opacity:0,width:"0px",height:"0px"},{duration:h,complete:function(){g._animationInProgress=false;g.element.style.display="none";if(i instanceof Function){i()}}});break}this._visible=false;if(this.isModal){a(this._modalBackground).hide();this._fixWindowZIndex("modal-hide")}if(e!==true){this._raiseEvent(1);this._raiseEvent(8)}},open:function(f,e){this.show(f,e)},close:function(g,f,e){this.hide(g,f,e)},show:function(k,j){var i=this;this._setDialogResult("none");j=j||this.showAnimationDuration;switch(this.animationType){case"none":this.element.style.display="block";break;case"fade":i._animationInProgress=true;this.host.fadeIn({duration:j,complete:function(){i._animationInProgress=false;if(k instanceof Function){k()}}});break;case"slide":i._animationInProgress=true;this.host.slideDown({duration:j,callback:function(){i._animationInProgress=false;if(k instanceof Function){k()}}});break;case"combined":this.element.style.display="block";var g=i.host.width();var e=i.host.height();this.element.style.minWidth="0px";this.element.style.minHeight="0px";this.element.style.opacity=0;this.element.style.width="0px";this.element.style.height="0px";i._animationInProgress=true;this.host.animate({opacity:1,width:g+"px",height:e+"px"},{duration:j,complete:function(){i._animationInProgress=false;i._performLayout();if(k instanceof Function){k()}}});break}if(this.isModal){a(this._modalBackground).show();this._fixWindowZIndex("modal-show")}var h=this;if(!this._visible){if(j>150&&this.animationType!="none"){setTimeout(function(){if(!h._contentInitialized){if(h.initContent){h.initContent();h._contentInitialized=true}}h._raiseEvent(7);h._raiseEvent(9)},j-150)}else{if(!h._contentInitialized){if(h.initContent){h.initContent();h._contentInitialized=true}}this._raiseEvent(7);h._raiseEvent(9)}}this._visible=true;if(i.animationType!=="combined"){this._performLayout()}if(this.autoFocus){var f=function(){if(!h._isTouchDevice){h._content[0].focus()}};f();setTimeout(function(){f()},100)}},_getTabbables:function(){var f;if(a.jqx.browser.msie&&a.jqx.browser.version<9){f=this._content.find("*")}else{f=this._content[0].querySelectorAll("*")}var e=[];a.each(f,function(){if(d(this)){e[e.length]=this}});return e},move:function(n,m,e,h){var g=0,f=0,k,j,i;n=parseInt(n,10);m=parseInt(m,10);if(a.jqx.browser.msie){if(a(window).width()>a(document).width()&&!this.dragArea){f=this._SCROLL_WIDTH}if(a(window).height()document.documentElement.scrollWidth&&!this.dragArea){g=this._SCROLL_WIDTH}}k=this._validateCoordinates(n,m,f,g);if(parseInt(this.host.css("left"),10)!==k.x||parseInt(this.host.css("top"),10)!==k.y){if(e){var l=a.jqx.position(e);j=l.left;i=l.top}if(j===undefined){j=n}if(i===undefined){i=m}if(h!==false){this._raiseEvent(2,k.x,k.y,j,i)}}this.element.style.left=k.x+"px";this.element.style.top=k.y+"px";this._moved=true},_toPx:function(e){if(typeof e==="number"){return e+"px"}else{return e}}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(f){var e=a(f);return e.css("display")!=="none"&&e.css("visibility")!=="hidden"}function d(g){var e=g.getAttribute("tabindex"),f=e===null;return(f||e>=0)&&c(g,!f)}}(jqxBaseFramework));(function(b){var a=(function(c){return{resizeConfig:function(){this.resizeTarget=null;this.resizeIndicatorSize=5;this.resizeTargetChildren=null;this.isResizing=false;this.resizeArea=false;this.minWidth=1;this.maxWidth=100;this.minHeight=1;this.maxHeight=100;this.resizeParent=null;this.enableResize=true;this._resizeEvents=["resizing","resized","resize"];this._resizeMouseDown=false;this._resizeCurrentMode=null;this._mouseResizePosition={};this._resizeMethods=null;this._SCROLL_WIDTH=21},_resizeExceptions:{invalidTarget:"Invalid target!",invalidMinHeight:"Invalid minimal height!",invalidMaxHeight:"Invalid maximum height!",invalidMinWidth:"Invalid minimum width!",invalidMaxWidth:"Invalid maximum width!",invalidIndicatorSize:"Invalid indicator size!",invalidSize:"Invalid size!"},removeResize:function(){if(this.resizeTarget){var f=c(this.resizeTarget.children(".jqx-resize"));f.detach();var e=f.children();this._removeResizeEventListeners();for(var d=0;dthis.minWidth)?3*this.resizeIndicatorSize:this.minWidth);this.resizeTarget.maxHeight=this.maxHeight;this.resizeTarget.minHeight=((3*this.resizeIndicatorSize>this.minHeight)?3*this.resizeIndicatorSize:this.minHeight)},_parseResizeParentProperties:function(){if(this.resizeParent){this.resizeParent.left=parseInt(this.resizeParent.left,10);this.resizeParent.top=parseInt(this.resizeParent.top,10);this.resizeParent.width=parseInt(this.resizeParent.width,10);this.resizeParent.height=parseInt(this.resizeParent.height,10)}},_getChildren:function(h,e,g,i,d){this.resizeTargetChildren=c(d);this.resizeTargetChildren=this.resizeTargetChildren.toArray();var f=this.resizeTargetChildren.length;while(f){f-=1;this.resizeTargetChildren[f]=c(this.resizeTargetChildren[f])}},_refreshResize:function(){this._renderResize();this._performResizeLayout();this._removeResizeEventListeners();this._addResizeEventHandlers()},_renderResize:function(){var d=this;if(d._resizeWrapper!==undefined&&c(d._resizeWrapper).parents().length>0){return}var e=document.createElement("div");e.className="jqx-resize jqx-rc-all";e.style.zIndex=8000;e.appendChild(d._header[0]);e.appendChild(d._content[0]);d.resizeTarget[0].appendChild(e);d._resizeWrapper=e},_performResizeLayout:function(){this._resizeWrapper.style.height=this.resizeTarget.height()+"px";this._resizeWrapper.style.width=this.resizeTarget.width()+"px"},_removeResizeEventListeners:function(){var d=this.resizeTarget.attr("id");this.removeHandler(this._resizeWrapper,"mousemove.resize"+d);this.removeHandler(this._resizeWrapper,"mousedown.resize"+d);this.removeHandler(c(document),"mousemove.resize"+d);this.removeHandler(c(document),"mouseup.resize"+d)},_addResizeEventHandlers:function(){var g=this.resizeTarget.attr("id");var d=this;if(d._isTouchDevice){this.addHandler(this._resizeWrapper,"touchmove.resize."+g,function(h){d._resizeCursorChangeHandler(d,h)});this.addHandler(this._resizeWrapper,"touchstart.resize."+g,function(h){d._resizeCursorChangeHandler(d,h);d._resizeMouseDownHandler(d,h)});this.addHandler(c(document),"touchmove.resize."+g,function(h){return d._resizeHandler(d,h)});this.addHandler(c(document),"touchend.resize."+g,function(h){d._stopResizing(d,h)})}else{this.addHandler(this._resizeWrapper,"mousemove.resize."+g,function(h){d._resizeCursorChangeHandler(d,h)});this.addHandler(this._resizeWrapper,"mousedown.resize."+g,function(h){d._resizeMouseDownHandler(d,h)});this.addHandler(c(document),"mousemove.resize."+g,function(h){return d._resizeHandler(d,h)});this.addHandler(c(document),"mouseup.resize."+g,function(h){d._stopResizing(d,h)})}try{if(document.referrer!==""||window.frameElement){var f=function(h){d._stopResizing(d,h)};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",f,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",f)}}}}catch(e){}},_stopResizing:function(d){if(d.enableResize){if(d.isResizing){d._raiseResizeEvent(1)}d._resizeMouseDown=false;d.isResizing=false;d._resizeDirection=null;if(d.resizeTarget){d.resizeTarget.removeClass("jqx-disableselect")}}if(d._cursorBackup=="undefined"){d._cursorBackup="default"}if(d._resizeWrapper){d._resizeWrapper.style.cursor=d._cursorBackup}},_resizeHandler:function(e,f){if(e.enableResize&&!e.collapsed){if(e.isResizing&&e._resizeDirection){if(f.which===0&&c.jqx.browser.msie&&c.jqx.browser.version<9){e._stopResizing(f)}if(e._isTouchDevice){var d=c.jqx.position(f);e._performResize(d.left,d.top);return false}e._performResize(f.pageX,f.pageY);return false}else{if(e._isTouchDevice){var d=c.jqx.position(f);return e._resizeCaptureCursor(d.left,d.top)}return e._resizeCaptureCursor(f.pageX,f.pageY)}}},_resizeCaptureCursor:function(e,d){if(this._resizeMouseDown&&!this.isResizing&&this._resizeDirection){var f=3;if(this._isTouchDevice){this._changeCursor(e-parseInt(this.resizeTarget.css("left"),10),d-parseInt(this.resizeTarget.css("top"),10));this._mouseResizePosition={x:e,y:d};this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this.resizeTarget.addClass("jqx-disableselect");return false}if((e+fthis._mouseResizePosition.x)||(d+fthis._mouseResizePosition.y)){this._changeCursor(e-parseInt(this.resizeTarget.css("left"),10),d-parseInt(this.resizeTarget.css("top"),10));this._mouseResizePosition={x:e,y:d};this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this.resizeTarget.addClass("jqx-disableselect");return false}}},_resizeBackupData:function(){this.resizeTarget.lastWidth=this.resizeTarget.width();this.resizeTarget.lastHeight=this.resizeTarget.height();this.resizeTarget.x=parseInt(this.resizeTarget.css("left"),10);this.resizeTarget.y=parseInt(this.resizeTarget.css("top"),10);this._resizeBackupChildrenSize()},_resizeBackupChildrenSize:function(){var d=this.resizeTargetChildren.length,e;while(d){d-=1;e=this.resizeTargetChildren[d];this.resizeTargetChildren[d].lastWidth=e.width();this.resizeTargetChildren[d].lastHeight=e.height()}},_performResize:function(g,f){var e=g-this._mouseResizePosition.x,d=f-this._mouseResizePosition.y;if(this._resizeDirection){this._resize(this.resizeTarget,e,d)}},_resizeCursorChangeHandler:function(e,f){if(e.enableResize&&!e.collapsed){if(!e.isResizing){if(e._isTouchDevice){var d=c.jqx.position(f);e._changeCursor(d.left-parseInt(e.resizeTarget.css("left"),10),d.top-parseInt(e.resizeTarget.css("top"),10));return}e._changeCursor(f.pageX-parseInt(e.resizeTarget.css("left"),10),f.pageY-parseInt(e.resizeTarget.css("top"),10))}}},_resizeMouseDownHandler:function(e,f){if(e.enableResize){if(e._resizeDirection!==null){e._resizeMouseDown=true;if(e._isTouchDevice){var d=c.jqx.position(f);e._mouseResizePosition.x=d.left;e._mouseResizePosition.y=d.top}else{e._mouseResizePosition.x=f.pageX;e._mouseResizePosition.y=f.pageY}f.preventDefault()}}},_validateResizeProperties:function(){try{if(!this.resizeTarget||this.resizeTarget.length!==1){throw new Error(this._resizeExceptions.invalidTarget)}if(this.minHeight<0||isNaN(parseInt(this.minHeight,10))){throw new Error(this._resizeExceptions.invalidMinHeight)}if(this.maxHeight<=0||isNaN(parseInt(this.maxHeight,10))){throw new Error(this._resizeExceptions.invalidMaxHeight)}if(this.minWidth<0||isNaN(parseInt(this.minWidth,10))){throw new Error(this._resizeExceptions.invalidMinWidth)}if(this.maxWidth<0||isNaN(parseInt(this.maxWidth,10))){throw new Error(this._resizeExceptions.invalidMaxWidth)}if(this.resizeIndicatorSize<0||isNaN(parseInt(this.resizeIndicatorSize,10))){throw new Error(this._resizeExceptions.invalidIndicatorSize)}if(this.minHeight>this.maxHeight||this.minWidth>this.maxWidth){throw new Error(this._resizeExceptions.invalidSize)}}catch(d){throw new Error(d)}},_changeCursor:function(d,e){if(this.isResizing||this._resizeMouseDown){return}this.resizeArea=true;if(d<=this.resizeIndicatorSize&&d>=0&&e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.style.cursor="nw-resize";this._resizeDirection="topleft"}else{if(e<=this.resizeIndicatorSize&&e>0&&d>=this.resizeTarget.width()-this.resizeIndicatorSize){this._resizeWrapper.style.cursor="ne-resize";this._resizeDirection="topright"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e=0){this._resizeWrapper.style.cursor="sw-resize";this._resizeDirection="bottomleft"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e=this.resizeTarget.width()-this.resizeIndicatorSize&&d=0){this._resizeWrapper.style.cursor="e-resize";this._resizeDirection="left"}else{if(e<=this.resizeIndicatorSize&&e>0){this._resizeWrapper.style.cursor="n-resize";this._resizeDirection="top"}else{if(e>=this.resizeTarget.height()-this.resizeIndicatorSize&&e=this.resizeTarget.width()-this.resizeIndicatorSize&&d=0){this._resizeMethods.push(this._resizeLeft)}if(d.indexOf("top")>=0){this._resizeMethods.push(this._resizeTop)}if(d.indexOf("right")>=0){this._resizeMethods.push(this._resizeRight)}if(d.indexOf("bottom")>=0){this._resizeMethods.push(this._resizeBottom)}},_validateResize:function(g,d,h,f,e){if(h==="horizontal"||h==="both"){return this._validateWidth(g,f,e)}else{if(h==="vertical"||h==="both"){return this._validateHeight(d,f,e)}}return{result:false,fix:0}},_getParent:function(){if(this.resizeParent!==null&&this.resizeParent!=="undefined"&&this.resizeParent.height&&this.resizeParent.width&&this.resizeParent.top&&this.resizeParent.left){return this.resizeParent}return{left:0,top:0,width:c(document).width(),height:c(document).height()}},_validateHeight:function(e,h,g){var i=0,d=2,f=this._getParent();if(c(window).width()>c(document).width()&&c.jqx.browser.msie&&f.height===c(document).height()){i=this._SCROLL_WIDTH}if(g==="bottom"&&(e+h.position().top+i+d>f.height+f.top)){return{fix:f.height-h.position().top-i-d+f.top,result:false}}if(g==="top"&&h.lastHeight-e+h.yh.maxHeight){return{fix:h.maxHeight,result:false}}return{result:true,fix:e}},_validateWidth:function(h,g,f){var i=0,d=2,e=this._getParent();if(c(window).height()=document.documentElement.scrollWidth&&e.width===c(document).width()){i=this._SCROLL_WIDTH}if(f==="right"&&(h+g.position().left+i+d>e.width+e.left)){return{fix:e.width-g.position().left-i-d+e.left,result:false}}if(f==="left"&&(g.lastWidth-h+g.xg.maxWidth){return{fix:g.maxWidth,result:false}}return{result:true,fix:h}},_resize:function(h,e,d){var j=this._resizeMethods.length;for(var g=0;g0&&e>0){this._resizeDirection="right";this._prepareResizeMethods(this._resizeDirection);this._resizeBackupData();this.isResizing=true;this._resize(this.resizeTarget,f,e);this.isResizing=false}}},_setResizeChildrenSize:function(e,f){var h=this.resizeTargetChildren.length;while(h){h--;if(f==="width"){var g=this.resizeTargetChildren[h].lastWidth-(this.resizeTarget.lastWidth-e);if(g0){this.resizeTargetChildren[h].width(g)}}else{var d=this.resizeTargetChildren[h].lastHeight-(this.resizeTarget.lastHeight-e);if(d0){this.resizeTargetChildren[h].height(d)}}}},_resizeRight:function(g){var h=g.element.lastWidth+g.x,d=g.self._validateResize(h,0,"horizontal",g.element,"right");if(!d.result){h=d.fix}if(g.element.width()!==h){g.self._setResizeChildrenSize(h,"width");g.element.width(h);if(g.self.width.toString().indexOf("%")>=0){var f=c(document.body).width()/100;var e=1/f;g.element[0].style.width=(e*h)+"%";g.self._setChildrenLayout()}g.self._raiseResizeEvent(0)}return h},_resizeLeft:function(h){var i=h.element.lastWidth-h.x,e=h.self._validateResize(i,0,"horizontal",h.element,"left"),d=h.element.x+h.x;if(!e.result){d=h.element.x+(h.element.lastWidth-e.fix);i=e.fix;return}if(h.element.width()!==i){h.self._setResizeChildrenSize(i,"width");h.element.width(i);if(h.self.width.toString().indexOf("%")>=0){var g=c(document.body).width()/100;var f=1/g;h.element[0].style.width=(f*i)+"%";h.self._setChildrenLayout()}h.element[0].style.left=h.self._toPx(d);h.self._raiseResizeEvent(0)}return i},_resizeBottom:function(h){var e=h.element.lastHeight+h.y,d=h.self._validateResize(0,e,"vertical",h.element,"bottom");if(!d.result){e=d.fix}if(h.element.height()!==e){h.self._setResizeChildrenSize(e,"height");h.element.height(e);if(h.self.height.toString().indexOf("%")>=0){var g=c(document.body).height()/100;var f=1/g;h.element[0].style.height=(f*e)+"%";h.self._setChildrenLayout()}h.self._raiseResizeEvent(0)}return e},_resizeTop:function(h){var e=h.element.lastHeight-h.y,d=h.self._validateResize(0,e,"vertical",h.element,"top"),i=h.element.y+h.y;if(!d.result){i=h.element.y+(h.element.lastHeight-d.fix);e=d.fix;return}if(h.element.height()!==e){h.self._setResizeChildrenSize(e,"height");h.element.height(e);if(h.self.height.toString().indexOf("%")>=0){var g=c(document.body).height()/100;var f=1/g;h.element[0].style.height=(f*e)+"%";h.self._setChildrenLayout()}h.element[0].style.top=h.self._toPx(i);h.self._raiseResizeEvent(0)}return e},_raiseResizeEvent:function(f){var e=this._resizeEvents[f],g=c.Event(e),d={};d.width=parseInt(this.resizeTarget[0].style.width,10);d.height=parseInt(this.resizeTarget[0].style.height,10);g.args=d;if(f===0){e=this._resizeEvents[2];var h=c.Event(e);h.args=d;this.resizeTarget.trigger(h)}return this.resizeTarget.trigger(g)}}}(jqxBaseFramework));b.extend(b.jqx._jqxWindow.prototype,a)}(jqxBaseFramework)); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-area-dark.png Binary file www/jqwidgets/styles/images/create-area-dark.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-area.png Binary file www/jqwidgets/styles/images/create-area.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-bar-dark.png Binary file www/jqwidgets/styles/images/create-bar-dark.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-bar.png Binary file www/jqwidgets/styles/images/create-bar.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-column-dark.png Binary file www/jqwidgets/styles/images/create-column-dark.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-column.png Binary file www/jqwidgets/styles/images/create-column.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-line-dark.png Binary file www/jqwidgets/styles/images/create-line-dark.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-line.png Binary file www/jqwidgets/styles/images/create-line.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-pie-dark.png Binary file www/jqwidgets/styles/images/create-pie-dark.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-pie.png Binary file www/jqwidgets/styles/images/create-pie.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-scatter-dark.png Binary file www/jqwidgets/styles/images/create-scatter-dark.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/images/create-scatter.png Binary file www/jqwidgets/styles/images/create-scatter.png has changed diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/jqx.base.css --- a/www/jqwidgets/styles/jqx.base.css Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/styles/jqx.base.css Fri May 01 16:37:31 2020 +0200 @@ -7624,6 +7624,10 @@ padding: 2%; background-color: var(--jqx-time-picker-background); } +.jqx-time-picker[view="portrait"] .jqx-header.jqx-widget-header.jqx-unselectable { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} .jqx-time-picker[view="landscape"] .jqx-main-container { width: 67%; height: 100%; diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/jqx.black.css --- a/www/jqwidgets/styles/jqx.black.css Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/styles/jqx.black.css Fri May 01 16:37:31 2020 +0200 @@ -1,33 +1,28 @@ -.jqx-rc-tl-black -{ +.jqx-rc-tl-black { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; } /*top-right rounded Corners*/ -.jqx-rc-tr-black -{ +.jqx-rc-tr-black { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } /*bottom-left rounded Corners*/ -.jqx-rc-bl-black -{ +.jqx-rc-bl-black { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } /*bottom-right rounded Corners*/ -.jqx-rc-br-black -{ +.jqx-rc-br-black { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } /*top rounded Corners*/ -.jqx-rc-t-black -{ +.jqx-rc-t-black { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; @@ -36,8 +31,7 @@ border-top-right-radius: 5px; } /*bottom rounded Corners*/ -.jqx-rc-b-black -{ +.jqx-rc-b-black { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; @@ -46,8 +40,7 @@ border-bottom-right-radius: 5px; } /*right rounded Corners*/ -.jqx-rc-r-black -{ +.jqx-rc-r-black { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; @@ -56,8 +49,7 @@ border-bottom-right-radius: 5px; } /*left rounded Corners*/ -.jqx-rc-l-black -{ +.jqx-rc-l-black { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; @@ -66,194 +58,408 @@ border-bottom-left-radius: 5px; } /*all rounded Corners*/ -.jqx-rc-all-black -{ +.jqx-rc-all-black { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } + .jqx-widget-black { color: inherit; } - .jqx-grid-selectionarea-black{background-color:#262626; border:1px solid #262626; opacity:0.5} -.jqx-grid-group-cell-black{border-color:#262626; background-color:#fff} -.jqx-grid-cell-sort-black, .jqx-grid-cell-filter-black, .jqx-grid-cell-pinned-black{ background-color:#eaf8ff} -.jqx-grid-cell-alt-black, .jqx-grid-cell-sort-alt-black, .jqx-grid-cell-filter-alt-black{ background-color:#deedf5} -.jqx-widget-black .jqx-grid-cell-black{background: #000; border-color:#555} -.jqx-widget-black .jqx-grid-group-cell-black{background-color: #000; border-color: #555;} -.jqx-widget-black .jqx-grid-cell-selected-black{color:#fff !important} -.jqx-widget-black .jqx-grid-cell-hover-black{color:#fff !important} -.jqx-widget-black{font-family:Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; border-color:#222;} -.jqx-widget-content-black{font-family:Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; color:#fff; border-color:#262626; background: #111;} -.jqx-fill-state-normal-black, .jqx-widget-header-black, .jqx-input-button-content-black{font-family:Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; color:#fff; border-color:#000; background: #a4a4a4; -background: -moz-linear-gradient(top, #a4a4a4 0%, #757575 4%, #4f4f4f 37%, #464646 48%, #000000 52%, #000000 56%, #0c0c0c 67%, #1e1e1e 78%, #414141 96%, #666666 100%); -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a4a4a4), color-stop(4%,#757575), color-stop(37%,#4f4f4f), color-stop(48%,#464646), color-stop(52%,#000000), color-stop(56%,#000000), color-stop(67%,#0c0c0c), color-stop(78%,#1e1e1e), color-stop(96%,#414141), color-stop(100%,#666666)); -background: -webkit-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); -background: -o-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); -background: -ms-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); -background: linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%);} -.jqx-fill-state-hover-black, .jqx-input-button-header-black, .jqx-widget-black .jqx-grid-cell-hover-black{background: #f87948; -background: -moz-linear-gradient(top, #f87948 0%, #fb4e0b 4%, #f44501 11%, #e24000 19%, #983600 44%, #983600 48%, #5c2900 52%, #692b00 67%, #c23700 96%, #bd3800 100%); -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f87948), color-stop(4%,#fb4e0b), color-stop(11%,#f44501), color-stop(19%,#e24000), color-stop(44%,#983600), color-stop(48%,#983600), color-stop(52%,#5c2900), color-stop(67%,#692b00), color-stop(96%,#c23700), color-stop(100%,#bd3800)); -background: -webkit-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); -background: -o-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); -background: -ms-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); -background: linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); - border-color:#262626; color:#fff} -.jqx-fill-state-pressed-black, .jqx-menu-item-top-hover-black, .jqx-widget-black .jqx-grid-cell-selected-black{background: #db4200; -background: -moz-linear-gradient(top, #db4200 0%, #902e00 4%, #7d2a01 19%, #531c03 44%, #531c03 48%, #0f0906 52%, #221105 63%, #2b1705 67%, #592903 89%, #642e02 96%, #902e00 100%); -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db4200), color-stop(4%,#902e00), color-stop(19%,#7d2a01), color-stop(44%,#531c03), color-stop(48%,#531c03), color-stop(52%,#0f0906), color-stop(63%,#221105), color-stop(67%,#2b1705), color-stop(89%,#592903), color-stop(96%,#642e02), color-stop(100%,#902e00)); -background: -webkit-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); -background: -o-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); -background: -ms-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); -background: linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); -border-color:#262626; color:#fff} -.jqx-fill-state-disabled-black {cursor: default; opacity: .55; filter:Alpha(Opacity=45);} + +.jqx-grid-selectionarea-black { + background-color: #262626; + border: 1px solid #262626; + opacity: 0.5; +} + +.jqx-grid-group-cell-black { + border-color: #262626; + background-color: #fff; +} + +.jqx-grid-cell-sort-black, .jqx-grid-cell-filter-black, .jqx-grid-cell-pinned-black { + background-color: #eaf8ff; +} + +.jqx-grid-cell-alt-black, .jqx-grid-cell-sort-alt-black, .jqx-grid-cell-filter-alt-black { + background-color: #deedf5; +} + +.jqx-widget-black .jqx-grid-cell-black { + background: #000; + border-color: #555; +} + +.jqx-widget-black .jqx-grid-group-cell-black { + background-color: #000; + border-color: #555; +} + +.jqx-widget-black .jqx-grid-cell-selected-black { + color: #fff !important; +} + +.jqx-widget-black .jqx-grid-cell-hover-black { + color: #fff !important; +} + +.jqx-widget-black { + font-family: Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; + border-color: #222; +} + +.jqx-widget-content-black { + font-family: Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; + color: #fff; + border-color: #262626; + background: #111; +} -.jqx-checkbox-check-checked-black{background:transparent url(images/check_white.png) left top no-repeat} -.jqx-checkbox-check-indeterminate-black{background:transparent url(images/check_indeterminate_white.png) left top no-repeat} -.jqx-grid-black, .jqx-grid-header-black, .jqx-grid-cell-black{border-color:#262626} -.jqx-widget-black .jqx-grid-column-menubutton-black, .jqx-widget-black .jqx-grid-column-sortascbutton-black, .jqx-widget-black .jqx-grid-column-sortdescbutton-black, .jqx-widget-black .jqx-grid-column-filterbutton-black{border-color:#262626} -.jqx-widget-black .jqx-grid-column-header-black{border-color:#262626} +.jqx-fill-state-normal-black, .jqx-widget-header-black, .jqx-input-button-content-black { + font-family: Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; + color: #fff; + border-color: #000; + background: #a4a4a4; + background: -moz-linear-gradient(top, #a4a4a4 0%, #757575 4%, #4f4f4f 37%, #464646 48%, #000000 52%, #000000 56%, #0c0c0c 67%, #1e1e1e 78%, #414141 96%, #666666 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a4a4a4), color-stop(4%,#757575), color-stop(37%,#4f4f4f), color-stop(48%,#464646), color-stop(52%,#000000), color-stop(56%,#000000), color-stop(67%,#0c0c0c), color-stop(78%,#1e1e1e), color-stop(96%,#414141), color-stop(100%,#666666)); + background: -webkit-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); + background: -o-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); + background: -ms-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); + background: linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); +} + +.jqx-fill-state-hover-black, .jqx-input-button-header-black, .jqx-widget-black .jqx-grid-cell-hover-black { + background: #f87948; + background: -moz-linear-gradient(top, #f87948 0%, #fb4e0b 4%, #f44501 11%, #e24000 19%, #983600 44%, #983600 48%, #5c2900 52%, #692b00 67%, #c23700 96%, #bd3800 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f87948), color-stop(4%,#fb4e0b), color-stop(11%,#f44501), color-stop(19%,#e24000), color-stop(44%,#983600), color-stop(48%,#983600), color-stop(52%,#5c2900), color-stop(67%,#692b00), color-stop(96%,#c23700), color-stop(100%,#bd3800)); + background: -webkit-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + background: -o-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + background: -ms-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + background: linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + border-color: #262626; + color: #fff; +} + +.jqx-fill-state-pressed-black, .jqx-menu-item-top-hover-black, .jqx-widget-black .jqx-grid-cell-selected-black { + background: #db4200; + background: -moz-linear-gradient(top, #db4200 0%, #902e00 4%, #7d2a01 19%, #531c03 44%, #531c03 48%, #0f0906 52%, #221105 63%, #2b1705 67%, #592903 89%, #642e02 96%, #902e00 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db4200), color-stop(4%,#902e00), color-stop(19%,#7d2a01), color-stop(44%,#531c03), color-stop(48%,#531c03), color-stop(52%,#0f0906), color-stop(63%,#221105), color-stop(67%,#2b1705), color-stop(89%,#592903), color-stop(96%,#642e02), color-stop(100%,#902e00)); + background: -webkit-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); + background: -o-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); + background: -ms-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); + background: linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); + border-color: #262626; + color: #fff; +} + +.jqx-fill-state-disabled-black { + cursor: default; + opacity: .55; + filter: Alpha(Opacity=45); +} + +.jqx-checkbox-check-checked-black { + background: transparent url(images/check_white.png) left top no-repeat; +} + +.jqx-checkbox-check-indeterminate-black { + background: transparent url(images/check_indeterminate_white.png) left top no-repeat; +} + +.jqx-grid-black, .jqx-grid-header-black, .jqx-grid-cell-black { + border-color: #262626; +} + +.jqx-widget-black .jqx-grid-column-menubutton-black, .jqx-widget-black .jqx-grid-column-sortascbutton-black, .jqx-widget-black .jqx-grid-column-sortdescbutton-black, .jqx-widget-black .jqx-grid-column-filterbutton-black { + border-color: #262626; +} + +.jqx-widget-black .jqx-grid-column-header-black { + border-color: #262626; +} + .jqx-calendar-cell-today-black { color: #35353A; } -.jqx-grid-bottomright-black, .jqx-panel-bottomright-black, .jqx-listbox-bottomright-black{background-color:#262626} -.jqx-widget-black .jqx-grid-column-menubutton-black, .jqx-menu-vertical-black{background-color:#262626; border-color:#262626} -.jqx-menu-vertical-black{background: #222; color:#fff;} -.jqx-scrollbar-state-normal-black{background:#111; border:1px solid #111} -.jqx-scrollbar-button-state-normal-black{border:1px solid #111; background:#111} -.jqx-scrollbar-button-state-hover-black{background: #f87948; -background: -moz-linear-gradient(top, #f87948 0%, #fb4e0b 4%, #f44501 11%, #e24000 19%, #983600 44%, #983600 48%, #5c2900 52%, #692b00 67%, #c23700 96%, #bd3800 100%); -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f87948), color-stop(4%,#fb4e0b), color-stop(11%,#f44501), color-stop(19%,#e24000), color-stop(44%,#983600), color-stop(48%,#983600), color-stop(52%,#5c2900), color-stop(67%,#692b00), color-stop(96%,#c23700), color-stop(100%,#bd3800)); -background: -webkit-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); -background: -o-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); -background: -ms-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); -background: linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); border:1px solid #000} -.jqx-scrollbar-button-state-pressed-black{background:#555 url(images/darkred_gradient.png) left top scroll repeat-x; border:1px solid #000} -.jqx-scrollbar-thumb-state-normal-horizontal-black{ background:#555; background-image:-webkit-gradient(linear,0 0,0 100%,from(#717171),to(#494949)); background-image:-moz-linear-gradient(top,#717171,#494949); background-image:-o-linear-gradient(top,#717171,#494949); border:1px solid #000} -.jqx-scrollbar-thumb-state-hover-horizontal-black{ background:#983600; background-image:-webkit-gradient(linear,0 0,0 100%,from(#fb4e0b),to(#983600)); background-image:-moz-linear-gradient(top,#fb4e0b,#983600); background-image:-o-linear-gradient(top,#fb4e0b,#983600); border:1px solid #000} -.jqx-scrollbar-thumb-state-pressed-horizontal-black{ background:#902e00; background-image:-webkit-gradient(linear,0 0,0 100%,from(#902e00),to(#531c03)); background-image:-moz-linear-gradient(top,#902e00,#531c03); background-image:-o-linear-gradient(top,#902e00,#531c03); border:1px solid #000} -.jqx-scrollbar-thumb-state-normal-black{ background:#555; background-image:-webkit-gradient(linear,left top,right top,from(#717171),to(#494949)); background-image:-moz-linear-gradient(left,#717171,#494949); background-image:-o-linear-gradient(left,#717171,#494949); border:1px solid #000;} -.jqx-scrollbar-thumb-state-hover-black{ background:#983600; background-image:-webkit-gradient(linear,left top,right top,from(#fb4e0b),to(#983600)); background-image:-moz-linear-gradient(left,#fb4e0b,#983600); background-image:-o-linear-gradient(left,#fb4e0b,#983600); border:1px solid #000} -.jqx-scrollbar-thumb-state-pressed-black{ background:#902e00; background-image:-webkit-gradient(linear,left top,right top,from(#902e00),to(#531c03)); background-image:-moz-linear-gradient(left,#902e00,#531c03); background-image:-o-linear-gradient(left,#902e00,#531c03); border:1px solid #000} + +.jqx-grid-bottomright-black, .jqx-panel-bottomright-black, .jqx-listbox-bottomright-black { + background-color: #262626; +} + +.jqx-widget-black .jqx-grid-column-menubutton-black, .jqx-menu-vertical-black { + background-color: #262626; + border-color: #262626; +} + +.jqx-menu-vertical-black { + background: #222; + color: #fff; +} + +.jqx-scrollbar-state-normal-black { + background: #111; + border: 1px solid #111; +} + +.jqx-scrollbar-button-state-normal-black { + border: 1px solid #111; + background: #111; +} + +.jqx-scrollbar-button-state-hover-black { + background: #f87948; + background: -moz-linear-gradient(top, #f87948 0%, #fb4e0b 4%, #f44501 11%, #e24000 19%, #983600 44%, #983600 48%, #5c2900 52%, #692b00 67%, #c23700 96%, #bd3800 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f87948), color-stop(4%,#fb4e0b), color-stop(11%,#f44501), color-stop(19%,#e24000), color-stop(44%,#983600), color-stop(48%,#983600), color-stop(52%,#5c2900), color-stop(67%,#692b00), color-stop(96%,#c23700), color-stop(100%,#bd3800)); + background: -webkit-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + background: -o-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + background: -ms-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + background: linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); + border: 1px solid #000; +} + +.jqx-scrollbar-button-state-pressed-black { + background: #555 url(images/darkred_gradient.png) left top scroll repeat-x; + border: 1px solid #000; +} + +.jqx-scrollbar-thumb-state-normal-horizontal-black { + background: #555; + background-image: -webkit-gradient(linear,0 0,0 100%,from(#717171),to(#494949)); + background-image: -moz-linear-gradient(top,#717171,#494949); + background-image: -o-linear-gradient(top,#717171,#494949); + border: 1px solid #000; +} + +.jqx-scrollbar-thumb-state-hover-horizontal-black { + background: #983600; + background-image: -webkit-gradient(linear,0 0,0 100%,from(#fb4e0b),to(#983600)); + background-image: -moz-linear-gradient(top,#fb4e0b,#983600); + background-image: -o-linear-gradient(top,#fb4e0b,#983600); + border: 1px solid #000; +} + +.jqx-scrollbar-thumb-state-pressed-horizontal-black { + background: #902e00; + background-image: -webkit-gradient(linear,0 0,0 100%,from(#902e00),to(#531c03)); + background-image: -moz-linear-gradient(top,#902e00,#531c03); + background-image: -o-linear-gradient(top,#902e00,#531c03); + border: 1px solid #000; +} + +.jqx-scrollbar-thumb-state-normal-black { + background: #555; + background-image: -webkit-gradient(linear,left top,left top,from(#717171),to(#494949)); + background-image: -moz-linear-gradient(left,#717171,#494949); + background-image: -o-linear-gradient(left,#717171,#494949); + border: 1px solid #000; +} + +.jqx-scrollbar-thumb-state-hover-black { + background: #983600; + background-image: -webkit-gradient(linear,left top,left top,from(#fb4e0b),to(#983600)); + background-image: -moz-linear-gradient(left,#fb4e0b,#983600); + background-image: -o-linear-gradient(left,#fb4e0b,#983600); + border: 1px solid #000; +} -.jqx-splitter-splitbar-horizontal-black, .jqx-splitter-splitbar-vertical-black, .jqx-splitter-splitbar-hover-black, .jqx-splitter-splitbar-hover-horizontal-black{background: #555;} -.jqx-splitter-collapse-button-horizontal-black, .jqx-splitter-collapse-button-vertical-black{background: #7f7f7f;} -.jqx-grid-column-sortascbutton-black, .jqx-expander-arrow-bottom-black, .jqx-window-collapse-button-black, .jqx-menu-item-arrow-up-black, .jqx-menu-item-arrow-up-selected-black, .jqx-menu-item-arrow-top-up-black, .jqx-icon-arrow-up-black, .jqx-icon-arrow-up-hover-black, .jqx-icon-arrow-up-selected-black{background-image:url('images/icon-up-white.png'); background-repeat:no-repeat; background-position:center} -.jqx-widget-black .jqx-grid-group-expand-black, .jqx-grid-group-expand-black, .jqx-grid-column-menubutton-black, .jqx-grid-column-sortdescbutton-black, .jqx-expander-arrow-top-black, .jqx-window-collapse-button-collapsed-black, .jqx-menu-item-arrow-down-black, .jqx-menu-item-arrow-down-selected-black, .jqx-menu-item-arrow-down-black, .jqx-icon-arrow-down-black, .jqx-icon-arrow-down-hover-black, .jqx-icon-arrow-down-selected-black{background-image:url('images/icon-down-white.png'); background-repeat:no-repeat; background-position:center} -.jqx-tabs-arrow-left-black, .jqx-menu-item-arrow-left-selected-black, .jqx-menu-item-arrow-top-left, .jqx-icon-arrow-left-black, .jqx-icon-arrow-down-left-black, .jqx-icon-arrow-left-selected-black{background-image:url('images/icon-left-white.png'); background-repeat:no-repeat; background-position:center} -.jqx-widget-black .jqx-grid-group-collapse-black, .jqx-grid-group-collapse-black,.jqx-tabs-arrow-right-black, .jqx-menu-item-arrow-right-selected-black, .jqx-menu-item-arrow-top-right-black, .jqx-icon-arrow-right-black, .jqx-icon-arrow-right-hover-black, .jqx-icon-arrow-right-selected-black{background-image:url('images/icon-right-white.png'); background-repeat:no-repeat; background-position:center} -.jqx-window-close-button-black, .jqx-icon-close-black, .jqx-tabs-close-button-black, .jqx-tabs-close-button-hover-black, .jqx-tabs-close-button-selected-black{background-image:url(images/close_white.png); background-repeat:no-repeat; background-position:center} -.jqx-tree-item-arrow-collapse-rtl-black, .jqx-tree-item-arrow-collapse-hover-rtl-black{background-image: url(images/icon-left.png);} -.jqx-listitem-state-group-black{background: #222;} -.jqx-calendar-cell-specialDate-black{border: 1px solid black;} -.jqx-tabs-selection-tracker-top-black, .jqx-tabs-selection-tracker-bottom-black{background-color: #000; border-color: #000;} -.jqx-widget-black .jqx-grid-cell-sort-black, .jqx-widget-black .jqx-grid-cell-alt-black, .jqx-widget-black .jqx-grid-cell-filter-black, .jqx-widget-black .jqx-grid-cell-pinned-black{background-color:#333} -.jqx-listbox-feedback-black{ border-top: 1px dashed #ccc;} -.jqx-combobox-input-black, .jqx-combobox-content-black, .jqx-input-black, .jqx-input-content-black{background: #f7f7f7; color: #000;} -.jqx-widget-black, .jqx-widget-header-black, .jqx-widget-content-black{-webkit-background-clip: padding-box; background-clip: padding-box;} -.jqx-fill-state-focus-black .jqx-widget-content{border-color: #000;} -.jqx-radiobutton-check-checked-black{background: #fff;} -.jqx-icon-arrow-first-black -{ +.jqx-scrollbar-thumb-state-pressed-black { + background: #902e00; + background-image: -webkit-gradient(linear,left top,left top,from(#902e00),to(#531c03)); + background-image: -moz-linear-gradient(left,#902e00,#531c03); + background-image: -o-linear-gradient(left,#902e00,#531c03); + border: 1px solid #000; +} + +.jqx-splitter-splitbar-horizontal-black, .jqx-splitter-splitbar-vertical-black, .jqx-splitter-splitbar-hover-black, .jqx-splitter-splitbar-hover-horizontal-black { + background: #555; +} + +.jqx-splitter-collapse-button-horizontal-black, .jqx-splitter-collapse-button-vertical-black { + background: #7f7f7f; +} + +.jqx-grid-column-sortascbutton-black, .jqx-expander-arrow-bottom-black, .jqx-window-collapse-button-black, .jqx-menu-item-arrow-up-black, .jqx-menu-item-arrow-up-selected-black, .jqx-menu-item-arrow-top-up-black, .jqx-icon-arrow-up-black, .jqx-icon-arrow-up-hover-black, .jqx-icon-arrow-up-selected-black { + background-image: url('images/icon-up-white.png'); + background-repeat: no-repeat; + background-position: center; +} + +.jqx-widget-black .jqx-grid-group-expand-black, .jqx-grid-group-expand-black, .jqx-grid-column-menubutton-black, .jqx-grid-column-sortdescbutton-black, .jqx-expander-arrow-top-black, .jqx-window-collapse-button-collapsed-black, .jqx-menu-item-arrow-down-black, .jqx-menu-item-arrow-down-selected-black, .jqx-menu-item-arrow-down-black, .jqx-icon-arrow-down-black, .jqx-icon-arrow-down-hover-black, .jqx-icon-arrow-down-selected-black { + background-image: url('images/icon-down-white.png'); + background-repeat: no-repeat; + background-position: center; +} + +.jqx-tabs-arrow-left-black, .jqx-menu-item-arrow-left-selected-black, .jqx-menu-item-arrow-top-left, .jqx-icon-arrow-left-black, .jqx-icon-arrow-down-left-black, .jqx-icon-arrow-left-selected-black { + background-image: url('images/icon-left-white.png'); + background-repeat: no-repeat; + background-position: center; +} + +.jqx-widget-black .jqx-grid-group-collapse-black, .jqx-grid-group-collapse-black, .jqx-tabs-arrow-right-black, .jqx-menu-item-arrow-right-selected-black, .jqx-menu-item-arrow-top-right-black, .jqx-icon-arrow-right-black, .jqx-icon-arrow-right-hover-black, .jqx-icon-arrow-right-selected-black { + background-image: url('images/icon-right-white.png'); + background-repeat: no-repeat; + background-position: center; +} + +.jqx-window-close-button-black, .jqx-icon-close-black, .jqx-tabs-close-button-black, .jqx-tabs-close-button-hover-black, .jqx-tabs-close-button-selected-black { + background-image: url(images/close_white.png); + background-repeat: no-repeat; + background-position: center; +} + +.jqx-tree-item-arrow-collapse-rtl-black, .jqx-tree-item-arrow-collapse-hover-rtl-black { + background-image: url(images/icon-left.png); +} + +.jqx-listitem-state-group-black { + background: #222; +} + +.jqx-calendar-cell-specialDate-black { + border: 1px solid black; +} + +.jqx-tabs-selection-tracker-top-black, .jqx-tabs-selection-tracker-bottom-black { + background-color: #000; + border-color: #000; +} + +.jqx-widget-black .jqx-grid-cell-sort-black, .jqx-widget-black .jqx-grid-cell-alt-black, .jqx-widget-black .jqx-grid-cell-filter-black, .jqx-widget-black .jqx-grid-cell-pinned-black { + background-color: #333; +} + +.jqx-listbox-feedback-black { + border-top: 1px dashed #ccc; +} + +.jqx-combobox-input-black, .jqx-combobox-content-black, .jqx-input-black, .jqx-input-content-black { + background: #f7f7f7; + color: #000; +} + +.jqx-widget-black, .jqx-widget-header-black, .jqx-widget-content-black { + -webkit-background-clip: padding-box; + background-clip: padding-box; +} + +.jqx-fill-state-focus-black .jqx-widget-content { + border-color: #000; +} + +.jqx-radiobutton-check-checked-black { + background: #fff; +} + +.jqx-icon-arrow-first-black { background-image: url('images/icon-first-white.png'); background-repeat: no-repeat; background-position: center; } -.jqx-icon-arrow-last-black -{ + +.jqx-icon-arrow-last-black { background-image: url('images/icon-last-white.png'); background-repeat: no-repeat; background-position: center; } -.jqx-grid-cell-black.jqx-grid-cell-selected-black>.jqx-grid-group-expand-black, -.jqx-grid-cell-black.jqx-grid-cell-hover-black>.jqx-grid-group-expand-black { + +.jqx-grid-cell-black.jqx-grid-cell-selected-black > .jqx-grid-group-expand-black, +.jqx-grid-cell-black.jqx-grid-cell-hover-black > .jqx-grid-group-expand-black { background-image: url('images/icon-down-white.png'); background-repeat: no-repeat; background-position: center; } -.jqx-grid-cell-black.jqx-grid-cell-selected-black>.jqx-grid-group-collapse-black, -.jqx-grid-cell-black.jqx-grid-cell-hover-black>.jqx-grid-group-collapse-black { + +.jqx-grid-cell-black.jqx-grid-cell-selected-black > .jqx-grid-group-collapse-black, +.jqx-grid-cell-black.jqx-grid-cell-hover-black > .jqx-grid-group-collapse-black { background-image: url('images/icon-right-white.png'); background-repeat: no-repeat; background-position: center; } -.jqx-grid-cell-black.jqx-grid-cell-selected-black>.jqx-grid-group-collapse-rtl-black, -.jqx-grid-cell-black.jqx-grid-cell-hover-black>.jqx-grid-group-collapse-rtl-black { + +.jqx-grid-cell-black.jqx-grid-cell-selected-black > .jqx-grid-group-collapse-rtl-black, +.jqx-grid-cell-black.jqx-grid-cell-hover-black > .jqx-grid-group-collapse-rtl-black { background-image: url('images/icon-left-white.png'); background-repeat: no-repeat; background-position: center; } -.jqx-grid-cell-black.jqx-grid-cell-selected-black>.jqx-grid-group-expand-rtl-black, -.jqx-grid-cell-black.jqx-grid-cell-hover-black>.jqx-grid-group-expand-rtl-black { + +.jqx-grid-cell-black.jqx-grid-cell-selected-black > .jqx-grid-group-expand-rtl-black, +.jqx-grid-cell-black.jqx-grid-cell-hover-black > .jqx-grid-group-expand-rtl-black { background-image: url('images/icon-down-white.png'); background-repeat: no-repeat; background-position: center; } + .jqx-icon-calendar-black, .jqx-icon-calendar-hover-black, .jqx-icon-calendar-pressed-black { background-image: url('images/icon-calendar-white.png'); } + .jqx-icon-time-black, .jqx-icon-time-hover-black, .jqx-icon-time-pressed-black { background-image: url('images/icon-time-white.png'); } -.jqx-icon-delete-black -{ +.jqx-icon-delete-black { background-image: url('images/icon-delete-white.png'); } -.jqx-icon-edit-black -{ + +.jqx-icon-edit-black { background-image: url('images/icon-edit-white.png'); } -.jqx-icon-save-black -{ + +.jqx-icon-save-black { background-image: url('images/icon-save-white.png'); } -.jqx-icon-cancel-black -{ + +.jqx-icon-cancel-black { background-image: url('images/icon-cancel-white.png'); } -.jqx-icon-search-black -{ + +.jqx-icon-search-black { background-image: url(images/search_white.png); } -.jqx-icon-plus-black -{ + +.jqx-icon-plus-black { background-image: url(images/plus_white.png); } + .jqx-menu-minimized-button-black { - background-image: url('images/icon-menu-minimized-white.png'); + background-image: url('images/icon-menu-minimized-white.png'); } + .jqx-editor-toolbar-icon-black { background: url('images/html_editor_white.png') no-repeat; } -.jqx-layout-black -{ + +.jqx-layout-black { background-color: #000; } -.jqx-layout-pseudo-window-pin-icon-black -{ + +.jqx-layout-pseudo-window-pin-icon-black { background-image: url("images/pin-white.png"); } -.jqx-layout-pseudo-window-pinned-icon-black -{ + +.jqx-layout-pseudo-window-pinned-icon-black { background-image: url("images/pinned-white.png"); } -.jqx-scheduler-month-cell-black, .jqx-scheduler-time-column-black, .jqx-scheduler-toolbar-black -{ + +.jqx-scheduler-month-cell-black, .jqx-scheduler-time-column-black, .jqx-scheduler-toolbar-black { background: #35353A !important; - color: #fff !important; + color: #fff !important; } + .jqx-widget-black .jqx-scheduler-middle-cell-black, .jqx-scheduler-middle-cell-black { border-bottom-color: #35353A !important; } + .jqx-kanban-item-black { - box-shadow:none; + box-shadow: none; } - .jqx-grid-column-menubutton-black { +.jqx-grid-column-menubutton-black { border-style: solid; border-width: 0px 0px 0px 1px; border-color: transparent; @@ -261,9 +467,9 @@ background-repeat: no-repeat; background-position: center; cursor: pointer; - } -.jqx-item-black .jqx-grid-sortasc-icon - { +} + +.jqx-item-black .jqx-grid-sortasc-icon { background-image: url('images/icon-sort-asc-white.png'); background-repeat: no-repeat; background-position: left center; @@ -272,10 +478,9 @@ float: left; margin-left: -4px; margin-right: 4px; - } - /*applied to the sort ascending menu item in the Grid's Context Menu*/ -.jqx-item-black .jqx-grid-sortdesc-icon - { +} +/*applied to the sort ascending menu item in the Grid's Context Menu*/ +.jqx-item-black .jqx-grid-sortdesc-icon { background-image: url('images/icon-sort-desc-white.png'); background-repeat: no-repeat; background-position: left center; @@ -284,10 +489,9 @@ float: left; margin-left: -4px; margin-right: 4px; - } - /*applied to the grid menu's sort remove item/*/ -.jqx-item-black .jqx-grid-sortremove-icon - { +} +/*applied to the grid menu's sort remove item/*/ +.jqx-item-black .jqx-grid-sortremove-icon { background-image: url('images/icon-sort-remove-white.png'); background-repeat: no-repeat; background-position: left center; @@ -296,16 +500,16 @@ float: left; margin-left: -4px; margin-right: 4px; - } +} /*applied to the timepicker labels*/ .jqx-label-black { - fill: darkgray; + fill: darkgray; } /*applied to the timepicker needle*/ .jqx-needle-black { - fill: darkgray; + fill: darkgray; } /*applied to the timepicker needle circle*/ .jqx-needle-central-circle-black { - fill: darkgray; + fill: darkgray; } diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/jqx.dark.css --- a/www/jqwidgets/styles/jqx.dark.css Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/styles/jqx.dark.css Fri May 01 16:37:31 2020 +0200 @@ -982,14 +982,22 @@ .jqx-container-dark { border-radius: inherit; } -.jqx-header-dark { +.jqx-time-picker[view="portrait"] .jqx-header-dark { border-top-left-radius: inherit; border-top-right-radius: inherit; } -.jqx-main-container-dark { +.jqx-time-picker[view="portrait"] .jqx-main-container-dark { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; } +.jqx-time-picker[view="landscape"] .jqx-header-dark { + border-top-left-radius: inherit; + border-bottom-left-radius: inherit; +} +.jqx-time-picker[view="landscape"] .jqx-main-container-dark { + border-top-right-radius: inherit; + border-bottom-right-radius: inherit; +} .jqx-time-picker .jqx-main-container-dark { background-color: rgb(37, 40, 48); } @@ -1003,4 +1011,4 @@ } .jqx-time-picker .jqx-label-dark.jqx-selected { opacity: 1; -} \ No newline at end of file +} diff -r 9d1aa6f3a4da -r 4d01937ae7af www/jqwidgets/styles/jqx.light.css --- a/www/jqwidgets/styles/jqx.light.css Fri Oct 18 13:20:35 2019 +0200 +++ b/www/jqwidgets/styles/jqx.light.css Fri May 01 16:37:31 2020 +0200 @@ -1244,9 +1244,6 @@ background: #5bc0de; } - - - .jqx-fill-state-pressed-light .jqx-icon-delete-light { background-image: url('images/icon-delete-white.png'); @@ -1281,7 +1278,6 @@ border-color: #ddd; } - /*applied to the timepicker*/ .jqx-needle-central-circle-light { fill: rgb(0, 119, 190); @@ -1295,4 +1291,12 @@ } .jqx-svg-picker-light:focus { border: 1px solid rgb(0, 119, 190) !important; +} +.jqx-time-picker[view="portrait"] .jqx-header-light { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} +.jqx-time-picker[view="landscape"] .jqx-header-light { + border-top-left-radius: inherit; + border-bottom-left-radius: inherit; } \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/global-min.js --- a/www/js/global-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -var StageData=[{id:0,en:"Plan",nl:"Plan"},{id:1,en:"Wait",nl:"Wacht"},{id:2,en:"Brew",nl:"Brouwen"},{id:3,en:"Primary",nl:"Hoofdgisting"},{id:4,en:"Secondary",nl:"Nagisting"},{id:5,en:"Tertiary",nl:"Lagering"},{id:6,en:"Package",nl:"Afvullen"},{id:7,en:"Carbonation",nl:"Hergisten"},{id:8,en:"Mature",nl:"Rijpen"},{id:9,en:"Taste",nl:"Proeven"},{id:10,en:"Ready",nl:"Gereed"},{id:11,en:"Closed",nl:"Afgesloten"}],StageSource={localdata:StageData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StageAdapter=new $.jqx.dataAdapter(StageSource),SplitData=[{id:0,en:"Not divided",nl:"Niet gesplitst",ok:100},{id:1,en:"After mash",nl:"Na maischen",ok:2},{id:2,en:"After boil",nl:"Na koken",ok:2},{id:3,en:"After cooling",nl:"Na koelen",ok:2},{id:4,en:"After primary",nl:"Na hoofdgisting",ok:3},{id:5,en:"After secondary",nl:"Na nagisting",ok:4},{id:6,en:"After tertiary",nl:"Na lageren",ok:5}],SplitSource={localdata:SplitData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"ok"}]},SplitAdapter=new $.jqx.dataAdapter(SplitSource),MaterialData=[{id:0,en:"Stainless Steel",nl:"RVS",sh:0.11},{id:1,en:"Aluminium",nl:"Aluminium",sh:0.22},{id:2,en:"Plastics",nl:"Kunststof",sh:0.46},{id:3,en:"Copper",nl:"Koper",sh:0.092}],MaterialSource={localdata:MaterialData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"sh"}]},MaterialAdapter=new $.jqx.dataAdapter(MaterialSource),FermentableTypeData=[{id:0,en:"Grain",nl:"Mout"},{id:1,en:"Sugar",nl:"Suiker"},{id:2,en:"Extract",nl:"Vloeibaar extract"},{id:3,en:"Dry extract",nl:"Droog extract"},{id:4,en:"Adjunct",nl:"Ongemout graan"}],FermentableTypeSource={localdata:FermentableTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},FermentableTypeAdapter=new $.jqx.dataAdapter(FermentableTypeSource),GrainTypeData=[{id:0,en:"Base",nl:"Basismout"},{id:1,en:"Roast",nl:"Geroosterde mout"},{id:2,en:"Crystal",nl:"Cara- of crystalmout"},{id:3,en:"Kilned",nl:"Geëeste mout"},{id:4,en:"Sour malt",nl:"Zuurmout"},{id:5,en:"Special",nl:"Speciale mout"},{id:6,en:"No malt",nl:"Geen mout"}],GrainTypeSource={localdata:GrainTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},GrainTypeAdapter=new $.jqx.dataAdapter(GrainTypeSource),AddedData=[{id:0,en:"Mash",nl:"Maischen"},{id:1,en:"Boil",nl:"Koken"},{id:2,en:"Fermentation",nl:"Vergisten"},{id:3,en:"Lagering",nl:"Nagisten/lageren"},{id:4,en:"Bottle",nl:"Bottelen"},{id:5,en:"Kegs",nl:"Fust"}],AddedSource={localdata:AddedData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AddedAdapter=new $.jqx.dataAdapter(AddedSource),HopTypeData=[{id:0,en:"Bittering",nl:"Bitterhop"},{id:1,en:"Aroma",nl:"Aromahop"},{id:2,en:"Both",nl:"Beide"}],HopTypeSource={localdata:HopTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopTypeAdapter=new $.jqx.dataAdapter(HopTypeSource),HopFormData=[{id:0,en:"Pellet",nl:"Pellets"},{id:1,en:"Plug",nl:"Plugs"},{id:2,en:"Leaf",nl:"Bloemen"},{id:3,en:"Leaf wet",nl:"Hop nat"},{id:4,en:"Cryo",nl:"Cryo"}],HopFormSource={localdata:HopFormData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopFormAdapter=new $.jqx.dataAdapter(HopFormSource),HopUseData=[{id:0,en:"Mash",nl:"Maischhop"},{id:1,en:"First wort",nl:"First wort"},{id:2,en:"Boil",nl:"Koken"},{id:3,en:"Aroma",nl:"Vlamuit"},{id:4,en:"Whirlpool",nl:"Whirlpool"},{id:5,en:"Dry hop",nl:"Koudhop"}],HopUseSource={localdata:HopUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopUseAdapter=new $.jqx.dataAdapter(HopUseSource),YeastTypeData=[{id:0,en:"Lager",nl:"Ondergist"},{id:1,en:"Ale",nl:"Bovengist"},{id:2,en:"Wheat",nl:"Tarwegist"},{id:3,en:"Wine",nl:"Wijngist"},{id:4,en:"Champagne",nl:"Champagnegist"},{id:5,en:"Brett",nl:"Brett"},{id:6,en:"Kveik",nl:"Kveik"},{id:7,en:"Hybrid",nl:"Hybride"}],YeastTypeSource={localdata:YeastTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},YeastTypeAdapter=new $.jqx.dataAdapter(YeastTypeSource),YeastFormData=[{id:0,en:"Liquid",nl:"Vloeibaar",cells:100000000000},{id:1,en:"Dry",nl:"Droog",cells:15000000000},{id:2,en:"Slant",nl:"Schuine buis",cells:1700000000},{id:3,en:"Culture",nl:"Slurry",cells:1700000000},{id:4,en:"Frozen",nl:"Ingevroren",cells:1700000000},{id:5,en:"Bottle",nl:"Depot",cells:1700000000},{id:6,en:"Dried",nl:"Gedroogd",cells:9000000000}],YeastFormSource={localdata:YeastFormData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"cells"}]},YeastFormAdapter=new $.jqx.dataAdapter(YeastFormSource),YeastUseData=[{id:0,en:"Primary",nl:"Hoofdgisting"},{id:1,en:"Secondary",nl:"Nagisting"},{id:2,en:"Tertiary",nl:"Lagering"},{id:3,en:"Bottle",nl:"Bottelen"}],YeastUseSource={localdata:YeastUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"cells"}]},YeastUseAdapter=new $.jqx.dataAdapter(YeastUseSource),FlocculationData=[{id:0,en:"Low",nl:"Laag"},{id:1,en:"Medium",nl:"Medium"},{id:2,en:"High",nl:"Hoog"},{id:3,en:"Very high",nl:"Zeer hoog"}],FlocculationSource={localdata:FlocculationData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},FlocculationAdapter=new $.jqx.dataAdapter(FlocculationSource),ZymocideData=[{id:0,en:"None",nl:"Niet"},{id:1,en:"K1",nl:"K1"},{id:2,en:"K2",nl:"K2"},{id:3,en:"K28",nl:"K28"},{id:4,en:"Klus",nl:"Klus"}],ZymocideSource={localdata:ZymocideData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},ZymocideAdapter=new $.jqx.dataAdapter(ZymocideSource),StarterTypeData=[{id:0,en:"Stirred",nl:"Geroerd"},{id:1,en:"Shaken",nl:"Geschud"},{id:2,en:"Simple",nl:"Simpel"}],StarterTypeSource={localdata:StarterTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StarterTypeAdapter=new $.jqx.dataAdapter(StarterTypeSource),MiscTypeData=[{id:0,en:"Spice",nl:"Specerij"},{id:1,en:"Herb",nl:"Kruid"},{id:2,en:"Flavor",nl:"Smaakstof"},{id:3,en:"Fining",nl:"Klaringsmiddel"},{id:4,en:"Water agent",nl:"Brouwzout"},{id:5,en:"Yeast nutrient",nl:"Gistvoeding"},{id:6,en:"Other",nl:"Anders"}],MiscTypeSource={localdata:MiscTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MiscTypeAdapter=new $.jqx.dataAdapter(MiscTypeSource),MiscUseData=[{id:0,en:"Starter",nl:"Starter"},{id:1,en:"Mash",nl:"Maischen"},{id:2,en:"Boil",nl:"Koken"},{id:3,en:"Primary",nl:"Hoofdvergisting"},{id:4,en:"Secondary",nl:"Nagisting/lagering"},{id:5,en:"Bottling",nl:"Bottelen"}],MiscUseSource={localdata:MiscUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MiscUseAdapter=new $.jqx.dataAdapter(MiscUseSource),StyleTypeData=[{id:0,en:"Lager",nl:"Ondergistend bier"},{id:1,en:"Ale",nl:"Bovengistend bier"},{id:2,en:"Mead",nl:"Mede"},{id:3,en:"Wheat",nl:"Tarwebier"},{id:4,en:"Mixed",nl:"Gemengd"},{id:5,en:"Cider",nl:"Cider"}],StyleTypeSource={localdata:StyleTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StyleTypeAdapter=new $.jqx.dataAdapter(StyleTypeSource),MashStepTypeData=[{id:0,en:"Infusion",nl:"Infusie"},{id:1,en:"Temperature",nl:"Verwarming"},{id:2,en:"Decoction",nl:"Decoctie"}],MashStepTypeSource={localdata:MashStepTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MashStepTypeAdapter=new $.jqx.dataAdapter(MashStepTypeSource),RecipeTypeData=[{id:0,en:"Extract",nl:"Extract"},{id:1,en:"Partial Mash",nl:"Deelmaisch"},{id:2,en:"All Grain",nl:"Mout"}],RecipeTypeSource={localdata:RecipeTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},RecipeTypeAdapter=new $.jqx.dataAdapter(RecipeTypeSource),IBUmethodData=[{id:0,en:"Tinseth",nl:"Tinseth"},{id:1,en:"Rager",nl:"Rager"},{id:2,en:"Daniels",nl:"Daniels"}],IBUmethodSource={localdata:IBUmethodData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},IBUmethodAdapter=new $.jqx.dataAdapter(IBUmethodSource),ColorMethodData=[{id:0,en:"Morey",nl:"Morey"},{id:1,en:"Mosher",nl:"Mosher"},{id:2,en:"Daniels",nl:"Daniels"},{id:3,en:"Halberstadt",nl:"Halberstadt"},{id:4,en:"Naudts",nl:"Naudts"}],ColorMethodSource={localdata:ColorMethodData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},ColorMethodAdapter=new $.jqx.dataAdapter(ColorMethodSource),CoolingTypeData=[{id:0,en:"-",nl:"-"},{id:1,en:"Emersion chiller",nl:"Dompelkoeler"},{id:2,en:"Counterflow chiller",nl:"Tegenstroomkoeler"},{id:3,en:"Au bain marie",nl:"Au bain marie"},{id:4,en:"Natural",nl:"Laten afkoelen"}],CoolingTypeSource={localdata:CoolingTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},CoolingTypeAdapter=new $.jqx.dataAdapter(CoolingTypeSource),AerationTypeData=[{id:0,en:"None",nl:"Geen"},{id:1,en:"Air",nl:"Lucht"},{id:2,en:"Oxygen",nl:"Zuurstof"}],AerationTypeSource={localdata:AerationTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AerationTypeAdapter=new $.jqx.dataAdapter(AerationTypeSource),AcidTypeData=[{id:0,en:"Lactic",nl:"Melkzuur"},{id:1,en:"Hydrochloric",nl:"Zoutzuur"},{id:2,en:"Phosphoric",nl:"Fosforzuur"},{id:3,en:"Sulfuric",nl:"Zwavelzuur"}],AcidTypeSource={localdata:AcidTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AcidTypeAdapter=new $.jqx.dataAdapter(AcidTypeSource),BaseTypeData=[{id:0,en:"Sodiumbicarbonate",nl:"NaHCO3"},{id:1,en:"Sodiumcarbonate",nl:"Na2CO3"},{id:2,en:"Calciumcarbonate",nl:"CaCO3"},{id:3,en:"Calciumhydroxide",nl:"Ca(OH)2"}],BaseTypeSource={localdata:BaseTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},BaseTypeAdapter=new $.jqx.dataAdapter(BaseTypeSource),SpargeSourceData=[{id:0,en:"Source 1",nl:"Bron 1"},{id:1,en:"Source 2",nl:"Bron 2"},{id:2,en:"Mixed",nl:"Gemengd"}],SpargeSourceSource={localdata:SpargeSourceData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},SpargeSourceAdapter=new $.jqx.dataAdapter(SpargeSourceSource),Show1wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:1,readOnly:true},Show2wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:2,readOnly:true},Show3wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:3,readOnly:true},Smal0dec={inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:0,readOnly:true},Smal1dec={inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:1,readOnly:true},Show0dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:0},Show1dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:1},Show2dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:2},Show3dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:3},SGopts={inputMode:"simple",theme:theme,width:110,height:23,min:0.99,max:1.199,decimalDigits:3,spinButtons:true},Spin1dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:1,spinButtons:true},Spin2dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:2,spinButtons:true},Spin3dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:3,spinButtons:true},SpinpH={inputMode:"simple",theme:theme,width:110,height:23,min:1,max:14,decimalDigits:1,spinButtons:true},Spin2pH={inputMode:"simple",theme:theme,width:110,height:23,min:1,max:14,decimalDigits:2,spinButtons:true},YeastT={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:50,decimalDigits:1,spinButtons:true},PosInt={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:0,spinButtons:true},Perc1dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:100,decimalDigits:1,spinButtons:true},Perc0={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:100,decimalDigits:0,spinButtons:true},Dateopts={theme:theme,width:150,height:23,allowNullDate:true,todayString:"Vandaag",clearString:"Wissen",showFooter:true,formatString:"yyyy-MM-dd",enableBrowserBoundsDetection:true},DateTimeopts={theme:theme,width:230,height:23,allowNullDate:true,todayString:"Vandaag",clearString:"Wissen",showFooter:true,formatString:"yyyy-MM-dd HH:mm:ss",enableBrowserBoundsDetection:true,showTimeButton:true},sugardensity=1.611,stylesSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"category",type:"string"},{name:"category_number",type:"number"},{name:"style_letter",type:"string"},{name:"style_guide",type:"string"},{name:"type",type:"int"},{name:"og_min",type:"float"},{name:"og_max",type:"float"},{name:"fg_min",type:"float"},{name:"fg_max",type:"float"},{name:"ibu_min",type:"float"},{name:"ibu_max",type:"float"},{name:"color_min",type:"float"},{name:"color_max",type:"float"},{name:"carb_min",type:"float"},{name:"carb_max",type:"float"},{name:"abv_min",type:"float"},{name:"abv_max",type:"float"},{name:"notes",type:"string"},{name:"profile",type:"string"},{name:"ingredients",type:"string"},{name:"examples",type:"string"}],url:"includes/db_profile_styles.php"},styleslist=new $.jqx.dataAdapter(stylesSource),equipmentSource={datatype:"json",datafields:[{name:"name",type:"string"},{name:"boil_size",type:"float"},{name:"batch_size",type:"float"},{name:"tun_volume",type:"float"},{name:"tun_weight",type:"float"},{name:"tun_specific_heat",type:"float"},{name:"tun_material",type:"int"},{name:"tun_height",type:"float"},{name:"top_up_water",type:"float"},{name:"trub_chiller_loss",type:"float"},{name:"evap_rate",type:"float"},{name:"boil_time",type:"float"},{name:"calc_boil_volume",type:"int"},{name:"top_up_kettle",type:"float"},{name:"hop_utilization",type:"float"},{name:"notes",type:"string"},{name:"lauter_volume",type:"float"},{name:"lauter_height",type:"float"},{name:"lauter_deadspace",type:"float"},{name:"kettle_volume",type:"float"},{name:"kettle_height",type:"float"},{name:"mash_volume",type:"float"},{name:"mash_max",type:"float"},{name:"efficiency",type:"float"}],url:"includes/db_inventory_equipments.php"},equipmentlist=new $.jqx.dataAdapter(equipmentSource),fermentableInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"yield",type:"float"},{name:"color",type:"float"},{name:"add_after_boil",type:"int"},{name:"origin",type:"string"},{name:"supplier",type:"string"},{name:"coarse_fine_diff",type:"float"},{name:"moisture",type:"float"},{name:"diastatic_power",type:"float"},{name:"protein",type:"float"},{name:"dissolved_protein",type:"float"},{name:"max_in_batch",type:"float"},{name:"recommend_mash",type:"int"},{name:"graintype",type:"int"},{name:"di_ph",type:"float"},{name:"acid_to_ph_57",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"getfermentablesources.php"},fermentableinstock=false,fermentablelist=new $.jqx.dataAdapter(fermentableInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b299){c=299}e=[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,200,199,199,198,198,197,197,196,196,195,195,194,194,193,193,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,175,174,172,171,169,168,167,195,164,162,161,159,158,157,155,154,152,151,149,148,147,145,144,142,141,139,138,137,135,134,132,131,129,128,127,125,124,122,121,119,118,117,115,114,112,111,109,108,107,105,104,102,101,99,98,97,95,94,92,91,89,88,87,85,84,82,81,79,78,77,75,74,72,71,69,68,67,65,64,62,61,59,58,57,55,54,52,51,49,48,47,45,44,43,41,39,38,37,37,36,36,35,35,34,34,33,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,19,19,18,18,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,8,8];d=[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,249,248,247,246,245,244,242,240,238,236,234,232,230,228,226,224,222,220,218,216,214,212,210,208,206,204,202,200,198,196,194,192,190,188,186,184,182,180,178,176,174,172,170,168,166,164,162,160,158,156,154,152,150,148,146,144,142,141,140,139,139,138,137,136,136,135,134,133,133,132,131,130,130,129,128,127,127,126,125,124,124,123,122,121,121,120,119,118,118,117,116,115,115,114,113,112,112,111,110,109,109,108,107,106,106,105,104,103,103,102,101,100,100,99,98,97,97,96,95,94,94,93,92,91,91,90,89,88,88,87,86,85,85,84,83,82,82,81,80,79,78,77,76,75,75,74,73,72,72,71,70,69,69,68,67,66,66,65,64,63,63,62,61,60,60,59,58,57,57,56,55,54,54,53,52,51,51,50,49,48,48,47,46,45,45,44,43,42,42,41,40,39,39,38,37,36,36,35,34,33,33,32,31,30,30,29,28,27,27,26,25,24,24,23,22,22,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,16,16,16,15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3];f=[210,204,199,193,188,182,177,171,166,160,155,149,144,138,133,127,122,116,111,105,100,94,89,83,78,72,67,61,56,50,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,55,55,55,55,54,54,54,54,53,53,53,53,52,52,52,52,51,51,51,51,50,50,50,50,49,49,48,47,47,46,45,45,44,43,43,42,41,41,40,39,39,38,37,37,36,35,34,33,32,31,29,28,27,26,25,24,23,21,20,19,18,17,16,15,13,12,11,10,9,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,17,16,16,15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3,2,2,2];b=e[c]*65536+d[c]*256+f[c];a=b.toString(16).toUpperCase();if(a.length<6){a="0"+a}return"#"+a}function sg_to_plato(a){return((135.997*a-630.272)*a+1111.14)*a-616.868}function plato_to_sg(a){return 1+(a/(258.6-((a/258.2)*227.1)))}function brix_to_sg(a){if(my_brix_correction>0){return plato_to_sg(a/my_brix_correction)}else{return plato_to_sg(a)}}function sg_to_brix(a){return sg_to_plato(a)*my_brix_correction}function estimate_sg(c,e){var a,d,b;a=100*c/e;d=plato_to_sg(a);for(b=0;b<20;b++){if(d>0){a=100*c/(e*d)}d=plato_to_sg(a)}return Round(d,4)}function estimate_fg(f,i,e,h,c,g,j){var b,d,a;if(f>40){f=0}if(i>50){i=0}if((e>0)&&(h>0)){b=e;if(b<2){b=2}if(b>5.5){b=5.5}if(c<60){c=60}if(c>72){c=72}}else{b=3.5;c=67;h=75}if(g<30){g=77}d=0.00825*g+0.00817*b-0.00684*c+0.00026*h-0.00356*i+0.00553*f+0.547;a=Round(1+(1-d)*(j-1),4);return a}function CalcFrac(f,e,d,b){var g,a,i,k,h,c,j;g=Math.pow(10,f-e);a=Math.pow(10,f-d);i=Math.pow(10,f-b);k=1/(1+g+g*a+g*a*i);h=g*k;c=g*a*k;j=g*a*i*k;return h+2*c+3*j}function lintner_to_kolbach(a){return(3.5*a)-16}function kolbach_to_lintner(a){return(a+16)/3.5}; \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/global.js --- a/www/js/global.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/global.js Fri May 01 16:37:31 2020 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * @@ -24,18 +24,18 @@ // dropdownlists arrays var StageData = [ - { id: 0, en: 'Plan', nl: 'Plan' }, - { id: 1, en: 'Wait', nl: 'Wacht' }, - { id: 2, en: 'Brew', nl: 'Brouwen' }, - { id: 3, en: 'Primary', nl: 'Hoofdgisting' }, - { id: 4, en: 'Secondary', nl: 'Nagisting' }, - { id: 5, en: 'Tertiary', nl: 'Lagering' }, - { id: 6, en: 'Package', nl: 'Afvullen' }, - { id: 7, en: 'Carbonation', nl: 'Hergisten' }, - { id: 8, en: 'Mature', nl: 'Rijpen' }, - { id: 9, en: 'Taste', nl: 'Proeven' }, - { id: 10, en: 'Ready', nl: 'Gereed' }, - { id: 11, en: 'Closed', nl: 'Afgesloten' } + { id: 0, en: 'Plan', nl: 'Plan' }, + { id: 1, en: 'Wait', nl: 'Wacht' }, + { id: 2, en: 'Brew', nl: 'Brouwen' }, + { id: 3, en: 'Primary', nl: 'Hoofdgisting' }, + { id: 4, en: 'Secondary', nl: 'Nagisting' }, + { id: 5, en: 'Tertiary', nl: 'Lagering' }, + { id: 6, en: 'Package', nl: 'Afvullen' }, + { id: 7, en: 'Carbonation', nl: 'Hergisten' }, + { id: 8, en: 'Mature', nl: 'Rijpen' }, + { id: 9, en: 'Taste', nl: 'Proeven' }, + { id: 10, en: 'Ready', nl: 'Gereed' }, + { id: 11, en: 'Closed', nl: 'Afgesloten' } ], StageSource = { localdata: StageData, @@ -45,13 +45,13 @@ StageAdapter = new $.jqx.dataAdapter(StageSource), SplitData = [ - { id: 0, en: 'Not divided', nl: 'Niet gesplitst', ok: 100 }, - { id: 1, en: 'After mash', nl: 'Na maischen', ok: 2 }, - { id: 2, en: 'After boil', nl: 'Na koken', ok: 2 }, - { id: 3, en: 'After cooling', nl: 'Na koelen', ok: 2 }, - { id: 4, en: 'After primary', nl: 'Na hoofdgisting', ok: 3 }, - { id: 5, en: 'After secondary', nl: 'Na nagisting', ok: 4 }, - { id: 6, en: 'After tertiary', nl: 'Na lageren', ok: 5 } + { id: 0, en: 'Not divided', nl: 'Niet gesplitst', ok: 100 }, + { id: 1, en: 'After mash', nl: 'Na maischen', ok: 2 }, + { id: 2, en: 'After boil', nl: 'Na koken', ok: 2 }, + { id: 3, en: 'After cooling', nl: 'Na koelen', ok: 2 }, + { id: 4, en: 'After primary', nl: 'Na hoofdgisting', ok: 3 }, + { id: 5, en: 'After secondary', nl: 'Na nagisting', ok: 4 }, + { id: 6, en: 'After tertiary', nl: 'Na lageren', ok: 5 } ], SplitSource = { localdata: SplitData, @@ -61,10 +61,10 @@ SplitAdapter = new $.jqx.dataAdapter(SplitSource), MaterialData = [ - { id: 0, en: 'Stainless Steel', nl: 'RVS', sh: 0.11 }, - { id: 1, en: 'Aluminium', nl: 'Aluminium', sh: 0.22 }, - { id: 2, en: 'Plastics', nl: 'Kunststof', sh: 0.46 }, - { id: 3, en: 'Copper', nl: 'Koper', sh: 0.092 } + { id: 0, en: 'Stainless Steel', nl: 'RVS', sh: 0.11 }, + { id: 1, en: 'Aluminium', nl: 'Aluminium', sh: 0.22 }, + { id: 2, en: 'Plastics', nl: 'Kunststof', sh: 0.46 }, + { id: 3, en: 'Copper', nl: 'Koper', sh: 0.092 } ], MaterialSource = { localdata: MaterialData, @@ -74,11 +74,11 @@ MaterialAdapter = new $.jqx.dataAdapter(MaterialSource), FermentableTypeData = [ - { id: 0, en: 'Grain', nl: 'Mout' }, - { id: 1, en: 'Sugar', nl: 'Suiker' }, - { id: 2, en: 'Extract', nl: 'Vloeibaar extract' }, + { id: 0, en: 'Grain', nl: 'Mout' }, + { id: 1, en: 'Sugar', nl: 'Suiker' }, + { id: 2, en: 'Extract', nl: 'Vloeibaar extract' }, { id: 3, en: 'Dry extract', nl: 'Droog extract' }, - { id: 4, en: 'Adjunct', nl: 'Ongemout graan' } + { id: 4, en: 'Adjunct', nl: 'Ongemout graan' } ], FermentableTypeSource = { localdata: FermentableTypeData, @@ -88,13 +88,13 @@ FermentableTypeAdapter = new $.jqx.dataAdapter(FermentableTypeSource), GrainTypeData = [ - { id: 0, en: 'Base', nl: 'Basismout' }, - { id: 1, en: 'Roast', nl: 'Geroosterde mout' }, - { id: 2, en: 'Crystal', nl: 'Cara- of crystalmout' }, - { id: 3, en: 'Kilned', nl: 'Geëeste mout'}, + { id: 0, en: 'Base', nl: 'Basismout' }, + { id: 1, en: 'Roast', nl: 'Geroosterde mout' }, + { id: 2, en: 'Crystal', nl: 'Cara- of crystalmout' }, + { id: 3, en: 'Kilned', nl: 'Geëeste mout'}, { id: 4, en: 'Sour malt', nl: 'Zuurmout' }, - { id: 5, en: 'Special', nl: 'Speciale mout' }, - { id: 6, en: 'No malt', nl: 'Geen mout' } + { id: 5, en: 'Special', nl: 'Speciale mout' }, + { id: 6, en: 'No malt', nl: 'Geen mout' } ], GrainTypeSource = { localdata: GrainTypeData, @@ -120,8 +120,8 @@ HopTypeData = [ { id: 0, en: 'Bittering', nl: 'Bitterhop' }, - { id: 1, en: 'Aroma', nl: 'Aromahop' }, - { id: 2, en: 'Both', nl: 'Beide' } + { id: 1, en: 'Aroma', nl: 'Aromahop' }, + { id: 2, en: 'Both', nl: 'Beide' } ], HopTypeSource = { localdata: HopTypeData, @@ -131,11 +131,11 @@ HopTypeAdapter = new $.jqx.dataAdapter(HopTypeSource), HopFormData = [ - { id: 0, en: 'Pellet', nl: 'Pellets' }, - { id: 1, en: 'Plug', nl: 'Plugs' }, - { id: 2, en: 'Leaf', nl: 'Bloemen' }, + { id: 0, en: 'Pellet', nl: 'Pellets' }, + { id: 1, en: 'Plug', nl: 'Plugs' }, + { id: 2, en: 'Leaf', nl: 'Bloemen' }, { id: 3, en: 'Leaf wet', nl: 'Hop nat' }, - { id: 4, en: 'Cryo', nl: 'Cryo' } + { id: 4, en: 'Cryo', nl: 'Cryo' } ], HopFormSource = { localdata: HopFormData, @@ -145,12 +145,12 @@ HopFormAdapter = new $.jqx.dataAdapter(HopFormSource), HopUseData = [ - { id: 0, en: 'Mash', nl: 'Maischhop' }, + { id: 0, en: 'Mash', nl: 'Maischhop' }, { id: 1, en: 'First wort', nl: 'First wort' }, - { id: 2, en: 'Boil', nl: 'Koken' }, - { id: 3, en: 'Aroma', nl: 'Vlamuit' }, - { id: 4, en: 'Whirlpool', nl: 'Whirlpool' }, - { id: 5, en: 'Dry hop', nl: 'Koudhop' } + { id: 2, en: 'Boil', nl: 'Koken' }, + { id: 3, en: 'Aroma', nl: 'Vlamuit' }, + { id: 4, en: 'Whirlpool', nl: 'Whirlpool' }, + { id: 5, en: 'Dry hop', nl: 'Koudhop' } ], HopUseSource = { localdata: HopUseData, @@ -160,17 +160,17 @@ HopUseAdapter = new $.jqx.dataAdapter(HopUseSource), YeastTypeData = [ - { id: 0, en: 'Lager', nl: 'Ondergist' }, - { id: 1, en: 'Ale', nl: 'Bovengist' }, - { id: 2, en: 'Wheat', nl: 'Tarwegist' }, - { id: 3, en: 'Wine', nl: 'Wijngist' }, + { id: 0, en: 'Lager', nl: 'Ondergist' }, + { id: 1, en: 'Ale', nl: 'Bovengist' }, + { id: 2, en: 'Wheat', nl: 'Tarwegist' }, + { id: 3, en: 'Wine', nl: 'Wijngist' }, { id: 4, en: 'Champagne', nl: 'Champagnegist' }, - { id: 5, en: 'Brett', nl: 'Brett' }, - { id: 6, en: 'Kveik', nl: 'Kveik' }, - { id: 7, en: 'Hybrid', nl: 'Hybride' } -// { id: 8, en: 'Mixed', nl: 'Mixed' }, + { id: 5, en: 'Brett', nl: 'Brett' }, + { id: 6, en: 'Kveik', nl: 'Kveik' }, + { id: 7, en: 'Hybrid', nl: 'Hybride' } +// { id: 8, en: 'Mixed', nl: 'Mixed' }, // { id: 9, en: 'Spontaneous', nl: 'Spontaan' }, -// { id: 10, en: 'Other', nl: 'Overig' } +// { id: 10, en: 'Other', nl: 'Overig' } ], YeastTypeSource = { localdata: YeastTypeData, @@ -180,13 +180,13 @@ YeastTypeAdapter = new $.jqx.dataAdapter(YeastTypeSource), YeastFormData = [ - { id: 0, en: 'Liquid', nl: 'Vloeibaar', cells: 100000000000 }, - { id: 1, en: 'Dry', nl: 'Droog', cells: 15000000000 }, - { id: 2, en: 'Slant', nl: 'Schuine buis', cells: 1700000000 }, - { id: 3, en: 'Culture', nl: 'Slurry', cells: 1700000000 }, - { id: 4, en: 'Frozen', nl: 'Ingevroren', cells: 1700000000 }, - { id: 5, en: 'Bottle', nl: 'Depot', cells: 1700000000 }, - { id: 6, en: 'Dried', nl: 'Gedroogd', cells: 9000000000 } + { id: 0, en: 'Liquid', nl: 'Vloeibaar', cells: 100000000000 }, + { id: 1, en: 'Dry', nl: 'Droog', cells: 15000000000 }, + { id: 2, en: 'Slant', nl: 'Schuine buis', cells: 1700000000 }, + { id: 3, en: 'Culture', nl: 'Slurry', cells: 1700000000 }, + { id: 4, en: 'Frozen', nl: 'Ingevroren', cells: 1700000000 }, + { id: 5, en: 'Bottle', nl: 'Depot', cells: 1700000000 }, + { id: 6, en: 'Dried', nl: 'Gedroogd', cells: 9000000000 } /* 9..18 billion MTF */ ], YeastFormSource = { localdata: YeastFormData, @@ -196,10 +196,10 @@ YeastFormAdapter = new $.jqx.dataAdapter(YeastFormSource), YeastUseData = [ - { id: 0, en: 'Primary', nl: 'Hoofdgisting' }, + { id: 0, en: 'Primary', nl: 'Hoofdgisting' }, { id: 1, en: 'Secondary', nl: 'Nagisting' }, - { id: 2, en: 'Tertiary', nl: 'Lagering' }, - { id: 3, en: 'Bottle', nl: 'Bottelen' } + { id: 2, en: 'Tertiary', nl: 'Lagering' }, + { id: 3, en: 'Bottle', nl: 'Bottelen' } ], YeastUseSource = { localdata: YeastUseData, @@ -209,9 +209,9 @@ YeastUseAdapter = new $.jqx.dataAdapter(YeastUseSource), FlocculationData = [ - { id: 0, en: 'Low', nl: 'Laag' }, - { id: 1, en: 'Medium', nl: 'Medium' }, - { id: 2, en: 'High', nl: 'Hoog' }, + { id: 0, en: 'Low', nl: 'Laag' }, + { id: 1, en: 'Medium', nl: 'Medium' }, + { id: 2, en: 'High', nl: 'Hoog' }, { id: 3, en: 'Very high', nl: 'Zeer hoog' } ], FlocculationSource = { @@ -223,9 +223,9 @@ ZymocideData = [ { id: 0, en: 'None', nl: 'Niet' }, - { id: 1, en: 'K1', nl: 'K1' }, - { id: 2, en: 'K2', nl: 'K2' }, - { id: 3, en: 'K28', nl: 'K28' }, + { id: 1, en: 'K1', nl: 'K1' }, + { id: 2, en: 'K2', nl: 'K2' }, + { id: 3, en: 'K28', nl: 'K28' }, { id: 4, en: 'Klus', nl: 'Klus' } ], ZymocideSource = { @@ -237,8 +237,8 @@ StarterTypeData = [ { id: 0, en: 'Stirred', nl: 'Geroerd' }, - { id: 1, en: 'Shaken', nl: 'Geschud' }, - { id: 2, en: 'Simple', nl: 'Simpel' } + { id: 1, en: 'Shaken', nl: 'Geschud' }, + { id: 2, en: 'Simple', nl: 'Simpel' } ], StarterTypeSource = { localdata: StarterTypeData, @@ -248,13 +248,13 @@ StarterTypeAdapter = new $.jqx.dataAdapter(StarterTypeSource), MiscTypeData = [ - { id: 0, en: 'Spice', nl: 'Specerij' }, - { id: 1, en: 'Herb', nl: 'Kruid' }, - { id: 2, en: 'Flavor', nl: 'Smaakstof' }, - { id: 3, en: 'Fining', nl: 'Klaringsmiddel' }, - { id: 4, en: 'Water agent', nl: 'Brouwzout' }, + { id: 0, en: 'Spice', nl: 'Specerij' }, + { id: 1, en: 'Herb', nl: 'Kruid' }, + { id: 2, en: 'Flavor', nl: 'Smaakstof' }, + { id: 3, en: 'Fining', nl: 'Klaringsmiddel' }, + { id: 4, en: 'Water agent', nl: 'Brouwzout' }, { id: 5, en: 'Yeast nutrient', nl: 'Gistvoeding' }, - { id: 6, en: 'Other', nl: 'Anders' } + { id: 6, en: 'Other', nl: 'Anders' } ], MiscTypeSource = { localdata: MiscTypeData, @@ -264,12 +264,12 @@ MiscTypeAdapter = new $.jqx.dataAdapter(MiscTypeSource), MiscUseData = [ - { id: 0, en: 'Starter', nl: 'Starter' }, - { id: 1, en: 'Mash', nl: 'Maischen' }, - { id: 2, en: 'Boil', nl: 'Koken' }, - { id: 3, en: 'Primary', nl: 'Hoofdvergisting' }, + { id: 0, en: 'Starter', nl: 'Starter' }, + { id: 1, en: 'Mash', nl: 'Maischen' }, + { id: 2, en: 'Boil', nl: 'Koken' }, + { id: 3, en: 'Primary', nl: 'Hoofdvergisting' }, { id: 4, en: 'Secondary', nl: 'Nagisting/lagering' }, - { id: 5, en: 'Bottling', nl: 'Bottelen' } + { id: 5, en: 'Bottling', nl: 'Bottelen' } ], MiscUseSource = { localdata: MiscUseData, @@ -280,8 +280,8 @@ StyleTypeData = [ { id: 0, en: 'Lager', nl: 'Ondergistend bier' }, - { id: 1, en: 'Ale', nl: 'Bovengistend bier' }, - { id: 2, en: 'Mead', nl: 'Mede' }, + { id: 1, en: 'Ale', nl: 'Bovengistend bier' }, + { id: 2, en: 'Mead', nl: 'Mede' }, { id: 3, en: 'Wheat', nl: 'Tarwebier' }, { id: 4, en: 'Mixed', nl: 'Gemengd' }, { id: 5, en: 'Cider', nl: 'Cider' } @@ -294,9 +294,9 @@ StyleTypeAdapter = new $.jqx.dataAdapter(StyleTypeSource), MashStepTypeData = [ - { id: 0, en: 'Infusion', nl: 'Infusie' }, + { id: 0, en: 'Infusion', nl: 'Infusie' }, { id: 1, en: 'Temperature', nl: 'Verwarming' }, - { id: 2, en: 'Decoction', nl: 'Decoctie' } + { id: 2, en: 'Decoction', nl: 'Decoctie' } ], MashStepTypeSource = { localdata: MashStepTypeData, @@ -306,9 +306,9 @@ MashStepTypeAdapter = new $.jqx.dataAdapter(MashStepTypeSource), RecipeTypeData = [ - { id: 0, en: 'Extract', nl: 'Extract' }, + { id: 0, en: 'Extract', nl: 'Extract' }, { id: 1, en: 'Partial Mash', nl: 'Deelmaisch' }, - { id: 2, en: 'All Grain', nl: 'Mout' } + { id: 2, en: 'All Grain', nl: 'Mout' } ], RecipeTypeSource = { localdata: RecipeTypeData, @@ -319,11 +319,8 @@ IBUmethodData = [ { id: 0, en: 'Tinseth', nl: 'Tinseth' }, - { id: 1, en: 'Rager', nl: 'Rager' }, + { id: 1, en: 'Rager', nl: 'Rager' }, { id: 2, en: 'Daniels', nl: 'Daniels' } -// { id: 3, en: 'Garetz', nl: 'Garetz' }, // Not yet supported. -// { id: 4, en: 'Mosher', nl: 'Mosher' }, -// { id: 5, en: 'Noonan', nl: 'Noonan' } ], IBUmethodSource = { localdata: IBUmethodData, @@ -333,11 +330,11 @@ IBUmethodAdapter = new $.jqx.dataAdapter(IBUmethodSource), ColorMethodData = [ - { id: 0, en: 'Morey', nl: 'Morey' }, - { id: 1, en: 'Mosher', nl: 'Mosher' }, - { id: 2, en: 'Daniels', nl: 'Daniels' }, + { id: 0, en: 'Morey', nl: 'Morey' }, + { id: 1, en: 'Mosher', nl: 'Mosher' }, + { id: 2, en: 'Daniels', nl: 'Daniels' }, { id: 3, en: 'Halberstadt', nl: 'Halberstadt' }, - { id: 4, en: 'Naudts', nl: 'Naudts' } + { id: 4, en: 'Naudts', nl: 'Naudts' } ], ColorMethodSource = { localdata: ColorMethodData, @@ -347,11 +344,11 @@ ColorMethodAdapter = new $.jqx.dataAdapter(ColorMethodSource), CoolingTypeData = [ - { id: 0, en: '-', nl: '-' }, - { id: 1, en: 'Emersion chiller', nl: 'Dompelkoeler' }, + { id: 0, en: '-', nl: '-' }, + { id: 1, en: 'Emersion chiller', nl: 'Dompelkoeler' }, { id: 2, en: 'Counterflow chiller', nl: 'Tegenstroomkoeler' }, - { id: 3, en: 'Au bain marie', nl: 'Au bain marie' }, - { id: 4, en: 'Natural', nl: 'Laten afkoelen' } + { id: 3, en: 'Au bain marie', nl: 'Au bain marie' }, + { id: 4, en: 'Natural', nl: 'Laten afkoelen' } ], CoolingTypeSource = { localdata: CoolingTypeData, @@ -361,8 +358,8 @@ CoolingTypeAdapter = new $.jqx.dataAdapter(CoolingTypeSource), AerationTypeData = [ - { id: 0, en: 'None', nl: 'Geen' }, - { id: 1, en: 'Air', nl: 'Lucht' }, + { id: 0, en: 'None', nl: 'Geen' }, + { id: 1, en: 'Air', nl: 'Lucht' }, { id: 2, en: 'Oxygen', nl: 'Zuurstof' } ], AerationTypeSource = { @@ -373,10 +370,11 @@ AerationTypeAdapter = new $.jqx.dataAdapter(AerationTypeSource), AcidTypeData = [ - { id: 0, en: 'Lactic', nl: 'Melkzuur' }, - { id: 1, en: 'Hydrochloric', nl: 'Zoutzuur' }, - { id: 2, en: 'Phosphoric', nl: 'Fosforzuur' }, - { id: 3, en: 'Sulfuric', nl: 'Zwavelzuur' } + /* Note: AcidSG is for 100% use. AcidPrc is the default setting. */ + { id: 0, en: 'Lactic', nl: 'Melkzuur', pK1: 3.86, pK2: 20, pK3: 20, MolWt: 90.08, AcidSG: 1238, AcidPrc: 80 }, + { id: 1, en: 'Hydrochloric', nl: 'Zoutzuur', pK1: -7, pK2: 20, pK3: 20, MolWt: 36.46, AcidSG: 1497, AcidPrc: 28 }, + { id: 2, en: 'Phosphoric', nl: 'Fosforzuur', pK1: 2.12, pK2: 7.20, pK3: 12.44, MolWt: 98.00, AcidSG: 1982, AcidPrc: 75 }, + { id: 3, en: 'Sulfuric', nl: 'Zwavelzuur', pK1: -1, pK2: 1.92, pK3: 20, MolWt: 98.07, AcidSG: 1884, AcidPrc: 93 } ], AcidTypeSource = { localdata: AcidTypeData, @@ -387,9 +385,9 @@ BaseTypeData = [ { id: 0, en: 'Sodiumbicarbonate', nl: 'NaHCO3' }, - { id: 1, en: 'Sodiumcarbonate', nl: 'Na2CO3' }, - { id: 2, en: 'Calciumcarbonate', nl: 'CaCO3' }, - { id: 3, en: 'Calciumhydroxide', nl: 'Ca(OH)2' } + { id: 1, en: 'Sodiumcarbonate', nl: 'Na2CO3' }, + { id: 2, en: 'Calciumcarbonate', nl: 'CaCO3' }, + { id: 3, en: 'Calciumhydroxide', nl: 'Ca(OH)2' } ], BaseTypeSource = { localdata: BaseTypeData, @@ -401,7 +399,7 @@ SpargeSourceData = [ { id: 0, en: 'Source 1', nl: 'Bron 1' }, { id: 1, en: 'Source 2', nl: 'Bron 2' }, - { id: 2, en: 'Mixed', nl: 'Gemengd' } + { id: 2, en: 'Mixed', nl: 'Gemengd' } ], SpargeSourceSource = { localdata: SpargeSourceData, @@ -418,17 +416,21 @@ Show3wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 3, readOnly: true }, Smal0dec = { inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }, Smal1dec = { inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }, +Smal2dec = { inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 2, readOnly: true }, Show0dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 0 }, Show1dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 1 }, Show2dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 2 }, Show3dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 3 }, +Show4dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 4 }, +Show5dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 5 }, SGopts = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0.990, max: 1.199, decimalDigits: 3, spinButtons: true }, Spin1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }, Spin2dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 2, spinButtons: true }, Spin3dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 3, spinButtons: true }, +Spin4dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 4, spinButtons: true }, SpinpH = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1, max: 14, decimalDigits: 1, spinButtons: true }, Spin2pH = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1, max: 14, decimalDigits: 2, spinButtons: true }, - YeastT = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 50, decimalDigits: 1, spinButtons: true }, + YeastT = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 45, decimalDigits: 1, spinButtons: true }, PosInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 0, spinButtons: true }, Perc1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 100, decimalDigits: 1, spinButtons: true }, Perc0 = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 100, decimalDigits: 0, spinButtons: true }, @@ -653,7 +655,14 @@ { name: 'cells', type: 'float' }, { name: 'inventory', type: 'float' }, { name: 'cost', type: 'float' }, - { name: 'tolerance', type: 'float' } + { name: 'tolerance', type: 'float' }, + { name: 'sta1', type: 'int' }, + { name: 'bacteria', type: 'int' }, + { name: 'harvest_top', type: 'int' }, + { name: 'harvest_time', type: 'int' }, + { name: 'pitch_temperature', type: 'float' }, + { name: 'pofpos', type: 'int' }, + { name: 'zymocide', type: 'int' } ], url: 'getyeastsources.php' }, @@ -672,6 +681,7 @@ console.log(status + ' ' + error); }, }), +yeastlablist = new $.jqx.dataAdapter(yeastInvSource, { autoBind: false, async: false, uniqueDataFields: ['laboratory'] }), // dropdownlist datasource from inventory_waters waterInvSource = { @@ -738,38 +748,7 @@ ], url: 'includes/db_profile_mash.php' }, -mashlist = new $.jqx.dataAdapter(mashProfileSource), - - - -/* - * From "Rekenen aan bier" by Hans Halberstadt. - */ -K1s = 0.384, K1a = -0.177, K1e = 0.241, K1g = 0.247, Ks = 0.1415, Ka1 = 0.058, Ka2 = 0.078, Ke = 0.174, Kg = 0.109; - -// =E2/E6+(E3/E6)*$B$24/$B$23+(E3/E6)*(E3/E6)*$B$25/$B$23+E4/E6*$B$26/$B$23+E5/E6*$B$27/$B$23 -// For Brix -function A(sugar, volume, alc, eiwit, glycerol) { - - var vol, A; - - vol = volume * 1000; - A = sugar / vol + (alc / vol) * Ka1 / Ks + (alc / vol) * (alc / vol) * Ka2 / Ks + eiwit / vol * Ke / Ks + glycerol / vol * Kg / Ks; - console.log('A(' + sugar + ',' + volume + ',' + alc + ',' + eiwit + ',' + glycerol + '):' + A); - return A; -} - -// =E2/E6+(E3/E6)*$B$20/$B$19+E4/E6*$B$21/$B$19+E5/E6*$B$22/$B$19 -// for Plato -function B(sugar, volume, alc, eiwit, glycerol) { - - var vol, B; - - vol = volume * 1000; - B = sugar / vol + (alc / vol) * K1a / K1s + eiwit / vol * K1e / K1s + glycerol / vol * K1g / K1s; - console.log('B(' + sugar + ',' + volume + ',' + alc + ',' + eiwit + ',' + glycerol + '):' + B); - return B; -} +mashlist = new $.jqx.dataAdapter(mashProfileSource); @@ -872,7 +851,7 @@ /* * Berekeningen uit https://www.hobbybrouwen.nl/forum/index.php/topic,6079.msg69464.html#msg69464 */ -function toIBU(Use, Form, SG, Volume, Amount, Boiltime, Alpha, Method) { +function toIBU(Use, Form, SG, Volume, Amount, Boiltime, Alpha, Method, Whirlpool9, Whirlpool7, Whirlpool6) { var gravity, liters, alpha, mass, time, fmoment = 1.0, pfactor = 1.0, ibu = 0, boilfactor, sgfactor, AddedAlphaAcids, Bigness_factor, BoilTime_factor, utiisation; @@ -901,13 +880,39 @@ pfactor += my_factor_cryohop / 100; } + // Ideas from Zymurgy March-April 2018. These are not exact formulas! + whirlibus = 0; + if (Use == 3 || Use == 4) { // Flameout or any whirlpool + if (Whirlpool9) { + // 20 mg/l/50 min + whirlibus += (alpha * mass * 20) / liters * (Whirlpool9 / 50); + //console.log('Whirlpool9:' + alpha * mass * 20 + ' liter:' + liters + ' time:' + Whirlpool9 + ' ibu' + (alpha * mass * 20) / liters * (Whirlpool9 / 50)); + } else { + if (Use == 3) // Flameout hops are 2 minutes in this range. + whirlibus += (alpha * mass * 20) / liters * (2 / 50); + } + if (Whirlpool7) { + // 6 mg/l/50 min + whirlibus += (alpha * mass * 6) / liters * (Whirlpool7 / 50); + //console.log('Whirlpool7:' + alpha * mass * 6 + ' liter:' + liters + ' time:' + Whirlpool7 + ' ibu' + (alpha * mass * 6) / liters * (Whirlpool7 / 50)); + } else { + if (Use == 3) // Flameout hops are 4 minutes in this range. + whirlibus += (alpha * mass * 6) / liters * (4 / 50); + } + if (Whirlpool6) { + // 2 mg/l/50 min + whirlibus += (alpha * mass * 2) / liters * (Whirlpool6 / 50); + //console.log('Whirlpool6:' + alpha * mass * 2 + ' liter:' + liters + ' time:' + Whirlpool6 + ' ibu' + (alpha * mass * 2) / liters * (Whirlpool6 / 50)); + } + } + if (Method == 0) { // Tinseth /* http://realbeer.com/hops/research.html */ AddedAlphaAcids = (alpha * mass * 1000) / liters; Bigness_factor = 1.65 * Math.pow(0.000125, gravity - 1); BoilTime_factor = ((1 - Math.exp(-0.04 * time)) / 4.15); utiisation = Bigness_factor * BoilTime_factor; - ibu = Round(utiisation * AddedAlphaAcids * fmoment * pfactor, 1); + ibu = Round(utiisation * AddedAlphaAcids * fmoment * pfactor + whirlibus, 1); } if (Method == 2) { // Daniels if (Form == 2) // Leaf @@ -918,7 +923,7 @@ sgfactor = 0; else sgfactor = (gravity - 1050) / 200; - ibu = Round(fmoment * ((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor))), 1); + ibu = Round(fmoment * ((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor))) + whirlibus, 1); } if (Method == 1) { // Rager boilfactor = fmoment * 18.11 + 13.86 * Math.tanh((time * 31.32) / 18.27); @@ -926,10 +931,11 @@ sgfactor = 0; else sgfactor = (gravity - 1050) / 200; - ibu = Round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)), 1); + ibu = Round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) + whirlibus, 1); } - //console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor); +// console.log('toIBU(' + Use + ',' + Form + ',' + SG + ',' + Volume + ',' + Amount + ',' + Boiltime + ',' + +// Alpha + ',' + Method + ',' + Whirlpool9 + ',' + Whirlpool7 + ',' + Whirlpool6 + '):' + ibu + ' fm:' + fmoment + ' pf:' + pfactor); return ibu; } @@ -1013,13 +1019,23 @@ function sg_to_plato(sg) { - return ((135.997 * sg - 630.272) * sg + 1111.14) * sg - 616.868; +// return ((135.997 * sg - 630.272) * sg + 1111.14) * sg - 616.868; + return -668.962 + (1262.45 * sg) - (776.43 * sg * sg) + (182.94 * sg * sg * sg); } function plato_to_sg(plato) { - return 1 + (plato / (258.6 - ((plato / 258.2) * 227.1))); +// return 1 + (plato / (258.6 - ((plato / 258.2) * 227.1))); + return 1.00001 + (0.0038661 * plato) + (1.3488e-5 * plato * plato) + (4.3074e-8 * plato * plato * plato); +} + + + +function calc_svg(og, fg) { + var oe = sg_to_plato(og); + var ae = sg_to_plato(fg); + return (oe - ae) / oe * 100; } @@ -1039,6 +1055,33 @@ +function brix_to_fg(OBrix, FBrix) { + // Brouwhulp, werkt zonder brix_correctie, waarom? + var FGbh = Round(1.0031 - 0.002318474 * OBrix - 0.000007775 * (OBrix * OBrix) - 0.000000034 * Math.pow(OBrix, 3) + + 0.00574 * (FBrix) + 0.00003344 * (FBrix * FBrix) + 0.000000086 * Math.pow(FBrix, 3), 4); + + // from http://seanterrill.com FGoc = old cubix, FGnc = new cubic, FGnl = new linear + var OBc = OBrix / my_brix_correction; + var FBc = FBrix / my_brix_correction; + + // Old Cubic, almost the same a BrouwHulp, different offset and with brix_correction. + var FGoc = Round(1.001843 - 0.002318474 * OBc - 0.000007775 * (OBc * OBc) - 0.000000034 * Math.pow(OBc, 3) + + 0.00574 * (FBc) + 0.00003344 * (FBc * FBc) + 0.000000086 * Math.pow(FBc, 3), 4); + + // New cubic. This looks the best to use. + var FGnc = Round(1 - 0.0044993 * (OBc) + 0.0117741 * (FBc) + + 0.000275806 * (OBc * OBc) - 0.00127169 * (FBc * FBc) - + 0.00000727999 * Math.pow(OBc, 3) + 0.0000632929 * Math.pow(FBc, 3), 4); + + // New linear, results are pretty much too high and way off for heavy beers. + var FGnl = Round(1 - 0.000856829 * OBc + 0.00349412 * FBc, 4); + + console.log('brix_to_fg(' + Round(OBrix, 2) + ', ' + FBrix + ') FGbh:' + FGbh + ' FGoc:' + FGoc + ' FGnc:' + FGnc + ' FGnl:' + FGnl); + return FGnc; +} + + + function estimate_sg(sugars, batch_size) { var plato, sg, i; @@ -1124,3 +1167,16 @@ } +function kettle_cm(vol, kettle_vol, kettle_height) { + if ((vol > 0) && (kettle_vol > 0) && (vol <= kettle_vol)) + return Round(100 * ((1 - vol / kettle_vol) * kettle_height), 1); + return 0; +} + + +function kettle_vol(cm, kettle_vol, kettle_height) { + if ((cm >= 0) && (kettle_vol > 0) && (cm <= (kettle_height * 100))) + return Round(((kettle_height - (cm / 100)) / kettle_height) * kettle_vol, 1); + return 0; +} + diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/import_ingredients-min.js --- a/www/js/import_ingredients-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -$(document).ready(function(){var a="";if(my_select=="fermentables"){a="upl_fermentables.php"}else{if(my_select=="hops"){a="upl_hops.php"}else{if(my_select=="miscs"){a="upl_miscs.php"}else{if(my_select=="yeasts"){a="upl_yeasts.php"}else{if(my_select=="styles"){a="upl_styles.php"}}}}}$("#jqxFileUpload").jqxFileUpload({width:300,browseTemplate:"success",cancelTemplate:"inverse",uploadTemplate:"primary",theme:theme,multipleFilesUpload:false,accept:"application/xml",uploadUrl:a,fileInputName:"fileToUpload"});$("#eventsPanel").jqxPanel({width:800,height:200,theme:theme});$("#jqxFileUpload").on("select",function(d){var c=d.args,e=c.file,b=c.size;$("#eventsPanel").jqxPanel("clearcontent");$("#eventsPanel").jqxPanel("append",""+d.type+": "+e+" size: "+b+"
    ")});$("#jqxFileUpload").on("uploadEnd",function(d){var c=d.args,e=c.file,b=c.response;$("#eventsPanel").jqxPanel("append",""+d.type+": ontvangen "+e+"
    "+b+"
    ")})}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/import_ingredients.js --- a/www/js/import_ingredients.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/import_ingredients.js Fri May 01 16:37:31 2020 +0200 @@ -21,49 +21,49 @@ *****************************************************************************/ -$(document).ready(function () { +$(document).ready(function() { - var url = ''; + var url = ''; - if (my_select == 'fermentables') - url = 'upl_fermentables.php'; - else if (my_select == 'hops') - url = 'upl_hops.php'; - else if (my_select == 'miscs') - url = 'upl_miscs.php'; - else if (my_select == 'yeasts') - url = 'upl_yeasts.php'; - else if (my_select == "styles") - url = 'upl_styles.php'; + if (my_select == 'fermentables') + url = 'upl_fermentables.php'; + else if (my_select == 'hops') + url = 'upl_hops.php'; + else if (my_select == 'miscs') + url = 'upl_miscs.php'; + else if (my_select == 'yeasts') + url = 'upl_yeasts.php'; + else if (my_select == 'styles') + url = 'upl_styles.php'; - $('#jqxFileUpload').jqxFileUpload({ - width: 300, - browseTemplate: 'success', - cancelTemplate: 'inverse', - uploadTemplate: 'primary', - theme: theme, - multipleFilesUpload: false, - accept: 'application/xml', - uploadUrl: url, - fileInputName: 'fileToUpload' - }); - $('#eventsPanel').jqxPanel({ - width: 800, - height: 200, - theme: theme - }); - $('#jqxFileUpload').on('select', function (event) { - var args = event.args, - fileName = args.file, - fileSize = args.size; - $('#eventsPanel').jqxPanel('clearcontent'); - $('#eventsPanel').jqxPanel('append', '' + event.type + ': ' + fileName + ' size: ' + fileSize + '
    '); - }); - $('#jqxFileUpload').on('uploadEnd', function (event) { - var args = event.args, - fileName = args.file, - serverResponce = args.response; - $('#eventsPanel').jqxPanel('append', '' + event.type + ': ontvangen ' + fileName + '
    ' + serverResponce + '
    '); - }); + $('#jqxFileUpload').jqxFileUpload({ + width: 300, + browseTemplate: 'success', + cancelTemplate: 'inverse', + uploadTemplate: 'primary', + theme: theme, + multipleFilesUpload: false, + accept: 'application/xml', + uploadUrl: url, + fileInputName: 'fileToUpload' + }); + $('#eventsPanel').jqxPanel({ + width: 800, + height: 200, + theme: theme + }); + $('#jqxFileUpload').on('select', function(event) { + var args = event.args, + fileName = args.file, + fileSize = args.size; + $('#eventsPanel').jqxPanel('clearcontent'); + $('#eventsPanel').jqxPanel('append', '' + event.type + ': ' + fileName + ' size: ' + fileSize + '
    '); + }); + $('#jqxFileUpload').on('uploadEnd', function(event) { + var args = event.args, + fileName = args.file, + serverResponce = args.response; + $('#eventsPanel').jqxPanel('append', '' + event.type + ': ontvangen ' + fileName + '
    ' + serverResponce + '
    '); + }); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_equipments-min.js --- a/www/js/inv_equipments-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function c(){var j=$("#calc_boil_volume").val(),k=parseFloat($("#boil_size").jqxNumberInput("decimal")),l=parseFloat($("#evap_rate").jqxNumberInput("decimal")),g=parseFloat($("#boil_time").jqxNumberInput("decimal")),h=parseFloat($("#top_up_kettle").jqxNumberInput("decimal")),i;if(j){i=k-(l*g/60)+h;$("#batch_size").val(i)}}$("#name").jqxTooltip({content:"The unique name of this brew equipment."});$("#notes").jqxTooltip({content:"Some notes about the equipment."});$("#tun_volume").jqxTooltip({content:"Mash TUN volume."});$("#tun_height").jqxTooltip({content:"Mash TUN height in cm."});$("#tun_weight").jqxTooltip({content:"Mash TUN weight in Kg."});$("#tun_material").jqxTooltip({content:"Mash TUN material. Needed to calculate the right strike temperature."});$("#mash_volume").jqxTooltip({content:"Liters maisch water voor de eerste maisch stap."});$("#mash_max").jqxTooltip({content:"Maximale moutstort voor deze installatie in Kg."});$("#lauter_volume").jqxTooltip({content:"Total lauter volume."});$("#lauter_height").jqxTooltip({content:"Height of the lauter TUN in cm."});$("#lauter_deadspace").jqxTooltip({content:"Volume loss in the lauter TUN."});$("#efficiency").jqxTooltip({content:"Average efficiency."});$("#kettle_volume").jqxTooltip({content:"Boil kettle volume in liters."});$("#kettle_height").jqxTooltip({content:"Boil kettle height in cm."});$("#boil_size").jqxTooltip({content:"Normal boil volume in liters"});$("#evap_rate").jqxTooltip({content:"Evaporation in liters per hour."});$("#boil_time").jqxTooltip({content:"Normal boil time in minutes."});$("#top_up_kettle").jqxTooltip({content:"Extra water added to the boil."});$("#hop_utilization").jqxTooltip({content:"100% for smaller installations, higher for large breweries."});$("#batch_size").jqxTooltip({content:"Calculated batch size, liters at end of the boil."});$("#trub_chiller_loss").jqxTooltip({content:"Standard loss in liters during transfer to the fermenter."});var b={},a="includes/db_inventory_equipments.php",e={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"boil_size",type:"float"},{name:"batch_size",type:"float"},{name:"tun_volume",type:"float"},{name:"tun_weight",type:"float"},{name:"tun_specific_heat",type:"float"},{name:"tun_material",type:"int"},{name:"tun_height",type:"float"},{name:"top_up_water",type:"float"},{name:"trub_chiller_loss",type:"float"},{name:"evap_rate",type:"float"},{name:"boil_time",type:"float"},{name:"calc_boil_volume",type:"int"},{name:"top_up_kettle",type:"float"},{name:"hop_utilization",type:"float"},{name:"notes",type:"string"},{name:"lauter_volume",type:"float"},{name:"lauter_height",type:"float"},{name:"lauter_deadspace",type:"float"},{name:"kettle_volume",type:"float"},{name:"kettle_height",type:"float"},{name:"mash_volume",type:"float"},{name:"mash_max",type:"float"},{name:"efficiency",type:"float"}],id:"record",url:a,deleterow:function(g,i){var h="delete=true&"+$.param({record:g});$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(k,j,l){i(true);location.reload(true)},error:function(j,l,k){i(false)}})},addrow:function(h,k,g,j){var i="insert=true&"+$.param(k);$.ajax({dataType:"json",url:a,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})},updaterow:function(g,j,i){var h="update=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})}},f=new $.jqx.dataAdapter(e),d=-1;$("#name").jqxInput({theme:theme,width:250,height:23});$("#notes").jqxInput({theme:theme,width:640,height:100});$("#boil_size").jqxNumberInput(Spin1dec);$("#batch_size").jqxNumberInput(Spin2dec);$("#batch_size").jqxNumberInput({spinButtonsStep:0.5});$("#tun_volume").jqxNumberInput(Spin1dec);$("#tun_weight").jqxNumberInput(Spin2dec);$("#tun_specific_heat").jqxNumberInput({inputMode:"simple",readOnly:true,theme:theme,width:70,height:23,decimalDigits:3});$("#tun_material").jqxDropDownList({theme:theme,source:MaterialAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#tun_height").jqxNumberInput(Spin1dec);$("#top_up_water").jqxNumberInput(Spin1dec);$("#trub_chiller_loss").jqxNumberInput(Spin1dec);$("#evap_rate").jqxNumberInput(Spin2dec);$("#boil_time").jqxNumberInput(PosInt);$("#boil_time").jqxNumberInput({max:1440});$("#calc_boil_volume").jqxCheckBox({theme:theme,width:120,height:23});$("#calc_boil_volume").on("checked",function(g){$("#batch_size").jqxNumberInput({readOnly:true,width:90,spinButtons:false})});$("#calc_boil_volume").on("unchecked",function(g){$("#batch_size").jqxNumberInput({readOnly:false,width:110,spinButtons:true})});$("#top_up_kettle").jqxNumberInput(Spin1dec);$("#hop_utilization").jqxNumberInput(Perc0);$("#hop_utilization").jqxNumberInput({Max:200});$("#lauter_volume").jqxNumberInput(Spin1dec);$("#lauter_height").jqxNumberInput(Spin1dec);$("#lauter_deadspace").jqxNumberInput(Spin1dec);$("#kettle_volume").jqxNumberInput(Spin1dec);$("#kettle_height").jqxNumberInput(Spin1dec);$("#mash_volume").jqxNumberInput(Spin1dec);$("#mash_max").jqxNumberInput(Spin1dec);$("#efficiency").jqxNumberInput(Perc1dec);$("#jqxgrid").jqxGrid({width:1280,height:630,source:f,theme:theme,showstatusbar:true,renderstatusbar:function(i){var h,g=$("
    ");h=$("
    Nieuw
    ");g.append(h);i.append(g);h.jqxButton({theme:theme,width:90,height:20});h.click(function(j){d=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("Nieuwe brouwset");$("#boil_size").val(18);$("#batch_size").val(15.3);$("#tun_volume").val(20);$("#tun_weight").val(2);$("#tun_specific_heat").val(0.11);$("#tun_material").val(0);$("#tun_height").val(20);$("#top_up_water").val(0);$("#trub_chiller_loss").val(0.5);$("#evap_rate").val(1.8);$("#boil_time").val(90);$("#calc_boil_volume").val(1);$("#top_up_kettle").val(0);$("#hop_utilization").val(100);$("#notes").val("");$("#lauter_volume").val(20);$("#lauter_height").val(20);$("#lauter_deadspace").val(0.5);$("#kettle_volume").val(20);$("#kettle_height").val(20);$("#mash_volume").val(18);$("#mash_max").val(6);$("#efficiency").val(75);$("#popupWindow").jqxWindow("open")})},filterable:false,ready:function(){$("#boil_size").on("change",function(g){c()});$("#evap_rate").on("change",function(g){c()});$("#boil_time").on("change",function(g){c()});$("#top_up_kettle").on("change",function(g){c()});$("#calc_boil_volume").on("change",function(g){c()});$("#tun_material").on("change",function(g){b.tun_specific_heat=MaterialData[g.args.index].sh;$("#tun_specific_heat").val(b.tun_specific_heat)})},columns:[{text:"Installatie naam",datafield:"name",width:200},{text:"Kook volume",datafield:"boil_size",width:110,align:"right",cellsalign:"right",cellsformat:"f1"},{text:"Batch volume",datafield:"batch_size",width:110,align:"right",cellsalign:"right",cellsformat:"f1"},{text:"Opmerkingen",datafield:"notes"},{text:"",datafield:"Edit",width:100,align:"center",columntype:"button",cellsrenderer:function(){return"Wijzig"},buttonclick:function(g){d=g;$("#popupWindow").jqxWindow({position:{x:110,y:30}});b=$("#jqxgrid").jqxGrid("getrowdata",d);$("#name").val(b.name);$("#boil_size").val(b.boil_size);$("#batch_size").val(b.batch_size);$("#tun_volume").val(b.tun_volume);$("#tun_weight").val(b.tun_weight);$("#tun_specific_heat").val(b.tun_specific_heat);$("#tun_material").val(b.tun_material);$("#tun_height").val(b.tun_height);$("#top_up_water").val(b.top_up_water);$("#trub_chiller_loss").val(b.trub_chiller_loss);$("#evap_rate").val(b.evap_rate);$("#boil_time").val(b.boil_time);$("#calc_boil_volume").val(b.calc_boil_volume);$("#top_up_kettle").val(b.top_up_kettle);$("#hop_utilization").val(b.hop_utilization);$("#notes").val(b.notes);$("#lauter_volume").val(b.lauter_volume);$("#lauter_height").val(b.lauter_height);$("#lauter_deadspace").val(b.lauter_deadspace);$("#kettle_volume").val(b.kettle_volume);$("#kettle_height").val(b.kettle_height);$("#mash_volume").val(b.mash_volume);$("#mash_max").val(b.mash_max);$("#efficiency").val(b.efficiency);$("#popupWindow").jqxWindow("open")}}]});$("#popupWindow").jqxWindow({width:1050,height:600,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(d>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var g=$("#jqxgrid").jqxGrid("getrowid",d);$("#jqxgrid").jqxGrid("deleterow",g)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var h,g=-1;if(d>=0){g=$("#jqxgrid").jqxGrid("getrowid",d)}h={record:g,name:$("#name").val(),boil_size:parseFloat($("#boil_size").jqxNumberInput("decimal")),batch_size:parseFloat($("#batch_size").jqxNumberInput("decimal")),tun_volume:parseFloat($("#tun_volume").jqxNumberInput("decimal")),tun_weight:parseFloat($("#tun_weight").jqxNumberInput("decimal")),tun_specific_heat:parseFloat($("#tun_specific_heat").jqxNumberInput("decimal")),tun_material:$("#tun_material").val(),tun_height:parseFloat($("#tun_height").jqxNumberInput("decimal")),top_up_water:parseFloat($("#top_up_water").jqxNumberInput("decimal")),trub_chiller_loss:parseFloat($("#trub_chiller_loss").jqxNumberInput("decimal")),evap_rate:parseFloat($("#evap_rate").jqxNumberInput("decimal")),boil_time:parseFloat($("#boil_time").jqxNumberInput("decimal")),calc_boil_volume:$("#calc_boil_volume").val(),top_up_kettle:parseFloat($("#top_up_kettle").jqxNumberInput("decimal")),hop_utilization:parseFloat($("#hop_utilization").jqxNumberInput("decimal")),notes:$("#notes").val(),lauter_volume:parseFloat($("#lauter_volume").jqxNumberInput("decimal")),lauter_height:parseFloat($("#lauter_height").jqxNumberInput("decimal")),lauter_deadspace:parseFloat($("#lauter_deadspace").jqxNumberInput("decimal")),kettle_volume:parseFloat($("#kettle_volume").jqxNumberInput("decimal")),kettle_height:parseFloat($("#kettle_height").jqxNumberInput("decimal")),mash_volume:parseFloat($("#mash_volume").jqxNumberInput("decimal")),mash_max:parseFloat($("#mash_max").jqxNumberInput("decimal")),efficiency:parseFloat($("#efficiency").jqxNumberInput("decimal"))};if(d>=0){$("#jqxgrid").jqxGrid("updaterow",g,h)}else{$("#jqxgrid").jqxGrid("addrow",null,h)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_equipments.js --- a/www/js/inv_equipments.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_equipments.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (C) 2014-2019 - * + * Copyright (C) 2014-2020 + * * Michiel Broek * * This file is part of BrewCloud @@ -14,7 +14,7 @@ * 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 ThermFerm; see the file COPYING. If not, write to the Free * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. @@ -22,366 +22,374 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } -$(document).ready(function () { +$(document).ready(function() { - function calcBatchVolume() { - var calc = $("#calc_boil_volume").val(), - boil_size = parseFloat($("#boil_size").jqxNumberInput('decimal')), - evap_rate = parseFloat($("#evap_rate").jqxNumberInput('decimal')), - boil_time = parseFloat($("#boil_time").jqxNumberInput('decimal')), - top_up = parseFloat($("#top_up_kettle").jqxNumberInput('decimal')), - batch; - - if (calc) { // If checked, calculate the batch size. - batch = boil_size - (evap_rate * boil_time / 60) + top_up; - $("#batch_size").val(batch); - } - } + function calcBatchVolume() { + var calc = $('#calc_boil_volume').val(), + boil_size = parseFloat($('#boil_size').jqxNumberInput('decimal')), + evap_rate = parseFloat($('#evap_rate').jqxNumberInput('decimal')), + boil_time = parseFloat($('#boil_time').jqxNumberInput('decimal')), + top_up = parseFloat($('#top_up_kettle').jqxNumberInput('decimal')), + batch; + + if (calc) { // If checked, calculate the batch size. + batch = boil_size - (evap_rate * boil_time / 60) + top_up; + $('#batch_size').val(batch); + } + } - // tooltips - $("#name").jqxTooltip({ content: 'The unique name of this brew equipment.' }); - $("#notes").jqxTooltip({ content: 'Some notes about the equipment.' }); - $("#tun_volume").jqxTooltip({ content: 'Mash TUN volume.' }); - $("#tun_height").jqxTooltip({ content: 'Mash TUN height in cm.' }); - $("#tun_weight").jqxTooltip({ content: 'Mash TUN weight in Kg.' }); - $("#tun_material").jqxTooltip({ content: 'Mash TUN material. Needed to calculate the right strike temperature.' }); - $("#mash_volume").jqxTooltip({ content: 'Liters maisch water voor de eerste maisch stap.' }); - $("#mash_max").jqxTooltip({ content: 'Maximale moutstort voor deze installatie in Kg.' }); - $("#lauter_volume").jqxTooltip({ content: 'Total lauter volume.' }); - $("#lauter_height").jqxTooltip({ content: 'Height of the lauter TUN in cm.' }); - $("#lauter_deadspace").jqxTooltip({ content: 'Volume loss in the lauter TUN.' }); - $("#efficiency").jqxTooltip({ content: 'Average efficiency.' }); - $("#kettle_volume").jqxTooltip({ content: 'Boil kettle volume in liters.' }); - $("#kettle_height").jqxTooltip({ content: 'Boil kettle height in cm.' }); - $("#boil_size").jqxTooltip({ content: 'Normal boil volume in liters' }); - $("#evap_rate").jqxTooltip({ content: 'Evaporation in liters per hour.' }); - $("#boil_time").jqxTooltip({ content: 'Normal boil time in minutes.' }); - $("#top_up_kettle").jqxTooltip({ content: 'Extra water added to the boil.' }); - $("#hop_utilization").jqxTooltip({ content: '100% for smaller installations, higher for large breweries.' }); - $("#batch_size").jqxTooltip({ content: 'Calculated batch size, liters at end of the boil.' }); - $("#trub_chiller_loss").jqxTooltip({ content: 'Standard loss in liters during transfer to the fermenter.' }); + // tooltips + $('#name').jqxTooltip({ content: 'The unique name of this brew equipment.' }); + $('#notes').jqxTooltip({ content: 'Some notes about the equipment.' }); + $('#tun_volume').jqxTooltip({ content: 'Mash TUN volume.' }); + $('#tun_height').jqxTooltip({ content: 'Mash TUN height in cm.' }); + $('#tun_weight').jqxTooltip({ content: 'Mash TUN weight in Kg.' }); + $('#tun_material').jqxTooltip({ content: 'Mash TUN material. Needed to calculate the right strike temperature.' }); + $('#mash_volume').jqxTooltip({ content: 'Liters maisch water voor de eerste maisch stap.' }); + $('#mash_max').jqxTooltip({ content: 'Maximale moutstort voor deze installatie in Kg.' }); + $('#lauter_volume').jqxTooltip({ content: 'Total lauter volume.' }); + $('#lauter_height').jqxTooltip({ content: 'Height of the lauter TUN in cm.' }); + $('#lauter_deadspace').jqxTooltip({ content: 'Volume loss in the lauter TUN.' }); + $('#efficiency').jqxTooltip({ content: 'Average efficiency.' }); + $('#kettle_volume').jqxTooltip({ content: 'Boil kettle volume in liters.' }); + $('#kettle_height').jqxTooltip({ content: 'Boil kettle height in cm.' }); + $('#boil_size').jqxTooltip({ content: 'Normal boil volume in liters' }); + $('#evap_rate').jqxTooltip({ content: 'Evaporation in liters per hour.' }); + $('#boil_time').jqxTooltip({ content: 'Normal boil time in minutes.' }); + $('#top_up_kettle').jqxTooltip({ content: 'Extra water added to the boil.' }); + $('#hop_utilization').jqxTooltip({ content: '100% for smaller installations, higher for large breweries.' }); + $('#batch_size').jqxTooltip({ content: 'Calculated batch size, liters at end of the boil.' }); + $('#trub_chiller_loss').jqxTooltip({ content: 'Standard loss in liters during transfer to the fermenter.' }); - var dataRecord = {}, - url = 'includes/db_inventory_equipments.php', - // prepare the data - source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'boil_size', type: 'float' }, - { name: 'batch_size', type: 'float' }, - { name: 'tun_volume', type: 'float' }, - { name: 'tun_weight', type: 'float' }, - { name: 'tun_specific_heat', type: 'float' }, - { name: 'tun_material', type: 'int' }, - { name: 'tun_height', type: 'float' }, - { name: 'top_up_water', type: 'float' }, - { name: 'trub_chiller_loss', type: 'float' }, - { name: 'evap_rate', type: 'float' }, - { name: 'boil_time', type: 'float' }, - { name: 'calc_boil_volume', type: 'int' }, - { name: 'top_up_kettle', type: 'float' }, - { name: 'hop_utilization', type: 'float' }, - { name: 'notes', type: 'string' }, - { name: 'lauter_volume', type: 'float' }, - { name: 'lauter_height', type: 'float' }, - { name: 'lauter_deadspace', type: 'float' }, - { name: 'kettle_volume', type: 'float' }, - { name: 'kettle_height', type: 'float' }, - { name: 'mash_volume', type: 'float' }, - { name: 'mash_max', type: 'float' }, - { name: 'efficiency', type: 'float' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + var dataRecord = {}, + url = 'includes/db_inventory_equipments.php', + // prepare the data + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'boil_size', type: 'float' }, + { name: 'batch_size', type: 'float' }, + { name: 'tun_volume', type: 'float' }, + { name: 'tun_weight', type: 'float' }, + { name: 'tun_specific_heat', type: 'float' }, + { name: 'tun_material', type: 'int' }, + { name: 'tun_height', type: 'float' }, + { name: 'top_up_water', type: 'float' }, + { name: 'trub_chiller_loss', type: 'float' }, + { name: 'evap_rate', type: 'float' }, + { name: 'boil_time', type: 'float' }, + { name: 'calc_boil_volume', type: 'int' }, + { name: 'top_up_kettle', type: 'float' }, + { name: 'hop_utilization', type: 'float' }, + { name: 'notes', type: 'string' }, + { name: 'lauter_volume', type: 'float' }, + { name: 'lauter_height', type: 'float' }, + { name: 'lauter_deadspace', type: 'float' }, + { name: 'kettle_volume', type: 'float' }, + { name: 'kettle_height', type: 'float' }, + { name: 'mash_volume', type: 'float' }, + { name: 'mash_max', type: 'float' }, + { name: 'efficiency', type: 'float' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + // synchronize with the server - send delete command + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; + + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 250, height: 23 }); + $('#notes').jqxInput({ theme: theme, width: 640, height: 100 }); + $('#boil_size').jqxNumberInput(Spin1dec); + $('#batch_size').jqxNumberInput(Spin2dec); + $('#batch_size').jqxNumberInput({ spinButtonsStep: 0.5 }); + $('#tun_volume').jqxNumberInput(Spin1dec); + $('#tun_weight').jqxNumberInput(Spin2dec); + $('#tun_specific_heat').jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); + $('#tun_material').jqxDropDownList({ + theme: theme, + source: MaterialAdapter, + valueMember: 'id', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#tun_height').jqxNumberInput(Spin1dec); + $('#top_up_water').jqxNumberInput(Spin1dec); + $('#trub_chiller_loss').jqxNumberInput(Spin1dec); + $('#evap_rate').jqxNumberInput(Spin2dec); + $('#boil_time').jqxNumberInput(PosInt); + $('#boil_time').jqxNumberInput({ max: 1440 }); + $('#calc_boil_volume').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#calc_boil_volume').on('checked', function(event) { + $('#batch_size').jqxNumberInput({ readOnly: true, width: 90, spinButtons: false }); + }); + $('#calc_boil_volume').on('unchecked', function(event) { + $('#batch_size').jqxNumberInput({ readOnly: false, width: 110, spinButtons: true }); + }); + $('#top_up_kettle').jqxNumberInput(Spin1dec); + $('#hop_utilization').jqxNumberInput(Perc0); + $('#hop_utilization').jqxNumberInput({ Max: 200 }); + $('#lauter_volume').jqxNumberInput(Spin1dec); + $('#lauter_height').jqxNumberInput(Spin1dec); + $('#lauter_deadspace').jqxNumberInput(Spin1dec); + $('#kettle_volume').jqxNumberInput(Spin1dec); + $('#kettle_height').jqxNumberInput(Spin1dec); + $('#mash_volume').jqxNumberInput(Spin1dec); + $('#mash_max').jqxNumberInput(Spin1dec); + $('#efficiency').jqxNumberInput(Perc1dec); - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 250, height: 23 }); - $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); - $("#boil_size").jqxNumberInput( Spin1dec ); - $("#batch_size").jqxNumberInput( Spin2dec ); - $("#batch_size").jqxNumberInput({ spinButtonsStep: 0.5 }); - $("#tun_volume").jqxNumberInput( Spin1dec ); - $("#tun_weight").jqxNumberInput( Spin2dec ); - $("#tun_specific_heat").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); - $("#tun_material").jqxDropDownList({ - theme: theme, - source: MaterialAdapter, - valueMember: 'id', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#tun_height").jqxNumberInput( Spin1dec ); - $("#top_up_water").jqxNumberInput( Spin1dec ); - $("#trub_chiller_loss").jqxNumberInput( Spin1dec ); - $("#evap_rate").jqxNumberInput( Spin2dec ); - $("#boil_time").jqxNumberInput( PosInt ); - $("#boil_time").jqxNumberInput({ max: 1440 }); - $("#calc_boil_volume").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#calc_boil_volume").on('checked', function (event) { - $("#batch_size").jqxNumberInput({ readOnly: true, width: 90, spinButtons: false }); - }); - $("#calc_boil_volume").on('unchecked', function (event) { - $("#batch_size").jqxNumberInput({ readOnly: false, width: 110, spinButtons: true }); - }); - $("#top_up_kettle").jqxNumberInput( Spin1dec ); - $("#hop_utilization").jqxNumberInput( Perc0 ); - $("#hop_utilization").jqxNumberInput({ Max: 200 }); - $("#lauter_volume").jqxNumberInput( Spin1dec ); - $("#lauter_height").jqxNumberInput( Spin1dec ); - $("#lauter_deadspace").jqxNumberInput( Spin1dec ); - $("#kettle_volume").jqxNumberInput( Spin1dec ); - $("#kettle_height").jqxNumberInput( Spin1dec ); - $("#mash_volume").jqxNumberInput( Spin1dec ); - $("#mash_max").jqxNumberInput( Spin1dec ); - $("#efficiency").jqxNumberInput( Perc1dec ); - - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function (statusbar) { - var addButton, container = $("
    "); - addButton = $("
    Nieuw
    "); - container.append(addButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val('Nieuwe brouwset'); - $("#boil_size").val(18); - $("#batch_size").val(15.3); - $("#tun_volume").val(20); - $("#tun_weight").val(2); - $("#tun_specific_heat").val(0.11); - $("#tun_material").val(0); - $("#tun_height").val(20); - $("#top_up_water").val(0); - $("#trub_chiller_loss").val(0.5); - $("#evap_rate").val(1.8); - $("#boil_time").val(90); - $("#calc_boil_volume").val(1); - $("#top_up_kettle").val(0); - $("#hop_utilization").val(100); - $("#notes").val(''); - $("#lauter_volume").val(20); - $("#lauter_height").val(20); - $("#lauter_deadspace").val(0.5); - $("#kettle_volume").val(20); - $("#kettle_height").val(20); - $("#mash_volume").val(18); - $("#mash_max").val(6); - $("#efficiency").val(75); - $("#popupWindow").jqxWindow('open'); - }); - }, - filterable: false, - ready: function() { - $('#boil_size').on('change', function (event) { calcBatchVolume(); }); - $('#evap_rate').on('change', function (event) { calcBatchVolume(); }); - $('#boil_time').on('change', function (event) { calcBatchVolume(); }); - $('#top_up_kettle').on('change', function (event) { calcBatchVolume(); }); - $("#calc_boil_volume").on('change', function (event) { calcBatchVolume(); }); - $('#tun_material').on('change', function (event) { - dataRecord.tun_specific_heat = MaterialData[event.args.index].sh; - $("#tun_specific_heat").val(dataRecord.tun_specific_heat); - }); - }, - columns: [ - { text: 'Installatie naam', datafield: 'name', width: 200 }, - { text: 'Kook volume', datafield: 'boil_size', width: 110, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'Batch volume', datafield: 'batch_size', width: 110, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'Opmerkingen', datafield: 'notes' }, - { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - // get the clicked row's data and initialize the input fields. - dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#boil_size").val(dataRecord.boil_size); - $("#batch_size").val(dataRecord.batch_size); - $("#tun_volume").val(dataRecord.tun_volume); - $("#tun_weight").val(dataRecord.tun_weight); - $("#tun_specific_heat").val(dataRecord.tun_specific_heat); - $("#tun_material").val(dataRecord.tun_material); - $("#tun_height").val(dataRecord.tun_height); - $("#top_up_water").val(dataRecord.top_up_water); - $("#trub_chiller_loss").val(dataRecord.trub_chiller_loss); - $("#evap_rate").val(dataRecord.evap_rate); - $("#boil_time").val(dataRecord.boil_time); - $("#calc_boil_volume").val(dataRecord.calc_boil_volume); - $("#top_up_kettle").val(dataRecord.top_up_kettle); - $("#hop_utilization").val(dataRecord.hop_utilization); - $("#notes").val(dataRecord.notes); - $("#lauter_volume").val(dataRecord.lauter_volume); - $("#lauter_height").val(dataRecord.lauter_height); - $("#lauter_deadspace").val(dataRecord.lauter_deadspace); - $("#kettle_volume").val(dataRecord.kettle_volume); - $("#kettle_height").val(dataRecord.kettle_height); - $("#mash_volume").val(dataRecord.mash_volume); - $("#mash_max").val(dataRecord.mash_max); - $("#efficiency").val(dataRecord.efficiency); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 600, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function () { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function () { - var row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - row = { - record: rowID, - name: $("#name").val(), - boil_size: parseFloat($("#boil_size").jqxNumberInput('decimal')), - batch_size: parseFloat($("#batch_size").jqxNumberInput('decimal')), - tun_volume: parseFloat($("#tun_volume").jqxNumberInput('decimal')), - tun_weight: parseFloat($("#tun_weight").jqxNumberInput('decimal')), - tun_specific_heat: parseFloat($("#tun_specific_heat").jqxNumberInput('decimal')), - tun_material: $("#tun_material").val(), - tun_height: parseFloat($("#tun_height").jqxNumberInput('decimal')), - top_up_water: parseFloat($("#top_up_water").jqxNumberInput('decimal')), - trub_chiller_loss: parseFloat($("#trub_chiller_loss").jqxNumberInput('decimal')), - evap_rate: parseFloat($("#evap_rate").jqxNumberInput('decimal')), - boil_time: parseFloat($("#boil_time").jqxNumberInput('decimal')), - calc_boil_volume: $("#calc_boil_volume").val(), - top_up_kettle: parseFloat($("#top_up_kettle").jqxNumberInput('decimal')), - hop_utilization: parseFloat($("#hop_utilization").jqxNumberInput('decimal')), - notes: $("#notes").val(), - lauter_volume: parseFloat($("#lauter_volume").jqxNumberInput('decimal')), - lauter_height: parseFloat($("#lauter_height").jqxNumberInput('decimal')), - lauter_deadspace: parseFloat($("#lauter_deadspace").jqxNumberInput('decimal')), - kettle_volume: parseFloat($("#kettle_volume").jqxNumberInput('decimal')), - kettle_height: parseFloat($("#kettle_height").jqxNumberInput('decimal')), - mash_volume: parseFloat($("#mash_volume").jqxNumberInput('decimal')), - mash_max: parseFloat($("#mash_max").jqxNumberInput('decimal')), - efficiency: parseFloat($("#efficiency").jqxNumberInput('decimal')) - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var addButton, container = $('
    '); + addButton = $('
    Nieuw
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val('Nieuwe brouwset'); + $('#boil_size').val(18); + $('#batch_size').val(15.3); + $('#tun_volume').val(20); + $('#tun_weight').val(2); + $('#tun_specific_heat').val(0.11); + $('#tun_material').val(0); + $('#tun_height').val(20); + $('#top_up_water').val(0); + $('#trub_chiller_loss').val(0.5); + $('#evap_rate').val(1.8); + $('#boil_time').val(90); + $('#calc_boil_volume').val(1); + $('#top_up_kettle').val(0); + $('#hop_utilization').val(100); + $('#notes').val(''); + $('#lauter_volume').val(20); + $('#lauter_height').val(20); + $('#lauter_deadspace').val(0.5); + $('#kettle_volume').val(20); + $('#kettle_height').val(20); + $('#mash_volume').val(18); + $('#mash_max').val(6); + $('#efficiency').val(75); + $('#popupWindow').jqxWindow('open'); + }); + expButton.click(function(event) { + window.open('export_equipments.php'); + }); + }, + filterable: false, + ready: function() { + $('#boil_size').on('change', function(event) { calcBatchVolume(); }); + $('#evap_rate').on('change', function(event) { calcBatchVolume(); }); + $('#boil_time').on('change', function(event) { calcBatchVolume(); }); + $('#top_up_kettle').on('change', function(event) { calcBatchVolume(); }); + $('#calc_boil_volume').on('change', function(event) { calcBatchVolume(); }); + $('#tun_material').on('select', function(event) { + dataRecord.tun_specific_heat = MaterialData[event.args.index].sh; + $('#tun_specific_heat').val(dataRecord.tun_specific_heat); + }); + }, + columns: [ + { text: 'Installatie naam', datafield: 'name', width: 200 }, + { text: 'Kook volume', datafield: 'boil_size', width: 110, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, + { text: 'Batch volume', datafield: 'batch_size', width: 110, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, + { text: 'Opmerkingen', datafield: 'notes' }, + { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + // get the clicked row's data and initialize the input fields. + dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#boil_size').val(dataRecord.boil_size); + $('#batch_size').val(dataRecord.batch_size); + $('#tun_volume').val(dataRecord.tun_volume); + $('#tun_weight').val(dataRecord.tun_weight); + $('#tun_specific_heat').val(dataRecord.tun_specific_heat); + $('#tun_material').val(dataRecord.tun_material); + $('#tun_height').val(dataRecord.tun_height); + $('#top_up_water').val(dataRecord.top_up_water); + $('#trub_chiller_loss').val(dataRecord.trub_chiller_loss); + $('#evap_rate').val(dataRecord.evap_rate); + $('#boil_time').val(dataRecord.boil_time); + $('#calc_boil_volume').val(dataRecord.calc_boil_volume); + $('#top_up_kettle').val(dataRecord.top_up_kettle); + $('#hop_utilization').val(dataRecord.hop_utilization); + $('#notes').val(dataRecord.notes); + $('#lauter_volume').val(dataRecord.lauter_volume); + $('#lauter_height').val(dataRecord.lauter_height); + $('#lauter_deadspace').val(dataRecord.lauter_deadspace); + $('#kettle_volume').val(dataRecord.kettle_volume); + $('#kettle_height').val(dataRecord.kettle_height); + $('#mash_volume').val(dataRecord.mash_volume); + $('#mash_max').val(dataRecord.mash_max); + $('#efficiency').val(dataRecord.efficiency); + // show the popup window. + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 600, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + row = { + record: rowID, + name: $('#name').val(), + boil_size: parseFloat($('#boil_size').jqxNumberInput('decimal')), + batch_size: parseFloat($('#batch_size').jqxNumberInput('decimal')), + tun_volume: parseFloat($('#tun_volume').jqxNumberInput('decimal')), + tun_weight: parseFloat($('#tun_weight').jqxNumberInput('decimal')), + tun_specific_heat: parseFloat($('#tun_specific_heat').jqxNumberInput('decimal')), + tun_material: $('#tun_material').val(), + tun_height: parseFloat($('#tun_height').jqxNumberInput('decimal')), + top_up_water: parseFloat($('#top_up_water').jqxNumberInput('decimal')), + trub_chiller_loss: parseFloat($('#trub_chiller_loss').jqxNumberInput('decimal')), + evap_rate: parseFloat($('#evap_rate').jqxNumberInput('decimal')), + boil_time: parseFloat($('#boil_time').jqxNumberInput('decimal')), + calc_boil_volume: $('#calc_boil_volume').val(), + top_up_kettle: parseFloat($('#top_up_kettle').jqxNumberInput('decimal')), + hop_utilization: parseFloat($('#hop_utilization').jqxNumberInput('decimal')), + notes: $('#notes').val(), + lauter_volume: parseFloat($('#lauter_volume').jqxNumberInput('decimal')), + lauter_height: parseFloat($('#lauter_height').jqxNumberInput('decimal')), + lauter_deadspace: parseFloat($('#lauter_deadspace').jqxNumberInput('decimal')), + kettle_volume: parseFloat($('#kettle_volume').jqxNumberInput('decimal')), + kettle_height: parseFloat($('#kettle_height').jqxNumberInput('decimal')), + mash_volume: parseFloat($('#mash_volume').jqxNumberInput('decimal')), + mash_max: parseFloat($('#mash_max').jqxNumberInput('decimal')), + efficiency: parseFloat($('#efficiency').jqxNumberInput('decimal')) + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_fermentables-min.js --- a/www/js/inv_fermentables-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function d(h,g){$("#totval").val(h*g)}var b={},a="includes/db_inventory_fermentables.php",e={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"string"},{name:"yield",type:"float"},{name:"color",type:"float"},{name:"add_after_boil",type:"int"},{name:"origin",type:"string"},{name:"supplier",type:"string"},{name:"notes",type:"string"},{name:"coarse_fine_diff",type:"float"},{name:"moisture",type:"float"},{name:"diastatic_power",type:"float"},{name:"protein",type:"float"},{name:"dissolved_protein",type:"float"},{name:"max_in_batch",type:"float"},{name:"recommend_mash",type:"int"},{name:"added",type:"string"},{name:"always_on_stock",type:"int"},{name:"di_ph",type:"float"},{name:"acid_to_ph_57",type:"float"},{name:"graintype",type:"string"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"production_date",type:"string"},{name:"tht_date",type:"string"}],id:"record",url:a,deleterow:function(g,i){var h="delete=true&"+$.param({record:g});$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(k,j,l){i(true);location.reload(true)},error:function(j,l,k){i(false)}})},addrow:function(h,k,g,j){var i="insert=true&"+$.param(k);$.ajax({dataType:"json",url:a,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})},updaterow:function(g,j,i){var h="update=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})}},f=new $.jqx.dataAdapter(e),c=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#type").jqxDropDownList({theme:theme,source:FermentableTypeAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#yield").jqxNumberInput(Spin1dec);$("#color").jqxNumberInput(Spin1dec);$("#add_after_boil").jqxCheckBox({theme:theme,width:120,height:23});$("#origin").jqxInput({theme:theme,width:250,height:23});$("#supplier").jqxInput({theme:theme,width:250,height:23});$("#notes").jqxInput({theme:theme,width:640,height:100});$("#coarse_fine_diff").jqxNumberInput(Spin1dec);$("#moisture").jqxNumberInput(Spin1dec);$("#diastatic_power").jqxNumberInput(PosInt);$("#protein").jqxNumberInput(Spin1dec);$("#dissolved_protein").jqxNumberInput(Spin1dec);$("#max_in_batch").jqxNumberInput(Perc1dec);$("#recommend_mash").jqxCheckBox({theme:theme,width:120,height:23});$("#added").jqxDropDownList({theme:theme,source:AddedAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#always_on_stock").jqxCheckBox({theme:theme,width:120,height:23});$("#di_ph").jqxNumberInput(Spin2pH);$("#acid_to_ph_57").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:-1000,max:1000,decimalDigits:4,spinButtons:true});$("#graintype").jqxDropDownList({theme:theme,source:GrainTypeAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#inventory").jqxNumberInput(Spin3dec);$("#production_date").jqxDateTimeInput(Dateopts);$("#cost").jqxNumberInput(Spin2dec);$("#tht_date").jqxDateTimeInput(Dateopts);$("#totval").jqxNumberInput(Show2dec);$("#jqxgrid").jqxGrid({width:1280,height:630,source:f,theme:theme,showstatusbar:true,renderstatusbar:function(i){var g,h,j;g=$("
    ");h=$("
    Nieuw
    ");j=$("
    Import
    ");g.append(h);g.append(j);i.append(g);h.jqxButton({theme:theme,width:90,height:20});j.jqxButton({theme:theme,width:90,height:20});h.click(function(k){c=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("Nieuw product");$("#type").val("Mout");$("#origin").val("");$("#supplier").val("");$("#notes").val("");$("#yield").val(80);$("#color").val(3);$("#coarse_fine_diff").val(3);$("#moisture").val(4);$("#diastatic_power").val(0);$("#protein").val(0);$("#dissolved_protein").val(0);$("#max_in_batch").val(100);$("#recommend_mash").val(1);$("#always_on_stock").val(0);$("#di_ph").val(0);$("#acid_to_ph_57").val(0);$("#graintype").val("Basismout");$("#add_after_boil").val(0);$("#added").val("Maischen");$("#inventory").val(0);$("#cost").val(0);$("#production_date").val("");$("#tht_date").val("");$("#popupWindow").jqxWindow("open")});j.click(function(k){window.location.href="import_ingredients.php?select=fermentables"})},filterable:true,filtermode:"excel",columns:[{text:"Herkomst",datafield:"origin",width:150},{text:"Producent",datafield:"supplier",width:140},{text:"Vergistbaar product",datafield:"name",menu:false},{text:"Soort",width:135,filtertype:"list",datafield:"type"},{text:"Graan type",datafield:"graintype",align:"center",cellsalign:"center",width:125},{text:"EBC",datafield:"color",width:60,align:"right",menu:false,cellsalign:"right"},{text:"Opbrengst",datafield:"yield",width:70,align:"right",menu:false,cellsalign:"right",cellsformat:"p1"},{text:"Voorraad",datafield:"inventory",width:100,align:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){if(l<1){i=f.formatNumber(l*1000,"f0")+" gr"}else{i=f.formatNumber(l,"f1")+" kg"}}return""+i+""}},{text:"",datafield:"Edit",width:100,align:"center",menu:false,columntype:"button",cellsrenderer:function(){return"Wijzig"},buttonclick:function(g){c=g;$("#popupWindow").jqxWindow({position:{x:110,y:30}});b=$("#jqxgrid").jqxGrid("getrowdata",c);$("#name").val(b.name);$("#type").val(b.type);$("#yield").val(b.yield);$("#color").val(b.color);$("#add_after_boil").val(b.add_after_boil);$("#origin").val(b.origin);$("#supplier").val(b.supplier);$("#notes").val(b.notes);$("#coarse_fine_diff").val(b.coarse_fine_diff);$("#moisture").val(b.moisture);$("#diastatic_power").val(lintner_to_kolbach(b.diastatic_power));$("#protein").val(b.protein);$("#dissolved_protein").val(b.dissolved_protein);$("#max_in_batch").val(b.max_in_batch);$("#recommend_mash").val(b.recommend_mash);$("#added").val(b.added);$("#always_on_stock").val(b.always_on_stock);$("#di_ph").val(b.di_ph);$("#acid_to_ph_57").val(b.acid_to_ph_57);$("#graintype").val(b.graintype);$("#inventory").val(b.inventory);$("#cost").val(b.cost);$("#production_date").val(b.production_date);$("#tht_date").val(b.tht_date);d(b.cost,b.inventory);$("#popupWindow").jqxWindow("open")}}]});$("#cost").on("change",function(g){b.cost=parseFloat(g.args.value);d(b.cost,b.inventory)});$("#inventory").on("change",function(g){b.inventory=parseFloat(g.args.value);d(b.cost,b.inventory)});$("#popupWindow").jqxWindow({width:1050,height:550,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(c>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var g=$("#jqxgrid").jqxGrid("getrowid",c);$("#jqxgrid").jqxGrid("deleterow",g)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Clone").jqxButton({template:"warning",width:"90px",theme:theme});$("#Clone").click(function(){var g={record:-1,name:$("#name").val()+" kopie",type:$("#type").val(),yield:parseFloat($("#yield").jqxNumberInput("decimal")),color:parseFloat($("#color").jqxNumberInput("decimal")),add_after_boil:$("#add_after_boil").val(),origin:$("#origin").val(),supplier:$("#supplier").val(),notes:$("#notes").val(),coarse_fine_diff:parseFloat($("#coarse_fine_diff").jqxNumberInput("decimal")),moisture:parseFloat($("#moisture").jqxNumberInput("decimal")),diastatic_power:kolbach_to_lintner(parseFloat($("#diastatic_power").jqxNumberInput("decimal"))),protein:parseFloat($("#protein").jqxNumberInput("decimal")),dissolved_protein:parseFloat($("#dissolved_protein").jqxNumberInput("decimal")),max_in_batch:parseFloat($("#max_in_batch").jqxNumberInput("decimal")),recommend_mash:$("#recommend_mash").val(),added:$("#added").val(),always_on_stock:$("#always_on_stock").val(),di_ph:parseFloat($("#di_ph").jqxNumberInput("decimal")),acid_to_ph_57:parseFloat($("#acid_to_ph_57").jqxNumberInput("decimal")),graintype:$("#graintype").val(),inventory:0,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:"",tht_date:""};$("#jqxgrid").jqxGrid("addrow",null,g);$("#popupWindow").jqxWindow("hide")});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var h,g=-1;if(c>=0){g=$("#jqxgrid").jqxGrid("getrowid",c)}h={record:g,name:$("#name").val(),type:$("#type").val(),yield:parseFloat($("#yield").jqxNumberInput("decimal")),color:parseFloat($("#color").jqxNumberInput("decimal")),add_after_boil:$("#add_after_boil").val(),origin:$("#origin").val(),supplier:$("#supplier").val(),notes:$("#notes").val(),coarse_fine_diff:parseFloat($("#coarse_fine_diff").jqxNumberInput("decimal")),moisture:parseFloat($("#moisture").jqxNumberInput("decimal")),diastatic_power:kolbach_to_lintner(parseFloat($("#diastatic_power").jqxNumberInput("decimal"))),protein:parseFloat($("#protein").jqxNumberInput("decimal")),dissolved_protein:parseFloat($("#dissolved_protein").jqxNumberInput("decimal")),max_in_batch:parseFloat($("#max_in_batch").jqxNumberInput("decimal")),recommend_mash:$("#recommend_mash").val(),added:$("#added").val(),always_on_stock:$("#always_on_stock").val(),di_ph:parseFloat($("#di_ph").jqxNumberInput("decimal")),acid_to_ph_57:parseFloat($("#acid_to_ph_57").jqxNumberInput("decimal")),graintype:$("#graintype").val(),inventory:parseFloat($("#inventory").jqxNumberInput("decimal")),cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:$("#production_date").val(),tht_date:$("#tht_date").val(),};if(c>=0){$("#jqxgrid").jqxGrid("updaterow",g,h)}else{$("#jqxgrid").jqxGrid("addrow",null,h)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_fermentables.js --- a/www/js/inv_fermentables.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_fermentables.js Fri May 01 16:37:31 2020 +0200 @@ -22,398 +22,404 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } -$(document).ready(function () { +$(document).ready(function() { - function calcTotal(cost, inventory) { - - $('#totval').val(cost * inventory); - } + function calcTotal(cost, inventory) { + $('#totval').val(cost * inventory); + } - var dataRecord = {}, - url = 'includes/db_inventory_fermentables.php', - // prepare the data - source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'type', type: 'string' }, - { name: 'yield', type: 'float' }, - { name: 'color', type: 'float' }, - { name: 'add_after_boil', type: 'int' }, - { name: 'origin', type: 'string' }, - { name: 'supplier', type: 'string' }, - { name: 'notes', type: 'string' }, - { name: 'coarse_fine_diff', type: 'float' }, - { name: 'moisture', type: 'float' }, - { name: 'diastatic_power', type: 'float' }, - { name: 'protein', type: 'float' }, - { name: 'dissolved_protein', type: 'float' }, - { name: 'max_in_batch', type: 'float' }, - { name: 'recommend_mash', type: 'int' }, - { name: 'added', type: 'string' }, - { name: 'always_on_stock', type: 'int' }, - { name: 'di_ph', type: 'float' }, - { name: 'acid_to_ph_57', type: 'float' }, - { name: 'graintype', type: 'string' }, - { name: 'inventory', type: 'float' }, - { name: 'cost', type: 'float' }, - { name: 'production_date', type: 'string' }, - { name: 'tht_date', type: 'string' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + var dataRecord = {}, + url = 'includes/db_inventory_fermentables.php', + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'type', type: 'string' }, + { name: 'yield', type: 'float' }, + { name: 'color', type: 'float' }, + { name: 'add_after_boil', type: 'int' }, + { name: 'origin', type: 'string' }, + { name: 'supplier', type: 'string' }, + { name: 'notes', type: 'string' }, + { name: 'coarse_fine_diff', type: 'float' }, + { name: 'moisture', type: 'float' }, + { name: 'diastatic_power', type: 'float' }, + { name: 'protein', type: 'float' }, + { name: 'dissolved_protein', type: 'float' }, + { name: 'max_in_batch', type: 'float' }, + { name: 'recommend_mash', type: 'int' }, + { name: 'added', type: 'string' }, + { name: 'always_on_stock', type: 'int' }, + { name: 'di_ph', type: 'float' }, + { name: 'acid_to_ph_57', type: 'float' }, + { name: 'graintype', type: 'string' }, + { name: 'inventory', type: 'float' }, + { name: 'cost', type: 'float' }, + { name: 'production_date', type: 'string' }, + { name: 'tht_date', type: 'string' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#type").jqxDropDownList({ - theme: theme, - source: FermentableTypeAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#yield").jqxNumberInput( Spin1dec ); - $("#color").jqxNumberInput( Spin1dec ); - $("#add_after_boil").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#origin").jqxInput({ theme: theme, width: 250, height: 23 }); - $("#supplier").jqxInput({ theme: theme, width: 250, height: 23 }); - $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); - $("#coarse_fine_diff").jqxNumberInput( Spin1dec ); - $("#moisture").jqxNumberInput( Spin1dec ); - $("#diastatic_power").jqxNumberInput( PosInt ); - $("#protein").jqxNumberInput( Spin1dec ); - $("#dissolved_protein").jqxNumberInput( Spin1dec ); - $("#max_in_batch").jqxNumberInput( Perc1dec ); - $("#recommend_mash").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#added").jqxDropDownList({ - theme: theme, - source: AddedAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#di_ph").jqxNumberInput( Spin2pH ); - $("#acid_to_ph_57").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -1000, max: 1000, decimalDigits: 4, spinButtons: true }); - $("#graintype").jqxDropDownList({ - theme: theme, - source: GrainTypeAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#inventory").jqxNumberInput( Spin3dec ); - $("#production_date").jqxDateTimeInput( Dateopts ); - $("#cost").jqxNumberInput( Spin2dec ); - $("#tht_date").jqxDateTimeInput( Dateopts ); - $("#totval").jqxNumberInput( Show2dec ); + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#type').jqxDropDownList({ + theme: theme, + source: FermentableTypeAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#yield').jqxNumberInput(Spin1dec); + $('#color').jqxNumberInput(Spin1dec); + $('#add_after_boil').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#origin').jqxInput({ theme: theme, width: 250, height: 23 }); + $('#supplier').jqxInput({ theme: theme, width: 250, height: 23 }); + $('#notes').jqxInput({ theme: theme, width: 640, height: 100 }); + $('#coarse_fine_diff').jqxNumberInput(Spin1dec); + $('#moisture').jqxNumberInput(Spin1dec); + $('#diastatic_power').jqxNumberInput(PosInt); + $('#protein').jqxNumberInput(Spin1dec); + $('#dissolved_protein').jqxNumberInput(Spin1dec); + $('#max_in_batch').jqxNumberInput(Perc1dec); + $('#recommend_mash').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#added').jqxDropDownList({ + theme: theme, + source: AddedAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#always_on_stock').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#di_ph').jqxNumberInput(Spin2pH); + $('#acid_to_ph_57').jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -1000, max: 1000, decimalDigits: 4, spinButtons: true }); + $('#graintype').jqxDropDownList({ + theme: theme, + source: GrainTypeAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#inventory').jqxNumberInput(Spin3dec); + $('#production_date').jqxDateTimeInput(Dateopts); + $('#cost').jqxNumberInput(Spin2dec); + $('#tht_date').jqxDateTimeInput(Dateopts); + $('#totval').jqxNumberInput(Show2dec); - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function (statusbar) { - var container, addButton, impButton; - container = $("
    "); - addButton = $("
    Nieuw
    "); - impButton = $("
    Import
    "); - container.append(addButton); - container.append(impButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val('Nieuw product'); - $("#type").val('Mout'); - $("#origin").val(''); - $("#supplier").val(''); - $("#notes").val(''); - $("#yield").val(80); - $("#color").val(3); - $("#coarse_fine_diff").val(3); - $("#moisture").val(4); - $("#diastatic_power").val(0); - $("#protein").val(0); - $("#dissolved_protein").val(0); - $("#max_in_batch").val(100); - $("#recommend_mash").val(1); - $("#always_on_stock").val(0); - $("#di_ph").val(0); - $("#acid_to_ph_57").val(0); - $("#graintype").val('Basismout'); - $("#add_after_boil").val(0); - $("#added").val('Maischen'); - $("#inventory").val(0); - $("#cost").val(0); - $("#production_date").val(''); - $("#tht_date").val(''); - $("#popupWindow").jqxWindow('open'); - }); - impButton.click(function (event) { - window.location.href = 'import_ingredients.php?select=fermentables'; - }); - }, - filterable: true, - filtermode: 'excel', - columns: [ - { text: 'Herkomst', datafield: 'origin', width: 150 }, - { text: 'Producent', datafield: 'supplier', width: 140 }, - { text: 'Vergistbaar product', datafield: 'name', menu: false }, - { text: 'Soort', width: 135, filtertype: 'list', datafield: 'type' }, - { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125 }, - { text: 'EBC', datafield: 'color', width: 60, align: 'right', menu: false, cellsalign: 'right' }, - { text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', menu: false, cellsalign: 'right', cellsformat: 'p1' }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var amount = ""; - if (value > 0) { - if (value < 1.000) - amount = dataAdapter.formatNumber(value * 1000,"f0")+" gr"; - else - amount = dataAdapter.formatNumber(value,"f1")+" kg"; - } - return "" + amount + ""; - } - }, - { text: '', datafield: 'Edit', width: 100, align: 'center', menu: false, columntype: 'button', - cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - // get the clicked row's data and initialize the input fields. - dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#type").val(dataRecord.type); - $("#yield").val(dataRecord.yield); - $("#color").val(dataRecord.color); - $("#add_after_boil").val(dataRecord.add_after_boil); - $("#origin").val(dataRecord.origin); - $("#supplier").val(dataRecord.supplier); - $("#notes").val(dataRecord.notes); - $("#coarse_fine_diff").val(dataRecord.coarse_fine_diff); - $("#moisture").val(dataRecord.moisture); - $("#diastatic_power").val(lintner_to_kolbach(dataRecord.diastatic_power)); - $("#protein").val(dataRecord.protein); - $("#dissolved_protein").val(dataRecord.dissolved_protein); - $("#max_in_batch").val(dataRecord.max_in_batch); - $("#recommend_mash").val(dataRecord.recommend_mash); - $("#added").val(dataRecord.added); - $("#always_on_stock").val(dataRecord.always_on_stock); - $("#di_ph").val(dataRecord.di_ph); - $("#acid_to_ph_57").val(dataRecord.acid_to_ph_57); - $("#graintype").val(dataRecord.graintype); - $("#inventory").val(dataRecord.inventory); - $("#cost").val(dataRecord.cost); - $("#production_date").val(dataRecord.production_date); - $("#tht_date").val(dataRecord.tht_date); - calcTotal(dataRecord.cost, dataRecord.inventory); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var container, addButton, impButton; + container = $('
    '); + addButton = $('
    Nieuw
    '); + impButton = $('
    Import
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(impButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + impButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val('Nieuw product'); + $('#type').val('Mout'); + $('#origin').val(''); + $('#supplier').val(''); + $('#notes').val(''); + $('#yield').val(80); + $('#color').val(3); + $('#coarse_fine_diff').val(3); + $('#moisture').val(4); + $('#diastatic_power').val(0); + $('#protein').val(0); + $('#dissolved_protein').val(0); + $('#max_in_batch').val(100); + $('#recommend_mash').val(1); + $('#always_on_stock').val(0); + $('#di_ph').val(0); + $('#acid_to_ph_57').val(0); + $('#graintype').val('Basismout'); + $('#add_after_boil').val(0); + $('#added').val('Maischen'); + $('#inventory').val(0); + $('#cost').val(0); + $('#production_date').val(''); + $('#tht_date').val(''); + $('#popupWindow').jqxWindow('open'); + }); + impButton.click(function(event) { + window.location.href = 'import_ingredients.php?select=fermentables'; + }); + expButton.click(function(event) { + window.open('export_fermentables.php'); + }); + }, + filterable: true, + filtermode: 'excel', + columns: [ + { text: 'Herkomst', datafield: 'origin', width: 150 }, + { text: 'Producent', datafield: 'supplier', width: 140 }, + { text: 'Vergistbaar product', datafield: 'name', menu: false }, + { text: 'Soort', width: 135, filtertype: 'list', datafield: 'type' }, + { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125 }, + { text: 'EBC', datafield: 'color', width: 60, align: 'right', menu: false, cellsalign: 'right' }, + { text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', menu: false, cellsalign: 'right', cellsformat: 'p1' }, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var amount = ''; + if (value > 0) { + if (value < 1.000) + amount = dataAdapter.formatNumber(value * 1000, 'f0') + ' gr'; + else + amount = dataAdapter.formatNumber(value, 'f1') + ' kg'; + } + return '' + amount + ''; + } + }, + { text: '', datafield: 'Edit', width: 100, align: 'center', menu: false, columntype: 'button', + cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + // get the clicked row's data and initialize the input fields. + dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#type').val(dataRecord.type); + $('#yield').val(dataRecord.yield); + $('#color').val(dataRecord.color); + $('#add_after_boil').val(dataRecord.add_after_boil); + $('#origin').val(dataRecord.origin); + $('#supplier').val(dataRecord.supplier); + $('#notes').val(dataRecord.notes); + $('#coarse_fine_diff').val(dataRecord.coarse_fine_diff); + $('#moisture').val(dataRecord.moisture); + $('#diastatic_power').val(lintner_to_kolbach(dataRecord.diastatic_power)); + $('#protein').val(dataRecord.protein); + $('#dissolved_protein').val(dataRecord.dissolved_protein); + $('#max_in_batch').val(dataRecord.max_in_batch); + $('#recommend_mash').val(dataRecord.recommend_mash); + $('#added').val(dataRecord.added); + $('#always_on_stock').val(dataRecord.always_on_stock); + $('#di_ph').val(dataRecord.di_ph); + $('#acid_to_ph_57').val(dataRecord.acid_to_ph_57); + $('#graintype').val(dataRecord.graintype); + $('#inventory').val(dataRecord.inventory); + $('#cost').val(dataRecord.cost); + $('#production_date').val(dataRecord.production_date); + $('#tht_date').val(dataRecord.tht_date); + calcTotal(dataRecord.cost, dataRecord.inventory); + // show the popup window. + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); - $("#cost").on('change', function (event) { - dataRecord.cost = parseFloat(event.args.value); - calcTotal(dataRecord.cost, dataRecord.inventory); - }); - $("#inventory").on('change', function (event) { - dataRecord.inventory = parseFloat(event.args.value); - calcTotal(dataRecord.cost, dataRecord.inventory); - }); + $('#cost').on('change', function(event) { + dataRecord.cost = parseFloat(event.args.value); + calcTotal(dataRecord.cost, dataRecord.inventory); + }); + $('#inventory').on('change', function(event) { + dataRecord.inventory = parseFloat(event.args.value); + calcTotal(dataRecord.cost, dataRecord.inventory); + }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 550, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function() { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); - $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); - $('#Clone').click(function() { - var row = { - record: -1, - name: $('#name').val() + ' kopie', - type: $('#type').val(), - yield: parseFloat($('#yield').jqxNumberInput('decimal')), - color: parseFloat($('#color').jqxNumberInput('decimal')), - add_after_boil: $('#add_after_boil').val(), - origin: $('#origin').val(), - supplier: $('#supplier').val(), - notes: $('#notes').val(), - coarse_fine_diff: parseFloat($('#coarse_fine_diff').jqxNumberInput('decimal')), - moisture: parseFloat($('#moisture').jqxNumberInput('decimal')), - diastatic_power: kolbach_to_lintner(parseFloat($('#diastatic_power').jqxNumberInput('decimal'))), - protein: parseFloat($('#protein').jqxNumberInput('decimal')), - dissolved_protein: parseFloat($('#dissolved_protein').jqxNumberInput('decimal')), - max_in_batch: parseFloat($('#max_in_batch').jqxNumberInput('decimal')), - recommend_mash: $('#recommend_mash').val(), - added: $('#added').val(), - always_on_stock: $('#always_on_stock').val(), - di_ph: parseFloat($('#di_ph').jqxNumberInput('decimal')), - acid_to_ph_57: parseFloat($('#acid_to_ph_57').jqxNumberInput('decimal')), - graintype: $('#graintype').val(), - inventory: 0, - cost: parseFloat($('#cost').jqxNumberInput('decimal')), - production_date: '', - tht_date: '' - }; - $('#jqxgrid').jqxGrid('addrow', null, row); - $('#popupWindow').jqxWindow('hide'); - }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function() { - var row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - row = { - record: rowID, - name: $("#name").val(), - type: $("#type").val(), - yield: parseFloat($("#yield").jqxNumberInput('decimal')), - color: parseFloat($("#color").jqxNumberInput('decimal')), - add_after_boil: $("#add_after_boil").val(), - origin: $("#origin").val(), - supplier: $("#supplier").val(), - notes: $("#notes").val(), - coarse_fine_diff: parseFloat($("#coarse_fine_diff").jqxNumberInput('decimal')), - moisture: parseFloat($("#moisture").jqxNumberInput('decimal')), - diastatic_power: kolbach_to_lintner(parseFloat($("#diastatic_power").jqxNumberInput('decimal'))), - protein: parseFloat($("#protein").jqxNumberInput('decimal')), - dissolved_protein: parseFloat($("#dissolved_protein").jqxNumberInput('decimal')), - max_in_batch: parseFloat($("#max_in_batch").jqxNumberInput('decimal')), - recommend_mash: $("#recommend_mash").val(), - added: $("#added").val(), - always_on_stock: $("#always_on_stock").val(), - di_ph: parseFloat($("#di_ph").jqxNumberInput('decimal')), - acid_to_ph_57: parseFloat($("#acid_to_ph_57").jqxNumberInput('decimal')), - graintype: $("#graintype").val(), - inventory: parseFloat($("#inventory").jqxNumberInput('decimal')), - cost: parseFloat($("#cost").jqxNumberInput('decimal')), - production_date: $("#production_date").val(), - tht_date: $("#tht_date").val(), - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 550, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); + $('#Clone').click(function() { + var row = { + record: -1, + name: $('#name').val() + ' kopie', + type: $('#type').val(), + yield: parseFloat($('#yield').jqxNumberInput('decimal')), + color: parseFloat($('#color').jqxNumberInput('decimal')), + add_after_boil: $('#add_after_boil').val(), + origin: $('#origin').val(), + supplier: $('#supplier').val(), + notes: $('#notes').val(), + coarse_fine_diff: parseFloat($('#coarse_fine_diff').jqxNumberInput('decimal')), + moisture: parseFloat($('#moisture').jqxNumberInput('decimal')), + diastatic_power: kolbach_to_lintner(parseFloat($('#diastatic_power').jqxNumberInput('decimal'))), + protein: parseFloat($('#protein').jqxNumberInput('decimal')), + dissolved_protein: parseFloat($('#dissolved_protein').jqxNumberInput('decimal')), + max_in_batch: parseFloat($('#max_in_batch').jqxNumberInput('decimal')), + recommend_mash: $('#recommend_mash').val(), + added: $('#added').val(), + always_on_stock: $('#always_on_stock').val(), + di_ph: parseFloat($('#di_ph').jqxNumberInput('decimal')), + acid_to_ph_57: parseFloat($('#acid_to_ph_57').jqxNumberInput('decimal')), + graintype: $('#graintype').val(), + inventory: 0, + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: '', + tht_date: '' + }; + $('#jqxgrid').jqxGrid('addrow', null, row); + $('#popupWindow').jqxWindow('hide'); + }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + row = { + record: rowID, + name: $('#name').val(), + type: $('#type').val(), + yield: parseFloat($('#yield').jqxNumberInput('decimal')), + color: parseFloat($('#color').jqxNumberInput('decimal')), + add_after_boil: $('#add_after_boil').val(), + origin: $('#origin').val(), + supplier: $('#supplier').val(), + notes: $('#notes').val(), + coarse_fine_diff: parseFloat($('#coarse_fine_diff').jqxNumberInput('decimal')), + moisture: parseFloat($('#moisture').jqxNumberInput('decimal')), + diastatic_power: kolbach_to_lintner(parseFloat($('#diastatic_power').jqxNumberInput('decimal'))), + protein: parseFloat($('#protein').jqxNumberInput('decimal')), + dissolved_protein: parseFloat($('#dissolved_protein').jqxNumberInput('decimal')), + max_in_batch: parseFloat($('#max_in_batch').jqxNumberInput('decimal')), + recommend_mash: $('#recommend_mash').val(), + added: $('#added').val(), + always_on_stock: $('#always_on_stock').val(), + di_ph: parseFloat($('#di_ph').jqxNumberInput('decimal')), + acid_to_ph_57: parseFloat($('#acid_to_ph_57').jqxNumberInput('decimal')), + graintype: $('#graintype').val(), + inventory: parseFloat($('#inventory').jqxNumberInput('decimal')), + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: $('#production_date').val(), + tht_date: $('#tht_date').val(), + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_hops-min.js --- a/www/js/inv_hops-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function d(h,g){$("#totval").val(h*(g/1000))}var b={},a="includes/db_inventory_hops.php",e={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"alpha",type:"float"},{name:"beta",type:"float"},{name:"humulene",type:"float"},{name:"caryophyllene",type:"float"},{name:"cohumulone",type:"float"},{name:"myrcene",type:"float"},{name:"hsi",type:"float"},{name:"type",type:"string"},{name:"form",type:"string"},{name:"notes",type:"string"},{name:"origin",type:"string"},{name:"substitutes",type:"string"},{name:"always_on_stock",type:"int"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"production_date",type:"string"},{name:"tht_date",type:"string"},{name:"total_oil",type:"float"}],id:"record",url:a,deleterow:function(g,i){var h="delete=true&"+$.param({record:g});$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(k,j,l){i(true);location.reload(true)},error:function(j,l,k){i(false)}})},addrow:function(h,k,g,j){var i="insert=true&"+$.param(k);$.ajax({dataType:"json",url:a,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})},updaterow:function(g,j,i){var h="update=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})}},f=new $.jqx.dataAdapter(e),c=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#alpha").jqxNumberInput(Perc1dec);$("#beta").jqxNumberInput(Perc1dec);$("#humulene").jqxNumberInput(Perc1dec);$("#caryophyllene").jqxNumberInput(Perc1dec);$("#cohumulone").jqxNumberInput(Perc1dec);$("#myrcene").jqxNumberInput(Perc1dec);$("#hsi").jqxNumberInput(Perc1dec);$("#type").jqxDropDownList({theme:theme,source:HopTypeAdapter,valueMember:"nl",displayMember:"nl",width:150,height:23,autoDropDownHeight:true});$("#form").jqxDropDownList({theme:theme,source:HopFormAdapter,valueMember:"nl",displayMember:"nl",width:150,height:23,autoDropDownHeight:true});$("#notes").jqxInput({theme:theme,width:640,height:100});$("#origin").jqxInput({theme:theme,width:320,height:23});$("#substitutes").jqxInput({theme:theme,width:320,height:23});$("#always_on_stock").jqxCheckBox({theme:theme,width:120,height:23});$("#inventory").jqxNumberInput(Spin1dec);$("#production_date").jqxDateTimeInput(Dateopts);$("#cost").jqxNumberInput(Spin2dec);$("#tht_date").jqxDateTimeInput(Dateopts);$("#total_oil").jqxNumberInput(Perc1dec);$("#totval").jqxNumberInput(Show2dec);$("#jqxgrid").jqxGrid({width:1280,height:630,source:f,theme:theme,showstatusbar:true,renderstatusbar:function(i){var g,h,j;g=$("
    ");h=$("
    Nieuw
    ");j=$("
    Import
    ");g.append(h);g.append(j);i.append(g);h.jqxButton({theme:theme,width:90,height:20});j.jqxButton({theme:theme,width:90,height:20});h.click(function(k){c=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("Nieuwe hop");$("#alpha").val(0);$("#beta").val(0);$("#humulene").val(0);$("#caryophyllene").val(0);$("#cohumulone").val(0);$("#myrcene").val(0);$("#hsi").val(0);$("#type").val("Bitterhop");$("#form").val("Pellets");$("#notes").val("");$("#origin").val("");$("#substitutes").val("");$("#always_on_stock").val(0);$("#inventory").val(0);$("#cost").val(0);$("#production_date").val("");$("#tht_date").val("");$("#total_oil").val(0);$("#popupWindow").jqxWindow("open")});j.click(function(k){window.location.href="import_ingredients.php?select=hops"})},filterable:true,filtermode:"excel",columns:[{text:"Herkomst",datafield:"origin",width:150},{text:"Hop Naam",datafield:"name",menu:false},{text:"Soort",datafield:"type",align:"left",width:90},{text:"Vorm",datafield:"form",align:"left",width:90},{text:"Alpha %",datafield:"alpha",width:80,align:"right",cellsalign:"right",menu:false,cellsformat:"p1"},{text:"Beta %",datafield:"beta",width:80,align:"right",cellsalign:"right",menu:false,cellsformat:"p1"},{text:"Cohumuloon %%",datafield:"cohumulone",width:80,align:"right",cellsalign:"right",menu:false,cellsformat:"p1"},{text:"HSI",datafield:"hsi",width:60,align:"right",cellsalign:"right",menu:false,cellsformat:"f1"},{text:"Oogst datum",datafield:"production_date",align:"center",cellsalign:"center",menu:false,width:110},{text:"Voorraad",datafield:"inventory",width:100,align:"right",cellsalign:"right",menu:false,cellsformat:"f1",cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){if(l<1000){i=f.formatNumber(l,"f1")+" gr"}else{i=f.formatNumber(l/1000,"f1")+" kg"}}return''+i+""}},{text:"",datafield:"Wijzig",columntype:"button",width:100,align:"center",menu:false,cellsrenderer:function(){return"Wijzig"},buttonclick:function(g){c=g;$("#popupWindow").jqxWindow({position:{x:110,y:30}});b=$("#jqxgrid").jqxGrid("getrowdata",c);$("#name").val(b.name);$("#alpha").val(b.alpha);$("#beta").val(b.beta);$("#humulene").val(b.humulene);$("#caryophyllene").val(b.caryophyllene);$("#cohumulone").val(b.cohumulone);$("#myrcene").val(b.myrcene);$("#hsi").val(b.hsi);$("#type").val(b.type);$("#form").val(b.form);$("#notes").val(b.notes);$("#origin").val(b.origin);$("#substitutes").val(b.substitutes);$("#always_on_stock").val(b.always_on_stock);$("#inventory").val(b.inventory);$("#cost").val(b.cost);$("#production_date").val(b.production_date);$("#tht_date").val(b.tht_date);$("#total_oil").val(b.total_oil);d(b.cost,b.inventory);$("#popupWindow").jqxWindow("open")}}]});$("#cost").on("change",function(g){b.cost=parseFloat(g.args.value);d(b.cost,b.inventory)});$("#inventory").on("change",function(g){b.inventory=parseFloat(g.args.value);d(b.cost,b.inventory)});$("#popupWindow").jqxWindow({width:1050,height:550,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(c>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var g=$("#jqxgrid").jqxGrid("getrowid",c);$("#jqxgrid").jqxGrid("deleterow",g)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Clone").jqxButton({template:"warning",width:"90px",theme:theme});$("#Clone").click(function(){var g={record:-1,name:$("#name").val()+" kopie",alpha:parseFloat($("#alpha").jqxNumberInput("decimal")),beta:parseFloat($("#beta").jqxNumberInput("decimal")),humulene:parseFloat($("#humulene").jqxNumberInput("decimal")),caryophyllene:parseFloat($("#caryophyllene").jqxNumberInput("decimal")),cohumulone:parseFloat($("#cohumulone").jqxNumberInput("decimal")),myrcene:parseFloat($("#myrcene").jqxNumberInput("decimal")),hsi:parseFloat($("#hsi").jqxNumberInput("decimal")),type:$("#type").val(),form:$("#form").val(),notes:$("#notes").val(),origin:$("#origin").val(),substitutes:$("#substitutes").val(),always_on_stock:$("#always_on_stock").val(),inventory:0,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:"",tht_date:"",total_oil:parseFloat($("#total_oil").jqxNumberInput("decimal"))};$("#jqxgrid").jqxGrid("addrow",null,g);$("#popupWindow").jqxWindow("hide")});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var h,g=-1;if(c>=0){g=$("#jqxgrid").jqxGrid("getrowid",c)}h={record:g,name:$("#name").val(),alpha:parseFloat($("#alpha").jqxNumberInput("decimal")),beta:parseFloat($("#beta").jqxNumberInput("decimal")),humulene:parseFloat($("#humulene").jqxNumberInput("decimal")),caryophyllene:parseFloat($("#caryophyllene").jqxNumberInput("decimal")),cohumulone:parseFloat($("#cohumulone").jqxNumberInput("decimal")),myrcene:parseFloat($("#myrcene").jqxNumberInput("decimal")),hsi:parseFloat($("#hsi").jqxNumberInput("decimal")),type:$("#type").val(),form:$("#form").val(),notes:$("#notes").val(),origin:$("#origin").val(),substitutes:$("#substitutes").val(),always_on_stock:$("#always_on_stock").val(),inventory:parseFloat($("#inventory").jqxNumberInput("decimal")),cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:$("#production_date").val(),tht_date:$("#tht_date").val(),total_oil:parseFloat($("#total_oil").jqxNumberInput("decimal"))};if(c>=0){$("#jqxgrid").jqxGrid("updaterow",g,h)}else{$("#jqxgrid").jqxGrid("addrow",null,h)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_hops.js --- a/www/js/inv_hops.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_hops.js Fri May 01 16:37:31 2020 +0200 @@ -22,363 +22,369 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } -$(document).ready(function () { +$(document).ready(function() { - function calcTotal(cost, inventory) { - - $('#totval').val(cost * (inventory / 1000)); - } + function calcTotal(cost, inventory) { + $('#totval').val(cost * (inventory / 1000)); + } - var dataRecord = {}, - url = 'includes/db_inventory_hops.php', - // prepare the data - source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'alpha', type: 'float' }, - { name: 'beta', type: 'float' }, - { name: 'humulene', type: 'float' }, - { name: 'caryophyllene', type: 'float' }, - { name: 'cohumulone', type: 'float' }, - { name: 'myrcene', type: 'float' }, - { name: 'hsi', type: 'float' }, - { name: 'type', type: 'string' }, - { name: 'form', type: 'string' }, - { name: 'notes', type: 'string' }, - { name: 'origin', type: 'string' }, - { name: 'substitutes', type: 'string' }, - { name: 'always_on_stock', type: 'int' }, - { name: 'inventory', type: 'float' }, - { name: 'cost', type: 'float' }, - { name: 'production_date', type: 'string' }, - { name: 'tht_date', type: 'string' }, - { name: 'total_oil', type: 'float' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + var dataRecord = {}, + url = 'includes/db_inventory_hops.php', + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'alpha', type: 'float' }, + { name: 'beta', type: 'float' }, + { name: 'humulene', type: 'float' }, + { name: 'caryophyllene', type: 'float' }, + { name: 'cohumulone', type: 'float' }, + { name: 'myrcene', type: 'float' }, + { name: 'hsi', type: 'float' }, + { name: 'type', type: 'string' }, + { name: 'form', type: 'string' }, + { name: 'notes', type: 'string' }, + { name: 'origin', type: 'string' }, + { name: 'substitutes', type: 'string' }, + { name: 'always_on_stock', type: 'int' }, + { name: 'inventory', type: 'float' }, + { name: 'cost', type: 'float' }, + { name: 'production_date', type: 'string' }, + { name: 'tht_date', type: 'string' }, + { name: 'total_oil', type: 'float' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#alpha").jqxNumberInput( Perc1dec ); - $("#beta").jqxNumberInput( Perc1dec ); - $("#humulene").jqxNumberInput( Perc1dec ); - $("#caryophyllene").jqxNumberInput( Perc1dec ); - $("#cohumulone").jqxNumberInput( Perc1dec ); - $("#myrcene").jqxNumberInput( Perc1dec ); - $("#hsi").jqxNumberInput( Perc1dec ); + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#alpha').jqxNumberInput(Perc1dec); + $('#beta').jqxNumberInput(Perc1dec); + $('#humulene').jqxNumberInput(Perc1dec); + $('#caryophyllene').jqxNumberInput(Perc1dec); + $('#cohumulone').jqxNumberInput(Perc1dec); + $('#myrcene').jqxNumberInput(Perc1dec); + $('#hsi').jqxNumberInput(Perc1dec); - $("#type").jqxDropDownList({ - theme: theme, - source: HopTypeAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 150, - height: 23, - autoDropDownHeight: true - }); - $("#form").jqxDropDownList({ - theme: theme, - source: HopFormAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 150, - height: 23, - autoDropDownHeight: true - }); - $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); - $("#origin").jqxInput({ theme: theme, width: 320, height: 23 }); - $("#substitutes").jqxInput({ theme: theme, width: 320, height: 23 }); - $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#inventory").jqxNumberInput( Spin1dec ); - $("#production_date").jqxDateTimeInput( Dateopts ); - $("#cost").jqxNumberInput( Spin2dec ); - $("#tht_date").jqxDateTimeInput( Dateopts ); - $("#total_oil").jqxNumberInput( Perc1dec ); - $("#totval").jqxNumberInput( Show2dec ); + $('#type').jqxDropDownList({ + theme: theme, + source: HopTypeAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 150, + height: 23, + autoDropDownHeight: true + }); + $('#form').jqxDropDownList({ + theme: theme, + source: HopFormAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 150, + height: 23, + autoDropDownHeight: true + }); + $('#notes').jqxInput({ theme: theme, width: 640, height: 100 }); + $('#origin').jqxInput({ theme: theme, width: 320, height: 23 }); + $('#substitutes').jqxInput({ theme: theme, width: 320, height: 23 }); + $('#always_on_stock').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#inventory').jqxNumberInput(Spin1dec); + $('#production_date').jqxDateTimeInput(Dateopts); + $('#cost').jqxNumberInput(Spin2dec); + $('#tht_date').jqxDateTimeInput(Dateopts); + $('#total_oil').jqxNumberInput(Perc1dec); + $('#totval').jqxNumberInput(Show2dec); - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function (statusbar) { - var container, addButton, impButton; - container = $("
    "); - addButton = $("
    Nieuw
    "); - impButton = $("
    Import
    "); - container.append(addButton); - container.append(impButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val('Nieuwe hop'); - $("#alpha").val(0); - $("#beta").val(0); - $("#humulene").val(0); - $("#caryophyllene").val(0); - $("#cohumulone").val(0); - $("#myrcene").val(0); - $("#hsi").val(0); - $("#type").val('Bitterhop'); - $("#form").val('Pellets'); - $("#notes").val(''); - $("#origin").val(''); - $("#substitutes").val(''); - $("#always_on_stock").val(0); - $("#inventory").val(0); - $("#cost").val(0); - $("#production_date").val(''); - $("#tht_date").val(''); - $("#total_oil").val(0); - $("#popupWindow").jqxWindow('open'); - }); - impButton.click(function (event) { - window.location.href = 'import_ingredients.php?select=hops'; - }); - }, - filterable: true, - filtermode: 'excel', - columns: [ - { text: 'Herkomst', datafield: 'origin', width: 150 }, - { text: 'Hop Naam', datafield: 'name', menu: false }, - { text: 'Soort', datafield: 'type', align: 'left', width: 90 }, - { text: 'Vorm', datafield: 'form', align: 'left', width: 90 }, - { text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1' }, - { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', menu: false, width: 110 }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1', - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var amount = ""; - if (value > 0) { - if (value < 1000) - amount = dataAdapter.formatNumber(value,"f1")+" gr"; - else - amount = dataAdapter.formatNumber(value / 1000.0,"f1")+" kg"; - } - return '' + amount + ''; - } - }, - { text: '', datafield: 'Wijzig', columntype: 'button', width: 100, align: 'center', menu: false, - cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - // get the clicked row's data and initialize the input fields. - dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#alpha").val(dataRecord.alpha); - $("#beta").val(dataRecord.beta); - $("#humulene").val(dataRecord.humulene); - $("#caryophyllene").val(dataRecord.caryophyllene); - $("#cohumulone").val(dataRecord.cohumulone); - $("#myrcene").val(dataRecord.myrcene); - $("#hsi").val(dataRecord.hsi); - $("#type").val(dataRecord.type); - $("#form").val(dataRecord.form); - $("#notes").val(dataRecord.notes); - $("#origin").val(dataRecord.origin); - $("#substitutes").val(dataRecord.substitutes); - $("#always_on_stock").val(dataRecord.always_on_stock); - $("#inventory").val(dataRecord.inventory); - $("#cost").val(dataRecord.cost); - $("#production_date").val(dataRecord.production_date); - $("#tht_date").val(dataRecord.tht_date); - $("#total_oil").val(dataRecord.total_oil); - calcTotal(dataRecord.cost, dataRecord.inventory); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var container, addButton, impButton; + container = $('
    '); + addButton = $('
    Nieuw
    '); + impButton = $('
    Import
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(impButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + impButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val('Nieuwe hop'); + $('#alpha').val(0); + $('#beta').val(0); + $('#humulene').val(0); + $('#caryophyllene').val(0); + $('#cohumulone').val(0); + $('#myrcene').val(0); + $('#hsi').val(0); + $('#type').val('Bitterhop'); + $('#form').val('Pellets'); + $('#notes').val(''); + $('#origin').val(''); + $('#substitutes').val(''); + $('#always_on_stock').val(0); + $('#inventory').val(0); + $('#cost').val(0); + $('#production_date').val(''); + $('#tht_date').val(''); + $('#total_oil').val(0); + $('#popupWindow').jqxWindow('open'); + }); + impButton.click(function(event) { + window.location.href = 'import_ingredients.php?select=hops'; + }); + expButton.click(function(event) { + window.open('export_hops.php'); + }); + }, + filterable: true, + filtermode: 'excel', + columns: [ + { text: 'Herkomst', datafield: 'origin', width: 150 }, + { text: 'Hop Naam', datafield: 'name', menu: false }, + { text: 'Soort', datafield: 'type', align: 'left', width: 90 }, + { text: 'Vorm', datafield: 'form', align: 'left', width: 90 }, + { text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, + { text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, + { text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, + { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1' }, + { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', menu: false, width: 110 }, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1', + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var amount = ''; + if (value > 0) { + if (value < 1000) + amount = dataAdapter.formatNumber(value, 'f1') + ' gr'; + else + amount = dataAdapter.formatNumber(value / 1000.0, 'f1') + ' kg'; + } + return '' + amount + ''; + } + }, + { text: '', datafield: 'Wijzig', columntype: 'button', width: 100, align: 'center', menu: false, + cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + // get the clicked row's data and initialize the input fields. + dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#alpha').val(dataRecord.alpha); + $('#beta').val(dataRecord.beta); + $('#humulene').val(dataRecord.humulene); + $('#caryophyllene').val(dataRecord.caryophyllene); + $('#cohumulone').val(dataRecord.cohumulone); + $('#myrcene').val(dataRecord.myrcene); + $('#hsi').val(dataRecord.hsi); + $('#type').val(dataRecord.type); + $('#form').val(dataRecord.form); + $('#notes').val(dataRecord.notes); + $('#origin').val(dataRecord.origin); + $('#substitutes').val(dataRecord.substitutes); + $('#always_on_stock').val(dataRecord.always_on_stock); + $('#inventory').val(dataRecord.inventory); + $('#cost').val(dataRecord.cost); + $('#production_date').val(dataRecord.production_date); + $('#tht_date').val(dataRecord.tht_date); + $('#total_oil').val(dataRecord.total_oil); + calcTotal(dataRecord.cost, dataRecord.inventory); + // show the popup window. + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); - $("#cost").on('change', function (event) { - dataRecord.cost = parseFloat(event.args.value); - calcTotal(dataRecord.cost, dataRecord.inventory); - }); - $("#inventory").on('change', function (event) { - dataRecord.inventory = parseFloat(event.args.value); - calcTotal(dataRecord.cost, dataRecord.inventory); - }); + $('#cost').on('change', function(event) { + dataRecord.cost = parseFloat(event.args.value); + calcTotal(dataRecord.cost, dataRecord.inventory); + }); + $('#inventory').on('change', function(event) { + dataRecord.inventory = parseFloat(event.args.value); + calcTotal(dataRecord.cost, dataRecord.inventory); + }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 550, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function () { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); - $("#Clone").jqxButton({ template: "warning", width: '90px', theme: theme }); - $("#Clone").click(function () { - var row = { - record: -1, - name: $("#name").val()+" kopie", - alpha: parseFloat($("#alpha").jqxNumberInput('decimal')), - beta: parseFloat($("#beta").jqxNumberInput('decimal')), - humulene: parseFloat($("#humulene").jqxNumberInput('decimal')), - caryophyllene: parseFloat($("#caryophyllene").jqxNumberInput('decimal')), - cohumulone: parseFloat($("#cohumulone").jqxNumberInput('decimal')), - myrcene: parseFloat($("#myrcene").jqxNumberInput('decimal')), - hsi: parseFloat($("#hsi").jqxNumberInput('decimal')), - type: $("#type").val(), - form: $("#form").val(), - notes: $("#notes").val(), - origin: $("#origin").val(), - substitutes: $("#substitutes").val(), - always_on_stock: $("#always_on_stock").val(), - inventory: 0, - cost: parseFloat($("#cost").jqxNumberInput('decimal')), - production_date: '', - tht_date: '', - total_oil: parseFloat($("#total_oil").jqxNumberInput('decimal')) - }; - $('#jqxgrid').jqxGrid('addrow', null, row); - $("#popupWindow").jqxWindow('hide'); - }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function () { - var row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - row = { - record: rowID, - name: $("#name").val(), - alpha: parseFloat($("#alpha").jqxNumberInput('decimal')), - beta: parseFloat($("#beta").jqxNumberInput('decimal')), - humulene: parseFloat($("#humulene").jqxNumberInput('decimal')), - caryophyllene: parseFloat($("#caryophyllene").jqxNumberInput('decimal')), - cohumulone: parseFloat($("#cohumulone").jqxNumberInput('decimal')), - myrcene: parseFloat($("#myrcene").jqxNumberInput('decimal')), - hsi: parseFloat($("#hsi").jqxNumberInput('decimal')), - type: $("#type").val(), - form: $("#form").val(), - notes: $("#notes").val(), - origin: $("#origin").val(), - substitutes: $("#substitutes").val(), - always_on_stock: $("#always_on_stock").val(), - inventory: parseFloat($("#inventory").jqxNumberInput('decimal')), - cost: parseFloat($("#cost").jqxNumberInput('decimal')), - production_date: $("#production_date").val(), - tht_date: $("#tht_date").val(), - total_oil: parseFloat($("#total_oil").jqxNumberInput('decimal')) - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 550, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); + $('#Clone').click(function() { + var row = { + record: -1, + name: $('#name').val() + ' kopie', + alpha: parseFloat($('#alpha').jqxNumberInput('decimal')), + beta: parseFloat($('#beta').jqxNumberInput('decimal')), + humulene: parseFloat($('#humulene').jqxNumberInput('decimal')), + caryophyllene: parseFloat($('#caryophyllene').jqxNumberInput('decimal')), + cohumulone: parseFloat($('#cohumulone').jqxNumberInput('decimal')), + myrcene: parseFloat($('#myrcene').jqxNumberInput('decimal')), + hsi: parseFloat($('#hsi').jqxNumberInput('decimal')), + type: $('#type').val(), + form: $('#form').val(), + notes: $('#notes').val(), + origin: $('#origin').val(), + substitutes: $('#substitutes').val(), + always_on_stock: $('#always_on_stock').val(), + inventory: 0, + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: '', + tht_date: '', + total_oil: parseFloat($('#total_oil').jqxNumberInput('decimal')) + }; + $('#jqxgrid').jqxGrid('addrow', null, row); + $('#popupWindow').jqxWindow('hide'); + }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + row = { + record: rowID, + name: $('#name').val(), + alpha: parseFloat($('#alpha').jqxNumberInput('decimal')), + beta: parseFloat($('#beta').jqxNumberInput('decimal')), + humulene: parseFloat($('#humulene').jqxNumberInput('decimal')), + caryophyllene: parseFloat($('#caryophyllene').jqxNumberInput('decimal')), + cohumulone: parseFloat($('#cohumulone').jqxNumberInput('decimal')), + myrcene: parseFloat($('#myrcene').jqxNumberInput('decimal')), + hsi: parseFloat($('#hsi').jqxNumberInput('decimal')), + type: $('#type').val(), + form: $('#form').val(), + notes: $('#notes').val(), + origin: $('#origin').val(), + substitutes: $('#substitutes').val(), + always_on_stock: $('#always_on_stock').val(), + inventory: parseFloat($('#inventory').jqxNumberInput('decimal')), + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: $('#production_date').val(), + tht_date: $('#tht_date').val(), + total_oil: parseFloat($('#total_oil').jqxNumberInput('decimal')) + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_miscs-min.js --- a/www/js/inv_miscs-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function e(i,h){$("#totval").val(i*(h/1000))}function a(h){if(h){$("#pmpt_cost").html("Prijs per kg:");$("#pmpt_inventory").html("Voorraad gram:")}else{$("#pmpt_cost").html("Prijs per liter:");$("#pmpt_inventory").html("Voorraad ml:")}}var c={},b="includes/db_inventory_miscs.php",f={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"string"},{name:"use_use",type:"string"},{name:"time",type:"int"},{name:"amount",type:"float"},{name:"amount_is_weight",type:"int"},{name:"use_for",type:"string"},{name:"notes",type:"string"},{name:"always_on_stock",type:"int"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"production_date",type:"string"},{name:"tht_date",type:"string"}],id:"record",url:b,deleterow:function(h,j){var i="delete=true&"+$.param({record:h});$.ajax({dataType:"json",url:b,cache:false,data:i,type:"POST",success:function(l,k,m){j(true);location.reload(true)},error:function(k,m,l){j(false)}})},addrow:function(i,l,h,k){var j="insert=true&"+$.param(l);$.ajax({dataType:"json",url:b,cache:false,data:j,type:"POST",success:function(n,m,o){k(true);location.reload(true)},error:function(m,o,n){k(false)}})},updaterow:function(h,k,j){var i="update=true&"+$.param(k);$.ajax({dataType:"json",url:b,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})}},g=new $.jqx.dataAdapter(f),d=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#notes").jqxInput({theme:theme,width:800,height:100});$("#type").jqxDropDownList({theme:theme,source:MiscTypeAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#use_use").jqxDropDownList({theme:theme,source:MiscUseAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#time").jqxNumberInput(PosInt);$("#amount_is_weight").jqxCheckBox({theme:theme,width:120,height:23});$("#use_for").jqxInput({theme:theme,width:640,height:48});$("#always_on_stock").jqxCheckBox({theme:theme,width:120,height:23});$("#inventory").jqxNumberInput(Spin1dec);$("#production_date").jqxDateTimeInput(Dateopts);$("#cost").jqxNumberInput(Spin2dec);$("#tht_date").jqxDateTimeInput(Dateopts);$("#totval").jqxNumberInput(Show2dec);$("#jqxgrid").jqxGrid({width:1280,height:630,source:g,theme:theme,showstatusbar:true,renderstatusbar:function(j){var h,i,k;h=$("
    ");i=$("
    Nieuw
    ");k=$("
    Import
    ");h.append(i);h.append(k);j.append(h);i.jqxButton({theme:theme,width:90,height:20});k.jqxButton({theme:theme,width:90,height:20});i.click(function(l){d=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("");$("#type").val("Specerij");$("#use_use").val("Starter");$("#time").val(0);$("#amount_is_weight").val(1);$("#use_for").val("");$("#notes").val("");$("#always_on_stock").val(0);$("#inventory").val(0);$("#cost").val(0);$("#production_date").val("");$("#tht_date").val("");$("#popupWindow").jqxWindow("open")});k.click(function(l){window.location.href="import_ingredients.php?select=miscs"})},filterable:true,filtermode:"excel",columns:[{text:"Ingredient naam",datafield:"name",menu:false},{text:"Type",datafield:"type",align:"left",width:120},{text:"Gebruik",datafield:"use_use",align:"left",width:120},{text:"Tijd",datafield:"time",width:90,align:"left",menu:false,cellsrenderer:function(i,h,l,k,j,n){var m="";if(l>0){if(l==1){m="1 minuut"}else{if(l<60){m=g.formatNumber(l,"f0")+" minuten"}else{if(l==60){m="1 uur"}else{if(l<1440){m=g.formatNumber(l/60,"f0")+" uren"}else{if(l==1440){m="1 dag"}else{m=g.formatNumber(l/1440,"f0")+" dagen"}}}}}}return""+m+""}},{text:"Voorraad",datafield:"inventory",width:110,menu:false,align:"right",cellsrenderer:function(i,h,m,l,k,n){var j="";if(m>0){if(n.amount_is_weight){j=g.formatNumber(m,"f1")+" gr"}else{j=g.formatNumber(m,"f1")+" ml"}}return""+j+""}},{text:"THT datum",datafield:"tht_date",width:100,menu:false,align:"center",cellsalign:"center"},{text:"",datafield:"Edit",columntype:"button",width:100,menu:false,align:"center",cellsrenderer:function(){return"Wijzig"},buttonclick:function(h){d=h;$("#popupWindow").jqxWindow({position:{x:110,y:30}});c=$("#jqxgrid").jqxGrid("getrowdata",d);$("#name").val(c.name);$("#type").val(c.type);$("#use_use").val(c.use_use);$("#time").val(c.time);$("#amount_is_weight").val(c.amount_is_weight);$("#use_for").val(c.use_for);$("#notes").val(c.notes);$("#always_on_stock").val(c.always_on_stock);$("#inventory").val(c.inventory);$("#cost").val(c.cost);$("#production_date").val(c.production_date);$("#tht_date").val(c.tht_date);e(c.cost,c.inventory);a(c.amount_is_weight);$("#popupWindow").jqxWindow("open")}}]});$("#cost").on("change",function(h){c.cost=parseFloat(h.args.value);e(c.cost,c.inventory)});$("#inventory").on("change",function(h){c.inventory=parseFloat(h.args.value);e(c.cost,c.inventory)});$("#amount_is_weight").on("checked",function(h){c.amount_is_weight=true;a(true)});$("#amount_is_weight").on("unchecked",function(h){c.amount_is_weight=false;a(false)});$("#popupWindow").jqxWindow({width:1050,height:550,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(d>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var h=$("#jqxgrid").jqxGrid("getrowid",d);$("#jqxgrid").jqxGrid("deleterow",h)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var i,h=-1;if(d>=0){h=$("#jqxgrid").jqxGrid("getrowid",d)}i={record:h,name:$("#name").val(),type:$("#type").val(),use_use:$("#use_use").val(),time:parseFloat($("#time").jqxNumberInput("decimal")),amount_is_weight:$("#amount_is_weight").val(),use_for:$("#use_for").val(),notes:$("#notes").val(),always_on_stock:$("#always_on_stock").val(),inventory:parseFloat($("#inventory").jqxNumberInput("decimal")),cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:$("#production_date").val(),tht_date:$("#tht_date").val()};if(d>=0){$("#jqxgrid").jqxGrid("updaterow",h,i)}else{$("#jqxgrid").jqxGrid("addrow",null,i)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_miscs.js --- a/www/js/inv_miscs.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_miscs.js Fri May 01 16:37:31 2020 +0200 @@ -20,336 +20,345 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } -$(document).ready(function () { +$(document).ready(function() { - function calcTotal(cost, inventory) { + function calcTotal(cost, inventory) { - $('#totval').val(cost * (inventory / 1000)); - } + $('#totval').val(cost * (inventory / 1000)); + } - function prompts(isweight) { + function prompts(isweight) { - if (isweight) { - $("#pmpt_cost").html('Prijs per kg:'); - $("#pmpt_inventory").html('Voorraad gram:'); - } else { - $("#pmpt_cost").html('Prijs per liter:'); - $("#pmpt_inventory").html('Voorraad ml:'); - } - } + if (isweight) { + $('#pmpt_cost').html('Prijs per kg:'); + $('#pmpt_inventory').html('Voorraad gram:'); + } else { + $('#pmpt_cost').html('Prijs per liter:'); + $('#pmpt_inventory').html('Voorraad ml:'); + } + } - var dataRecord = {}, - url = 'includes/db_inventory_miscs.php', - // prepare the data - source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'type', type: 'string' }, - { name: 'use_use', type: 'string' }, - { name: 'time', type: 'int' }, - { name: 'amount', type: 'float' }, - { name: 'amount_is_weight', type: 'int' }, - { name: 'use_for', type: 'string' }, - { name: 'notes', type: 'string' }, - { name: 'always_on_stock', type: 'int' }, - { name: 'inventory', type: 'float' }, - { name: 'cost', type: 'float' }, - { name: 'production_date', type: 'string' }, - { name: 'tht_date', type: 'string' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + var dataRecord = {}, + url = 'includes/db_inventory_miscs.php', + // prepare the data + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'type', type: 'string' }, + { name: 'use_use', type: 'string' }, + { name: 'time', type: 'int' }, + { name: 'amount', type: 'float' }, + { name: 'amount_is_weight', type: 'int' }, + { name: 'use_for', type: 'string' }, + { name: 'notes', type: 'string' }, + { name: 'always_on_stock', type: 'int' }, + { name: 'inventory', type: 'float' }, + { name: 'cost', type: 'float' }, + { name: 'production_date', type: 'string' }, + { name: 'tht_date', type: 'string' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + // synchronize with the server - send delete command + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#notes").jqxInput({ theme: theme, width: 800, height: 100 }); + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#notes').jqxInput({ theme: theme, width: 800, height: 100 }); - $("#type").jqxDropDownList({theme: theme, - source: MiscTypeAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#use_use").jqxDropDownList({ - theme: theme, - source: MiscUseAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#time").jqxNumberInput( PosInt ); - $("#amount_is_weight").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#use_for").jqxInput({ theme: theme, width: 640, height: 48 }); - $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#inventory").jqxNumberInput( Spin1dec ); - $("#production_date").jqxDateTimeInput( Dateopts ); - $("#cost").jqxNumberInput( Spin2dec ); - $("#tht_date").jqxDateTimeInput( Dateopts ); - $("#totval").jqxNumberInput( Show2dec ); + $('#type').jqxDropDownList({theme: theme, + source: MiscTypeAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#use_use').jqxDropDownList({ + theme: theme, + source: MiscUseAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#time').jqxNumberInput(PosInt); + $('#amount_is_weight').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#use_for').jqxInput({ theme: theme, width: 640, height: 48 }); + $('#always_on_stock').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#inventory').jqxNumberInput(Spin1dec); + $('#production_date').jqxDateTimeInput(Dateopts); + $('#cost').jqxNumberInput(Spin2dec); + $('#tht_date').jqxDateTimeInput(Dateopts); + $('#totval').jqxNumberInput(Show2dec); - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function (statusbar) { - var container, addButton, impButton; - container = $("
    "); - addButton = $("
    Nieuw
    "); - impButton = $("
    Import
    "); - container.append(addButton); - container.append(impButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val(''); - $("#type").val('Specerij'); - $("#use_use").val('Starter'); - $("#time").val(0); - $("#amount_is_weight").val(1); - $("#use_for").val(''); - $("#notes").val(''); - $("#always_on_stock").val(0); - $("#inventory").val(0); - $("#cost").val(0); - $("#production_date").val(''); - $("#tht_date").val(''); - $("#popupWindow").jqxWindow('open'); - }); - impButton.click(function (event) { - window.location.href = 'import_ingredients.php?select=miscs'; - }); - }, - filterable: true, - filtermode: 'excel', - columns: [ - { text: 'Ingredient naam', datafield: 'name', menu: false }, - { text: 'Type', datafield: 'type', align: 'left', width: 120 }, - { text: 'Gebruik', datafield: 'use_use', align: 'left', width: 120 }, - { text: 'Tijd', datafield: 'time', width: 90, align: 'left', menu: false, - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var duration = ""; - if (value > 0) { - if (value == 1) - duration = "1 minuut"; - else if (value < 60) - duration = dataAdapter.formatNumber(value, "f0")+" minuten"; - else if (value == 60) - duration = "1 uur"; - else if (value < 1440) - duration = dataAdapter.formatNumber(value / 60, "f0")+" uren"; - else if (value == 1440) - duration = "1 dag"; - else - duration = dataAdapter.formatNumber(value / 1440, "f0")+" dagen"; - } - return "" + duration + ""; - } - }, - { text: 'Voorraad', datafield: 'inventory', width: 110, menu: false, align: 'right', - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var amount = ""; - if (value > 0) { - if (rowdata.amount_is_weight) - amount = dataAdapter.formatNumber(value,"f1")+" gr"; - else - amount = dataAdapter.formatNumber(value,"f1")+" ml"; - } - return "" + amount + ""; - } - }, - { text: 'THT datum', datafield: 'tht_date', width: 100, menu: false, align: 'center', cellsalign: 'center' }, - { text: '', datafield: 'Edit', columntype: 'button', width: 100, menu: false, align: 'center', - cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - // get the clicked row's data and initialize the input fields. - dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#type").val(dataRecord.type); - $("#use_use").val(dataRecord.use_use); - $("#time").val(dataRecord.time); - $("#amount_is_weight").val(dataRecord.amount_is_weight); - $("#use_for").val(dataRecord.use_for); - $("#notes").val(dataRecord.notes); - $("#always_on_stock").val(dataRecord.always_on_stock); - $("#inventory").val(dataRecord.inventory); - $("#cost").val(dataRecord.cost); - $("#production_date").val(dataRecord.production_date); - $("#tht_date").val(dataRecord.tht_date); - calcTotal(dataRecord.cost, dataRecord.inventory); - prompts(dataRecord.amount_is_weight); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var container, addButton, impButton; + container = $('
    '); + addButton = $('
    Nieuw
    '); + impButton = $('
    Import
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(impButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + impButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val(''); + $('#type').val('Specerij'); + $('#use_use').val('Starter'); + $('#time').val(0); + $('#amount_is_weight').val(1); + $('#use_for').val(''); + $('#notes').val(''); + $('#always_on_stock').val(0); + $('#inventory').val(0); + $('#cost').val(0); + $('#production_date').val(''); + $('#tht_date').val(''); + $('#popupWindow').jqxWindow('open'); + }); + impButton.click(function(event) { + window.location.href = 'import_ingredients.php?select=miscs'; + }); + expButton.click(function(event) { + window.open('export_miscs.php'); + }); + }, + filterable: true, + filtermode: 'excel', + columns: [ + { text: 'Ingredient naam', datafield: 'name', menu: false }, + { text: 'Type', datafield: 'type', align: 'left', width: 120 }, + { text: 'Gebruik', datafield: 'use_use', align: 'left', width: 120 }, + { text: 'Tijd', datafield: 'time', width: 90, align: 'left', menu: false, + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var duration = ''; + if (value > 0) { + if (value == 1) + duration = '1 minuut'; + else if (value < 60) + duration = dataAdapter.formatNumber(value, 'f0') + ' minuten'; + else if (value == 60) + duration = '1 uur'; + else if (value < 1440) + duration = dataAdapter.formatNumber(value / 60, 'f0') + ' uren'; + else if (value == 1440) + duration = '1 dag'; + else + duration = dataAdapter.formatNumber(value / 1440, 'f0') + ' dagen'; + } + return '' + duration + ''; + } + }, + { text: 'Voorraad', datafield: 'inventory', width: 110, menu: false, align: 'right', + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var amount = ''; + if (value > 0) { + if (rowdata.amount_is_weight) + amount = dataAdapter.formatNumber(value, 'f1') + ' gr'; + else + amount = dataAdapter.formatNumber(value, 'f1') + ' ml'; + } + return '' + amount + ''; + } + }, + { text: 'THT datum', datafield: 'tht_date', width: 100, menu: false, align: 'center', cellsalign: 'center' }, + { text: '', datafield: 'Edit', columntype: 'button', width: 100, menu: false, align: 'center', + cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + // get the clicked row's data and initialize the input fields. + dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#type').val(dataRecord.type); + $('#use_use').val(dataRecord.use_use); + $('#time').val(dataRecord.time); + $('#amount_is_weight').val(dataRecord.amount_is_weight); + $('#use_for').val(dataRecord.use_for); + $('#notes').val(dataRecord.notes); + $('#always_on_stock').val(dataRecord.always_on_stock); + $('#inventory').val(dataRecord.inventory); + $('#cost').val(dataRecord.cost); + $('#production_date').val(dataRecord.production_date); + $('#tht_date').val(dataRecord.tht_date); + calcTotal(dataRecord.cost, dataRecord.inventory); + prompts(dataRecord.amount_is_weight); + // show the popup window. + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); - $("#cost").on('change', function (event) { - dataRecord.cost = parseFloat(event.args.value); - calcTotal(dataRecord.cost, dataRecord.inventory); - }); - $("#inventory").on('change', function (event) { - dataRecord.inventory = parseFloat(event.args.value); - calcTotal(dataRecord.cost, dataRecord.inventory); - }); - $("#amount_is_weight").on('checked', function (event) { - dataRecord.amount_is_weight = true; - prompts(true); - }); - $("#amount_is_weight").on('unchecked', function (event) { - dataRecord.amount_is_weight = false; - prompts(false); - }); + $('#cost').on('change', function(event) { + dataRecord.cost = parseFloat(event.args.value); + calcTotal(dataRecord.cost, dataRecord.inventory); + }); + $('#inventory').on('change', function(event) { + dataRecord.inventory = parseFloat(event.args.value); + calcTotal(dataRecord.cost, dataRecord.inventory); + }); + $('#amount_is_weight').on('checked', function(event) { + dataRecord.amount_is_weight = true; + prompts(true); + }); + $('#amount_is_weight').on('unchecked', function(event) { + dataRecord.amount_is_weight = false; + prompts(false); + }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 550, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function () { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function () { - var row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - row = { - record: rowID, - name: $("#name").val(), - type: $("#type").val(), - use_use: $("#use_use").val(), - time: parseFloat($("#time").jqxNumberInput('decimal')), - amount_is_weight: $("#amount_is_weight").val(), - use_for: $("#use_for").val(), - notes: $("#notes").val(), - always_on_stock: $("#always_on_stock").val(), - inventory: parseFloat($("#inventory").jqxNumberInput('decimal')), - cost: parseFloat($("#cost").jqxNumberInput('decimal')), - production_date: $("#production_date").val(), - tht_date: $("#tht_date").val() - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 550, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + row = { + record: rowID, + name: $('#name').val(), + type: $('#type').val(), + use_use: $('#use_use').val(), + time: parseFloat($('#time').jqxNumberInput('decimal')), + amount_is_weight: $('#amount_is_weight').val(), + use_for: $('#use_for').val(), + notes: $('#notes').val(), + always_on_stock: $('#always_on_stock').val(), + inventory: parseFloat($('#inventory').jqxNumberInput('decimal')), + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: $('#production_date').val(), + tht_date: $('#tht_date').val() + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_suppliers-min.js --- a/www/js/inv_suppliers-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){$("#name").jqxTooltip({content:"De naam van de leverancier."});$("#address").jqxTooltip({content:"Het adres en huisnummer."});$("#city").jqxTooltip({content:"De woonplaats of gemeente."});$("#zip").jqxTooltip({content:"De postcode."});$("#country").jqxTooltip({content:"Het land."});$("#website").jqxTooltip({content:"Het website adres."});$("#email").jqxTooltip({content:"Het email adres."});$("#phone").jqxTooltip({content:"Het telefoon nummer."});$("#notes").jqxTooltip({content:"Opmerkingen over deze leverancier."});var a="includes/db_inventory_suppliers.php",c={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"address",type:"string"},{name:"city",type:"string"},{name:"zip",type:"string"},{name:"country",type:"string"},{name:"website",type:"string"},{name:"email",type:"string"},{name:"phone",type:"string"},{name:"notes",type:"string"}],id:"record",url:a,deleterow:function(e,g){var f="delete=true&"+$.param({record:e});$.ajax({dataType:"json",url:a,cache:false,data:f,type:"POST",success:function(i,h,j){g(true);location.reload(true)},error:function(h,j,i){g(false)}})},addrow:function(f,i,e,h){var g="insert=true&"+$.param(i);$.ajax({dataType:"json",url:a,cache:false,data:g,type:"POST",success:function(k,j,l){h(true);location.reload(true)},error:function(j,l,k){h(false)}})},updaterow:function(e,h,g){var f="update=true&"+$.param(h);$.ajax({dataType:"json",url:a,cache:false,data:f,type:"POST",success:function(j,i,k){g(true);location.reload(true)},error:function(i,k,j){g(false)}})}},d=new $.jqx.dataAdapter(c),b=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#address").jqxInput({theme:theme,width:350,height:23});$("#zip").jqxInput({theme:theme,width:120,height:23});$("#city").jqxInput({theme:theme,width:350,height:23});$("#country").jqxInput({theme:theme,width:250,height:23});$("#website").jqxInput({theme:theme,width:640,height:23});$("#email").jqxInput({theme:theme,width:640,height:23});$("#phone").jqxInput({theme:theme,width:175,height:23});$("#notes").jqxInput({theme:theme,width:800,height:100});$("#jqxgrid").jqxGrid({width:1280,height:630,source:d,theme:theme,showstatusbar:true,renderstatusbar:function(g){var f,e=$("
    ");f=$("
    Nieuw
    ");e.append(f);g.append(e);f.jqxButton({theme:theme,width:90,height:20});f.click(function(h){b=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("Nieuwe leverancier");$("#address").val("");$("#city").val("");$("#zip").val("");$("#country").val("Nederland");$("#website").val("");$("#email").val("");$("#phone").val("");$("#notes").val("");$("#popupWindow").jqxWindow("open")})},filterable:false,columns:[{text:"Leverancier naam",datafield:"name"},{text:"Adres",datafield:"address",width:300},{text:"Plaats",datafield:"city",width:250},{text:"Land",datafield:"country",width:200},{text:"Telefoon",datafield:"phone",width:175},{text:"Wijzig",datafield:"Edit",width:100,align:"center",columntype:"button",cellsrenderer:function(){return"Wijzig"},buttonclick:function(f){b=f;$("#popupWindow").jqxWindow({position:{x:110,y:30}});var e=$("#jqxgrid").jqxGrid("getrowdata",b);$("#name").val(e.name);$("#address").val(e.address);$("#city").val(e.city);$("#zip").val(e.zip);$("#country").val(e.country);$("#website").val(e.website);$("#email").val(e.email);$("#phone").val(e.phone);$("#notes").val(e.notes);$("#popupWindow").jqxWindow("open")}}]});$("#popupWindow").jqxWindow({width:1050,height:550,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(b>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var e=$("#jqxgrid").jqxGrid("getrowid",b);$("#jqxgrid").jqxGrid("deleterow",e)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var f,e=-1;if(b>=0){e=$("#jqxgrid").jqxGrid("getrowid",b)}f={record:e,name:$("#name").val(),address:$("#address").val(),city:$("#city").val(),zip:$("#zip").val(),country:$("#country").val(),website:$("#website").val(),email:$("#email").val(),phone:$("#phone").val(),notes:$("#notes").val()};if(b>=0){$("#jqxgrid").jqxGrid("updaterow",e,f)}else{$("#jqxgrid").jqxGrid("addrow",null,f)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_suppliers.js --- a/www/js/inv_suppliers.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_suppliers.js Fri May 01 16:37:31 2020 +0200 @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (C) 2014-2019 - * + * * Michiel Broek * * This file is part of Brewery Management System @@ -14,7 +14,7 @@ * 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 ThermFerm; see the file COPYING. If not, write to the Free * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. @@ -23,239 +23,246 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } -$(document).ready(function () { +$(document).ready(function() { - // tooltips - $("#name").jqxTooltip({ content: 'De naam van de leverancier.' }); - $("#address").jqxTooltip({ content: 'Het adres en huisnummer.' }); - $("#city").jqxTooltip({ content: 'De woonplaats of gemeente.' }); - $("#zip").jqxTooltip({ content: 'De postcode.' }); - $("#country").jqxTooltip({ content: 'Het land.' }); - $("#website").jqxTooltip({ content: 'Het website adres.' }); - $("#email").jqxTooltip({ content: 'Het email adres.' }); - $("#phone").jqxTooltip({ content: 'Het telefoon nummer.' }); - $("#notes").jqxTooltip({ content: 'Opmerkingen over deze leverancier.' }); + // tooltips + $('#name').jqxTooltip({ content: 'De naam van de leverancier.' }); + $('#address').jqxTooltip({ content: 'Het adres en huisnummer.' }); + $('#city').jqxTooltip({ content: 'De woonplaats of gemeente.' }); + $('#zip').jqxTooltip({ content: 'De postcode.' }); + $('#country').jqxTooltip({ content: 'Het land.' }); + $('#website').jqxTooltip({ content: 'Het website adres.' }); + $('#email').jqxTooltip({ content: 'Het email adres.' }); + $('#phone').jqxTooltip({ content: 'Het telefoon nummer.' }); + $('#notes').jqxTooltip({ content: 'Opmerkingen over deze leverancier.' }); - var url = 'includes/db_inventory_suppliers.php', - // prepare the data - source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'address', type: 'string' }, - { name: 'city', type: 'string' }, - { name: 'zip', type: 'string' }, - { name: 'country', type: 'string' }, - { name: 'website', type: 'string' }, - { name: 'email', type: 'string' }, - { name: 'phone', type: 'string' }, - { name: 'notes', type: 'string' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), + var url = 'includes/db_inventory_suppliers.php', + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'address', type: 'string' }, + { name: 'city', type: 'string' }, + { name: 'zip', type: 'string' }, + { name: 'country', type: 'string' }, + { name: 'website', type: 'string' }, + { name: 'email', type: 'string' }, + { name: 'phone', type: 'string' }, + { name: 'notes', type: 'string' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + // synchronize with the server - send delete command + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), editrow = -1; - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#address").jqxInput({ theme: theme, width: 350, height: 23 }); - $("#zip").jqxInput({ theme: theme, width: 120, height: 23 }); - $("#city").jqxInput({ theme: theme, width: 350, height: 23 }); - $("#country").jqxInput({ theme: theme, width: 250, height: 23 }); - $("#website").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#email").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#phone").jqxInput({ theme: theme, width: 175, height: 23 }); - $("#notes").jqxInput({ theme: theme, width: 800, height: 100 }); + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#address').jqxInput({ theme: theme, width: 350, height: 23 }); + $('#zip').jqxInput({ theme: theme, width: 120, height: 23 }); + $('#city').jqxInput({ theme: theme, width: 350, height: 23 }); + $('#country').jqxInput({ theme: theme, width: 250, height: 23 }); + $('#website').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#email').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#phone').jqxInput({ theme: theme, width: 175, height: 23 }); + $('#notes').jqxInput({ theme: theme, width: 800, height: 100 }); - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function (statusbar) { - var addButton, container = $("
    "); - addButton = $("
    Nieuw
    "); - container.append(addButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val('Nieuwe leverancier'); - $("#address").val(''); - $("#city").val(''); - $("#zip").val(''); - $("#country").val('Nederland'); - $("#website").val(''); - $("#email").val(''); - $("#phone").val(''); - $("#notes").val(''); - $("#popupWindow").jqxWindow('open'); - }); - }, - filterable: false, - columns: [ - { text: 'Leverancier naam', datafield: 'name' }, - { text: 'Adres', datafield: 'address', width: 300 }, - { text: 'Plaats', datafield: 'city', width: 250 }, - { text: 'Land', datafield: 'country', width: 200 }, - { text: 'Telefoon', datafield: 'phone', width: 175 }, - { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', - cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - // get the clicked row's data and initialize the input fields. - var dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#address").val(dataRecord.address); - $("#city").val(dataRecord.city); - $("#zip").val(dataRecord.zip); - $("#country").val(dataRecord.country); - $("#website").val(dataRecord.website); - $("#email").val(dataRecord.email); - $("#phone").val(dataRecord.phone); - $("#notes").val(dataRecord.notes); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 550, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function () { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function () { - var row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - row = { - record: rowID, - name: $("#name").val(), - address: $("#address").val(), - city: $("#city").val(), - zip: $("#zip").val(), - country: $("#country").val(), - website: $("#website").val(), - email: $("#email").val(), - phone: $("#phone").val(), - notes: $("#notes").val() - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var addButton, container = $('
    '); + addButton = $('
    Nieuw
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val('Nieuwe leverancier'); + $('#address').val(''); + $('#city').val(''); + $('#zip').val(''); + $('#country').val('Nederland'); + $('#website').val(''); + $('#email').val(''); + $('#phone').val(''); + $('#notes').val(''); + $('#popupWindow').jqxWindow('open'); + }); + expButton.click(function(event) { + window.open('export_suppliers.php'); + }); + }, + filterable: false, + columns: [ + { text: 'Leverancier naam', datafield: 'name' }, + { text: 'Adres', datafield: 'address', width: 300 }, + { text: 'Plaats', datafield: 'city', width: 250 }, + { text: 'Land', datafield: 'country', width: 200 }, + { text: 'Telefoon', datafield: 'phone', width: 175 }, + { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', + cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + // get the clicked row's data and initialize the input fields. + var dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#address').val(dataRecord.address); + $('#city').val(dataRecord.city); + $('#zip').val(dataRecord.zip); + $('#country').val(dataRecord.country); + $('#website').val(dataRecord.website); + $('#email').val(dataRecord.email); + $('#phone').val(dataRecord.phone); + $('#notes').val(dataRecord.notes); + // show the popup window. + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 550, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + row = { + record: rowID, + name: $('#name').val(), + address: $('#address').val(), + city: $('#city').val(), + zip: $('#zip').val(), + country: $('#country').val(), + website: $('#website').val(), + email: $('#email').val(), + phone: $('#phone').val(), + notes: $('#notes').val() + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_waters-min.js --- a/www/js/inv_waters-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){$("#name").jqxTooltip({content:"De unieke naam van dit brouwwater."});$("#notes").jqxTooltip({content:"Extra opmerkingen over dit water."});$("#unlimited_stock").jqxTooltip({content:"Onbeperkte voorraad zoals kraanwater en bronnen."});$("#calcium").jqxTooltip({content:"Calcium (Ca)."});$("#bicarbonate").jqxTooltip({content:"Bicarbonaat (HCO3). Berekend meteen de Totale alkaliteit."});$("#sulfate").jqxTooltip({content:"Calcium Sulfaat (CaSO4)."});$("#chloride").jqxTooltip({content:"Chloride (Cl)."});$("#sodium").jqxTooltip({content:"Natrium, oftewel keukenzout (Na). In berekeningen ook vaak als Sodium."});$("#magnesium").jqxTooltip({content:"Magnesium (Mg)."});$("#ph").jqxTooltip({content:"De zuurgraad (pH)."});$("#total_alkalinity").jqxTooltip({content:"Totale alkaliniteit. Berekend meteen de Bicarbonaat."});$("#inventory").jqxTooltip({content:"Voorraad in liters."});$("#cost").jqxTooltip({content:"Kostprijs per liter. 5 cijfers achter de comma zodat het kraanwater er ook in kan."});var b={},a="includes/db_inventory_water.php",d={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"unlimited_stock",type:"int"},{name:"calcium",type:"float"},{name:"bicarbonate",type:"float"},{name:"sulfate",type:"float"},{name:"chloride",type:"float"},{name:"sodium",type:"float"},{name:"magnesium",type:"float"},{name:"ph",type:"float"},{name:"notes",type:"string"},{name:"total_alkalinity",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],id:"record",url:a,deleterow:function(f,h){var g="delete=true&"+$.param({record:f});$.ajax({dataType:"json",url:a,cache:false,data:g,type:"POST",success:function(j,i,k){h(true);location.reload(true)},error:function(i,k,j){h(false)}})},addrow:function(g,j,f,i){var h="insert=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})},updaterow:function(f,i,h){var g="update=true&"+$.param(i);$.ajax({dataType:"json",url:a,cache:false,data:g,type:"POST",success:function(k,j,l){h(true);location.reload(true)},error:function(j,l,k){h(false)}})}},e=new $.jqx.dataAdapter(d),c=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#notes").jqxInput({theme:theme,width:640,height:100});$("#unlimited_stock").jqxCheckBox({theme:theme,width:120,height:23});$("#calcium").jqxNumberInput(Spin1dec);$("#bicarbonate").jqxNumberInput(Spin1dec);$("#sulfate").jqxNumberInput(Spin1dec);$("#chloride").jqxNumberInput(Spin1dec);$("#sodium").jqxNumberInput(Spin1dec);$("#magnesium").jqxNumberInput(Spin1dec);$("#ph").jqxNumberInput(Spin2pH);$("#total_alkalinity").jqxNumberInput(Spin1dec);$("#inventory").jqxNumberInput(Spin1dec);$("#cost").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:5,spinButtons:true});$("#jqxgrid").jqxGrid({width:1280,height:630,source:e,theme:theme,showstatusbar:true,renderstatusbar:function(h){var g,f=$("
    ");g=$("
    Nieuw
    ");f.append(g);h.append(f);g.jqxButton({theme:theme,width:90,height:20});g.click(function(i){c=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("Nieuw brouwwater");$("#unlimited_stock").val(0);$("#calcium").val(0);$("#bicarbonate").val(0);$("#sulfate").val(0);$("#chloride").val(0);$("#sodium").val(0);$("#magnesium").val(0);$("#ph").val(7);$("#notes").val("");$("#total_alkalinity").val(0);$("#inventory").val(0);$("#cost").val(0);$("#popupWindow").jqxWindow("open")})},filterable:false,columns:[{text:"Water leverancier",datafield:"name",width:225},{text:"Opmerkingen",datafield:"notes"},{text:"Onbeperkt",datafield:"unlimited_stock",columntype:"checkbox",width:80},{text:"Voorraad",datafield:"inventory",width:100,align:"right",cellsalign:"right",cellsformat:"f1",cellsrenderer:function(g,f,k,j,i,l){var h="";if(k>0&&l.unlimited_stock==0){h=e.formatNumber(k,"f1")+" L"}return""+h+""}},{text:"",datafield:"Edit",width:100,align:"center",columntype:"button",cellsrenderer:function(){return"Wijzig"},buttonclick:function(f){c=f;$("#popupWindow").jqxWindow({position:{x:110,y:30}});b=$("#jqxgrid").jqxGrid("getrowdata",c);$("#name").val(b.name);$("#unlimited_stock").val(b.unlimited_stock);$("#calcium").val(b.calcium);$("#bicarbonate").val(b.bicarbonate);$("#sulfate").val(b.sulfate);$("#chloride").val(b.chloride);$("#sodium").val(b.sodium);$("#magnesium").val(b.magnesium);$("#ph").val(b.ph);$("#notes").val(b.notes);$("#total_alkalinity").val(b.total_alkalinity);$("#inventory").val(b.inventory);$("#cost").val(b.cost);$("#popupWindow").jqxWindow("open")}}]});$("#total_alkalinity").on("change",function(f){b.bicarbonate=parseFloat(f.args.value)*1.22;$("#bicarbonate").val(b.bicarbonate)});$("#bicarbonate").on("change",function(f){b.total_alkalinity=parseFloat(f.args.value)*50/61;$("#total_alkalinity").val(b.total_alkalinity)});$("#popupWindow").jqxWindow({width:1050,height:550,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(c>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var f=$("#jqxgrid").jqxGrid("getrowid",c);$("#jqxgrid").jqxGrid("deleterow",f)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var g,f=-1;if(c>=0){f=$("#jqxgrid").jqxGrid("getrowid",c)}g={record:f,name:$("#name").val(),unlimited_stock:$("#unlimited_stock").val(),calcium:parseFloat($("#calcium").jqxNumberInput("decimal")),bicarbonate:parseFloat($("#bicarbonate").jqxNumberInput("decimal")),sulfate:parseFloat($("#sulfate").jqxNumberInput("decimal")),chloride:parseFloat($("#chloride").jqxNumberInput("decimal")),sodium:parseFloat($("#sodium").jqxNumberInput("decimal")),magnesium:parseFloat($("#magnesium").jqxNumberInput("decimal")),ph:parseFloat($("#ph").jqxNumberInput("decimal")),notes:$("#notes").val(),total_alkalinity:parseFloat($("#total_alkalinity").jqxNumberInput("decimal")),inventory:parseFloat($("#inventory").jqxNumberInput("decimal")),cost:parseFloat($("#cost").jqxNumberInput("decimal"))};if(c>=0){$("#jqxgrid").jqxGrid("updaterow",f,g)}else{$("#jqxgrid").jqxGrid("addrow",null,g)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_waters.js --- a/www/js/inv_waters.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_waters.js Fri May 01 16:37:31 2020 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * @@ -22,279 +22,327 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } -$(document).ready(function () { +$(document).ready(function() { + + // tooltips + $('#name').jqxTooltip({ content: 'De unieke naam van dit brouwwater.' }); + $('#notes').jqxTooltip({ content: 'Extra opmerkingen over dit water.' }); + $('#unlimited_stock').jqxTooltip({ content: 'Onbeperkte voorraad zoals kraanwater en bronnen.' }); + $('#calcium').jqxTooltip({ content: 'Calcium (Ca).' }); + $('#bicarbonate').jqxTooltip({ content: 'Bicarbonaat (HCO3). Berekend meteen de Totale alkaliteit.' }); + $('#sulfate').jqxTooltip({ content: 'Calcium Sulfaat (CaSO4).' }); + $('#chloride').jqxTooltip({ content: 'Chloride (Cl).' }); + $('#sodium').jqxTooltip({ content: 'Natrium, oftewel keukenzout (Na). In berekeningen ook vaak als Sodium.' }); + $('#magnesium').jqxTooltip({ content: 'Magnesium (Mg).' }); + $('#ph').jqxTooltip({ content: 'De zuurgraad (pH).' }); + $('#total_alkalinity').jqxTooltip({ content: 'Totale alkaliniteit. Berekend meteen de Bicarbonaat.' }); + $('#balance').jqxTooltip({ content: 'De ionen balans van het water. Ideaal minder dan 0.1 verschil tussen kationen en anionen. Meer dan 0.5 is een fout in het waterraport.' }); + $('#inventory').jqxTooltip({ content: 'Voorraad in liters.' }); + $('#cost').jqxTooltip({ content: 'Kostprijs per liter. 5 cijfers achter de comma zodat het kraanwater er ook in kan.' }); - // tooltips - $("#name").jqxTooltip({ content: 'De unieke naam van dit brouwwater.' }); - $("#notes").jqxTooltip({ content: 'Extra opmerkingen over dit water.' }); - $("#unlimited_stock").jqxTooltip({ content: 'Onbeperkte voorraad zoals kraanwater en bronnen.' }); - $("#calcium").jqxTooltip({ content: 'Calcium (Ca).' }); - $("#bicarbonate").jqxTooltip({ content: 'Bicarbonaat (HCO3). Berekend meteen de Totale alkaliteit.' }); - $("#sulfate").jqxTooltip({ content: 'Calcium Sulfaat (CaSO4).' }); - $("#chloride").jqxTooltip({ content: 'Chloride (Cl).' }); - $("#sodium").jqxTooltip({ content: 'Natrium, oftewel keukenzout (Na). In berekeningen ook vaak als Sodium.' }); - $("#magnesium").jqxTooltip({ content: 'Magnesium (Mg).' }); - $("#ph").jqxTooltip({ content: 'De zuurgraad (pH).' }); - $("#total_alkalinity").jqxTooltip({ content: 'Totale alkaliniteit. Berekend meteen de Bicarbonaat.' }); - $("#inventory").jqxTooltip({ content: 'Voorraad in liters.' }); - $("#cost").jqxTooltip({ content: 'Kostprijs per liter. 5 cijfers achter de comma zodat het kraanwater er ook in kan.' }); - - var dataRecord = {}, - url = 'includes/db_inventory_water.php', - // prepare the data - source = { - datatype: "json", - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'unlimited_stock', type: 'int' }, - { name: 'calcium', type: 'float' }, - { name: 'bicarbonate', type: 'float' }, - { name: 'sulfate', type: 'float' }, - { name: 'chloride', type: 'float' }, - { name: 'sodium', type: 'float' }, - { name: 'magnesium', type: 'float' }, - { name: 'ph', type: 'float' }, - { name: 'notes', type: 'string' }, - { name: 'total_alkalinity', type: 'float' }, - { name: 'inventory', type: 'float' }, - { name: 'cost', type: 'float' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + var dataRecord = {}, + url = 'includes/db_inventory_water.php', + // prepare the data + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'unlimited_stock', type: 'int' }, + { name: 'calcium', type: 'float' }, + { name: 'bicarbonate', type: 'float' }, + { name: 'sulfate', type: 'float' }, + { name: 'chloride', type: 'float' }, + { name: 'sodium', type: 'float' }, + { name: 'magnesium', type: 'float' }, + { name: 'ph', type: 'float' }, + { name: 'notes', type: 'string' }, + { name: 'total_alkalinity', type: 'float' }, + { name: 'inventory', type: 'float' }, + { name: 'cost', type: 'float' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + // synchronize with the server - send delete command + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; + + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#notes').jqxInput({ theme: theme, width: 640, height: 100 }); + $('#unlimited_stock').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#calcium').jqxNumberInput(Spin1dec); + $('#bicarbonate').jqxNumberInput(Spin1dec); + $('#sulfate').jqxNumberInput(Spin1dec); + $('#chloride').jqxNumberInput(Spin1dec); + $('#sodium').jqxNumberInput(Spin1dec); + $('#magnesium').jqxNumberInput(Spin1dec); + $('#ph').jqxNumberInput(Spin2pH); + $('#total_alkalinity').jqxNumberInput(Spin1dec); + $('#balance').jqxNumberInput(Show2dec); + $('#inventory').jqxNumberInput(Spin1dec); + $('#cost').jqxNumberInput({inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 5, spinButtons: true }); - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); - $("#unlimited_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#calcium").jqxNumberInput( Spin1dec ); - $("#bicarbonate").jqxNumberInput( Spin1dec ); - $("#sulfate").jqxNumberInput( Spin1dec ); - $("#chloride").jqxNumberInput( Spin1dec ); - $("#sodium").jqxNumberInput( Spin1dec ); - $("#magnesium").jqxNumberInput( Spin1dec ); - $("#ph").jqxNumberInput( Spin2pH ); - $("#total_alkalinity").jqxNumberInput( Spin1dec ); - $("#inventory").jqxNumberInput( Spin1dec ); - $("#cost").jqxNumberInput({inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 5, spinButtons: true }); - - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function (statusbar) { - var addButton, container = $("
    "); - addButton = $("
    Nieuw
    "); - container.append(addButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val('Nieuw brouwwater'); - $("#unlimited_stock").val(0); - $("#calcium").val(0); - $("#bicarbonate").val(0); - $("#sulfate").val(0); - $("#chloride").val(0); - $("#sodium").val(0); - $("#magnesium").val(0); - $("#ph").val(7); - $("#notes").val(''); - $("#total_alkalinity").val(0); - $("#inventory").val(0); - $("#cost").val(0); - $("#popupWindow").jqxWindow('open'); - }); - }, - filterable: false, - columns: [ - { text: 'Water leverancier', datafield: 'name', width: 225 }, - { text: 'Opmerkingen', datafield: 'notes' }, - { text: 'Onbeperkt', datafield: 'unlimited_stock', columntype: 'checkbox', width: 80 }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var amount = ""; - if (value > 0 && rowdata.unlimited_stock == 0) - amount = dataAdapter.formatNumber(value,"f1")+" L"; - return "" + amount + ""; - } - }, - { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', - cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - // get the clicked row's data and initialize the input fields. - dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#unlimited_stock").val(dataRecord.unlimited_stock); - $("#calcium").val(dataRecord.calcium); - $("#bicarbonate").val(dataRecord.bicarbonate); - $("#sulfate").val(dataRecord.sulfate); - $("#chloride").val(dataRecord.chloride); - $("#sodium").val(dataRecord.sodium); - $("#magnesium").val(dataRecord.magnesium); - $("#ph").val(dataRecord.ph); - $("#notes").val(dataRecord.notes); - $("#total_alkalinity").val(dataRecord.total_alkalinity); - $("#inventory").val(dataRecord.inventory); - $("#cost").val(dataRecord.cost); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var addButton, container = $('
    '); + addButton = $('
    Nieuw
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val('Nieuw brouwwater'); + $('#unlimited_stock').val(0); + $('#calcium').val(0); + $('#bicarbonate').val(0); + $('#sulfate').val(0); + $('#chloride').val(0); + $('#sodium').val(0); + $('#magnesium').val(0); + $('#ph').val(7); + $('#notes').val(''); + $('#total_alkalinity').val(0); + $('#inventory').val(0); + $('#cost').val(0); + $('#popupWindow').jqxWindow('open'); + }); + expButton.click(function(event) { + window.open('export_waters.php'); + }); + }, + filterable: false, + columns: [ + { text: 'Water leverancier', datafield: 'name', width: 225 }, + { text: 'Opmerkingen', datafield: 'notes' }, + { text: 'Onbeperkt', datafield: 'unlimited_stock', columntype: 'checkbox', width: 80 }, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var amount = ''; + if (value > 0 && rowdata.unlimited_stock == 0) + amount = dataAdapter.formatNumber(value, 'f1') + ' L'; + return '' + amount + ''; + } + }, + { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', + cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + // get the clicked row's data and initialize the input fields. + dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#unlimited_stock').val(dataRecord.unlimited_stock); + $('#calcium').val(dataRecord.calcium); + $('#bicarbonate').val(dataRecord.bicarbonate); + $('#sulfate').val(dataRecord.sulfate); + $('#chloride').val(dataRecord.chloride); + $('#sodium').val(dataRecord.sodium); + $('#magnesium').val(dataRecord.magnesium); + $('#ph').val(dataRecord.ph); + $('#notes').val(dataRecord.notes); + $('#total_alkalinity').val(dataRecord.total_alkalinity); + $('#inventory').val(dataRecord.inventory); + $('#cost').val(dataRecord.cost); + // show the popup window. + calcBalance(); + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); - $("#total_alkalinity").on('change', function (event) { - dataRecord.bicarbonate = parseFloat(event.args.value) * 1.22; - $("#bicarbonate").val(dataRecord.bicarbonate); - }); - $("#bicarbonate").on('change', function (event) { - dataRecord.total_alkalinity = parseFloat(event.args.value) * 50 / 61; - $("#total_alkalinity").val(dataRecord.total_alkalinity); - }); + function calcBalance() { + var cations = (dataRecord.calcium / 20.039) + (dataRecord.magnesium / 12.1525) + (dataRecord.sodium / 22.989); + var anions = (dataRecord.bicarbonate / 61.016) + (dataRecord.sulfate / 48.031) + (dataRecord.chloride / 35.4527); + var balance = Round(cations - anions, 2); + $('#balance').val(balance); + if (balance <= 0.1 && balance >= -0.1) + $('#wr_balance').html(""); + else if (balance <= 0.5 && balance >= -0.5) + $('#wr_balance').html(""); + else + $('#wr_balance').html(""); + } + + $('#calcium').on('change', function(event) { + dataRecord.calcium = parseFloat(event.args.value); + calcBalance(); + }); + $('#magnesium').on('change', function(event) { + dataRecord.magnesium = parseFloat(event.args.value); + calcBalance(); + }); + $('#sodium').on('change', function(event) { + dataRecord.sodium = parseFloat(event.args.value); + calcBalance(); + }); + $('#total_alkalinity').on('change', function(event) { + dataRecord.total_alkalinity = parseFloat(event.args.value); + dataRecord.bicarbonate = parseFloat(event.args.value) * 1.22; + $('#bicarbonate').val(dataRecord.bicarbonate); + calcBalance(); + }); + $('#bicarbonate').on('change', function(event) { + dataRecord.bicarbonate = parseFloat(event.args.value); + dataRecord.total_alkalinity = parseFloat(event.args.value) * 50 / 61; + $('#total_alkalinity').val(dataRecord.total_alkalinity); + calcBalance(); + }); + $('#sulfate').on('change', function(event) { + dataRecord.sulfate = parseFloat(event.args.value); + calcBalance(); + }); + $('#chloride').on('change', function(event) { + dataRecord.chloride = parseFloat(event.args.value); + calcBalance(); + }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 550, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function () { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function () { - var row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - row = { - record: rowID, - name: $("#name").val(), - unlimited_stock: $("#unlimited_stock").val(), - calcium: parseFloat($("#calcium").jqxNumberInput('decimal')), - bicarbonate: parseFloat($("#bicarbonate").jqxNumberInput('decimal')), - sulfate: parseFloat($("#sulfate").jqxNumberInput('decimal')), - chloride: parseFloat($("#chloride").jqxNumberInput('decimal')), - sodium: parseFloat($("#sodium").jqxNumberInput('decimal')), - magnesium: parseFloat($("#magnesium").jqxNumberInput('decimal')), - ph: parseFloat($("#ph").jqxNumberInput('decimal')), - notes: $("#notes").val(), - total_alkalinity: parseFloat($("#total_alkalinity").jqxNumberInput('decimal')), - inventory: parseFloat($("#inventory").jqxNumberInput('decimal')), - cost: parseFloat($("#cost").jqxNumberInput('decimal')) - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 550, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + row = { + record: rowID, + name: $('#name').val(), + unlimited_stock: $('#unlimited_stock').val(), + calcium: parseFloat($('#calcium').jqxNumberInput('decimal')), + bicarbonate: parseFloat($('#bicarbonate').jqxNumberInput('decimal')), + sulfate: parseFloat($('#sulfate').jqxNumberInput('decimal')), + chloride: parseFloat($('#chloride').jqxNumberInput('decimal')), + sodium: parseFloat($('#sodium').jqxNumberInput('decimal')), + magnesium: parseFloat($('#magnesium').jqxNumberInput('decimal')), + ph: parseFloat($('#ph').jqxNumberInput('decimal')), + notes: $('#notes').val(), + total_alkalinity: parseFloat($('#total_alkalinity').jqxNumberInput('decimal')), + inventory: parseFloat($('#inventory').jqxNumberInput('decimal')), + cost: parseFloat($('#cost').jqxNumberInput('decimal')) + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_yeasts-min.js --- a/www/js/inv_yeasts-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function d(){$("#totval").val(b.cost*b.inventory);if(b.form=="Vloeibaar"){$("#pmpt_cost").html("Prijs per pak:");$("#pmpt_inventory").html("Voorraad pak(ken):");$("#pmpt_cells").html("Miljard cellen per pak:");$("#inventory").jqxNumberInput({decimalDigits:0})}else{if(b.form=="Droog"||b.form=="Gedroogd"){$("#pmpt_cost").html("Prijs per kg:");$("#pmpt_inventory").html("Voorraad gram:");$("#pmpt_cells").html("Miljard cellen per gram:");$("#inventory").jqxNumberInput({decimalDigits:1})}else{$("#pmpt_cost").html("Prijs per liter:");$("#pmpt_inventory").html("Voorraad ml:");$("#pmpt_cells").html("Miljard cellen per ml:");$("#inventory").jqxNumberInput({decimalDigits:1})}}}var b={},a="includes/db_inventory_yeasts.php",e={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"string"},{name:"form",type:"string"},{name:"laboratory",type:"string"},{name:"product_id",type:"string"},{name:"min_temperature",type:"float"},{name:"max_temperature",type:"float"},{name:"flocculation",type:"int"},{name:"attenuation",type:"float"},{name:"notes",type:"string"},{name:"best_for",type:"string"},{name:"max_reuse",type:"int"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"production_date",type:"string"},{name:"tht_date",type:"string"},{name:"cells",type:"float"},{name:"tolerance",type:"float"},{name:"sta1",type:"int"},{name:"bacteria",type:"int"},{name:"harvest_top",type:"int"},{name:"harvest_time",type:"int"},{name:"pitch_temperature",type:"float"},{name:"pofpos",type:"int"},{name:"zymocide",type:"int"}],id:"record",url:a,deleterow:function(g,i){var h="delete=true&"+$.param({record:g});$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(k,j,l){i(true);location.reload(true)},error:function(j,l,k){i(false)}})},addrow:function(h,k,g,j){var i="insert=true&"+$.param(k);$.ajax({dataType:"json",url:a,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})},updaterow:function(g,j,i){var h="update=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})}},f=new $.jqx.dataAdapter(e),c=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#laboratory").jqxInput({theme:theme,width:320,height:23});$("#product_id").jqxInput({theme:theme,width:320,height:23});$("#type").jqxDropDownList({theme:theme,source:YeastTypeAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#form").jqxDropDownList({theme:theme,source:YeastFormAdapter,valueMember:"nl",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#notes").jqxInput({theme:theme,width:800,height:120});$("#best_for").jqxInput({theme:theme,width:320,height:100});$("#inventory").jqxNumberInput(Spin1dec);$("#production_date").jqxDateTimeInput(Dateopts);$("#min_temperature").jqxNumberInput(YeastT);$("#max_temperature").jqxNumberInput(YeastT);$("#flocculation").jqxDropDownList({theme:theme,source:FlocculationAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#attenuation").jqxNumberInput(Perc1dec);$("#max_reuse").jqxNumberInput(PosInt);$("#max_reuse").jqxNumberInput({max:10});$("#cost").jqxNumberInput(Spin2dec);$("#tht_date").jqxDateTimeInput(Dateopts);$("#totval").jqxNumberInput(Show2dec);$("#cells").jqxNumberInput(Spin1dec);$("#tolerance").jqxNumberInput(Perc1dec);$("#tolerance").jqxNumberInput({max:25});$("#sta1").jqxCheckBox({theme:theme,width:120,height:23});$("#sta1").on("checked",function(g){b.sta1=1});$("#sta1").on("unchecked",function(g){b.sta1=0});$("#bacteria").jqxCheckBox({theme:theme,width:120,height:23});$("#bacteria").on("checked",function(g){b.bacteria=1});$("#bacteria").on("unchecked",function(g){b.bacteria=0});$("#harvest_top").jqxCheckBox({theme:theme,width:120,height:23});$("#harvest_top").on("checked",function(g){b.harvest_top=1});$("#harvest_top").on("unchecked",function(g){b.harvest_top=0});$("#harvest_time").jqxNumberInput(PosInt);$("#pitch_temperature").jqxNumberInput(YeastT);$("#pofpos").jqxCheckBox({theme:theme,width:120,height:23});$("#pofpos").on("checked",function(g){b.pofpos=1});$("#pofpos").on("unchecked",function(g){b.pofpos=0});$("#zymocide").jqxDropDownList({theme:theme,source:ZymocideAdapter,valueMember:"id",displayMember:"nl",width:80,height:23,autoDropDownHeight:true});$("#jqxgrid").jqxGrid({width:1280,height:630,source:f,theme:theme,showstatusbar:true,renderstatusbar:function(i){var g,h,j;g=$("
    ");h=$("
    Nieuw
    ");j=$("
    Import
    ");g.append(h);g.append(j);i.append(g);h.jqxButton({theme:theme,width:90,height:20});j.jqxButton({theme:theme,width:90,height:20});h.click(function(k){c=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("");$("#laboratory").val("");$("#product_id").val("");$("#type").val("Bovengist");$("#form").val("Vloeibaar");$("#min_temperature").val(18);$("#max_temperature").val(22);$("#flocculation").val(0);$("#attenuation").val(77);$("#notes").val("");$("#best_for").val("");$("#max_reuse").val(10);$("#inventory").val(0);$("#cost").val(0);$("#production_date").val("");$("#tht_date").val("");$("#cells").val(1);$("#tolerance").val(0);$("#sta1").val(0);$("#bacteria").val(0);$("#harvest_top").val(0);$("#harvest_time").val(0);$("#pitch_temperature").val(0);$("#pofpos").val(0);$("#zymocide").val(0);$("#popupWindow").jqxWindow("open")});j.click(function(k){window.location.href="import_ingredients.php?select=yeasts"})},filterable:true,filtermode:"excel",columns:[{text:"Laboratorium",datafield:"laboratory",width:150},{text:"Product ID",datafield:"product_id",width:120,menu:false},{text:"Gist naam",datafield:"name",menu:false},{text:"Type",datafield:"type",align:"center",cellsalign:"center",width:110},{text:"Vorm",datafield:"form",align:"center",cellsalign:"center",width:110},{text:"SVG",datafield:"attenuation",width:70,align:"right",cellsalign:"right",menu:false,cellsformat:"p1"},{text:"Tol%",datafield:"tolerance",width:60,align:"right",cellsalign:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){i=f.formatNumber(l,"p0")}return''+i+""}},{text:"Voorraad",datafield:"inventory",width:100,align:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){if((m.form=="Vloeibaar")&&(l>1)){i=f.formatNumber(l,"f0")+" pakken"}else{if(m.form=="Vloeibaar"){i=f.formatNumber(l,"f0")+" pak"}else{if(m.form=="Droog"||m.form=="Gedroogd"){i=f.formatNumber(l*1000,"f1")+" gram"}else{i=f.formatNumber(l*1000,"f1")+" ml"}}}}return""+i+""}},{text:"",datafield:"Edit",columntype:"button",width:100,align:"center",menu:false,cellsrenderer:function(){return"Wijzig"},buttonclick:function(g){c=g;$("#popupWindow").jqxWindow({position:{x:110,y:15}});b=$("#jqxgrid").jqxGrid("getrowdata",c);$("#name").val(b.name);$("#laboratory").val(b.laboratory);$("#product_id").val(b.product_id);$("#type").val(b.type);$("#form").val(b.form);$("#min_temperature").val(parseFloat(b.min_temperature));$("#max_temperature").val(parseFloat(b.max_temperature));$("#flocculation").val(b.flocculation);$("#attenuation").val(b.attenuation);$("#notes").val(b.notes);$("#best_for").val(b.best_for);$("#max_reuse").val(b.max_reuse);if(b.form=="Vloeibaar"){$("#inventory").val(b.inventory)}else{$("#inventory").val(b.inventory*1000)}$("#cost").val(b.cost);$("#production_date").val(b.production_date);$("#tht_date").val(b.tht_date);$("#cells").val(b.cells);$("#tolerance").val(b.tolerance);$("#sta1").val(b.sta1);$("#bacteria").val(b.bacteria);$("#harvest_top").val(b.harvest_top);$("#harvest_time").val(b.harvest_time);$("#pitch_temperature").val(parseFloat(b.pitch_temperature));$("#pofpos").val(b.pofpos);$("#zymocide").val(b.zymocide);d();$("#popupWindow").jqxWindow("open")}}]});$("#popupWindow").on("open",function(g){d()});$("#cost").on("change",function(g){b.cost=parseFloat(g.args.value);d()});$("#inventory").on("change",function(g){if(b.form=="Vloeibaar"){b.inventory=parseFloat(g.args.value)}else{b.inventory=parseFloat(g.args.value)/1000}d()});$("#form").on("select",function(g){b.form=$("#form").val();d()});$("#popupWindow").jqxWindow({width:1050,height:625,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(c>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var g=$("#jqxgrid").jqxGrid("getrowid",c);$("#jqxgrid").jqxGrid("deleterow",g)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Clone").jqxButton({template:"warning",width:"90px",theme:theme});$("#Clone").click(function(){var g={record:-1,name:$("#name").val()+" kopie",type:$("#type").val(),form:$("#form").val(),laboratory:$("#laboratory").val(),product_id:$("#product_id").val(),min_temperature:parseFloat($("#min_temperature").jqxNumberInput("decimal")),max_temperature:parseFloat($("#max_temperature").jqxNumberInput("decimal")),flocculation:$("#flocculation").val(),attenuation:parseFloat($("#attenuation").jqxNumberInput("decimal")),notes:$("#notes").val(),best_for:$("#best_for").val(),max_reuse:parseInt($("#max_reuse").jqxNumberInput("decimal")),inventory:0,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:"",tht_date:"",cells:parseFloat($("#cells").jqxNumberInput("decimal")),tolerance:parseFloat($("#tolerance").jqxNumberInput("decimal")),sta1:$("#sta1").val(),bacteria:$("#bacteria").val(),harvest_top:$("#harvest_top").val(),harvest_time:$("#harvest_time").val(),pitch_temperature:parseFloat($("#pitch_temperature").jqxNumberInput("decimal")),pofpos:$("#pofpos").val(),zymocide:$("#zymocide").val()};$("#jqxgrid").jqxGrid("addrow",null,g);$("#popupWindow").jqxWindow("hide")});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var g,i,h=-1;if(c>=0){h=$("#jqxgrid").jqxGrid("getrowid",c)}if(b.form=="Vloeibaar"){g=parseFloat($("#inventory").jqxNumberInput("decimal"))}else{g=parseFloat($("#inventory").jqxNumberInput("decimal"))/1000}i={record:h,name:$("#name").val(),type:$("#type").val(),form:$("#form").val(),laboratory:$("#laboratory").val(),product_id:$("#product_id").val(),min_temperature:parseFloat($("#min_temperature").jqxNumberInput("decimal")),max_temperature:parseFloat($("#max_temperature").jqxNumberInput("decimal")),flocculation:$("#flocculation").val(),attenuation:parseFloat($("#attenuation").jqxNumberInput("decimal")),notes:$("#notes").val(),best_for:$("#best_for").val(),max_reuse:parseInt($("#max_reuse").jqxNumberInput("decimal")),inventory:g,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:$("#production_date").val(),tht_date:$("#tht_date").val(),cells:parseFloat($("#cells").jqxNumberInput("decimal")),tolerance:parseFloat($("#tolerance").jqxNumberInput("decimal")),sta1:$("#sta1").val(),bacteria:$("#bacteria").val(),harvest_top:$("#harvest_top").val(),harvest_time:$("#harvest_time").val(),pitch_temperature:parseFloat($("#pitch_temperature").jqxNumberInput("decimal")),pofpos:$("#pofpos").val(),zymocide:$("#zymocide").val()};if(c>=0){$("#jqxgrid").jqxGrid("updaterow",h,i)}else{$("#jqxgrid").jqxGrid("addrow",null,i)}$("#popupWindow").jqxWindow("hide")});createDelElements()}); \ No newline at end of file diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/inv_yeasts.js --- a/www/js/inv_yeasts.js Fri Oct 18 13:20:35 2019 +0200 +++ b/www/js/inv_yeasts.js Fri May 01 16:37:31 2020 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * @@ -22,462 +22,476 @@ function createDelElements() { - $('#eventWindow').jqxWindow({ - theme: theme, - position: { x: 490, y: 210 }, - width: 300, - height: 175, - resizable: false, - isModal: true, - modalOpacity: 0.4, - okButton: $('#delOk'), - cancelButton: $('#delCancel'), - initContent: function () { - $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); - $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); - $('#delCancel').focus(); - } - }); - $('#eventWindow').jqxWindow('hide'); + $('#eventWindow').jqxWindow({ + theme: theme, + position: { x: 490, y: 210 }, + width: 300, + height: 175, + resizable: false, + isModal: true, + modalOpacity: 0.4, + okButton: $('#delOk'), + cancelButton: $('#delCancel'), + initContent: function() { + $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme }); + $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme }); + $('#delCancel').focus(); + } + }); + $('#eventWindow').jqxWindow('hide'); } $(document).ready(function() { - function calcTotal() { + function calcTotal() { - $('#totval').val(dataRecord.cost * dataRecord.inventory); - if (dataRecord.form == 'Vloeibaar') { // Liquid - $("#pmpt_cost").html('Prijs per pak:'); - $("#pmpt_inventory").html('Voorraad pak(ken):'); - $("#pmpt_cells").html('Miljard cellen per pak:'); - $("#inventory").jqxNumberInput({ decimalDigits: 0 }); - } else if (dataRecord.form == 'Droog' || dataRecord.form == 'Gedroogd') { // Dry - $("#pmpt_cost").html('Prijs per kg:'); - $("#pmpt_inventory").html('Voorraad gram:'); - $("#pmpt_cells").html('Miljard cellen per gram:'); - $("#inventory").jqxNumberInput({ decimalDigits: 1 }); - } else { - $("#pmpt_cost").html('Prijs per liter:'); - $("#pmpt_inventory").html('Voorraad ml:'); - $("#pmpt_cells").html('Miljard cellen per ml:'); - $("#inventory").jqxNumberInput({ decimalDigits: 1 }); - } - } + $('#totval').val(dataRecord.cost * dataRecord.inventory); + if (dataRecord.form == 'Vloeibaar') { // Liquid + $('#pmpt_cost').html('Prijs per pak:'); + $('#pmpt_inventory').html('Voorraad pak(ken):'); + $('#pmpt_cells').html('Miljard cellen per pak:'); + $('#inventory').jqxNumberInput({ decimalDigits: 0 }); + } else if (dataRecord.form == 'Droog' || dataRecord.form == 'Gedroogd') { // Dry + $('#pmpt_cost').html('Prijs per kg:'); + $('#pmpt_inventory').html('Voorraad gram:'); + $('#pmpt_cells').html('Miljard cellen per gram:'); + $('#inventory').jqxNumberInput({ decimalDigits: 1 }); + } else { + $('#pmpt_cost').html('Prijs per liter:'); + $('#pmpt_inventory').html('Voorraad ml:'); + $('#pmpt_cells').html('Miljard cellen per ml:'); + $('#inventory').jqxNumberInput({ decimalDigits: 1 }); + } + } - var dataRecord = {}, - url = 'includes/db_inventory_yeasts.php', - source = { - datatype: 'json', - cache: false, - datafields: [ - { name: 'record', type: 'number' }, - { name: 'name', type: 'string' }, - { name: 'type', type: 'string' }, - { name: 'form', type: 'string' }, - { name: 'laboratory', type: 'string' }, - { name: 'product_id', type: 'string' }, - { name: 'min_temperature', type: 'float' }, - { name: 'max_temperature', type: 'float' }, - { name: 'flocculation', type: 'int' }, - { name: 'attenuation', type: 'float' }, - { name: 'notes', type: 'string' }, - { name: 'best_for', type: 'string' }, - { name: 'max_reuse', type: 'int' }, - { name: 'inventory', type: 'float' }, - { name: 'cost', type: 'float' }, - { name: 'production_date', type: 'string' }, - { name: 'tht_date', type: 'string' }, - { name: 'cells', type: 'float' }, - { name: 'tolerance', type: 'float' }, - { name: 'sta1', type: 'int' }, - { name: 'bacteria', type: 'int' }, - { name: 'harvest_top', type: 'int' }, - { name: 'harvest_time', type: 'int' }, - { name: 'pitch_temperature', type: 'float' }, - { name: 'pofpos', type: 'int' }, - { name: 'zymocide', type: 'int' } - ], - id: 'record', - url: url, - deleterow: function (rowid, commit) { - // synchronize with the server - send delete command - var data = "delete=true&" + $.param({ record: rowid }); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function (jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - addrow: function (rowid, rowdata, position, commit) { - var data = "insert=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - }, - updaterow: function (rowid, rowdata, commit) { - var data = "update=true&" + $.param(rowdata); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: "POST", - success: function (data, status, xhr) { - commit(true); - location.reload( true ); - }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } - }); - } - }, - dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + var dataRecord = {}, + url = 'includes/db_inventory_yeasts.php', + source = { + datatype: 'json', + cache: false, + datafields: [ + { name: 'record', type: 'number' }, + { name: 'name', type: 'string' }, + { name: 'type', type: 'string' }, + { name: 'form', type: 'string' }, + { name: 'laboratory', type: 'string' }, + { name: 'product_id', type: 'string' }, + { name: 'min_temperature', type: 'float' }, + { name: 'max_temperature', type: 'float' }, + { name: 'flocculation', type: 'int' }, + { name: 'attenuation', type: 'float' }, + { name: 'notes', type: 'string' }, + { name: 'best_for', type: 'string' }, + { name: 'max_reuse', type: 'int' }, + { name: 'inventory', type: 'float' }, + { name: 'cost', type: 'float' }, + { name: 'production_date', type: 'string' }, + { name: 'tht_date', type: 'string' }, + { name: 'cells', type: 'float' }, + { name: 'tolerance', type: 'float' }, + { name: 'sta1', type: 'int' }, + { name: 'bacteria', type: 'int' }, + { name: 'harvest_top', type: 'int' }, + { name: 'harvest_time', type: 'int' }, + { name: 'pitch_temperature', type: 'float' }, + { name: 'pofpos', type: 'int' }, + { name: 'zymocide', type: 'int' }, + { name: 'short_desc', type: 'string' } + ], + id: 'record', + url: url, + deleterow: function(rowid, commit) { + // synchronize with the server - send delete command + var data = 'delete=true&' + $.param({ record: rowid }); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + addrow: function(rowid, rowdata, position, commit) { + var data = 'insert=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + }, + updaterow: function(rowid, rowdata, commit) { + var data = 'update=true&' + $.param(rowdata); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data, status, xhr) { + commit(true); + location.reload(true); + }, + error: function(jqXHR, textStatus, errorThrown) { + commit(false); + } + }); + } + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; - // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#laboratory").jqxInput({ theme: theme, width: 320, height: 23 }); - $("#product_id").jqxInput({ theme: theme, width: 320, height: 23 }); - $("#type").jqxDropDownList({ - theme: theme, - source: YeastTypeAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#form").jqxDropDownList({ - theme: theme, - source: YeastFormAdapter, - valueMember: 'nl', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#notes").jqxInput({ theme: theme, width: 800, height: 120 }); - $("#best_for").jqxInput({ theme: theme, width: 320, height: 100 }); - $("#inventory").jqxNumberInput( Spin1dec ); - $("#production_date").jqxDateTimeInput( Dateopts ); - $("#min_temperature").jqxNumberInput( YeastT ); - $("#max_temperature").jqxNumberInput( YeastT ); - $("#flocculation").jqxDropDownList({ - theme: theme, - source: FlocculationAdapter, - valueMember: 'id', - displayMember: 'nl', - width: 180, - height: 23, - autoDropDownHeight: true - }); - $("#attenuation").jqxNumberInput( Perc1dec ); - $("#max_reuse").jqxNumberInput( PosInt ); - $("#max_reuse").jqxNumberInput({ max: 10 }); - $("#cost").jqxNumberInput( Spin2dec ); - $("#tht_date").jqxDateTimeInput( Dateopts ); - $("#totval").jqxNumberInput( Show2dec ); - $("#cells").jqxNumberInput( Spin1dec ); - $("#tolerance").jqxNumberInput( Perc1dec ); - $("#tolerance").jqxNumberInput({ max: 25 }); - $('#sta1').jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $('#sta1').on('checked', function(event) { dataRecord.sta1 = 1; }); - $('#sta1').on('unchecked', function(event) { dataRecord.sta1 = 0; }); - $('#bacteria').jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $('#bacteria').on('checked', function(event) { dataRecord.bacteria = 1; }); - $('#bacteria').on('unchecked', function(event) { dataRecord.bacteria = 0; }); - $('#harvest_top').jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $('#harvest_top').on('checked', function(event) { dataRecord.harvest_top = 1; }); - $('#harvest_top').on('unchecked', function(event) { dataRecord.harvest_top = 0; }); - $('#harvest_time').jqxNumberInput( PosInt ); - $("#pitch_temperature").jqxNumberInput( YeastT ); - $('#pofpos').jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $('#pofpos').on('checked', function(event) { dataRecord.pofpos = 1; }); - $('#pofpos').on('unchecked', function(event) { dataRecord.pofpos = 0; }); - $("#zymocide").jqxDropDownList({ - theme: theme, - source: ZymocideAdapter, - valueMember: 'id', - displayMember: 'nl', - width: 80, - height: 23, - autoDropDownHeight: true - }); + // initialize the input fields. + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#laboratory').jqxInput({ theme: theme, width: 320, height: 23 }); + $('#short_desc').jqxInput({ theme: theme, width: 320, height: 23 }); + $('#product_id').jqxInput({ theme: theme, width: 320, height: 23 }); + $('#type').jqxDropDownList({ + theme: theme, + source: YeastTypeAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#form').jqxDropDownList({ + theme: theme, + source: YeastFormAdapter, + valueMember: 'nl', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#notes').jqxInput({ theme: theme, width: 800, height: 120 }); + $('#best_for').jqxInput({ theme: theme, width: 320, height: 100 }); + $('#inventory').jqxNumberInput(Spin1dec); + $('#production_date').jqxDateTimeInput(Dateopts); + $('#min_temperature').jqxNumberInput(YeastT); + $('#max_temperature').jqxNumberInput(YeastT); + $('#flocculation').jqxDropDownList({ + theme: theme, + source: FlocculationAdapter, + valueMember: 'id', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + $('#attenuation').jqxNumberInput(Perc1dec); + $('#max_reuse').jqxNumberInput(PosInt); + $('#max_reuse').jqxNumberInput({ max: 10 }); + $('#cost').jqxNumberInput(Spin2dec); + $('#tht_date').jqxDateTimeInput(Dateopts); + $('#totval').jqxNumberInput(Show2dec); + $('#cells').jqxNumberInput(Spin1dec); + $('#tolerance').jqxNumberInput(Perc1dec); + $('#tolerance').jqxNumberInput({ max: 25 }); + $('#sta1').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#sta1').on('checked', function(event) { dataRecord.sta1 = 1; }); + $('#sta1').on('unchecked', function(event) { dataRecord.sta1 = 0; }); + $('#bacteria').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#bacteria').on('checked', function(event) { dataRecord.bacteria = 1; }); + $('#bacteria').on('unchecked', function(event) { dataRecord.bacteria = 0; }); + $('#harvest_top').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#harvest_top').on('checked', function(event) { dataRecord.harvest_top = 1; }); + $('#harvest_top').on('unchecked', function(event) { dataRecord.harvest_top = 0; }); + $('#harvest_time').jqxNumberInput(PosInt); + $('#pitch_temperature').jqxNumberInput(YeastT); + $('#pofpos').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#pofpos').on('checked', function(event) { dataRecord.pofpos = 1; }); + $('#pofpos').on('unchecked', function(event) { dataRecord.pofpos = 0; }); + $('#zymocide').jqxDropDownList({ + theme: theme, + source: ZymocideAdapter, + valueMember: 'id', + displayMember: 'nl', + width: 80, + height: 23, + autoDropDownHeight: true + }); - // initialize jqxGrid - $("#jqxgrid").jqxGrid({ - width: 1280, - height: 630, - source: dataAdapter, - theme: theme, - showstatusbar: true, - renderstatusbar: function(statusbar) { - var container, addButton, impButton; - container = $("
    "); - addButton = $("
    Nieuw
    "); - impButton = $("
    Import
    "); - container.append(addButton); - container.append(impButton); - statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - // add new row. - addButton.click(function (event) { - editrow = -1; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); - $("#name").val(''); - $("#laboratory").val(''); - $("#product_id").val(''); - $("#type").val('Bovengist'); - $("#form").val('Vloeibaar'); - $("#min_temperature").val(18); - $("#max_temperature").val(22); - $("#flocculation").val(0); - $("#attenuation").val(77); - $("#notes").val(''); - $("#best_for").val(''); - $("#max_reuse").val(10); - $("#inventory").val(0); - $("#cost").val(0); - $("#production_date").val(''); - $("#tht_date").val(''); - $("#cells").val(1); - $("#tolerance").val(0); - $("#sta1").val(0); - $("#bacteria").val(0); - $("#harvest_top").val(0); - $("#harvest_time").val(0); - $("#pitch_temperature").val(0); - $("#pofpos").val(0); - $("#zymocide").val(0); - $("#popupWindow").jqxWindow('open'); - }); - impButton.click(function (event) { - window.location.href = 'import_ingredients.php?select=yeasts'; - }); - }, - filterable: true, - filtermode: 'excel', - columns: [ - { text: 'Laboratorium', datafield: 'laboratory', width: 150 }, - { text: 'Product ID', datafield: 'product_id', width: 120, menu: false }, - { text: 'Gist naam', datafield: 'name', menu: false }, - { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 110 }, - { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 110 }, - { text: 'SVG', datafield: 'attenuation', width: 70, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'Tol%', datafield: 'tolerance', width: 60, align: 'right', cellsalign: 'right', menu: false, - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var amount = ""; - if (value > 0) - amount = dataAdapter.formatNumber(value, "p0"); - return '' + amount + ''; - } - }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - var amount = ""; - if (value > 0) { - if ((rowdata.form == 'Vloeibaar') && (value > 1)) - amount = dataAdapter.formatNumber(value,"f0")+" pakken"; - else if (rowdata.form == 'Vloeibaar') - amount = dataAdapter.formatNumber(value,"f0")+" pak"; - else if (rowdata.form == 'Droog' || rowdata.form == 'Gedroogd') - amount = dataAdapter.formatNumber(value * 1000,"f1")+" gram"; - else - amount = dataAdapter.formatNumber(value * 1000,"f1")+" ml"; - } - return "" + amount + ""; - } - }, - { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', menu: false, cellsrenderer: function () { - return "Wijzig"; - }, buttonclick: function (row) { - // open the popup window when the user clicks a button. - editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 15 } }); - // get the clicked row's data and initialize the input fields. - dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); - $("#name").val(dataRecord.name); - $("#laboratory").val(dataRecord.laboratory); - $("#product_id").val(dataRecord.product_id); - $("#type").val(dataRecord.type); - $("#form").val(dataRecord.form); - $("#min_temperature").val(parseFloat(dataRecord.min_temperature)); - $("#max_temperature").val(parseFloat(dataRecord.max_temperature)); - $("#flocculation").val(dataRecord.flocculation); - $("#attenuation").val(dataRecord.attenuation); - $("#notes").val(dataRecord.notes); - $("#best_for").val(dataRecord.best_for); - $("#max_reuse").val(dataRecord.max_reuse); - if (dataRecord.form == 'Vloeibaar') - $("#inventory").val(dataRecord.inventory); - else - $("#inventory").val(dataRecord.inventory * 1000); - $("#cost").val(dataRecord.cost); - $("#production_date").val(dataRecord.production_date); - $("#tht_date").val(dataRecord.tht_date); - $("#cells").val(dataRecord.cells); - $("#tolerance").val(dataRecord.tolerance); - $("#sta1").val(dataRecord.sta1); - $("#bacteria").val(dataRecord.bacteria); - $("#harvest_top").val(dataRecord.harvest_top); - $("#harvest_time").val(dataRecord.harvest_time); - $("#pitch_temperature").val(parseFloat(dataRecord.pitch_temperature)); - $("#pofpos").val(dataRecord.pofpos); - $("#zymocide").val(dataRecord.zymocide); - calcTotal(); - // show the popup window. - $("#popupWindow").jqxWindow('open'); - } - } - ] - }); + // initialize jqxGrid + $('#jqxgrid').jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + theme: theme, + showstatusbar: true, + renderstatusbar: function(statusbar) { + var container, addButton, impButton; + container = $('
    '); + addButton = $('
    Nieuw
    '); + impButton = $('
    Import
    '); + expButton = $('
    Export
    '); + container.append(addButton); + container.append(impButton); + container.append(expButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + impButton.jqxButton({ theme: theme, width: 90, height: 20 }); + expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + // add new row. + addButton.click(function(event) { + editrow = -1; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); + $('#name').val(''); + $('#laboratory').val(''); + $('#short_desc').val(''); + $('#product_id').val(''); + $('#type').val('Bovengist'); + $('#form').val('Vloeibaar'); + $('#min_temperature').val(18); + $('#max_temperature').val(22); + $('#flocculation').val(0); + $('#attenuation').val(77); + $('#notes').val(''); + $('#best_for').val(''); + $('#max_reuse').val(10); + $('#inventory').val(0); + $('#cost').val(0); + $('#production_date').val(''); + $('#tht_date').val(''); + $('#cells').val(1); + $('#tolerance').val(0); + $('#sta1').val(0); + $('#bacteria').val(0); + $('#harvest_top').val(0); + $('#harvest_time').val(0); + $('#pitch_temperature').val(0); + $('#pofpos').val(0); + $('#zymocide').val(0); + $('#popupWindow').jqxWindow('open'); + }); + impButton.click(function(event) { + window.location.href = 'import_ingredients.php?select=yeasts'; + }); + expButton.click(function(event) { + window.open('export_yeasts.php'); + }); + }, + filterable: true, + filtermode: 'excel', + columns: [ + { text: 'Laboratorium', datafield: 'laboratory', width: 150 }, + { text: 'Product ID', datafield: 'product_id', width: 120, menu: false }, + { text: 'Gist naam', datafield: 'name', menu: false }, + { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 110 }, + { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 110 }, + { text: 'SVG', datafield: 'attenuation', width: 70, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, + { text: 'Tol%', datafield: 'tolerance', width: 60, align: 'right', cellsalign: 'right', menu: false, + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var amount = ''; + if (value > 0) + amount = dataAdapter.formatNumber(value, 'p1'); + return '' + amount + ''; + } + }, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, + cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { + var amount = ''; + if (value > 0) { + if ((rowdata.form == 'Vloeibaar') && (value > 1)) + amount = dataAdapter.formatNumber(value, 'f0') + ' pakken'; + else if (rowdata.form == 'Vloeibaar') + amount = dataAdapter.formatNumber(value, 'f0') + ' pak'; + else if (rowdata.form == 'Droog' || rowdata.form == 'Gedroogd') + amount = dataAdapter.formatNumber(value * 1000, 'f1') + ' gram'; + else + amount = dataAdapter.formatNumber(value * 1000, 'f1') + ' ml'; + } + return '' + amount + ''; + } + }, + { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', menu: false, cellsrenderer: function() { + return 'Wijzig'; + }, buttonclick: function(row) { + // open the popup window when the user clicks a button. + editrow = row; + $('#popupWindow').jqxWindow({ position: { x: 110, y: 15 } }); + // get the clicked row's data and initialize the input fields. + dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow); + $('#name').val(dataRecord.name); + $('#laboratory').val(dataRecord.laboratory); + $('#product_id').val(dataRecord.product_id); + $('#type').val(dataRecord.type); + $('#form').val(dataRecord.form); + $('#min_temperature').val(parseFloat(dataRecord.min_temperature)); + $('#max_temperature').val(parseFloat(dataRecord.max_temperature)); + $('#flocculation').val(dataRecord.flocculation); + $('#attenuation').val(dataRecord.attenuation); + $('#notes').val(dataRecord.notes); + $('#best_for').val(dataRecord.best_for); + $('#max_reuse').val(dataRecord.max_reuse); + if (dataRecord.form == 'Vloeibaar') + $('#inventory').val(dataRecord.inventory); + else + $('#inventory').val(dataRecord.inventory * 1000); + $('#cost').val(dataRecord.cost); + $('#production_date').val(dataRecord.production_date); + $('#tht_date').val(dataRecord.tht_date); + $('#cells').val(dataRecord.cells); + $('#tolerance').val(dataRecord.tolerance); + $('#sta1').val(dataRecord.sta1); + $('#bacteria').val(dataRecord.bacteria); + $('#harvest_top').val(dataRecord.harvest_top); + $('#harvest_time').val(dataRecord.harvest_time); + $('#pitch_temperature').val(parseFloat(dataRecord.pitch_temperature)); + $('#pofpos').val(dataRecord.pofpos); + $('#zymocide').val(dataRecord.zymocide); + $('#short_desc').val(dataRecord.short_desc); + calcTotal(); + // show the popup window. + $('#popupWindow').jqxWindow('open'); + } + } + ] + }); - $('#popupWindow').on('open', function (event) { calcTotal(); }); - $("#cost").on('change', function (event) { - dataRecord.cost = parseFloat(event.args.value); - calcTotal(); - }); - $("#inventory").on('change', function (event) { - if (dataRecord.form == 'Vloeibaar') - dataRecord.inventory = parseFloat(event.args.value); - else - dataRecord.inventory = parseFloat(event.args.value) / 1000.0; - calcTotal(); - }); - $("#form").on('select', function (event) { - dataRecord.form = $("#form").val(); - calcTotal(); - }); + $('#popupWindow').on('open', function(event) { calcTotal(); }); + $('#cost').on('change', function(event) { + dataRecord.cost = parseFloat(event.args.value); + calcTotal(); + }); + $('#inventory').on('change', function(event) { + if (dataRecord.form == 'Vloeibaar') + dataRecord.inventory = parseFloat(event.args.value); + else + dataRecord.inventory = parseFloat(event.args.value) / 1000.0; + calcTotal(); + }); + $('#form').on('select', function(event) { + dataRecord.form = $('#form').val(); + calcTotal(); + }); - // initialize the popup window and buttons. - $("#popupWindow").jqxWindow({ - width: 1050, - height: 625, - resizable: false, - theme: theme, - isModal: true, - autoOpen: false, - cancelButton: $("#Cancel"), - modalOpacity: 0.40 - }); - $("#popupWindow").on('open', function () { - $("#name").jqxInput('selectAll'); - }); - $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); - $("#Delete").click(function() { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $("#delOk").click(function () { - var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - $("#jqxgrid").jqxGrid('deleterow', rowID); - }); - } - $("#popupWindow").jqxWindow('hide'); - }); - $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); - $("#Clone").jqxButton({ template: "warning", width: '90px', theme: theme }); - $("#Clone").click(function() { - var row = { - record: -1, - name: $("#name").val()+" kopie", - type: $("#type").val(), - form: $("#form").val(), - laboratory: $("#laboratory").val(), - product_id: $("#product_id").val(), - min_temperature: parseFloat($("#min_temperature").jqxNumberInput('decimal')), - max_temperature: parseFloat($("#max_temperature").jqxNumberInput('decimal')), - flocculation: $("#flocculation").val(), - attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')), - notes: $("#notes").val(), - best_for: $("#best_for").val(), - max_reuse: parseInt($("#max_reuse").jqxNumberInput('decimal')), - inventory: 0, - cost: parseFloat($("#cost").jqxNumberInput('decimal')), - production_date: '', - tht_date: '', - cells: parseFloat($("#cells").jqxNumberInput('decimal')), - tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')), - sta1: $("#sta1").val(), - bacteria: $("#bacteria").val(), - harvest_top: $("#harvest_top").val(), - harvest_time: $("#harvest_time").val(), - pitch_temperature: parseFloat($("#pitch_temperature").jqxNumberInput('decimal')), - pofpos: $("#pofpos").val(), - zymocide: $("#zymocide").val() - }; - $('#jqxgrid').jqxGrid('addrow', null, row); - $("#popupWindow").jqxWindow('hide'); - }); - $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); - // update the edited row when the user clicks the 'Save' button. - $("#Save").click(function() { - var n_inventory, row, rowID = -1; - if (editrow >= 0) { - rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); - } - if (dataRecord.form == 'Vloeibaar') - n_inventory = parseFloat($("#inventory").jqxNumberInput('decimal')); - else - n_inventory = parseFloat($("#inventory").jqxNumberInput('decimal')) / 1000.0; - row = { - record: rowID, - name: $("#name").val(), - type: $("#type").val(), - form: $("#form").val(), - laboratory: $("#laboratory").val(), - product_id: $("#product_id").val(), - min_temperature: parseFloat($("#min_temperature").jqxNumberInput('decimal')), - max_temperature: parseFloat($("#max_temperature").jqxNumberInput('decimal')), - flocculation: $("#flocculation").val(), - attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')), - notes: $("#notes").val(), - best_for: $("#best_for").val(), - max_reuse: parseInt($("#max_reuse").jqxNumberInput('decimal')), - inventory: n_inventory, - cost: parseFloat($("#cost").jqxNumberInput('decimal')), - production_date: $("#production_date").val(), - tht_date: $("#tht_date").val(), - cells: parseFloat($("#cells").jqxNumberInput('decimal')), - tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')), - sta1: $("#sta1").val(), - bacteria: $("#bacteria").val(), - harvest_top: $("#harvest_top").val(), - harvest_time: $("#harvest_time").val(), - pitch_temperature: parseFloat($("#pitch_temperature").jqxNumberInput('decimal')), - pofpos: $("#pofpos").val(), - zymocide: $("#zymocide").val() - }; - if (editrow >= 0) { - $('#jqxgrid').jqxGrid('updaterow', rowID, row); - } else { - $('#jqxgrid').jqxGrid('addrow', null, row); - } - $("#popupWindow").jqxWindow('hide'); - }); - createDelElements(); + // initialize the popup window and buttons. + $('#popupWindow').jqxWindow({ + width: 1050, + height: 625, + resizable: false, + theme: theme, + isModal: true, + autoOpen: false, + cancelButton: $('#Cancel'), + modalOpacity: 0.40 + }); + $('#popupWindow').on('open', function() { + $('#name').jqxInput('selectAll'); + }); + $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); + $('#Delete').click(function() { + if (editrow >= 0) { + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { + var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + $('#jqxgrid').jqxGrid('deleterow', rowID); + }); + } + $('#popupWindow').jqxWindow('hide'); + }); + $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); + $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); + $('#Clone').click(function() { + var row = { + record: -1, + name: $('#name').val() + ' kopie', + type: $('#type').val(), + form: $('#form').val(), + laboratory: $('#laboratory').val(), + product_id: $('#product_id').val(), + min_temperature: parseFloat($('#min_temperature').jqxNumberInput('decimal')), + max_temperature: parseFloat($('#max_temperature').jqxNumberInput('decimal')), + flocculation: $('#flocculation').val(), + attenuation: parseFloat($('#attenuation').jqxNumberInput('decimal')), + notes: $('#notes').val(), + best_for: $('#best_for').val(), + max_reuse: parseInt($('#max_reuse').jqxNumberInput('decimal')), + inventory: 0, + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: '', + tht_date: '', + cells: parseFloat($('#cells').jqxNumberInput('decimal')), + tolerance: parseFloat($('#tolerance').jqxNumberInput('decimal')), + sta1: $('#sta1').val(), + bacteria: $('#bacteria').val(), + harvest_top: $('#harvest_top').val(), + harvest_time: $('#harvest_time').val(), + pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), + pofpos: $('#pofpos').val(), + zymocide: $('#zymocide').val() + }; + $('#jqxgrid').jqxGrid('addrow', null, row); + $('#popupWindow').jqxWindow('hide'); + }); + $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); + // update the edited row when the user clicks the 'Save' button. + $('#Save').click(function() { + var n_inventory, row, rowID = -1; + if (editrow >= 0) { + rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); + } + if (dataRecord.form == 'Vloeibaar') + n_inventory = parseFloat($('#inventory').jqxNumberInput('decimal')); + else + n_inventory = parseFloat($('#inventory').jqxNumberInput('decimal')) / 1000.0; + row = { + record: rowID, + name: $('#name').val(), + type: $('#type').val(), + form: $('#form').val(), + laboratory: $('#laboratory').val(), + product_id: $('#product_id').val(), + min_temperature: parseFloat($('#min_temperature').jqxNumberInput('decimal')), + max_temperature: parseFloat($('#max_temperature').jqxNumberInput('decimal')), + flocculation: $('#flocculation').val(), + attenuation: parseFloat($('#attenuation').jqxNumberInput('decimal')), + notes: $('#notes').val(), + best_for: $('#best_for').val(), + max_reuse: parseInt($('#max_reuse').jqxNumberInput('decimal')), + inventory: n_inventory, + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: $('#production_date').val(), + tht_date: $('#tht_date').val(), + cells: parseFloat($('#cells').jqxNumberInput('decimal')), + tolerance: parseFloat($('#tolerance').jqxNumberInput('decimal')), + sta1: $('#sta1').val(), + bacteria: $('#bacteria').val(), + harvest_top: $('#harvest_top').val(), + harvest_time: $('#harvest_time').val(), + pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), + pofpos: $('#pofpos').val(), + zymocide: $('#zymocide').val(), + short_desc: $('#short_desc').val() + }; + if (editrow >= 0) { + $('#jqxgrid').jqxGrid('updaterow', rowID, row); + } else { + $('#jqxgrid').jqxGrid('addrow', null, row); + } + $('#popupWindow').jqxWindow('hide'); + }); + createDelElements(); }); diff -r 9d1aa6f3a4da -r 4d01937ae7af www/js/jquery-1.11.1-min.js --- a/www/js/jquery-1.11.1-min.js Fri Oct 18 13:20:35 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -/* jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(d,c){"object"==typeof module&&"object"==typeof module.exports?module.exports=d.document?c(d,!0):function(b){if(!b.document){throw new Error("jQuery requires a window with a document")}return c(b)}:c(d)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++){if(null!=(e=arguments[h])){for(d in e){a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c))}}}return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return !m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a){return !1}return !0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a)){return !1}try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf")){return !1}}catch(c){return !1}if(k.ownLast){for(b in a){return j.call(a,b)}}for(b in a){}return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++){if(d=b.apply(a[e],c),d===!1){break}}}else{for(e in a){if(d=b.apply(a[e],c),d===!1){break}}}}else{if(g){for(;f>e;e++){if(d=b.call(a[e],e,a[e]),d===!1){break}}}else{for(e in a){if(d=b.call(a[e],e,a[e]),d===!1){break}}}}return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g){return g.call(b,a,c)}for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++){if(c in b&&b[c]===a){return c}}}return -1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d){a[e++]=b[d++]}if(c!==c){while(void 0!==b[d]){a[e++]=b[d++]}}return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++){d=!b(a[f],f),d!==h&&e.push(a[f])}return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h){for(;g>f;f++){d=b(a[f],f,c),null!=d&&i.push(d)}}else{for(f in a){d=b(a[f],f,c),null!=d&&i.push(d)}}return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return +new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++){if(this[b]===a){return b}}return -1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]){}a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a){return d}if(1!==(k=b.nodeType)&&9!==k){return[]}if(p&&!e){if(f=_.exec(a)){if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode){return d}if(h.id===j){return d.push(h),d}}else{if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j){return d.push(h),d}}}else{if(f[2]){return I.apply(d,b.getElementsByTagName(a)),d}if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){return I.apply(d,b.getElementsByClassName(j)),d}}}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--){o[l]=s+qb(o[l])}w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x){try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return !!a(b)}catch(c){return !1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return -1}}}return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(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 ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
    ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++]){1===c.nodeType&&d.push(c)}return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return !0}}}return !1},B=b?function(a,b){if(a===b){return l=!0,0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b){return l=!0,0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0}if(f===g){return kb(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){i.unshift(c)}while(h[d]===i[d]){d++}return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b))){try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType){return d}}catch(e){}}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++]){b===a[f]&&(e=d.push(f))}while(e--){a.splice(d[e],1)}}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent){return a.textContent}for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}else{if(3===f||4===f){return a.nodeValue}}}else{while(b=a[d++]){c+=e(b)}}return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return !0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return !!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:1===l.nodeType){return !1}}o=p="only"===a&&!o&&"nextSibling"}return !0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}}else{if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b)){break}}}}return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){(f=g[h])&&(a[h]=!(b[h]=f))}}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do{if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-")}}while((b=b.parentNode)&&1===b.nodeType);return !1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return !1}}return !0},parent:function(a){return !d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2){a.push(c)}return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2){a.push(c)}return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;){a.push(d)}return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++){d+=a[b].value}return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d]){if(1===b.nodeType||e){return a(b,c,f)}}}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d]){if((1===b.nodeType||e)&&a(b,c,g)){return !0}}}else{while(b=b[d]){if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f){return j[2]=h[2]}if(i[d]=j,j[2]=a(b,c,g)){return !0}}}}}}function sb(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 tb(a,b,c){for(var d=0,e=b.length;e>d;d++){fb(a,b[d],c)}return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++){(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h))}return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--){(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}}if(f){if(e||a){if(e){j=[],k=r.length;while(k--){(l=r[k])&&j.push(q[k]=l)}e(null,r=[],j,i)}k=r.length;while(k--){(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}}else{r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)}})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return !g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++){if(c=d.relative[a[i].type]){m=[rb(sb(m),c)]}else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++){if(d.relative[a[e].type]){break}}return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||0.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++]){if(o(l,g,h)){i.push(l);break}}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++]){o(r,s,g,h)}if(f){if(p>0){while(q--){r[q]||s[q]||(s[q]=G.call(i))}}s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--){f=wb(b[c]),f[u]?d.push(f):e.push(f)}f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b){return e}n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type]){break}if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a){return I.apply(e,f),e}break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b)){return m.grep(a,function(a,d){return !!b.call(a,d,a)!==c})}if(b.nodeType){return m.grep(a,function(a){return a===b!==c})}if("string"==typeof b){if(v.test(b)){return m.filter(b,a,c)}b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a){return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++){if(m.contains(d[b],this)){return !0}}}))}for(b=0;e>b;b++){m.find(a,d[b],c)}return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return !!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a){return this}if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b){return !b||b.jquery?(b||x).find(a):this.constructor(b).find(a)}if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b)){for(c in b){m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c])}}return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2]){return x.find(a)}this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c))){1===e.nodeType&&d.push(e),e=e[b]}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling){1===a.nodeType&&a!==b&&c.push(a)}return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++){if(m.contains(this,c[b])){return !0}}})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++){for(c=this[d];c&&c!==b;c=c.parentNode){if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}}}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do{a=a[b]}while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++){if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1){h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return !h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return !i},fireWith:function(a,c){return !h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return !!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1){for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++){c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f}}return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body){return setTimeout(m.ready)}m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H){if(H=m.Deferred(),"complete"===y.readyState){setTimeout(m.ready)}else{if(y.addEventListener){y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1)}else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}}}return H.promise(b)};var K="undefined",L;for(L in m(k)){break}k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else{c=void 0}}return c}function P(a){var b;for(b in a){if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b){return !1}}return !0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b){return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--){delete d[b[e]]}if(c?!P(d):!m.isEmptyObject(d)){return}}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--){g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])))}m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++){b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)))}}}return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in {submit:!0,change:!0,focusin:!0}){c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1)}d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return !0}function bb(){return !1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--){f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0)}a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--){if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--){g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g))}i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else{for(o in k){m.event.remove(a,o+b[j],c,d,!0)}}}m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode){o.push(h),l=h}l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped()){b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault())}if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped()){(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type)){for(;i!=this;i=i.parentNode||this){if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++){d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d)}e.length&&g.push({elem:i,handlers:e})}}}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f){for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++){!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b))}}return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++){m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h){for(d=0,e=h[c].length;e>d;d++){m.event.add(b,c,h[c][d])}}}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events){m.removeEvent(b,d,e.handle)}b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a))){for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g){d[g]&&Bb(e,d[g])}}if(b){if(c){for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++){Ab(e,d[g])}}else{Ab(a,f)}}return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++){if(f=a[q],f||0===f){if("object"===m.type(f)){m.merge(p,f.nodeType?[f]:f)}else{if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--){h=h.lastChild}if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--){m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild){h.removeChild(h.firstChild)}h=o.lastChild}else{p.push(b.createTextNode(f))}}}}h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++]){if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++]){ob.test(f.type||"")&&c.push(f)}}}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++){if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events){for(e in g.events){n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle)}}j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++){b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c))}return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild){a.removeChild(a.firstChild)}a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a){return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0}if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++){b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a)}b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p)){return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)})}if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++){d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j)}if(f){for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++){d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")))}}i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++){c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get())}return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("