summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislau Wolski <stanislau.wolski@gmail.com>2013-10-18 14:02:16 +0300
committerStanislau Wolski <stanislau.wolski@gmail.com>2013-10-18 14:02:16 +0300
commitc2e1fd58b0c848118cf8554de50f788199d609e2 (patch)
treebd30b3b7de59b34120705465e8628a740cdb513d
downloadscheduler-4.0.0.zip
scheduler-4.0.0.tar.gz
scheduler-4.0.0.tar.bz2
[add] version 4.0v4.0.0
-rw-r--r--README.md40
-rw-r--r--codebase/connector/base_connector.php926
-rw-r--r--codebase/connector/chart_connector.php18
-rw-r--r--codebase/connector/combo_connector.php94
-rw-r--r--codebase/connector/convert.php69
-rw-r--r--codebase/connector/crosslink_connector.php141
-rw-r--r--codebase/connector/data_connector.php500
-rw-r--r--codebase/connector/dataprocessor.php505
-rw-r--r--codebase/connector/dataview_connector.php74
-rw-r--r--codebase/connector/db_adodb.php72
-rw-r--r--codebase/connector/db_common.php1069
-rw-r--r--codebase/connector/db_excel.php190
-rw-r--r--codebase/connector/db_filesystem.php345
-rw-r--r--codebase/connector/db_mssql.php73
-rw-r--r--codebase/connector/db_mysqli.php56
-rw-r--r--codebase/connector/db_oracle.php88
-rw-r--r--codebase/connector/db_pdo.php75
-rw-r--r--codebase/connector/db_phpcake.php85
-rw-r--r--codebase/connector/db_phpci.php63
-rw-r--r--codebase/connector/db_phpyii.php91
-rw-r--r--codebase/connector/db_postgre.php73
-rw-r--r--codebase/connector/db_sasql.php54
-rw-r--r--codebase/connector/db_sqlite.php34
-rw-r--r--codebase/connector/db_sqlite3.php33
-rw-r--r--codebase/connector/db_sqlsrv.php102
-rw-r--r--codebase/connector/filesystem_item.php19
-rw-r--r--codebase/connector/form_connector.php62
-rw-r--r--codebase/connector/grid_config.php423
-rw-r--r--codebase/connector/grid_connector.php262
-rw-r--r--codebase/connector/keygrid_connector.php48
-rw-r--r--codebase/connector/mixed_connector.php28
-rw-r--r--codebase/connector/options_connector.php45
-rw-r--r--codebase/connector/scheduler_connector.php230
-rw-r--r--codebase/connector/strategy.php500
-rw-r--r--codebase/connector/tools.php267
-rw-r--r--codebase/connector/tree_connector.php229
-rw-r--r--codebase/connector/treedatagroup_connector.php89
-rw-r--r--codebase/connector/treedatamultitable_connector.php91
-rw-r--r--codebase/connector/treegrid_connector.php120
-rw-r--r--codebase/connector/treegridgroup_connector.php46
-rw-r--r--codebase/connector/treegridmultitable_connector.php70
-rw-r--r--codebase/connector/treegroup_connector.php46
-rw-r--r--codebase/connector/treemultitable_connector.php51
-rw-r--r--codebase/connector/update.php266
-rw-r--r--codebase/connector/xss_filter.php199
-rw-r--r--codebase/dhtmlxscheduler.css6
-rw-r--r--codebase/dhtmlxscheduler.js255
-rw-r--r--codebase/dhtmlxscheduler_classic.css6
-rw-r--r--codebase/dhtmlxscheduler_glossy.css6
-rw-r--r--codebase/ext/dhtmlxscheduler_active_links.js7
-rw-r--r--codebase/ext/dhtmlxscheduler_agenda_view.js11
-rw-r--r--codebase/ext/dhtmlxscheduler_all_timed.js8
-rw-r--r--codebase/ext/dhtmlxscheduler_collision.js8
-rw-r--r--codebase/ext/dhtmlxscheduler_container_autoresize.js10
-rw-r--r--codebase/ext/dhtmlxscheduler_cookie.js6
-rw-r--r--codebase/ext/dhtmlxscheduler_editors.js11
-rw-r--r--codebase/ext/dhtmlxscheduler_expand.js8
-rw-r--r--codebase/ext/dhtmlxscheduler_grid_view.js28
-rw-r--r--codebase/ext/dhtmlxscheduler_html_templates.js5
-rw-r--r--codebase/ext/dhtmlxscheduler_key_nav.js7
-rw-r--r--codebase/ext/dhtmlxscheduler_limit.js33
-rw-r--r--codebase/ext/dhtmlxscheduler_map_view.js29
-rw-r--r--codebase/ext/dhtmlxscheduler_minical.js28
-rw-r--r--codebase/ext/dhtmlxscheduler_multiselect.js7
-rw-r--r--codebase/ext/dhtmlxscheduler_multisource.js5
-rw-r--r--codebase/ext/dhtmlxscheduler_mvc.js7
-rw-r--r--codebase/ext/dhtmlxscheduler_offline.js8
-rw-r--r--codebase/ext/dhtmlxscheduler_outerdrag.js7
-rw-r--r--codebase/ext/dhtmlxscheduler_pdf.js19
-rw-r--r--codebase/ext/dhtmlxscheduler_quick_info.js14
-rw-r--r--codebase/ext/dhtmlxscheduler_readonly.js10
-rw-r--r--codebase/ext/dhtmlxscheduler_recurring.js41
-rw-r--r--codebase/ext/dhtmlxscheduler_serialize.js9
-rw-r--r--codebase/ext/dhtmlxscheduler_timeline.js52
-rw-r--r--codebase/ext/dhtmlxscheduler_tooltip.js13
-rw-r--r--codebase/ext/dhtmlxscheduler_treetimeline.js19
-rw-r--r--codebase/ext/dhtmlxscheduler_units.js16
-rw-r--r--codebase/ext/dhtmlxscheduler_url.js6
-rw-r--r--codebase/ext/dhtmlxscheduler_week_agenda.js19
-rw-r--r--codebase/ext/dhtmlxscheduler_year_view.js20
-rw-r--r--codebase/imgs/but_repeat.gifbin0 -> 1149 bytes
-rw-r--r--codebase/imgs/buttons.pngbin0 -> 281 bytes
-rw-r--r--codebase/imgs/calendar.gifbin0 -> 622 bytes
-rw-r--r--codebase/imgs/clock_big.gifbin0 -> 1321 bytes
-rw-r--r--codebase/imgs/clock_small.gifbin0 -> 388 bytes
-rw-r--r--codebase/imgs/collapse_expand_icon.gifbin0 -> 452 bytes
-rw-r--r--codebase/imgs/controls.gifbin0 -> 2496 bytes
-rw-r--r--codebase/imgs/databg.pngbin0 -> 152 bytes
-rw-r--r--codebase/imgs/databg_now.pngbin0 -> 152 bytes
-rw-r--r--codebase/imgs/export_ical.pngbin0 -> 1323 bytes
-rw-r--r--codebase/imgs/export_pdf.pngbin0 -> 1395 bytes
-rw-r--r--codebase/imgs/icon.pngbin0 -> 230 bytes
-rw-r--r--codebase/imgs/images.pngbin0 -> 1581 bytes
-rw-r--r--codebase/imgs/loading.gifbin0 -> 3951 bytes
-rw-r--r--codebase/imgs/resize_dots.pngbin0 -> 111 bytes
-rw-r--r--codebase/imgs_dhx_terrace/arrow_left.pngbin0 -> 198 bytes
-rw-r--r--codebase/imgs_dhx_terrace/arrow_right.pngbin0 -> 189 bytes
-rw-r--r--codebase/imgs_dhx_terrace/but_repeat.gifbin0 -> 1472 bytes
-rw-r--r--codebase/imgs_dhx_terrace/calendar.gifbin0 -> 1018 bytes
-rw-r--r--codebase/imgs_dhx_terrace/clock_big.gifbin0 -> 1958 bytes
-rw-r--r--codebase/imgs_dhx_terrace/clock_small.gifbin0 -> 588 bytes
-rw-r--r--codebase/imgs_dhx_terrace/close_icon.pngbin0 -> 162 bytes
-rw-r--r--codebase/imgs_dhx_terrace/collapse_expand_icon.gifbin0 -> 1192 bytes
-rw-r--r--codebase/imgs_dhx_terrace/controls.pngbin0 -> 761 bytes
-rw-r--r--codebase/imgs_dhx_terrace/databg.pngbin0 -> 103 bytes
-rw-r--r--codebase/imgs_dhx_terrace/databg_now.pngbin0 -> 103 bytes
-rw-r--r--codebase/imgs_dhx_terrace/export_ical.pngbin0 -> 1793 bytes
-rw-r--r--codebase/imgs_dhx_terrace/export_pdf.pngbin0 -> 1667 bytes
-rw-r--r--codebase/imgs_dhx_terrace/resize_dots.pngbin0 -> 110 bytes
-rw-r--r--codebase/imgs_dhx_terrace/resizing.pngbin0 -> 99 bytes
-rw-r--r--codebase/imgs_glossy/blue_tab.pngbin0 -> 247 bytes
-rw-r--r--codebase/imgs_glossy/blue_tab_wide.pngbin0 -> 252 bytes
-rw-r--r--codebase/imgs_glossy/but_repeat.gifbin0 -> 1149 bytes
-rw-r--r--codebase/imgs_glossy/buttons.gifbin0 -> 616 bytes
-rw-r--r--codebase/imgs_glossy/calendar.gifbin0 -> 622 bytes
-rw-r--r--codebase/imgs_glossy/clock_big.pngbin0 -> 1580 bytes
-rw-r--r--codebase/imgs_glossy/clock_small.pngbin0 -> 3809 bytes
-rw-r--r--codebase/imgs_glossy/collapse_expand_icon.gifbin0 -> 452 bytes
-rw-r--r--codebase/imgs_glossy/controlls5.pngbin0 -> 2835 bytes
-rw-r--r--codebase/imgs_glossy/databg.pngbin0 -> 89 bytes
-rw-r--r--codebase/imgs_glossy/databg_now.pngbin0 -> 89 bytes
-rw-r--r--codebase/imgs_glossy/event-bg.pngbin0 -> 148 bytes
-rw-r--r--codebase/imgs_glossy/export_ical.pngbin0 -> 1323 bytes
-rw-r--r--codebase/imgs_glossy/export_pdf.pngbin0 -> 1395 bytes
-rw-r--r--codebase/imgs_glossy/icon.pngbin0 -> 230 bytes
-rw-r--r--codebase/imgs_glossy/left-separator.pngbin0 -> 230 bytes
-rw-r--r--codebase/imgs_glossy/left-time-bg.pngbin0 -> 124 bytes
-rw-r--r--codebase/imgs_glossy/lightbox.pngbin0 -> 207 bytes
-rw-r--r--codebase/imgs_glossy/loading.gifbin0 -> 3951 bytes
-rw-r--r--codebase/imgs_glossy/move.pngbin0 -> 145 bytes
-rw-r--r--codebase/imgs_glossy/multi-days-bg.pngbin0 -> 350 bytes
-rw-r--r--codebase/imgs_glossy/second-top-days-bg.pngbin0 -> 138 bytes
-rw-r--r--codebase/imgs_glossy/top-days-bg.pngbin0 -> 177 bytes
-rw-r--r--codebase/imgs_glossy/top-separator.gifbin0 -> 259 bytes
-rw-r--r--codebase/imgs_glossy/white_tab.pngbin0 -> 290 bytes
-rw-r--r--codebase/imgs_glossy/white_tab_wide.pngbin0 -> 300 bytes
-rw-r--r--license.txt339
-rw-r--r--sources/dhtmlxscheduler.css2244
-rw-r--r--sources/dhtmlxscheduler.js5650
-rw-r--r--sources/dhtmlxscheduler_classic.css1578
-rw-r--r--sources/dhtmlxscheduler_glossy.css1902
-rw-r--r--sources/ext/dhtmlxscheduler_active_links.js28
-rw-r--r--sources/ext/dhtmlxscheduler_agenda_view.js120
-rw-r--r--sources/ext/dhtmlxscheduler_all_timed.js123
-rw-r--r--sources/ext/dhtmlxscheduler_collision.js131
-rw-r--r--sources/ext/dhtmlxscheduler_container_autoresize.js161
-rw-r--r--sources/ext/dhtmlxscheduler_cookie.js70
-rw-r--r--sources/ext/dhtmlxscheduler_editors.js158
-rw-r--r--sources/ext/dhtmlxscheduler_expand.js73
-rw-r--r--sources/ext/dhtmlxscheduler_grid_view.js466
-rw-r--r--sources/ext/dhtmlxscheduler_html_templates.js19
-rw-r--r--sources/ext/dhtmlxscheduler_key_nav.js91
-rw-r--r--sources/ext/dhtmlxscheduler_limit.js941
-rw-r--r--sources/ext/dhtmlxscheduler_map_view.js488
-rw-r--r--sources/ext/dhtmlxscheduler_minical.js455
-rw-r--r--sources/ext/dhtmlxscheduler_multiselect.js66
-rw-r--r--sources/ext/dhtmlxscheduler_multisource.js26
-rw-r--r--sources/ext/dhtmlxscheduler_mvc.js82
-rw-r--r--sources/ext/dhtmlxscheduler_offline.js79
-rw-r--r--sources/ext/dhtmlxscheduler_outerdrag.js57
-rw-r--r--sources/ext/dhtmlxscheduler_pdf.js354
-rw-r--r--sources/ext/dhtmlxscheduler_quick_info.js181
-rw-r--r--sources/ext/dhtmlxscheduler_readonly.js163
-rw-r--r--sources/ext/dhtmlxscheduler_recurring.js786
-rw-r--r--sources/ext/dhtmlxscheduler_serialize.js77
-rw-r--r--sources/ext/dhtmlxscheduler_timeline.js1195
-rw-r--r--sources/ext/dhtmlxscheduler_tooltip.js193
-rw-r--r--sources/ext/dhtmlxscheduler_treetimeline.js302
-rw-r--r--sources/ext/dhtmlxscheduler_units.js238
-rw-r--r--sources/ext/dhtmlxscheduler_url.js34
-rw-r--r--sources/ext/dhtmlxscheduler_week_agenda.js256
-rw-r--r--sources/ext/dhtmlxscheduler_year_view.js373
-rw-r--r--sources/locale/locale.js50
-rw-r--r--sources/locale/locale_ar.js43
-rw-r--r--sources/locale/locale_be.js49
-rw-r--r--sources/locale/locale_ca.js49
-rw-r--r--sources/locale/locale_cn.js54
-rw-r--r--sources/locale/locale_cs.js48
-rw-r--r--sources/locale/locale_da.js47
-rw-r--r--sources/locale/locale_de.js47
-rw-r--r--sources/locale/locale_el.js48
-rw-r--r--sources/locale/locale_es.js49
-rw-r--r--sources/locale/locale_fi.js48
-rw-r--r--sources/locale/locale_fr.js46
-rw-r--r--sources/locale/locale_he.js48
-rw-r--r--sources/locale/locale_hu.js42
-rw-r--r--sources/locale/locale_id.js1
-rw-r--r--sources/locale/locale_it.js46
-rw-r--r--sources/locale/locale_jp.js50
-rw-r--r--sources/locale/locale_nb.js46
-rw-r--r--sources/locale/locale_nl.js48
-rw-r--r--sources/locale/locale_no.js48
-rw-r--r--sources/locale/locale_pl.js48
-rw-r--r--sources/locale/locale_pt.js58
-rw-r--r--sources/locale/locale_ro.js52
-rw-r--r--sources/locale/locale_ru.js46
-rw-r--r--sources/locale/locale_si.js48
-rw-r--r--sources/locale/locale_sk.js48
-rw-r--r--sources/locale/locale_sv.js53
-rw-r--r--sources/locale/locale_tr.js48
-rw-r--r--sources/locale/locale_ua.js48
-rw-r--r--sources/locale/recurring/locale_recurring_be.js2
-rw-r--r--sources/locale/recurring/locale_recurring_cn.js2
-rw-r--r--sources/locale/recurring/locale_recurring_cs.js1
-rw-r--r--sources/locale/recurring/locale_recurring_da.js2
-rw-r--r--sources/locale/recurring/locale_recurring_de.js2
-rw-r--r--sources/locale/recurring/locale_recurring_el.js2
-rw-r--r--sources/locale/recurring/locale_recurring_es.js2
-rw-r--r--sources/locale/recurring/locale_recurring_fi.js2
-rw-r--r--sources/locale/recurring/locale_recurring_fr.js2
-rw-r--r--sources/locale/recurring/locale_recurring_it.js2
-rw-r--r--sources/locale/recurring/locale_recurring_nb.js1
-rw-r--r--sources/locale/recurring/locale_recurring_nl.js2
-rw-r--r--sources/locale/recurring/locale_recurring_pl.js2
-rw-r--r--sources/locale/recurring/locale_recurring_pt.js1
-rw-r--r--sources/locale/recurring/locale_recurring_ro.js6
-rw-r--r--sources/locale/recurring/locale_recurring_ru.js2
-rw-r--r--sources/locale/recurring/locale_recurring_sk.js1
-rw-r--r--sources/locale/recurring/locale_recurring_sv.js1
-rw-r--r--sources/locale/recurring/locale_recurring_ua.js2
-rw-r--r--sources/locale/recurring/repeat_template.html57
-rw-r--r--sources/locale/recurring/repeat_template_be.html57
-rw-r--r--sources/locale/recurring/repeat_template_cn.html57
-rw-r--r--sources/locale/recurring/repeat_template_de.html60
-rw-r--r--sources/locale/recurring/repeat_template_el.html57
-rw-r--r--sources/locale/recurring/repeat_template_es.html57
-rw-r--r--sources/locale/recurring/repeat_template_fr.html57
-rw-r--r--sources/locale/recurring/repeat_template_it.html57
-rw-r--r--sources/locale/recurring/repeat_template_nl.html65
-rw-r--r--sources/locale/recurring/repeat_template_ro.html57
-rw-r--r--sources/locale/recurring/repeat_template_ru.html57
-rw-r--r--sources/locale/recurring/repeat_template_sk.html57
-rw-r--r--whatsnew.txt67
233 files changed, 30359 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6f345fc
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+dhtmlxScheduler v.4.0
+=====================
+
+dhtmlxScheduler is a JavaScript event calendar that allows you to add a Google-like scheduler to your web app or website. Intuitive drag-and-drop interface allows the end users to quickly manage events and appointments in different views: Day, Week, Month, Year, Agenda, Timeline, etc. Very lightweight, highly customizable, and fast, dhtmlxScheduler provides a quick way to add an Ajax-based event calendar on a web page.
+
+[http://dhtmlx.com/docs/products/dhtmlxScheduler](http://dhtmlx.com/docs/products/dhtmlxScheduler)
+
+
+License
+----------
+
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+
+(c) Dinamenta UAB
+
+
+
+Useful links
+-------------
+
+- Online documentation
+ http://docs.dhtmlx.com/doku.php?id=dhtmlxscheduler:toc
+- Support forum
+ http://forum.dhtmlx.com/viewforum.php?f=6
+- Skin builder
+ http://dhtmlx.com/docs/products/dhtmlxScheduler/skinBuilder/index.shtml
+
+
+Other editions
+--------------
+
+- MVC.Net edition
+ http://scheduler-net.com
+- Java edition (JSP, Struts, Spring, Grails)
+ http://javaplanner.com
+- Windows8 edition
+ http://dhtmlx.com/download/regular/dhtmlxScheduler_windows.zip
+- Scheduler for mobile devices
+ http://dhtmlx.com/x/download/regular/dhtmlxScheduler_mobile.zip \ No newline at end of file
diff --git a/codebase/connector/base_connector.php b/codebase/connector/base_connector.php
new file mode 100644
index 0000000..ac25b00
--- /dev/null
+++ b/codebase/connector/base_connector.php
@@ -0,0 +1,926 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("tools.php");
+require_once("db_common.php");
+require_once("dataprocessor.php");
+require_once("strategy.php");
+require_once("update.php");
+
+//enable buffering to catch and ignore any custom output before XML generation
+//because of this command, it strongly recommended to include connector's file before any other libs
+//in such case it will handle any extra output from not well formed code of other libs
+ini_set("output_buffering","On");
+ob_start();
+
+class OutputWriter{
+ private $start;
+ private $end;
+ private $type;
+
+ public function __construct($start, $end = ""){
+ $this->start = $start;
+ $this->end = $end;
+ $this->type = "xml";
+ }
+ public function add($add){
+ $this->start.=$add;
+ }
+ public function reset(){
+ $this->start="";
+ $this->end="";
+ }
+ public function set_type($add){
+ $this->type=$add;
+ }
+ public function output($name="", $inline=true, $encoding=""){
+ ob_clean();
+
+ if ($this->type == "xml"){
+ $header = "Content-type: text/xml";
+ if ("" != $encoding)
+ $header.="; charset=".$encoding;
+ header($header);
+ }
+
+ echo $this->__toString();
+ }
+ public function __toString(){
+ return $this->start.$this->end;
+ }
+}
+
+/*! EventInterface
+ Base class , for iterable collections, which are used in event
+**/
+class EventInterface{
+ protected $request; ////!< DataRequestConfig instance
+ public $rules=array(); //!< array of sorting rules
+
+ /*! constructor
+ creates a new interface based on existing request
+ @param request
+ DataRequestConfig object
+ */
+ public function __construct($request){
+ $this->request = $request;
+ }
+
+ /*! remove all elements from collection
+ */
+ public function clear(){
+ array_splice($rules,0);
+ }
+ /*! get index by name
+
+ @param name
+ name of field
+ @return
+ index of named field
+ */
+ public function index($name){
+ $len = sizeof($this->rules);
+ for ($i=0; $i < $len; $i++) {
+ if ($this->rules[$i]["name"]==$name)
+ return $i;
+ }
+ return false;
+ }
+}
+/*! Wrapper for collection of sorting rules
+**/
+class SortInterface extends EventInterface{
+ /*! constructor
+ creates a new interface based on existing request
+ @param request
+ DataRequestConfig object
+ */
+ public function __construct($request){
+ parent::__construct($request);
+ $this->rules = &$request->get_sort_by_ref();
+ }
+ /*! add new sorting rule
+
+ @param name
+ name of field
+ @param dir
+ direction of sorting
+ */
+ public function add($name,$dir){
+ if ($dir === false)
+ $this->request->set_sort($name);
+ else
+ $this->request->set_sort($name,$dir);
+ }
+ public function store(){
+ $this->request->set_sort_by($this->rules);
+ }
+}
+/*! Wrapper for collection of filtering rules
+**/
+class FilterInterface extends EventInterface{
+ /*! constructor
+ creates a new interface based on existing request
+ @param request
+ DataRequestConfig object
+ */
+ public function __construct($request){
+ $this->request = $request;
+ $this->rules = &$request->get_filters_ref();
+ }
+ /*! add new filatering rule
+
+ @param name
+ name of field
+ @param value
+ value to filter by
+ @param rule
+ filtering rule
+ */
+ public function add($name,$value,$rule){
+ $this->request->set_filter($name,$value,$rule);
+ }
+ public function store(){
+ $this->request->set_filters($this->rules);
+ }
+}
+
+/*! base class for component item representation
+**/
+class DataItem{
+ protected $data; //!< hash of data
+ protected $config;//!< DataConfig instance
+ protected $index;//!< index of element
+ protected $skip;//!< flag , which set if element need to be skiped during rendering
+ protected $userdata;
+
+ /*! constructor
+
+ @param data
+ hash of data
+ @param config
+ DataConfig object
+ @param index
+ index of element
+ */
+ function __construct($data,$config,$index){
+ $this->config=$config;
+ $this->data=$data;
+ $this->index=$index;
+ $this->skip=false;
+ $this->userdata=false;
+ }
+
+ //set userdata for the item
+ function set_userdata($name, $value){
+ if ($this->userdata === false)
+ $this->userdata = array();
+
+ $this->userdata[$name]=$value;
+ }
+ /*! get named value
+
+ @param name
+ name or alias of field
+ @return
+ value from field with provided name or alias
+ */
+ public function get_value($name){
+ return $this->data[$name];
+ }
+ /*! set named value
+
+ @param name
+ name or alias of field
+ @param value
+ value for field with provided name or alias
+ */
+ public function set_value($name,$value){
+ return $this->data[$name]=$value;
+ }
+ /*! get id of element
+ @return
+ id of element
+ */
+ public function get_id(){
+ $id = $this->config->id["name"];
+ if (array_key_exists($id,$this->data))
+ return $this->data[$id];
+ return false;
+ }
+ /*! change id of element
+
+ @param value
+ new id value
+ */
+ public function set_id($value){
+ $this->data[$this->config->id["name"]]=$value;
+ }
+ /*! get index of element
+
+ @return
+ index of element
+ */
+ public function get_index(){
+ return $this->index;
+ }
+ /*! mark element for skiping ( such element will not be rendered )
+ */
+ public function skip(){
+ $this->skip=true;
+ }
+
+ /*! return self as XML string
+ */
+ public function to_xml(){
+ return $this->to_xml_start().$this->to_xml_end();
+ }
+
+ /*! replace xml unsafe characters
+
+ @param string
+ string to be escaped
+ @return
+ escaped string
+ */
+ public function xmlentities($string) {
+ return str_replace( array( '&', '"', "'", '<', '>', '’' ), array( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string);
+ }
+
+ /*! return starting tag for self as XML string
+ */
+ public function to_xml_start(){
+ $str="<item";
+ for ($i=0; $i < sizeof($this->config->data); $i++){
+ $name=$this->config->data[$i]["name"];
+ $db_name=$this->config->data[$i]["db_name"];
+ $str.=" ".$name."='".$this->xmlentities($this->data[$name])."'";
+ }
+ //output custom data
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value){
+ $str.=" ".$key."='".$this->xmlentities($value)."'";
+ }
+
+ return $str.">";
+ }
+ /*! return ending tag for XML string
+ */
+ public function to_xml_end(){
+ return "</item>";
+ }
+}
+
+
+
+
+
+/*! Base connector class
+ This class used as a base for all component specific connectors.
+ Can be used on its own to provide raw data.
+**/
+class Connector {
+ protected $config;//DataConfig instance
+ protected $request;//DataRequestConfig instance
+ protected $names;//!< hash of names for used classes
+ protected $encoding="utf-8";//!< assigned encoding (UTF-8 by default)
+ protected $editing=false;//!< flag of edit mode ( response for dataprocessor )
+
+ public static $filter_var="dhx_filter";
+ public static $sort_var="dhx_sort";
+
+ public $model=false;
+
+ private $updating=false;//!< flag of update mode ( response for data-update )
+ private $db; //!< db connection resource
+ protected $dload;//!< flag of dyn. loading mode
+ public $access; //!< AccessMaster instance
+ protected $data_separator = "\n";
+
+ public $sql; //DataWrapper instance
+ public $event; //EventMaster instance
+ public $limit=false;
+
+ private $id_seed=0; //!< default value, used to generate auto-IDs
+ protected $live_update = false; // actions table name for autoupdating
+ protected $extra_output="";//!< extra info which need to be sent to client side
+ protected $options=array();//!< hash of OptionsConnector
+ protected $as_string = false; // render() returns string, don't send result in response
+ protected $simple = false; // render only data without any other info
+ protected $filters;
+ protected $sorts;
+ protected $mix;
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param db
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($db,$type=false, $item_type=false, $data_type=false, $render_type = false){
+ $this->exec_time=microtime(true);
+
+ if (!$type) $type="MySQL";
+ if (class_exists($type."DBDataWrapper",false)) $type.="DBDataWrapper";
+ if (!$item_type) $item_type="DataItem";
+ if (!$data_type) $data_type="DataProcessor";
+ if (!$render_type) $render_type="RenderStrategy";
+
+ $this->names=array(
+ "db_class"=>$type,
+ "item_class"=>$item_type,
+ "data_class"=>$data_type,
+ "render_class"=>$render_type
+ );
+ $this->attributes = array();
+ $this->filters = array();
+ $this->sorts = array();
+ $this->mix = array();
+
+ $this->config = new DataConfig();
+ $this->request = new DataRequestConfig();
+ $this->event = new EventMaster();
+ $this->access = new AccessMaster();
+
+ if (!class_exists($this->names["db_class"],false))
+ throw new Exception("DB class not found: ".$this->names["db_class"]);
+ $this->sql = new $this->names["db_class"]($db,$this->config);
+ $this->render = new $this->names["render_class"]($this);
+
+ $this->db=$db;//saved for options connectors, if any
+
+ EventMaster::trigger_static("connectorCreate",$this);
+ }
+
+ /*! return db connection resource
+ nested class may neeed to access live connection object
+ @return
+ DB connection resource
+ */
+ protected function get_connection(){
+ return $this->db;
+ }
+
+ public function get_config(){
+ return new DataConfig($this->config);
+ }
+
+ public function get_request(){
+ return new DataRequestConfig($this->request);
+ }
+
+
+ protected $attributes;
+ public function add_top_attribute($name, $string){
+ $this->attributes[$name] = $string;
+ }
+
+ //model is a class, which will be used for all data operations
+ //we expect that it has next methods get, update, insert, delete
+ //if method was not defined - we will use default logic
+ public function useModel($model){
+ $this->model = $model;
+ }
+
+
+ /*! config connector based on table
+
+ @param table
+ name of table in DB
+ @param id
+ name of id field
+ @param fields
+ list of fields names
+ @param extra
+ list of extra fields, optional, such fields will not be included in data rendering, but will be accessible in all inner events
+ @param relation_id
+ name of field used to define relations for hierarchical data organization, optional
+ */
+ public function render_table($table,$id="",$fields=false,$extra=false,$relation_id=false){
+ $this->configure($table,$id,$fields,$extra,$relation_id);
+ return $this->render();
+ }
+ public function configure($table,$id="",$fields=false,$extra=false,$relation_id=false){
+ if ($fields === false){
+ //auto-config
+ $info = $this->sql->fields_list($table);
+ $fields = implode(",",$info["fields"]);
+ if ($info["key"])
+ $id = $info["key"];
+ }
+ $this->config->init($id,$fields,$extra,$relation_id);
+ if (strpos(trim($table), " ")!==false)
+ $this->request->parse_sql($table);
+ else
+ $this->request->set_source($table);
+ }
+
+ public function uuid(){
+ return time()."x".$this->id_seed++;
+ }
+
+ /*! config connector based on sql
+
+ @param sql
+ sql query used as base of configuration
+ @param id
+ name of id field
+ @param fields
+ list of fields names
+ @param extra
+ list of extra fields, optional, such fields will not be included in data rendering, but will be accessible in all inner events
+ @param relation_id
+ name of field used to define relations for hierarchical data organization, optional
+ */
+ public function render_sql($sql,$id,$fields,$extra=false,$relation_id=false){
+ $this->config->init($id,$fields,$extra,$relation_id);
+ $this->request->parse_sql($sql);
+ return $this->render();
+ }
+
+ public function render_array($data, $id, $fields, $extra=false, $relation_id=false){
+ $this->configure("-",$id,$fields,$extra,$relation_id);
+ $this->sql = new ArrayDBDataWrapper($data, $this->config);
+ return $this->render();
+ }
+
+ public function render_complex_sql($sql,$id,$fields,$extra=false,$relation_id=false){
+ $this->config->init($id,$fields,$extra,$relation_id);
+ $this->request->parse_sql($sql, true);
+ return $this->render();
+ }
+
+ /*! render already configured connector
+
+ @param config
+ configuration of data
+ @param request
+ configuraton of request
+ */
+ public function render_connector($config,$request){
+ $this->config->copy($config);
+ $this->request->copy($request);
+ return $this->render();
+ }
+
+ /*! render self
+ process commands, output requested data as XML
+ */
+ public function render(){
+ $this->event->trigger("onInit", $this);
+ EventMaster::trigger_static("connectorInit",$this);
+
+ if (!$this->as_string)
+ $this->parse_request();
+ $this->set_relation();
+
+ if ($this->live_update !== false && $this->updating!==false) {
+ $this->live_update->get_updates();
+ } else {
+ if ($this->editing){
+ $dp = new $this->names["data_class"]($this,$this->config,$this->request);
+ $dp->process($this->config,$this->request);
+ } else {
+ if (!$this->access->check("read")){
+ LogMaster::log("Access control: read operation blocked");
+ echo "Access denied";
+ die();
+ }
+ $wrap = new SortInterface($this->request);
+ $this->apply_sorts($wrap);
+ $this->event->trigger("beforeSort",$wrap);
+ $wrap->store();
+
+ $wrap = new FilterInterface($this->request);
+ $this->apply_filters($wrap);
+ $this->event->trigger("beforeFilter",$wrap);
+ $wrap->store();
+
+ if ($this->model && method_exists($this->model, "get")){
+ $this->sql = new ArrayDBDataWrapper();
+ $result = new ArrayQueryWrapper(call_user_func(array($this->model, "get"), $this->request));
+ $out = $this->output_as_xml($result);
+ } else {
+ $out = $this->output_as_xml($this->get_resource());
+
+ if ($out !== null) return $out;
+ }
+
+ }
+ }
+ $this->end_run();
+ }
+
+
+ /*! empty call which used for tree-logic
+ * to prevent code duplicating
+ */
+ protected function set_relation() {}
+
+ /*! gets resource for rendering
+ */
+ protected function get_resource() {
+ return $this->sql->select($this->request);
+ }
+
+
+ /*! prevent SQL injection through column names
+ replace dangerous chars in field names
+ @param str
+ incoming field name
+ @return
+ safe field name
+ */
+ protected function safe_field_name($str){
+ return strtok($str, " \n\t;',");
+ }
+
+ /*! limit max count of records
+ connector will ignore any records after outputing max count
+ @param limit
+ max count of records
+ @return
+ none
+ */
+ public function set_limit($limit){
+ $this->limit = $limit;
+ }
+
+
+ public function limit($start, $count, $sort_field=false, $sort_dir=false){
+ $this->request->set_limit($start, $count);
+ if ($sort_field)
+ $this->request->set_sort($sort_field, $sort_dir);
+ }
+
+ protected function parse_request_mode(){
+ //detect edit mode
+ if (isset($_GET["editing"])){
+ $this->editing=true;
+ } else if (isset($_POST["ids"])){
+ $this->editing=true;
+ LogMaster::log('While there is no edit mode mark, POST parameters similar to edit mode detected. \n Switching to edit mode ( to disable behavior remove POST[ids]');
+ } else if (isset($_GET['dhx_version'])){
+ $this->updating = true;
+ }
+ }
+
+ /*! parse incoming request, detects commands and modes
+ */
+ protected function parse_request(){
+ //set default dyn. loading params, can be reset in child classes
+ if ($this->dload)
+ $this->request->set_limit(0,$this->dload);
+ else if ($this->limit)
+ $this->request->set_limit(0,$this->limit);
+
+ if (isset($_GET["posStart"]) && isset($_GET["count"])) {
+ $this->request->set_limit($_GET["posStart"],$_GET["count"]);
+ }
+
+ $this->parse_request_mode();
+
+ if ($this->live_update && ($this->updating || $this->editing)){
+ $this->request->set_version($_GET["dhx_version"]);
+ $this->request->set_user($_GET["dhx_user"]);
+ }
+
+ if (isset($_GET[Connector::$sort_var]))
+ foreach($_GET[Connector::$sort_var] as $k => $v){
+ $k = $this->safe_field_name($k);
+ $this->request->set_sort($this->resolve_parameter($k),$v);
+ }
+
+ if (isset($_GET[Connector::$sort_var]))
+ foreach($_GET[Connector::$filter_var] as $k => $v){
+ $k = $this->safe_field_name($k);
+ $this->request->set_filter($this->resolve_parameter($k),$v);
+ }
+
+ $key = ConnectorSecurity::checkCSRF($this->editing);
+ if ($key !== "")
+ $this->add_top_attribute(ConnectorSecurity::$security_var, $key);
+
+ }
+
+ /*! convert incoming request name to the actual DB name
+ @param name
+ incoming parameter name
+ @return
+ name of related DB field
+ */
+ protected function resolve_parameter($name){
+ return $name;
+ }
+
+
+ /*! replace xml unsafe characters
+
+ @param string
+ string to be escaped
+ @return
+ escaped string
+ */
+ protected function xmlentities($string) {
+ return str_replace( array( '&', '"', "'", '<', '>', '’' ), array( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string);
+ }
+
+ public function getRecord($id){
+ LogMaster::log("Retreiving data for record: ".$id);
+ $source = new DataRequestConfig($this->request);
+ $source->set_filter($this->config->id["name"],$id, "=");
+
+ $res = $this->sql->select($source);
+
+ $temp = $this->data_separator;
+ $this->data_separator="";
+ $output = $this->render_set($res);
+ $this->data_separato=$temp;
+
+ return $output;
+ }
+
+ /*! render from DB resultset
+ @param res
+ DB resultset
+ process commands, output requested data as XML
+ */
+ protected function render_set($res){
+ return $this->render->render_set($res, $this->names["item_class"], $this->dload, $this->data_separator, $this->config, $this->mix);
+ }
+
+ /*! output fetched data as XML
+ @param res
+ DB resultset
+ */
+ protected function output_as_xml($res){
+ $result = $this->render_set($res);
+ if ($this->simple) return $result;
+
+ $start="<?xml version='1.0' encoding='".$this->encoding."' ?>".$this->xml_start();
+ $end=$result.$this->xml_end();
+
+ if ($this->as_string) return $start.$end;
+
+ $out = new OutputWriter($start, $end);
+ $this->event->trigger("beforeOutput", $this, $out);
+ $out->output("", true, $this->encoding);
+ }
+
+
+ /*! end processing
+ stop execution timer, kill the process
+ */
+ protected function end_run(){
+ $time=microtime(true)-$this->exec_time;
+ LogMaster::log("Done in {$time}s");
+ flush();
+ die();
+ }
+
+ /*! set xml encoding
+
+ methods sets only attribute in XML, no real encoding conversion occurs
+ @param encoding
+ value which will be used as XML encoding
+ */
+ public function set_encoding($encoding){
+ $this->encoding=$encoding;
+ }
+
+ /*! enable or disable dynamic loading mode
+
+ @param count
+ count of rows loaded from server, actual only for grid-connector, can be skiped in other cases.
+ If value is a false or 0 - dyn. loading will be disabled
+ */
+ public function dynamic_loading($count){
+ $this->dload=$count;
+ }
+
+ /*! enable logging
+
+ @param path
+ path to the log file. If set as false or empty strig - logging will be disabled
+ @param client_log
+ enable output of log data to the client side
+ */
+ public function enable_log($path=true,$client_log=false){
+ LogMaster::enable_log($path,$client_log);
+ }
+
+ /*! provides infor about current processing mode
+ @return
+ true if processing dataprocessor command, false otherwise
+ */
+ public function is_select_mode(){
+ $this->parse_request_mode();
+ return !$this->editing;
+ }
+
+ public function is_first_call(){
+ $this->parse_request_mode();
+ return !($this->editing || $this->updating || $this->request->get_start() || isset($_GET['dhx_no_header']));
+
+ }
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ $attributes = "";
+
+ if ($this->dload){
+ //info for dyn. loadin
+ if ($pos=$this->request->get_start())
+ $attributes .= " pos='".$pos."'";
+ else
+ $attributes .= " total_count='".$this->sql->get_size($this->request)."'";
+ }
+ foreach($this->attributes as $k=>$v)
+ $attributes .= " ".$k."='".$v."'";
+
+ return "<data".$attributes.">";
+ }
+ /*! renders self as xml, ending part
+ */
+ protected function xml_end(){
+ $this->fill_collections();
+ if (isset($this->extra_output))
+ return $this->extra_output."</data>";
+ else
+ return "</data>";
+ }
+
+ protected function fill_collections($list=""){
+ foreach ($this->options as $k=>$v) {
+ $name = $k;
+ $this->extra_output.="<coll_options for='{$name}'>";
+ if (!is_string($this->options[$name]))
+ $this->extra_output.=$this->options[$name]->render();
+ else
+ $this->extra_output.=$this->options[$name];
+ $this->extra_output.="</coll_options>";
+ }
+ }
+
+ /*! assign options collection to the column
+
+ @param name
+ name of the column
+ @param options
+ array or connector object
+ */
+ public function set_options($name,$options){
+ if (is_array($options)){
+ $str="";
+ foreach($options as $k => $v)
+ $str.="<item value='".$this->xmlentities($k)."' label='".$this->xmlentities($v)."' />";
+ $options=$str;
+ }
+ $this->options[$name]=$options;
+ }
+
+
+ public function insert($data) {
+ $action = new DataAction('inserted', false, $data);
+ $request = new DataRequestConfig();
+ $request->set_source($this->request->get_source());
+
+ $this->config->limit_fields($data);
+ $this->sql->insert($action,$request);
+ $this->config->restore_fields($data);
+
+ return $action->get_new_id();
+ }
+
+ public function delete($id) {
+ $action = new DataAction('deleted', $id, array());
+ $request = new DataRequestConfig();
+ $request->set_source($this->request->get_source());
+
+ $this->sql->delete($action,$request);
+ return $action->get_status();
+}
+
+ public function update($data) {
+ $action = new DataAction('updated', $data[$this->config->id["name"]], $data);
+ $request = new DataRequestConfig();
+ $request->set_source($this->request->get_source());
+
+ $this->config->limit_fields($data);
+ $this->sql->update($action,$request);
+ $this->config->restore_fields($data);
+
+ return $action->get_status();
+ }
+
+ /*! sets actions_table for Optimistic concurrency control mode and start it
+ @param table_name
+ name of database table which will used for saving actions
+ @param url
+ url used for update notifications
+ */
+ public function enable_live_update($table, $url=false){
+ $this->live_update = new DataUpdate($this->sql, $this->config, $this->request, $table,$url);
+ $this->live_update->set_event($this->event,$this->names["item_class"]);
+ $this->event->attach("beforeOutput", Array($this->live_update, "version_output"));
+ $this->event->attach("beforeFiltering", Array($this->live_update, "get_updates"));
+ $this->event->attach("beforeProcessing", Array($this->live_update, "check_collision"));
+ $this->event->attach("afterProcessing", Array($this->live_update, "log_operations"));
+ }
+
+ /*! render() returns result as string or send to response
+ */
+ public function asString($as_string) {
+ $this->as_string = $as_string;
+ }
+
+ public function simple_render() {
+ $this->simple = true;
+ return $this->render();
+ }
+
+ public function filter($name, $value = false, $operation = '=') {
+ $this->filters[] = array('name' => $name, 'value' => $value, 'operation' => $operation);
+ }
+
+ public function clear_filter() {
+ $this->filters = array();
+ $this->request->set_filters(array());
+ }
+
+ protected function apply_filters($wrap) {
+ for ($i = 0; $i < count($this->filters); $i++) {
+ $f = $this->filters[$i];
+ $wrap->add($f['name'], $f['value'], $f['operation']);
+ }
+ }
+
+ public function sort($name, $direction = false) {
+ $this->sorts[] = array('name' => $name, 'direction' => $direction);
+ }
+
+ protected function apply_sorts($wrap) {
+ for ($i = 0; $i < count($this->sorts); $i++) {
+ $s = $this->sorts[$i];
+ $wrap->add($s['name'], $s['direction']);
+ }
+ }
+
+ public function mix($name, $value, $filter=false) {
+ $this->mix[] = Array('name'=>$name, 'value'=>$value, 'filter'=>$filter);
+ }
+}
+
+
+/*! wrapper around options collection, used for comboboxes and filters
+**/
+class OptionsConnector extends Connector{
+ protected $init_flag=false;//!< used to prevent rendering while initialization
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="DataItem";
+ if (!$data_type) $data_type=""; //has not sense, options not editable
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+ /*! render self
+ process commands, return data as XML, not output data to stdout, ignore parameters in incoming request
+ @return
+ data as XML string
+ */
+ public function render(){
+ if (!$this->init_flag){
+ $this->init_flag=true;
+ return "";
+ }
+ $res = $this->sql->select($this->request);
+ return $this->render_set($res);
+ }
+}
+
+
+
+class DistinctOptionsConnector extends OptionsConnector{
+ /*! render self
+ process commands, return data as XML, not output data to stdout, ignore parameters in incoming request
+ @return
+ data as XML string
+ */
+ public function render(){
+ if (!$this->init_flag){
+ $this->init_flag=true;
+ return "";
+ }
+ $res = $this->sql->get_variants($this->config->text[0]["db_name"],$this->request);
+ return $this->render_set($res);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/chart_connector.php b/codebase/connector/chart_connector.php
new file mode 100644
index 0000000..247d1e6
--- /dev/null
+++ b/codebase/connector/chart_connector.php
@@ -0,0 +1,18 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+ require_once("dataview_connector.php");
+
+
+/*! Connector class for DataView
+**/
+class ChartConnector extends DataViewConnector{
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/combo_connector.php b/codebase/connector/combo_connector.php
new file mode 100644
index 0000000..35c66e9
--- /dev/null
+++ b/codebase/connector/combo_connector.php
@@ -0,0 +1,94 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+require_once("base_connector.php");
+/*! DataItem class for Combo component
+**/
+class ComboDataItem extends DataItem{
+ private $selected;//!< flag of selected option
+
+ function __construct($data,$config,$index){
+ parent::__construct($data,$config,$index);
+
+ $this->selected=false;
+ }
+ /*! mark option as selected
+ */
+ function select(){
+ $this->selected=true;
+ }
+ /*! return self as XML string, starting part
+ */
+ function to_xml_start(){
+ if ($this->skip) return "";
+
+ return "<option ".($this->selected?"selected='true'":"")."value='".$this->get_id()."'><![CDATA[".$this->data[$this->config->text[0]["name"]]."]]>";
+ }
+ /*! return self as XML string, ending part
+ */
+ function to_xml_end(){
+ if ($this->skip) return "";
+ return "</option>";
+ }
+}
+
+/*! Connector for the dhtmlxCombo
+**/
+class ComboConnector extends Connector{
+ private $filter; //!< filtering mask from incoming request
+ private $position; //!< position from incoming request
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="ComboDataItem";
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+
+ //parse GET scoope, all operations with incoming request must be done here
+ function parse_request(){
+ parent::parse_request();
+
+ if (isset($_GET["pos"])){
+ if (!$this->dload) //not critical, so just write a log message
+ LogMaster::log("Dyn loading request received, but server side was not configured to process dyn. loading. ");
+ else
+ $this->request->set_limit($_GET["pos"],$this->dload);
+ }
+
+ if (isset($_GET["mask"]))
+ $this->request->set_filter($this->config->text[0]["db_name"],$_GET["mask"]."%","LIKE");
+
+ LogMaster::log($this->request);
+ }
+
+
+ /*! renders self as xml, starting part
+ */
+ public function xml_start(){
+ if ($this->request->get_start())
+ return "<complete add='true'>";
+ else
+ return "<complete>";
+ }
+
+ /*! renders self as xml, ending part
+ */
+ public function xml_end(){
+ return "</complete>";
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/convert.php b/codebase/connector/convert.php
new file mode 100644
index 0000000..f24922c
--- /dev/null
+++ b/codebase/connector/convert.php
@@ -0,0 +1,69 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+class ConvertService{
+ private $url;
+ private $type;
+ private $name;
+ private $inline;
+
+ public function __construct($url){
+ $this->url = $url;
+ $this->pdf();
+ EventMaster::attach_static("connectorInit",array($this, "handle"));
+ }
+ public function pdf($name = "data.pdf", $inline = false){
+ $this->type = "pdf";
+ $this->name = $name;
+ $this->inline = $inline;
+ }
+ public function excel($name = "data.xls", $inline = false){
+ $this->type = "excel";
+ $this->name = $name;
+ $this->inline = $inline;
+ }
+ public function handle($conn){
+ $conn->event->attach("beforeOutput",array($this,"convert"));
+ }
+ private function as_file($size, $name, $inline){
+ header('Content-Type: application/force-download');
+ header('Content-Type: application/octet-stream');
+ header('Content-Type: application/download');
+ header('Content-Transfer-Encoding: binary');
+
+ header('Content-Length: '.$size);
+ if ($inline)
+ header('Content-Disposition: inline; filename="'.$name.'";');
+ else
+ header('Content-Disposition: attachment; filename="'.basename($name).'";');
+ }
+ public function convert($conn, $out){
+
+ $str_out = str_replace("<rows>","<rows profile='color'>", $out);
+ $str_out = str_replace("<head>","<head><columns>", $str_out);
+ $str_out = str_replace("</head>","</columns></head>", $str_out);
+
+ if ($this->type == "pdf")
+ header("Content-type: application/pdf");
+ else
+ header("Content-type: application/ms-excel");
+
+ $handle = curl_init($this->url);
+ curl_setopt($handle, CURLOPT_POST, true);
+ curl_setopt($handle, CURLOPT_HEADER, false);
+ curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($handle, CURLOPT_POSTFIELDS, "grid_xml=".urlencode($str_out));
+
+
+ $out->reset();
+ $out->set_type("pdf");
+ $out->add(curl_exec($handle));
+ $this->as_file(strlen((string)$out), $this->name, $this->inline);
+
+ curl_close($handle);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/crosslink_connector.php b/codebase/connector/crosslink_connector.php
new file mode 100644
index 0000000..22ad83d
--- /dev/null
+++ b/codebase/connector/crosslink_connector.php
@@ -0,0 +1,141 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("data_connector.php");
+
+class DelayedConnector extends Connector{
+ protected $init_flag=false;//!< used to prevent rendering while initialization
+ private $data_mode=false;//!< flag to separate xml and data request modes
+ private $data_result=false;//<! store results of query
+
+ public function dataMode($name){
+ $this->data_mode = $name;
+ $this->data_result=array();
+ }
+ public function getDataResult(){
+ return $this->data_result;
+ }
+
+ public function render(){
+ if (!$this->init_flag){
+ $this->init_flag=true;
+ return "";
+ }
+ return parent::render();
+ }
+
+ protected function output_as_xml($res){
+ if ($this->data_mode){
+ while ($data=$this->sql->get_next($res)){
+ $this->data_result[]=$data[$this->data_mode];
+ }
+ }
+ else
+ return parent::output_as_xml($res);
+ }
+ protected function end_run(){
+ if (!$this->data_mode)
+ parent::end_run();
+ }
+}
+
+class CrossOptionsConnector extends Connector{
+ public $options, $link;
+ private $master_name, $link_name, $master_value;
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ $this->options = new OptionsConnector($res,$type,$item_type,$data_type);
+ $this->link = new DelayedConnector($res,$type,$item_type,$data_type);
+
+ EventMaster::attach_static("connectorInit",array($this, "handle"));
+ }
+ public function handle($conn){
+ if ($conn instanceof DelayedConnector) return;
+ if ($conn instanceof OptionsConnector) return;
+
+ $this->master_name = $this->link->get_config()->id["db_name"];
+ $this->link_name = $this->options->get_config()->id["db_name"];
+
+ $this->link->event->attach("beforeFilter",array($this, "get_only_related"));
+
+ if (isset($_GET["dhx_crosslink_".$this->link_name])){
+ $this->get_links($_GET["dhx_crosslink_".$this->link_name]);
+ die();
+ }
+
+ if (!$this->dload){
+ $conn->event->attach("beforeRender", array($this, "getOptions"));
+ $conn->event->attach("beforeRenderSet", array($this, "prepareConfig"));
+ }
+
+
+ $conn->event->attach("afterProcessing", array($this, "afterProcessing"));
+ }
+ public function prepareConfig($conn, $res, $config){
+ $config->add_field($this->link_name);
+ }
+ public function getOptions($data){
+ $this->link->dataMode($this->link_name);
+
+ $this->get_links($data->get_value($this->master_name));
+
+ $data->set_value($this->link_name, implode(",",$this->link->getDataResult()));
+ }
+ public function get_links($id){
+ $this->master_value = $id;
+ $this->link->render();
+ }
+ public function get_only_related($filters){
+ $index = $filters->index($this->master_name);
+ if ($index!==false){
+ $filters->rules[$index]["value"]=$this->master_value;
+ } else
+ $filters->add($this->master_name, $this->master_value, "=");
+ }
+ public function afterProcessing($action){
+ $status = $action->get_status();
+
+ $master_key = $action->get_value($this->master_name);
+ $link_key = $action->get_value($this->link_name);
+ $link_key = explode(',', $link_key);
+
+ if ($status == "inserted")
+ $master_key = $action->get_new_id();
+
+ switch ($status){
+ case "deleted":
+ $this->link->delete($master_key);
+ break;
+ case "updated":
+ //cross link options not loaded yet, so we can skip update
+ if (!array_key_exists($this->link_name, $action->get_data()))
+ break;
+ //else, delete old options and continue in insert section to add new values
+ $this->link->delete($master_key);
+ case "inserted":
+ for ($i=0; $i < sizeof($link_key); $i++)
+ if ($link_key[$i]!="")
+ $this->link->insert(array(
+ $this->link_name => $link_key[$i],
+ $this->master_name => $master_key
+ ));
+ break;
+ }
+ }
+}
+
+
+class JSONCrossOptionsConnector extends CrossOptionsConnector{
+ public $options, $link;
+ private $master_name, $link_name, $master_value;
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ $this->options = new JSONOptionsConnector($res,$type,$item_type,$data_type);
+ $this->link = new DelayedConnector($res,$type,$item_type,$data_type);
+
+ EventMaster::attach_static("connectorInit",array($this, "handle"));
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/data_connector.php b/codebase/connector/data_connector.php
new file mode 100644
index 0000000..caa5369
--- /dev/null
+++ b/codebase/connector/data_connector.php
@@ -0,0 +1,500 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+class CommonDataProcessor extends DataProcessor{
+ protected function get_post_values($ids){
+ if (isset($_GET['action'])){
+ $data = array();
+ if (isset($_POST["id"])){
+ $dataset = array();
+ foreach($_POST as $key=>$value)
+ $dataset[$key] = ConnectorSecurity::filter($value);
+
+ $data[$_POST["id"]] = $dataset;
+ }
+ else
+ $data["dummy_id"] = $_POST;
+ return $data;
+ }
+ return parent::get_post_values($ids);
+ }
+
+ protected function get_ids(){
+ if (isset($_GET['action'])){
+ if (isset($_POST["id"]))
+ return array($_POST['id']);
+ else
+ return array("dummy_id");
+ }
+ return parent::get_ids();
+ }
+
+ protected function get_operation($rid){
+ if (isset($_GET['action']))
+ return $_GET['action'];
+ return parent::get_operation($rid);
+ }
+
+ public function output_as_xml($results){
+ if (isset($_GET['action'])){
+ LogMaster::log("Edit operation finished",$results);
+ ob_clean();
+ $type = $results[0]->get_status();
+ if ($type == "error" || $type == "invalid"){
+ echo "false";
+ } else if ($type=="insert"){
+ echo "true\n".$results[0]->get_new_id();
+ } else
+ echo "true";
+ } else
+ return parent::output_as_xml($results);
+ }
+};
+
+/*! DataItem class for DataView component
+**/
+class CommonDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+ return $this->to_xml_start().$this->to_xml_end();
+ }
+
+ function to_xml_start(){
+ $str="<item id='".$this->get_id()."' ";
+ for ($i=0; $i < sizeof($this->config->text); $i++){
+ $name=$this->config->text[$i]["name"];
+ $str.=" ".$name."='".$this->xmlentities($this->data[$name])."'";
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $str.=" ".$key."='".$this->xmlentities($value)."'";
+
+ return $str.">";
+ }
+}
+
+
+/*! Connector class for DataView
+**/
+class DataConnector extends Connector{
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="CommonDataItem";
+ if (!$data_type) $data_type="CommonDataProcessor";
+
+ $this->sections = array();
+
+ if (!$render_type) $render_type="RenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+
+ }
+
+ protected $sections;
+ public function add_section($name, $string){
+ $this->sections[$name] = $string;
+ }
+
+
+ //parse GET scoope, all operations with incoming request must be done here
+ protected function parse_request(){
+ if (isset($_GET['action'])){
+ $action = $_GET['action'];
+ //simple request mode
+ if ($action == "get"){
+ //data request
+ if (isset($_GET['id'])){
+ //single entity data request
+ $this->request->set_filter($this->config->id["name"],$_GET['id'],"=");
+ } else {
+ //loading collection of items
+ }
+ } else {
+ //data saving
+ $this->editing = true;
+ }
+ } else {
+ if (isset($_GET['editing']) && isset($_POST['ids']))
+ $this->editing = true;
+
+ parent::parse_request();
+ }
+
+ if (isset($_GET["start"]) && isset($_GET["count"]))
+ $this->request->set_limit($_GET["start"],$_GET["count"]);
+
+ }
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ $start = parent::xml_start();
+
+ foreach($this->sections as $k=>$v)
+ $start .= "<".$k.">".$v."</".$k.">\n";
+ return $start;
+ }
+};
+
+class JSONDataConnector extends DataConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="JSONCommonDataItem";
+ if (!$data_type) $data_type="CommonDataProcessor";
+ if (!$render_type) $render_type="JSONRenderStrategy";
+ $this->data_separator = ",\n";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ /*! assign options collection to the column
+
+ @param name
+ name of the column
+ @param options
+ array or connector object
+ */
+ public function set_options($name,$options){
+ if (is_array($options)){
+ $str=array();
+ foreach($options as $k => $v)
+ $str[]='{"id":"'.$this->xmlentities($k).'", "value":"'.$this->xmlentities($v).'"}';
+ $options=implode(",",$str);
+ }
+ $this->options[$name]=$options;
+ }
+
+ /*! generates xml description for options collections
+
+ @param list
+ comma separated list of column names, for which options need to be generated
+ */
+ protected function fill_collections($list=""){
+ $options = array();
+ foreach ($this->options as $k=>$v) {
+ $name = $k;
+ $option="\"{$name}\":[";
+ if (!is_string($this->options[$name]))
+ $option.=substr($this->options[$name]->render(),0,-2);
+ else
+ $option.=$this->options[$name];
+ $option.="]";
+ $options[] = $option;
+ }
+ $this->extra_output .= implode($this->data_separator, $options);
+ }
+
+ protected function resolve_parameter($name){
+ if (intval($name).""==$name)
+ return $this->config->text[intval($name)]["db_name"];
+ return $name;
+ }
+
+ protected function output_as_xml($res){
+ $json = $this->render_set($res);
+ if ($this->simple) return $json;
+ $result = json_encode($json);
+
+ $this->fill_collections();
+ $is_sections = sizeof($this->sections) && $this->is_first_call();
+ if ($this->dload || $is_sections || sizeof($this->attributes) || !empty($this->extra_data)){
+
+ $attributes = "";
+ foreach($this->attributes as $k=>$v)
+ $attributes .= ", \"".$k."\":\"".$v."\"";
+
+ $extra = "";
+ if (!empty($this->extra_output))
+ $extra .= ', "collections": {'.$this->extra_output.'}';
+
+ $sections = "";
+ if ($is_sections){
+ //extra sections
+ foreach($this->sections as $k=>$v)
+ $sections .= ", \"".$k."\":".$v;
+ }
+
+ $dyn = "";
+ if ($this->dload){
+ //info for dyn. loadin
+ if ($pos=$this->request->get_start())
+ $dyn .= ", \"pos\":".$pos;
+ else
+ $dyn .= ", \"pos\":0, \"total_count\":".$this->sql->get_size($this->request);
+ }
+ if ($attributes || $sections || $this->extra_output || $dyn) {
+ $result = "{ \"data\":".$result.$attributes.$extra.$sections.$dyn."}";
+ }
+ }
+
+ // return as string
+ if ($this->as_string) return $result;
+
+ // output direct to response
+ $out = new OutputWriter($result, "");
+ $out->set_type("json");
+ $this->event->trigger("beforeOutput", $this, $out);
+ $out->output("", true, $this->encoding);
+ return null;
+ }
+}
+
+class JSONCommonDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+
+ $data = array(
+ 'id' => $this->get_id()
+ );
+ for ($i=0; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ $data[$extra]=$this->data[$extra];
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $data[$key]=$value;
+
+ return $data;
+ }
+}
+
+
+/*! wrapper around options collection, used for comboboxes and filters
+**/
+class JSONOptionsConnector extends JSONDataConnector{
+ protected $init_flag=false;//!< used to prevent rendering while initialization
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="JSONCommonDataItem";
+ if (!$data_type) $data_type=""; //has not sense, options not editable
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+ /*! render self
+ process commands, return data as XML, not output data to stdout, ignore parameters in incoming request
+ @return
+ data as XML string
+ */
+ public function render(){
+ if (!$this->init_flag){
+ $this->init_flag=true;
+ return "";
+ }
+ $res = $this->sql->select($this->request);
+ return $this->render_set($res);
+ }
+}
+
+
+class JSONDistinctOptionsConnector extends JSONOptionsConnector{
+ /*! render self
+ process commands, return data as XML, not output data to stdout, ignore parameters in incoming request
+ @return
+ data as XML string
+ */
+ public function render(){
+ if (!$this->init_flag){
+ $this->init_flag=true;
+ return "";
+ }
+ $res = $this->sql->get_variants($this->config->text[0]["db_name"],$this->request);
+ return $this->render_set($res);
+ }
+}
+
+
+
+class TreeCommonDataItem extends CommonDataItem{
+ protected $kids=-1;
+
+ function to_xml_start(){
+ $str="<item id='".$this->get_id()."' ";
+ for ($i=0; $i < sizeof($this->config->text); $i++){
+ $name=$this->config->text[$i]["name"];
+ $str.=" ".$name."='".$this->xmlentities($this->data[$name])."'";
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $str.=" ".$key."='".$this->xmlentities($value)."'";
+
+ if ($this->kids === true)
+ $str .=" dhx_kids='1'";
+
+ return $str.">";
+ }
+
+ function has_kids(){
+ return $this->kids;
+ }
+
+ function set_kids($value){
+ $this->kids=$value;
+ }
+}
+
+
+class TreeDataConnector extends DataConnector{
+ protected $parent_name = 'parent';
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ * @param render_type
+ * name of class which will provides data rendering
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="TreeCommonDataItem";
+ if (!$data_type) $data_type="CommonDataProcessor";
+ if (!$render_type) $render_type="TreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ //parse GET scoope, all operations with incoming request must be done here
+ protected function parse_request(){
+ parent::parse_request();
+
+ if (isset($_GET[$this->parent_name]))
+ $this->request->set_relation($_GET[$this->parent_name]);
+ else
+ $this->request->set_relation("0");
+
+ $this->request->set_limit(0,0); //netralize default reaction on dyn. loading mode
+ }
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ return "<data parent='".$this->request->get_relation()."'>";
+ }
+}
+
+
+class JSONTreeDataConnector extends TreeDataConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="JSONTreeCommonDataItem";
+ if (!$data_type) $data_type="CommonDataProcessor";
+ if (!$render_type) $render_type="JSONTreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ protected function output_as_xml($res){
+ $result = $this->render_set($res);
+ if ($this->simple) return $result;
+
+ $data = array();
+ $data["parent"] = $this->request->get_relation();
+ $data["data"] = $result;
+
+ $this->fill_collections();
+ if (!empty($this->options))
+ $data["collections"] = $this->options;
+
+ $data = json_encode($data);
+
+ // return as string
+ if ($this->as_string) return $data;
+
+ // output direct to response
+ $out = new OutputWriter($data, "");
+ $out->set_type("json");
+ $this->event->trigger("beforeOutput", $this, $out);
+ $out->output("", true, $this->encoding);
+ }
+
+ /*! assign options collection to the column
+
+ @param name
+ name of the column
+ @param options
+ array or connector object
+ */
+ public function set_options($name,$options){
+ if (is_array($options)){
+ $str=array();
+ foreach($options as $k => $v)
+ $str[]=Array("id"=>$this->xmlentities($k), "value"=>$this->xmlentities($v));//'{"id":"'.$this->xmlentities($k).'", "value":"'.$this->xmlentities($v).'"}';
+ $options=$str;
+ }
+ $this->options[$name]=$options;
+ }
+
+ /*! generates xml description for options collections
+
+ @param list
+ comma separated list of column names, for which options need to be generated
+ */
+ protected function fill_collections($list=""){
+ $options = array();
+ foreach ($this->options as $k=>$v) {
+ $name = $k;
+ if (!is_array($this->options[$name]))
+ $option=$this->options[$name]->render();
+ else
+ $option=$this->options[$name];
+ $options[$name] = $option;
+ }
+ $this->options = $options;
+ $this->extra_output .= "'collections':".json_encode($options);
+ }
+
+}
+
+
+class JSONTreeCommonDataItem extends TreeCommonDataItem{
+ /*! return self as XML string
+ */
+ function to_xml_start(){
+ if ($this->skip) return "";
+
+ $data = array( "id" => $this->get_id() );
+ for ($i=0; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ if (isset($this->data[$extra]))
+ $data[$extra]=$this->data[$extra];
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $data[$key]=$value;
+
+ if ($this->kids === true)
+ $data["dhx_kids"] = 1;
+
+ return $data;
+ }
+
+ function to_xml_end(){
+ return "";
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/dataprocessor.php b/codebase/connector/dataprocessor.php
new file mode 100644
index 0000000..e75fc85
--- /dev/null
+++ b/codebase/connector/dataprocessor.php
@@ -0,0 +1,505 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+/*! Base DataProcessor handling
+**/
+
+require_once("xss_filter.php");
+
+class DataProcessor{
+ protected $connector;//!< Connector instance
+ protected $config;//!< DataConfig instance
+ protected $request;//!< DataRequestConfig instance
+ static public $action_param ="!nativeeditor_status";
+
+ /*! constructor
+
+ @param connector
+ Connector object
+ @param config
+ DataConfig object
+ @param request
+ DataRequestConfig object
+ */
+ function __construct($connector,$config,$request){
+ $this->connector= $connector;
+ $this->config=$config;
+ $this->request=$request;
+ }
+
+ /*! convert incoming data name to valid db name
+ redirect to Connector->name_data by default
+ @param data
+ data name from incoming request
+ @return
+ related db_name
+ */
+ function name_data($data){
+ return $data;
+ }
+ /*! retrieve data from incoming request and normalize it
+
+ @param ids
+ array of extected IDs
+ @return
+ hash of data
+ */
+ protected function get_post_values($ids){
+ $data=array();
+ for ($i=0; $i < sizeof($ids); $i++)
+ $data[$ids[$i]]=array();
+
+ foreach ($_POST as $key => $value) {
+ $details=explode("_",$key,2);
+ if (sizeof($details)==1) continue;
+
+ $name=$this->name_data($details[1]);
+ $data[$details[0]][$name]=ConnectorSecurity::filter($value);
+ }
+
+ return $data;
+ }
+ protected function get_ids(){
+ if (!isset($_POST["ids"]))
+ throw new Exception("Incorrect incoming data, ID of incoming records not recognized");
+ return explode(",",$_POST["ids"]);
+ }
+
+ protected function get_operation($rid){
+ if (!isset($_POST[$rid."_".DataProcessor::$action_param]))
+ throw new Exception("Status of record [{$rid}] not found in incoming request");
+ return $_POST[$rid."_".DataProcessor::$action_param];
+ }
+ /*! process incoming request ( save|update|delete )
+ */
+ function process(){
+ LogMaster::log("DataProcessor object initialized",$_POST);
+
+ $results=array();
+
+ $ids=$this->get_ids();
+ $rows_data=$this->get_post_values($ids);
+ $failed=false;
+
+ try{
+ if ($this->connector->sql->is_global_transaction())
+ $this->connector->sql->begin_transaction();
+
+ for ($i=0; $i < sizeof($ids); $i++) {
+ $rid = $ids[$i];
+ LogMaster::log("Row data [{$rid}]",$rows_data[$rid]);
+ $status = $this->get_operation($rid);
+
+ $action=new DataAction($status,$rid,$rows_data[$rid]);
+ $results[]=$action;
+ $this->inner_process($action);
+ }
+
+ } catch(Exception $e){
+ LogMaster::log($e);
+ $failed=true;
+ }
+
+ if ($this->connector->sql->is_global_transaction()){
+ if (!$failed)
+ for ($i=0; $i < sizeof($results); $i++)
+ if ($results[$i]->get_status()=="error" || $results[$i]->get_status()=="invalid"){
+ $failed=true;
+ break;
+ }
+ if ($failed){
+ for ($i=0; $i < sizeof($results); $i++)
+ $results[$i]->error();
+ $this->connector->sql->rollback_transaction();
+ }
+ else
+ $this->connector->sql->commit_transaction();
+ }
+
+ $this->output_as_xml($results);
+ }
+
+ /*! converts status string to the inner mode name
+
+ @param status
+ external status string
+ @return
+ inner mode name
+ */
+ protected function status_to_mode($status){
+ switch($status){
+ case "updated":
+ return "update";
+ break;
+ case "inserted":
+ return "insert";
+ break;
+ case "deleted":
+ return "delete";
+ break;
+ default:
+ return $status;
+ break;
+ }
+ }
+ /*! process data updated request received
+
+ @param action
+ DataAction object
+ @return
+ DataAction object with details of processing
+ */
+ protected function inner_process($action){
+
+ if ($this->connector->sql->is_record_transaction())
+ $this->connector->sql->begin_transaction();
+
+ try{
+
+ $mode = $this->status_to_mode($action->get_status());
+ if (!$this->connector->access->check($mode)){
+ LogMaster::log("Access control: {$operation} operation blocked");
+ $action->error();
+ } else {
+ $check = $this->connector->event->trigger("beforeProcessing",$action);
+ if (!$action->is_ready())
+ $this->check_exts($action,$mode);
+ $check = $this->connector->event->trigger("afterProcessing",$action);
+ }
+
+ } catch (Exception $e){
+ LogMaster::log($e);
+ $action->set_status("error");
+ if ($action)
+ $this->connector->event->trigger("onDBError", $action, $e);
+ }
+
+ if ($this->connector->sql->is_record_transaction()){
+ if ($action->get_status()=="error" || $action->get_status()=="invalid")
+ $this->connector->sql->rollback_transaction();
+ else
+ $this->connector->sql->commit_transaction();
+ }
+
+ return $action;
+ }
+ /*! check if some event intercepts processing, send data to DataWrapper in other case
+
+ @param action
+ DataAction object
+ @param mode
+ name of inner mode ( will be used to generate event names )
+ */
+ function check_exts($action,$mode){
+ $old_config = new DataConfig($this->config);
+
+ $this->connector->event->trigger("before".$mode,$action);
+ if ($action->is_ready())
+ LogMaster::log("Event code for ".$mode." processed");
+ else {
+ //check if custom sql defined
+ $sql = $this->connector->sql->get_sql($mode,$action);
+ if ($sql){
+ $this->connector->sql->query($sql);
+ }
+ else{
+ $action->sync_config($this->config);
+ if ($this->connector->model && method_exists($this->connector->model, $mode)){
+ call_user_func(array($this->connector->model, $mode), $action);
+ LogMaster::log("Model object process action: ".$mode);
+ }
+ if (!$action->is_ready()){
+ $method=array($this->connector->sql,$mode);
+ if (!is_callable($method))
+ throw new Exception("Unknown dataprocessing action: ".$mode);
+ call_user_func($method,$action,$this->request);
+ }
+ }
+ }
+ $this->connector->event->trigger("after".$mode,$action);
+
+ $this->config->copy($old_config);
+ }
+
+ /*! output xml response for dataprocessor
+
+ @param results
+ array of DataAction objects
+ */
+ function output_as_xml($results){
+ LogMaster::log("Edit operation finished",$results);
+ ob_clean();
+ header("Content-type:text/xml");
+ echo "<?xml version='1.0' ?>";
+ echo "<data>";
+ for ($i=0; $i < sizeof($results); $i++)
+ echo $results[$i]->to_xml();
+ echo "</data>";
+ }
+
+}
+
+/*! contain all info related to action and controls customizaton
+**/
+class DataAction{
+ private $status; //!< cuurent status of record
+ private $id;//!< id of record
+ private $data;//!< data hash of record
+ private $userdata;//!< hash of extra data , attached to record
+ private $nid;//!< new id value , after operation executed
+ private $output;//!< custom output to client side code
+ private $attrs;//!< hash of custtom attributes
+ private $ready;//!< flag of operation's execution
+ private $addf;//!< array of added fields
+ private $delf;//!< array of deleted fields
+
+
+ /*! constructor
+
+ @param status
+ current operation status
+ @param id
+ record id
+ @param data
+ hash of data
+ */
+ function __construct($status,$id,$data){
+ $this->status=$status;
+ $this->id=$id;
+ $this->data=$data;
+ $this->nid=$id;
+
+ $this->output="";
+ $this->attrs=array();
+ $this->ready=false;
+
+ $this->addf=array();
+ $this->delf=array();
+ }
+
+
+ /*! add custom field and value to DB operation
+
+ @param name
+ name of field which will be added to DB operation
+ @param value
+ value which will be used for related field in DB operation
+ */
+ function add_field($name,$value){
+ LogMaster::log("adding field: ".$name.", with value: ".$value);
+ $this->data[$name]=$value;
+ $this->addf[]=$name;
+ }
+ /*! remove field from DB operation
+
+ @param name
+ name of field which will be removed from DB operation
+ */
+ function remove_field($name){
+ LogMaster::log("removing field: ".$name);
+ $this->delf[]=$name;
+ }
+
+ /*! sync field configuration with external object
+
+ @param slave
+ SQLMaster object
+ @todo
+ check , if all fields removed then cancel action
+ */
+ function sync_config($slave){
+ foreach ($this->addf as $k => $v)
+ $slave->add_field($v);
+ foreach ($this->delf as $k => $v)
+ $slave->remove_field($v);
+ }
+ /*! get value of some record's propery
+
+ @param name
+ name of record's property ( name of db field or alias )
+ @return
+ value of related property
+ */
+ function get_value($name){
+ if (!array_key_exists($name,$this->data)){
+ LogMaster::log("Incorrect field name used: ".$name);
+ LogMaster::log("data",$this->data);
+ return "";
+ }
+ return $this->data[$name];
+ }
+ /*! set value of some record's propery
+
+ @param name
+ name of record's property ( name of db field or alias )
+ @param value
+ value of related property
+ */
+ function set_value($name,$value){
+ LogMaster::log("change value of: ".$name." as: ".$value);
+ $this->data[$name]=$value;
+ }
+ /*! get hash of data properties
+
+ @return
+ hash of data properties
+ */
+ function get_data(){
+ return $this->data;
+ }
+ /*! get some extra info attached to record
+ deprecated, exists just for backward compatibility, you can use set_value instead of it
+ @param name
+ name of userdata property
+ @return
+ value of related userdata property
+ */
+ function get_userdata_value($name){
+ return $this->get_value($name);
+ }
+ /*! set some extra info attached to record
+ deprecated, exists just for backward compatibility, you can use get_value instead of it
+ @param name
+ name of userdata property
+ @param value
+ value of userdata property
+ */
+ function set_userdata_value($name,$value){
+ return $this->set_value($name,$value);
+ }
+ /*! get current status of record
+
+ @return
+ string with status value
+ */
+ function get_status(){
+ return $this->status;
+ }
+ /*! assign new status to the record
+
+ @param status
+ new status value
+ */
+ function set_status($status){
+ $this->status=$status;
+ }
+ /*! set id
+ @param id
+ id value
+ */
+ function set_id($id) {
+ $this->id = $id;
+ LogMaster::log("Change id: ".$id);
+ }
+ /*! set id
+ @param id
+ id value
+ */
+ function set_new_id($id) {
+ $this->nid = $id;
+ LogMaster::log("Change new id: ".$id);
+ }
+ /*! get id of current record
+
+ @return
+ id of record
+ */
+ function get_id(){
+ return $this->id;
+ }
+ /*! sets custom response text
+
+ can be accessed through defineAction on client side. Text wrapped in CDATA, so no extra escaping necessary
+ @param text
+ custom response text
+ */
+ function set_response_text($text){
+ $this->set_response_xml("<![CDATA[".$text."]]>");
+ }
+ /*! sets custom response xml
+
+ can be accessed through defineAction on client side
+ @param text
+ string with XML data
+ */
+ function set_response_xml($text){
+ $this->output=$text;
+ }
+ /*! sets custom response attributes
+
+ can be accessed through defineAction on client side
+ @param name
+ name of custom attribute
+ @param value
+ value of custom attribute
+ */
+ function set_response_attribute($name,$value){
+ $this->attrs[$name]=$value;
+ }
+ /*! check if action finished
+
+ @return
+ true if action finished, false otherwise
+ */
+ function is_ready(){
+ return $this->ready;
+ }
+ /*! return new id value
+
+ equal to original ID normally, after insert operation - value assigned for new DB record
+ @return
+ new id value
+ */
+ function get_new_id(){
+ return $this->nid;
+ }
+
+ /*! set result of operation as error
+ */
+ function error(){
+ $this->status="error";
+ $this->ready=true;
+ }
+ /*! set result of operation as invalid
+ */
+ function invalid(){
+ $this->status="invalid";
+ $this->ready=true;
+ }
+ /*! confirm successful opeation execution
+ @param id
+ new id value, optional
+ */
+ function success($id=false){
+ if ($id!==false)
+ $this->nid = $id;
+ $this->ready=true;
+ }
+ /*! convert DataAction to xml format compatible with client side dataProcessor
+ @return
+ DataAction operation report as XML string
+ */
+ function to_xml(){
+ $str="<action type='{$this->status}' sid='{$this->id}' tid='{$this->nid}' ";
+ foreach ($this->attrs as $k => $v) {
+ $str.=$k."='".$v."' ";
+ }
+ $str.=">{$this->output}</action>";
+ return $str;
+ }
+ /*! convert self to string ( for logs )
+
+ @return
+ DataAction operation report as plain string
+ */
+ function __toString(){
+ return "action:{$this->status}; sid:{$this->id}; tid:{$this->nid};";
+ }
+
+
+}
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/dataview_connector.php b/codebase/connector/dataview_connector.php
new file mode 100644
index 0000000..41b7387
--- /dev/null
+++ b/codebase/connector/dataview_connector.php
@@ -0,0 +1,74 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+/*! DataItem class for DataView component
+**/
+class DataViewDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+
+ $str="<item id='".$this->get_id()."' >";
+ for ($i=0; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ $str.="<".$extra."><![CDATA[".$this->data[$extra]."]]></".$extra.">";
+ }
+ return $str."</item>";
+ }
+}
+
+
+/*! Connector class for DataView
+**/
+class DataViewConnector extends Connector{
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="DataViewDataItem";
+ if (!$data_type) $data_type="DataProcessor";
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+
+ //parse GET scoope, all operations with incoming request must be done here
+ function parse_request(){
+ parent::parse_request();
+
+ if (isset($_GET["posStart"]) && isset($_GET["count"]))
+ $this->request->set_limit($_GET["posStart"],$_GET["count"]);
+ }
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ $attributes = "";
+ foreach($this->attributes as $k=>$v)
+ $attributes .= " ".$k."='".$v."'";
+
+ $start.= ">";
+ if ($this->dload){
+ if ($pos=$this->request->get_start())
+ return "<data pos='".$pos."'".$attributes.">";
+ else
+ return "<data total_count='".$this->sql->get_size($this->request)."'".$attributes.">";
+ }
+ else
+ return "<data".$attributes.">";
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_adodb.php b/codebase/connector/db_adodb.php
new file mode 100644
index 0000000..5250c21
--- /dev/null
+++ b/codebase/connector/db_adodb.php
@@ -0,0 +1,72 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! Implementation of DataWrapper for PostgreSQL
+**/
+class AdoDBDataWrapper extends DBDataWrapper{
+ protected $last_result;
+ public function query($sql){
+ LogMaster::log($sql);
+ if (is_array($sql)) {
+ $res = $this->connection->SelectLimit($sql['sql'], $sql['numrows'], $sql['offset']);
+ } else {
+ $res = $this->connection->Execute($sql);
+ }
+
+ if ($res===false) throw new Exception("ADODB operation failed\n".$this->connection->ErrorMsg());
+ $this->last_result = $res;
+ return $res;
+ }
+
+ public function get_next($res){
+ if (!$res)
+ $res = $this->last_result;
+
+ if ($res->EOF)
+ return false;
+
+ $row = $res->GetRowAssoc(false);
+ $res->MoveNext();
+ return $row;
+ }
+
+ protected function get_new_id(){
+ return $this->connection->Insert_ID();
+ }
+
+ public function escape($data){
+ return $this->connection->addq($data);
+ }
+
+ /*! escape field name to prevent sql reserved words conflict
+ @param data
+ unescaped data
+ @return
+ escaped data
+ */
+ public function escape_name($data){
+ if ((strpos($data,"`")!==false || is_int($data)) || (strpos($data,".")!==false))
+ return $data;
+ return '`'.$data.'`';
+ }
+
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+
+ if ($start || $count) {
+ $sql=array("sql"=>$sql,'numrows'=>$count, 'offset'=>$start);
+ }
+ return $sql;
+ }
+
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_common.php b/codebase/connector/db_common.php
new file mode 100644
index 0000000..76748e7
--- /dev/null
+++ b/codebase/connector/db_common.php
@@ -0,0 +1,1069 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("tools.php");
+
+/*! manager of data request
+**/
+class DataRequestConfig{
+ private $filters; //!< array of filtering rules
+ private $relation=false; //!< ID or other element used for linking hierarchy
+ private $sort_by; //!< sorting field
+ private $start; //!< start of requested data
+ private $count; //!< length of requested data
+
+ private $user;
+ private $version;
+
+ //for render_sql
+ private $source; //!< souce table or another source destination
+ private $fieldset; //!< set of data, which need to be retrieved from source
+
+ /*! constructor
+
+ @param proto
+ DataRequestConfig object, optional, if provided then new request object will copy all properties from provided one
+ */
+ public function __construct($proto=false){
+ if ($proto)
+ $this->copy($proto);
+ else{
+ $start=0;
+ $this->filters=array();
+ $this->sort_by=array();
+ }
+ }
+
+ /*! copy parameters of source object into self
+
+ @param proto
+ source object
+ */
+ public function copy($proto){
+ $this->filters =$proto->get_filters();
+ $this->sort_by =$proto->get_sort_by();
+ $this->count =$proto->get_count();
+ $this->start =$proto->get_start();
+ $this->source =$proto->get_source();
+ $this->fieldset =$proto->get_fieldset();
+ $this->relation =$proto->get_relation();
+ $this->user = $proto->user;
+ $this->version = $proto->version;
+ }
+
+ /*! convert self to string ( for logs )
+ @return
+ self as plain string,
+ */
+ public function __toString(){
+ $str="Source:{$this->source}\nFieldset:{$this->fieldset}\nWhere:";
+ for ($i=0; $i < sizeof($this->filters); $i++)
+ $str.=$this->filters[$i]["name"]." ".$this->filters[$i]["operation"]." ".$this->filters[$i]["value"].";";
+ $str.="\nStart:{$this->start}\nCount:{$this->count}\n";
+ for ($i=0; $i < sizeof($this->sort_by); $i++)
+ $str.=$this->sort_by[$i]["name"]."=".$this->sort_by[$i]["direction"].";";
+ $str.="\nRelation:{$this->relation}";
+ return $str;
+ }
+
+ /*! returns set of filtering rules
+ @return
+ set of filtering rules
+ */
+ public function get_filters(){
+ return $this->filters;
+ }
+ public function &get_filters_ref(){
+ return $this->filters;
+ }
+ public function set_filters($data){
+ $this->filters=$data;
+ }
+
+
+ public function get_user(){
+ return $this->user;
+ }
+ public function set_user($user){
+ $this->user = $user;
+ }
+ public function get_version(){
+ return $this->version;
+ }
+ public function set_version($version){
+ $this->version = $version;
+ }
+
+ /*! returns list of used fields
+ @return
+ list of used fields
+ */
+ public function get_fieldset(){
+ return $this->fieldset;
+ }
+ /*! returns name of source table
+ @return
+ name of source table
+ */
+ public function get_source(){
+ return $this->source;
+ }
+ /*! returns set of sorting rules
+ @return
+ set of sorting rules
+ */
+ public function get_sort_by(){
+ return $this->sort_by;
+ }
+ public function &get_sort_by_ref(){
+ return $this->sort_by;
+ }
+ public function set_sort_by($data){
+ $this->sort_by=$data;
+ }
+
+ /*! returns start index
+ @return
+ start index
+ */
+ public function get_start(){
+ return $this->start;
+ }
+ /*! returns count of requested records
+ @return
+ count of requested records
+ */
+ public function get_count(){
+ return $this->count;
+ }
+ /*! returns name of relation id
+ @return
+ relation id name
+ */
+ public function get_relation(){
+ return $this->relation;
+ }
+
+ /*! sets sorting rule
+
+ @param field
+ name of column
+ @param order
+ direction of sorting
+ */
+ public function set_sort($field,$order=false){
+ if (!$field && !$order)
+ $this->sort_by=array();
+ else{
+ if ($order===false)
+ $this->sort_by[] = $field;
+ else {
+ $order=strtolower($order)=="asc"?"ASC":"DESC";
+ $this->sort_by[]=array("name"=>$field,"direction" => $order);
+ }
+ }
+ }
+ /*! sets filtering rule
+
+ @param field
+ name of column
+ @param value
+ value for filtering
+ @param operation
+ operation for filtering, optional , LIKE by default
+ */
+ public function set_filter($field,$value=false,$operation=false){
+ if ($value === false)
+ array_push($this->filters,$field);
+ else
+ array_push($this->filters,array("name"=>$field,"value"=>$value,"operation"=>$operation));
+ }
+
+ /*! sets list of used fields
+
+ @param value
+ list of used fields
+ */
+ public function set_fieldset($value){
+ $this->fieldset=$value;
+ }
+ /*! sets name of source table
+
+ @param value
+ name of source table
+ */
+ public function set_source($value){
+ if (is_string($value))
+ $value = trim($value);
+ $this->source = $value;
+ if (!$this->source) throw new Exception("Source of data can't be empty");
+ }
+ /*! sets data limits
+
+ @param start
+ start index
+ @param count
+ requested count of data
+ */
+ public function set_limit($start,$count){
+ $this->start=$start;
+ $this->count=$count;
+ }
+ /*! sets name of relation id
+
+ @param value
+ name of relation id field
+ */
+ public function set_relation($value){
+ $this->relation=$value;
+ }
+ /*! parse incoming sql, to fill other properties
+
+ @param sql
+ incoming sql string
+ */
+ public function parse_sql($sql, $as_is = false){
+ if ($as_is){
+ $this->fieldset = $sql;
+ return;
+ }
+
+ $sql= preg_replace("/[ \n\t]+limit[\n\t ,0-9]*$/i","",$sql);
+
+ $data = preg_split("/[ \n\t]+\\_from\\_/i",$sql,2);
+ if (count($data)!=2)
+ $data = preg_split("/[ \n\t]+from/i",$sql,2);
+ $this->fieldset = preg_replace("/^[\s]*select/i","",$data[0],1);
+
+ //Ignore next type of calls
+ //direct call to stored procedure without FROM
+ if ((count($data) == 1) ||
+ //UNION select
+ preg_match("#[ \n\r\t]union[ \n\t\r]#i", $sql)){
+ $this->fieldset = $sql;
+ return;
+ }
+
+ $table_data = preg_split("/[ \n\t]+where/i",$data[1],2);
+ /*
+ if sql code contains group_by we will place all sql query in the FROM
+ it will not allow to use any filtering against the query
+ still it is better than just generate incorrect sql commands for any group by query
+ */
+ if (sizeof($table_data)>1 && !preg_match("#.*group by.*#i",$table_data[1])){ //where construction exists
+ $this->set_source($table_data[0]);
+ $where_data = preg_split("/[ \n\t]+order[ ]+by/i",$table_data[1],2);
+ $this->filters[]=$where_data[0];
+ if (sizeof($where_data)==1) return; //end of line detected
+ $data=$where_data[1];
+ } else {
+ $table_data = preg_split("/[ \n\t]+order[ ]+by/i",$data[1],2);
+ $this->set_source($table_data[0]);
+ if (sizeof($table_data)==1) return; //end of line detected
+ $data=$table_data[1];
+ }
+
+ if (trim($data)){ //order by construction exists
+ $s_data = preg_split("/\\,/",trim($data));
+ for ($i=0; $i < count($s_data); $i++) {
+ $data=preg_split("/[ ]+/",trim($s_data[$i]),2);
+ if (sizeof($data)>1)
+ $this->set_sort($data[0],$data[1]);
+ else
+ $this->set_sort($data[0]);
+ }
+
+ }
+ }
+}
+
+/*! manager of data configuration
+**/
+class DataConfig{
+ public $id;////!< name of ID field
+ public $relation_id;//!< name or relation ID field
+ public $text;//!< array of text fields
+ public $data;//!< array of all known fields , fields which exists only in this collection will not be included in dataprocessor's operations
+
+
+ /*! converts self to the string, for logging purposes
+ **/
+ public function __toString(){
+ $str="ID:{$this->id['db_name']}(ID:{$this->id['name']})\n";
+ $str.="Relation ID:{$this->relation_id['db_name']}({$this->relation_id['name']})\n";
+ $str.="Data:";
+ for ($i=0; $i<sizeof($this->text); $i++)
+ $str.="{$this->text[$i]['db_name']}({$this->text[$i]['name']}),";
+
+ $str.="\nExtra:";
+ for ($i=0; $i<sizeof($this->data); $i++)
+ $str.="{$this->data[$i]['db_name']}({$this->data[$i]['name']}),";
+
+ return $str;
+ }
+
+ /*! removes un-used fields from configuration
+ @param name
+ name of field , which need to be preserved
+ */
+ public function minimize($name){
+ for ($i=0; $i < sizeof($this->text); $i++){
+ if ($this->text[$i]["db_name"]==$name || $this->text[$i]["name"]==$name){
+ $this->text[$i]["name"]="value";
+ $this->data=array($this->text[$i]);
+ $this->text=array($this->text[$i]);
+ return;
+ }
+ }
+ throw new Exception("Incorrect dataset minimization, master field not found.");
+ }
+
+ public function limit_fields($data){
+ if (isset($this->full_field_list))
+ $this->restore_fields();
+ $this->full_field_list = $this->text;
+ $this->text = array();
+
+ for ($i=0; $i < sizeof($this->full_field_list); $i++) {
+ if (array_key_exists($this->full_field_list[$i]["name"],$data))
+ $this->text[] = $this->full_field_list[$i];
+ }
+ }
+
+ public function restore_fields(){
+ if (isset($this->full_field_list))
+ $this->text = $this->full_field_list;
+ }
+
+ /*! initialize inner state by parsing configuration parameters
+
+ @param id
+ name of id field
+ @param fields
+ name of data field(s)
+ @param extra
+ name of extra field(s)
+ @param relation
+ name of relation field
+
+ */
+ public function init($id,$fields,$extra,$relation){
+ $this->id = $this->parse($id,false);
+ $this->text = $this->parse($fields,true);
+ $this->data = array_merge($this->text,$this->parse($extra,true));
+ $this->relation_id = $this->parse($relation,false);
+ }
+
+ /*! parse configuration string
+
+ @param key
+ key string from configuration
+ @param mode
+ multi names flag
+ @return
+ parsed field name object
+ */
+ private function parse($key,$mode){
+ if ($mode){
+ if (!$key) return array();
+ $key=explode(",",$key);
+ for ($i=0; $i < sizeof($key); $i++)
+ $key[$i]=$this->parse($key[$i],false);
+ return $key;
+ }
+ $key=explode("(",$key);
+ $data=array("db_name"=>trim($key[0]), "name"=>trim($key[0]));
+ if (sizeof($key)>1)
+ $data["name"]=substr(trim($key[1]),0,-1);
+ return $data;
+ }
+
+ /*! constructor
+ init public collectons
+ @param proto
+ DataConfig object used as prototype for new one, optional
+ */
+ public function __construct($proto=false){
+ if ($proto!==false)
+ $this->copy($proto);
+ else {
+ $this->text=array();
+ $this->data=array();
+ $this->id=array("name"=>"dhx_auto_id", "db_name"=>"dhx_auto_id");
+ $this->relation_id=array("name"=>"", "db_name"=>"");
+ }
+ }
+
+ /*! copy properties from source object
+
+ @param proto
+ source object
+ */
+ public function copy($proto){
+ $this->id = $proto->id;
+ $this->relation_id = $proto->relation_id;
+ $this->text = $proto->text;
+ $this->data = $proto->data;
+ }
+
+ /*! returns list of data fields (db_names)
+ @return
+ list of data fields ( ready to be used in SQL query )
+ */
+ public function db_names_list($db){
+ $out=array();
+ if ($this->id["db_name"])
+ array_push($out,$db->escape_name($this->id["db_name"]));
+ if ($this->relation_id["db_name"])
+ array_push($out,$db->escape_name($this->relation_id["db_name"]));
+
+ for ($i=0; $i < sizeof($this->data); $i++){
+ if ($this->data[$i]["db_name"]!=$this->data[$i]["name"])
+ $out[]=$db->escape_name($this->data[$i]["db_name"])." as ".$this->data[$i]["name"];
+ else
+ $out[]=$db->escape_name($this->data[$i]["db_name"]);
+ }
+
+ return $out;
+ }
+
+ /*! add field to dataset config ($text collection)
+
+ added field will be used in all auto-generated queries
+ @param name
+ name of field
+ @param aliase
+ aliase of field, optional
+ */
+ public function add_field($name,$aliase=false){
+ if ($aliase===false) $aliase=$name;
+
+ //adding to list of data-active fields
+ if ($this->id["db_name"]==$name || $this->relation_id["db_name"] == $name){
+ LogMaster::log("Field name already used as ID, be sure that it is really necessary.");
+ }
+ if ($this->is_field($name,$this->text)!=-1)
+ throw new Exception('Data field already registered: '.$name);
+ array_push($this->text,array("db_name"=>$name,"name"=>$aliase));
+
+ //adding to list of all fields as well
+ if ($this->is_field($name,$this->data)==-1)
+ array_push($this->data,array("db_name"=>$name,"name"=>$aliase));
+
+ }
+
+ /*! remove field from dataset config ($text collection)
+
+ removed field will be excluded from all auto-generated queries
+ @param name
+ name of field, or aliase of field
+ */
+ public function remove_field($name){
+ $ind = $this->is_field($name);
+ if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
+ array_splice($this->text,$ind,1);
+ //we not deleting field from $data collection, so it will not be included in data operation, but its data still available
+ }
+
+ /*! remove field from dataset config ($text and $data collections)
+
+ removed field will be excluded from all auto-generated queries
+ @param name
+ name of field, or aliase of field
+ */
+ public function remove_field_full($name){
+ $ind = $this->is_field($name);
+ if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
+ array_splice($this->text,$ind,1);
+
+ $ind = $this->is_field($name, $this->data);
+ if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
+ array_splice($this->data,$ind,1);
+ }
+
+ /*! check if field is a part of dataset
+
+ @param name
+ name of field
+ @param collection
+ collection, against which check will be done, $text collection by default
+ @return
+ returns true if field already a part of dataset, otherwise returns true
+ */
+ public function is_field($name,$collection = false){
+ if (!$collection)
+ $collection=$this->text;
+
+ for ($i=0; $i<sizeof($collection); $i++)
+ if ($collection[$i]["name"] == $name || $collection[$i]["db_name"] == $name) return $i;
+ return -1;
+ }
+
+
+}
+
+/*! Base abstraction class, used for data operations
+ Class abstract access to data, it is a base class to all DB wrappers
+**/
+abstract class DataWrapper{
+ protected $connection;
+ protected $config;//!< DataConfig instance
+ /*! constructor
+ @param connection
+ DB connection
+ @param config
+ DataConfig instance
+ */
+ public function __construct($connection,$config){
+ $this->config=$config;
+ $this->connection=$connection;
+ }
+
+ /*! insert record in storage
+
+ @param data
+ DataAction object
+ @param source
+ DataRequestConfig object
+ */
+ abstract function insert($data,$source);
+
+ /*! delete record from storage
+
+ @param data
+ DataAction object
+ @param source
+ DataRequestConfig object
+ */
+ abstract function delete($data,$source);
+
+ /*! update record in storage
+
+ @param data
+ DataAction object
+ @param source
+ DataRequestConfig object
+ */
+ abstract function update($data,$source);
+
+ /*! select record from storage
+
+ @param source
+ DataRequestConfig object
+ */
+ abstract function select($source);
+
+ /*! get size of storage
+
+ @param source
+ DataRequestConfig object
+ */
+ abstract function get_size($source);
+
+ /*! get all variations of field in storage
+
+ @param name
+ name of field
+ @param source
+ DataRequestConfig object
+ */
+ abstract function get_variants($name,$source);
+
+ /*! checks if there is a custom sql string for specified db operation
+
+ @param name
+ name of DB operation
+ @param data
+ hash of data
+ @return
+ sql string
+ */
+ public function get_sql($name,$data){
+ return ""; //custom sql not supported by default
+ }
+
+ /*! begins DB transaction
+ */
+ public function begin_transaction(){
+ throw new Exception("Data wrapper not supports transactions.");
+ }
+ /*! commits DB transaction
+ */
+ public function commit_transaction(){
+ throw new Exception("Data wrapper not supports transactions.");
+ }
+ /*! rollbacks DB transaction
+ */
+ public function rollback_transaction(){
+ throw new Exception("Data wrapper not supports transactions.");
+ }
+}
+
+/*! Common database abstraction class
+ Class provides base set of methods to access and change data in DB, class used as a base for DB-specific wrappers
+**/
+abstract class DBDataWrapper extends DataWrapper{
+ private $transaction = false; //!< type of transaction
+ private $sequence=false;//!< sequence name
+ private $sqls = array();//!< predefined sql actions
+
+
+ /*! assign named sql query
+ @param name
+ name of sql query
+ @param data
+ sql query text
+ */
+ public function attach($name,$data){
+ $name=strtolower($name);
+ $this->sqls[$name]=$data;
+ }
+ /*! replace vars in sql string with actual values
+
+ @param matches
+ array of field name matches
+ @return
+ value for the var name
+ */
+ public function get_sql_callback($matches){
+ return $this->escape($this->temp->get_value($matches[1]));
+ }
+ public function get_sql($name,$data){
+ $name=strtolower($name);
+ if (!array_key_exists($name,$this->sqls)) return "";
+
+
+ $str = $this->sqls[$name];
+ $this->temp = $data; //dirty
+ $str = preg_replace_callback('|\{([^}]+)\}|',array($this,"get_sql_callback"),$str);
+ unset ($this->temp); //dirty
+ return $str;
+ }
+
+ public function insert($data,$source){
+ $sql=$this->insert_query($data,$source);
+ $this->query($sql);
+ $data->success($this->get_new_id());
+ }
+ public function delete($data,$source){
+ $sql=$this->delete_query($data,$source);
+ $this->query($sql);
+ $data->success();
+ }
+ public function update($data,$source){
+ $sql=$this->update_query($data,$source);
+ $this->query($sql);
+ $data->success();
+ }
+ public function select($source){
+ $select=$source->get_fieldset();
+ if (!$select){
+ $select=$this->config->db_names_list($this);
+ $select = implode(",",$select);
+ }
+
+ $where=$this->build_where($source->get_filters(),$source->get_relation());
+ $sort=$this->build_order($source->get_sort_by());
+
+ return $this->query($this->select_query($select,$source->get_source(),$where,$sort,$source->get_start(),$source->get_count()));
+ }
+ public function queryOne($sql){
+ $res = $this->query($sql);
+ if ($res)
+ return $this->get_next($res);
+ return false;
+ }
+ public function get_size($source){
+ $count = new DataRequestConfig($source);
+
+ $count->set_fieldset("COUNT(*) as DHX_COUNT ");
+ $count->set_sort(null);
+ $count->set_limit(0,0);
+
+ $res=$this->select($count);
+ $data=$this->get_next($res);
+ if (array_key_exists("DHX_COUNT",$data)) return $data["DHX_COUNT"];
+ else return $data["dhx_count"]; //postgresql
+ }
+ public function get_variants($name,$source){
+ $count = new DataRequestConfig($source);
+ $count->set_fieldset("DISTINCT ".$this->escape_name($name)." as value");
+ $sort = new SortInterface($source);
+ $count->set_sort(null);
+ for ($i = 0; $i < count($sort->rules); $i++) {
+ if ($sort->rules[$i]['name'] == $name)
+ $count->set_sort($sort->rules[$i]['name'], $sort->rules[$i]['direction']);
+ }
+ $count->set_limit(0,0);
+ return $this->select($count);
+ }
+
+ public function sequence($sec){
+ $this->sequence=$sec;
+ }
+
+
+ /*! create an sql string for filtering rules
+
+ @param rules
+ set of filtering rules
+ @param relation
+ name of relation id field
+ @return
+ sql string with filtering rules
+ */
+ protected function build_where($rules,$relation=false){
+ $sql=array();
+ for ($i=0; $i < sizeof($rules); $i++)
+ if (is_string($rules[$i]))
+ array_push($sql,"(".$rules[$i].")");
+ else
+ if ($rules[$i]["value"]!=""){
+ if (!$rules[$i]["operation"])
+ array_push($sql,$this->escape_name($rules[$i]["name"])." LIKE '%".$this->escape($rules[$i]["value"])."%'");
+ else
+ array_push($sql,$this->escape_name($rules[$i]["name"])." ".$rules[$i]["operation"]." '".$this->escape($rules[$i]["value"])."'");
+ }
+ if ($relation!==false)
+ array_push($sql,$this->escape_name($this->config->relation_id["db_name"])." = '".$this->escape($relation)."'");
+ return implode(" AND ",$sql);
+ }
+ /*! convert sorting rules to sql string
+
+ @param by
+ set of sorting rules
+ @return
+ sql string for set of sorting rules
+ */
+ protected function build_order($by){
+ if (!sizeof($by)) return "";
+ $out = array();
+ for ($i=0; $i < sizeof($by); $i++)
+ if (is_string($by[$i]))
+ $out[] = $by[$i];
+ else if ($by[$i]["name"])
+ $out[]=$this->escape_name($by[$i]["name"])." ".$by[$i]["direction"];
+ return implode(",",$out);
+ }
+
+ /*! generates sql code for select operation
+
+ @param select
+ list of fields in select
+ @param from
+ table name
+ @param where
+ list of filtering rules
+ @param sort
+ list of sorting rules
+ @param start
+ start index of fetching
+ @param count
+ count of records to fetch
+ @return
+ sql string for select operation
+ */
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ if ($start || $count) $sql.=" LIMIT ".$start.",".$count;
+ return $sql;
+ }
+ /*! generates update sql
+
+ @param data
+ DataAction object
+ @param request
+ DataRequestConfig object
+ @return
+ sql string, which updates record with provided data
+ */
+ protected function update_query($data,$request){
+ $sql="UPDATE ".$request->get_source()." SET ";
+ $temp=array();
+ for ($i=0; $i < sizeof($this->config->text); $i++) {
+ $step=$this->config->text[$i];
+
+ if ($data->get_value($step["name"])===Null)
+ $step_value ="Null";
+ else
+ $step_value = "'".$this->escape($data->get_value($step["name"]))."'";
+ $temp[$i]= $this->escape_name($step["db_name"])."=". $step_value;
+ }
+ if ($relation = $this->config->relation_id["db_name"]){
+ $temp[]= $this->escape_name($relation)."='".$this->escape($data->get_value($relation))."'";
+ }
+ $sql.=implode(",",$temp)." WHERE ".$this->escape_name($this->config->id["db_name"])."='".$this->escape($data->get_id())."'";
+
+ //if we have limited set - set constraints
+ $where=$this->build_where($request->get_filters());
+ if ($where) $sql.=" AND (".$where.")";
+
+ return $sql;
+ }
+
+ /*! generates delete sql
+
+ @param data
+ DataAction object
+ @param request
+ DataRequestConfig object
+ @return
+ sql string, which delete record
+ */
+ protected function delete_query($data,$request){
+ $sql="DELETE FROM ".$request->get_source();
+ $sql.=" WHERE ".$this->escape_name($this->config->id["db_name"])."='".$this->escape($data->get_id())."'";
+
+ //if we have limited set - set constraints
+ $where=$this->build_where($request->get_filters());
+ if ($where) $sql.=" AND (".$where.")";
+
+ return $sql;
+ }
+
+ /*! generates insert sql
+
+ @param data
+ DataAction object
+ @param request
+ DataRequestConfig object
+ @return
+ sql string, which inserts new record with provided data
+ */
+ protected function insert_query($data,$request){
+ $temp_n=array();
+ $temp_v=array();
+ foreach($this->config->text as $k => $v){
+ $temp_n[$k]=$this->escape_name($v["db_name"]);
+ if ($data->get_value($v["name"])===Null)
+ $temp_v[$k]="Null";
+ else
+ $temp_v[$k]="'".$this->escape($data->get_value($v["name"]))."'";
+ }
+ if ($relation = $this->config->relation_id["db_name"]){
+ $temp_n[]=$this->escape_name($relation);
+ $temp_v[]="'".$this->escape($data->get_value($relation))."'";
+ }
+ if ($this->sequence){
+ $temp_n[]=$this->escape_name($this->config->id["db_name"]);
+ $temp_v[]=$this->sequence;
+ }
+
+ $sql="INSERT INTO ".$request->get_source()."(".implode(",",$temp_n).") VALUES (".implode(",",$temp_v).")";
+
+ return $sql;
+ }
+
+ /*! sets the transaction mode, used by dataprocessor
+
+ @param mode
+ mode name
+ */
+ public function set_transaction_mode($mode){
+ if ($mode!="none" && $mode!="global" && $mode!="record")
+ throw new Exception("Unknown transaction mode");
+ $this->transaction=$mode;
+ }
+ /*! returns true if global transaction mode was specified
+ @return
+ true if global transaction mode was specified
+ */
+ public function is_global_transaction(){
+ return $this->transaction == "global";
+ }
+ /*! returns true if record transaction mode was specified
+ @return
+ true if record transaction mode was specified
+ */
+ public function is_record_transaction(){
+ return $this->transaction == "record";
+ }
+
+
+ public function begin_transaction(){
+ $this->query("BEGIN");
+ }
+ public function commit_transaction(){
+ $this->query("COMMIT");
+ }
+ public function rollback_transaction(){
+ $this->query("ROLLBACK");
+ }
+
+ /*! exec sql string
+
+ @param sql
+ sql string
+ @return
+ sql result set
+ */
+ abstract public function query($sql);
+ /*! returns next record from result set
+
+ @param res
+ sql result set
+ @return
+ hash of data
+ */
+ abstract public function get_next($res);
+ /*! returns new id value, for newly inserted row
+ @return
+ new id value, for newly inserted row
+ */
+ abstract public function get_new_id();
+ /*! escape data to prevent sql injections
+ @param data
+ unescaped data
+ @return
+ escaped data
+ */
+ abstract public function escape($data);
+
+ /*! escape field name to prevent sql reserved words conflict
+ @param data
+ unescaped data
+ @return
+ escaped data
+ */
+ public function escape_name($data){
+ return $data;
+ }
+
+ /*! get list of tables in the database
+
+ @return
+ array of table names
+ */
+ public function tables_list() {
+ throw new Exception("Not implemented");
+ }
+
+ /*! returns list of fields for the table in question
+
+ @param table
+ name of table in question
+ @return
+ array of field names
+ */
+ public function fields_list($table) {
+ throw new Exception("Not implemented");
+ }
+
+}
+
+class ArrayDBDataWrapper extends DBDataWrapper{
+ public function get_next($res){
+ if ($res->index < sizeof($res->data))
+ return $res->data[$res->index++];
+ }
+ public function select($sql){
+ if ($this->config->relation_id["db_name"] == "") {
+ if ($sql->get_relation() == "0" || $sql->get_relation() == "") {
+ return new ArrayQueryWrapper($this->connection);
+ } else {
+ return new ArrayQueryWrapper(array());
+ }
+ }
+
+ $relation_id = $this->config->relation_id["db_name"];
+
+ for ($i = 0; $i < count($this->connection); $i++) {
+ $item = $this->connection[$i];
+ if (!isset($item[$relation_id])) continue;
+ if ($item[$relation_id] == $sql->get_relation())
+ $result[] = $item;
+
+ }
+
+ return new ArrayQueryWrapper($result);
+ }
+ public function query($sql){
+ throw new Exception("Not implemented");
+ }
+ public function escape($value){
+ throw new Exception("Not implemented");
+ }
+ public function get_new_id(){
+ throw new Exception("Not implemented");
+ }
+}
+
+class ArrayQueryWrapper{
+ public function __construct($data){
+ $this->data = $data;
+ $this->index = 0;
+ }
+}
+/*! Implementation of DataWrapper for MySQL
+**/
+class MySQLDBDataWrapper extends DBDataWrapper{
+ protected $last_result;
+ public function query($sql){
+ LogMaster::log($sql);
+ $res=mysql_query($sql,$this->connection);
+ if ($res===false) throw new Exception("MySQL operation failed\n".mysql_error($this->connection));
+ $this->last_result = $res;
+ return $res;
+ }
+
+ public function get_next($res){
+ if (!$res)
+ $res = $this->last_result;
+
+ return mysql_fetch_assoc($res);
+ }
+
+ public function get_new_id(){
+ return mysql_insert_id($this->connection);
+ }
+
+ public function escape($data){
+ return mysql_real_escape_string($data, $this->connection);
+ }
+
+ public function tables_list() {
+ $result = mysql_query("SHOW TABLES");
+ if ($result===false) throw new Exception("MySQL operation failed\n".mysql_error($this->connection));
+
+ $tables = array();
+ while ($table = mysql_fetch_array($result)) {
+ $tables[] = $table[0];
+ }
+ return $tables;
+ }
+
+ public function fields_list($table) {
+ $result = mysql_query("SHOW COLUMNS FROM `".$table."`");
+ if ($result===false) throw new Exception("MySQL operation failed\n".mysql_error($this->connection));
+
+ $fields = array();
+ $id = "";
+ while ($field = mysql_fetch_assoc($result)) {
+ if ($field['Key'] == "PRI")
+ $id = $field["Field"];
+ else
+ $fields[] = $field["Field"];
+ }
+ return array("fields" => $fields, "key" => $id );
+ }
+
+ /*! escape field name to prevent sql reserved words conflict
+ @param data
+ unescaped data
+ @return
+ escaped data
+ */
+ public function escape_name($data){
+ if ((strpos($data,"`")!==false || is_int($data)) || (strpos($data,".")!==false))
+ return $data;
+ return '`'.$data.'`';
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_excel.php b/codebase/connector/db_excel.php
new file mode 100644
index 0000000..6c0e347
--- /dev/null
+++ b/codebase/connector/db_excel.php
@@ -0,0 +1,190 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once('db_common.php');
+
+if (!defined('DHX_IGNORE_EMPTY_ROWS')) {
+ define('DHX_IGNORE_EMPTY_ROWS', true);
+}
+
+class ExcelDBDataWrapper extends DBDataWrapper {
+
+ public $emptyLimit = 10;
+ public function excel_data($points){
+ $path = $this->connection;
+ $excel = PHPExcel_IOFactory::createReaderForFile($path);
+ $excel = $excel->load($path);
+ $result = array();
+ $excelWS = $excel->getActiveSheet();
+
+ for ($i=0; $i < sizeof($points); $i++) {
+ $c = array();
+ preg_match("/^([a-zA-Z]+)(\d+)/", $points[$i], $c);
+ if (count($c) > 0) {
+ $col = PHPExcel_Cell::columnIndexFromString($c[1]) - 1;
+ $cell = $excelWS->getCellByColumnAndRow($col, (int)$c[2]);
+ $result[] = $cell->getValue();
+ }
+ }
+
+ return $result;
+ }
+ public function select($source) {
+ $path = $this->connection;
+ $excel = PHPExcel_IOFactory::createReaderForFile($path);
+ $excel->setReadDataOnly(false);
+ $excel = $excel->load($path);
+ $excRes = new ExcelResult();
+ $excelWS = $excel->getActiveSheet();
+ $addFields = true;
+
+ $coords = array();
+ if ($source->get_source() == '*') {
+ $coords['start_row'] = 0;
+ $coords['end_row'] = false;
+ } else {
+ $c = array();
+ preg_match("/^([a-zA-Z]+)(\d+)/", $source->get_source(), $c);
+ if (count($c) > 0) {
+ $coords['start_row'] = (int) $c[2];
+ } else {
+ $coords['start_row'] = 0;
+ }
+ $c = array();
+ preg_match("/:(.+)(\d+)$/U", $source->get_source(), $c);
+ if (count($c) > 0) {
+ $coords['end_row'] = (int) $c[2];
+ } else {
+ $coords['end_row'] = false;
+ }
+ }
+
+ $i = $coords['start_row'];
+ $end = 0;
+ while ((($coords['end_row'] == false)&&($end < $this->emptyLimit))||(($coords['end_row'] !== false)&&($i < $coords['end_row']))) {
+ $r = Array();
+ $emptyNum = 0;
+ for ($j = 0; $j < count($this->config->text); $j++) {
+ $col = PHPExcel_Cell::columnIndexFromString($this->config->text[$j]['name']) - 1;
+ $cell = $excelWS->getCellByColumnAndRow($col, $i);
+ if (PHPExcel_Shared_Date::isDateTime($cell)) {
+ $r[PHPExcel_Cell::stringFromColumnIndex($col)] = PHPExcel_Shared_Date::ExcelToPHP($cell->getValue());
+ } else if ($cell->getDataType() == 'f') {
+ $r[PHPExcel_Cell::stringFromColumnIndex($col)] = $cell->getCalculatedValue();
+ } else {
+ $r[PHPExcel_Cell::stringFromColumnIndex($col)] = $cell->getValue();
+ }
+ if ($r[PHPExcel_Cell::stringFromColumnIndex($col)] == '') {
+ $emptyNum++;
+ }
+ }
+ if ($emptyNum < count($this->config->text)) {
+ $r['id'] = $i;
+ $excRes->addRecord($r);
+ $end = 0;
+ } else {
+ if (DHX_IGNORE_EMPTY_ROWS == false) {
+ $r['id'] = $i;
+ $excRes->addRecord($r);
+ }
+ $end++;
+ }
+ $i++;
+ }
+ return $excRes;
+ }
+
+ public function query($sql) {
+ }
+
+ public function get_new_id() {
+ }
+
+ public function escape($data) {
+ }
+
+ public function get_next($res) {
+ return $res->next();
+ }
+
+}
+
+
+class ExcelResult {
+ private $rows;
+ private $currentRecord = 0;
+
+
+ // add record to output list
+ public function addRecord($file) {
+ $this->rows[] = $file;
+ }
+
+
+ // return next record
+ public function next() {
+ if ($this->currentRecord < count($this->rows)) {
+ $row = $this->rows[$this->currentRecord];
+ $this->currentRecord++;
+ return $row;
+ } else {
+ return false;
+ }
+ }
+
+
+ // sorts records under $sort array
+ public function sort($sort, $data) {
+ if (count($this->files) == 0) {
+ return $this;
+ }
+ // defines fields list if it's need
+ for ($i = 0; $i < count($sort); $i++) {
+ $fieldname = $sort[$i]['name'];
+ if (!isset($this->files[0][$fieldname])) {
+ if (isset($data[$fieldname])) {
+ $fieldname = $data[$fieldname]['db_name'];
+ $sort[$i]['name'] = $fieldname;
+ } else {
+ $fieldname = false;
+ }
+ }
+ }
+
+ // for every sorting field will sort
+ for ($i = 0; $i < count($sort); $i++) {
+ // if field, setted in sort parameter doesn't exist, continue
+ if ($sort[$i]['name'] == false) {
+ continue;
+ }
+ // sorting by current field
+ $flag = true;
+ while ($flag == true) {
+ $flag = false;
+ // checks if previous sorting fields are equal
+ for ($j = 0; $j < count($this->files) - 1; $j++) {
+ $equal = true;
+ for ($k = 0; $k < $i; $k++) {
+ if ($this->files[$j][$sort[$k]['name']] != $this->files[$j + 1][$sort[$k]['name']]) {
+ $equal = false;
+ }
+ }
+ // compares two records in list under current sorting field and sorting direction
+ if (((($this->files[$j][$sort[$i]['name']] > $this->files[$j + 1][$sort[$i]['name']])&&($sort[$i]['direction'] == 'ASC'))||(($this->files[$j][$sort[$i]['name']] < $this->files[$j + 1][$sort[$i]['name']])&&($sort[$i]['direction'] == 'DESC')))&&($equal == true)) {
+ $c = $this->files[$j];
+ $this->files[$j] = $this->files[$j+1];
+ $this->files[$j+1] = $c;
+ $flag = true;
+ }
+ }
+ }
+ }
+ return $this;
+ }
+
+}
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/db_filesystem.php b/codebase/connector/db_filesystem.php
new file mode 100644
index 0000000..b3d16d2
--- /dev/null
+++ b/codebase/connector/db_filesystem.php
@@ -0,0 +1,345 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once('db_common.php');
+require_once('tree_connector.php');
+
+/*
+Most execution time is a standart functions for workin with FileSystem: is_dir(), dir(), readdir(), stat()
+*/
+
+class FileSystemDBDataWrapper extends DBDataWrapper {
+
+
+ // returns list of files and directories
+ public function select($source) {
+ $relation = $this->getFileName($source->get_relation());
+ // for tree checks relation id and forms absolute path
+ if ($relation == '0') {
+ $relation = '';
+ } else {
+ $path = $source->get_source();
+ }
+ $path = $source->get_source();
+ $path = $this->getFileName($path);
+ $path = realpath($path);
+ if ($path == false) {
+ return new FileSystemResult();
+ }
+
+ if (strpos(realpath($path.'/'.$relation), $path) !== 0) {
+ return new FileSystemResult();
+ }
+ // gets files and directories list
+ $res = $this->getFilesList($path, $relation);
+ // sorts list
+ $res = $res->sort($source->get_sort_by(), $this->config->data);
+ return $res;
+ }
+
+
+ // gets files and directory list
+ private function getFilesList($path, $relation) {
+ $fileSystemTypes = FileSystemTypes::getInstance();
+ LogMaster::log("Query filesystem: ".$path);
+ $dir = opendir($path.'/'.$relation);
+ $result = new FileSystemResult();
+ // forms fields list
+ for ($i = 0; $i < count($this->config->data); $i++) {
+ $fields[] = $this->config->data[$i]['db_name'];
+ }
+ // for every file and directory of folder
+ while ($file = readdir($dir)) {
+ // . and .. should not be in output list
+ if (($file == '.')||($file == '..')) {
+ continue;
+ }
+ $newFile = array();
+ // parse file name as Array('name', 'ext', 'is_dir')
+ $fileNameExt = $this->parseFileName($path.'/'.$relation, $file);
+ // checks if file should be in output array
+ if (!$fileSystemTypes->checkFile($file, $fileNameExt)) {
+ continue;
+ }
+ // takes file stat if it's need
+ if ((in_array('size', $fields))||(in_array('date', $fields))) {
+ $fileInfo = stat($path.'/'.$file);
+ }
+
+ // for every field forms list of fields
+ for ($i = 0; $i < count($fields); $i++) {
+ $field = $fields[$i];
+ switch ($field) {
+ case 'filename':
+ $newFile['filename'] = $file;
+ break;
+ case 'full_filename':
+ $newFile['full_filename'] = $path."/".$file;
+ break;
+ case 'size':
+ $newFile['size'] = $fileInfo['size'];
+ break;
+ case 'extention':
+ $newFile['extention'] = $fileNameExt['ext'];
+ break;
+ case 'name':
+ $newFile['name'] = $fileNameExt['name'];
+ break;
+ case 'date':
+ $newFile['date'] = date("Y-m-d H:i:s", $fileInfo['ctime']);
+ break;
+ }
+ $newFile['relation_id'] = $relation.'/'.$file;
+ $newFile['safe_name'] = $this->setFileName($relation.'/'.$file);
+ $newFile['is_folder'] = $fileNameExt['is_dir'];
+ }
+ // add file in output list
+ $result->addFile($newFile);
+ }
+ return $result;
+ }
+
+
+ // replaces '.' and '_' in id
+ private function setFileName($filename) {
+ $filename = str_replace(".", "{-dot-}", $filename);
+ $filename = str_replace("_", "{-nizh-}", $filename);
+ return $filename;
+ }
+
+
+ // replaces '{-dot-}' and '{-nizh-}' in id
+ private function getFileName($filename) {
+ $filename = str_replace("{-dot-}", ".", $filename);
+ $filename = str_replace("{-nizh-}", "_", $filename);
+ return $filename;
+ }
+
+
+ // parses file name and checks if is directory
+ private function parseFileName($path, $file) {
+ $result = Array();
+ if (is_dir($path.'/'.$file)) {
+ $result['name'] = $file;
+ $result['ext'] = 'dir';
+ $result['is_dir'] = 1;
+ } else {
+ $pos = strrpos($file, '.');
+ $result['name'] = substr($file, 0, $pos);
+ $result['ext'] = substr($file, $pos + 1);
+ $result['is_dir'] = 0;
+ }
+ return $result;
+ }
+
+ public function query($sql) {
+ }
+
+ public function get_new_id() {
+ }
+
+ public function escape($data) {
+ }
+
+ public function get_next($res) {
+ return $res->next();
+ }
+
+}
+
+
+class FileSystemResult {
+ private $files;
+ private $currentRecord = 0;
+
+
+ // add record to output list
+ public function addFile($file) {
+ $this->files[] = $file;
+ }
+
+
+ // return next record
+ public function next() {
+ if ($this->currentRecord < count($this->files)) {
+ $file = $this->files[$this->currentRecord];
+ $this->currentRecord++;
+ return $file;
+ } else {
+ return false;
+ }
+ }
+
+
+ // sorts records under $sort array
+ public function sort($sort, $data) {
+ if (count($this->files) == 0) {
+ return $this;
+ }
+ // defines fields list if it's need
+ for ($i = 0; $i < count($sort); $i++) {
+ $fieldname = $sort[$i]['name'];
+ if (!isset($this->files[0][$fieldname])) {
+ if (isset($data[$fieldname])) {
+ $fieldname = $data[$fieldname]['db_name'];
+ $sort[$i]['name'] = $fieldname;
+ } else {
+ $fieldname = false;
+ }
+ }
+ }
+
+ // for every sorting field will sort
+ for ($i = 0; $i < count($sort); $i++) {
+ // if field, setted in sort parameter doesn't exist, continue
+ if ($sort[$i]['name'] == false) {
+ continue;
+ }
+ // sorting by current field
+ $flag = true;
+ while ($flag == true) {
+ $flag = false;
+ // checks if previous sorting fields are equal
+ for ($j = 0; $j < count($this->files) - 1; $j++) {
+ $equal = true;
+ for ($k = 0; $k < $i; $k++) {
+ if ($this->files[$j][$sort[$k]['name']] != $this->files[$j + 1][$sort[$k]['name']]) {
+ $equal = false;
+ }
+ }
+ // compares two records in list under current sorting field and sorting direction
+ if (((($this->files[$j][$sort[$i]['name']] > $this->files[$j + 1][$sort[$i]['name']])&&($sort[$i]['direction'] == 'ASC'))||(($this->files[$j][$sort[$i]['name']] < $this->files[$j + 1][$sort[$i]['name']])&&($sort[$i]['direction'] == 'DESC')))&&($equal == true)) {
+ $c = $this->files[$j];
+ $this->files[$j] = $this->files[$j+1];
+ $this->files[$j+1] = $c;
+ $flag = true;
+ }
+ }
+ }
+ }
+ return $this;
+ }
+
+}
+
+
+// singleton class for setting file types filter
+class FileSystemTypes {
+
+ static private $instance = NULL;
+ private $extentions = Array();
+ private $extentions_not = Array();
+ private $all = true;
+ private $patterns = Array();
+ // predefined types
+ private $types = Array(
+ 'image' => Array('jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp', 'psd', 'dir'),
+ 'document' => Array('txt', 'doc', 'docx', 'xls', 'xlsx', 'rtf', 'dir'),
+ 'web' => Array('php', 'html', 'htm', 'js', 'css', 'dir'),
+ 'audio' => Array('mp3', 'wav', 'ogg', 'dir'),
+ 'video' => Array('avi', 'mpg', 'mpeg', 'mp4', 'dir'),
+ 'only_dir' => Array('dir')
+ );
+
+
+ static function getInstance() {
+ if (self::$instance == NULL) {
+ self::$instance = new FileSystemTypes();
+ }
+ return self::$instance;
+ }
+
+ // sets array of extentions
+ public function setExtentions($ext) {
+ $this->all = false;
+ $this->extentions = $ext;
+ }
+
+ // adds one extention in array
+ public function addExtention($ext) {
+ $this->all = false;
+ $this->extentions[] = $ext;
+ }
+
+
+ // adds one extention which will not ouputed in array
+ public function addExtentionNot($ext) {
+ $this->extentions_not[] = $ext;
+ }
+
+
+ // returns array of extentions
+ public function getExtentions() {
+ return $this->extentions;
+ }
+
+ // adds regexp pattern
+ public function addPattern($pattern) {
+ $this->all = false;
+ $this->patterns[] = $pattern;
+ }
+
+ // clear extentions array
+ public function clearExtentions() {
+ $this->all = true;
+ $this->extentions = Array();
+ }
+
+ // clear regexp patterns array
+ public function clearPatterns() {
+ $this->all = true;
+ $this->patterns = Array();
+ }
+
+ // clear all filters
+ public function clearAll() {
+ $this->clearExtentions();
+ $this->clearPatterns();
+ }
+
+ // sets predefined type
+ public function setType($type, $clear = false) {
+ $this->all = false;
+ if ($type == 'all') {
+ $this->all = true;
+ return true;
+ }
+ if (isset($this->types[$type])) {
+ if ($clear) {
+ $this->clearExtentions();
+ }
+ for ($i = 0; $i < count($this->types[$type]); $i++) {
+ $this->extentions[] = $this->types[$type][$i];
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ // check file under setted filter
+ public function checkFile($filename, $fileNameExt) {
+ if (in_array($fileNameExt['ext'], $this->extentions_not)) {
+ return false;
+ }
+ if ($this->all) {
+ return true;
+ }
+
+ if ((count($this->extentions) > 0)&&(!in_array($fileNameExt['ext'], $this->extentions))) {
+ return false;
+ }
+
+ for ($i = 0; $i < count($this->patterns); $i++) {
+ if (!preg_match($this->patterns[$i], $filename)) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/db_mssql.php b/codebase/connector/db_mssql.php
new file mode 100644
index 0000000..0acab93
--- /dev/null
+++ b/codebase/connector/db_mssql.php
@@ -0,0 +1,73 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! MSSQL implementation of DataWrapper
+**/
+class MsSQLDBDataWrapper extends DBDataWrapper{
+ private $last_id=""; //!< ID of previously inserted record
+ private $insert_operation=false; //!< flag of insert operation
+ private $start_from=false; //!< index of start position
+
+ public function query($sql){
+ LogMaster::log($sql);
+ $res = mssql_query($sql,$this->connection);
+ if ($this->insert_operation){
+ $last = mssql_fetch_assoc($res);
+ $this->last_id = $last["dhx_id"];
+ mssql_free_result($res);
+ }
+ if ($this->start_from)
+ mssql_data_seek($res,$this->start_from);
+ return $res;
+ }
+
+ public function get_next($res){
+ return mssql_fetch_assoc($res);
+ }
+
+ public function get_new_id(){
+ /*
+ MSSQL doesn't support identity or auto-increment fields
+ Insert SQL returns new ID value, which stored in last_id field
+ */
+ return $this->last_id;
+ }
+
+ protected function insert_query($data,$request){
+ $sql = parent::insert_query($data,$request);
+ $this->insert_operation=true;
+ return $sql.";SELECT @@IDENTITY AS dhx_id";
+ }
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT " ;
+ if ($count)
+ $sql.=" TOP ".($count+$start);
+ $sql.=" ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ if ($start && $count)
+ $this->start_from=$start;
+ else
+ $this->start_from=false;
+ return $sql;
+ }
+
+ public function escape($data){
+ /*
+ there is no special escaping method for mssql - use common logic
+ */
+ return str_replace("'","''",$data);
+ }
+
+ public function begin_transaction(){
+ $this->query("BEGIN TRAN");
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_mysqli.php b/codebase/connector/db_mysqli.php
new file mode 100644
index 0000000..6740a3b
--- /dev/null
+++ b/codebase/connector/db_mysqli.php
@@ -0,0 +1,56 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+
+class MySQLiDBDataWrapper extends MySQLDBDataWrapper{
+
+ public function query($sql){
+ LogMaster::log($sql);
+ $res = $this->connection->query($sql);
+ if ($res===false) throw new Exception("MySQL operation failed\n".$this->connection->error);
+ return $res;
+ }
+
+ public function get_next($res){
+ return $res->fetch_assoc();
+ }
+
+ public function get_new_id(){
+ return $this->connection->insert_id;
+ }
+
+ public function escape($data){
+ return $this->connection->real_escape_string($data);
+ }
+
+ public function tables_list() {
+ $result = $this->connection->query("SHOW TABLES");
+ if ($result===false) throw new Exception("MySQL operation failed\n".$this->connection->error);
+
+ $tables = array();
+ while ($table = $result->fetch_array()) {
+ $tables[] = $table[0];
+ }
+ return $tables;
+ }
+
+ public function fields_list($table) {
+ $result = $this->connection->query("SHOW COLUMNS FROM `".$table."`");
+ if ($result===false) throw new Exception("MySQL operation failed\n".$this->connection->error);
+ $fields = array();
+ while ($field = $result->fetch_array()) {
+ if ($field['Key'] == "PRI") {
+ $fields[$field[0]] = 1;
+ } else {
+ $fields[$field[0]] = 0;
+ }
+ }
+ return $fields;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/db_oracle.php b/codebase/connector/db_oracle.php
new file mode 100644
index 0000000..064d55a
--- /dev/null
+++ b/codebase/connector/db_oracle.php
@@ -0,0 +1,88 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! Implementation of DataWrapper for Oracle
+**/
+class OracleDBDataWrapper extends DBDataWrapper{
+ private $last_id=""; //id of previously inserted record
+ private $insert_operation=false; //flag of insert operation
+
+ public function query($sql){
+ LogMaster::log($sql);
+ $stm = oci_parse($this->connection,$sql);
+ if ($stm===false) throw new Exception("Oracle - sql parsing failed\n".oci_error($this->connection));
+
+ $out = array(0=>null);
+ if($this->insert_operation){
+ oci_bind_by_name($stm,":outID",$out[0],999);
+ $this->insert_operation=false;
+ }
+
+
+ $mode = ($this->is_record_transaction() || $this->is_global_transaction())?OCI_DEFAULT:OCI_COMMIT_ON_SUCCESS;
+ $res=oci_execute($stm,$mode);
+ if ($res===false) throw new Exception("Oracle - sql execution failed\n".oci_error($this->connection));
+
+ $this->last_id=$out[0];
+
+ return $stm;
+ }
+
+ public function get_next($res){
+ $data = oci_fetch_assoc($res);
+ if ($data){
+ foreach ($data as $k => $v)
+ $data[strtolower($k)] = $v;
+ }
+ return $data;
+ }
+
+ public function get_new_id(){
+ /*
+ Oracle doesn't support identity or auto-increment fields
+ Insert SQL returns new ID value, which stored in last_id field
+ */
+ return $this->last_id;
+ }
+
+ protected function insert_query($data,$request){
+ $sql = parent::insert_query($data,$request);
+ $this->insert_operation=true;
+ return $sql." returning ".$this->config->id["db_name"]." into :outID";
+ }
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ if ($start || $count)
+ $sql="SELECT * FROM ( select /*+ FIRST_ROWS(".$count.")*/dhx_table.*, ROWNUM rnum FROM (".$sql.") dhx_table where ROWNUM <= ".($count+$start)." ) where rnum >".$start;
+ return $sql;
+ }
+
+ public function escape($data){
+ /*
+ as far as I can see the only way to escape data is by using oci_bind_by_name
+ while it is neat solution in common case, it conflicts with existing SQL building logic
+ fallback to simple escaping
+ */
+ return str_replace("'","''",$data);
+ }
+
+ public function begin_transaction(){
+ //auto-start of transaction
+ }
+ public function commit_transaction(){
+ oci_commit($this->connection);
+ }
+ public function rollback_transaction(){
+ oci_rollback($this->connection);
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_pdo.php b/codebase/connector/db_pdo.php
new file mode 100644
index 0000000..d1ad4d8
--- /dev/null
+++ b/codebase/connector/db_pdo.php
@@ -0,0 +1,75 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! Implementation of DataWrapper for PDO
+
+if you plan to use it for Oracle - use Oracle connection type instead
+**/
+class PDODBDataWrapper extends DBDataWrapper{
+ private $last_result;//!< store result or last operation
+
+ public function query($sql){
+ LogMaster::log($sql);
+
+ $res=$this->connection->query($sql);
+ if ($res===false) {
+ $message = $this->connection->errorInfo();
+ throw new Exception("PDO - sql execution failed\n".$message[2]);
+ }
+
+ return new PDOResultSet($res);
+ }
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ if ($start || $count) {
+ if ($this->connection->getAttribute(PDO::ATTR_DRIVER_NAME)=="pgsql")
+ $sql.=" OFFSET ".$start." LIMIT ".$count;
+ else
+ $sql.=" LIMIT ".$start.",".$count;
+ }
+ return $sql;
+ }
+
+
+ public function get_next($res){
+ $data = $res->next();
+ return $data;
+ }
+
+ public function get_new_id(){
+ return $this->connection->lastInsertId();
+ }
+
+ public function escape($str){
+ $res=$this->connection->quote($str);
+ if ($res===false) //not supported by pdo driver
+ return str_replace("'","''",$str);
+ return substr($res,1,-1);
+ }
+
+}
+
+class PDOResultSet{
+ private $res;
+ public function __construct($res){
+ $this->res = $res;
+ }
+ public function next(){
+ $data = $this->res->fetch(PDO::FETCH_ASSOC);
+ if (!$data){
+ $this->res->closeCursor();
+ return null;
+ }
+ return $data;
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_phpcake.php b/codebase/connector/db_phpcake.php
new file mode 100644
index 0000000..97d94eb
--- /dev/null
+++ b/codebase/connector/db_phpcake.php
@@ -0,0 +1,85 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+
+//DataProcessor::$action_param ="dhx_editor_status";
+
+/*! Implementation of DataWrapper for PDO
+
+if you plan to use it for Oracle - use Oracle connection type instead
+**/
+class PHPCakeDBDataWrapper extends ArrayDBDataWrapper{
+ public function select($sql){
+ $source = $sql->get_source();
+ if (is_array($source)) //result of find
+ $res = $source;
+ else
+ $res = $this->connection->find("all");
+
+ if (sizeof($res)){
+ $name = get_class($this->connection);
+ $temp = array();
+ for ($i=sizeof($res)-1; $i>=0; $i--)
+ $temp[]=&$res[$i][$name];
+ }
+ return new ArrayQueryWrapper($temp);
+ }
+
+ protected function getErrorMessage(){
+ $errors = $this->connection->invalidFields();
+ $text = array();
+ foreach ($errors as $key => $value){
+ $text[] = $key." - ".$value[0];
+ }
+ return implode("\n", $text);
+ }
+
+ public function insert($data,$source){
+ $name = get_class($this->connection);
+ $save = array();
+ $temp_data = $data->get_data();
+ unset($temp_data[$this->config->id['db_name']]);
+ unset($temp_data["!nativeeditor_status"]);
+ $save[$name] = $temp_data;
+
+ if ($this->connection->save($save)){
+ $data->success($this->connection->getLastInsertID());
+ } else {
+ $data->set_response_attribute("details", $this->getErrorMessage());
+ $data->invalid();
+ }
+ }
+ public function delete($data,$source){
+ $id = $data->get_id();
+ $this->connection->delete($id);
+ $data->success();
+ }
+ public function update($data,$source){
+ $name = get_class($this->connection);
+ $save = array();
+ $save[$name] = &$data->get_data();
+
+ if ($this->connection->save($save)){
+ $data->success();
+ } else {
+ $data->set_response_attribute("details", $this->getErrorMessage());
+ $data->invalid();
+ }
+ }
+
+
+ public function escape($str){
+ throw new Exception("Not implemented");
+ }
+ public function query($str){
+ throw new Exception("Not implemented");
+ }
+ public function get_new_id(){
+ throw new Exception("Not implemented");
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/db_phpci.php b/codebase/connector/db_phpci.php
new file mode 100644
index 0000000..b9a5879
--- /dev/null
+++ b/codebase/connector/db_phpci.php
@@ -0,0 +1,63 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+
+/*! Implementation of DataWrapper for PDO
+
+if you plan to use it for Oracle - use Oracle connection type instead
+**/
+class PHPCIDBDataWrapper extends DBDataWrapper{
+ private $last_result;//!< store result or last operation
+
+ public function query($sql){
+ LogMaster::log($sql);
+
+ $res=$this->connection->query($sql);
+ if ($res===false) {
+ throw new Exception("CI - sql execution failed");
+ }
+
+ return new PHPCIResultSet($res);
+ }
+
+ public function get_next($res){
+ $data = $res->next();
+ return $data;
+ }
+
+ public function get_new_id(){
+ return $this->connection->insert_id();
+ }
+
+ public function escape($str){
+ return $this->connection->escape_str($str);
+ }
+
+ public function escape_name($data){
+ return $this->connection->protect_identifiers($data);
+ }
+}
+
+class PHPCIResultSet{
+ private $res;
+ private $start;
+ private $count;
+
+ public function __construct($res){
+ $this->res = $res;
+ $this->start = $res->current_row;
+ $this->count = $res->num_rows;
+ }
+ public function next(){
+ if ($this->start != $this->count){
+ return $this->res->row($this->start++,'array');
+ } else {
+ $this->res->free_result();
+ return null;
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_phpyii.php b/codebase/connector/db_phpyii.php
new file mode 100644
index 0000000..f71d61a
--- /dev/null
+++ b/codebase/connector/db_phpyii.php
@@ -0,0 +1,91 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+require_once("db_common.php");
+
+class PHPYiiDBDataWrapper extends ArrayDBDataWrapper{
+ public function select($sql){
+ if (is_array($this->connection)) //result of findAll
+ $res = $this->connection;
+ else
+ $res = $this->connection->findAll();
+
+ if (sizeof($res)){
+ $temp = array();
+ foreach ($res as $obj)
+ $temp[]=$obj->getAttributes();
+ }
+ return new ArrayQueryWrapper($temp);
+ }
+
+ protected function getErrorMessage(){
+ $errors = $this->connection->invalidFields();
+ $text = array();
+ foreach ($errors as $key => $value){
+ $text[] = $key." - ".$value[0];
+ }
+ return implode("\n", $text);
+ }
+ public function insert($data,$source){
+ $name = get_class($this->connection);
+ $obj = new $name();
+
+ $this->fill_model_and_save($obj, $data);
+ }
+ public function delete($data,$source){
+ $obj = $this->connection->findByPk($data->get_id());
+ if ($obj->delete()){
+ $data->success();
+ $data->set_new_id($obj->getPrimaryKey());
+ } else {
+ $data->set_response_attribute("details", $this->errors_to_string($obj->getErrors()));
+ $data->invalid();
+ }
+ }
+ public function update($data,$source){
+ $obj = $this->connection->findByPk($data->get_id());
+ $this->fill_model_and_save($obj, $data);
+ }
+
+ protected function fill_model_and_save($obj, $data){
+ $values = $data->get_data();
+
+ //map data to model object
+ for ($i=0; $i < sizeof($this->config->text); $i++){
+ $step=$this->config->text[$i];
+ $obj->setAttribute($step["name"], $data->get_value($step["name"]));
+ }
+ if ($relation = $this->config->relation_id["db_name"])
+ $obj->setAttribute($relation, $data->get_value($relation));
+
+ //save model
+ if ($obj->save()){
+ $data->success();
+ $data->set_new_id($obj->getPrimaryKey());
+ } else {
+ $data->set_response_attribute("details", $this->errors_to_string($obj->getErrors()));
+ $data->invalid();
+ }
+ }
+
+ protected function errors_to_string($errors){
+ $text = array();
+ foreach($errors as $value)
+ $text[]=implode("\n", $value);
+ return implode("\n",$text);
+ }
+ public function escape($str){
+ throw new Exception("Not implemented");
+ }
+ public function query($str){
+ throw new Exception("Not implemented");
+ }
+ public function get_new_id(){
+ throw new Exception("Not implemented");
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/db_postgre.php b/codebase/connector/db_postgre.php
new file mode 100644
index 0000000..a7d1598
--- /dev/null
+++ b/codebase/connector/db_postgre.php
@@ -0,0 +1,73 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! Implementation of DataWrapper for PostgreSQL
+**/
+class PostgreDBDataWrapper extends DBDataWrapper{
+ public function query($sql){
+ LogMaster::log($sql);
+
+ $res=pg_query($this->connection,$sql);
+ if ($res===false) throw new Exception("Postgre - sql execution failed\n".pg_last_error($this->connection));
+
+ return $res;
+ }
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ if ($start || $count)
+ $sql.=" OFFSET ".$start." LIMIT ".$count;
+ return $sql;
+ }
+
+ public function get_next($res){
+ return pg_fetch_assoc($res);
+ }
+
+ public function get_new_id(){
+ $res = pg_query( $this->connection, "SELECT LASTVAL() AS seq");
+ $data = pg_fetch_assoc($res);
+ pg_free_result($res);
+ return $data['seq'];
+ }
+
+ public function escape($data){
+ //need to use oci_bind_by_name
+ return pg_escape_string($this->connection,$data);
+ }
+
+ public function tables_list() {
+ $sql = "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'";
+ $res = pg_query($this->connection, $sql);
+ $tables = array();
+ while ($table = pg_fetch_assoc($res)) {
+ $tables[] = $table['table_name'];
+ }
+ return $tables;
+ }
+
+ public function fields_list($table) {
+ $sql = "SELECT * FROM information_schema.constraint_column_usage";
+ $result = pg_query($this->connection, $sql);
+ $field = pg_fetch_assoc($result);
+ $id = $field['column_name'];
+
+ $sql = "SELECT * FROM information_schema.columns WHERE table_name ='".$table."';";
+ $result = pg_query($this->connection, $sql);
+ $fields = array();
+ $id = "";
+ while ($field = pg_fetch_assoc($result)) {
+ $fields[] = $field["column_name"];
+ }
+ return array('fields' => $fields, 'key' => $id );
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_sasql.php b/codebase/connector/db_sasql.php
new file mode 100644
index 0000000..025f5ef
--- /dev/null
+++ b/codebase/connector/db_sasql.php
@@ -0,0 +1,54 @@
+<?php
+require_once("db_common.php");
+/*! SaSQL implementation of DataWrapper
+**/
+class SaSQLDBDataWrapper extends DBDataWrapper{
+ private $last_id=""; //!< ID of previously inserted record
+
+ public function query($sql){
+ LogMaster::log($sql);
+ $res=sasql_query($this->connection, $sql);
+ if ($res===false) throw new Exception("SaSQL operation failed\n".sasql_error($this->connection));
+ $this->last_result = $res;
+ return $res;
+ }
+
+ public function get_next($res){
+ if (!$res)
+ $res = $this->last_result;
+
+ return sasql_fetch_assoc($res);
+ }
+
+ public function get_new_id(){
+ return sasql_insert_id($this->connection);
+ }
+
+ protected function insert_query($data,$request){
+ $sql = parent::insert_query($data,$request);
+ $this->insert_operation=true;
+ return $sql;
+ }
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT " ;
+ if ($count)
+ $sql.=" TOP ".($count+$start);
+ $sql.=" ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ return $sql;
+ }
+
+ public function escape($data){
+ return sasql_escape_string($this->connection, $data);
+ }
+
+ public function begin_transaction(){
+ $this->query("BEGIN TRAN");
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_sqlite.php b/codebase/connector/db_sqlite.php
new file mode 100644
index 0000000..04df7e5
--- /dev/null
+++ b/codebase/connector/db_sqlite.php
@@ -0,0 +1,34 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! SQLite implementation of DataWrapper
+**/
+class SQLiteDBDataWrapper extends DBDataWrapper{
+
+ public function query($sql){
+ LogMaster::log($sql);
+
+ $res = sqlite_query($this->connection,$sql);
+ if ($res === false)
+ throw new Exception("SQLLite - sql execution failed\n".sqlite_error_string(sqlite_last_error($this->connection)));
+
+ return $res;
+ }
+
+ public function get_next($res){
+ $data = sqlite_fetch_array($res, SQLITE_ASSOC);
+ return $data;
+ }
+
+ public function get_new_id(){
+ return sqlite_last_insert_rowid($this->connection);
+ }
+
+ public function escape($data){
+ return sqlite_escape_string($data);
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_sqlite3.php b/codebase/connector/db_sqlite3.php
new file mode 100644
index 0000000..349490b
--- /dev/null
+++ b/codebase/connector/db_sqlite3.php
@@ -0,0 +1,33 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! SQLite implementation of DataWrapper
+**/
+class SQLite3DBDataWrapper extends DBDataWrapper{
+
+ public function query($sql){
+ LogMaster::log($sql);
+
+ $res = $this->connection->query($sql);
+ if ($res === false)
+ throw new Exception("SQLLite - sql execution failed\n".$this->connection->lastErrorMsg());
+
+ return $res;
+ }
+
+ public function get_next($res){
+ return $res->fetchArray();
+ }
+
+ public function get_new_id(){
+ return $this->connection->lastInsertRowID();
+ }
+
+ public function escape($data){
+ return $this->connection->escapeString($data);
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/db_sqlsrv.php b/codebase/connector/db_sqlsrv.php
new file mode 100644
index 0000000..1b27020
--- /dev/null
+++ b/codebase/connector/db_sqlsrv.php
@@ -0,0 +1,102 @@
+<?php
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+?><?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("db_common.php");
+/*! MSSQL implementation of DataWrapper
+**/
+class SQLSrvDBDataWrapper extends DBDataWrapper{
+ private $last_id=""; //!< ID of previously inserted record
+ private $insert_operation=false; //!< flag of insert operation
+ private $start_from=false; //!< index of start position
+
+ public function query($sql){
+ LogMaster::log($sql);
+ if ($this->start_from)
+ $res = sqlsrv_query($this->connection,$sql, array(), array("Scrollable" => SQLSRV_CURSOR_STATIC));
+ else
+ $res = sqlsrv_query($this->connection,$sql);
+
+ if ($res === false){
+ $errors = sqlsrv_errors();
+ $message = Array();
+ foreach($errors as $error)
+ $message[]=$error["SQLSTATE"].$error["code"].$error["message"];
+ throw new Exception("SQLSrv operation failed\n".implode("\n\n", $message));
+ }
+
+ if ($this->insert_operation){
+ sqlsrv_next_result($res);
+ $last = sqlsrv_fetch_array($res);
+ $this->last_id = $last["dhx_id"];
+ sqlsrv_free_stmt($res);
+ }
+ if ($this->start_from)
+ $data = sqlsrv_fetch($res, SQLSRV_SCROLL_ABSOLUTE, $this->start_from-1);
+ return $res;
+ }
+
+ public function get_next($res){
+ $data = sqlsrv_fetch_array($res, SQLSRV_FETCH_ASSOC);
+ if ($data)
+ foreach ($data as $key => $value)
+ if (is_a($value, "DateTime"))
+ $data[$key] = $value->format("Y-m-d H:i");
+ return $data;
+ }
+
+ public function get_new_id(){
+ /*
+ MSSQL doesn't support identity or auto-increment fields
+ Insert SQL returns new ID value, which stored in last_id field
+ */
+ return $this->last_id;
+ }
+
+ protected function insert_query($data,$request){
+ $sql = parent::insert_query($data,$request);
+ $this->insert_operation=true;
+ return $sql.";SELECT SCOPE_IDENTITY() as dhx_id";
+ }
+
+ protected function select_query($select,$from,$where,$sort,$start,$count){
+ if (!$from)
+ return $select;
+
+ $sql="SELECT " ;
+ if ($count)
+ $sql.=" TOP ".($count+$start);
+ $sql.=" ".$select." FROM ".$from;
+ if ($where) $sql.=" WHERE ".$where;
+ if ($sort) $sql.=" ORDER BY ".$sort;
+ if ($start && $count)
+ $this->start_from=$start;
+ else
+ $this->start_from=false;
+ return $sql;
+ }
+
+ public function escape($data){
+ /*
+ there is no special escaping method for mssql - use common logic
+ */
+ return str_replace("'","''",$data);
+ }
+
+ public function begin_transaction(){
+ sqlsrv_begin_transaction($this->connection);
+ }
+ public function commit_transaction(){
+ sqlsrv_commit($this->connection);
+ }
+ public function rollback_transaction(){
+ sqlsrv_rollback($this->connection);
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/filesystem_item.php b/codebase/connector/filesystem_item.php
new file mode 100644
index 0000000..046ad98
--- /dev/null
+++ b/codebase/connector/filesystem_item.php
@@ -0,0 +1,19 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+class FileTreeDataItem extends TreeDataItem {
+
+ function has_kids(){
+ if ($this->data['is_folder'] == '1') {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/form_connector.php b/codebase/connector/form_connector.php
new file mode 100644
index 0000000..5eeea38
--- /dev/null
+++ b/codebase/connector/form_connector.php
@@ -0,0 +1,62 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+/*! DataItem class for dhxForm component
+**/
+class FormDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+ $str="";
+ for ($i = 0; $i < count($this->config->data); $i++) {
+ $str .= "<".$this->config->data[$i]['name']."><![CDATA[".$this->data[$this->config->data[$i]['name']]."]]></".$this->config->data[$i]['name'].">";
+ }
+ return $str;
+ }
+}
+
+
+/*! Connector class for dhtmlxForm
+**/
+class FormConnector extends Connector{
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="FormDataItem";
+ if (!$data_type) $data_type="FormDataProcessor";
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+
+ //parse GET scoope, all operations with incoming request must be done here
+ function parse_request(){
+ parent::parse_request();
+ if (isset($_GET["id"]))
+ $this->request->set_filter($this->config->id["name"],$_GET["id"],"=");
+ else if (!$_POST["ids"])
+ throw new Exception("ID parameter is missed");
+ }
+
+}
+
+/*! DataProcessor class for dhxForm component
+**/
+class FormDataProcessor extends DataProcessor{
+
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/grid_config.php b/codebase/connector/grid_config.php
new file mode 100644
index 0000000..24297b2
--- /dev/null
+++ b/codebase/connector/grid_config.php
@@ -0,0 +1,423 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+class GridConfiguration{
+
+ /*! attaching header functionality
+ */
+ protected $headerDelimiter = ',';
+ protected $headerNames = false;
+ protected $headerAttaches = array();
+ protected $footerAttaches = array();
+ protected $headerWidthsUnits = 'px';
+
+ protected $headerIds = false;
+ protected $headerWidths = false;
+ protected $headerTypes = false;
+ protected $headerAlign = false;
+ protected $headerVAlign = false;
+ protected $headerSorts = false;
+ protected $headerColors = false;
+ protected $headerHidden = false;
+ protected $headerFormat = false;
+
+ protected $convert_mode = false;
+
+ function __construct($headers = false){
+ if ($headers === false || $headers === true )
+ $this->headerNames = $headers;
+ else
+ $this->setHeader($headers);
+ }
+
+ /*! brief convert list of parameters to an array
+ @param param
+ list of values or array of values
+ @return array of parameters
+ */
+ private function parse_param_array($param, $check=false, $default = ""){
+ if (gettype($param) == 'string')
+ $param = explode($this->headerDelimiter, $param);
+
+ if ($check){
+ for ($i=0; $i < sizeof($param); $i++) {
+ if (!array_key_exists($param[$i],$check))
+ $param[$i] = $default;
+ }
+ }
+ return $param;
+ }
+
+ /*! sets delimiter for string arguments in attach header functions (default is ,)
+ @param headerDelimiter
+ string delimiter
+ */
+ public function setHeaderDelimiter($headerDelimiter) {
+ $this->headerDelimiter = $headerDelimiter;
+ }
+
+ /*! sets header
+ @param names
+ array of names or string of names, delimited by headerDelimiter (default is ,)
+ */
+ public function setHeader($names) {
+ if ($names instanceof DataConfig){
+ $out = array();
+ for ($i=0; $i < sizeof($names->text); $i++)
+ $out[]=$names->text[$i]["name"];
+ $names = $out;
+ }
+
+ $this->headerNames = $this->parse_param_array($names);
+ }
+
+ /*! sets init columns width in pixels
+ @param wp
+ array of widths or string of widths, delimited by headerDelimiter (default is ,)
+ */
+ public function setInitWidths($wp) {
+ $this->headerWidths = $this->parse_param_array($wp);
+ $this->headerWidthsUnits = 'px';
+ }
+
+ /*! sets init columns width in persents
+ @param wp
+ array of widths or string of widths, delimited by headerDelimiter (default is ,)
+ */
+ public function setInitWidthsP($wp) {
+ $this->setInitWidths($wp);
+ $this->headerWidthsUnits = '%';
+ }
+
+ /*! sets columns align
+ @param alStr
+ array of aligns or string of aligns, delimited by headerDelimiter (default is ,)
+ */
+ public function setColAlign($alStr) {
+ $this->headerAlign = $this->parse_param_array($alStr,
+ array("right"=>1, "left"=>1, "center"=>1, "justify"=>1),
+ "left");
+ }
+
+ /*! sets columns vertical align
+ @param alStr
+ array of vertical aligns or string of vertical aligns, delimited by headerDelimiter (default is ,)
+ */
+ public function setColVAlign($alStr) {
+ $this->headerVAlign = $this->parse_param_array($alStr,
+ array("baseline"=>1, "sub"=>1, "super"=>1, "top"=>1, "text-top"=>1, "middle"=>1, "bottom"=>1, "text-bottom"=>1),
+ "top");
+ }
+
+ /*! sets column types
+ @param typeStr
+ array of types or string of types, delimited by headerDelimiter (default is ,)
+ */
+ public function setColTypes($typeStr) {
+ $this->headerTypes = $this->parse_param_array($typeStr);
+ }
+
+ /*! sets columns sorting
+ @param sortStr
+ array if sortings or string of sortings, delimited by headerDelimiter (default is ,)
+ */
+ public function setColSorting($sortStr) {
+ $this->headerSorts = $this->parse_param_array($sortStr);
+ }
+
+ /*! sets columns colors
+ @param colorStr
+ array of colors or string of colors, delimited by headerDelimiter (default is ,)
+ if (color should not be applied it's value should be null)
+ */
+ public function setColColor($colorStr) {
+ $this->headerColors = $this->parse_param_array($colorStr);
+ }
+
+ /*! sets hidden columns
+ @param hidStr
+ array of bool values or string of bool values, delimited by headerDelimiter (default is ,)
+ */
+ public function setColHidden($hidStr) {
+ $this->headerHidden = $this->parse_param_array($hidStr);
+ }
+
+ /*! sets columns id
+ @param idsStr
+ array of ids or string of ids, delimited by headerDelimiter (default is ,)
+ */
+ public function setColIds($idsStr) {
+ $this->headerIds = $this->parse_param_array($idsStr);
+ }
+
+ /*! sets number/date format
+ @param formatArr
+ array of mask formats for number/dates , delimited by headerDelimiter (default is ,)
+ */
+ public function setColFormat($formatArr) {
+ $this->headerFormat = $this->parse_param_array($formatArr);
+ }
+
+ /*! attaches header
+ @param values
+ array of header names or string of header names, delimited by headerDelimiter (default is ,)
+ @param styles
+ array of header styles or string of header styles, delimited by headerDelimiter (default is ,)
+ */
+ public function attachHeader($values, $styles = null, $footer = false) {
+ $header = array();
+ $header['values'] = $this->parse_param_array($values);
+ if ($styles != null) {
+ $header['styles'] = $this->parse_param_array($styles);
+ } else {
+ $header['styles'] = null;
+ }
+ if ($footer)
+ $this->footerAttaches[] = $header;
+ else
+ $this->headerAttaches[] = $header;
+ }
+
+ /*! attaches footer
+ @param values
+ array of footer names or string of footer names, delimited by headerDelimiter (default is ,)
+ @param styles
+ array of footer styles or string of footer styles, delimited by headerDelimiter (default is ,)
+ */
+ public function attachFooter($values, $styles = null) {
+ $this->attachHeader($values, $styles, true);
+ }
+
+ private function auto_fill($mode){
+ $headerWidths = array();
+ $headerTypes = array();
+ $headerSorts = array();
+ $headerAttaches = array();
+
+ for ($i=0; $i < sizeof($this->headerNames); $i++) {
+ $headerWidths[] = 100;
+ $headerTypes[] = "ro";
+ $headerSorts[] = "connector";
+ $headerAttaches[] = "#connector_text_filter";
+ }
+ if ($this->headerWidths == false)
+ $this->setInitWidths($headerWidths);
+ if ($this->headerTypes == false)
+ $this->setColTypes($headerTypes);
+
+ if ($mode){
+ if ($this->headerSorts == false)
+ $this->setColSorting($headerSorts);
+ $this->attachHeader($headerAttaches);
+ }
+ }
+
+ public function defineOptions($conn){
+ if (!$conn->is_first_call()) return; //render head only for first call
+
+ $config = $conn->get_config();
+ $full_header = ($this->headerNames === true);
+
+ if (gettype($this->headerNames) == 'boolean') //auto-config
+ $this->setHeader($config);
+ $this->auto_fill($full_header);
+
+ if (isset($_GET["dhx_colls"])) return;
+
+ $fillList = array();
+ for ($i = 0; $i < count($this->headerNames); $i++)
+ if ($this->headerTypes[$i] == "co" || $this->headerTypes[$i] == "coro")
+ $fillList[$i] = true;
+
+ for ($i = 0; $i < count($this->headerAttaches); $i++) {
+ for ($j = 0; $j < count($this->headerAttaches[$i]['values']); $j++) {
+ if ($this->headerAttaches[$i]['values'][$j] == "#connector_select_filter"
+ || $this->headerAttaches[$i]['values'][$j] == "#select_filter") {
+ $fillList[$j] = true;;
+ }
+ }
+ }
+
+ $temp = array();
+ foreach($fillList as $k => $v)
+ $temp[] = $k;
+ if (count($temp))
+ $_GET["dhx_colls"] = implode(",",$temp);
+ }
+
+
+ /*! gets header as array
+ */
+ private function getHeaderArray() {
+ $head = Array();
+ $head[0] = $this->headerNames;
+ $head = $this->getAttaches($head, $this->headerAttaches);
+ return $head;
+ }
+
+
+ /*! get footer as array
+ */
+ private function getFooterArray() {
+ $foot = Array();
+ $foot = $this->getAttaches($foot, $this->footerAttaches);
+ return $foot;
+ }
+
+
+ /*! gets array of data with attaches
+ */
+ private function getAttaches($to, $from) {
+ for ($i = 0; $i < count($from); $i++) {
+ $line = $from[$i]['values'];
+ $to[] = $line;
+ }
+ return $to;
+ }
+
+
+ /*! calculates rowspan array according #cspan markers
+ */
+ private function processCspan($data) {
+ $rspan = Array();
+ for ($i = 0; $i < count($data); $i++) {
+ $last = 0;
+ $rspan[$i] = Array();
+ for ($j = 0; $j < count($data[$i]); $j++) {
+ $rspan[$i][$j] = 0;
+ if ($data[$i][$j] === '#cspan') {
+ $rspan[$i][$last]++;
+ } else {
+ $last = $j;
+ }
+ }
+ }
+ return $rspan;
+ }
+
+
+ /*! calculates colspan array according #rspan markers
+ */
+ private function processRspan($data) {
+ $last = Array();
+ $cspan = Array();
+ for ($i = 0; $i < count($data); $i++) {
+ $cspan[$i] = Array();
+ for ($j = 0; $j < count($data[$i]); $j++) {
+ $cspan[$i][$j] = 0;
+ if (!isset($last[$j])) $last[$j] = 0;
+ if ($data[$i][$j] === '#rspan') {
+ $cspan[$last[$j]][$j]++;
+ } else {
+ $last[$j] = $i;
+ }
+ }
+ }
+ return $cspan;
+ }
+
+
+ /*! sets mode of output format: usual mode or convert mode.
+ * @param mode
+ * true - convert mode, false - otherwise
+ */
+ public function set_convert_mode($mode) {
+ $this->convert_mode = $mode;
+ }
+
+
+ /*! adds header configuration in output XML
+ */
+ public function attachHeaderToXML($conn, $out) {
+ if (!$conn->is_first_call()) return; //render head only for first call
+
+ $head = $this->getHeaderArray();
+ $foot = $this->getFooterArray();
+ $rspan = $this->processRspan($head);
+ $cspan = $this->processCspan($head);
+
+ $str = '<head>';
+
+ if ($this->convert_mode) $str .= "<columns>";
+
+ for ($i = 0; $i < count($this->headerNames); $i++) {
+ $str .= '<column';
+ $str .= ' type="'. $this->headerTypes[$i].'"';
+ $str .= ' width="'.$this->headerWidths[$i].'"';
+ $str .= $this->headerIds ? ' id="'.$this->headerIds[$i].'"' : '';
+ $str .= $this->headerAlign[$i] ? ' align="'.$this->headerAlign[$i].'"' : '';
+ $str .= $this->headerVAlign[$i] ? ' valign="'.$this->headerVAlign[$i].'"' : '';
+ $str .= $this->headerSorts[$i] ? ' sort="'.$this->headerSorts[$i].'"' : '';
+ $str .= $this->headerColors[$i] ? ' color="'.$this->headerColors[$i].'"' : '';
+ $str .= $this->headerHidden[$i] ? ' hidden="'.$this->headerHidden[$i].'"' : '';
+ $str .= $this->headerFormat[$i] ? ' format="'.$this->headerFormat[$i].'"' : '';
+ $str .= $cspan[0][$i] ? ' colspan="'.($cspan[0][$i] + 1).'"' : '';
+ $str .= $rspan[0][$i] ? ' rowspan="'.($rspan[0][$i] + 1).'"' : '';
+ $str .= '>'.$this->headerNames[$i].'</column>';
+ }
+
+ if (!$this->convert_mode) {
+ $str .= '<settings><colwidth>'.$this->headerWidthsUnits.'</colwidth></settings>';
+ if ((count($this->headerAttaches) > 0)||(count($this->footerAttaches) > 0)) {
+ $str .= '<afterInit>';
+ }
+ for ($i = 0; $i < count($this->headerAttaches); $i++) {
+ $str .= '<call command="attachHeader">';
+ $str .= '<param>'.implode(",",$this->headerAttaches[$i]['values']).'</param>';
+ if ($this->headerAttaches[$i]['styles'] != null) {
+ $str .= '<param>'.implode(",",$this->headerAttaches[$i]['styles']).'</param>';
+ }
+ $str .= '</call>';
+ }
+ for ($i = 0; $i < count($this->footerAttaches); $i++) {
+ $str .= '<call command="attachFooter">';
+ $str .= '<param>'.implode(",",$this->footerAttaches[$i]['values']).'</param>';
+ if ($this->footerAttaches[$i]['styles'] != null) {
+ $str .= '<param>'.implode(",",$this->footerAttaches[$i]['styles']).'</param>';
+ }
+ $str .= '</call>';
+ }
+ if ((count($this->headerAttaches) > 0)||(count($this->footerAttaches) > 0)) {
+ $str .= '</afterInit>';
+ }
+ } else {
+ $str .= "</columns>";
+ for ($i = 1; $i < count($head); $i++) {
+ $str .= "<columns>";
+ for ($j = 0; $j < count($head[$i]); $j++) {
+ $str .= '<column';
+ $str .= $cspan[$i][$j] ? ' colspan="'.($cspan[$i][$j] + 1).'"' : '';
+ $str .= $rspan[$i][$j] ? ' rowspan="'.($rspan[$i][$j] + 1).'"' : '';
+ $str .= '>'.$head[$i][$j].'</column>';
+ }
+ $str .= "</columns>\n";
+ }
+ }
+ $str .= '</head>';
+
+
+ if ($this->convert_mode && count($foot) > 0) {
+ $rspan = $this->processRspan($foot);
+ $cspan = $this->processCspan($foot);
+ $str .= "<foot>";
+ for ($i = 0; $i < count($foot); $i++) {
+ $str .= "<columns>";
+ for ($j = 0; $j < count($foot[$i]); $j++) {
+ $str .= '<column';
+ $str .= $cspan[$i][$j] ? ' colspan="'.($cspan[$i][$j] + 1).'"' : '';
+ $str .= $rspan[$i][$j] ? ' rowspan="'.($rspan[$i][$j] + 1).'"' : '';
+ $str .= '>'.$foot[$i][$j].'</column>';
+ }
+ $str .= "</columns>\n";
+ }
+ $str .= "</foot>";
+ }
+
+ $out->add($str);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/grid_connector.php b/codebase/connector/grid_connector.php
new file mode 100644
index 0000000..9748dee
--- /dev/null
+++ b/codebase/connector/grid_connector.php
@@ -0,0 +1,262 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+require_once("grid_config.php");
+
+//require_once("grid_dataprocessor.php");
+
+/*! DataItem class for Grid component
+**/
+
+class GridDataItem extends DataItem{
+ protected $row_attrs;//!< hash of row attributes
+ protected $cell_attrs;//!< hash of cell attributes
+
+ function __construct($data,$name,$index=0){
+ parent::__construct($data,$name,$index);
+
+ $this->row_attrs=array();
+ $this->cell_attrs=array();
+ }
+ /*! set color of row
+
+ @param color
+ color of row
+ */
+ function set_row_color($color){
+ $this->row_attrs["bgColor"]=$color;
+ }
+ /*! set style of row
+
+ @param color
+ color of row
+ */
+ function set_row_style($color){
+ $this->row_attrs["style"]=$color;
+ }
+ /*! assign custom style to the cell
+
+ @param name
+ name of column
+ @param value
+ css style string
+ */
+ function set_cell_style($name,$value){
+ $this->set_cell_attribute($name,"style",$value);
+ }
+ /*! assign custom class to specific cell
+
+ @param name
+ name of column
+ @param value
+ css class name
+ */
+ function set_cell_class($name,$value){
+ $this->set_cell_attribute($name,"class",$value);
+ }
+ /*! set custom cell attribute
+
+ @param name
+ name of column
+ @param attr
+ name of attribute
+ @param value
+ value of attribute
+ */
+ function set_cell_attribute($name,$attr,$value){
+ if (!array_key_exists($name, $this->cell_attrs)) $this->cell_attrs[$name]=array();
+ $this->cell_attrs[$name][$attr]=$value;
+ }
+
+ /*! set custom row attribute
+
+ @param attr
+ name of attribute
+ @param value
+ value of attribute
+ */
+ function set_row_attribute($attr,$value){
+ $this->row_attrs[$attr]=$value;
+ }
+
+ /*! return self as XML string, starting part
+ */
+ public function to_xml_start(){
+ if ($this->skip) return "";
+
+ $str="<row id='".$this->get_id()."'";
+ foreach ($this->row_attrs as $k=>$v)
+ $str.=" ".$k."='".$v."'";
+ $str.=">";
+ for ($i=0; $i < sizeof($this->config->text); $i++){
+ $str.="<cell";
+ $name=$this->config->text[$i]["name"];
+ if (isset($this->cell_attrs[$name])){
+ $cattrs=$this->cell_attrs[$name];
+ foreach ($cattrs as $k => $v)
+ $str.=" ".$k."='".$this->xmlentities($v)."'";
+ }
+ $value = isset($this->data[$name]) ? $this->data[$name] : '';
+ $str.="><![CDATA[".$value."]]></cell>";
+ }
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $str.="<userdata name='".$key."'><![CDATA[".$value."]]></userdata>";
+
+ return $str;
+ }
+ /*! return self as XML string, ending part
+ */
+ public function to_xml_end(){
+ if ($this->skip) return "";
+
+ return "</row>";
+ }
+}
+/*! Connector for the dhtmlxgrid
+**/
+class GridConnector extends Connector{
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="GridDataItem";
+ if (!$data_type) $data_type="GridDataProcessor";
+ if (!$render_type) $render_type="RenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+
+ protected function parse_request(){
+ parent::parse_request();
+
+ if (isset($_GET["dhx_colls"]))
+ $this->fill_collections($_GET["dhx_colls"]);
+ }
+ protected function resolve_parameter($name){
+ if (intval($name).""==$name)
+ return $this->config->text[intval($name)]["db_name"];
+ return $name;
+ }
+
+ /*! replace xml unsafe characters
+
+ @param string
+ string to be escaped
+ @return
+ escaped string
+ */
+ protected function xmlentities($string) {
+ return str_replace( array( '&', '"', "'", '<', '>', '’' ), array( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string);
+ }
+
+ /*! assign options collection to the column
+
+ @param name
+ name of the column
+ @param options
+ array or connector object
+ */
+ public function set_options($name,$options){
+ if (is_array($options)){
+ $str="";
+ foreach($options as $k => $v)
+ $str.="<item value='".$this->xmlentities($k)."' label='".$this->xmlentities($v)."' />";
+ $options=$str;
+ }
+ $this->options[$name]=$options;
+ }
+ /*! generates xml description for options collections
+
+ @param list
+ comma separated list of column names, for which options need to be generated
+ */
+ protected function fill_collections($list=""){
+ $names=explode(",",$list);
+ for ($i=0; $i < sizeof($names); $i++) {
+ $name = $this->resolve_parameter($names[$i]);
+ if (!array_key_exists($name,$this->options)){
+ $this->options[$name] = new DistinctOptionsConnector($this->get_connection(),$this->names["db_class"]);
+ $c = new DataConfig($this->config);
+ $r = new DataRequestConfig($this->request);
+ $c->minimize($name);
+
+ $this->options[$name]->render_connector($c,$r);
+ }
+
+ $this->extra_output.="<coll_options for='{$names[$i]}'>";
+ if (!is_string($this->options[$name]))
+ $this->extra_output.=$this->options[$name]->render();
+ else
+ $this->extra_output.=$this->options[$name];
+ $this->extra_output.="</coll_options>";
+ }
+ }
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ $attributes = "";
+ foreach($this->attributes as $k=>$v)
+ $attributes .= " ".$k."='".$v."'";
+
+ if ($this->dload){
+ if ($pos=$this->request->get_start())
+ return "<rows pos='".$pos."'".$attributes.">";
+ else
+ return "<rows total_count='".$this->sql->get_size($this->request)."'".$attributes.">";
+ }
+ else
+ return "<rows".$attributes.">";
+ }
+
+
+ /*! renders self as xml, ending part
+ */
+ protected function xml_end(){
+ return $this->extra_output."</rows>";
+ }
+
+ public function set_config($config = false){
+ if (gettype($config) == 'boolean')
+ $config = new GridConfiguration($config);
+
+ $this->event->attach("beforeOutput", Array($config, "attachHeaderToXML"));
+ $this->event->attach("onInit", Array($config, "defineOptions"));
+ }
+}
+
+/*! DataProcessor class for Grid component
+**/
+class GridDataProcessor extends DataProcessor{
+
+ /*! convert incoming data name to valid db name
+ converts c0..cN to valid field names
+ @param data
+ data name from incoming request
+ @return
+ related db_name
+ */
+ function name_data($data){
+ if ($data == "gr_id") return $this->config->id["name"];
+ $parts=explode("c",$data);
+ if ($parts[0]=="" && ((string)intval($parts[1]))==$parts[1])
+ if (sizeof($this->config->text)>intval($parts[1]))
+ return $this->config->text[intval($parts[1])]["name"];
+ return $data;
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/keygrid_connector.php b/codebase/connector/keygrid_connector.php
new file mode 100644
index 0000000..3942ac2
--- /dev/null
+++ b/codebase/connector/keygrid_connector.php
@@ -0,0 +1,48 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("grid_connector.php");
+class KeyGridConnector extends GridConnector{
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="GridDataItem";
+ if (!$data_type) $data_type="KeyGridDataProcessor";
+ parent::__construct($res,$type,$item_type,$data_type);
+
+ $this->event->attach("beforeProcessing",array($this,"before_check_key"));
+ $this->event->attach("afterProcessing",array($this,"after_check_key"));
+ }
+
+ public function before_check_key($action){
+ if ($action->get_value($this->config->id["name"])=="")
+ $action->error();
+ }
+ public function after_check_key($action){
+ if ($action->get_status()=="inserted" || $action->get_status()=="updated"){
+ $action->success($action->get_value($this->config->id["name"]));
+ $action->set_status("inserted");
+ }
+ }
+};
+
+class KeyGridDataProcessor extends DataProcessor{
+
+ /*! convert incoming data name to valid db name
+ converts c0..cN to valid field names
+ @param data
+ data name from incoming request
+ @return
+ related db_name
+ */
+ function name_data($data){
+ if ($data == "gr_id") return "__dummy__id__"; //ignore ID
+ $parts=explode("c",$data);
+ if ($parts[0]=="" && intval($parts[1])==$parts[1])
+ return $this->config->text[intval($parts[1])]["name"];
+ return $data;
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/mixed_connector.php b/codebase/connector/mixed_connector.php
new file mode 100644
index 0000000..461d6ec
--- /dev/null
+++ b/codebase/connector/mixed_connector.php
@@ -0,0 +1,28 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+class MixedConnector extends Connector {
+
+ protected $connectors = array();
+
+ public function add($name, $conn) {
+ $this->connectors[$name] = $conn;
+ }
+
+ public function render() {
+ $result = "{";
+ $parts = array();
+ foreach($this->connectors as $name => $conn) {
+ $conn->asString(true);
+ $parts[] = "\"".$name."\":".($conn->render())."\n";
+ }
+ $result .= implode(",\n", $parts)."}";
+ echo $result;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/options_connector.php b/codebase/connector/options_connector.php
new file mode 100644
index 0000000..dc72eb2
--- /dev/null
+++ b/codebase/connector/options_connector.php
@@ -0,0 +1,45 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+/*! DataItem class for dhxForm:options
+**/
+class OptionsDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+ $str ="";
+
+ $str .= "<item value=\"".$this->xmlentities($this->data[$this->config->data[0]['db_name']])."\" label=\"".$this->xmlentities($this->data[$this->config->data[1]['db_name']])."\" />";
+ return $str;
+ }
+}
+
+/*! Connector class for dhtmlxForm:options
+**/
+class SelectOptionsConnector extends Connector{
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="OptionsDataItem";
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/scheduler_connector.php b/codebase/connector/scheduler_connector.php
new file mode 100644
index 0000000..ee0cd20
--- /dev/null
+++ b/codebase/connector/scheduler_connector.php
@@ -0,0 +1,230 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+require_once("data_connector.php");
+
+/*! DataItem class for Scheduler component
+**/
+class SchedulerDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+
+ $str="<event id='".$this->get_id()."' >";
+ $str.="<start_date><![CDATA[".$this->data[$this->config->text[0]["name"]]."]]></start_date>";
+ $str.="<end_date><![CDATA[".$this->data[$this->config->text[1]["name"]]."]]></end_date>";
+ $str.="<text><![CDATA[".$this->data[$this->config->text[2]["name"]]."]]></text>";
+ for ($i=3; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ $str.="<".$extra."><![CDATA[".$this->data[$extra]."]]></".$extra.">";
+ }
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $str.="<".$key."><![CDATA[".$value."]]></".$key.">";
+
+ return $str."</event>";
+ }
+}
+
+
+/*! Connector class for dhtmlxScheduler
+**/
+class SchedulerConnector extends Connector{
+
+ protected $extra_output="";//!< extra info which need to be sent to client side
+ protected $options=array();//!< hash of OptionsConnector
+
+
+ /*! assign options collection to the column
+
+ @param name
+ name of the column
+ @param options
+ array or connector object
+ */
+ public function set_options($name,$options){
+ if (is_array($options)){
+ $str="";
+ foreach($options as $k => $v)
+ $str.="<item value='".$this->xmlentities($k)."' label='".$this->xmlentities($v)."' />";
+ $options=$str;
+ }
+ $this->options[$name]=$options;
+ }
+
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ * @param render_type
+ name of class which will be used for rendering.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="SchedulerDataItem";
+ if (!$data_type) $data_type="SchedulerDataProcessor";
+ if (!$render_type) $render_type="RenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ //parse GET scoope, all operations with incoming request must be done here
+ function parse_request(){
+ parent::parse_request();
+ if (count($this->config->text)){
+ if (isset($_GET["to"]))
+ $this->request->set_filter($this->config->text[0]["name"],$_GET["to"],"<");
+ if (isset($_GET["from"]))
+ $this->request->set_filter($this->config->text[1]["name"],$_GET["from"],">");
+ }
+ }
+}
+
+/*! DataProcessor class for Scheduler component
+**/
+class SchedulerDataProcessor extends DataProcessor{
+ function name_data($data){
+ if ($data=="start_date")
+ return $this->config->text[0]["db_name"];
+ if ($data=="id")
+ return $this->config->id["db_name"];
+ if ($data=="end_date")
+ return $this->config->text[1]["db_name"];
+ if ($data=="text")
+ return $this->config->text[2]["db_name"];
+
+ return $data;
+ }
+}
+
+
+class JSONSchedulerDataItem extends SchedulerDataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+
+ $obj = array();
+ $obj['id'] = $this->get_id();
+ $obj['start_date'] = $this->data[$this->config->text[0]["name"]];
+ $obj['end_date'] = $this->data[$this->config->text[1]["name"]];
+ $obj['text'] = $this->data[$this->config->text[2]["name"]];
+ for ($i=3; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ $obj[$extra]=$this->data[$extra];
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $obj[$key]=$value;
+
+ return $obj;
+ }
+}
+
+
+class JSONSchedulerConnector extends SchedulerConnector {
+
+ protected $data_separator = ",";
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="JSONSchedulerDataItem";
+ if (!$data_type) $data_type="SchedulerDataProcessor";
+ if (!$render_type) $render_type="JSONRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ protected function xml_start() {
+ return '{ "data":';
+ }
+
+ protected function xml_end() {
+ $this->fill_collections();
+ $end = (!empty($this->extra_output)) ? ', "collections": {'.$this->extra_output.'}' : '';
+ foreach ($this->attributes as $k => $v)
+ $end.=", \"".$k."\":\"".$v."\"";
+ $end .= '}';
+ return $end;
+ }
+
+ /*! assign options collection to the column
+
+ @param name
+ name of the column
+ @param options
+ array or connector object
+ */
+ public function set_options($name,$options){
+ if (is_array($options)){
+ $str=array();
+ foreach($options as $k => $v)
+ $str[]='{"id":"'.$this->xmlentities($k).'", "value":"'.$this->xmlentities($v).'"}';
+ $options=implode(",",$str);
+ }
+ $this->options[$name]=$options;
+ }
+
+
+ /*! generates xml description for options collections
+
+ @param list
+ comma separated list of column names, for which options need to be generated
+ */
+ protected function fill_collections($list=""){
+ $options = array();
+ foreach ($this->options as $k=>$v) {
+ $name = $k;
+ $option="\"{$name}\":[";
+ if (!is_string($this->options[$name])){
+ $data = json_encode($this->options[$name]->render());
+ $option.=substr($data,1,-1);
+ } else
+ $option.=$this->options[$name];
+ $option.="]";
+ $options[] = $option;
+ }
+ $this->extra_output .= implode($this->data_separator, $options);
+ }
+
+
+ /*! output fetched data as XML
+ @param res
+ DB resultset
+ */
+ protected function output_as_xml($res){
+ $result = $this->render_set($res);
+ if ($this->simple) return $result;
+
+ $data=$this->xml_start().json_encode($result).$this->xml_end();
+
+ if ($this->as_string) return $data;
+
+ $out = new OutputWriter($data, "");
+ $out->set_type("json");
+ $this->event->trigger("beforeOutput", $this, $out);
+ $out->output("", true, $this->encoding);
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/strategy.php b/codebase/connector/strategy.php
new file mode 100644
index 0000000..eb579b8
--- /dev/null
+++ b/codebase/connector/strategy.php
@@ -0,0 +1,500 @@
+<?php
+
+class RenderStrategy {
+
+ protected $conn = null;
+
+ public function __construct($conn) {
+ $this->conn = $conn;
+ }
+
+ /*! adds mix fields into DataConfig
+ * @param config
+ * DataConfig object
+ * @param mix
+ * mix structure
+ */
+ protected function mix($config, $mix) {
+ for ($i = 0; $i < count($mix); $i++) {
+ if ($config->is_field($mix[$i]['name'])===-1) {
+ $config->add_field($mix[$i]['name']);
+ }
+ }
+ }
+
+ /*! remove mix fields from DataConfig
+ * @param config
+ * DataConfig object
+ * @param mix
+ * mix structure
+ */
+ protected function unmix($config, $mix) {
+ for ($i = 0; $i < count($mix); $i++) {
+ if ($config->is_field($mix[$i]['name'])!==-1) {
+ $config->remove_field_full($mix[$i]['name']);
+ }
+ }
+ }
+
+ /*! adds mix fields in item
+ * simple mix adds only strings specified by user
+ * @param mix
+ * mix structure
+ * @param data
+ * array of selected data
+ */
+ protected function simple_mix($mix, $data) {
+ // get mix details
+ for ($i = 0; $i < count($mix); $i++)
+ $data[$mix[$i]["name"]] = is_string($mix[$i]["value"]) ? $mix[$i]["value"] : "";
+ return $data;
+ }
+
+ /*! adds mix fields in item
+ * complex mix adds strings specified by user and results of subrequests
+ * @param mix
+ * mix structure
+ * @param data
+ * array of selected data
+ */
+ protected function complex_mix($mix, $data) {
+ // get mix details
+ for ($i = 0; $i < count($mix); $i++) {
+ $mixname = $mix[$i]["name"];
+ if ($mix[$i]['filter'] !== false) {
+ $subconn = $mix[$i]["value"];
+ $filter = $mix[$i]["filter"];
+
+ // setting relationships
+ $subconn->clear_filter();
+ foreach ($filter as $k => $v)
+ if (isset($data[$v]))
+ $subconn->filter($k, $data[$v], "=");
+ else
+ throw new Exception('There was no such data field registered as: '.$k);
+
+ $subconn->asString(true);
+ $data[$mixname]=$subconn->simple_render();
+ if (is_array($data[$mixname]) && count($data[$mixname]) == 1)
+ $data[$mixname] = $data[$mixname][0];
+ } else {
+ $data[$mixname] = $mix[$i]["value"];
+ }
+ }
+ return $data;
+ }
+
+ /*! render from DB resultset
+ @param res
+ DB resultset
+ process commands, output requested data as XML
+ */
+ public function render_set($res, $name, $dload, $sep, $config, $mix){
+ $output="";
+ $index=0;
+ $conn = $this->conn;
+ $this->mix($config, $mix);
+ $conn->event->trigger("beforeRenderSet",$conn,$res,$config);
+ while ($data=$conn->sql->get_next($res)){
+ $data = $this->simple_mix($mix, $data);
+
+ $data = new $name($data,$config,$index);
+ if ($data->get_id()===false)
+ $data->set_id($conn->uuid());
+ $conn->event->trigger("beforeRender",$data);
+ $output.=$data->to_xml().$sep;
+ $index++;
+ }
+ $this->unmix($config, $mix);
+ return $output;
+ }
+
+}
+
+class JSONRenderStrategy extends RenderStrategy {
+
+ /*! render from DB resultset
+ @param res
+ DB resultset
+ process commands, output requested data as json
+ */
+ public function render_set($res, $name, $dload, $sep, $config, $mix){
+ $output=array();
+ $index=0;
+ $conn = $this->conn;
+ $this->mix($config, $mix);
+ $conn->event->trigger("beforeRenderSet",$conn,$res,$config);
+ while ($data=$conn->sql->get_next($res)){
+ $data = $this->complex_mix($mix, $data);
+ $data = new $name($data,$config,$index);
+ if ($data->get_id()===false)
+ $data->set_id($conn->uuid());
+ $conn->event->trigger("beforeRender",$data);
+ $output[]=$data->to_xml();
+ $index++;
+ }
+ $this->unmix($config, $mix);
+ return $output;
+ }
+
+}
+
+class TreeRenderStrategy extends RenderStrategy {
+
+ protected $id_swap = array();
+
+ public function __construct($conn) {
+ parent::__construct($conn);
+ $conn->event->attach("afterInsert",array($this,"parent_id_correction_a"));
+ $conn->event->attach("beforeProcessing",array($this,"parent_id_correction_b"));
+ }
+
+ public function render_set($res, $name, $dload, $sep, $config, $mix){
+ $output="";
+ $index=0;
+ $conn = $this->conn;
+ $this->mix($config, $mix);
+ while ($data=$conn->sql->get_next($res)){
+ $data = $this->simple_mix($mix, $data);
+ $data = new $name($data,$config,$index);
+ $conn->event->trigger("beforeRender",$data);
+ //there is no info about child elements,
+ //if we are using dyn. loading - assume that it has,
+ //in normal mode juse exec sub-render routine
+ if ($data->has_kids()===-1 && $dload)
+ $data->set_kids(true);
+ $output.=$data->to_xml_start();
+ if ($data->has_kids()===-1 || ( $data->has_kids()==true && !$dload)){
+ $sub_request = new DataRequestConfig($conn->get_request());
+ $sub_request->set_relation($data->get_id());
+ $output.=$this->render_set($conn->sql->select($sub_request), $name, $dload, $sep, $config);
+ }
+ $output.=$data->to_xml_end();
+ $index++;
+ }
+ $this->unmix($config, $mix);
+ return $output;
+ }
+
+ /*! store info about ID changes during insert operation
+ @param dataAction
+ data action object during insert operation
+ */
+ public function parent_id_correction_a($dataAction){
+ $this->id_swap[$dataAction->get_id()]=$dataAction->get_new_id();
+ }
+
+ /*! update ID if it was affected by previous operation
+ @param dataAction
+ data action object, before any processing operation
+ */
+ public function parent_id_correction_b($dataAction){
+ $relation = $this->conn->get_config()->relation_id["db_name"];
+ $value = $dataAction->get_value($relation);
+
+ if (array_key_exists($value,$this->id_swap))
+ $dataAction->set_value($relation,$this->id_swap[$value]);
+ }
+}
+
+
+
+class JSONTreeRenderStrategy extends TreeRenderStrategy {
+
+ public function render_set($res, $name, $dload, $sep, $config,$mix){
+ $output=array();
+ $index=0;
+ $conn = $this->conn;
+ $this->mix($config, $mix);
+ while ($data=$conn->sql->get_next($res)){
+ $data = $this->complex_mix($mix, $data);
+ $data = new $name($data,$config,$index);
+ $conn->event->trigger("beforeRender",$data);
+ //there is no info about child elements,
+ //if we are using dyn. loading - assume that it has,
+ //in normal mode just exec sub-render routine
+ if ($data->has_kids()===-1 && $dload)
+ $data->set_kids(true);
+ $record = $data->to_xml_start();
+ if ($data->has_kids()===-1 || ( $data->has_kids()==true && !$dload)){
+ $sub_request = new DataRequestConfig($conn->get_request());
+ $sub_request->set_relation($data->get_id());
+ $temp = $this->render_set($conn->sql->select($sub_request), $name, $dload, $sep, $config, $mix);
+ if (sizeof($temp))
+ $record["data"] = $temp;
+ }
+ $output[] = $record;
+ $index++;
+ }
+ $this->unmix($config, $mix);
+ return $output;
+ }
+
+}
+
+
+class MultitableTreeRenderStrategy extends TreeRenderStrategy {
+
+ private $level = 0;
+ private $max_level = null;
+ protected $sep = "#";
+
+ public function __construct($conn) {
+ parent::__construct($conn);
+ $conn->event->attach("beforeProcessing", Array($this, 'id_translate_before'));
+ $conn->event->attach("afterProcessing", Array($this, 'id_translate_after'));
+ }
+
+ public function set_separator($sep) {
+ $this->sep = $sep;
+ }
+
+ public function render_set($res, $name, $dload, $sep, $config, $mix){
+ $output="";
+ $index=0;
+ $conn = $this->conn;
+ $this->mix($config, $mix);
+ while ($data=$conn->sql->get_next($res)){
+ $data = $this->simple_mix($mix, $data);
+ $data[$config->id['name']] = $this->level_id($data[$config->id['name']]);
+ $data = new $name($data,$config,$index);
+ $conn->event->trigger("beforeRender",$data);
+ if (($this->max_level !== null)&&($conn->get_level() == $this->max_level)) {
+ $data->set_kids(false);
+ } else {
+ if ($data->has_kids()===-1)
+ $data->set_kids(true);
+ }
+ $output.=$data->to_xml_start();
+ $output.=$data->to_xml_end();
+ $index++;
+ }
+ $this->unmix($config, $mix);
+ return $output;
+ }
+
+
+ public function level_id($id, $level = null) {
+ return ($level === null ? $this->level : $level).$this->sep.$id;
+ }
+
+
+ /*! remove level prefix from id, parent id and set new id before processing
+ @param action
+ DataAction object
+ */
+ public function id_translate_before($action) {
+ $id = $action->get_id();
+ $id = $this->parse_id($id, false);
+ $action->set_id($id);
+ $action->set_value('tr_id', $id);
+ $action->set_new_id($id);
+ $pid = $action->get_value($this->conn->get_config()->relation_id['db_name']);
+ $pid = $this->parse_id($pid, false);
+ $action->set_value($this->conn->get_config()->relation_id['db_name'], $pid);
+ }
+
+
+ /*! add level prefix in id and new id after processing
+ @param action
+ DataAction object
+ */
+ public function id_translate_after($action) {
+ $id = $action->get_id();
+ $action->set_id($this->level_id($id));
+ $id = $action->get_new_id();
+ $action->success($this->level_id($id));
+ }
+
+
+ public function get_level($parent_name) {
+ if ($this->level) return $this->level;
+ if (!isset($_GET[$parent_name])) {
+ if (isset($_POST['ids'])) {
+ $ids = explode(",",$_POST["ids"]);
+ $id = $this->parse_id($ids[0]);
+ $this->level--;
+ }
+ $this->conn->get_request()->set_relation(false);
+ } else {
+ $id = $this->parse_id($_GET[$parent_name]);
+ $_GET[$parent_name] = $id;
+ }
+ return $this->level;
+ }
+
+
+ public function is_max_level() {
+ if (($this->max_level !== null) && ($this->level >= $this->max_level))
+ return true;
+ return false;
+ }
+ public function set_max_level($max_level) {
+ $this->max_level = $max_level;
+ }
+ public function parse_id($id, $set_level = true) {
+ $parts = explode('#', urldecode($id));
+ if (count($parts) === 2) {
+ $level = $parts[0] + 1;
+ $id = $parts[1];
+ } else {
+ $level = 0;
+ $id = '';
+ }
+ if ($set_level) $this->level = $level;
+ return $id;
+ }
+
+}
+
+
+class JSONMultitableTreeRenderStrategy extends MultitableTreeRenderStrategy {
+
+ public function render_set($res, $name, $dload, $sep, $config, $mix){
+ $output=array();
+ $index=0;
+ $conn = $this->conn;
+ $this->mix($config, $mix);
+ while ($data=$conn->sql->get_next($res)){
+ $data = $this->complex_mix($mix, $data);
+ $data[$config->id['name']] = $this->level_id($data[$config->id['name']]);
+ $data = new $name($data,$config,$index);
+ $conn->event->trigger("beforeRender",$data);
+
+ if ($this->is_max_level()) {
+ $data->set_kids(false);
+ } else {
+ if ($data->has_kids()===-1)
+ $data->set_kids(true);
+ }
+ $record = $data->to_xml_start($output);
+ $output[] = $record;
+ $index++;
+ }
+ $this->unmix($config, $mix);
+ return $output;
+ }
+
+}
+
+
+class GroupRenderStrategy extends RenderStrategy {
+
+ protected $id_postfix = '__{group_param}';
+
+ public function __construct($conn) {
+ parent::__construct($conn);
+ $conn->event->attach("beforeProcessing", Array($this, 'check_id'));
+ $conn->event->attach("onInit", Array($this, 'replace_postfix'));
+ }
+
+ public function render_set($res, $name, $dload, $sep, $config, $mix, $usemix = false){
+ $output="";
+ $index=0;
+ $conn = $this->conn;
+ if ($usemix) $this->mix($config, $mix);
+ while ($data=$conn->sql->get_next($res)){
+ if (isset($data[$config->id['name']])) {
+ $this->simple_mix($mix, $data);
+ $has_kids = false;
+ } else {
+ $data[$config->id['name']] = $data['value'].$this->id_postfix;
+ $data[$config->text[0]['name']] = $data['value'];
+ $has_kids = true;
+ }
+ $data = new $name($data,$config,$index);
+ $conn->event->trigger("beforeRender",$data);
+ if ($has_kids === false) {
+ $data->set_kids(false);
+ }
+
+ if ($data->has_kids()===-1 && $dload)
+ $data->set_kids(true);
+ $output.=$data->to_xml_start();
+ if (($data->has_kids()===-1 || ( $data->has_kids()==true && !$dload))&&($has_kids == true)){
+ $sub_request = new DataRequestConfig($conn->get_request());
+ $sub_request->set_relation(str_replace($this->id_postfix, "", $data->get_id()));
+ $output.=$this->render_set($conn->sql->select($sub_request), $name, $dload, $sep, $config, $mix, true);
+ }
+ $output.=$data->to_xml_end();
+ $index++;
+ }
+ if ($usemix) $this->unmix($config, $mix);
+ return $output;
+ }
+
+ public function check_id($action) {
+ if (isset($_GET['editing'])) {
+ $config = $this->conn->get_config();
+ $id = $action->get_id();
+ $pid = $action->get_value($config->relation_id['name']);
+ $pid = str_replace($this->id_postfix, "", $pid);
+ $action->set_value($config->relation_id['name'], $pid);
+ if (!empty($pid)) {
+ return $action;
+ } else {
+ $action->error();
+ $action->set_response_text("This record can't be updated!");
+ return $action;
+ }
+ } else {
+ return $action;
+ }
+ }
+
+ public function replace_postfix() {
+ if (isset($_GET['id'])) {
+ $_GET['id'] = str_replace($this->id_postfix, "", $_GET['id']);
+ }
+ }
+
+ public function get_postfix() {
+ return $this->id_postfix;
+ }
+
+}
+
+
+class JSONGroupRenderStrategy extends GroupRenderStrategy {
+
+ public function render_set($res, $name, $dload, $sep, $config, $mix, $usemix = false){
+ $output=array();
+ $index=0;
+ $conn = $this->conn;
+ if ($usemix) $this->mix($config, $mix);
+ while ($data=$conn->sql->get_next($res)){
+ if (isset($data[$config->id['name']])) {
+ $data = $this->complex_mix($mix, $data);
+ $has_kids = false;
+ } else {
+ $data[$config->id['name']] = $data['value'].$this->id_postfix;
+ $data[$config->text[0]['name']] = $data['value'];
+ $has_kids = true;
+ }
+ $data = new $name($data,$config,$index);
+ $conn->event->trigger("beforeRender",$data);
+ if ($has_kids === false) {
+ $data->set_kids(false);
+ }
+
+ if ($data->has_kids()===-1 && $dload)
+ $data->set_kids(true);
+ $record = $data->to_xml_start();
+ if (($data->has_kids()===-1 || ( $data->has_kids()==true && !$dload))&&($has_kids == true)){
+ $sub_request = new DataRequestConfig($conn->get_request());
+ $sub_request->set_relation(str_replace($this->id_postfix, "", $data->get_id()));
+ $temp = $this->render_set($conn->sql->select($sub_request), $name, $dload, $sep, $config, $mix, true);
+ if (sizeof($temp))
+ $record["data"] = $temp;
+ }
+ $output[] = $record;
+ $index++;
+ }
+ if ($usemix) $this->unmix($config, $mix);
+ return $output;
+ }
+
+}
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/tools.php b/codebase/connector/tools.php
new file mode 100644
index 0000000..9383c75
--- /dev/null
+++ b/codebase/connector/tools.php
@@ -0,0 +1,267 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+/*! Class which allows to assign|fire events.
+*/
+class EventMaster{
+ private $events;//!< hash of event handlers
+ private $master;
+ private static $eventsStatic=array();
+
+ /*! constructor
+ */
+ function __construct(){
+ $this->events=array();
+ $this->master = false;
+ }
+ /*! Method check if event with such name already exists.
+ @param name
+ name of event, case non-sensitive
+ @return
+ true if event with such name registered, false otherwise
+ */
+ public function exist($name){
+ $name=strtolower($name);
+ return (isset($this->events[$name]) && sizeof($this->events[$name]));
+ }
+ /*! Attach custom code to event.
+
+ Only on event handler can be attached in the same time. If new event handler attached - old will be detached.
+
+ @param name
+ name of event, case non-sensitive
+ @param method
+ function which will be attached. You can use array(class, method) if you want to attach the method of the class.
+ */
+ public function attach($name,$method=false){
+ //use class for event handling
+ if ($method === false){
+ $this->master = $name;
+ return;
+ }
+ //use separate functions
+ $name=strtolower($name);
+ if (!array_key_exists($name,$this->events))
+ $this->events[$name]=array();
+ $this->events[$name][]=$method;
+ }
+
+ public static function attach_static($name, $method){
+ $name=strtolower($name);
+ if (!array_key_exists($name,EventMaster::$eventsStatic))
+ EventMaster::$eventsStatic[$name]=array();
+ EventMaster::$eventsStatic[$name][]=$method;
+ }
+
+ public static function trigger_static($name, $method){
+ $arg_list = func_get_args();
+ $name=strtolower(array_shift($arg_list));
+
+ if (isset(EventMaster::$eventsStatic[$name]))
+ foreach(EventMaster::$eventsStatic[$name] as $method){
+ if (is_array($method) && !method_exists($method[0],$method[1]))
+ throw new Exception("Incorrect method assigned to event: ".$method[0].":".$method[1]);
+ if (!is_array($method) && !function_exists($method))
+ throw new Exception("Incorrect function assigned to event: ".$method);
+ call_user_func_array($method, $arg_list);
+ }
+ return true;
+ }
+
+ /*! Detach code from event
+ @param name
+ name of event, case non-sensitive
+ */
+ public function detach($name){
+ $name=strtolower($name);
+ unset($this->events[$name]);
+ }
+ /*! Trigger event.
+ @param name
+ name of event, case non-sensitive
+ @param data
+ value which will be provided as argument for event function,
+ you can provide multiple data arguments, method accepts variable number of parameters
+ @return
+ true if event handler was not assigned , result of event hangler otherwise
+ */
+ public function trigger($name,$data){
+ $arg_list = func_get_args();
+ $name=strtolower(array_shift($arg_list));
+
+ if (isset($this->events[$name]))
+ foreach($this->events[$name] as $method){
+ if (is_array($method) && !method_exists($method[0],$method[1]))
+ throw new Exception("Incorrect method assigned to event: ".$method[0].":".$method[1]);
+ if (!is_array($method) && !function_exists($method))
+ throw new Exception("Incorrect function assigned to event: ".$method);
+ call_user_func_array($method, $arg_list);
+ }
+
+ if ($this->master !== false)
+ if (method_exists($this->master, $name))
+ call_user_func_array(array($this->master, $name), $arg_list);
+
+ return true;
+ }
+}
+
+/*! Class which handles access rules.
+**/
+class AccessMaster{
+ private $rules,$local;
+ /*! constructor
+
+ Set next access right to "allowed" by default : read, insert, update, delete
+ Basically - all common data operations allowed by default
+ */
+ function __construct(){
+ $this->rules=array("read" => true, "insert" => true, "update" => true, "delete" => true);
+ $this->local=true;
+ }
+ /*! change access rule to "allow"
+ @param name
+ name of access right
+ */
+ public function allow($name){
+ $this->rules[$name]=true;
+ }
+ /*! change access rule to "deny"
+
+ @param name
+ name of access right
+ */
+ public function deny($name){
+ $this->rules[$name]=false;
+ }
+
+ /*! change all access rules to "deny"
+ */
+ public function deny_all(){
+ $this->rules=array();
+ }
+
+ /*! check access rule
+
+ @param name
+ name of access right
+ @return
+ true if access rule allowed, false otherwise
+ */
+ public function check($name){
+ if ($this->local){
+ /*!
+ todo
+ add referrer check, to prevent access from remote points
+ */
+ }
+ if (!isset($this->rules[$name]) || !$this->rules[$name]){
+ return false;
+ }
+ return true;
+ }
+}
+
+/*! Controls error and debug logging.
+ Class designed to be used as static object.
+**/
+class LogMaster{
+ private static $_log=false;//!< logging mode flag
+ private static $_output=false;//!< output error infor to client flag
+ private static $session="";//!< all messages generated for current request
+
+ /*! convert array to string representation ( it is a bit more readable than var_dump )
+
+ @param data
+ data object
+ @param pref
+ prefix string, used for formating, optional
+ @return
+ string with array description
+ */
+ private static function log_details($data,$pref=""){
+ if (is_array($data)){
+ $str=array("");
+ foreach($data as $k=>$v)
+ array_push($str,$pref.$k." => ".LogMaster::log_details($v,$pref."\t"));
+ return implode("\n",$str);
+ }
+ return $data;
+ }
+ /*! put record in log
+
+ @param str
+ string with log info, optional
+ @param data
+ data object, which will be added to log, optional
+ */
+ public static function log($str="",$data=""){
+ if (LogMaster::$_log){
+ $message = $str.LogMaster::log_details($data)."\n\n";
+ LogMaster::$session.=$message;
+ error_log($message,3,LogMaster::$_log);
+ }
+ }
+
+ /*! get logs for current request
+ @return
+ string, which contains all log messages generated for current request
+ */
+ public static function get_session_log(){
+ return LogMaster::$session;
+ }
+
+ /*! error handler, put normal php errors in log file
+
+ @param errn
+ error number
+ @param errstr
+ error description
+ @param file
+ error file
+ @param line
+ error line
+ @param context
+ error cntext
+ */
+ public static function error_log($errn,$errstr,$file,$line,$context){
+ LogMaster::log($errstr." at ".$file." line ".$line);
+ }
+
+ /*! exception handler, used as default reaction on any error - show execution log and stop processing
+
+ @param exception
+ instance of Exception
+ */
+ public static function exception_log($exception){
+ LogMaster::log("!!!Uncaught Exception\nCode: " . $exception->getCode() . "\nMessage: " . $exception->getMessage());
+ if (LogMaster::$_output){
+ echo "<pre><xmp>\n";
+ echo LogMaster::get_session_log();
+ echo "\n</xmp></pre>";
+ }
+ die();
+ }
+
+ /*! enable logging
+
+ @param name
+ path to the log file, if boolean false provided as value - logging will be disabled
+ @param output
+ flag of client side output, if enabled - session log will be sent to client side in case of an error.
+ */
+ public static function enable_log($name,$output=false){
+ LogMaster::$_log=$name;
+ LogMaster::$_output=$output;
+ if ($name){
+ set_error_handler(array("LogMaster","error_log"),E_ALL);
+ set_exception_handler(array("LogMaster","exception_log"));
+ LogMaster::log("\n\n====================================\nLog started, ".date("d/m/Y h:i:s")."\n====================================");
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/tree_connector.php b/codebase/connector/tree_connector.php
new file mode 100644
index 0000000..6383ff7
--- /dev/null
+++ b/codebase/connector/tree_connector.php
@@ -0,0 +1,229 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+/*! DataItem class for Tree component
+**/
+
+class TreeDataItem extends DataItem{
+ private $im0;//!< image of closed folder
+ private $im1;//!< image of opened folder
+ private $im2;//!< image of leaf item
+ private $check;//!< checked state
+ private $kids=-1;//!< checked state
+ private $attrs;//!< collection of custom attributes
+
+ function __construct($data,$config,$index){
+ parent::__construct($data,$config,$index);
+
+ $this->im0=false;
+ $this->im1=false;
+ $this->im2=false;
+ $this->check=false;
+ $this->attrs = array();
+ }
+ /*! get id of parent record
+
+ @return
+ id of parent record
+ */
+ function get_parent_id(){
+ return $this->data[$this->config->relation_id["name"]];
+ }
+ /*! get state of items checkbox
+
+ @return
+ state of item's checkbox as int value, false if state was not defined
+ */
+ function get_check_state(){
+ return $this->check;
+ }
+ /*! set state of item's checkbox
+
+ @param value
+ int value, 1 - checked, 0 - unchecked, -1 - third state
+ */
+ function set_check_state($value){
+ $this->check=$value;
+ }
+
+ /*! return count of child items
+ -1 if there is no info about childs
+ @return
+ count of child items
+ */
+ function has_kids(){
+ return $this->kids;
+ }
+ /*! sets count of child items
+ @param value
+ count of child items
+ */
+ function set_kids($value){
+ $this->kids=$value;
+ }
+
+ /*! set custom attribute
+
+ @param name
+ name of the attribute
+ @param value
+ new value of the attribute
+ */
+ function set_attribute($name, $value){
+ switch($name){
+ case "id":
+ $this->set_id($value);
+ break;
+ case "text":
+ $this->data[$this->config->text[0]["name"]]=$value;
+ break;
+ case "checked":
+ $this->set_check_state($value);
+ break;
+ case "im0":
+ $this->im0=$value;
+ break;
+ case "im1":
+ $this->im1=$value;
+ break;
+ case "im2":
+ $this->im2=$value;
+ break;
+ case "child":
+ $this->set_kids($value);
+ break;
+ default:
+ $this->attrs[$name]=$value;
+ }
+ }
+
+
+ /*! assign image for tree's item
+
+ @param img_folder_closed
+ image for item, which represents folder in closed state
+ @param img_folder_open
+ image for item, which represents folder in opened state, optional
+ @param img_leaf
+ image for item, which represents leaf item, optional
+ */
+ function set_image($img_folder_closed,$img_folder_open=false,$img_leaf=false){
+ $this->im0=$img_folder_closed;
+ $this->im1=$img_folder_open?$img_folder_open:$img_folder_closed;
+ $this->im2=$img_leaf?$img_leaf:$img_folder_closed;
+ }
+ /*! return self as XML string, starting part
+ */
+ function to_xml_start(){
+ if ($this->skip) return "";
+
+ $str1="<item id='".$this->get_id()."' text='".$this->xmlentities($this->data[$this->config->text[0]["name"]])."' ";
+ if ($this->has_kids()==true) $str1.="child='".$this->has_kids()."' ";
+ if ($this->im0) $str1.="im0='".$this->im0."' ";
+ if ($this->im1) $str1.="im1='".$this->im1."' ";
+ if ($this->im2) $str1.="im2='".$this->im2."' ";
+ if ($this->check) $str1.="checked='".$this->check."' ";
+ foreach ($this->attrs as $key => $value)
+ $str1.=$key."='".$this->xmlentities($value)."' ";
+ $str1.=">";
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $str1.="<userdata name='".$key."'><![CDATA[".$value."]]></userdata>";
+
+ return $str1;
+ }
+ /*! return self as XML string, ending part
+ */
+ function to_xml_end(){
+ if ($this->skip) return "";
+ return "</item>";
+ }
+
+}
+
+require_once("filesystem_item.php");
+
+/*! Connector for the dhtmlxtree
+**/
+class TreeConnector extends Connector{
+ protected $parent_name = 'id';
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ * @param render_type
+ * name of class which will provides data rendering
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false, $render_type=false){
+ if (!$item_type) $item_type="TreeDataItem";
+ if (!$data_type) $data_type="TreeDataProcessor";
+ if (!$render_type) $render_type="TreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ //parse GET scoope, all operations with incoming request must be done here
+ public function parse_request(){
+ parent::parse_request();
+
+ if (isset($_GET[$this->parent_name]))
+ $this->request->set_relation($_GET[$this->parent_name]);
+ else
+ $this->request->set_relation("0");
+
+ $this->request->set_limit(0,0); //netralize default reaction on dyn. loading mode
+ }
+
+ /*! renders self as xml, starting part
+ */
+ public function xml_start(){
+ $attributes = "";
+ foreach($this->attributes as $k=>$v)
+ $attributes .= " ".$k."='".$v."'";
+
+ return "<tree id='".$this->request->get_relation()."'".$attributes.">";
+ }
+
+ /*! renders self as xml, ending part
+ */
+ public function xml_end(){
+ return "</tree>";
+ }
+}
+
+
+class TreeDataProcessor extends DataProcessor{
+
+ function __construct($connector,$config,$request){
+ parent::__construct($connector,$config,$request);
+ $request->set_relation(false);
+ }
+
+ /*! convert incoming data name to valid db name
+ converts c0..cN to valid field names
+ @param data
+ data name from incoming request
+ @return
+ related db_name
+ */
+ function name_data($data){
+ if ($data=="tr_pid")
+ return $this->config->relation_id["db_name"];
+ if ($data=="tr_text")
+ return $this->config->text[0]["db_name"];
+ return $data;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/treedatagroup_connector.php b/codebase/connector/treedatagroup_connector.php
new file mode 100644
index 0000000..336915a
--- /dev/null
+++ b/codebase/connector/treedatagroup_connector.php
@@ -0,0 +1,89 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("data_connector.php");
+
+class TreeDataGroupConnector extends TreeDataConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$render_type) $render_type="GroupRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ /*! if not isset $_GET[id] then it's top level
+ */
+ protected function set_relation() {
+ if (!isset($_GET[$this->parent_name])) $this->request->set_relation(false);
+ }
+
+ /*! if it's first level then distinct level
+ * else select by parent
+ */
+ protected function get_resource() {
+ $resource = null;
+ if (isset($_GET[$this->parent_name]))
+ $resource = $this->sql->select($this->request);
+ else
+ $resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);
+ return $resource;
+ }
+
+
+ /*! renders self as xml, starting part
+ */
+ public function xml_start(){
+ if (isset($_GET[$this->parent_name])) {
+ return "<data parent='".$_GET[$this->parent_name].$this->render->get_postfix()."'>";
+ } else {
+ return "<data parent='0'>";
+ }
+ }
+
+}
+
+
+
+
+class JSONTreeDataGroupConnector extends JSONTreeDataConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$render_type) $render_type="JSONGroupRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ /*! if not isset $_GET[id] then it's top level
+ */
+ protected function set_relation() {
+ if (!isset($_GET[$this->parent_name])) $this->request->set_relation(false);
+ }
+
+ /*! if it's first level then distinct level
+ * else select by parent
+ */
+ protected function get_resource() {
+ $resource = null;
+ if (isset($_GET[$this->parent_name]))
+ $resource = $this->sql->select($this->request);
+ else
+ $resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);
+ return $resource;
+ }
+
+
+ /*! renders self as xml, starting part
+ */
+ public function xml_start(){
+ if (isset($_GET[$this->parent_name])) {
+ return "<data parent='".$_GET[$this->parent_name].$this->render->get_postfix()."'>";
+ } else {
+ return "<data parent='0'>";
+ }
+ }
+
+}
+
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/treedatamultitable_connector.php b/codebase/connector/treedatamultitable_connector.php
new file mode 100644
index 0000000..8dba8c6
--- /dev/null
+++ b/codebase/connector/treedatamultitable_connector.php
@@ -0,0 +1,91 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("data_connector.php");
+
+class TreeDataMultitableConnector extends TreeDataConnector{
+
+ protected $parent_name = 'parent';
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$data_type) $data_type="TreeDataProcessor";
+ if (!$render_type) $render_type="MultitableTreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ public function render(){
+ $this->dload = true;
+ return parent::render();
+ }
+
+ /*! sets relation for rendering */
+ protected function set_relation() {
+ if (!isset($_GET[$this->parent_name]))
+ $this->request->set_relation(false);
+ }
+
+ public function xml_start(){
+ if (isset($_GET[$this->parent_name])) {
+ return "<data parent='".$this->render->level_id($_GET[$this->parent_name], $this->render->get_level() - 1)."'>";
+ } else {
+ return "<data parent='0'>";
+ }
+ }
+
+ /*! set maximum level of tree
+ @param max_level
+ maximum level
+ */
+ public function setMaxLevel($max_level) {
+ $this->render->set_max_level($max_level);
+ }
+
+ public function get_level() {
+ return $this->render->get_level($this->parent_name);
+ }
+
+}
+
+
+
+
+
+
+class JSONTreeDataMultitableConnector extends TreeDataMultitableConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="JSONTreeCommonDataItem";
+ if (!$data_type) $data_type="CommonDataProcessor";
+ if (!$render_type) $render_type="JSONMultitableTreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ protected function output_as_xml($res){
+ $result = $this->render_set($res);
+ if ($this->simple) return $result;
+
+ $data = array();
+ if (isset($_GET['parent']))
+ $data["parent"] = $this->render->level_id($_GET[$this->parent_name], $this->render->get_level() - 1);
+ else
+ $data["parent"] = "0";
+ $data["data"] = $result;
+
+ $result = json_encode($data);
+ if ($this->as_string) return $result;
+
+ $out = new OutputWriter($result, "");
+ $out->set_type("json");
+ $this->event->trigger("beforeOutput", $this, $out);
+ $out->output("", true, $this->encoding);
+ }
+
+ public function xml_start(){
+ return '';
+ }
+}
+
+
+?> \ No newline at end of file
diff --git a/codebase/connector/treegrid_connector.php b/codebase/connector/treegrid_connector.php
new file mode 100644
index 0000000..f074879
--- /dev/null
+++ b/codebase/connector/treegrid_connector.php
@@ -0,0 +1,120 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("grid_connector.php");
+
+/*! DataItem class for TreeGrid component
+**/
+class TreeGridDataItem extends GridDataItem{
+ private $kids=-1;//!< checked state
+
+ function __construct($data,$config,$index){
+ parent::__construct($data,$config,$index);
+ $this->im0=false;
+ }
+ /*! return id of parent record
+
+ @return
+ id of parent record
+ */
+ function get_parent_id(){
+ return $this->data[$this->config->relation_id["name"]];
+ }
+ /*! assign image to treegrid's item
+ longer description
+ @param img
+ relative path to the image
+ */
+ function set_image($img){
+ $this->set_cell_attribute($this->config->text[0]["name"],"image",$img);
+ }
+
+ /*! return count of child items
+ -1 if there is no info about childs
+ @return
+ count of child items
+ */
+ function has_kids(){
+ return $this->kids;
+ }
+ /*! sets count of child items
+ @param value
+ count of child items
+ */
+ function set_kids($value){
+ $this->kids=$value;
+ if ($value)
+ $this->set_row_attribute("xmlkids",$value);
+ }
+}
+/*! Connector for dhtmlxTreeGrid
+**/
+class TreeGridConnector extends GridConnector{
+ protected $parent_name = 'id';
+
+ /*! constructor
+
+ Here initilization of all Masters occurs, execution timer initialized
+ @param res
+ db connection resource
+ @param type
+ string , which hold type of database ( MySQL or Postgre ), optional, instead of short DB name, full name of DataWrapper-based class can be provided
+ @param item_type
+ name of class, which will be used for item rendering, optional, DataItem will be used by default
+ @param data_type
+ name of class which will be used for dataprocessor calls handling, optional, DataProcessor class will be used by default.
+ * @param render_type
+ * name of class which will provides data rendering
+ */
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$item_type) $item_type="TreeGridDataItem";
+ if (!$data_type) $data_type="TreeGridDataProcessor";
+ if (!$render_type) $render_type="TreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ /*! process treegrid specific options in incoming request */
+ public function parse_request(){
+ parent::parse_request();
+
+ if (isset($_GET[$this->parent_name]))
+ $this->request->set_relation($_GET[$this->parent_name]);
+ else
+ $this->request->set_relation("0");
+
+ $this->request->set_limit(0,0); //netralize default reaction on dyn. loading mode
+ }
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ return "<rows parent='".$this->request->get_relation()."'>";
+ }
+}
+
+/*! DataProcessor class for Grid component
+**/
+class TreeGridDataProcessor extends GridDataProcessor{
+
+ function __construct($connector,$config,$request){
+ parent::__construct($connector,$config,$request);
+ $request->set_relation(false);
+ }
+
+ /*! convert incoming data name to valid db name
+ converts c0..cN to valid field names
+ @param data
+ data name from incoming request
+ @return
+ related db_name
+ */
+ function name_data($data){
+
+ if ($data=="gr_pid")
+ return $this->config->relation_id["name"];
+ else return parent::name_data($data);
+ }
+}
+?> \ No newline at end of file
diff --git a/codebase/connector/treegridgroup_connector.php b/codebase/connector/treegridgroup_connector.php
new file mode 100644
index 0000000..cd8fdf2
--- /dev/null
+++ b/codebase/connector/treegridgroup_connector.php
@@ -0,0 +1,46 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("treegrid_connector.php");
+
+class TreeGridGroupConnector extends TreeGridConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$render_type) $render_type="GroupRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ /*! if not isset $_GET[id] then it's top level
+ */
+ protected function set_relation() {
+ if (!isset($_GET[$this->parent_name])) $this->request->set_relation(false);
+ }
+
+ /*! if it's first level then distinct level
+ * else select by parent
+ */
+ protected function get_resource() {
+ $resource = null;
+ if (isset($_GET[$this->parent_name]))
+ $resource = $this->sql->select($this->request);
+ else
+ $resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);
+ return $resource;
+ }
+
+
+ /*! renders self as xml, starting part
+ */
+ protected function xml_start(){
+ if (isset($_GET[$this->parent_name])) {
+ return "<rows parent='".$_GET[$this->parent_name].$this->render->get_postfix()."'>";
+ } else {
+ return "<rows parent='0'>";
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/treegridmultitable_connector.php b/codebase/connector/treegridmultitable_connector.php
new file mode 100644
index 0000000..c380ef6
--- /dev/null
+++ b/codebase/connector/treegridmultitable_connector.php
@@ -0,0 +1,70 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("treegrid_connector.php");
+
+class TreeGridMultitableConnector extends TreeGridConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ $data_type="TreeGridMultitableDataProcessor";
+ if (!$render_type) $render_type="MultitableTreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ $this->render->set_separator("%23");
+ }
+
+ public function render(){
+ $this->dload = true;
+ return parent::render();
+ }
+
+ /*! sets relation for rendering */
+ protected function set_relation() {
+ if (!isset($_GET['id']))
+ $this->request->set_relation(false);
+ }
+
+ public function xml_start(){
+ if (isset($_GET['id'])) {
+ return "<rows parent='".$this->render->level_id($_GET['id'], $this->get_level() - 1)."'>";
+ } else {
+ return "<rows parent='0'>";
+ }
+ }
+
+ /*! set maximum level of tree
+ @param max_level
+ maximum level
+ */
+ public function setMaxLevel($max_level) {
+ $this->render->set_max_level($max_level);
+ }
+
+ public function get_level() {
+ return $this->render->get_level($this->parent_name);
+ }
+
+
+}
+
+
+class TreeGridMultitableDataProcessor extends DataProcessor {
+
+ function name_data($data){
+ if ($data=="gr_pid")
+ return $this->config->relation_id["name"];
+ if ($data=="gr_id")
+ return $this->config->id["name"];
+ preg_match('/^c([%\d]+)$/', $data, $data_num);
+ if (!isset($data_num[1])) return $data;
+ $data_num = $data_num[1];
+ if (isset($this->config->data[$data_num]["db_name"])) {
+ return $this->config->data[$data_num]["db_name"];
+ }
+ return $data;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/treegroup_connector.php b/codebase/connector/treegroup_connector.php
new file mode 100644
index 0000000..5266d0b
--- /dev/null
+++ b/codebase/connector/treegroup_connector.php
@@ -0,0 +1,46 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("tree_connector.php");
+
+class TreeGroupConnector extends TreeConnector{
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$render_type) $render_type="GroupRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ /*! if not isset $_GET[id] then it's top level
+ */
+ protected function set_relation() {
+ if (!isset($_GET[$this->parent_name])) $this->request->set_relation(false);
+ }
+
+ /*! if it's first level then distinct level
+ * else select by parent
+ */
+ protected function get_resource() {
+ $resource = null;
+ if (isset($_GET[$this->parent_name]))
+ $resource = $this->sql->select($this->request);
+ else
+ $resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);
+ return $resource;
+ }
+
+
+ /*! renders self as xml, starting part
+ */
+ public function xml_start(){
+ if (isset($_GET[$this->parent_name])) {
+ return "<tree id='".$_GET[$this->parent_name].$this->render->get_postfix()."'>";
+ } else {
+ return "<tree id='0'>";
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/treemultitable_connector.php b/codebase/connector/treemultitable_connector.php
new file mode 100644
index 0000000..09bb19b
--- /dev/null
+++ b/codebase/connector/treemultitable_connector.php
@@ -0,0 +1,51 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("tree_connector.php");
+
+class TreeMultitableConnector extends TreeConnector{
+
+ protected $parent_name = 'id';
+
+ public function __construct($res,$type=false,$item_type=false,$data_type=false,$render_type=false){
+ if (!$data_type) $data_type="TreeDataProcessor";
+ if (!$render_type) $render_type="MultitableTreeRenderStrategy";
+ parent::__construct($res,$type,$item_type,$data_type,$render_type);
+ }
+
+ public function render(){
+ $this->dload = true;
+ return parent::render();
+ }
+
+ /*! sets relation for rendering */
+ protected function set_relation() {
+ if (!isset($_GET[$this->parent_name]))
+ $this->request->set_relation(false);
+ }
+
+ public function xml_start(){
+ if (isset($_GET[$this->parent_name])) {
+ return "<tree id='".($this->render->level_id($_GET[$this->parent_name], $this->get_level() - 1))."'>";
+ } else {
+ return "<tree id='0'>";
+ }
+ }
+
+ /*! set maximum level of tree
+ @param max_level
+ maximum level
+ */
+ public function setMaxLevel($max_level) {
+ $this->render->set_max_level($max_level);
+ }
+
+ public function get_level() {
+ return $this->render->get_level($this->parent_name);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/update.php b/codebase/connector/update.php
new file mode 100644
index 0000000..dacc211
--- /dev/null
+++ b/codebase/connector/update.php
@@ -0,0 +1,266 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+
+/*! DataItemUpdate class for realization Optimistic concurrency control
+ Wrapper for DataItem object
+ It's used during outputing updates instead of DataItem object
+ Create wrapper for every data item with update information.
+*/
+class DataItemUpdate extends DataItem {
+
+
+ /*! constructor
+ @param data
+ hash of data
+ @param config
+ DataConfig object
+ @param index
+ index of element
+ */
+ public function __construct($data,$config,$index,$type){
+ $this->config=$config;
+ $this->data=$data;
+ $this->index=$index;
+ $this->skip=false;
+ $this->child = new $type($data, $config, $index);
+ }
+
+ /*! returns parent_id (for Tree and TreeGrid components)
+ */
+ public function get_parent_id(){
+ if (method_exists($this->child, 'get_parent_id')) {
+ return $this->child->get_parent_id();
+ } else {
+ return '';
+ }
+ }
+
+
+ /*! generate XML on the data hash base
+ */
+ public function to_xml(){
+ $str= "<update ";
+ $str .= 'status="'.$this->data['type'].'" ';
+ $str .= 'id="'.$this->data['dataId'].'" ';
+ $str .= 'parent="'.$this->get_parent_id().'"';
+ $str .= '>';
+ $str .= $this->child->to_xml();
+ $str .= '</update>';
+ return $str;
+ }
+
+ /*! return starting tag for XML string
+ */
+ public function to_xml_start(){
+ $str="<update ";
+ $str .= 'status="'.$this->data['type'].'" ';
+ $str .= 'id="'.$this->data['dataId'].'" ';
+ $str .= 'parent="'.$this->get_parent_id().'"';
+ $str .= '>';
+ $str .= $this->child->to_xml_start();
+ return $str;
+ }
+
+ /*! return ending tag for XML string
+ */
+ public function to_xml_end(){
+ $str = $this->child->to_xml_end();
+ $str .= '</update>';
+ return $str;
+ }
+
+ /*! returns false for outputing only current item without child items
+ */
+ public function has_kids(){
+ return false;
+ }
+
+ /*! sets count of child items
+ @param value
+ count of child items
+ */
+ public function set_kids($value){
+ if (method_exists($this->child, 'set_kids')) {
+ $this->child->set_kids($value);
+ }
+ }
+
+ /*! sets attribute for item
+ */
+ public function set_attribute($name, $value){
+ if (method_exists($this->child, 'set_attribute')) {
+ LogMaster::log("setting attribute: \nname = {$name}\nvalue = {$value}");
+ $this->child->set_attribute($name, $value);
+ } else {
+ LogMaster::log("set_attribute method doesn't exists");
+ }
+ }
+}
+
+
+class DataUpdate{
+
+ protected $table; //!< table , where actions are stored
+ protected $url; //!< url for notification service, optional
+ protected $sql; //!< DB wrapper object
+ protected $config; //!< DBConfig object
+ protected $request; //!< DBRequestConfig object
+ protected $event;
+ protected $item_class;
+ protected $demu;
+
+ //protected $config;//!< DataConfig instance
+ //protected $request;//!< DataRequestConfig instance
+
+ /*! constructor
+
+ @param connector
+ Connector object
+ @param config
+ DataConfig object
+ @param request
+ DataRequestConfig object
+ */
+ function __construct($sql, $config, $request, $table, $url){
+ $this->config= $config;
+ $this->request= $request;
+ $this->sql = $sql;
+ $this->table=$table;
+ $this->url=$url;
+ $this->demu = false;
+ }
+
+ public function set_demultiplexor($path){
+ $this->demu = $path;
+ }
+
+ public function set_event($master, $name){
+ $this->event = $master;
+ $this->item_class = $name;
+ }
+
+ private function select_update($actions_table, $join_table, $id_field_name, $version, $user) {
+ $sql = "SELECT * FROM {$actions_table}";
+ $sql .= " LEFT OUTER JOIN {$join_table} ON ";
+ $sql .= "{$actions_table}.DATAID = {$join_table}.{$id_field_name} ";
+ $sql .= "WHERE {$actions_table}.ID > '{$version}' AND {$actions_table}.USER <> '{$user}'";
+ return $sql;
+ }
+
+ private function get_update_max_version() {
+ $sql = "SELECT MAX(id) as VERSION FROM {$this->table}";
+ $res = $this->sql->query($sql);
+ $data = $this->sql->get_next($res);
+
+ if ($data == false || $data['VERSION'] == false)
+ return 1;
+ else
+ return $data['VERSION'];
+ }
+
+ private function log_update_action($actions_table, $dataId, $status, $user) {
+ $sql = "INSERT INTO {$actions_table} (DATAID, TYPE, USER) VALUES ('{$dataId}', '{$status}', '{$user}')";
+ $this->sql->query($sql);
+ if ($this->demu)
+ file_get_contents($this->demu);
+ }
+
+
+
+
+ /*! records operations in actions_table
+ @param action
+ DataAction object
+ */
+ public function log_operations($action) {
+ $type = $this->sql->escape($action->get_status());
+ $dataId = $this->sql->escape($action->get_new_id());
+ $user = $this->sql->escape($this->request->get_user());
+ if ($type!="error" && $type!="invalid" && $type !="collision") {
+ $this->log_update_action($this->table, $dataId, $type, $user);
+ }
+ }
+
+
+ /*! return action version in XMl format
+ */
+ public function get_version() {
+ $version = $this->get_update_max_version();
+ return "<userdata name='version'>".$version."</userdata>";
+ }
+
+
+ /*! adds action version in output XML as userdata
+ */
+ public function version_output($conn, $out) {
+ $out->add($this->get_version());
+ }
+
+
+ /*! create update actions in XML-format and sends it to output
+ */
+ public function get_updates() {
+ $sub_request = new DataRequestConfig($this->request);
+ $version = $this->request->get_version();
+ $user = $this->request->get_user();
+
+ $sub_request->parse_sql($this->select_update($this->table, $this->request->get_source(), $this->config->id['db_name'], $version, $user));
+ $sub_request->set_relation(false);
+
+ $output = $this->render_set($this->sql->select($sub_request), $this->item_class);
+
+ ob_clean();
+ header("Content-type:text/xml");
+
+ echo $this->updates_start();
+ echo $this->get_version();
+ echo $output;
+ echo $this->updates_end();
+ }
+
+
+ protected function render_set($res, $name){
+ $output="";
+ $index=0;
+ while ($data=$this->sql->get_next($res)){
+ $data = new DataItemUpdate($data,$this->config,$index, $name);
+ $this->event->trigger("beforeRender",$data);
+ $output.=$data->to_xml();
+ $index++;
+ }
+ return $output;
+ }
+
+ /*! returns update start string
+ */
+ protected function updates_start() {
+ $start = '<updates>';
+ return $start;
+ }
+
+ /*! returns update end string
+ */
+ protected function updates_end() {
+ $start = '</updates>';
+ return $start;
+ }
+
+ /*! checks if action version given by client is deprecated
+ @param action
+ DataAction object
+ */
+ public function check_collision($action) {
+ $version = $this->sql->escape($this->request->get_version());
+ //$user = $this->sql->escape($this->request->get_user());
+ $last_version = $this->get_update_max_version();
+ if (($last_version > $version)&&($action->get_status() == 'update')) {
+ $action->error();
+ $action->set_status('collision');
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/codebase/connector/xss_filter.php b/codebase/connector/xss_filter.php
new file mode 100644
index 0000000..ed0a309
--- /dev/null
+++ b/codebase/connector/xss_filter.php
@@ -0,0 +1,199 @@
+<?php
+
+// +----------------------------------------------------------------------+
+// | Copyright (c) 2001-2008 Liip AG |
+// +----------------------------------------------------------------------+
+// | Licensed under the Apache License, Version 2.0 (the "License"); |
+// | you may not use this file except in compliance with the License. |
+// | You may obtain a copy of the License at |
+// | http://www.apache.org/licenses/LICENSE-2.0 |
+// | Unless required by applicable law or agreed to in writing, software |
+// | distributed under the License is distributed on an "AS IS" BASIS, |
+// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+// | implied. See the License for the specific language governing |
+// | permissions and limitations under the License. |
+// +----------------------------------------------------------------------+
+// | Author: Christian Stocker <christian.stocker@liip.ch> |
+// +----------------------------------------------------------------------+
+
+
+//original name was lx_externalinput_clean
+//renamed to prevent possible conflicts
+class dhx_externalinput_clean {
+ // this basic clean should clean html code from
+ // lot of possible malicious code for Cross Site Scripting
+ // use it whereever you get external input
+
+ // you can also set $filterOut to some use html cleaning, but I don't know of any code, which could
+ // exploit that. But if you want to be sure, set it to eg. array("Tidy","Dom");
+ static function basic($string, $filterIn = array("Tidy","Dom","Striptags"), $filterOut = "none") {
+ $string = self::tidyUp($string, $filterIn);
+ $string = str_replace(array("&amp;", "&lt;", "&gt;"), array("&amp;amp;", "&amp;lt;", "&amp;gt;"), $string);
+
+ // fix &entitiy\n;
+ $string = preg_replace('#(&\#*\w+)[\x00-\x20]+;#u', "$1;", $string);
+ $string = preg_replace('#(&\#x*)([0-9A-F]+);*#iu', "$1$2;", $string);
+
+ $string = html_entity_decode($string, ENT_COMPAT, "UTF-8");
+
+ // remove any attribute starting with "on" or xmlns
+ $string = preg_replace('#(<[^>]+[\x00-\x20\"\'\/])(on|xmlns)[^>]*>#iUu', "$1>", $string);
+
+ // remove javascript: and vbscript: protocol
+ $string = preg_replace('#([a-z]*)[\x00-\x20\/]*=[\x00-\x20\/]*([\`\'\"]*)[\x00-\x20\/]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2nojavascript...', $string);
+ $string = preg_replace('#([a-z]*)[\x00-\x20\/]*=[\x00-\x20\/]*([\`\'\"]*)[\x00-\x20\/]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2novbscript...', $string);
+ $string = preg_replace('#([a-z]*)[\x00-\x20\/]*=[\x00-\x20\/]*([\`\'\"]*)[\x00-\x20\/]*-moz-binding[\x00-\x20]*:#Uu', '$1=$2nomozbinding...', $string);
+ $string = preg_replace('#([a-z]*)[\x00-\x20\/]*=[\x00-\x20\/]*([\`\'\"]*)[\x00-\x20\/]*data[\x00-\x20]*:#Uu', '$1=$2nodata...', $string);
+
+ //remove any style attributes, IE allows too much stupid things in them, eg.
+ //<span style="width: expression(alert('Ping!'));"></span>
+ // and in general you really don't want style declarations in your UGC
+
+ $string = preg_replace('#(<[^>]+[\x00-\x20\"\'\/])style[^>]*>#iUu', "$1>", $string);
+
+ //remove namespaced elements (we do not need them...)
+ $string = preg_replace('#</*\w+:\w[^>]*>#i', "", $string);
+
+ //remove really unwanted tags
+ do {
+ $oldstring = $string;
+ $string = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i', "", $string);
+ } while ($oldstring != $string);
+
+ return self::tidyUp($string, $filterOut);
+ }
+
+ static function tidyUp($string, $filters) {
+ if (is_array($filters)) {
+ foreach ($filters as $filter) {
+ $return = self::tidyUpWithFilter($string, $filter);
+ if ($return !== false) {
+ return $return;
+ }
+ }
+ } else {
+ $return = self::tidyUpWithFilter($string, $filters);
+ }
+ // if no filter matched, use the Striptags filter to be sure.
+ if ($return === false) {
+ return self::tidyUpModuleStriptags($string);
+ } else {
+ return $return;
+ }
+ }
+
+ static private function tidyUpWithFilter($string, $filter) {
+ if (is_callable(array("self", "tidyUpModule" . $filter))) {
+ return call_user_func(array("self", "tidyUpModule" . $filter), $string);
+ }
+ return false;
+ }
+
+ static private function tidyUpModuleStriptags($string) {
+
+ return strip_tags($string);
+ }
+
+ static private function tidyUpModuleNone($string) {
+ return $string;
+ }
+
+ static private function tidyUpModuleDom($string) {
+ $dom = new domdocument();
+ @$dom->loadHTML("<html><body>" . $string . "</body></html>");
+ $string = '';
+ foreach ($dom->documentElement->firstChild->childNodes as $child) {
+ $string .= $dom->saveXML($child);
+ }
+ return $string;
+ }
+
+ static private function tidyUpModuleTidy($string) {
+ if (class_exists("tidy")) {
+ $tidy = new tidy();
+ $tidyOptions = array("output-xhtml" => true,
+ "show-body-only" => true,
+ "clean" => true,
+ "wrap" => "350",
+ "indent" => true,
+ "indent-spaces" => 1,
+ "ascii-chars" => false,
+ "wrap-attributes" => false,
+ "alt-text" => "",
+ "doctype" => "loose",
+ "numeric-entities" => true,
+ "drop-proprietary-attributes" => true,
+ "enclose-text" => false,
+ "enclose-block-text" => false
+
+ );
+ $tidy->parseString($string, $tidyOptions, "utf8");
+ $tidy->cleanRepair();
+ return (string) $tidy;
+ } else {
+ return false;
+ }
+ }
+}
+
+define("DHX_SECURITY_SAFETEXT", 1);
+define("DHX_SECURITY_SAFEHTML", 2);
+define("DHX_SECURITY_TRUSTED", 3);
+
+class ConnectorSecurity{
+ static public $xss = DHX_SECURITY_SAFETEXT;
+ static public $security_key = false;
+ static public $security_var = "dhx_security";
+
+ static private $filterClass = null;
+ static function filter($value, $mode = false){
+ if ($mode === false)
+ $mode = ConnectorSecurity::$xss;
+
+ if ($mode == DHX_SECURITY_TRUSTED)
+ return $value;
+ if ($mode == DHX_SECURITY_SAFETEXT)
+ return filter_var($value, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
+ if ($mode == DHX_SECURITY_SAFEHTML){
+ if (ConnectorSecurity::$filterClass == null)
+ ConnectorSecurity::$filterClass = new dhx_externalinput_clean();
+ return ConnectorSecurity::$filterClass->basic($value);
+ }
+ throw new Error("Invalid security mode:"+$mode);
+ }
+
+ static function CSRF_detected(){
+ LogMaster::log("[SECURITY] Possible CSRF attack detected", array(
+ "referer" => $_SERVER["HTTP_REFERER"],
+ "remote" => $_SERVER["REMOTE_ADDR"]
+ ));
+ LogMaster::log("Request data", $_POST);
+ die();
+ }
+ static function checkCSRF($edit){
+ if (ConnectorSecurity::$security_key){
+ if (!isset($_SESSION))
+ @session_start();
+
+ if ($edit=== true){
+ if (!isset($_POST[ConnectorSecurity::$security_var]))
+ return ConnectorSecurity::CSRF_detected();
+ $master_key = $_SESSION[ConnectorSecurity::$security_var];
+ $update_key = $_POST[ConnectorSecurity::$security_var];
+ if ($master_key != $update_key)
+ return ConnectorSecurity::CSRF_detected();
+
+ return "";
+ }
+ //data loading
+ if (!array_key_exists(ConnectorSecurity::$security_var,$_SESSION)){
+ $_SESSION[ConnectorSecurity::$security_var] = md5(uniqid());
+ }
+
+ return $_SESSION[ConnectorSecurity::$security_var];
+ }
+
+ return "";
+ }
+
+} \ No newline at end of file
diff --git a/codebase/dhtmlxscheduler.css b/codebase/dhtmlxscheduler.css
new file mode 100644
index 0000000..e8b4a88
--- /dev/null
+++ b/codebase/dhtmlxscheduler.css
@@ -0,0 +1,6 @@
+@charset "UTF-8";
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+.dhtmlx_message_area{position:fixed;right:5px;width:250px;z-index:1000;}.dhtmlx-info{min-width:120px;padding:4px 4px 4px 20px;font-family:Tahoma;z-index:10000;margin:5px;margin-bottom:10px;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;}.dhtmlx-info.hidden{height:0;padding:0;border-width:0;margin:0;overflow:hidden;}.dhtmlx_modal_box{overflow:hidden;display:inline-block;min-width:300px;width:300px;text-align:center;position:fixed;background-color:#fff;background:-webkit-linear-gradient(top,#fff 1%,#d0d0d0 99%);background:-moz-linear-gradient(top,#fff 1%,#d0d0d0 99%);box-shadow:0 0 14px #888;font-family:Tahoma;z-index:20000;border-radius:6px;border:1px solid #fff;}.dhtmlx_popup_title{border-top-left-radius:5px;border-top-right-radius:5px;border-width:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC);background-image:-webkit-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 97%,#393939 97%);background-image:-moz-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 97%,#393939 97%);}.dhtmlx-info,.dhtmlx_popup_button,.dhtmlx_button{user-select:none;-webkit-user-select:none;-moz-user-select:-moz-none;cursor:pointer;}.dhtmlx_popup_text{overflow:hidden;}.dhtmlx_popup_controls{border-radius:6px;padding:5px;}.dhtmlx_popup_button,.dhtmlx_button{height:30px;line-height:30px;display:inline-block;margin:0 5px;border-radius:6px;color:#FFF;}.dhtmlx_popup_button{min-width:120px;}div.dhx_modal_cover{background-color:#000;cursor:default;filter:alpha(opacity = 20);opacity:.2;position:fixed;z-index:19999;left:0;top:0;width:100%;height:100%;border:none;zoom:1;}.dhtmlx-info img,.dhtmlx_modal_box img{float:left;margin-right:20px;}.dhtmlx-alert-error .dhtmlx_popup_title,.dhtmlx-confirm-error .dhtmlx_popup_title{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC);}.dhtmlx-alert-error,.dhtmlx-confirm-error{border:1px solid #f00;}.dhtmlx_button,.dhtmlx_popup_button{box-shadow:0 0 4px #888;border:1px solid #838383;}.dhtmlx_button input,.dhtmlx_popup_button div{border:1px solid #FFF;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=);background-image:-webkit-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 99%);background-image:-moz-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 99%);border-radius:6px;font-size:15px;font-weight:normal;-moz-box-sizing:content-box;box-sizing:content-box;color:#fff;padding:0;margin:0;vertical-align:top;height:28px;line-height:28px;}.dhtmlx_button input:focus,.dhtmlx_button input:active,.dhtmlx_popup_button div:active,.dhtmlx_popup_button div:focus{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==);background-image:-webkit-linear-gradient(top,#707070 1%,#4c4c4c 99%);background-image:-moz-linear-gradient(top,#707070 1%,#4c4c4c 99%);}.dhtmlx_popup_title{color:#fff;text-shadow:1px 1px #000;height:40px;line-height:40px;font-size:20px;}.dhtmlx_popup_text{margin:15px 15px 5px 15px;font-size:14px;color:#000;min-height:30px;border-radius:6px;}.dhtmlx-info,.dhtmlx-error{font-size:14px;color:#000;box-shadow:0 0 10px #888;padding:0;background-color:#FFF;border-radius:3px;border:1px solid #fff;}.dhtmlx-info div{padding:5px 10px 5px 10px;background-color:#fff;border-radius:3px;border:1px solid #B8B8B8;}.dhtmlx-error{background-color:#d81b1b;border:1px solid #ff3c3c;box-shadow:0 0 10px #000;}.dhtmlx-error div{background-color:#d81b1b;border:1px solid #940000;color:#FFF;}.dhx_cal_container{background-color:#C2D5FC;font-family:Tahoma;font-size:8pt;position:relative;overflow:hidden;}.dhx_cal_container div{-moz-user-select:none;-moz-user-select:-moz-none;}.dhx_cal_navline{height:20px;position:absolute;z-index:3;width:750px;color:#2F3A48;}.dhx_cal_navline div{position:absolute;top:2px;white-space:nowrap;}.dhx_cal_navline .dhx_cal_date{font-weight:600;left:210px;padding-top:1px;}.dhx_cal_button .dhx_left_bg{width:1px;overflow:hidden;height:17px;z-index:20;top:0;}.dhx_cal_prev_button{background-image:url(imgs/buttons.png);background-position:0 0;width:29px;height:17px;left:50px;cursor:pointer;}.dhx_cal_next_button{background-image:url(imgs/buttons.png);background-position:-30px 0;width:29px;height:17px;left:80px;cursor:pointer;}.dhx_cal_today_button{background-image:url(imgs/buttons.png);background-position:-60px 0;width:75px;height:17px;left:112px;cursor:pointer;text-align:center;text-decoration:underline;}.dhx_cal_tab{width:59px;height:19px;text-align:center;text-decoration:underline;padding-top:2px;cursor:pointer;background-color:#D8E1EA;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;}.dhx_cal_tab.active{text-decoration:none;cursor:default;font-weight:bold;border:1px dotted #586A7E;border-bottom:0;background-color:#C2D5FC;}.dhx_cal_header{position:absolute;left:10px;top:23px;width:750px;border-top:1px dotted #8894A3;border-right:1px dotted #8894A3;z-index:2;overflow:hidden;color:#2F3A48;}.dhx_cal_data{-webkit-tap-highlight-color:transparent;border-top:1px dotted #8894A3;position:absolute;top:44px;width:600px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;}.dhx_cal_data{-ms-touch-action:pan-y;}.dhx_cal_event,.dhx_cal_event_line,.dhx_cal_event_clear{-ms-touch-action:none;}.dhx_scale_bar{position:absolute;text-align:center;background-color:#C2D5FC;padding-top:3px;border-left:1px dotted #586A7E;}.dhx_scale_holder{position:absolute;border-right:1px dotted #586A7E;background-image:url(imgs/databg.png);}.dhx_scale_holder_now{position:absolute;border-right:1px dotted #586A7E;background-image:url(imgs/databg_now.png);}.dhx_scale_hour{height:41px;width:50px;border-bottom:1px dotted #8894A3;background-color:#C2D5FC;text-align:center;line-height:40px;color:#586A7E;overflow:hidden;}.dhx_month_head{background-color:#EBEFF4;color:#2F3A48;height:18px;padding-right:5px;padding-top:3px;text-align:right;border-right:1px dotted #586A7E;}.dhx_month_body{border-right:1px dotted #586A7E;border-bottom:1px dotted #586A7E;background-color:#FFF;}.dhx_now .dhx_month_body{background-color:#E2EDFF;}.dhx_after .dhx_month_body,.dhx_before .dhx_month_body{background-color:#ECECEC;}.dhx_after .dhx_month_head,.dhx_before .dhx_month_head{background-color:#E2E3E6;color:#94A6BB;}.dhx_now .dhx_month_head{background-color:#D1DEF4;font-weight:bold;}.dhx_cal_drag{position:absolute;z-index:9999;background-color:#FFE763;border:1px solid #B7A543;opacity:.5;filter:alpha(opacity=50);}.dhx_loading{position:absolute;width:128px;height:15px;background-image:url(imgs/loading.gif);z-index:9999;}.dhx_multi_day_icon,.dhx_multi_day{background-color:#E1E6FF;background-repeat:no-repeat;border-right:1px dotted #8894A3;}.dhx_multi_day{position:absolute;border-top:1px dotted #8894A3;}.dhx_multi_day_icon,.dhx_multi_day_icon_small{background-position:center center;background-color:#E1E6FF;background-repeat:no-repeat;border-bottom:1px dotted #8894A3;border-right:1px dotted #8894A3;}.dhx_multi_day_icon{background-image:url(imgs/clock_big.gif);}.dhx_multi_day_icon_small{background-image:url(imgs/clock_small.gif);}.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container{background-color:#d0e5ff;}.dhx_scale_hour_border,.dhx_month_body_border,.dhx_scale_bar_border,.dhx_month_head_border{border-left:1px dotted #8894A3;}.dhx_cal_navline .dhx_cal_export{width:18px;height:18px;margin:2px;cursor:pointer;top:0;}.dhx_cal_navline .dhx_cal_export.pdf{left:2px;background-image:url('imgs/export_pdf.png');}.dhx_cal_navline .dhx_cal_export.ical{left:24px;background-image:url('imgs/export_ical.png');}.dhx_cal_event .dhx_header,.dhx_cal_event .dhx_title,.dhx_cal_event .dhx_body,.dhx_cal_event .dhx_footer{background-color:#FFE763;border:1px solid #B7A543;color:#887A2E;overflow:hidden;width:100%;font-family:Tahoma;font-size:8pt;}.dhx_move_denied .dhx_cal_event .dhx_header,.dhx_move_denied .dhx_cal_event .dhx_title{cursor:default;}.dhx_cal_event .dhx_header{height:1px;margin-left:1px;border-width:1px 1px 0 1px;cursor:pointer;}.dhx_cal_event .dhx_title{height:12px;border-width:0 1px 1px 1px;border-bottom-style:dotted;font-size:7pt;font-weight:bold;text-align:center;background-position:right;background-repeat:no-repeat;cursor:pointer;}.dhx_cal_event .dhx_body,.dhx_cal_event.dhx_cal_select_menu .dhx_body{border-width:0 1px 1px 1px;padding:5px;}.dhx_resize_denied,.dhx_resize_denied .dhx_event_resize{cursor:default!important;}.dhx_cal_event .dhx_event_resize{cursor:s-resize;}.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_select_menu_footer{height:1px;margin-left:2px;border-width:0 1px 1px 1px;position:relative;}.dhx_cal_event_line{background-color:#FFE763;border:1px solid #B7A543;border-radius:3px;font-family:Tahoma;font-size:8pt;height:13px;padding-left:10px;color:#887A2E;cursor:pointer;overflow:hidden;}.dhx_cal_event_clear{font-family:Tahoma;font-size:8pt;height:13px;padding-left:2px;color:#887A2E;white-space:nowrap;overflow:hidden;cursor:pointer;}.dhx_in_move{background-color:#FFFF80;}div.dhx_cal_editor{background-color:#FFE763;border:1px solid #B7A543;border-top-style:dotted;z-index:999;position:absolute;overflow:hidden;}textarea.dhx_cal_editor{width:100%;height:100%;border:0 solid black;margin:0;padding:0;overflow:auto;}div.dhx_menu_head{background-image:url(imgs/controls.gif);background-position:0 -43px;width:10px;height:10px;margin-left:5px;margin-top:1px;border:none;cursor:default;}div.dhx_menu_icon{background-image:url(imgs/controls.gif);width:20px;height:20px;margin-left:-5px;margin-top:0;border:none;cursor:pointer;}div.icon_details{background-position:0 0;}div.icon_edit{background-position:-22px 0;}div.icon_save{background-position:-84px -1px;}div.icon_cancel{background-position:-62px 0;}div.icon_delete{background-position:-42px 0;}.dhx_month_link{position:absolute;box-sizing:border-box;-moz-box-sizing:border-box;text-align:right;cursor:pointer;padding-right:10px;}.dhx_month_link a{color:blue;}.dhx_month_link a:hover{text-decoration:underline;}.dhx_global_tip{font-family:Tahoma,Helvetica;text-align:center;font-size:20px;position:fixed;top:60px;right:20px;background-color:rgba(255,255,255,0.7);color:#000;z-index:10000;padding:20px 30px;width:190px;}.dhx_global_tip div{font-size:30px;}@media(-moz-touch-enabled){.dhx_cal_container{user-select:none;-moz-user-select:none;}}.dhx_unselectable,.dhx_unselectable div{-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none;}.dhx_cal_light{-webkit-tap-highlight-color:transparent;background-color:#FFE763;border-radius:5px;font-family:Tahoma;font-size:8pt;border:1px solid #B7A64B;color:#887A2E;position:absolute;z-index:10001;width:580px;height:300px;box-shadow:5px 5px 5px #888;}.dhx_cal_light_wide{width:650px;}.dhx_mark{position:relative;top:3px;background-image:url('./imgs/controls.gif');background-position:0 -43px;padding-left:10px;}.dhx_ie6 .dhx_mark{background-position:6px -41px;}.dhx_cal_light select{font-family:Tahoma;font-size:8pt;color:#887A2E;padding:2px;margin:0;}.dhx_cal_ltitle{padding:2px 0 2px 5px;overflow:hidden;white-space:nowrap;}.dhx_cal_ltitle span{white-space:nowrap;}.dhx_cal_lsection{background-color:#DBCF8C;color:#FFF4B5;font-weight:bold;padding:5px 0 3px 10px;}.dhx_section_time{background-color:#DBCF8C;white-space:nowrap;}.dhx_cal_lsection .dhx_fullday{float:right;margin-right:5px;color:#887A2E;font-size:12px;font-weight:normal;line-height:20px;vertical-align:top;cursor:pointer;}.dhx_cal_lsection{font-size:18px;font-family:Arial;}.dhx_cal_ltext{padding:2px 0 2px 10px;overflow:hidden;}.dhx_cal_ltext textarea{background-color:#FFF4B5;overflow:auto;border:none;color:#887A2E;height:100%;width:100%;outline:none!important;resize:none;}.dhx_time{font-weight:bold;}.dhx_cal_light .dhx_title{padding-left:10px;}.dhx_cal_larea{border:1px solid #DCC43E;background-color:#FFF4B5;overflow:hidden;margin-left:3px;width:572px;height:1px;}.dhx_btn_set{padding:5px 10px 0 10px;float:left;}.dhx_btn_set div{float:left;height:21px;line-height:21px;vertical-align:middle;cursor:pointer;}.dhx_save_btn{background-image:url('./imgs/controls.gif');background-position:-84px 0;width:21px;}.dhx_cancel_btn{background-image:url('./imgs/controls.gif');background-position:-63px 0;width:20px;}.dhx_delete_btn{background-image:url('./imgs/controls.gif');background-position:-42px 0;width:20px;}.dhx_cal_cover{width:100%;height:100%;position:absolute;z-index:10000;top:0;left:0;background-color:black;opacity:.1;filter:alpha(opacity=10);}.dhx_custom_button{padding:0 3px 0 3px;color:#887A2E;font-family:Tahoma;font-size:8pt;background-color:#FFE763;font-weight:normal;margin-right:5px;margin-top:0;cursor:pointer;}.dhx_custom_button div{cursor:pointer;float:left;height:21px;line-height:21px;vertical-align:middle;}.dhx_cal_light_wide .dhx_cal_larea{border-top-width:0;}.dhx_cal_light_wide .dhx_cal_lsection{border:0;float:left;text-align:right;width:100px;height:20px;font-size:16px;padding:5px 0 0 10px;}.dhx_cal_light_wide .dhx_wrap_section{border-top:1px solid #DBCF8C;position:relative;background-color:#DBCF8C;overflow:hidden;}.dhx_cal_light_wide .dhx_section_time{padding-top:2px!important;height:20px!important;}.dhx_section_time{text-align:center;}.dhx_cal_light_wide .dhx_cal_larea{width:730px;}.dhx_cal_light_wide{width:738px;}.dhx_cal_light_wide .dhx_section_time{background:transparent;}.dhx_cal_light_wide .dhx_cal_checkbox label{padding-left:0;}.dhx_cal_wide_checkbox input{margin-top:8px;margin-left:14px;}.dhx_cal_light input{font-family:Tahoma;font-size:8pt;color:#887A2E;}.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{float:none;margin-right:0;color:#FFF4B5;font-weight:bold;font-size:16px;font-family:Arial;cursor:pointer;}.dhx_custom_button{float:right;height:21px;width:90px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;}.dhx_cal_light_wide .dhx_custom_button{position:absolute;top:0;right:0;margin-top:2px;}.dhx_cal_light_wide .dhx_repeat_right{margin-right:55px;}.dhx_minical_popup{position:absolute;z-index:10100;width:251px;height:175px;}.dhx_scale_bar_header{position:absolute;border-bottom:1px dotted #8894A3;width:100%;}.dhx_expand_icon{position:absolute;top:0;right:0;background-image:url(./imgs/collapse_expand_icon.gif);width:18px;height:18px;cursor:pointer;background-position:0 18px;z-index:16;}.dhx_scheduler_agenda .dhx_cal_data{background-image:url(./imgs/databg.png);}.dhx_agenda_area{width:100%;overflow-y:auto;background-image:url(./imgs/databg.png);}.dhx_agenda_line{height:21px;clear:both;overflow:hidden;}.dhx_agenda_line div{float:left;width:188px;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_agenda_area .dhx_agenda_line div{border-right:0 dotted #8894A3;}.dhx_v_border{position:absolute;left:187px;top:0;border-right:1px dotted #8894A3;width:1px;height:100%;}.dhx_agenda_line .dhx_event_icon{width:20px;border-width:0;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_agenda_line span{padding-left:5px;line-height:21px;}.dhx_year_body{border-left:1px dotted #586A7E;}.dhx_year_week{position:relative;}.dhx_scale_bar_last{border-right:1px dotted #586A7E;}.dhx_year_month{height:18px;padding-top:3px;border:1px dotted #586A7E;text-align:center;vertical-align:middle;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head,.dhx_year_body .dhx_before .dhx_month_head a,.dhx_year_body .dhx_after .dhx_month_head a{color:#E2E3E6!important;}.dhx_year_body .dhx_month_body{height:0;overflow:hidden;}.dhx_month_head.dhx_year_event{background-color:#FFE763;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head{cursor:default;}.dhx_year_tooltip{border:1px solid #BBB;background-image:url(./imgs/databg.png);position:absolute;z-index:9998;width:300px;height:auto;font-family:Tahoma;font-size:8pt;overflow:hidden;}.dhx_tooltip_line{line-height:20px;height:20px;overflow:hidden;}.dhx_tooltip_line .dhx_event_icon{width:20px;height:20px;padding-right:10px;float:left;border-width:0;position:relative;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_tooltip_date{float:left;width:auto;padding-left:5px;text-align:center;}.dhx_text_disabled{color:#887A2E;font-family:Tahoma;font-size:8pt;}.dhx_mini_calendar{-moz-box-shadow:5px 5px 5px #888;-khtml-box-shadow:5px 5px 5px #888;-moz-user-select:-moz-none;-webkit-user-select:none;-user-select:none;}.dhx_mini_calendar .dhx_month_head{cursor:pointer;}.dhx_mini_calendar .dhx_calendar_click{background-color:#C2D5FC;}.dhx_cal_navline div.dhx_minical_icon{width:18px;height:18px;left:190px;top:1px;cursor:pointer;background-image:url(./imgs/calendar.gif);}.dhx_matrix_scell{height:100%;}.dhx_matrix_cell,.dhx_matrix_scell{overflow:hidden;text-align:center;vertical-align:middle;border-bottom:1px dotted #8894A3;border-right:1px dotted #8894A3;}.dhx_matrix_cell{background-color:white;}.dhx_matrix_line{overflow:hidden;}.dhx_matrix_cell div,.dhx_matrix_scell div{overflow:hidden;text-align:center;height:auto;}.dhx_cal_lsection .dhx_readonly{font-size:9pt;font-size:8pt;padding:2px;color:#887A2E;}.dhx_cal_event_line .dhx_event_resize{cursor:w-resize;background:url(./imgs/resize_dots.png) repeat-y;position:absolute;top:0;width:4px;}.dhx_event_resize_start{left:0;}.dhx_event_resize_end{right:0;}.dhx_matrix_scell.folder,.dhx_data_table.folder .dhx_matrix_cell{background-color:#969394;cursor:pointer;}.dhx_matrix_scell .dhx_scell_level0{padding-left:5px;}.dhx_matrix_scell .dhx_scell_level1{padding-left:20px;}.dhx_matrix_scell .dhx_scell_level2{padding-left:35px;}.dhx_matrix_scell .dhx_scell_level3{padding-left:50px;}.dhx_matrix_scell .dhx_scell_level4{padding-left:65px;}.dhx_matrix_scell.folder{font-weight:bold;text-align:left;}.dhx_matrix_scell.folder .dhx_scell_expand{float:left;width:10px;padding-right:3px;}.dhx_matrix_scell.folder .dhx_scell_name{float:left;width:auto;}.dhx_matrix_scell.item .dhx_scell_name{padding-left:15px;text-align:left;}.dhx_data_table.folder .dhx_matrix_cell{border-right:0;}.dhx_section_timeline{overflow:hidden;padding:4px 0 2px 10px;}.dhx_section_timeline select{width:552px;}.dhx_map_area{width:100%;height:100%;overflow-y:auto;overflow-x:hidden;background-image:url(./imgs/databg.png);}.dhx_map_line .dhx_event_icon{width:20px;border-width:0;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_map_line{height:21px;clear:both;overflow:hidden;}.dhx_map{position:absolute;}.dhx_map_line div{float:left;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .headline_description{float:left;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .dhx_map_description{float:left;border-right:0 dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .headline_date,.dhx_map_line .headline_description{border-left:0;}.dhx_map_line .line_description{float:left;border-right:1px dotted #8894A3;text-align:left;padding-left:5px;line-height:21px;overflow:hidden;}.dhx_map_line.highlight{background-color:#C4C5CC;}.dhx_map_area .dhx_map_line div{border-right:0 dotted #8894A3;}.dhtmlXTooltip.tooltip{-moz-box-shadow:3px 3px 3px #888;-webkit-box-shadow:3px 3px 3px #888;-o-box-shadow:3px 3px 3px #888;box-shadow:3px 3px 3px #888;filter:progid:DXImageTransform.Microsoft.Shadow(color='#888888',Direction=135,Strength=5);background-color:white;border-left:1px dotted #887A2E;border-top:1px dotted #887A2E;color:#887A2E;cursor:default;padding:10px;position:absolute;z-index:500;font-family:Tahoma;font-size:8pt;}.dhx_cal_checkbox label{padding-left:5px;}.dhx_cal_light .radio{padding:2px 0 2px 10px;}.dhx_cal_light .radio input,.dhx_cal_light .radio label{line-height:15px;}.dhx_cal_light .radio input{vertical-align:middle;margin:0;padding:0;}.dhx_cal_light .radio label{vertical-align:middle;padding-right:10px;}.dhx_cal_light .combo{padding:4px;}.dhx_cal_light_wide .dhx_combo_box{width:608px!important;left:10px;}.dhx_wa_column{float:left;}.dhx_wa_column_last .dhx_wa_day_cont{border-left:1px dotted #8894A3;}.dhx_wa_scale_bar{font-family:Tahoma;padding-left:10px;font-size:11px;border-top:1px dotted #8894A3;border-bottom:1px dotted #8894A3;}.dhx_wa_day_data{background-color:#FCFEFC;overflow-y:auto;}.dhx_wa_ev_body{border-bottom:1px dotted #789;font-size:12px;padding:5px 0 5px 7px;}.dhx_wa_dnd{font-family:Tahoma;position:absolute;padding-right:7px;color:#887AE2!important;background-color:#FFE763!important;border:1px solid #B7A543;}.dhx_cal_event_selected{background-color:#9cc1db;color:white;}.dhx_second_scale_bar{border-bottom:1px dotted #586A7E;padding-top:2px;}.dhx_cal_header div div{border-left:1px dotted #8894A3;}.dhx_grid_area{width:100%;height:100%;overflow-y:auto;background-color:#FCFEFC;}.dhx_grid_area table{border-collapse:collapse;border-spacing:0;width:100%;table-layout:fixed;}.dhx_grid_area td{table-layout:fixed;text-align:center;}.dhx_grid_line{height:21px;clear:both;overflow:hidden;}.dhx_grid_line div{float:left;cursor:default;padding-top:0;padding-bottom:0;text-align:center;line-height:21px;overflow:hidden;}.dhx_grid_area td,.dhx_grid_line div{padding-left:8px;padding-right:8px;}.dhx_grid_area tr.dhx_grid_event{height:21px;overflow:hidden;margin:0 0 1px 0;}.dhx_grid_area tr.dhx_grid_event td{border-bottom:1px solid #ECEEF4;}.dhx_grid_area tr.dhx_grid_event:nth-child(2n+1) td,.dhx_grid_area tr.dhx_grid_event:nth-child(2n) td{border-bottom-width:0;border-bottom-style:none;}.dhx_grid_area tr.dhx_grid_event:nth-child(2n){background-color:#ECEEF4;;}.dhx_grid_area .dhx_grid_dummy{table-layout:auto;margin:0!important;padding:0!important;}.dhx_grid_v_border{position:absolute;border-right:1px solid #A4BED4;width:1px;height:100%;}.dhx_grid_event_selected{background-color:#9cc1db!important;color:white!important;}.dhx_grid_sort_desc .dhx_grid_view_sort{background-position:0 -55px;}.dhx_grid_sort_asc .dhx_grid_view_sort{background-position:0 -66px;}.dhx_grid_view_sort{width:10px;height:10px;position:absolute;border:none!important;top:5px;background-repeat:no-repeat;background-image:url(./imgs/images.png);}.dhx_marked_timespan{position:absolute;width:100%;}.dhx_time_block{position:absolute;width:100%;background:silver;opacity:.4;filter:alpha(opacity=40);z-index:1;}.dhx_time_block_reset{opacity:1;filter:alpha(opacity=100);}.dhx_scheduler_month .dhx_marked_timespan{display:none;}.dhx_mini_calendar .dhx_marked_timespan{display:none;}.dhx_now_time{width:100%;border-bottom:2px dotted red;z-index:1;}.dhx_scheduler_month .dhx_now_time{border-bottom:0;border-left:2px dotted red;}.dhx_matrix_now_time{border-left:2px dotted red;z-index:1;}.dhx_cal_quick_info{border:2px solid #888;border-radius:5px;position:absolute;z-index:300;background-color:#8e99ae;background-color:rgba(98,107,127,0.5);padding-left:7px;width:300px;transition:left .5s ease,right .5s;-moz-transition:left .5s ease,right .5s;-webkit-transition:left .5s ease,right .5s;-o-transition:left .5s ease,right .5s;}.dhx_no_animate{transition:none;-moz-transition:none;-webkit-transition:none;-o-transition:none;}.dhx_cal_quick_info.dhx_qi_left .dhx_qi_big_icon{float:right;}.dhx_cal_qi_title{padding:5px 0 10px 5px;color:#FFF;letter-spacing:1px;}.dhx_cal_qi_tdate{font-size:14px;}.dhx_cal_qi_tcontent{font-size:18px;font-weight:bold;}.dhx_cal_qi_content{border:1px solid #888;background-color:#fefefe;padding:16px 8px;font-size:14px;color:#444;width:275px;overflow:hidden;}.dhx_qi_big_icon{border-radius:3px;color:#444;margin:5px 9px 5px 0;min-width:60px;line-height:20px;vertical-align:middle;padding:5px 10px 5px 5px;cursor:pointer;background-color:#fefefe;border-bottom:1px solid #666;border-right:1px solid #666;float:left;}.dhx_cal_qi_controls div{float:left;height:20px;text-align:center;line-height:20px;}.dhx_qi_big_icon .dhx_menu_icon{margin:0 8px 0 0;}div.dhx_form_repeat input.radio{margin:-4px 0 0 -4px!ie;}div.dhx_form_repeat input.checkbox{margin:0 0 0 -4px!ie;}.dhx_form_repeat,.dhx_form_repeat input{padding:0;margin:0;padding-left:5px;font-family:Tahoma,Verdana;font-size:11px;line-height:24px;}.dhx_form_repeat{overflow:hidden;height:0;background-color:#FFF4B5;}.dhx_cal_light_wide .dhx_form_repeat{background-color:transparent;}.dhx_repeat_center,.dhx_repeat_left{height:115px;padding:10px 0 10px 10px;float:left;}.dhx_repeat_left{width:95px;}.dhx_repeat_center{width:335px;margin-top:12px;}.dhx_repeat_divider{float:left;height:115px;border-left:1px dotted #DCC43E;width:1px;}.dhx_repeat_right{float:right;height:115px;width:160px;padding:10px 3px 10px 10px;margin-top:7px;}input.dhx_repeat_text{height:16px;width:27px;margin:0 4px 0 4px;line-height:18px;padding:0 0 0 2px;}.dhx_form_repeat select{height:20px;width:87px;padding:0 0 0 2px;margin:0 4px 0 4px;}input.dhx_repeat_date{height:18px;width:80px;padding:0 0 0 2px;margin:0 4px 0 4px;background-repeat:no-repeat;background-position:64px 0;border:1px #7f9db9 solid;line-height:18px;}input.dhx_repeat_radio{margin-right:4px;}input.dhx_repeat_checkbox{margin:4px 4px 0 0;}.dhx_repeat_days td{padding-right:5px;}.dhx_repeat_days label{font-size:10px;}.dhx_custom_button{width:90px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;}.dhx_custom_button_recurring{background-image:url(./imgs/but_repeat.gif);background-position:-5px 20px;width:20px;margin-right:10px;}.dhx_cal_light_rec{width:640px;}.dhx_cal_light_rec .dhx_cal_larea{width:632px;}.dhx_cal_light_rec.dhx_cal_light_wide{width:816px;}.dhx_cal_light_rec.dhx_cal_light_wide .dhx_cal_larea{width:808px;}.dhx_cal_event .dhx_title{border-width:1px 1px 0 1px;padding-top:1px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;font-family:arial;font-weight:bold;font-size:12px;}.dhx_cal_event .dhx_body,.dhx_cal_event.dhx_cal_select_menu .dhx_body{padding-bottom:8px;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;}.dhx_cal_event .dhx_header,.dhx_cal_event.dhx_cal_select_menu .dhx_footer{display:none;}.dhx_cal_event .dhx_footer{height:5px;border:0;margin-top:-6px;background:url(imgs_dhx_terrace/resizing.png) no-repeat center center;}.dhx_cal_event .dhx_header,.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_body,.dhx_cal_event .dhx_title{background-color:#1796b0;border-color:transparent;color:white;}div.dhx_cal_editor{border:1px solid transparent;background-color:#1796b0;}.dhx_cal_editor{font-size:12px;font-family:Arial,sans-serif;}div.dhx_menu_head,div.dhx_menu_icon{background-image:url(imgs_dhx_terrace/controls.png);}.dhx_cal_event_line{border:1px solid transparent;background-color:#1796b0;color:white;height:17px;line-height:17px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}.dhx_cal_event_line_start{-webkit-border-top-left-radius:9px;-webkit-border-bottom-left-radius:9px;-moz-border-radius-topleft:9px;-moz-border-radius-bottomleft:9px;border-top-left-radius:9px;border-bottom-left-radius:9px;}.dhx_cal_event_line_end{-webkit-border-top-right-radius:9px;-webkit-border-bottom-right-radius:9px;-moz-border-radius-topright:9px;-moz-border-radius-bottomright:9px;border-top-right-radius:9px;border-bottom-right-radius:9px;}.dhx_cal_event .dhx_body,.dhx_cal_event_line{font-size:12px;font-family:Arial,sans-serif;}.dhx_cal_container{background-color:white;}.dhx_cal_data{border-top:1px solid #CECECE;}.dhx_scale_holder{background-image:url(imgs_dhx_terrace/databg.png);border-right:1px solid #CECECE;}.dhx_scale_holder_now{background-image:url(imgs_dhx_terrace/databg_now.png);border-right:1px solid #CECECE;}.dhx_scale_hour{border-bottom:1px solid #CECECE;background-color:white;font:11px/44px Arial;color:#767676;}.dhx_cal_header{border:1px solid #CECECE;border-left:0;border-bottom:0;}.dhx_scale_bar{border-left:1px solid #CECECE;}.dhx_scale_bar{font:11px/16px Arial;color:#767676;padding-top:2px;background-color:white;}.dhx_cal_navline div{top:14px;}.dhx_cal_tab,.dhx_cal_date,.dhx_cal_today_button,.dhx_cal_prev_button,.dhx_cal_next_button{color:#454544;height:30px;line-height:30px;background:none;border:1px solid #CECECE;}.dhx_cal_navline .dhx_cal_date{border:0;font-size:18px;font-weight:normal;font-family:arial;width:100%;top:14px;text-align:center;position:absolute;left:0;z-index:-1;}.dhx_cal_today_button{color:#747473;left:auto;right:123px;background:none;text-decoration:none;width:80px;font-size:12px;font-weight:bold;font-family:arial;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}.dhx_cal_prev_button,.dhx_cal_next_button{left:auto;width:46px;}.dhx_cal_prev_button{right:61px;background:url(imgs_dhx_terrace/arrow_left.png) no-repeat center center;-webkit-border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-bottomleft:5px;border-top-left-radius:5px;border-bottom-left-radius:5px;}.dhx_cal_next_button{right:14px;background:url(imgs_dhx_terrace/arrow_right.png) no-repeat center center;-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;}.dhx_cal_tab{color:#747473;width:60px;padding-top:0;text-decoration:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-weight:bold;font-family:arial;font-size:12px;}.dhx_cal_tab.active{background-color:#F0EDE7;color:#454544;border:1px solid #CECECE;text-shadow:0 1px 0 white;}.dhx_cal_tab_first{-webkit-border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-bottomleft:5px;border-top-left-radius:5px;border-bottom-left-radius:5px;}.dhx_cal_tab_last{-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;}.dhx_cal_tab_standalone{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:0 5px;}.dhx_multi_day,.dhx_multi_day_icon_small,.dhx_multi_day_icon{background-color:white;}.dhx_multi_day{border-top:1px solid #CECECE;}.dhx_multi_day_icon,.dhx_multi_day_icon_small{border-bottom:1px solid #CECECE;border-right:1px solid #CECECE;}.dhx_multi_day_icon_small{background-image:url(imgs_dhx_terrace/clock_small.gif);}.dhx_multi_day_icon{background-image:url(imgs_dhx_terrace/clock_big.gif);}.dhx_month_head,.dhx_after .dhx_month_head,.dhx_before .dhx_month_head,.dhx_after .dhx_month_body,.dhx_before .dhx_month_body{background-color:white;}.dhx_month_head{height:21px;padding-top:0;font:12px/21px Arial;color:#362d26;border-right:1px solid #CECECE;}.dhx_after .dhx_month_head,.dhx_before .dhx_month_head,.dhx_after .dhx_month_head,.dhx_before .dhx_month_head{color:#bbb;}.dhx_month_body{border-right:1px solid #CECECE;border-bottom:1px solid #CECECE;}.dhx_now .dhx_month_head,.dhx_now .dhx_month_body{background-color:#FFF3A1;font-weight:normal;}.dhx_cal_event_clear{color:#0E64A0;}.dhx_cal_larea{margin-left:0;}.dhx_cal_light_wide .dhx_cal_larea{margin-left:3px;}.dhx_cal_light_wide .dhx_wrap_section{padding:5px 0;}.dhx_cal_light,.dhx_cal_larea,.dhx_cal_lsection,.dhx_wrap_section,.dhx_cal_light_wide .dhx_wrap_section,.dhx_cal_ltext textarea{background-color:white;}.dhx_cal_lsection,.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday,.dhx_cal_lsection .dhx_fullday,.dhx_cal_light input{color:#747473;}.dhx_cal_light_wide .dhx_wrap_section{border-top:0;border-bottom:1px solid #CECECE;}.dhx_cal_larea{border:1px solid transparent;}.dhx_cal_ltext textarea,.dhx_cal_light select,.dhx_cal_light{color:#2E2E2E;}.dhx_cal_light{border:1px solid #CECECE;}.dhx_cal_light_wide .dhx_cal_lsection,.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{font-size:13px;}.dhx_section_time{background-color:transparent;}.dhx_save_btn,.dhx_cancel_btn,.dhx_delete_btn,.dhx_btn_set div:first-child{display:none;}.dhx_btn_set,.dhx_btn_set div{height:30px;padding:0 20px;line-height:30px;}.dhx_btn_set{margin:12px 0 0 0;padding:0;font-size:12px;color:#454544;font-weight:bold;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.dhx_left_btn_set{margin-left:20px;}.dhx_right_btn_set{margin-right:20px;}.dhx_save_btn_set{border:1px solid #22A1BC;color:white;text-shadow:0 -1px 0 #6F6F6F;background-color:#22A1BC;}.dhx_btn_set,.dhx_cancel_btn_set{border:1px solid #CECECE;}.dhx_delete_btn_set{border:1px solid #FF8831;background-color:#FF8831;color:white;text-shadow:0 -1px 0 #93755F;}.dhx_cal_ltitle{height:30px;line-height:30px;border-bottom:1px solid #CECECE;}.dhx_cal_ltitle span{float:left;}.dhx_cal_light .dhx_title{padding-left:13px;}.dhx_mark{display:none;}.dhx_time{padding-left:10px;}.dhx_close_icon{float:right;width:9px;height:9px;background:url(imgs_dhx_terrace/close_icon.png) no-repeat center center;padding:10px;margin-top:1px;}.dhx_cal_light_wide .dhx_cal_ltext.dhx_cal_template{line-height:22px;}.dhx_cal_ltext textarea{line-height:20px;box-sizing:border-box;-moz-box-sizing:border-box;border:1px solid #CECECE;background-color:#F9F9F9;}.dhtmlx_modal_box{background:white;width:330px;}.dhtmlx_popup_controls{padding-bottom:9px;}.dhtmlx_popup_button,.dhtmlx_popup_button:active,.dhtmlx_popup_button div,.dhtmlx_popup_button div:active{color:#444;background:white;box-shadow:none;}.dhtmlx_popup_button.dhtmlx_ok_button{border:1px solid #22A1BC;background-color:#22A1BC;}.dhtmlx_popup_button.dhtmlx_ok_button div{background:#22A1BC;border:1px solid #22A1BC;color:white;text-shadow:0 -1px 0 #6F6F6F;}.dhx_cal_container.dhx_mini_calendar{box-sizing:border-box;border:1px solid #CECECE;box-shadow:2px 2px 5px #CCC;border-radius:3px;}.dhx_mini_calendar .dhx_year_month{border:1px solid #CECECE;font-family:Arial;}.dhx_mini_calendar .dhx_month_head,.dhx_mini_calendar .dhx_year_month,.dhx_mini_calendar .dhx_month_body,.dhx_mini_calendar .dhx_scale_bar,.dhx_mini_calendar .dhx_year_body{border-color:transparent;}.dhx_mini_calendar .dhx_year_body{padding-top:1px;}.dhx_mini_calendar .dhx_scale_bar{border-width:0;}.dhx_mini_calendar .dhx_year_week{border-bottom:1px solid #CECECE;padding-top:1px;}.dhx_mini_calendar .dhx_month_head{padding-right:0;margin-right:1px;text-align:center;}.dhx_mini_calendar .dhx_cal_prev_button,.dhx_mini_calendar .dhx_cal_next_button{border:0;height:20px;}.dhx_cal_navline div.dhx_minical_icon{left:210px;top:14px;width:30px;height:30px;background:url(./imgs_dhx_terrace/calendar.gif) no-repeat;background-position:3px 5px;}.dhx_cal_event_line .dhx_event_resize{background:url(./imgs_dhx_terrace/resize_dots.png) repeat-y;}.dhx_matrix_scell,.dhx_matrix_cell{border-bottom:1px solid #CECECE;border-right:1px solid #CECECE;}.dhx_cal_header div div{border-left:1px solid #CECECE;}.dhx_matrix_scell.folder{border-right:0;}.dhx_second_scale_bar{border-bottom:1px solid #CECECE;}.dhx_repeat_divider{border-left:1px solid #CECECE;}.dhx_custom_button{background-color:white;border:1px solid #CECECE;color:#747473;}.dhx_cal_light_wide .dhx_custom_button{margin-top:6px;}.dhx_custom_button_recurring{background-image:url(./imgs_dhx_terrace/but_repeat.gif);}.dhx_v_border,.dhx_agenda_line div{border-right:1px solid #CECECE;}.dhx_year_month{border:1px solid #CECECE;}.dhx_scale_bar_last{border-right:1px solid #CECECE;}.dhx_year_body{border-left:1px solid #CECECE;}.dhx_expand_icon{top:-3px;}.dhx_scale_bar .dhx_cal_next_button,.dhx_scale_bar .dhx_cal_prev_button{width:20px;height:20px;top:0!important;border:0;}.dhx_scale_bar .dhx_cal_next_button{right:1px!important;border-left:1px solid #CECECE;}.dhx_scale_bar .dhx_cal_prev_button{left:1px!important;border-right:1px solid #CECECE;}.dhx_map_line .headline_date,.dhx_map_line .headline_description{border:0;}.dhx_map_line .headline_date{border-right:1px solid #CECECE;}.dhtmlXTooltip.tooltip{border-left:1px solid #CECECE;border-top:1px solid #CECECE;color:#747473;font-size:12px;line-height:16px;}.dhx_wa_scale_bar{border-top:1px solid #CECECE;border-bottom:1px solid #CECECE;}.dhx_wa_column_last .dhx_wa_day_cont{border-left:1px solid #CECECE;}.dhx_wa_ev_body{border-bottom:1px solid #CECECE;}.dhx_wa_scale_bar{background-color:#f0ede7;}.dhx_wa_ev_body.dhx_cal_event_selected{background-color:#fff3a1;color:#362d26;}.dhx_wa_dnd{background-color:#fddb93!important;color:#747473!important;border:1px solid #ccb177;}.dhx_text_disabled{color:#2E2E2E;}.dhx_cal_ltext .dhx_text_disabled{line-height:22px;}.dhx_grid_v_border{border-right-color:#CECECE;}.dhx_scale_hour_border,.dhx_month_body_border,.dhx_scale_bar_border,.dhx_month_head_border{border-left:1px solid #CECECE;}.dhx_cal_quick_info{background:rgba(50,50,50,0.5);}.dhx_qi_big_icon{background:#1796b0;color:white;}.dhx_cal_navline .dhx_cal_export{width:32px;height:32px;margin:2px;cursor:pointer;top:12px;}.dhx_cal_navline .dhx_cal_export.pdf{left:auto;right:249px;background-image:url('imgs_dhx_terrace/export_pdf.png');}.dhx_cal_navline .dhx_cal_export.ical{left:auto;right:210px;background-image:url('imgs_dhx_terrace/export_ical.png');}.dhx_mini_calendar{padding:5px;}.dhx_mini_calendar .dhx_year_event,.dhx_mini_calendar .dhx_calendar_click{border-radius:7px;}.dhx_mini_calendar .dhx_month_head{margin:2px 2px;}.dhx_mini_calendar .dhx_year_month{line-height:20px;height:25px;font-size:14px;}.dhx_mini_calendar .dhx_cal_prev_button{top:8px!important;}.dhx_mini_calendar .dhx_cal_next_button{top:8px!important;} \ No newline at end of file
diff --git a/codebase/dhtmlxscheduler.js b/codebase/dhtmlxscheduler.js
new file mode 100644
index 0000000..132552f
--- /dev/null
+++ b/codebase/dhtmlxscheduler.js
@@ -0,0 +1,255 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+window.dhtmlx||(dhtmlx=function(a){for(var b in a)dhtmlx[b]=a[b];return dhtmlx});
+dhtmlx.extend_api=function(a,b,c){var d=window[a];if(d)window[a]=function(a){if(a&&typeof a=="object"&&!a.tagName){var c=d.apply(this,b._init?b._init(a):arguments),g;for(g in dhtmlx)if(b[g])this[b[g]](dhtmlx[g]);for(g in a)if(b[g])this[b[g]](a[g]);else g.indexOf("on")==0&&this.attachEvent(g,a[g])}else c=d.apply(this,arguments);b._patch&&b._patch(this);return c||this},window[a].prototype=d.prototype,c&&dhtmlXHeir(window[a].prototype,c)};
+dhtmlxAjax={get:function(a,b){var c=new dtmlXMLLoaderObject(!0);c.async=arguments.length<3;c.waitCall=b;c.loadXML(a);return c},post:function(a,b,c){var d=new dtmlXMLLoaderObject(!0);d.async=arguments.length<4;d.waitCall=c;d.loadXML(a,!0,b);return d},getSync:function(a){return this.get(a,null,!0)},postSync:function(a,b){return this.post(a,b,null,!0)}};
+function dtmlXMLLoaderObject(a,b,c,d){this.xmlDoc="";this.async=typeof c!="undefined"?c:!0;this.onloadAction=a||null;this.mainObject=b||null;this.waitCall=null;this.rSeed=d||!1;return this}dtmlXMLLoaderObject.count=0;
+dtmlXMLLoaderObject.prototype.waitLoadFunction=function(a){var b=!0;return this.check=function(){if(a&&a.onloadAction!=null&&(!a.xmlDoc.readyState||a.xmlDoc.readyState==4)&&b){b=!1;dtmlXMLLoaderObject.count++;if(typeof a.onloadAction=="function")a.onloadAction(a.mainObject,null,null,null,a);if(a.waitCall)a.waitCall.call(this,a),a.waitCall=null}}};
+dtmlXMLLoaderObject.prototype.getXMLTopNode=function(a,b){if(this.xmlDoc.responseXML){var c=this.xmlDoc.responseXML.getElementsByTagName(a);c.length==0&&a.indexOf(":")!=-1&&(c=this.xmlDoc.responseXML.getElementsByTagName(a.split(":")[1]));var d=c[0]}else d=this.xmlDoc.documentElement;if(d)return this._retry=!1,d;if(!this._retry)return this._retry=!0,b=this.xmlDoc,this.loadXMLString(this.xmlDoc.responseText.replace(/^[\s]+/,""),!0),this.getXMLTopNode(a,b);dhtmlxError.throwError("LoadXML","Incorrect XML",
+[b||this.xmlDoc,this.mainObject]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(a,b){if(_isIE)this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM"),this.xmlDoc.async=this.async,this.xmlDoc.onreadystatechange=function(){},this.xmlDoc.loadXML(a);else{var c=new DOMParser;this.xmlDoc=c.parseFromString(a,"text/xml")}if(!b){if(this.onloadAction)this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall)this.waitCall(),this.waitCall=null}};
+dtmlXMLLoaderObject.prototype.loadXML=function(a,b,c,d){this.rSeed&&(a+=(a.indexOf("?")!=-1?"&":"?")+"a_dhx_rSeed="+(new Date).valueOf());this.filePath=a;this.xmlDoc=!_isIE&&window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if(this.async)this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.open(b?"POST":"GET",a,this.async);d?(this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")"),this.xmlDoc.setRequestHeader("Content-type",
+"text/xml")):b&&this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded");this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(c);this.async||(new this.waitLoadFunction(this))()};
+dtmlXMLLoaderObject.prototype.destructor=function(){return this.setXSLParamValue=this.getXMLTopNode=this.xmlNodeToJSON=this.doSerialization=this.loadXMLString=this.loadXML=this.doXSLTransToString=this.doXSLTransToObject=this.doXPathOpera=this.doXPath=this.xmlDoc=this.mainObject=this.onloadAction=this.filePath=this.rSeed=this.async=this._retry=this._getAllNamedChilds=this._filterXPath=null};
+dtmlXMLLoaderObject.prototype.xmlNodeToJSON=function(a){for(var b={},c=0;c<a.attributes.length;c++)b[a.attributes[c].name]=a.attributes[c].value;b._tagvalue=a.firstChild?a.firstChild.nodeValue:"";for(c=0;c<a.childNodes.length;c++){var d=a.childNodes[c].tagName;d&&(b[d]||(b[d]=[]),b[d].push(this.xmlNodeToJSON(a.childNodes[c])))}return b};function callerFunction(a,b){return this.handler=function(c){if(!c)c=window.event;a(c,b);return!0}}function getAbsoluteLeft(a){return getOffset(a).left}
+function getAbsoluteTop(a){return getOffset(a).top}function getOffsetSum(a){for(var b=0,c=0;a;)b+=parseInt(a.offsetTop),c+=parseInt(a.offsetLeft),a=a.offsetParent;return{top:b,left:c}}
+function getOffsetRect(a){var b=a.getBoundingClientRect(),c=document.body,d=document.documentElement,e=window.pageYOffset||d.scrollTop||c.scrollTop,f=window.pageXOffset||d.scrollLeft||c.scrollLeft,g=d.clientTop||c.clientTop||0,h=d.clientLeft||c.clientLeft||0,k=b.top+e-g,i=b.left+f-h;return{top:Math.round(k),left:Math.round(i)}}function getOffset(a){return a.getBoundingClientRect?getOffsetRect(a):getOffsetSum(a)}
+function convertStringToBoolean(a){typeof a=="string"&&(a=a.toLowerCase());switch(a){case "1":case "true":case "yes":case "y":case 1:case !0:return!0;default:return!1}}function getUrlSymbol(a){return a.indexOf("?")!=-1?"&":"?"}function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;this.dragStartObject=this.dragStartNode=this.dragNode=this.lastLanding=0;this.tempDOMM=this.tempDOMU=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this}
+dhtmlDragAndDropObject.prototype.removeDraggableItem=function(a){a.onmousedown=null;a.dragStarter=null;a.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(a,b){a.onmousedown=this.preCreateDragCopy;a.dragStarter=b;this.addDragLanding(a,b)};dhtmlDragAndDropObject.prototype.addDragLanding=function(a,b){a.dragLanding=b};
+dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(a){if(!((a||window.event)&&(a||event).button==2)){if(window.dhtmlDragAndDrop.waitDrag)return window.dhtmlDragAndDrop.waitDrag=0,document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU,document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM,!1;window.dhtmlDragAndDrop.dragNode&&window.dhtmlDragAndDrop.stopDrag(a);window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=
+document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;window.dhtmlDragAndDrop.downtime=(new Date).valueOf();a&&a.preventDefault&&a.preventDefault();return!1}};
+dhtmlDragAndDropObject.prototype.callDrag=function(a){if(!a)a=window.event;dragger=window.dhtmlDragAndDrop;if(!((new Date).valueOf()-dragger.downtime<100)){if(!dragger.dragNode)if(dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,a);if(!dragger.dragNode)return dragger.stopDrag();dragger.dragNode.onselectstart=function(){return!1};dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=
+0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()}else return dragger.stopDrag(a,!0);if(dragger.dragNode.parentNode!=window.document.body&&dragger.gldragNode){var b=dragger.gldragNode;if(dragger.gldragNode.old)b=dragger.gldragNode.old;b.parentNode.removeChild(b);var c=dragger.dragNode.pWindow;b.pWindow&&b.pWindow.dhtmlDragAndDrop.lastLanding&&b.pWindow.dhtmlDragAndDrop.lastLanding.dragLanding._dragOut(b.pWindow.dhtmlDragAndDrop.lastLanding);if(_isIE){var d=document.createElement("Div");d.innerHTML=
+dragger.dragNode.outerHTML;dragger.dragNode=d.childNodes[0]}else dragger.dragNode=dragger.dragNode.cloneNode(!0);dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);c.dhtmlDragAndDrop.dragNode=dragger.dragNode}dragger.dragNode.style.left=a.clientX+15+(dragger.fx?dragger.fx*-1:0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=a.clientY+3+(dragger.fy?dragger.fy*-1:0)+(document.body.scrollTop||
+document.documentElement.scrollTop)+"px";var e=a.srcElement?a.srcElement:a.target;dragger.checkLanding(e,a)}};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(a){if(window.name){for(var b=parent.frames[window.name].frameElement.offsetParent,c=0,d=0;b;)c+=b.offsetLeft,d+=b.offsetTop,b=b.offsetParent;if(parent.dhtmlDragAndDrop){var e=parent.dhtmlDragAndDrop.calculateFramePosition(1);c+=e.split("_")[0]*1;d+=e.split("_")[1]*1}if(a)return c+"_"+d;else this.fx=c;this.fy=d}return"0_0"};
+dhtmlDragAndDropObject.prototype.checkLanding=function(a,b){a&&a.dragLanding?(this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding),this.lastLanding=a,this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,b.clientX,b.clientY,b),this.lastLanding_scr=_isIE?b.srcElement:b.target):a&&a.tagName!="BODY"?this.checkLanding(a.parentNode,b):(this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding,b.clientX,b.clientY,b),this.lastLanding=
+0,this._onNotFound&&this._onNotFound())};
+dhtmlDragAndDropObject.prototype.stopDrag=function(a,b){dragger=window.dhtmlDragAndDrop;if(!b){dragger.stopFrameRoute();var c=dragger.lastLanding;dragger.lastLanding=null;c&&c.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,c,_isIE?event.srcElement:a.target)}dragger.lastLanding=null;dragger.dragNode&&dragger.dragNode.parentNode==document.body&&dragger.dragNode.parentNode.removeChild(dragger.dragNode);dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=
+0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(a){a&&window.dhtmlDragAndDrop.stopDrag(1,1);for(var b=0;b<window.frames.length;b++)try{window.frames[b]!=a&&window.frames[b].dhtmlDragAndDrop&&window.frames[b].dhtmlDragAndDrop.stopFrameRoute(window)}catch(c){}try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=a&&parent.dhtmlDragAndDrop.stopFrameRoute(window)}catch(d){}};
+dhtmlDragAndDropObject.prototype.initFrameRoute=function(a,b){if(a)window.dhtmlDragAndDrop.preCreateDragCopy(),window.dhtmlDragAndDrop.dragStartNode=a.dhtmlDragAndDrop.dragStartNode,window.dhtmlDragAndDrop.dragStartObject=a.dhtmlDragAndDrop.dragStartObject,window.dhtmlDragAndDrop.dragNode=a.dhtmlDragAndDrop.dragNode,window.dhtmlDragAndDrop.gldragNode=a.dhtmlDragAndDrop.dragNode,window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag,window.waitDrag=0,!_isIE&&b&&(!_isFF||_FFrv<1.8)&&window.dhtmlDragAndDrop.calculateFramePosition();
+try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=a&&parent.dhtmlDragAndDrop.initFrameRoute(window)}catch(c){}for(var d=0;d<window.frames.length;d++)try{window.frames[d]!=a&&window.frames[d].dhtmlDragAndDrop&&window.frames[d].dhtmlDragAndDrop.initFrameRoute(window,!a||b?1:0)}catch(e){}};_OperaRv=_KHTMLrv=_FFrv=_isChrome=_isMacOS=_isKHTML=_isOpera=_isIE=_isFF=!1;navigator.userAgent.indexOf("Macintosh")!=-1&&(_isMacOS=!0);navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&(_isChrome=!0);
+if(navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("Konqueror")!=-1)_KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5)),_KHTMLrv>525?(_isFF=!0,_FFrv=1.9):_isKHTML=!0;else if(navigator.userAgent.indexOf("Opera")!=-1)_isOpera=!0,_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3));else if(navigator.appName.indexOf("Microsoft")!=-1){if(_isIE=!0,(navigator.appVersion.indexOf("MSIE 8.0")!=-1||navigator.appVersion.indexOf("MSIE 9.0")!=
+-1||navigator.appVersion.indexOf("MSIE 10.0")!=-1)&&document.compatMode!="BackCompat")_isIE=8}else _isFF=!0,_FFrv=parseFloat(navigator.userAgent.split("rv:")[1]);
+dtmlXMLLoaderObject.prototype.doXPath=function(a,b,c,d){if(_isKHTML||!_isIE&&!window.XPathResult)return this.doXPathOpera(a,b);if(_isIE)return b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),b||dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]),c!=null&&b.setProperty("SelectionNamespaces","xmlns:xsl='"+c+"'"),d=="single"?b.selectSingleNode(a):b.selectNodes(a)||[];else{var e=b;b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML);b||dhtmlxError.throwError("LoadXML",
+"Incorrect XML",[b||this.xmlDoc,this.mainObject]);b.nodeName.indexOf("document")!=-1?e=b:(e=b,b=b.ownerDocument);var f=XPathResult.ANY_TYPE;if(d=="single")f=XPathResult.FIRST_ORDERED_NODE_TYPE;var g=[],h=b.evaluate(a,e,function(){return c},f,null);if(f==XPathResult.FIRST_ORDERED_NODE_TYPE)return h.singleNodeValue;for(var k=h.iterateNext();k;)g[g.length]=k,k=h.iterateNext();return g}};function w(){if(!this.catches)this.catches=[];return this}w.prototype.catchError=function(a,b){this.catches[a]=b};
+w.prototype.throwError=function(a,b,c){if(this.catches[a])return this.catches[a](a,b,c);if(this.catches.ALL)return this.catches.ALL(a,b,c);alert("Error type: "+a+"\nDescription: "+b);return null};window.dhtmlxError=new w;
+dtmlXMLLoaderObject.prototype.doXPathOpera=function(a,b){var c=a.replace(/[\/]+/gi,"/").split("/"),d=null,e=1;if(!c.length)return[];if(c[0]==".")d=[b];else if(c[0]=="")d=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(c[e].replace(/\[[^\]]*\]/g,"")),e++;else return[];for(;e<c.length;e++)d=this._getAllNamedChilds(d,c[e]);c[e-1].indexOf("[")!=-1&&(d=this._filterXPath(d,c[e-1]));return d};
+dtmlXMLLoaderObject.prototype._filterXPath=function(a,b){for(var c=[],b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,""),d=0;d<a.length;d++)a[d].getAttribute(b)&&(c[c.length]=a[d]);return c};
+dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a,b){var c=[];_isKHTML&&(b=b.toUpperCase());for(var d=0;d<a.length;d++)for(var e=0;e<a[d].childNodes.length;e++)_isKHTML?a[d].childNodes[e].tagName&&a[d].childNodes[e].tagName.toUpperCase()==b&&(c[c.length]=a[d].childNodes[e]):a[d].childNodes[e].tagName==b&&(c[c.length]=a[d].childNodes[e]);return c};function dhtmlXHeir(a,b){for(var c in b)typeof b[c]=="function"&&(a[c]=b[c]);return a}
+function dhtmlxEvent(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(a,b,c){if(!c)c=this.xslDoc;if(c.responseXML)c=c.responseXML;var d=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+a+"']",c,"http://www.w3.org/1999/XSL/Transform","single");if(d!=null)d.firstChild.nodeValue=b};
+dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(a,b){if(!a)a=this.xslDoc;if(a.responseXML)a=a.responseXML;if(!b)b=this.xmlDoc;if(b.responseXML)b=b.responseXML;if(_isIE){d=new ActiveXObject("Msxml2.DOMDocument.3.0");try{b.transformNodeToObject(a,d)}catch(c){d=b.transformNode(a)}}else{if(!this.XSLProcessor)this.XSLProcessor=new XSLTProcessor,this.XSLProcessor.importStylesheet(a);var d=this.XSLProcessor.transformToDocument(b)}return d};
+dtmlXMLLoaderObject.prototype.doXSLTransToString=function(a,b){var c=this.doXSLTransToObject(a,b);return typeof c=="string"?c:this.doSerialization(c)};dtmlXMLLoaderObject.prototype.doSerialization=function(a){if(!a)a=this.xmlDoc;if(a.responseXML)a=a.responseXML;if(_isIE)return a.xml;else{var b=new XMLSerializer;return b.serializeToString(a)}};
+dhtmlxEventable=function(a){a.attachEvent=function(a,c,d){a="ev_"+a.toLowerCase();this[a]||(this[a]=new this.eventCatcher(d||this));return a+":"+this[a].addEvent(c)};a.callEvent=function(a,c){a="ev_"+a.toLowerCase();return this[a]?this[a].apply(this,c):!0};a.checkEvent=function(a){return!!this["ev_"+a.toLowerCase()]};a.eventCatcher=function(a){var c=[],d=function(){for(var d=!0,f=0;f<c.length;f++)if(c[f]!=null)var g=c[f].apply(a,arguments),d=d&&g;return d};d.addEvent=function(a){typeof a!="function"&&
+(a=eval(a));return a?c.push(a)-1:!1};d.removeEvent=function(a){c[a]=null};return d};a.detachEvent=function(a){if(a!=!1){var c=a.split(":");this[c[0]].removeEvent(c[1])}};a.detachAllEvents=function(){for(var a in this)a.indexOf("ev_")==0&&delete this[a]};a=null};if(!window.dhtmlx)window.dhtmlx={};
+(function(){function a(a,b){var d=a.callback;c(!1);a.box.parentNode.removeChild(a.box);n=a.box=null;d&&d(b)}function b(b){if(n){var b=b||event,c=b.which||event.keyCode;dhtmlx.message.keyboard&&((c==13||c==32)&&a(n,!0),c==27&&a(n,!1));b.preventDefault&&b.preventDefault();return!(b.cancelBubble=!0)}}function c(a){if(!c.cover)c.cover=document.createElement("DIV"),c.cover.onkeydown=b,c.cover.className="dhx_modal_cover",document.body.appendChild(c.cover);var d=document.body.scrollHeight;c.cover.style.display=
+a?"inline-block":"none"}function d(a,b){var c="dhtmlx_"+a.toLowerCase().replace(/ /g,"_")+"_button";return"<div class='dhtmlx_popup_button "+c+"' result='"+b+"' ><div>"+a+"</div></div>"}function e(a){if(!m.area)m.area=document.createElement("DIV"),m.area.className="dhtmlx_message_area",m.area.style[m.position]="5px",document.body.appendChild(m.area);m.hide(a.id);var b=document.createElement("DIV");b.innerHTML="<div>"+a.text+"</div>";b.className="dhtmlx-info dhtmlx-"+a.type;b.onclick=function(){m.hide(a.id);
+a=null};m.position=="bottom"&&m.area.firstChild?m.area.insertBefore(b,m.area.firstChild):m.area.appendChild(b);a.expire>0&&(m.timers[a.id]=window.setTimeout(function(){m.hide(a.id)},a.expire));m.pull[a.id]=b;b=null;return a.id}function f(b,c,e){var f=document.createElement("DIV");f.className=" dhtmlx_modal_box dhtmlx-"+b.type;f.setAttribute("dhxbox",1);var g="";if(b.width)f.style.width=b.width;if(b.height)f.style.height=b.height;b.title&&(g+='<div class="dhtmlx_popup_title">'+b.title+"</div>");g+=
+'<div class="dhtmlx_popup_text"><span>'+(b.content?"":b.text)+'</span></div><div class="dhtmlx_popup_controls">';c&&(g+=d(b.ok||"OK",!0));e&&(g+=d(b.cancel||"Cancel",!1));if(b.buttons)for(var h=0;h<b.buttons.length;h++)g+=d(b.buttons[h],h);g+="</div>";f.innerHTML=g;if(b.content){var i=b.content;typeof i=="string"&&(i=document.getElementById(i));if(i.style.display=="none")i.style.display="";f.childNodes[b.title?1:0].appendChild(i)}f.onclick=function(c){var c=c||event,d=c.target||c.srcElement;if(!d.className)d=
+d.parentNode;d.className.split(" ")[0]=="dhtmlx_popup_button"&&(result=d.getAttribute("result"),result=result=="true"||(result=="false"?!1:result),a(b,result))};b.box=f;if(c||e)n=b;return f}function g(a,d,e){var g=a.tagName?a:f(a,d,e);a.hidden||c(!0);document.body.appendChild(g);var h=Math.abs(Math.floor(((window.innerWidth||document.documentElement.offsetWidth)-g.offsetWidth)/2)),i=Math.abs(Math.floor(((window.innerHeight||document.documentElement.offsetHeight)-g.offsetHeight)/2));g.style.top=a.position==
+"top"?"-3px":i+"px";g.style.left=h+"px";g.onkeydown=b;g.focus();a.hidden&&dhtmlx.modalbox.hide(g);return g}function h(a){return g(a,!0,!1)}function k(a){return g(a,!0,!0)}function i(a){return g(a)}function j(a,b,c){typeof a!="object"&&(typeof b=="function"&&(c=b,b=""),a={text:a,type:b,callback:c});return a}function l(a,b,c,d){typeof a!="object"&&(a={text:a,type:b,expire:c,id:d});a.id=a.id||m.uid();a.expire=a.expire||m.expire;return a}var n=null;document.attachEvent?document.attachEvent("onkeydown",
+b):document.addEventListener("keydown",b,!0);dhtmlx.alert=function(){text=j.apply(this,arguments);text.type=text.type||"confirm";return h(text)};dhtmlx.confirm=function(){text=j.apply(this,arguments);text.type=text.type||"alert";return k(text)};dhtmlx.modalbox=function(){text=j.apply(this,arguments);text.type=text.type||"alert";return i(text)};dhtmlx.modalbox.hide=function(a){for(;a&&a.getAttribute&&!a.getAttribute("dhxbox");)a=a.parentNode;a&&(a.parentNode.removeChild(a),c(!1))};var m=dhtmlx.message=
+function(a,b,c,d){a=l.apply(this,arguments);a.type=a.type||"info";var f=a.type.split("-")[0];switch(f){case "alert":return h(a);case "confirm":return k(a);case "modalbox":return i(a);default:return e(a)}};m.seed=(new Date).valueOf();m.uid=function(){return m.seed++};m.expire=4E3;m.keyboard=!0;m.position="top";m.pull={};m.timers={};m.hideAll=function(){for(var a in m.pull)m.hide(a)};m.hide=function(a){var b=m.pull[a];b&&b.parentNode&&(window.setTimeout(function(){b.parentNode.removeChild(b);b=null},
+2E3),b.className+=" hidden",m.timers[a]&&window.clearTimeout(m.timers[a]),delete m.pull[a])}})();
+function dataProcessor(a){this.serverProcessor=a;this.action_param="!nativeeditor_status";this.object=null;this.updatedRows=[];this.autoUpdate=!0;this.updateMode="cell";this._tMode="GET";this.post_delim="_";this._waitMode=0;this._in_progress={};this._invalid={};this.mandatoryFields=[];this.messages=[];this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",
+clear:"font-weight:normal;text-decoration:none;"};this.enableUTFencoding(!0);dhtmlxEventable(this);return this}
+dataProcessor.prototype={setTransactionMode:function(a,b){this._tMode=a;this._tSend=b},escape:function(a){return this._utf?encodeURIComponent(a):escape(a)},enableUTFencoding:function(a){this._utf=convertStringToBoolean(a)},setDataColumns:function(a){this._columns=typeof a=="string"?a.split(","):a},getSyncState:function(){return!this.updatedRows.length},enableDataNames:function(a){this._endnm=convertStringToBoolean(a)},enablePartialDataSend:function(a){this._changed=convertStringToBoolean(a)},setUpdateMode:function(a,
+b){this.autoUpdate=a=="cell";this.updateMode=a;this.dnd=b},ignore:function(a,b){this._silent_mode=!0;a.call(b||window);this._silent_mode=!1},setUpdated:function(a,b,c){if(!this._silent_mode){var d=this.findRow(a),c=c||"updated",e=this.obj.getUserData(a,this.action_param);e&&c=="updated"&&(c=e);b?(this.set_invalid(a,!1),this.updatedRows[d]=a,this.obj.setUserData(a,this.action_param,c),this._in_progress[a]&&(this._in_progress[a]="wait")):this.is_invalid(a)||(this.updatedRows.splice(d,1),this.obj.setUserData(a,
+this.action_param,""));b||this._clearUpdateFlag(a);this.markRow(a,b,c);b&&this.autoUpdate&&this.sendData(a)}},_clearUpdateFlag:function(){},markRow:function(a,b,c){var d="",e=this.is_invalid(a);e&&(d=this.styles[e],b=!0);if(this.callEvent("onRowMark",[a,b,c,e])&&(d=this.styles[b?c:"clear"]+d,this.obj[this._methods[0]](a,d),e&&e.details)){d+=this.styles[e+"_cell"];for(var f=0;f<e.details.length;f++)if(e.details[f])this.obj[this._methods[1]](a,f,d)}},getState:function(a){return this.obj.getUserData(a,
+this.action_param)},is_invalid:function(a){return this._invalid[a]},set_invalid:function(a,b,c){c&&(b={value:b,details:c,toString:function(){return this.value.toString()}});this._invalid[a]=b},checkBeforeUpdate:function(){return!0},sendData:function(a){if(!this._waitMode||!(this.obj.mytype=="tree"||this.obj._h2)){this.obj.editStop&&this.obj.editStop();if(typeof a=="undefined"||this._tSend)return this.sendAllData();if(this._in_progress[a])return!1;this.messages=[];if(!this.checkBeforeUpdate(a)&&this.callEvent("onValidatationError",
+[a,this.messages]))return!1;this._beforeSendData(this._getRowData(a),a)}},_beforeSendData:function(a,b){if(!this.callEvent("onBeforeUpdate",[b,this.getState(b),a]))return!1;this._sendData(a,b)},serialize:function(a,b){if(typeof a=="string")return a;if(typeof b!="undefined")return this.serialize_one(a,"");else{var c=[],d=[],e;for(e in a)a.hasOwnProperty(e)&&(c.push(this.serialize_one(a[e],e+this.post_delim)),d.push(e));c.push("ids="+this.escape(d.join(",")));dhtmlx.security_key&&c.push("dhx_security="+
+dhtmlx.security_key);return c.join("&")}},serialize_one:function(a,b){if(typeof a=="string")return a;var c=[],d;for(d in a)a.hasOwnProperty(d)&&c.push(this.escape((b||"")+d)+"="+this.escape(a[d]));return c.join("&")},_sendData:function(a,b){if(a){if(!this.callEvent("onBeforeDataSending",b?[b,this.getState(b),a]:[null,null,a]))return!1;b&&(this._in_progress[b]=(new Date).valueOf());var c=new dtmlXMLLoaderObject(this.afterUpdate,this,!0),d=this.serverProcessor+(this._user?getUrlSymbol(this.serverProcessor)+
+["dhx_user="+this._user,"dhx_version="+this.obj.getUserData(0,"version")].join("&"):"");this._tMode!="POST"?c.loadXML(d+(d.indexOf("?")!=-1?"&":"?")+this.serialize(a,b)):c.loadXML(d,!0,this.serialize(a,b));this._waitMode++}},sendAllData:function(){if(this.updatedRows.length){this.messages=[];for(var a=!0,b=0;b<this.updatedRows.length;b++)a&=this.checkBeforeUpdate(this.updatedRows[b]);if(!a&&!this.callEvent("onValidatationError",["",this.messages]))return!1;if(this._tSend)this._sendData(this._getAllData());
+else for(b=0;b<this.updatedRows.length;b++)if(!this._in_progress[this.updatedRows[b]]&&!this.is_invalid(this.updatedRows[b])&&(this._beforeSendData(this._getRowData(this.updatedRows[b]),this.updatedRows[b]),this._waitMode&&(this.obj.mytype=="tree"||this.obj._h2)))break}},_getAllData:function(){for(var a={},b=!1,c=0;c<this.updatedRows.length;c++){var d=this.updatedRows[c];!this._in_progress[d]&&!this.is_invalid(d)&&this.callEvent("onBeforeUpdate",[d,this.getState(d)])&&(a[d]=this._getRowData(d,d+this.post_delim),
+b=!0,this._in_progress[d]=(new Date).valueOf())}return b?a:null},setVerificator:function(a,b){this.mandatoryFields[a]=b||function(a){return a!=""}},clearVerificator:function(a){this.mandatoryFields[a]=!1},findRow:function(a){for(var b=0,b=0;b<this.updatedRows.length;b++)if(a==this.updatedRows[b])break;return b},defineAction:function(a,b){if(!this._uActions)this._uActions=[];this._uActions[a]=b},afterUpdateCallback:function(a,b,c,d){var e=a,f=c!="error"&&c!="invalid";f||this.set_invalid(a,c);if(this._uActions&&
+this._uActions[c]&&!this._uActions[c](d))return delete this._in_progress[e];this._in_progress[e]!="wait"&&this.setUpdated(a,!1);var g=a;switch(c){case "update":case "updated":case "inserted":case "insert":b!=a&&(this.obj[this._methods[2]](a,b),a=b);break;case "delete":case "deleted":return this.obj.setUserData(a,this.action_param,"true_deleted"),this.obj[this._methods[3]](a),delete this._in_progress[e],this.callEvent("onAfterUpdate",[a,c,b,d])}this._in_progress[e]!="wait"?(f&&this.obj.setUserData(a,
+this.action_param,""),delete this._in_progress[e]):(delete this._in_progress[e],this.setUpdated(b,!0,this.obj.getUserData(a,this.action_param)));this.callEvent("onAfterUpdate",[a,c,b,d])},afterUpdate:function(a,b,c,d,e){e.getXMLTopNode("data");if(e.xmlDoc.responseXML){for(var f=e.doXPath("//data/action"),g=0;g<f.length;g++){var h=f[g],k=h.getAttribute("type"),i=h.getAttribute("sid"),j=h.getAttribute("tid");a.afterUpdateCallback(i,j,k,h)}a.finalizeUpdate()}},finalizeUpdate:function(){this._waitMode&&
+this._waitMode--;(this.obj.mytype=="tree"||this.obj._h2)&&this.updatedRows.length&&this.sendData();this.callEvent("onAfterUpdateFinish",[]);this.updatedRows.length||this.callEvent("onFullSync",[])},init:function(a){this.obj=a;this.obj._dp_init&&this.obj._dp_init(this)},setOnAfterUpdate:function(a){this.attachEvent("onAfterUpdate",a)},enableDebug:function(){},setOnBeforeUpdateHandler:function(a){this.attachEvent("onBeforeDataSending",a)},setAutoUpdate:function(a,b){a=a||2E3;this._user=b||(new Date).valueOf();
+this._need_update=!1;this._loader=null;this._update_busy=!1;this.attachEvent("onAfterUpdate",function(a,b,c,g){this.afterAutoUpdate(a,b,c,g)});this.attachEvent("onFullSync",function(){this.fullSync()});var c=this;window.setInterval(function(){c.loadUpdate()},a)},afterAutoUpdate:function(a,b){return b=="collision"?(this._need_update=!0,!1):!0},fullSync:function(){if(this._need_update==!0)this._need_update=!1,this.loadUpdate();return!0},getUpdates:function(a,b){if(this._update_busy)return!1;else this._update_busy=
+!0;this._loader=this._loader||new dtmlXMLLoaderObject(!0);this._loader.async=!0;this._loader.waitCall=b;this._loader.loadXML(a)},_v:function(a){return a.firstChild?a.firstChild.nodeValue:""},_a:function(a){for(var b=[],c=0;c<a.length;c++)b[c]=this._v(a[c]);return b},loadUpdate:function(){var a=this,b=this.obj.getUserData(0,"version"),c=this.serverProcessor+getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+b].join("&"),c=c.replace("editing=true&","");this.getUpdates(c,function(){var b=
+a._loader.doXPath("//userdata");a.obj.setUserData(0,"version",a._v(b[0]));var c=a._loader.doXPath("//update");if(c.length){a._silent_mode=!0;for(var f=0;f<c.length;f++){var g=c[f].getAttribute("status"),h=c[f].getAttribute("id"),k=c[f].getAttribute("parent");switch(g){case "inserted":a.callEvent("insertCallback",[c[f],h,k]);break;case "updated":a.callEvent("updateCallback",[c[f],h,k]);break;case "deleted":a.callEvent("deleteCallback",[c[f],h,k])}}a._silent_mode=!1}a._update_busy=!1;a=null})}};
+if(window.dhtmlXGridObject)dhtmlXGridObject.prototype._init_point_connector=dhtmlXGridObject.prototype._init_point,dhtmlXGridObject.prototype._init_point=function(){var a=function(a){a=a.replace(/(\?|\&)connector[^\f]*/g,"");return a+(a.indexOf("?")!=-1?"&":"?")+"connector=true"+(this.hdr.rows.length>0?"&dhx_no_header=1":"")},b=function(b){return a.call(this,b)+(this._connector_sorting||"")+(this._connector_filter||"")},c=function(a,c,d){this._connector_sorting="&dhx_sort["+c+"]="+d;return b.call(this,
+a)},d=function(a,c,d){for(var h=0;h<c.length;h++)c[h]="dhx_filter["+c[h]+"]="+encodeURIComponent(d[h]);this._connector_filter="&"+c.join("&");return b.call(this,a)};this.attachEvent("onCollectValues",function(a){return this._con_f_used[a]?typeof this._con_f_used[a]=="object"?this._con_f_used[a]:!1:!0});this.attachEvent("onDynXLS",function(){this.xmlFileUrl=b.call(this,this.xmlFileUrl);return!0});this.attachEvent("onBeforeSorting",function(a,b,d){if(b=="connector"){var h=this;this.clearAndLoad(c.call(this,
+this.xmlFileUrl,a,d),function(){h.setSortImgState(!0,a,d)});return!1}return!0});this.attachEvent("onFilterStart",function(a,b){return this._con_f_used.length?(this.clearAndLoad(d.call(this,this.xmlFileUrl,a,b)),!1):!0});this.attachEvent("onXLE",function(){});this._init_point_connector&&this._init_point_connector()},dhtmlXGridObject.prototype._con_f_used=[],dhtmlXGridObject.prototype._in_header_connector_text_filter=function(a,b){this._con_f_used[b]||(this._con_f_used[b]=1);return this._in_header_text_filter(a,
+b)},dhtmlXGridObject.prototype._in_header_connector_select_filter=function(a,b){this._con_f_used[b]||(this._con_f_used[b]=2);return this._in_header_select_filter(a,b)},dhtmlXGridObject.prototype.load_connector=dhtmlXGridObject.prototype.load,dhtmlXGridObject.prototype.load=function(a,b,c){if(!this._colls_loaded&&this.cellType){for(var d=[],e=0;e<this.cellType.length;e++)(this.cellType[e].indexOf("co")==0||this._con_f_used[e]==2)&&d.push(e);d.length&&(arguments[0]+=(arguments[0].indexOf("?")!=-1?"&":
+"?")+"connector=true&dhx_colls="+d.join(","))}return this.load_connector.apply(this,arguments)},dhtmlXGridObject.prototype._parseHead_connector=dhtmlXGridObject.prototype._parseHead,dhtmlXGridObject.prototype._parseHead=function(a,b,c){this._parseHead_connector.apply(this,arguments);if(!this._colls_loaded){for(var d=this.xmlLoader.doXPath("./coll_options",arguments[0]),e=0;e<d.length;e++){var f=d[e].getAttribute("for"),g=[],h=null;this.cellType[f]=="combo"&&(h=this.getColumnCombo(f));this.cellType[f].indexOf("co")==
+0&&(h=this.getCombo(f));for(var k=this.xmlLoader.doXPath("./item",d[e]),i=0;i<k.length;i++){var j=k[i].getAttribute("value");if(h){var l=k[i].getAttribute("label")||j;h.addOption?h.addOption([[j,l]]):h.put(j,l);g[g.length]=l}else g[g.length]=j}this._con_f_used[f*1]&&(this._con_f_used[f*1]=g)}this._colls_loaded=!0}};
+if(window.dataProcessor)dataProcessor.prototype.init_original=dataProcessor.prototype.init,dataProcessor.prototype.init=function(a){this.init_original(a);a._dataprocessor=this;this.setTransactionMode("POST",!0);this.serverProcessor+=(this.serverProcessor.indexOf("?")!=-1?"&":"?")+"editing=true"};dhtmlxError.catchError("LoadXML",function(a,b,c){c[0].status!=0&&alert(c[0].responseText)});window.dhtmlXScheduler=window.scheduler={version:"4.0.1"};dhtmlxEventable(scheduler);
+scheduler.init=function(a,b,c){b=b||scheduler._currentDate();c=c||"week";this._skin_init&&scheduler._skin_init();scheduler.date.init();this._obj=typeof a=="string"?document.getElementById(a):a;this._els=[];this._scroll=!0;this._quirks=_isIE&&document.compatMode=="BackCompat";this._quirks7=_isIE&&navigator.appVersion.indexOf("MSIE 8")==-1;this.get_elements();this.init_templates();this.set_actions();(function(){function a(){return{w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||
+document.documentElement.clientHeight}}function b(a,c){return a.w==c.w&&a.h==c.h}var c=a();dhtmlxEvent(window,"resize",function(){var g=a();if(!b(c,g))window.clearTimeout(scheduler._resize_timer),scheduler._resize_timer=window.setTimeout(function(){scheduler.callEvent("onSchedulerResize",[])&&(scheduler.update_view(),scheduler.callEvent("onAfterSchedulerResize",[]))},100);c=g})})();this._init_touch_events();this.set_sizes();scheduler.callEvent("onSchedulerReady",[]);this.setCurrentView(b,c)};
+scheduler.xy={min_event_height:40,scale_width:50,scroll_width:18,scale_height:20,month_scale_height:20,menu_width:25,margin_top:0,margin_left:0,editor_width:140};scheduler.keys={edit_save:13,edit_cancel:27};
+scheduler.set_sizes=function(){var a=this._x=this._obj.clientWidth-this.xy.margin_left,b=this._y=this._obj.clientHeight-this.xy.margin_top,c=this._table_view?0:this.xy.scale_width+this.xy.scroll_width,d=this._table_view?-1:this.xy.scale_width;this.set_xy(this._els.dhx_cal_navline[0],a,this.xy.nav_height,0,0);this.set_xy(this._els.dhx_cal_header[0],a-c,this.xy.scale_height,d,this.xy.nav_height+(this._quirks?-1:1));var e=this._els.dhx_cal_navline[0].offsetHeight;if(e>0)this.xy.nav_height=e;var f=this.xy.scale_height+
+this.xy.nav_height+(this._quirks?-2:0);this.set_xy(this._els.dhx_cal_data[0],a,b-(f+2),0,f+2)};scheduler.set_xy=function(a,b,c,d,e){a.style.width=Math.max(0,b)+"px";a.style.height=Math.max(0,c)+"px";if(arguments.length>3)a.style.left=d+"px",a.style.top=e+"px"};
+scheduler.get_elements=function(){for(var a=this._obj.getElementsByTagName("DIV"),b=0;b<a.length;b++){var c=a[b].className;c&&(c=c.split(" ")[0]);this._els[c]||(this._els[c]=[]);this._els[c].push(a[b]);var d=scheduler.locale.labels[a[b].getAttribute("name")||c];if(d)a[b].innerHTML=d}};
+scheduler.set_actions=function(){for(var a in this._els)if(this._click[a])for(var b=0;b<this._els[a].length;b++)this._els[a][b].onclick=scheduler._click[a];this._obj.onselectstart=function(){return!1};this._obj.onmousemove=function(a){scheduler._temp_touch_block||scheduler._on_mouse_move(a||event)};this._obj.onmousedown=function(a){scheduler._ignore_next_click||scheduler._on_mouse_down(a||event)};this._obj.onmouseup=function(a){scheduler._ignore_next_click||scheduler._on_mouse_up(a||event)};this._obj.ondblclick=
+function(a){scheduler._on_dbl_click(a||event)};this._obj.oncontextmenu=function(a){var b=a||event,e=b.target||b.srcElement,f=scheduler.callEvent("onContextMenu",[scheduler._locate_event(e),b]);return f}};scheduler.select=function(a){if(this._select_id!=a)this.editStop(!1),this.unselect(),this._select_id=a,this.updateEvent(a)};scheduler.unselect=function(a){if(!(a&&a!=this._select_id)){var b=this._select_id;this._select_id=null;b&&this.updateEvent(b)}};
+scheduler.getState=function(){return{mode:this._mode,date:this._date,min_date:this._min_date,max_date:this._max_date,editor_id:this._edit_id,lightbox_id:this._lightbox_id,new_event:this._new_event,select_id:this._select_id,expanded:this.expanded,drag_id:this._drag_id,drag_mode:this._drag_mode}};
+scheduler._click={dhx_cal_data:function(a){if(scheduler._ignore_next_click)return a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,scheduler._ignore_next_click=!1;var b=a?a.target:event.srcElement,c=scheduler._locate_event(b),a=a||event;if(c){if(!scheduler.callEvent("onClick",[c,a])||scheduler.config.readonly)return}else scheduler.callEvent("onEmptyClick",[scheduler.getActionData(a).date,a]);if(c&&scheduler.config.select){scheduler.select(c);var d=b.className;if(d.indexOf("_icon")!=-1)scheduler._click.buttons[d.split(" ")[1].replace("icon_",
+"")](c)}else scheduler._close_not_saved()},dhx_cal_prev_button:function(){scheduler._click.dhx_cal_next_button(0,-1)},dhx_cal_next_button:function(a,b){scheduler.setCurrentView(scheduler.date.add(scheduler.date[scheduler._mode+"_start"](scheduler._date),b||1,scheduler._mode))},dhx_cal_today_button:function(){scheduler.callEvent("onBeforeTodayDisplayed",[])&&scheduler.setCurrentView(scheduler._currentDate())},dhx_cal_tab:function(){var a=this.getAttribute("name"),b=a.substring(0,a.search("_tab"));
+scheduler.setCurrentView(scheduler._date,b)},buttons:{"delete":function(a){var b=scheduler.locale.labels.confirm_deleting;scheduler._dhtmlx_confirm(b,scheduler.locale.labels.title_confirm_deleting,function(){scheduler.deleteEvent(a)})},edit:function(a){scheduler.edit(a)},save:function(){scheduler.editStop(!0)},details:function(a){scheduler.showLightbox(a)},cancel:function(){scheduler.editStop(!1)}}};
+scheduler._dhtmlx_confirm=function(a,b,c){if(!a)return c();var d={text:a};if(b)d.title=b;if(c)d.callback=function(a){a&&c()};dhtmlx.confirm(d)};
+scheduler.addEventNow=function(a,b,c){var d={};a&&a.constructor.toString().match(/object/i)!==null&&(d=a,a=null);var e=(this.config.event_duration||this.config.time_step)*6E4;a||(a=d.start_date||Math.round(scheduler._currentDate().valueOf()/e)*e);var f=new Date(a);if(!b){var g=this.config.first_hour;g>f.getHours()&&(f.setHours(g),a=f.valueOf());b=a.valueOf()+e}var h=new Date(b);f.valueOf()==h.valueOf()&&h.setTime(h.valueOf()+e);d.start_date=d.start_date||f;d.end_date=d.end_date||h;d.text=d.text||
+this.locale.labels.new_event;d.id=this._drag_id=this.uid();this._drag_mode="new-size";this._loading=!0;this.addEvent(d);this.callEvent("onEventCreated",[this._drag_id,c]);this._loading=!1;this._drag_event={};this._on_mouse_up(c)};
+scheduler._on_dbl_click=function(a,b){b=b||a.target||a.srcElement;if(!this.config.readonly&&b.className){var c=b.className.split(" ")[0];switch(c){case "dhx_scale_holder":case "dhx_scale_holder_now":case "dhx_month_body":case "dhx_wa_day_data":case "dhx_marked_timespan":if(!scheduler.config.dblclick_create)break;this.addEventNow(this.getActionData(a).date,null,a);break;case "dhx_cal_event":case "dhx_wa_ev_body":case "dhx_agenda_line":case "dhx_grid_event":case "dhx_cal_event_line":case "dhx_cal_event_clear":var d=
+this._locate_event(b);if(!this.callEvent("onDblClick",[d,a]))break;this.config.details_on_dblclick||this._table_view||!this.getEvent(d)._timed||!this.config.select?this.showLightbox(d):this.edit(d);break;case "dhx_time_block":case "dhx_cal_container":break;default:var e=this["dblclick_"+c];if(e)e.call(this,a);else if(b.parentNode&&b!=this)return scheduler._on_dbl_click(a,b.parentNode)}}};
+scheduler._mouse_coords=function(a){var b,c=document.body,d=document.documentElement;b=!_isIE&&(a.pageX||a.pageY)?{x:a.pageX,y:a.pageY}:{x:a.clientX+(c.scrollLeft||d.scrollLeft||0)-c.clientLeft,y:a.clientY+(c.scrollTop||d.scrollTop||0)-c.clientTop};b.x-=getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);b.y-=getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els.dhx_cal_data[0].scrollTop;b.ev=a;var e=this["mouse_"+this._mode];if(e)return e.call(this,
+b);if(this._cols){var f=b.x/this._cols[0];if(this._ignores)for(var g=0;g<=f;g++)this._ignores[g]&&f++}if(this._table_view){if(!this._cols||!this._colsS)return b;for(var h=0,h=1;h<this._colsS.heights.length;h++)if(this._colsS.heights[h]>b.y)break;b.y=Math.ceil((Math.max(0,f)+Math.max(0,h-1)*7)*1440/this.config.time_step);if(scheduler._drag_mode||this._mode=="month")b.y=(Math.max(0,Math.ceil(f)-1)+Math.max(0,h-1)*7)*1440/this.config.time_step;if(this._drag_mode=="move"&&scheduler._ignores_detected&&
+scheduler.config.preserve_length&&(b._ignores=!0,!this._drag_event._event_length))this._drag_event._event_length=this._get_real_event_length(this._drag_event.start_date,this._drag_event.end_date,{x_step:1,x_unit:"day"});b.x=0}else{if(!this._cols)return b;b.x=Math.min(this._cols.length-1,Math.max(0,Math.ceil(f)-1));b.y=Math.max(0,Math.ceil(b.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step)}return b};
+scheduler._close_not_saved=function(){if((new Date).valueOf()-(scheduler._new_event||0)>500&&scheduler._edit_id){var a=scheduler.locale.labels.confirm_closing;scheduler._dhtmlx_confirm(a,scheduler.locale.labels.title_confirm_closing,function(){scheduler.editStop(scheduler.config.positive_closing)})}};scheduler._correct_shift=function(a,b){return a-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(a)).getTimezoneOffset())*6E4*(b?-1:1)};
+scheduler._on_mouse_move=function(a){if(this._drag_mode){var b=this._mouse_coords(a);if(!this._drag_pos||b.force_redraw||this._drag_pos.x!=b.x||this._drag_pos.y!=b.y){var c,d;this._edit_id!=this._drag_id&&this._close_not_saved();this._drag_pos=b;if(this._drag_mode=="create"){this._close_not_saved();this._loading=!0;c=this._get_date_from_pos(b).valueOf();if(!this._drag_start){var e=this.callEvent("onBeforeEventCreated",[a,this._drag_id]);if(!e)return;this._drag_start=c;return}d=c;var f=new Date(this._drag_start),
+g=new Date(d);if((this._mode=="day"||this._mode=="week")&&f.getHours()==g.getHours()&&f.getMinutes()==g.getMinutes())g=new Date(this._drag_start+1E3);this._drag_id=this.uid();this.addEvent(f,g,this.locale.labels.new_event,this._drag_id,b.fields);this.callEvent("onEventCreated",[this._drag_id,a]);this._loading=!1;this._drag_mode="new-size"}var h=this.getEvent(this._drag_id);if(this._drag_mode=="move")if(c=this._min_date.valueOf()+(b.y*this.config.time_step+b.x*1440-(scheduler._move_pos_shift||0))*
+6E4,!b.custom&&this._table_view&&(c+=this.date.time_part(h.start_date)*1E3),c=this._correct_shift(c),b._ignores&&this.config.preserve_length&&this._table_view){if(this.matrix)var k=this.matrix[this._mode];k=k||{x_step:1,x_unit:"day"};d=c*1+this._get_fictional_event_length(c,this._drag_event._event_length,k)}else d=h.end_date.valueOf()-(h.start_date.valueOf()-c);else{c=h.start_date.valueOf();d=h.end_date.valueOf();if(this._table_view){var i=this._min_date.valueOf()+b.y*this.config.time_step*6E4+(b.custom?
+0:864E5);this._mode=="month"&&(i=this._correct_shift(i,!1));b.resize_from_start?c=i:d=i}else if(d=this.date.date_part(new Date(h.end_date)).valueOf()+b.y*this.config.time_step*6E4,this._els.dhx_cal_data[0].style.cursor="s-resize",this._mode=="week"||this._mode=="day")d=this._correct_shift(d);if(this._drag_mode=="new-size")if(d<=this._drag_start){var j=b.shift||(this._table_view&&!b.custom?864E5:0);c=d-(b.shift?0:j);d=this._drag_start+(j||this.config.time_step*6E4)}else c=this._drag_start;else d<=
+c&&(d=c+this.config.time_step*6E4)}var l=new Date(d-1),n=new Date(c);if(this._table_view||l.getDate()==n.getDate()&&l.getHours()<this.config.last_hour||scheduler._allow_dnd)if(h.start_date=n,h.end_date=new Date(d),this.config.update_render){var m=scheduler._els.dhx_cal_data[0].scrollTop;this.update_view();scheduler._els.dhx_cal_data[0].scrollTop=m}else this.updateEvent(this._drag_id);this._table_view&&this.for_rendered(this._drag_id,function(a){a.className+=" dhx_in_move"})}}else if(scheduler.checkEvent("onMouseMove")){var o=
+this._locate_event(a.target||a.srcElement);this.callEvent("onMouseMove",[o,a])}};
+scheduler._on_mouse_down=function(a,b){if(a.button!=2&&!this.config.readonly&&!this._drag_mode){var b=b||a.target||a.srcElement,c=b.className&&b.className.split(" ")[0];switch(c){case "dhx_cal_event_line":case "dhx_cal_event_clear":if(this._table_view)this._drag_mode="move";break;case "dhx_event_move":case "dhx_wa_ev_body":this._drag_mode="move";break;case "dhx_event_resize":this._drag_mode="resize";break;case "dhx_scale_holder":case "dhx_scale_holder_now":case "dhx_month_body":case "dhx_matrix_cell":case "dhx_marked_timespan":this._drag_mode="create";
+this.unselect(this._select_id);break;case "":if(b.parentNode)return scheduler._on_mouse_down(a,b.parentNode);default:if(scheduler.checkEvent("onMouseDown")&&scheduler.callEvent("onMouseDown",[c])&&b.parentNode&&b!=this)return scheduler._on_mouse_down(a,b.parentNode);this._drag_id=this._drag_mode=null}if(this._drag_mode){var d=this._locate_event(b);!this.config["drag_"+this._drag_mode]||!this.callEvent("onBeforeDrag",[d,this._drag_mode,a])?this._drag_mode=this._drag_id=0:(this._drag_id=d,this._drag_event=
+scheduler._lame_clone(this.getEvent(this._drag_id)||{}))}this._drag_start=null}};
+scheduler._on_mouse_up=function(a){if(!a||!(a.button==2&&scheduler.config.touch)){if(this._drag_mode&&this._drag_id){this._els.dhx_cal_data[0].style.cursor="default";var b=this.getEvent(this._drag_id);if(this._drag_event._dhx_changed||!this._drag_event.start_date||b.start_date.valueOf()!=this._drag_event.start_date.valueOf()||b.end_date.valueOf()!=this._drag_event.end_date.valueOf()){var c=this._drag_mode=="new-size";if(this.callEvent("onBeforeEventChanged",[b,a,c,this._drag_event])){var d=this._drag_id;
+this._drag_id=this._drag_mode=null;if(c&&this.config.edit_on_create){this.unselect();this._new_event=new Date;if(this._table_view||this.config.details_on_create||!this.config.select)return this.showLightbox(d);this._drag_pos=!0;this._select_id=this._edit_id=d}else this._new_event||this.callEvent(c?"onEventAdded":"onEventChanged",[d,this.getEvent(d)])}else c?this.deleteEvent(b.id,!0):(this._drag_event._dhx_changed=!1,scheduler._lame_copy(b,this._drag_event),this.updateEvent(b.id))}this._drag_pos&&
+this.render_view_data()}this._drag_pos=this._drag_mode=this._drag_id=null}};scheduler.update_view=function(){this._reset_scale();if(this._load_mode&&this._load())return this._render_wait=!0;this.render_view_data()};scheduler.isViewExists=function(a){return!!(scheduler[a+"_view"]||scheduler.date[a+"_start"]&&scheduler.templates[a+"_date"]&&scheduler.templates[a+"_scale_date"])};
+scheduler.updateView=function(a,b){var a=a||this._date,b=b||this._mode,c="dhx_cal_data";this._mode?this._obj.className=this._obj.className.replace("dhx_scheduler_"+this._mode,"dhx_scheduler_"+b):this._obj.className+=" dhx_scheduler_"+b;var d=this._mode==b&&this.config.preserve_scroll?this._els[c][0].scrollTop:!1;if(this[this._mode+"_view"]&&b&&this._mode!=b)this[this._mode+"_view"](!1);this._close_not_saved();var e="dhx_multi_day";this._els[e]&&(this._els[e][0].parentNode.removeChild(this._els[e][0]),
+this._els[e]=null);this._mode=b;this._date=a;this._table_view=this._mode=="month";var f=this._els.dhx_cal_tab;if(f)for(var g=0;g<f.length;g++){var h=f[g].className,h=h.replace(/ active/g,"");f[g].getAttribute("name")==this._mode+"_tab"&&(h+=" active");f[g].className=h}var k=this[this._mode+"_view"];k?k(!0):this.update_view();if(typeof d=="number")this._els[c][0].scrollTop=d};
+scheduler.setCurrentView=function(a,b){if(this.callEvent("onBeforeViewChange",[this._mode,this._date,b||this._mode,a||this._date]))this.updateView(a,b),this.callEvent("onViewChange",[this._mode,this._date])};
+scheduler._render_x_header=function(a,b,c,d){var e=document.createElement("DIV");e.className="dhx_scale_bar";this.templates[this._mode+"_scalex_class"]&&(e.className+=" "+this.templates[this._mode+"_scalex_class"](c));var f=this._cols[a]-1;this._mode=="month"&&a===0&&this.config.left_border&&(e.className+=" dhx_scale_bar_border",b+=1);this.set_xy(e,f,this.xy.scale_height-2,b,0);e.innerHTML=this.templates[this._mode+"_scale_date"](c,this._mode);d.appendChild(e)};
+scheduler._reset_scale=function(){if(this.templates[this._mode+"_date"]){var a=this._els.dhx_cal_header[0],b=this._els.dhx_cal_data[0],c=this.config;a.innerHTML="";b.scrollTop=0;b.innerHTML="";var d=(c.readonly||!c.drag_resize?" dhx_resize_denied":"")+(c.readonly||!c.drag_move?" dhx_move_denied":"");if(d)b.className="dhx_cal_data"+d;this._scales={};this._cols=[];this._colsS={height:0};this._dy_shift=0;this.set_sizes();var e=parseInt(a.style.width,10),f=0,g,h,k,i;h=this.date[this._mode+"_start"](new Date(this._date.valueOf()));
+g=k=this._table_view?scheduler.date.week_start(h):h;i=this.date.date_part(scheduler._currentDate());var j=scheduler.date.add(h,1,this._mode),l=7;if(!this._table_view){var n=this.date["get_"+this._mode+"_end"];n&&(j=n(h));l=Math.round((j.valueOf()-h.valueOf())/864E5)}this._min_date=g;this._els.dhx_cal_date[0].innerHTML=this.templates[this._mode+"_date"](h,j,this._mode);this._process_ignores(k,l,"day",1);for(var m=l-this._ignores_detected,o=0;o<l;o++){this._ignores[o]?(this._cols[o]=0,m++):(this._cols[o]=
+Math.floor(e/(m-o)),this._render_x_header(o,f,g,a));if(!this._table_view){var p=document.createElement("DIV"),q="dhx_scale_holder";g.valueOf()==i.valueOf()&&(q="dhx_scale_holder_now");p.className=q+" "+this.templates.week_date_class(g,i);this.set_xy(p,this._cols[o]-1,c.hour_size_px*(c.last_hour-c.first_hour),f+this.xy.scale_width+1,0);b.appendChild(p);this.callEvent("onScaleAdd",[p,g])}g=this.date.add(g,1,"day");e-=this._cols[o];f+=this._cols[o];this._colsS[o]=(this._cols[o-1]||0)+(this._colsS[o-
+1]||(this._table_view?0:this.xy.scale_width+2));this._colsS.col_length=l+1}this._max_date=g;this._colsS[l]=this._cols[l-1]+this._colsS[l-1];if(this._table_view)this._reset_month_scale(b,h,k);else if(this._reset_hours_scale(b,h,k),c.multi_day){var r="dhx_multi_day";this._els[r]&&(this._els[r][0].parentNode.removeChild(this._els[r][0]),this._els[r]=null);var s=this._els.dhx_cal_navline[0],u=s.offsetHeight+this._els.dhx_cal_header[0].offsetHeight+1,t=document.createElement("DIV");t.className=r;t.style.visibility=
+"hidden";this.set_xy(t,this._colsS[this._colsS.col_length-1]+this.xy.scroll_width,0,0,u);b.parentNode.insertBefore(t,b);var v=t.cloneNode(!0);v.className=r+"_icon";v.style.visibility="hidden";this.set_xy(v,this.xy.scale_width,0,0,u);t.appendChild(v);this._els[r]=[t,v];this._els[r][0].onclick=this._click.dhx_cal_data}}};
+scheduler._reset_hours_scale=function(a){var b=document.createElement("DIV");b.className="dhx_scale_holder";for(var c=new Date(1980,1,1,this.config.first_hour,0,0),d=this.config.first_hour*1;d<this.config.last_hour;d++){var e=document.createElement("DIV");e.className="dhx_scale_hour";e.style.height=this.config.hour_size_px-(this._quirks?0:1)+"px";var f=this.xy.scale_width;this.config.left_border&&(f-=1,e.className+=" dhx_scale_hour_border");e.style.width=f+"px";e.innerHTML=scheduler.templates.hour_scale(c);
+b.appendChild(e);c=this.date.add(c,1,"hour")}a.appendChild(b);if(this.config.scroll_hour)a.scrollTop=this.config.hour_size_px*(this.config.scroll_hour-this.config.first_hour)};scheduler._currentDate=function(){return scheduler.config.now_date?new Date(scheduler.config.now_date):new Date};
+scheduler._process_ignores=function(a,b,c,d,e){this._ignores=[];this._ignores_detected=0;var f=scheduler["ignore_"+this._mode];if(f)for(var g=new Date(a),h=0;h<b;h++)f(g)&&(this._ignores_detected+=1,this._ignores[h]=!0,e&&b++),g=scheduler.date.add(g,d,c)};
+scheduler._reset_month_scale=function(a,b,c){var d=scheduler.date.add(b,1,"month"),e=scheduler._currentDate();this.date.date_part(e);this.date.date_part(c);var f=Math.ceil(Math.round((d.valueOf()-c.valueOf())/864E5)/7),g=[],h=Math.floor(a.clientHeight/f)-22;this._colsS.height=h+22;for(var k=this._colsS.heights=[],i=0;i<=7;i++){var j=(this._cols[i]||0)-1;i===0&&this.config.left_border&&(j-=1);g[i]=" style='height:"+h+"px; width:"+j+"px;' "}var l=0;this._min_date=c;for(var n="<table cellpadding='0' cellspacing='0'>",
+m=[],i=0;i<f;i++){n+="<tr>";for(var o=0;o<7;o++){n+="<td";var p="";c<b?p="dhx_before":c>=d?p="dhx_after":c.valueOf()==e.valueOf()&&(p="dhx_now");n+=" class='"+p+" "+this.templates.month_date_class(c,e)+"' >";var q="dhx_month_body",r="dhx_month_head";o===0&&this.config.left_border&&(q+=" dhx_month_body_border",r+=" dhx_month_head_border");!this._ignores_detected||!this._ignores[o]?(n+="<div class='"+r+"'>"+this.templates.month_day(c)+"</div>",n+="<div class='"+q+"' "+g[o]+"></div></td>"):n+="<div></div><div></div>";
+m.push(c);c=this.date.add(c,1,"day")}n+="</tr>";k[i]=l;l+=this._colsS.height}n+="</table>";this._max_date=c;a.innerHTML=n;this._scales={};for(var s=a.getElementsByTagName("div"),i=0;i<m.length;i++){var u=s[i*2+1],t=m[i];this._scales[+t]=u}for(i=0;i<m.length;i++)t=m[i],this.callEvent("onScaleAdd",[this._scales[+t],t]);return c};
+scheduler.getLabel=function(a,b){for(var c=this.config.lightbox.sections,d=0;d<c.length;d++)if(c[d].map_to==a)for(var e=c[d].options,f=0;f<e.length;f++)if(e[f].key==b)return e[f].label;return""};scheduler.updateCollection=function(a,b){var c=scheduler.serverList(a);if(!c)return!1;c.splice(0,c.length);c.push.apply(c,b||[]);scheduler.callEvent("onOptionsLoad",[]);scheduler.resetLightbox();return!0};
+scheduler._lame_clone=function(a,b){var c,d,e,b=b||[];for(c=0;c<b.length;c+=2)if(a===b[c])return b[c+1];if(a&&typeof a=="object"){e={};d=[Array,Date,Number,String,Boolean];for(c=0;c<d.length;c++)a instanceof d[c]&&(e=c?new d[c](a):new d[c]);b.push(a,e);for(c in a)Object.prototype.hasOwnProperty.apply(a,[c])&&(e[c]=scheduler._lame_clone(a[c],b))}return e||a};scheduler._lame_copy=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a};
+scheduler._get_date_from_pos=function(a){var b=this._min_date.valueOf()+(a.y*this.config.time_step+(this._table_view?0:a.x)*1440)*6E4;return new Date(this._correct_shift(b))};scheduler.getActionData=function(a){var b=this._mouse_coords(a);return{date:this._get_date_from_pos(b),section:b.section}};scheduler._focus=function(a,b){a&&a.focus&&(this.config.touch?window.setTimeout(function(){a.focus()},100):(b&&a.select&&a.select(),a.focus()))};
+scheduler._get_real_event_length=function(a,b,c){var d=b-a,e=c._start_correction+c._end_correction||0,f=this["ignore_"+this._mode],g=0;if(c.render)var g=this._get_date_index(c,a),h=this._get_date_index(c,b);else h=Math.round(d/60/60/1E3/24);for(;g<h;){var k=scheduler.date.add(b,-c.x_step,c.x_unit);d-=f&&f(b)?b-k:e;b=k;h--}return d};
+scheduler._get_fictional_event_length=function(a,b,c,d){var e=new Date(a),f=d?-1:1;if(c._start_correction||c._end_correction){var g=d?e.getHours()*60+e.getMinutes()-(c.first_hour||0)*60:(c.last_hour||0)*60-(e.getHours()*60+e.getMinutes()),h=(c.last_hour-c.first_hour)*60,k=Math.ceil((b/6E4-g)/h);b+=k*(1440-h)*6E4}var i=new Date(a*1+b*f),j=this["ignore_"+this._mode],l=0;if(c.render)var l=this._get_date_index(c,e),n=this._get_date_index(c,i);else n=Math.round(b/60/60/1E3/24);for(;l*f<=n*f;){var m=scheduler.date.add(e,
+c.x_step*f,c.x_unit);j&&j(e)&&(b+=(m-e)*f,n+=f);e=m;l+=f}return b};
+scheduler.date={init:function(){for(var a=scheduler.locale.date.month_short,b=scheduler.locale.date.month_short_hash={},c=0;c<a.length;c++)b[a[c]]=c;a=scheduler.locale.date.month_full;b=scheduler.locale.date.month_full_hash={};for(c=0;c<a.length;c++)b[a[c]]=c},date_part:function(a){a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0);a.getHours()!=0&&a.setTime(a.getTime()+36E5*(24-a.getHours()));return a},time_part:function(a){return(a.valueOf()/1E3-a.getTimezoneOffset()*60)%86400},
+week_start:function(a){var b=a.getDay();scheduler.config.start_on_monday&&(b===0?b=6:b--);return this.date_part(this.add(a,-1*b,"day"))},month_start:function(a){a.setDate(1);return this.date_part(a)},year_start:function(a){a.setMonth(0);return this.month_start(a)},day_start:function(a){return this.date_part(a)},add:function(a,b,c){var d=new Date(a.valueOf());switch(c){case "week":b*=7;case "day":d.setDate(d.getDate()+b);!a.getHours()&&d.getHours()&&d.setTime(d.getTime()+36E5*(24-d.getHours()));break;
+case "month":d.setMonth(d.getMonth()+b);break;case "year":d.setYear(d.getFullYear()+b);break;case "hour":d.setHours(d.getHours()+b);break;case "minute":d.setMinutes(d.getMinutes()+b);break;default:return scheduler.date["add_"+c](a,b,c)}return d},to_fixed:function(a){return a<10?"0"+a:a},copy:function(a){return new Date(a.valueOf())},date_to_str:function(a,b){a=a.replace(/%[a-zA-Z]/g,function(a){switch(a){case "%d":return'"+scheduler.date.to_fixed(date.getDate())+"';case "%m":return'"+scheduler.date.to_fixed((date.getMonth()+1))+"';
+case "%j":return'"+date.getDate()+"';case "%n":return'"+(date.getMonth()+1)+"';case "%y":return'"+scheduler.date.to_fixed(date.getFullYear()%100)+"';case "%Y":return'"+date.getFullYear()+"';case "%D":return'"+scheduler.locale.date.day_short[date.getDay()]+"';case "%l":return'"+scheduler.locale.date.day_full[date.getDay()]+"';case "%M":return'"+scheduler.locale.date.month_short[date.getMonth()]+"';case "%F":return'"+scheduler.locale.date.month_full[date.getMonth()]+"';case "%h":return'"+scheduler.date.to_fixed((date.getHours()+11)%12+1)+"';
+case "%g":return'"+((date.getHours()+11)%12+1)+"';case "%G":return'"+date.getHours()+"';case "%H":return'"+scheduler.date.to_fixed(date.getHours())+"';case "%i":return'"+scheduler.date.to_fixed(date.getMinutes())+"';case "%a":return'"+(date.getHours()>11?"pm":"am")+"';case "%A":return'"+(date.getHours()>11?"PM":"AM")+"';case "%s":return'"+scheduler.date.to_fixed(date.getSeconds())+"';case "%W":return'"+scheduler.date.to_fixed(scheduler.date.getISOWeek(date))+"';default:return a}});b&&(a=a.replace(/date\.get/g,
+"date.getUTC"));return new Function("date",'return "'+a+'";')},str_to_date:function(a,b){for(var c="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",d=a.match(/%[a-zA-Z]/g),e=0;e<d.length;e++)switch(d[e]){case "%j":case "%d":c+="set[2]=temp["+e+"]||1;";break;case "%n":case "%m":c+="set[1]=(temp["+e+"]||1)-1;";break;case "%y":c+="set[0]=temp["+e+"]*1+(temp["+e+"]>50?1900:2000);";break;case "%g":case "%G":case "%h":case "%H":c+="set[3]=temp["+e+"]||0;";break;case "%i":c+="set[4]=temp["+e+"]||0;";break;case "%Y":c+=
+"set[0]=temp["+e+"]||0;";break;case "%a":case "%A":c+="set[3]=set[3]%12+((temp["+e+"]||'').toLowerCase()=='am'?0:12);";break;case "%s":c+="set[5]=temp["+e+"]||0;";break;case "%M":c+="set[1]=scheduler.locale.date.month_short_hash[temp["+e+"]]||0;";break;case "%F":c+="set[1]=scheduler.locale.date.month_full_hash[temp["+e+"]]||0;"}var f="set[0],set[1],set[2],set[3],set[4],set[5]";b&&(f=" Date.UTC("+f+")");return new Function("date","var set=[0,0,1,0,0,0]; "+c+" return new Date("+f+");")},getISOWeek:function(a){if(!a)return!1;
+var b=a.getDay();b===0&&(b=7);var c=new Date(a.valueOf());c.setDate(a.getDate()+(4-b));var d=c.getFullYear(),e=Math.round((c.getTime()-(new Date(d,0,1)).getTime())/864E5),f=1+Math.floor(e/7);return f},getUTCISOWeek:function(a){return this.getISOWeek(this.convert_to_utc(a))},convert_to_utc:function(a){return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds())}};
+scheduler.locale={date:{month_full:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),month_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),day_full:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},labels:{dhx_cal_today_button:"Today",day_tab:"Day",week_tab:"Week",month_tab:"Month",new_event:"New event",icon_save:"Save",icon_cancel:"Cancel",icon_details:"Details",
+icon_edit:"Edit",icon_delete:"Delete",confirm_closing:"",confirm_deleting:"Event will be deleted permanently, are you sure?",section_description:"Description",section_time:"Time period",full_day:"Full day",confirm_recurring:"Do you want to edit the whole set of repeated events?",section_recurring:"Repeat event",button_recurring:"Disabled",button_recurring_open:"Enabled",button_edit_series:"Edit series",button_edit_occurrence:"Edit occurrence",agenda_tab:"Agenda",date:"Date",description:"Description",
+year_tab:"Year",week_agenda_tab:"Agenda",grid_tab:"Grid",drag_to_create:"Drag to create",drag_to_move:"Drag to move"}};
+scheduler.config={default_date:"%j %M %Y",month_date:"%F %Y",load_date:"%Y-%m-%d",week_date:"%l",day_date:"%D, %F %j",hour_date:"%H:%i",month_day:"%d",xml_date:"%m/%d/%Y %H:%i",api_date:"%d-%m-%Y %H:%i",preserve_length:!0,time_step:5,start_on_monday:1,first_hour:0,last_hour:24,readonly:!1,drag_resize:1,drag_move:1,drag_create:1,dblclick_create:1,edit_on_create:1,details_on_create:0,cascade_event_display:!1,cascade_event_count:4,cascade_event_margin:30,multi_day:!0,multi_day_height_limit:0,drag_lightbox:!0,
+preserve_scroll:!0,select:!0,server_utc:!1,touch:!0,touch_tip:!0,touch_drag:500,quick_info_detached:!0,positive_closing:!1,icons_edit:["icon_save","icon_cancel"],icons_select:["icon_details","icon_edit","icon_delete"],buttons_left:["dhx_save_btn","dhx_cancel_btn"],buttons_right:["dhx_delete_btn"],lightbox:{sections:[{name:"description",height:200,map_to:"text",type:"textarea",focus:!0},{name:"time",height:72,type:"time",map_to:"auto"}]},highlight_displayed_event:!0,left_border:!1};
+scheduler.templates={};
+scheduler.init_templates=function(){var a=scheduler.locale.labels;a.dhx_save_btn=a.icon_save;a.dhx_cancel_btn=a.icon_cancel;a.dhx_delete_btn=a.icon_delete;var b=scheduler.date.date_to_str,c=scheduler.config,d=function(a,b){for(var c in b)a[c]||(a[c]=b[c])};d(scheduler.templates,{day_date:b(c.default_date),month_date:b(c.month_date),week_date:function(a,b){return scheduler.templates.day_date(a)+" &ndash; "+scheduler.templates.day_date(scheduler.date.add(b,-1,"day"))},day_scale_date:b(c.default_date),month_scale_date:b(c.week_date),
+week_scale_date:b(c.day_date),hour_scale:b(c.hour_date),time_picker:b(c.hour_date),event_date:b(c.hour_date),month_day:b(c.month_day),xml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),load_format:b(c.load_date,c.server_utc),xml_format:b(c.xml_date,c.server_utc),api_date:scheduler.date.str_to_date(c.api_date),event_header:function(a,b){return scheduler.templates.event_date(a)+" - "+scheduler.templates.event_date(b)},event_text:function(a,b,c){return c.text},event_class:function(){return""},
+month_date_class:function(){return""},week_date_class:function(){return""},event_bar_date:function(a){return scheduler.templates.event_date(a)+" "},event_bar_text:function(a,b,c){return c.text},month_events_link:function(a,b){return"<a>View more("+b+" events)</a>"}});this.callEvent("onTemplatesReady",[])};scheduler.uid=function(){if(!this._seed)this._seed=(new Date).valueOf();return this._seed++};scheduler._events={};
+scheduler.clearAll=function(){this._events={};this._loaded={};this.clear_view();this.callEvent("onClearAll",[])};
+scheduler.addEvent=function(a,b,c,d,e){if(!arguments.length)return this.addEventNow();var f=a;if(arguments.length!=1)f=e||{},f.start_date=a,f.end_date=b,f.text=c,f.id=d;f.id=f.id||scheduler.uid();f.text=f.text||"";if(typeof f.start_date=="string")f.start_date=this.templates.api_date(f.start_date);if(typeof f.end_date=="string")f.end_date=this.templates.api_date(f.end_date);var g=(this.config.event_duration||this.config.time_step)*6E4;f.start_date.valueOf()==f.end_date.valueOf()&&f.end_date.setTime(f.end_date.valueOf()+
+g);f._timed=this.isOneDayEvent(f);var h=!this._events[f.id];this._events[f.id]=f;this.event_updated(f);this._loading||this.callEvent(h?"onEventAdded":"onEventChanged",[f.id,f]);return f.id};scheduler.deleteEvent=function(a,b){var c=this._events[a];if(b||this.callEvent("onBeforeEventDelete",[a,c])&&this.callEvent("onConfirmedBeforeEventDelete",[a,c]))c&&(delete this._events[a],this.unselect(a),this.event_updated(c)),this.callEvent("onEventDeleted",[a,c])};scheduler.getEvent=function(a){return this._events[a]};
+scheduler.setEvent=function(a,b){if(!b.id)b.id=a;this._events[a]=b};scheduler.for_rendered=function(a,b){for(var c=this._rendered.length-1;c>=0;c--)this._rendered[c].getAttribute("event_id")==a&&b(this._rendered[c],c)};
+scheduler.changeEventId=function(a,b){if(a!=b){var c=this._events[a];if(c)c.id=b,this._events[b]=c,delete this._events[a];this.for_rendered(a,function(a){a.setAttribute("event_id",b)});if(this._select_id==a)this._select_id=b;if(this._edit_id==a)this._edit_id=b;this.callEvent("onEventIdChange",[a,b])}};
+(function(){for(var a="text,Text,start_date,StartDate,end_date,EndDate".split(","),b=function(a){return function(b){return scheduler.getEvent(b)[a]}},c=function(a){return function(b,c){var d=scheduler.getEvent(b);d[a]=c;d._changed=!0;d._timed=this.isOneDayEvent(d);scheduler.event_updated(d,!0)}},d=0;d<a.length;d+=2)scheduler["getEvent"+a[d+1]]=b(a[d]),scheduler["setEvent"+a[d+1]]=c(a[d])})();scheduler.event_updated=function(a){this.is_visible_events(a)?this.render_view_data():this.clear_event(a.id)};
+scheduler.is_visible_events=function(a){return a.start_date<this._max_date&&this._min_date<a.end_date};scheduler.isOneDayEvent=function(a){var b=a.end_date.getDate()-a.start_date.getDate();return b?(b<0&&(b=Math.ceil((a.end_date.valueOf()-a.start_date.valueOf())/864E5)),b==1&&!a.end_date.getHours()&&!a.end_date.getMinutes()&&(a.start_date.getHours()||a.start_date.getMinutes())):a.start_date.getMonth()==a.end_date.getMonth()&&a.start_date.getFullYear()==a.end_date.getFullYear()};
+scheduler.get_visible_events=function(a){var b=[],c;for(c in this._events)this.is_visible_events(this._events[c])&&(!a||this._events[c]._timed)&&this.filter_event(c,this._events[c])&&b.push(this._events[c]);return b};scheduler.filter_event=function(a,b){var c=this["filter_"+this._mode];return c?c(a,b):!0};scheduler._is_main_area_event=function(a){return!!a._timed};
+scheduler.render_view_data=function(a,b){if(!a){if(this._not_render){this._render_wait=!0;return}this._render_wait=!1;this.clear_view();a=this.get_visible_events(!(this._table_view||this.config.multi_day))}for(var c=0,d=a.length;c<d;c++)this._recalculate_timed(a[c]);if(this.config.multi_day&&!this._table_view){for(var e=[],f=[],c=0;c<a.length;c++)this._is_main_area_event(a[c])?e.push(a[c]):f.push(a[c]);this._rendered_location=this._els.dhx_multi_day[0];this._table_view=!0;this.render_data(f,b);this._table_view=
+!1;this._rendered_location=this._els.dhx_cal_data[0];this._table_view=!1;this.render_data(e,b)}else this._rendered_location=this._els.dhx_cal_data[0],this.render_data(a,b)};scheduler._view_month_day=function(a){var b=scheduler.getActionData(a).date;scheduler.callEvent("onViewMoreClick",[b])&&scheduler.setCurrentView(b,"day")};
+scheduler._render_month_link=function(a){for(var b=this._rendered_location,c=this._lame_clone(a),d=a._sday;d<a._eday;d++){c._sday=d;c._eday=d+1;var e=scheduler.date,f=scheduler._min_date,f=e.add(f,c._sweek,"week"),f=e.add(f,c._sday,"day"),g=scheduler.getEvents(f,e.add(f,1,"day")).length,h=this._get_event_bar_pos(c),k=h.x2-h.x,i=document.createElement("div");i.onclick=function(a){scheduler._view_month_day(a||event)};i.className="dhx_month_link";i.style.top=h.y+"px";i.style.left=h.x+"px";i.style.width=
+k+"px";i.innerHTML=scheduler.templates.month_events_link(f,g);this._rendered.push(i);b.appendChild(i)}};scheduler._recalculate_timed=function(a){if(a){var b=typeof a!="object"?this._events[a]:a;if(b)b._timed=scheduler.isOneDayEvent(b)}};scheduler.attachEvent("onEventChanged",scheduler._recalculate_timed);scheduler.attachEvent("onEventAdded",scheduler._recalculate_timed);
+scheduler.render_data=function(a,b){for(var a=this._pre_render_events(a,b),c=0;c<a.length;c++)if(this._table_view)if(scheduler._mode!="month")this.render_event_bar(a[c]);else{var d=scheduler.config.max_month_events;d!==d*1||a[c]._sorder<d?this.render_event_bar(a[c]):d!==void 0&&a[c]._sorder==d&&scheduler._render_month_link(a[c])}else this.render_event(a[c])};
+scheduler._pre_render_events=function(a,b){var c=this.xy.bar_height,d=this._colsS.heights,e=this._colsS.heights=[0,0,0,0,0,0,0],f=this._els.dhx_cal_data[0],a=this._table_view?this._pre_render_events_table(a,b):this._pre_render_events_line(a,b);if(this._table_view)if(b)this._colsS.heights=d;else{var g=f.firstChild;if(g.rows){for(var h=0;h<g.rows.length;h++){e[h]++;if(e[h]*c>this._colsS.height-22){var k=g.rows[h].cells,i=this._colsS.height-22;this.config.max_month_events*1!==this.config.max_month_events||
+e[h]<=this.config.max_month_events?i=e[h]*c:(this.config.max_month_events+1)*c>this._colsS.height-22&&(i=(this.config.max_month_events+1)*c);for(var j=0;j<k.length;j++)k[j].childNodes[1].style.height=i+"px";e[h]=(e[h-1]||0)+k[0].offsetHeight}e[h]=(e[h-1]||0)+g.rows[h].cells[0].offsetHeight}e.unshift(0);if(g.parentNode.offsetHeight<g.parentNode.scrollHeight&&!g._h_fix&&scheduler.xy.scroll_width){for(h=0;h<g.rows.length;h++){for(var l=6;this._ignores[l];)l--;var n=g.rows[h].cells[l].childNodes[0],m=
+n.offsetWidth-scheduler.xy.scroll_width+"px";n.style.width=m;n.nextSibling.style.width=m}g._h_fix=!0}}else if(!a.length&&this._els.dhx_multi_day[0].style.visibility=="visible"&&(e[0]=-1),a.length||e[0]==-1){var o=g.parentNode.childNodes,p=(e[0]+1)*c+1,q=p,r=p+"px";this.config.multi_day_height_limit&&(q=Math.min(p,this.config.multi_day_height_limit),r=q+"px");f.style.top=this._els.dhx_cal_navline[0].offsetHeight+this._els.dhx_cal_header[0].offsetHeight+q+"px";f.style.height=this._obj.offsetHeight-
+parseInt(f.style.top,10)-(this.xy.margin_top||0)+"px";var s=this._els.dhx_multi_day[0];s.style.height=r;s.style.visibility=e[0]==-1?"hidden":"visible";var u=this._els.dhx_multi_day[1];u.style.height=r;u.style.visibility=e[0]==-1?"hidden":"visible";u.className=e[0]?"dhx_multi_day_icon":"dhx_multi_day_icon_small";this._dy_shift=(e[0]+1)*c;e[0]=0;if(q!=p)f.style.top=parseInt(f.style.top)+2+"px",s.style.overflowY="auto",s.style.width=parseInt(s.style.width)-2+"px",u.style.position="fixed",u.style.top=
+"",u.style.left=""}}return a};scheduler._get_event_sday=function(a){return Math.floor((a.start_date.valueOf()-this._min_date.valueOf())/864E5)};scheduler._get_event_mapped_end_date=function(a){var b=a.end_date;if(this.config.separate_short_events){var c=(a.end_date-a.start_date)/6E4;c<this._min_mapped_duration&&(b=this.date.add(b,this._min_mapped_duration-c,"minute"))}return b};
+scheduler._pre_render_events_line=function(a,b){a.sort(function(a,b){return a.start_date.valueOf()==b.start_date.valueOf()?a.id>b.id?1:-1:a.start_date>b.start_date?1:-1});var c=[],d=[];this._min_mapped_duration=Math.ceil(this.xy.min_event_height*60/this.config.hour_size_px);for(var e=0;e<a.length;e++){var f=a[e],g=f.start_date,h=f.end_date,k=g.getHours(),i=h.getHours();f._sday=this._get_event_sday(f);if(this._ignores[f._sday])a.splice(e,1),e--;else{c[f._sday]||(c[f._sday]=[]);if(!b){f._inner=!1;for(var j=
+c[f._sday];j.length;){var l=j[j.length-1],n=this._get_event_mapped_end_date(l);if(n.valueOf()<=f.start_date.valueOf())j.splice(j.length-1,1);else break}for(var m=!1,o=0;o<j.length;o++)if(l=j[o],n=this._get_event_mapped_end_date(l),n.valueOf()<=f.start_date.valueOf()){m=!0;f._sorder=l._sorder;j.splice(o,1);f._inner=!0;break}if(j.length)j[j.length-1]._inner=!0;if(!m)if(j.length)if(j.length<=j[j.length-1]._sorder){if(j[j.length-1]._sorder)for(o=0;o<j.length;o++){for(var p=!1,q=0;q<j.length;q++)if(j[q]._sorder==
+o){p=!0;break}if(!p){f._sorder=o;break}}else f._sorder=0;f._inner=!0}else{p=j[0]._sorder;for(o=1;o<j.length;o++)if(j[o]._sorder>p)p=j[o]._sorder;f._sorder=p+1;f._inner=!1}else f._sorder=0;j.push(f);j.length>(j.max_count||0)?(j.max_count=j.length,f._count=j.length):f._count=f._count?f._count:1}if(k<this.config.first_hour||i>=this.config.last_hour)if(d.push(f),a[e]=f=this._copy_event(f),k<this.config.first_hour&&(f.start_date.setHours(this.config.first_hour),f.start_date.setMinutes(0)),i>=this.config.last_hour&&
+(f.end_date.setMinutes(0),f.end_date.setHours(this.config.last_hour)),f.start_date>f.end_date||k==this.config.last_hour)a.splice(e,1),e--}}if(!b){for(e=0;e<a.length;e++)a[e]._count=c[a[e]._sday].max_count;for(e=0;e<d.length;e++)d[e]._count=c[d[e]._sday].max_count}return a};scheduler._time_order=function(a){a.sort(function(a,c){return a.start_date.valueOf()==c.start_date.valueOf()?a._timed&&!c._timed?1:!a._timed&&c._timed?-1:a.id>c.id?1:-1:a.start_date>c.start_date?1:-1})};
+scheduler._pre_render_events_table=function(a,b){this._time_order(a);for(var c=[],d=[[],[],[],[],[],[],[]],e=this._colsS.heights,f,g=this._cols.length,h={},k=0;k<a.length;k++){var i=a[k],j=i.id;h[j]||(h[j]={first_chunk:!0,last_chunk:!0});var l=h[j],n=f||i.start_date,m=i.end_date;if(n<this._min_date)l.first_chunk=!1,n=this._min_date;if(m>this._max_date)l.last_chunk=!1,m=this._max_date;var o=this.locate_holder_day(n,!1,i);i._sday=o%g;if(!this._ignores[i._sday]||!i._timed){var p=this.locate_holder_day(m,
+!0,i)||g;i._eday=p%g||g;i._length=p-o;i._sweek=Math.floor((this._correct_shift(n.valueOf(),1)-this._min_date.valueOf())/(864E5*g));var q=d[i._sweek],r;for(r=0;r<q.length;r++)if(q[r]._eday<=i._sday)break;if(!i._sorder||!b)i._sorder=r;if(i._sday+i._length<=g)f=null,c.push(i),q[r]=i,e[i._sweek]=q.length-1,i._first_chunk=l.first_chunk,i._last_chunk=l.last_chunk;else{var s=this._copy_event(i);s.id=i.id;s._length=g-i._sday;s._eday=g;s._sday=i._sday;s._sweek=i._sweek;s._sorder=i._sorder;s.end_date=this.date.add(n,
+s._length,"day");if(s._first_chunk=l.first_chunk)l.first_chunk=!1;c.push(s);q[r]=s;f=s.end_date;e[i._sweek]=q.length-1;k--}}}return c};scheduler._copy_dummy=function(){var a=new Date(this.start_date),b=new Date(this.end_date);this.start_date=a;this.end_date=b};scheduler._copy_event=function(a){this._copy_dummy.prototype=a;return new this._copy_dummy};scheduler._rendered=[];
+scheduler.clear_view=function(){for(var a=0;a<this._rendered.length;a++){var b=this._rendered[a];b.parentNode&&b.parentNode.removeChild(b)}this._rendered=[]};scheduler.updateEvent=function(a){var b=this.getEvent(a);this.clear_event(a);if(b&&this.is_visible_events(b)&&this.filter_event(a,b)&&(this._table_view||this.config.multi_day||b._timed))this.config.update_render?this.render_view_data():this.render_view_data([b],!0)};
+scheduler.clear_event=function(a){this.for_rendered(a,function(a,c){a.parentNode&&a.parentNode.removeChild(a);scheduler._rendered.splice(c,1)})};
+scheduler.render_event=function(a){var b=scheduler.xy.menu_width,c=this.config.use_select_menu_space?0:b;if(!(a._sday<0)){var d=scheduler.locate_holder(a._sday);if(d){var e=a.start_date.getHours()*60+a.start_date.getMinutes(),f=a.end_date.getHours()*60+a.end_date.getMinutes()||scheduler.config.last_hour*60,g=a._count||1,h=a._sorder||0,k=Math.round((e*6E4-this.config.first_hour*36E5)*this.config.hour_size_px/36E5)%(this.config.hour_size_px*24),i=Math.max(scheduler.xy.min_event_height,(f-e)*this.config.hour_size_px/
+60),j=Math.floor((d.clientWidth-c)/g),l=h*j+1;a._inner||(j*=g-h);if(this.config.cascade_event_display)var n=this.config.cascade_event_count,m=this.config.cascade_event_margin,l=h%n*m,o=a._inner?(g-h-1)%n*m/2:0,j=Math.floor(d.clientWidth-c-l-o);var p=this._render_v_bar(a.id,c+l,k,j,i,a._text_style,scheduler.templates.event_header(a.start_date,a.end_date,a),scheduler.templates.event_text(a.start_date,a.end_date,a));this._rendered.push(p);d.appendChild(p);l=l+parseInt(d.style.left,10)+c;if(this._edit_id==
+a.id){p.style.zIndex=1;j=Math.max(j-4,scheduler.xy.editor_width);p=document.createElement("DIV");p.setAttribute("event_id",a.id);this.set_xy(p,j,i-20,l,k+14);p.className="dhx_cal_editor";var q=document.createElement("DIV");this.set_xy(q,j-6,i-26);q.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;";p.appendChild(q);this._els.dhx_cal_data[0].appendChild(p);this._rendered.push(p);q.innerHTML="<textarea class='dhx_cal_editor'>"+a.text+"</textarea>";if(this._quirks7)q.firstChild.style.height=i-
+12+"px";this._editor=q.firstChild;this._editor.onkeydown=function(a){if((a||event).shiftKey)return!0;var b=(a||event).keyCode;b==scheduler.keys.edit_save&&scheduler.editStop(!0);b==scheduler.keys.edit_cancel&&scheduler.editStop(!1)};this._editor.onselectstart=function(a){return(a||event).cancelBubble=!0};scheduler._focus(q.firstChild,!0);this._els.dhx_cal_data[0].scrollLeft=0}if(this.xy.menu_width!==0&&this._select_id==a.id){if(this.config.cascade_event_display&&this._drag_mode)p.style.zIndex=1;for(var r=
+this.config["icons_"+(this._edit_id==a.id?"edit":"select")],s="",u=a.color?"background-color: "+a.color+";":"",t=a.textColor?"color: "+a.textColor+";":"",v=0;v<r.length;v++)s+="<div class='dhx_menu_icon "+r[v]+"' style='"+u+""+t+"' title='"+this.locale.labels[r[v]]+"'></div>";var x=this._render_v_bar(a.id,l-b+1,k,b,r.length*20+26-2,"","<div style='"+u+""+t+"' class='dhx_menu_head'></div>",s,!0);x.style.left=l-b+1;this._els.dhx_cal_data[0].appendChild(x);this._rendered.push(x)}}}};
+scheduler._render_v_bar=function(a,b,c,d,e,f,g,h,k){var i=document.createElement("DIV"),j=this.getEvent(a),l=k?"dhx_cal_event dhx_cal_select_menu":"dhx_cal_event",n=scheduler.templates.event_class(j.start_date,j.end_date,j);n&&(l=l+" "+n);var m=j.color?"background:"+j.color+";":"",o=j.textColor?"color:"+j.textColor+";":"",p='<div event_id="'+a+'" class="'+l+'" style="position:absolute; top:'+c+"px; left:"+b+"px; width:"+(d-4)+"px; height:"+e+"px;"+(f||"")+'"></div>';i.innerHTML=p;var q=i.cloneNode(!0).firstChild;
+if(k||!scheduler.renderEvent(q,j)){var q=i.firstChild,r='<div class="dhx_event_move dhx_header" style=" width:'+(d-6)+"px;"+m+'" >&nbsp;</div>';r+='<div class="dhx_event_move dhx_title" style="'+m+""+o+'">'+g+"</div>";r+='<div class="dhx_body" style=" width:'+(d-(this._quirks?4:14))+"px; height:"+(e-(this._quirks?20:30)+1)+"px;"+m+""+o+'">'+h+"</div>";var s="dhx_event_resize dhx_footer";k&&(s="dhx_resize_denied "+s);r+='<div class="'+s+'" style=" width:'+(d-8)+"px;"+(k?" margin-top:-1px;":"")+""+
+m+""+o+'" ></div>';q.innerHTML=r}return q};scheduler.renderEvent=function(){return!1};scheduler.locate_holder=function(a){return this._mode=="day"?this._els.dhx_cal_data[0].firstChild:this._els.dhx_cal_data[0].childNodes[a]};scheduler.locate_holder_day=function(a,b){var c=Math.floor((this._correct_shift(a,1)-this._min_date)/864E5);b&&this.date.time_part(a)&&c++;return c};
+scheduler._get_dnd_order=function(a,b,c){if(!this._drag_event)return a;this._drag_event._orig_sorder?a=this._drag_event._orig_sorder:this._drag_event._orig_sorder=a;for(var d=b*a;d+b>c;)a--,d-=b;return a};
+scheduler._get_event_bar_pos=function(a){var b=this._colsS[a._sday],c=this._colsS[a._eday];c==b&&(c=this._colsS[a._eday+1]);var d=this.xy.bar_height,e=a._sorder;if(a.id==this._drag_id)var f=this._colsS.heights[a._sweek+1]-this._colsS.heights[a._sweek]-22,e=scheduler._get_dnd_order(e,d,f);var g=e*d,h=this._colsS.heights[a._sweek]+(this._colsS.height?this.xy.month_scale_height+2:2)+g;return{x:b,x2:c,y:h}};
+scheduler.render_event_bar=function(a){var b=this._rendered_location,c=this._get_event_bar_pos(a),d=c.y,e=c.x,f=c.x2;if(f){var g=document.createElement("DIV"),h="dhx_cal_event_clear";a._timed||(h="dhx_cal_event_line",a.hasOwnProperty("_first_chunk")&&a._first_chunk&&(h+=" dhx_cal_event_line_start"),a.hasOwnProperty("_last_chunk")&&a._last_chunk&&(h+=" dhx_cal_event_line_end"));var k=scheduler.templates.event_class(a.start_date,a.end_date,a);k&&(h=h+" "+k);var i=a.color?"background:"+a.color+";":"",
+j=a.textColor?"color:"+a.textColor+";":"",l='<div event_id="'+a.id+'" class="'+h+'" style="position:absolute; top:'+d+"px; left:"+e+"px; width:"+(f-e-15)+"px;"+j+""+i+""+(a._text_style||"")+'">',a=scheduler.getEvent(a.id);a._timed&&(l+=scheduler.templates.event_bar_date(a.start_date,a.end_date,a));l+=scheduler.templates.event_bar_text(a.start_date,a.end_date,a)+"</div>";l+="</div>";g.innerHTML=l;this._rendered.push(g.firstChild);b.appendChild(g.firstChild)}};
+scheduler._locate_event=function(a){for(var b=null;a&&!b&&a.getAttribute;)b=a.getAttribute("event_id"),a=a.parentNode;return b};scheduler.edit=function(a){if(this._edit_id!=a)this.editStop(!1,a),this._edit_id=a,this.updateEvent(a)};scheduler.editStop=function(a,b){if(!(b&&this._edit_id==b)){var c=this.getEvent(this._edit_id);if(c){if(a)c.text=this._editor.value;this._editor=this._edit_id=null;this.updateEvent(c.id);this._edit_stop_event(c,a)}}};
+scheduler._edit_stop_event=function(a,b){this._new_event?(b?this.callEvent("onEventAdded",[a.id,a]):a&&this.deleteEvent(a.id,!0),this._new_event=null):b&&this.callEvent("onEventChanged",[a.id,a])};scheduler.getEvents=function(a,b){var c=[],d;for(d in this._events){var e=this._events[d];e&&(!a&&!b||e.start_date<b&&e.end_date>a)&&c.push(e)}return c};scheduler.getRenderedEvent=function(a){if(a){for(var b=scheduler._rendered,c=0;c<b.length;c++){var d=b[c];if(d.getAttribute("event_id")==a)return d}return null}};
+scheduler.showEvent=function(a,b){var c=typeof a=="number"||typeof a=="string"?scheduler.getEvent(a):a,b=b||scheduler._mode;if(c&&(!this.checkEvent("onBeforeEventDisplay")||this.callEvent("onBeforeEventDisplay",[c,b]))){var d=scheduler.config.scroll_hour;scheduler.config.scroll_hour=c.start_date.getHours();var e=scheduler.config.preserve_scroll;scheduler.config.preserve_scroll=!1;var f=c.color,g=c.textColor;if(scheduler.config.highlight_displayed_event)c.color=scheduler.config.displayed_event_color,
+c.textColor=scheduler.config.displayed_event_text_color;scheduler.setCurrentView(new Date(c.start_date),b);c.color=f;c.textColor=g;scheduler.config.scroll_hour=d;scheduler.config.preserve_scroll=e;if(scheduler.matrix&&scheduler.matrix[b])scheduler._els.dhx_cal_data[0].scrollTop=getAbsoluteTop(scheduler.getRenderedEvent(c.id))-getAbsoluteTop(scheduler._els.dhx_cal_data[0])-20;scheduler.callEvent("onAfterEventDisplay",[c,b])}};scheduler._loaded={};
+scheduler._load=function(a,b){if(a=a||this._load_url){a+=(a.indexOf("?")==-1?"?":"&")+"timeshift="+(new Date).getTimezoneOffset();this.config.prevent_cache&&(a+="&uid="+this.uid());var c,b=b||this._date;if(this._load_mode){for(var d=this.templates.load_format,b=this.date[this._load_mode+"_start"](new Date(b.valueOf()));b>this._min_date;)b=this.date.add(b,-1,this._load_mode);c=b;for(var e=!0;c<this._max_date;)c=this.date.add(c,1,this._load_mode),this._loaded[d(b)]&&e?b=this.date.add(b,1,this._load_mode):
+e=!1;var f=c;do c=f,f=this.date.add(c,-1,this._load_mode);while(f>b&&this._loaded[d(f)]);if(c<=b)return!1;for(dhtmlxAjax.get(a+"&from="+d(b)+"&to="+d(c),function(a){scheduler.on_load(a)});b<c;)this._loaded[d(b)]=!0,b=this.date.add(b,1,this._load_mode)}else dhtmlxAjax.get(a,function(a){scheduler.on_load(a)});this.callEvent("onXLS",[]);return!0}};
+scheduler.on_load=function(a){var b;b=this._process&&this._process!="xml"?this[this._process].parse(a.xmlDoc.responseText):this._magic_parser(a);scheduler._process_loading(b);this.callEvent("onXLE",[])};scheduler._process_loading=function(a){this._not_render=this._loading=!0;for(var b=0;b<a.length;b++)this.callEvent("onEventLoading",[a[b]])&&this.addEvent(a[b]);this._not_render=!1;this._render_wait&&this.render_view_data();this._loading=!1;this._after_call&&this._after_call();this._after_call=null};
+scheduler._init_event=function(a){a.text=a.text||a._tagvalue||"";a.start_date=scheduler._init_date(a.start_date);a.end_date=scheduler._init_date(a.end_date)};scheduler._init_date=function(a){return!a?null:typeof a=="string"?scheduler.templates.xml_date(a):new Date(a)};scheduler.json={};
+scheduler.json.parse=function(a){if(typeof a=="string")scheduler._temp=eval("("+a+")"),a=scheduler._temp?scheduler._temp.data||scheduler._temp.d||scheduler._temp:[];if(a.dhx_security)dhtmlx.security_key=a.dhx_security;var b=scheduler._temp&&scheduler._temp.collections?scheduler._temp.collections:{},c=!1,d;for(d in b)if(b.hasOwnProperty(d)){var c=!0,e=b[d],f=scheduler.serverList[d];if(f){f.splice(0,f.length);for(var g=0;g<e.length;g++){var h=e[g],k={key:h.value,label:h.label},i;for(i in h)if(h.hasOwnProperty(i)&&
+!(i=="value"||i=="label"))k[i]=h[i];f.push(k)}}}c&&scheduler.callEvent("onOptionsLoad",[]);for(var j=[],l=0;l<a.length;l++){var n=a[l];scheduler._init_event(n);j.push(n)}return j};scheduler.parse=function(a,b){this._process=b;this.on_load({xmlDoc:{responseText:a}})};scheduler.load=function(a,b,c){if(typeof b=="string")this._process=b,b=c;this._load_url=a;this._after_call=b;this._load(a,this._date)};scheduler.setLoadMode=function(a){a=="all"&&(a="");this._load_mode=a};
+scheduler.serverList=function(a,b){return b?this.serverList[a]=b.slice(0):this.serverList[a]=this.serverList[a]||[]};scheduler._userdata={};
+scheduler._magic_parser=function(a){var b;if(!a.getXMLTopNode){var c=a.xmlDoc.responseText,a=new dtmlXMLLoaderObject(function(){});a.loadXMLString(c)}b=a.getXMLTopNode("data");if(b.tagName!="data")return[];var d=b.getAttribute("dhx_security");if(d)dhtmlx.security_key=d;for(var e=a.doXPath("//coll_options"),f=0;f<e.length;f++){var g=e[f].getAttribute("for"),h=this.serverList[g];if(h){h.splice(0,h.length);for(var k=a.doXPath(".//item",e[f]),i=0;i<k.length;i++){for(var j=k[i],l=j.attributes,n={key:k[i].getAttribute("value"),
+label:k[i].getAttribute("label")},m=0;m<l.length;m++){var o=l[m];if(!(o.nodeName=="value"||o.nodeName=="label"))n[o.nodeName]=o.nodeValue}h.push(n)}}}e.length&&scheduler.callEvent("onOptionsLoad",[]);for(var p=a.doXPath("//userdata"),f=0;f<p.length;f++){var q=this._xmlNodeToJSON(p[f]);this._userdata[q.name]=q.text}var r=[];b=a.doXPath("//event");for(f=0;f<b.length;f++){var s=r[f]=this._xmlNodeToJSON(b[f]);scheduler._init_event(s)}return r};
+scheduler._xmlNodeToJSON=function(a){for(var b={},c=0;c<a.attributes.length;c++)b[a.attributes[c].name]=a.attributes[c].value;for(c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];d.nodeType==1&&(b[d.tagName]=d.firstChild?d.firstChild.nodeValue:"")}if(!b.text)b.text=a.firstChild?a.firstChild.nodeValue:"";return b};
+scheduler.attachEvent("onXLS",function(){if(this.config.show_loading===!0){var a;a=this.config.show_loading=document.createElement("DIV");a.className="dhx_loading";a.style.left=Math.round((this._x-128)/2)+"px";a.style.top=Math.round((this._y-15)/2)+"px";this._obj.appendChild(a)}});scheduler.attachEvent("onXLE",function(){var a=this.config.show_loading;if(a&&typeof a=="object")this._obj.removeChild(a),this.config.show_loading=!0});
+scheduler.ical={parse:function(a){var b=a.match(RegExp(this.c_start+"[^\u000c]*"+this.c_end,""));if(b.length){b[0]=b[0].replace(/[\r\n]+(?=[a-z \t])/g," ");b[0]=b[0].replace(/\;[^:\r\n]*:/g,":");for(var c=[],d,e=RegExp("(?:"+this.e_start+")([^\u000c]*?)(?:"+this.e_end+")","g");d=e.exec(b);){for(var f={},g,h=/[^\r\n]+[\r\n]+/g;g=h.exec(d[1]);)this.parse_param(g.toString(),f);if(f.uid&&!f.id)f.id=f.uid;c.push(f)}return c}},parse_param:function(a,b){var c=a.indexOf(":");if(c!=-1){var d=a.substr(0,c).toLowerCase(),
+e=a.substr(c+1).replace(/\\\,/g,",").replace(/[\r\n]+$/,"");d=="summary"?d="text":d=="dtstart"?(d="start_date",e=this.parse_date(e,0,0)):d=="dtend"&&(d="end_date",e=this.parse_date(e,0,0));b[d]=e}},parse_date:function(a,b,c){var d=a.split("T");d[1]&&(b=d[1].substr(0,2),c=d[1].substr(2,2));var e=d[0].substr(0,4),f=parseInt(d[0].substr(4,2),10)-1,g=d[0].substr(6,2);return scheduler.config.server_utc&&!d[1]?new Date(Date.UTC(e,f,g,b,c)):new Date(e,f,g,b,c)},c_start:"BEGIN:VCALENDAR",e_start:"BEGIN:VEVENT",
+e_end:"END:VEVENT",c_end:"END:VCALENDAR"};scheduler._lightbox_controls={};
+scheduler.formSection=function(a){for(var b=this.config.lightbox.sections,c=0;c<b.length;c++)if(b[c].name==a)break;var d=b[c];scheduler._lightbox||scheduler.getLightbox();var e=document.getElementById(d.id),f=e.nextSibling,g={section:d,header:e,node:f,getValue:function(a){return scheduler.form_blocks[d.type].get_value(f,a||{},d)},setValue:function(a,b){return scheduler.form_blocks[d.type].set_value(f,a,b||{},d)}},h=scheduler._lightbox_controls["get_"+d.type+"_control"];return h?h(g):g};
+scheduler._lightbox_controls.get_template_control=function(a){a.control=a.node;return a};scheduler._lightbox_controls.get_select_control=function(a){a.control=a.node.getElementsByTagName("select")[0];return a};scheduler._lightbox_controls.get_textarea_control=function(a){a.control=a.node.getElementsByTagName("textarea")[0];return a};scheduler._lightbox_controls.get_time_control=function(a){a.control=a.node.getElementsByTagName("select");return a};
+scheduler.form_blocks={template:{render:function(a){var b=(a.height||"30")+"px";return"<div class='dhx_cal_ltext dhx_cal_template' style='height:"+b+";'></div>"},set_value:function(a,b){a.innerHTML=b||""},get_value:function(a){return a.innerHTML||""},focus:function(){}},textarea:{render:function(a){var b=(a.height||"130")+"px";return"<div class='dhx_cal_ltext' style='height:"+b+";'><textarea></textarea></div>"},set_value:function(a,b){a.firstChild.value=b||""},get_value:function(a){return a.firstChild.value},
+focus:function(a){var b=a.firstChild;scheduler._focus(b,!0)}},select:{render:function(a){for(var b=(a.height||"23")+"px",c="<div class='dhx_cal_ltext' style='height:"+b+";'><select style='width:100%;'>",d=0;d<a.options.length;d++)c+="<option value='"+a.options[d].key+"'>"+a.options[d].label+"</option>";c+="</select></div>";return c},set_value:function(a,b,c,d){var e=a.firstChild;if(!e._dhx_onchange&&d.onchange)e.onchange=d.onchange,e._dhx_onchange=!0;if(typeof b=="undefined")b=(e.options[0]||{}).value;
+e.value=b||""},get_value:function(a){return a.firstChild.value},focus:function(a){var b=a.firstChild;scheduler._focus(b,!0)}},time:{render:function(a){if(!a.time_format)a.time_format=["%H:%i","%d","%m","%Y"];a._time_format_order={};var b=a.time_format,c=scheduler.config,d=this.date.date_part(scheduler._currentDate()),e=1440,f=0;scheduler.config.limit_time_select&&(e=60*c.last_hour+1,f=60*c.first_hour,d.setHours(c.first_hour));for(var g="",h=0;h<b.length;h++){var k=b[h];h>0&&(g+=" ");switch(k){case "%Y":a._time_format_order[3]=
+h;g+="<select>";for(var i=d.getFullYear()-5,j=0;j<10;j++)g+="<option value='"+(i+j)+"'>"+(i+j)+"</option>";g+="</select> ";break;case "%m":a._time_format_order[2]=h;g+="<select>";for(j=0;j<12;j++)g+="<option value='"+j+"'>"+this.locale.date.month_full[j]+"</option>";g+="</select>";break;case "%d":a._time_format_order[1]=h;g+="<select>";for(j=1;j<32;j++)g+="<option value='"+j+"'>"+j+"</option>";g+="</select>";break;case "%H:%i":a._time_format_order[0]=h;g+="<select>";var j=f,l=d.getDate();for(a._time_values=
+[];j<e;){var n=this.templates.time_picker(d);g+="<option value='"+j+"'>"+n+"</option>";a._time_values.push(j);d.setTime(d.valueOf()+this.config.time_step*6E4);var m=d.getDate()!=l?1:0,j=m*1440+d.getHours()*60+d.getMinutes()}g+="</select>"}}return"<div style='height:30px;padding-top:0px;font-size:inherit;' class='dhx_section_time'>"+g+"<span style='font-weight:normal; font-size:10pt;'> &nbsp;&ndash;&nbsp; </span>"+g+"</div>"},set_value:function(a,b,c,d){function e(a,b,c){for(var e=d._time_values,f=
+c.getHours()*60+c.getMinutes(),g=f,i=!1,j=0;j<e.length;j++){var k=e[j];if(k===f){i=!0;break}k<f&&(g=k)}a[b+h[0]].value=i?f:g;if(!i&&!g)a[b+h[0]].selectedIndex=-1;a[b+h[1]].value=c.getDate();a[b+h[2]].value=c.getMonth();a[b+h[3]].value=c.getFullYear()}var f=scheduler.config,g=a.getElementsByTagName("select"),h=d._time_format_order;if(f.full_day){if(!a._full_day){var k="<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> "+scheduler.locale.labels.full_day+"&nbsp;</label></input>";
+scheduler.config.wide_form||(k=a.previousSibling.innerHTML+k);a.previousSibling.innerHTML=k;a._full_day=!0}var i=a.previousSibling.getElementsByTagName("input")[0];i.checked=scheduler.date.time_part(c.start_date)===0&&scheduler.date.time_part(c.end_date)===0;g[h[0]].disabled=i.checked;g[h[0]+g.length/2].disabled=i.checked;i.onclick=function(){if(i.checked){var b={};scheduler.form_blocks.time.get_value(a,b,d);var f=scheduler.date.date_part(b.start_date),j=scheduler.date.date_part(b.end_date);if(+j==
++f||+j>=+f&&(c.end_date.getHours()!=0||c.end_date.getMinutes()!=0))j=scheduler.date.add(j,1,"day")}g[h[0]].disabled=i.checked;g[h[0]+g.length/2].disabled=i.checked;e(g,0,f||c.start_date);e(g,4,j||c.end_date)}}if(f.auto_end_date&&f.event_duration)for(var j=function(){var a=new Date(g[h[3]].value,g[h[2]].value,g[h[1]].value,0,g[h[0]].value),b=new Date(a.getTime()+scheduler.config.event_duration*6E4);e(g,4,b)},l=0;l<4;l++)g[l].onchange=j;e(g,0,c.start_date);e(g,4,c.end_date)},get_value:function(a,b,
+c){s=a.getElementsByTagName("select");var d=c._time_format_order;b.start_date=new Date(s[d[3]].value,s[d[2]].value,s[d[1]].value,0,s[d[0]].value);b.end_date=new Date(s[d[3]+4].value,s[d[2]+4].value,s[d[1]+4].value,0,s[d[0]+4].value);if(b.end_date<=b.start_date)b.end_date=scheduler.date.add(b.start_date,scheduler.config.time_step,"minute");return{start_date:new Date(b.start_date),end_date:new Date(b.end_date)}},focus:function(a){scheduler._focus(a.getElementsByTagName("select")[0])}}};
+scheduler.showCover=function(a){if(a){a.style.display="block";var b=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,c=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft,d=window.innerHeight||document.documentElement.clientHeight;a.style.top=b?Math.round(b+Math.max((d-a.offsetHeight)/2,0))+"px":Math.round(Math.max((d-a.offsetHeight)/2,0)+9)+"px";a.style.left=document.documentElement.scrollWidth>document.body.offsetWidth?Math.round(c+(document.body.offsetWidth-
+a.offsetWidth)/2)+"px":Math.round((document.body.offsetWidth-a.offsetWidth)/2)+"px"}this.show_cover()};scheduler.showLightbox=function(a){if(a)if(this.callEvent("onBeforeLightbox",[a])){var b=this.getLightbox();this.showCover(b);this._fill_lightbox(a,b);this.callEvent("onLightbox",[a])}else if(this._new_event)this._new_event=null};
+scheduler._fill_lightbox=function(a,b){var c=this.getEvent(a),d=b.getElementsByTagName("span");scheduler.templates.lightbox_header?(d[1].innerHTML="",d[2].innerHTML=scheduler.templates.lightbox_header(c.start_date,c.end_date,c)):(d[1].innerHTML=this.templates.event_header(c.start_date,c.end_date,c),d[2].innerHTML=(this.templates.event_bar_text(c.start_date,c.end_date,c)||"").substr(0,70));for(var e=this.config.lightbox.sections,f=0;f<e.length;f++){var g=e[f],h=document.getElementById(g.id).nextSibling,
+k=this.form_blocks[g.type],i=c[g.map_to]!==void 0?c[g.map_to]:g.default_value;k.set_value.call(this,h,i,c,g);e[f].focus&&k.focus.call(this,h)}scheduler._lightbox_id=a};scheduler._lightbox_out=function(a){for(var b=this.config.lightbox.sections,c=0;c<b.length;c++){var d=document.getElementById(b[c].id),d=d?d.nextSibling:d,e=this.form_blocks[b[c].type],f=e.get_value.call(this,d,a,b[c]);b[c].map_to!="auto"&&(a[b[c].map_to]=f)}return a};
+scheduler._empty_lightbox=function(a){var b=scheduler._lightbox_id,c=this.getEvent(b),d=this.getLightbox();this._lame_copy(c,a);this.setEvent(c.id,c);this._edit_stop_event(c,!0);this.render_view_data()};scheduler.hide_lightbox=function(){this.hideCover(this.getLightbox());this._lightbox_id=null;this.callEvent("onAfterLightbox",[])};scheduler.hideCover=function(a){if(a)a.style.display="none";this.hide_cover()};
+scheduler.hide_cover=function(){this._cover&&this._cover.parentNode.removeChild(this._cover);this._cover=null};scheduler.show_cover=function(){this._cover=document.createElement("DIV");this._cover.className="dhx_cal_cover";var a=document.height!==void 0?document.height:document.body.offsetHeight,b=document.documentElement?document.documentElement.scrollHeight:0;this._cover.style.height=Math.max(a,b)+"px";document.body.appendChild(this._cover)};
+scheduler.save_lightbox=function(){var a=this._lightbox_out({},this._lame_copy(this.getEvent(this._lightbox_id)));if(!this.checkEvent("onEventSave")||this.callEvent("onEventSave",[this._lightbox_id,a,this._new_event]))this._empty_lightbox(a),this.hide_lightbox()};scheduler.startLightbox=function(a,b){this._lightbox_id=a;this._custom_lightbox=!0;this._temp_lightbox=this._lightbox;this._lightbox=b;this.showCover(b)};
+scheduler.endLightbox=function(a,b){this._edit_stop_event(scheduler.getEvent(this._lightbox_id),a);a&&scheduler.render_view_data();this.hideCover(b);if(this._custom_lightbox)this._lightbox=this._temp_lightbox,this._custom_lightbox=!1;this._temp_lightbox=this._lightbox_id=null};scheduler.resetLightbox=function(){scheduler._lightbox&&!scheduler._custom_lightbox&&scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);scheduler._lightbox=null};
+scheduler.cancel_lightbox=function(){this.callEvent("onEventCancel",[this._lightbox_id,this._new_event]);this.endLightbox(!1);this.hide_lightbox()};
+scheduler._init_lightbox_events=function(){this.getLightbox().onclick=function(a){var b=a?a.target:event.srcElement;if(!b.className)b=b.previousSibling;if(b&&b.className)switch(b.className){case "dhx_save_btn":scheduler.save_lightbox();break;case "dhx_delete_btn":var c=scheduler.locale.labels.confirm_deleting;scheduler._dhtmlx_confirm(c,scheduler.locale.labels.title_confirm_deleting,function(){scheduler.deleteEvent(scheduler._lightbox_id);scheduler._new_event=null;scheduler.hide_lightbox()});break;
+case "dhx_cancel_btn":scheduler.cancel_lightbox();break;default:if(b.getAttribute("dhx_button"))scheduler.callEvent("onLightboxButton",[b.className,b,a]);else{var d,e,f;if(b.className.indexOf("dhx_custom_button")!=-1)b.className.indexOf("dhx_custom_button_")!=-1?(d=b.parentNode.getAttribute("index"),f=b.parentNode.parentNode):(d=b.getAttribute("index"),f=b.parentNode,b=b.firstChild);d&&(e=scheduler.form_blocks[scheduler.config.lightbox.sections[d].type],e.button_click(d,b,f,f.nextSibling))}}};this.getLightbox().onkeydown=
+function(a){switch((a||event).keyCode){case scheduler.keys.edit_save:if((a||event).shiftKey)break;scheduler.save_lightbox();break;case scheduler.keys.edit_cancel:scheduler.cancel_lightbox()}}};scheduler.setLightboxSize=function(){var a=this._lightbox;if(a){var b=a.childNodes[1];b.style.height="0px";b.style.height=b.scrollHeight+"px";a.style.height=b.scrollHeight+scheduler.xy.lightbox_additional_height+"px";b.style.height=b.scrollHeight+"px"}};
+scheduler._init_dnd_events=function(){dhtmlxEvent(document.body,"mousemove",scheduler._move_while_dnd);dhtmlxEvent(document.body,"mouseup",scheduler._finish_dnd);scheduler._init_dnd_events=function(){}};
+scheduler._move_while_dnd=function(a){if(scheduler._dnd_start_lb){if(!document.dhx_unselectable)document.body.className+=" dhx_unselectable",document.dhx_unselectable=!0;var b=scheduler.getLightbox(),c=a&&a.target?[a.pageX,a.pageY]:[event.clientX,event.clientY];b.style.top=scheduler._lb_start[1]+c[1]-scheduler._dnd_start_lb[1]+"px";b.style.left=scheduler._lb_start[0]+c[0]-scheduler._dnd_start_lb[0]+"px"}};
+scheduler._ready_to_dnd=function(a){var b=scheduler.getLightbox();scheduler._lb_start=[parseInt(b.style.left,10),parseInt(b.style.top,10)];scheduler._dnd_start_lb=a&&a.target?[a.pageX,a.pageY]:[event.clientX,event.clientY]};scheduler._finish_dnd=function(){if(scheduler._lb_start)scheduler._lb_start=scheduler._dnd_start_lb=!1,document.body.className=document.body.className.replace(" dhx_unselectable",""),document.dhx_unselectable=!1};
+scheduler.getLightbox=function(){if(!this._lightbox){var a=document.createElement("DIV");a.className="dhx_cal_light";scheduler.config.wide_form&&(a.className+=" dhx_cal_light_wide");scheduler.form_blocks.recurring&&(a.className+=" dhx_cal_light_rec");/msie|MSIE 6/.test(navigator.userAgent)&&(a.className+=" dhx_ie6");a.style.visibility="hidden";for(var b=this._lightbox_template,c=this.config.buttons_left,d=0;d<c.length;d++)b+="<div class='dhx_btn_set dhx_left_btn_set "+c[d]+"_set'><div dhx_button='1' class='"+
+c[d]+"'></div><div>"+scheduler.locale.labels[c[d]]+"</div></div>";c=this.config.buttons_right;for(d=0;d<c.length;d++)b+="<div class='dhx_btn_set dhx_right_btn_set "+c[d]+"_set' style='float:right;'><div dhx_button='1' class='"+c[d]+"'></div><div>"+scheduler.locale.labels[c[d]]+"</div></div>";b+="</div>";a.innerHTML=b;if(scheduler.config.drag_lightbox)a.firstChild.onmousedown=scheduler._ready_to_dnd,a.firstChild.onselectstart=function(){return!1},a.firstChild.style.cursor="pointer",scheduler._init_dnd_events();
+document.body.insertBefore(a,document.body.firstChild);this._lightbox=a;for(var e=this.config.lightbox.sections,b="",d=0;d<e.length;d++){var f=this.form_blocks[e[d].type];if(f){e[d].id="area_"+this.uid();var g="";e[d].button&&(g="<div class='dhx_custom_button' index='"+d+"'><div class='dhx_custom_button_"+e[d].button+"'></div><div>"+this.locale.labels["button_"+e[d].button]+"</div></div>");this.config.wide_form&&(b+="<div class='dhx_wrap_section'>");b+="<div id='"+e[d].id+"' class='dhx_cal_lsection'>"+
+g+this.locale.labels["section_"+e[d].name]+"</div>"+f.render.call(this,e[d]);b+="</div>"}}for(var h=a.getElementsByTagName("div"),d=0;d<h.length;d++){var k=h[d];if(k.className=="dhx_cal_larea"){k.innerHTML=b;break}}this.setLightboxSize();this._init_lightbox_events(this);a.style.display="none";a.style.visibility="visible"}return this._lightbox};scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'>&nbsp;</span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div>";
+scheduler._init_touch_events=function(){if(this.config.touch!="force")this.config.touch=this.config.touch&&(navigator.userAgent.indexOf("Mobile")!=-1||navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("Android")!=-1||navigator.userAgent.indexOf("Touch")!=-1);if(this.config.touch)this.xy.scroll_width=0,window.navigator.msPointerEnabled?this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(a){return a.pointerType==a.MSPOINTER_TYPE_MOUSE?null:a},function(a){return!a||
+a.pointerType==a.MSPOINTER_TYPE_MOUSE}):this._touch_events(["touchmove","touchstart","touchend"],function(a){return a.touches&&a.touches.length>1?null:a.touches[0]?{target:a.target,pageX:a.touches[0].pageX,pageY:a.touches[0].pageY}:a},function(){return!1})};
+scheduler._touch_events=function(a,b,c){function d(a,b,c){if(a&&b){var d=Math.abs(a.pageY-b.pageY),e=Math.abs(a.pageX-b.pageX);if(e>c&&(!d||e/d>3))a.pageX>b.pageX?scheduler._click.dhx_cal_next_button():scheduler._click.dhx_cal_prev_button()}}function e(a){scheduler._hide_global_tip();if(i)scheduler._on_mouse_up(b(a||event)),scheduler._temp_touch_block=!1;scheduler._drag_id=null;scheduler._drag_mode=null;scheduler._drag_pos=null;clearTimeout(k);i=l=!1;j=!0}var f=navigator.userAgent.indexOf("Android")!=
+-1&&navigator.userAgent.indexOf("WebKit")!=-1,g,h,k,i,j,l,n=0;dhtmlxEvent(document.body,a[0],function(a){if(!c(a)){if(i)return scheduler._on_mouse_move(b(a)),scheduler._update_global_tip(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,!1;h&&f&&d(h,b(a),0);h=b(a);if(l)if(h){if(g.target!=h.target||Math.abs(g.pageX-h.pageX)>5||Math.abs(g.pageY-h.pageY)>5)j=!0,clearTimeout(k)}else j=!0}});dhtmlxEvent(this._els.dhx_cal_data[0],"scroll",e);dhtmlxEvent(this._els.dhx_cal_data[0],"touchcancel",e);
+dhtmlxEvent(this._els.dhx_cal_data[0],"contextmenu",function(a){if(l)return a&&a.preventDefault&&a.preventDefault(),(a||event).cancelBubble=!0,!1});dhtmlxEvent(this._els.dhx_cal_data[0],a[1],function(a){if(!c(a)){i=j=h=!1;l=!0;scheduler._temp_touch_block=!0;var d=h=b(a);if(d){var e=new Date;if(!j&&!i&&e-n<250)return scheduler._click.dhx_cal_data(d),window.setTimeout(function(){scheduler._on_dbl_click(d)},50),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,scheduler._block_next_stop=!0,!1;n=
+e;!j&&!i&&scheduler.config.touch_drag&&(k=setTimeout(function(){i=!0;var a=g.target;if(a&&a.className&&a.className.indexOf("dhx_body")!=-1)a=a.previousSibling;scheduler._on_mouse_down(g,a);if(scheduler._drag_mode&&scheduler._drag_mode!="create"){var b=-1;scheduler.for_rendered(scheduler._drag_id,function(a,c){b=a.getBoundingClientRect().top;a.style.display="none";scheduler._rendered.splice(c,1)});if(b>=0){var c=scheduler.config.time_step;scheduler._move_pos_shift=c*Math.round((d.pageY-b)*60/(scheduler.config.hour_size_px*
+c))}}scheduler.config.touch_tip&&scheduler._show_global_tip();scheduler._on_mouse_move(g)},scheduler.config.touch_drag),g=d)}else j=!0}});dhtmlxEvent(this._els.dhx_cal_data[0],a[2],function(a){if(!c(a)){i||d(g,h,200);if(i)scheduler._ignore_next_click=!0;e(a);if(scheduler._block_next_stop)return scheduler._block_next_stop=!1,a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,!1}});dhtmlxEvent(document.body,a[2],e)};
+scheduler._show_global_tip=function(){scheduler._hide_global_tip();var a=scheduler._global_tip=document.createElement("DIV");a.className="dhx_global_tip";scheduler._update_global_tip(1);document.body.appendChild(a)};
+scheduler._update_global_tip=function(a){var b=scheduler._global_tip;if(b){var c="";if(scheduler._drag_id&&!a){var d=scheduler.getEvent(scheduler._drag_id);d&&(c="<div>"+(d._timed?scheduler.templates.event_header(d.start_date,d.end_date,d):scheduler.templates.day_date(d.start_date,d.end_date,d))+"</div>")}b.innerHTML=scheduler._drag_mode=="create"||scheduler._drag_mode=="new-size"?(scheduler.locale.drag_to_create||"Drag to create")+c:(scheduler.locale.drag_to_move||"Drag to move")+c}};
+scheduler._hide_global_tip=function(){var a=scheduler._global_tip;if(a&&a.parentNode)a.parentNode.removeChild(a),scheduler._global_tip=0};
+scheduler._dp_init=function(a){a._methods=["_set_event_text_style","","changeEventId","deleteEvent"];this.attachEvent("onEventAdded",function(b){!this._loading&&this._validId(b)&&a.setUpdated(b,!0,"inserted")});this.attachEvent("onConfirmedBeforeEventDelete",function(b){if(this._validId(b)){var c=a.getState(b);if(c=="inserted"||this._new_event)return a.setUpdated(b,!1),!0;if(c=="deleted")return!1;if(c=="true_deleted")return!0;a.setUpdated(b,!0,"deleted");return!1}});this.attachEvent("onEventChanged",
+function(b){!this._loading&&this._validId(b)&&a.setUpdated(b,!0,"updated")});a._getRowData=function(a){var c=this.obj.getEvent(a),d={},e;for(e in c)e.indexOf("_")!=0&&(d[e]=c[e]&&c[e].getUTCFullYear?this.obj.templates.xml_format(c[e]):c[e]);return d};a._clearUpdateFlag=function(){};a.attachEvent("insertCallback",scheduler._update_callback);a.attachEvent("updateCallback",scheduler._update_callback);a.attachEvent("deleteCallback",function(a,c){this.obj.setUserData(c,this.action_param,"true_deleted");
+this.obj.deleteEvent(c)})};scheduler._validId=function(){return!0};scheduler.setUserData=function(a,b,c){a?this.getEvent(a)[b]=c:this._userdata[b]=c};scheduler.getUserData=function(a,b){return a?this.getEvent(a)[b]:this._userdata[b]};scheduler._set_event_text_style=function(a,b){this.for_rendered(a,function(a){a.style.cssText+=";"+b});var c=this.getEvent(a);c._text_style=b;this.event_updated(c)};
+scheduler._update_callback=function(a){var b=scheduler._xmlNodeToJSON(a.firstChild);b.text=b.text||b._tagvalue;b.start_date=scheduler.templates.xml_date(b.start_date);b.end_date=scheduler.templates.xml_date(b.end_date);scheduler.addEvent(b)};scheduler._skin_settings={fix_tab_position:[1,0],use_select_menu_space:[1,0],wide_form:[1,0],hour_size_px:[44,42],displayed_event_color:["#ff4a4a","ffc5ab"],displayed_event_text_color:["#ffef80","7e2727"]};
+scheduler._skin_xy={lightbox_additional_height:[90,50],nav_height:[59,22],bar_height:[24,20]};scheduler._configure=function(a,b,c){for(var d in b)typeof a[d]=="undefined"&&(a[d]=b[d][c])};
+scheduler._skin_init=function(){if(!scheduler.skin)for(var a=document.getElementsByTagName("link"),b=0;b<a.length;b++){var c=a[b].href.match("dhtmlxscheduler_([a-z]+).css");if(c){scheduler.skin=c[1];break}}var d=0;scheduler.skin&&scheduler.skin!="terrace"&&(d=1);this._configure(scheduler.config,scheduler._skin_settings,d);this._configure(scheduler.xy,scheduler._skin_xy,d);if(!d){var e=scheduler.config.minicalendar;if(e)e.padding=14;scheduler.templates.event_bar_date=function(a){return"\u2022 <b>"+
+scheduler.templates.event_date(a)+"</b> "};scheduler.attachEvent("onTemplatesReady",function(){var a=scheduler.date.date_to_str("%d"),b=scheduler.templates.month_day;scheduler.templates.month_day=function(c){if(this._mode=="month"){var d=a(c);c.getDate()==1&&(d=scheduler.locale.date.month_full[c.getMonth()]+" "+d);+c==+scheduler.date.date_part(new Date)&&(d=scheduler.locale.labels.dhx_cal_today_button+" "+d);return d}else return b.call(this,c)};if(scheduler.config.fix_tab_position)for(var c=scheduler._els.dhx_cal_navline[0].getElementsByTagName("div"),
+d=[],e=211,j=0;j<c.length;j++){var l=c[j],n=l.getAttribute("name");if(n)switch(l.style.right="auto",n){case "day_tab":l.style.left="14px";l.className+=" dhx_cal_tab_first";break;case "week_tab":l.style.left="75px";break;case "month_tab":l.style.left="136px";l.className+=" dhx_cal_tab_last";break;default:l.style.left=e+"px",l.className+=" dhx_cal_tab_standalone",e=e+14+l.offsetWidth}}});scheduler._skin_init=function(){}}};
+window.jQuery&&function(a){var b=[];a.fn.dhx_scheduler=function(c){if(typeof c==="string")if(b[c])return b[c].apply(this,[]);else a.error("Method "+c+" does not exist on jQuery.dhx_scheduler");else{var d=[];this.each(function(){if(this&&this.getAttribute&&!this.getAttribute("dhxscheduler")){for(var a in c)a!="data"&&(scheduler.config[a]=c[a]);if(!this.getElementsByTagName("div").length)this.innerHTML='<div class="dhx_cal_navline"><div class="dhx_cal_prev_button">&nbsp;</div><div class="dhx_cal_next_button">&nbsp;</div><div class="dhx_cal_today_button"></div><div class="dhx_cal_date"></div><div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div><div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div><div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div></div><div class="dhx_cal_header"></div><div class="dhx_cal_data"></div>',
+this.className+=" dhx_cal_container";scheduler.init(this,scheduler.config.date,scheduler.config.mode);c.data&&scheduler.parse(c.data);d.push(scheduler)}});return d.length===1?d[0]:d}}}(jQuery);
diff --git a/codebase/dhtmlxscheduler_classic.css b/codebase/dhtmlxscheduler_classic.css
new file mode 100644
index 0000000..8b2ec1b
--- /dev/null
+++ b/codebase/dhtmlxscheduler_classic.css
@@ -0,0 +1,6 @@
+@charset "UTF-8";
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+.dhtmlx_message_area{position:fixed;right:5px;width:250px;z-index:1000;}.dhtmlx-info{min-width:120px;padding:4px 4px 4px 20px;font-family:Tahoma;z-index:10000;margin:5px;margin-bottom:10px;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;}.dhtmlx-info.hidden{height:0;padding:0;border-width:0;margin:0;overflow:hidden;}.dhtmlx_modal_box{overflow:hidden;display:inline-block;min-width:300px;width:300px;text-align:center;position:fixed;background-color:#fff;background:-webkit-linear-gradient(top,#fff 1%,#d0d0d0 99%);background:-moz-linear-gradient(top,#fff 1%,#d0d0d0 99%);box-shadow:0 0 14px #888;font-family:Tahoma;z-index:20000;border-radius:6px;border:1px solid #fff;}.dhtmlx_popup_title{border-top-left-radius:5px;border-top-right-radius:5px;border-width:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC);background-image:-webkit-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 97%,#393939 97%);background-image:-moz-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 97%,#393939 97%);}.dhtmlx-info,.dhtmlx_popup_button,.dhtmlx_button{user-select:none;-webkit-user-select:none;-moz-user-select:-moz-none;cursor:pointer;}.dhtmlx_popup_text{overflow:hidden;}.dhtmlx_popup_controls{border-radius:6px;padding:5px;}.dhtmlx_popup_button,.dhtmlx_button{height:30px;line-height:30px;display:inline-block;margin:0 5px;border-radius:6px;color:#FFF;}.dhtmlx_popup_button{min-width:120px;}div.dhx_modal_cover{background-color:#000;cursor:default;filter:alpha(opacity = 20);opacity:.2;position:fixed;z-index:19999;left:0;top:0;width:100%;height:100%;border:none;zoom:1;}.dhtmlx-info img,.dhtmlx_modal_box img{float:left;margin-right:20px;}.dhtmlx-alert-error .dhtmlx_popup_title,.dhtmlx-confirm-error .dhtmlx_popup_title{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC);}.dhtmlx-alert-error,.dhtmlx-confirm-error{border:1px solid #f00;}.dhtmlx_button,.dhtmlx_popup_button{box-shadow:0 0 4px #888;border:1px solid #838383;}.dhtmlx_button input,.dhtmlx_popup_button div{border:1px solid #FFF;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=);background-image:-webkit-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 99%);background-image:-moz-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 99%);border-radius:6px;font-size:15px;font-weight:normal;-moz-box-sizing:content-box;box-sizing:content-box;color:#fff;padding:0;margin:0;vertical-align:top;height:28px;line-height:28px;}.dhtmlx_button input:focus,.dhtmlx_button input:active,.dhtmlx_popup_button div:active,.dhtmlx_popup_button div:focus{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==);background-image:-webkit-linear-gradient(top,#707070 1%,#4c4c4c 99%);background-image:-moz-linear-gradient(top,#707070 1%,#4c4c4c 99%);}.dhtmlx_popup_title{color:#fff;text-shadow:1px 1px #000;height:40px;line-height:40px;font-size:20px;}.dhtmlx_popup_text{margin:15px 15px 5px 15px;font-size:14px;color:#000;min-height:30px;border-radius:6px;}.dhtmlx-info,.dhtmlx-error{font-size:14px;color:#000;box-shadow:0 0 10px #888;padding:0;background-color:#FFF;border-radius:3px;border:1px solid #fff;}.dhtmlx-info div{padding:5px 10px 5px 10px;background-color:#fff;border-radius:3px;border:1px solid #B8B8B8;}.dhtmlx-error{background-color:#d81b1b;border:1px solid #ff3c3c;box-shadow:0 0 10px #000;}.dhtmlx-error div{background-color:#d81b1b;border:1px solid #940000;color:#FFF;}.dhx_cal_container{background-color:#C2D5FC;font-family:Tahoma;font-size:8pt;position:relative;overflow:hidden;}.dhx_cal_container div{-moz-user-select:none;-moz-user-select:-moz-none;}.dhx_cal_navline{height:20px;position:absolute;z-index:3;width:750px;color:#2F3A48;}.dhx_cal_navline div{position:absolute;top:2px;white-space:nowrap;}.dhx_cal_navline .dhx_cal_date{font-weight:600;left:210px;padding-top:1px;}.dhx_cal_button .dhx_left_bg{width:1px;overflow:hidden;height:17px;z-index:20;top:0;}.dhx_cal_prev_button{background-image:url(imgs/buttons.png);background-position:0 0;width:29px;height:17px;left:50px;cursor:pointer;}.dhx_cal_next_button{background-image:url(imgs/buttons.png);background-position:-30px 0;width:29px;height:17px;left:80px;cursor:pointer;}.dhx_cal_today_button{background-image:url(imgs/buttons.png);background-position:-60px 0;width:75px;height:17px;left:112px;cursor:pointer;text-align:center;text-decoration:underline;}.dhx_cal_tab{width:59px;height:19px;text-align:center;text-decoration:underline;padding-top:2px;cursor:pointer;background-color:#D8E1EA;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;}.dhx_cal_tab.active{text-decoration:none;cursor:default;font-weight:bold;border:1px dotted #586A7E;border-bottom:0;background-color:#C2D5FC;}.dhx_cal_header{position:absolute;left:10px;top:23px;width:750px;border-top:1px dotted #8894A3;border-right:1px dotted #8894A3;z-index:2;overflow:hidden;color:#2F3A48;}.dhx_cal_data{-webkit-tap-highlight-color:transparent;border-top:1px dotted #8894A3;position:absolute;top:44px;width:600px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;}.dhx_cal_data{-ms-touch-action:pan-y;}.dhx_cal_event,.dhx_cal_event_line,.dhx_cal_event_clear{-ms-touch-action:none;}.dhx_scale_bar{position:absolute;text-align:center;background-color:#C2D5FC;padding-top:3px;border-left:1px dotted #586A7E;}.dhx_scale_holder{position:absolute;border-right:1px dotted #586A7E;background-image:url(imgs/databg.png);}.dhx_scale_holder_now{position:absolute;border-right:1px dotted #586A7E;background-image:url(imgs/databg_now.png);}.dhx_scale_hour{height:41px;width:50px;border-bottom:1px dotted #8894A3;background-color:#C2D5FC;text-align:center;line-height:40px;color:#586A7E;overflow:hidden;}.dhx_month_head{background-color:#EBEFF4;color:#2F3A48;height:18px;padding-right:5px;padding-top:3px;text-align:right;border-right:1px dotted #586A7E;}.dhx_month_body{border-right:1px dotted #586A7E;border-bottom:1px dotted #586A7E;background-color:#FFF;}.dhx_now .dhx_month_body{background-color:#E2EDFF;}.dhx_after .dhx_month_body,.dhx_before .dhx_month_body{background-color:#ECECEC;}.dhx_after .dhx_month_head,.dhx_before .dhx_month_head{background-color:#E2E3E6;color:#94A6BB;}.dhx_now .dhx_month_head{background-color:#D1DEF4;font-weight:bold;}.dhx_cal_drag{position:absolute;z-index:9999;background-color:#FFE763;border:1px solid #B7A543;opacity:.5;filter:alpha(opacity=50);}.dhx_loading{position:absolute;width:128px;height:15px;background-image:url(imgs/loading.gif);z-index:9999;}.dhx_multi_day_icon,.dhx_multi_day{background-color:#E1E6FF;background-repeat:no-repeat;border-right:1px dotted #8894A3;}.dhx_multi_day{position:absolute;border-top:1px dotted #8894A3;}.dhx_multi_day_icon,.dhx_multi_day_icon_small{background-position:center center;background-color:#E1E6FF;background-repeat:no-repeat;border-bottom:1px dotted #8894A3;border-right:1px dotted #8894A3;}.dhx_multi_day_icon{background-image:url(imgs/clock_big.gif);}.dhx_multi_day_icon_small{background-image:url(imgs/clock_small.gif);}.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container{background-color:#d0e5ff;}.dhx_scale_hour_border,.dhx_month_body_border,.dhx_scale_bar_border,.dhx_month_head_border{border-left:1px dotted #8894A3;}.dhx_cal_navline .dhx_cal_export{width:18px;height:18px;margin:2px;cursor:pointer;top:0;}.dhx_cal_navline .dhx_cal_export.pdf{left:2px;background-image:url('imgs/export_pdf.png');}.dhx_cal_navline .dhx_cal_export.ical{left:24px;background-image:url('imgs/export_ical.png');}.dhx_cal_event .dhx_header,.dhx_cal_event .dhx_title,.dhx_cal_event .dhx_body,.dhx_cal_event .dhx_footer{background-color:#FFE763;border:1px solid #B7A543;color:#887A2E;overflow:hidden;width:100%;font-family:Tahoma;font-size:8pt;}.dhx_move_denied .dhx_cal_event .dhx_header,.dhx_move_denied .dhx_cal_event .dhx_title{cursor:default;}.dhx_cal_event .dhx_header{height:1px;margin-left:1px;border-width:1px 1px 0 1px;cursor:pointer;}.dhx_cal_event .dhx_title{height:12px;border-width:0 1px 1px 1px;border-bottom-style:dotted;font-size:7pt;font-weight:bold;text-align:center;background-position:right;background-repeat:no-repeat;cursor:pointer;}.dhx_cal_event .dhx_body,.dhx_cal_event.dhx_cal_select_menu .dhx_body{border-width:0 1px 1px 1px;padding:5px;}.dhx_resize_denied,.dhx_resize_denied .dhx_event_resize{cursor:default!important;}.dhx_cal_event .dhx_event_resize{cursor:s-resize;}.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_select_menu_footer{height:1px;margin-left:2px;border-width:0 1px 1px 1px;position:relative;}.dhx_cal_event_line{background-color:#FFE763;border:1px solid #B7A543;border-radius:3px;font-family:Tahoma;font-size:8pt;height:13px;padding-left:10px;color:#887A2E;cursor:pointer;overflow:hidden;}.dhx_cal_event_clear{font-family:Tahoma;font-size:8pt;height:13px;padding-left:2px;color:#887A2E;white-space:nowrap;overflow:hidden;cursor:pointer;}.dhx_in_move{background-color:#FFFF80;}div.dhx_cal_editor{background-color:#FFE763;border:1px solid #B7A543;border-top-style:dotted;z-index:999;position:absolute;overflow:hidden;}textarea.dhx_cal_editor{width:100%;height:100%;border:0 solid black;margin:0;padding:0;overflow:auto;}div.dhx_menu_head{background-image:url(imgs/controls.gif);background-position:0 -43px;width:10px;height:10px;margin-left:5px;margin-top:1px;border:none;cursor:default;}div.dhx_menu_icon{background-image:url(imgs/controls.gif);width:20px;height:20px;margin-left:-5px;margin-top:0;border:none;cursor:pointer;}div.icon_details{background-position:0 0;}div.icon_edit{background-position:-22px 0;}div.icon_save{background-position:-84px -1px;}div.icon_cancel{background-position:-62px 0;}div.icon_delete{background-position:-42px 0;}.dhx_month_link{position:absolute;box-sizing:border-box;-moz-box-sizing:border-box;text-align:right;cursor:pointer;padding-right:10px;}.dhx_month_link a{color:blue;}.dhx_month_link a:hover{text-decoration:underline;}.dhx_global_tip{font-family:Tahoma,Helvetica;text-align:center;font-size:20px;position:fixed;top:60px;right:20px;background-color:rgba(255,255,255,0.7);color:#000;z-index:10000;padding:20px 30px;width:190px;}.dhx_global_tip div{font-size:30px;}@media(-moz-touch-enabled){.dhx_cal_container{user-select:none;-moz-user-select:none;}}.dhx_unselectable,.dhx_unselectable div{-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none;}.dhx_cal_light{-webkit-tap-highlight-color:transparent;background-color:#FFE763;border-radius:5px;font-family:Tahoma;font-size:8pt;border:1px solid #B7A64B;color:#887A2E;position:absolute;z-index:10001;width:580px;height:300px;box-shadow:5px 5px 5px #888;}.dhx_cal_light_wide{width:650px;}.dhx_mark{position:relative;top:3px;background-image:url('./imgs/controls.gif');background-position:0 -43px;padding-left:10px;}.dhx_ie6 .dhx_mark{background-position:6px -41px;}.dhx_cal_light select{font-family:Tahoma;font-size:8pt;color:#887A2E;padding:2px;margin:0;}.dhx_cal_ltitle{padding:2px 0 2px 5px;overflow:hidden;white-space:nowrap;}.dhx_cal_ltitle span{white-space:nowrap;}.dhx_cal_lsection{background-color:#DBCF8C;color:#FFF4B5;font-weight:bold;padding:5px 0 3px 10px;}.dhx_section_time{background-color:#DBCF8C;white-space:nowrap;}.dhx_cal_lsection .dhx_fullday{float:right;margin-right:5px;color:#887A2E;font-size:12px;font-weight:normal;line-height:20px;vertical-align:top;cursor:pointer;}.dhx_cal_lsection{font-size:18px;font-family:Arial;}.dhx_cal_ltext{padding:2px 0 2px 10px;overflow:hidden;}.dhx_cal_ltext textarea{background-color:#FFF4B5;overflow:auto;border:none;color:#887A2E;height:100%;width:100%;outline:none!important;resize:none;}.dhx_time{font-weight:bold;}.dhx_cal_light .dhx_title{padding-left:10px;}.dhx_cal_larea{border:1px solid #DCC43E;background-color:#FFF4B5;overflow:hidden;margin-left:3px;width:572px;height:1px;}.dhx_btn_set{padding:5px 10px 0 10px;float:left;}.dhx_btn_set div{float:left;height:21px;line-height:21px;vertical-align:middle;cursor:pointer;}.dhx_save_btn{background-image:url('./imgs/controls.gif');background-position:-84px 0;width:21px;}.dhx_cancel_btn{background-image:url('./imgs/controls.gif');background-position:-63px 0;width:20px;}.dhx_delete_btn{background-image:url('./imgs/controls.gif');background-position:-42px 0;width:20px;}.dhx_cal_cover{width:100%;height:100%;position:absolute;z-index:10000;top:0;left:0;background-color:black;opacity:.1;filter:alpha(opacity=10);}.dhx_custom_button{padding:0 3px 0 3px;color:#887A2E;font-family:Tahoma;font-size:8pt;background-color:#FFE763;font-weight:normal;margin-right:5px;margin-top:0;cursor:pointer;}.dhx_custom_button div{cursor:pointer;float:left;height:21px;line-height:21px;vertical-align:middle;}.dhx_cal_light_wide .dhx_cal_larea{border-top-width:0;}.dhx_cal_light_wide .dhx_cal_lsection{border:0;float:left;text-align:right;width:100px;height:20px;font-size:16px;padding:5px 0 0 10px;}.dhx_cal_light_wide .dhx_wrap_section{border-top:1px solid #DBCF8C;position:relative;background-color:#DBCF8C;overflow:hidden;}.dhx_cal_light_wide .dhx_section_time{padding-top:2px!important;height:20px!important;}.dhx_section_time{text-align:center;}.dhx_cal_light_wide .dhx_cal_larea{width:730px;}.dhx_cal_light_wide{width:738px;}.dhx_cal_light_wide .dhx_section_time{background:transparent;}.dhx_cal_light_wide .dhx_cal_checkbox label{padding-left:0;}.dhx_cal_wide_checkbox input{margin-top:8px;margin-left:14px;}.dhx_cal_light input{font-family:Tahoma;font-size:8pt;color:#887A2E;}.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{float:none;margin-right:0;color:#FFF4B5;font-weight:bold;font-size:16px;font-family:Arial;cursor:pointer;}.dhx_custom_button{float:right;height:21px;width:90px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;}.dhx_cal_light_wide .dhx_custom_button{position:absolute;top:0;right:0;margin-top:2px;}.dhx_cal_light_wide .dhx_repeat_right{margin-right:55px;}.dhx_minical_popup{position:absolute;z-index:10100;width:251px;height:175px;}.dhx_scale_bar_header{position:absolute;border-bottom:1px dotted #8894A3;width:100%;}.dhx_expand_icon{position:absolute;top:0;right:0;background-image:url(./imgs/collapse_expand_icon.gif);width:18px;height:18px;cursor:pointer;background-position:0 18px;z-index:16;}.dhx_scheduler_agenda .dhx_cal_data{background-image:url(./imgs/databg.png);}.dhx_agenda_area{width:100%;overflow-y:auto;background-image:url(./imgs/databg.png);}.dhx_agenda_line{height:21px;clear:both;overflow:hidden;}.dhx_agenda_line div{float:left;width:188px;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_agenda_area .dhx_agenda_line div{border-right:0 dotted #8894A3;}.dhx_v_border{position:absolute;left:187px;top:0;border-right:1px dotted #8894A3;width:1px;height:100%;}.dhx_agenda_line .dhx_event_icon{width:20px;border-width:0;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_agenda_line span{padding-left:5px;line-height:21px;}.dhx_year_body{border-left:1px dotted #586A7E;}.dhx_year_week{position:relative;}.dhx_scale_bar_last{border-right:1px dotted #586A7E;}.dhx_year_month{height:18px;padding-top:3px;border:1px dotted #586A7E;text-align:center;vertical-align:middle;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head,.dhx_year_body .dhx_before .dhx_month_head a,.dhx_year_body .dhx_after .dhx_month_head a{color:#E2E3E6!important;}.dhx_year_body .dhx_month_body{height:0;overflow:hidden;}.dhx_month_head.dhx_year_event{background-color:#FFE763;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head{cursor:default;}.dhx_year_tooltip{border:1px solid #BBB;background-image:url(./imgs/databg.png);position:absolute;z-index:9998;width:300px;height:auto;font-family:Tahoma;font-size:8pt;overflow:hidden;}.dhx_tooltip_line{line-height:20px;height:20px;overflow:hidden;}.dhx_tooltip_line .dhx_event_icon{width:20px;height:20px;padding-right:10px;float:left;border-width:0;position:relative;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_tooltip_date{float:left;width:auto;padding-left:5px;text-align:center;}.dhx_text_disabled{color:#887A2E;font-family:Tahoma;font-size:8pt;}.dhx_mini_calendar{-moz-box-shadow:5px 5px 5px #888;-khtml-box-shadow:5px 5px 5px #888;-moz-user-select:-moz-none;-webkit-user-select:none;-user-select:none;}.dhx_mini_calendar .dhx_month_head{cursor:pointer;}.dhx_mini_calendar .dhx_calendar_click{background-color:#C2D5FC;}.dhx_cal_navline div.dhx_minical_icon{width:18px;height:18px;left:190px;top:1px;cursor:pointer;background-image:url(./imgs/calendar.gif);}.dhx_matrix_scell{height:100%;}.dhx_matrix_cell,.dhx_matrix_scell{overflow:hidden;text-align:center;vertical-align:middle;border-bottom:1px dotted #8894A3;border-right:1px dotted #8894A3;}.dhx_matrix_cell{background-color:white;}.dhx_matrix_line{overflow:hidden;}.dhx_matrix_cell div,.dhx_matrix_scell div{overflow:hidden;text-align:center;height:auto;}.dhx_cal_lsection .dhx_readonly{font-size:9pt;font-size:8pt;padding:2px;color:#887A2E;}.dhx_cal_event_line .dhx_event_resize{cursor:w-resize;background:url(./imgs/resize_dots.png) repeat-y;position:absolute;top:0;width:4px;}.dhx_event_resize_start{left:0;}.dhx_event_resize_end{right:0;}.dhx_matrix_scell.folder,.dhx_data_table.folder .dhx_matrix_cell{background-color:#969394;cursor:pointer;}.dhx_matrix_scell .dhx_scell_level0{padding-left:5px;}.dhx_matrix_scell .dhx_scell_level1{padding-left:20px;}.dhx_matrix_scell .dhx_scell_level2{padding-left:35px;}.dhx_matrix_scell .dhx_scell_level3{padding-left:50px;}.dhx_matrix_scell .dhx_scell_level4{padding-left:65px;}.dhx_matrix_scell.folder{font-weight:bold;text-align:left;}.dhx_matrix_scell.folder .dhx_scell_expand{float:left;width:10px;padding-right:3px;}.dhx_matrix_scell.folder .dhx_scell_name{float:left;width:auto;}.dhx_matrix_scell.item .dhx_scell_name{padding-left:15px;text-align:left;}.dhx_data_table.folder .dhx_matrix_cell{border-right:0;}.dhx_section_timeline{overflow:hidden;padding:4px 0 2px 10px;}.dhx_section_timeline select{width:552px;}.dhx_map_area{width:100%;height:100%;overflow-y:auto;overflow-x:hidden;background-image:url(./imgs/databg.png);}.dhx_map_line .dhx_event_icon{width:20px;border-width:0;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_map_line{height:21px;clear:both;overflow:hidden;}.dhx_map{position:absolute;}.dhx_map_line div{float:left;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .headline_description{float:left;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .dhx_map_description{float:left;border-right:0 dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .headline_date,.dhx_map_line .headline_description{border-left:0;}.dhx_map_line .line_description{float:left;border-right:1px dotted #8894A3;text-align:left;padding-left:5px;line-height:21px;overflow:hidden;}.dhx_map_line.highlight{background-color:#C4C5CC;}.dhx_map_area .dhx_map_line div{border-right:0 dotted #8894A3;}.dhtmlXTooltip.tooltip{-moz-box-shadow:3px 3px 3px #888;-webkit-box-shadow:3px 3px 3px #888;-o-box-shadow:3px 3px 3px #888;box-shadow:3px 3px 3px #888;filter:progid:DXImageTransform.Microsoft.Shadow(color='#888888',Direction=135,Strength=5);background-color:white;border-left:1px dotted #887A2E;border-top:1px dotted #887A2E;color:#887A2E;cursor:default;padding:10px;position:absolute;z-index:500;font-family:Tahoma;font-size:8pt;}.dhx_cal_checkbox label{padding-left:5px;}.dhx_cal_light .radio{padding:2px 0 2px 10px;}.dhx_cal_light .radio input,.dhx_cal_light .radio label{line-height:15px;}.dhx_cal_light .radio input{vertical-align:middle;margin:0;padding:0;}.dhx_cal_light .radio label{vertical-align:middle;padding-right:10px;}.dhx_cal_light .combo{padding:4px;}.dhx_cal_light_wide .dhx_combo_box{width:608px!important;left:10px;}.dhx_wa_column{float:left;}.dhx_wa_column_last .dhx_wa_day_cont{border-left:1px dotted #8894A3;}.dhx_wa_scale_bar{font-family:Tahoma;padding-left:10px;font-size:11px;border-top:1px dotted #8894A3;border-bottom:1px dotted #8894A3;}.dhx_wa_day_data{background-color:#FCFEFC;overflow-y:auto;}.dhx_wa_ev_body{border-bottom:1px dotted #789;font-size:12px;padding:5px 0 5px 7px;}.dhx_wa_dnd{font-family:Tahoma;position:absolute;padding-right:7px;color:#887AE2!important;background-color:#FFE763!important;border:1px solid #B7A543;}.dhx_cal_event_selected{background-color:#9cc1db;color:white;}.dhx_second_scale_bar{border-bottom:1px dotted #586A7E;padding-top:2px;}.dhx_cal_header div div{border-left:1px dotted #8894A3;}.dhx_grid_area{width:100%;height:100%;overflow-y:auto;background-color:#FCFEFC;}.dhx_grid_area table{border-collapse:collapse;border-spacing:0;width:100%;table-layout:fixed;}.dhx_grid_area td{table-layout:fixed;text-align:center;}.dhx_grid_line{height:21px;clear:both;overflow:hidden;}.dhx_grid_line div{float:left;cursor:default;padding-top:0;padding-bottom:0;text-align:center;line-height:21px;overflow:hidden;}.dhx_grid_area td,.dhx_grid_line div{padding-left:8px;padding-right:8px;}.dhx_grid_area tr.dhx_grid_event{height:21px;overflow:hidden;margin:0 0 1px 0;}.dhx_grid_area tr.dhx_grid_event td{border-bottom:1px solid #ECEEF4;}.dhx_grid_area tr.dhx_grid_event:nth-child(2n+1) td,.dhx_grid_area tr.dhx_grid_event:nth-child(2n) td{border-bottom-width:0;border-bottom-style:none;}.dhx_grid_area tr.dhx_grid_event:nth-child(2n){background-color:#ECEEF4;;}.dhx_grid_area .dhx_grid_dummy{table-layout:auto;margin:0!important;padding:0!important;}.dhx_grid_v_border{position:absolute;border-right:1px solid #A4BED4;width:1px;height:100%;}.dhx_grid_event_selected{background-color:#9cc1db!important;color:white!important;}.dhx_grid_sort_desc .dhx_grid_view_sort{background-position:0 -55px;}.dhx_grid_sort_asc .dhx_grid_view_sort{background-position:0 -66px;}.dhx_grid_view_sort{width:10px;height:10px;position:absolute;border:none!important;top:5px;background-repeat:no-repeat;background-image:url(./imgs/images.png);}.dhx_marked_timespan{position:absolute;width:100%;}.dhx_time_block{position:absolute;width:100%;background:silver;opacity:.4;filter:alpha(opacity=40);z-index:1;}.dhx_time_block_reset{opacity:1;filter:alpha(opacity=100);}.dhx_scheduler_month .dhx_marked_timespan{display:none;}.dhx_mini_calendar .dhx_marked_timespan{display:none;}.dhx_now_time{width:100%;border-bottom:2px dotted red;z-index:1;}.dhx_scheduler_month .dhx_now_time{border-bottom:0;border-left:2px dotted red;}.dhx_matrix_now_time{border-left:2px dotted red;z-index:1;}.dhx_cal_quick_info{border:2px solid #888;border-radius:5px;position:absolute;z-index:300;background-color:#8e99ae;background-color:rgba(98,107,127,0.5);padding-left:7px;width:300px;transition:left .5s ease,right .5s;-moz-transition:left .5s ease,right .5s;-webkit-transition:left .5s ease,right .5s;-o-transition:left .5s ease,right .5s;}.dhx_no_animate{transition:none;-moz-transition:none;-webkit-transition:none;-o-transition:none;}.dhx_cal_quick_info.dhx_qi_left .dhx_qi_big_icon{float:right;}.dhx_cal_qi_title{padding:5px 0 10px 5px;color:#FFF;letter-spacing:1px;}.dhx_cal_qi_tdate{font-size:14px;}.dhx_cal_qi_tcontent{font-size:18px;font-weight:bold;}.dhx_cal_qi_content{border:1px solid #888;background-color:#fefefe;padding:16px 8px;font-size:14px;color:#444;width:275px;overflow:hidden;}.dhx_qi_big_icon{border-radius:3px;color:#444;margin:5px 9px 5px 0;min-width:60px;line-height:20px;vertical-align:middle;padding:5px 10px 5px 5px;cursor:pointer;background-color:#fefefe;border-bottom:1px solid #666;border-right:1px solid #666;float:left;}.dhx_cal_qi_controls div{float:left;height:20px;text-align:center;line-height:20px;}.dhx_qi_big_icon .dhx_menu_icon{margin:0 8px 0 0;}div.dhx_form_repeat input.radio{margin:-4px 0 0 -4px!ie;}div.dhx_form_repeat input.checkbox{margin:0 0 0 -4px!ie;}.dhx_form_repeat,.dhx_form_repeat input{padding:0;margin:0;padding-left:5px;font-family:Tahoma,Verdana;font-size:11px;line-height:24px;}.dhx_form_repeat{overflow:hidden;height:0;background-color:#FFF4B5;}.dhx_cal_light_wide .dhx_form_repeat{background-color:transparent;}.dhx_repeat_center,.dhx_repeat_left{height:115px;padding:10px 0 10px 10px;float:left;}.dhx_repeat_left{width:95px;}.dhx_repeat_center{width:335px;margin-top:12px;}.dhx_repeat_divider{float:left;height:115px;border-left:1px dotted #DCC43E;width:1px;}.dhx_repeat_right{float:right;height:115px;width:160px;padding:10px 3px 10px 10px;margin-top:7px;}input.dhx_repeat_text{height:16px;width:27px;margin:0 4px 0 4px;line-height:18px;padding:0 0 0 2px;}.dhx_form_repeat select{height:20px;width:87px;padding:0 0 0 2px;margin:0 4px 0 4px;}input.dhx_repeat_date{height:18px;width:80px;padding:0 0 0 2px;margin:0 4px 0 4px;background-repeat:no-repeat;background-position:64px 0;border:1px #7f9db9 solid;line-height:18px;}input.dhx_repeat_radio{margin-right:4px;}input.dhx_repeat_checkbox{margin:4px 4px 0 0;}.dhx_repeat_days td{padding-right:5px;}.dhx_repeat_days label{font-size:10px;}.dhx_custom_button{width:90px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;}.dhx_custom_button_recurring{background-image:url(./imgs/but_repeat.gif);background-position:-5px 20px;width:20px;margin-right:10px;}.dhx_cal_light_rec{width:640px;}.dhx_cal_light_rec .dhx_cal_larea{width:632px;}.dhx_cal_light_rec.dhx_cal_light_wide{width:816px;}.dhx_cal_light_rec.dhx_cal_light_wide .dhx_cal_larea{width:808px;} \ No newline at end of file
diff --git a/codebase/dhtmlxscheduler_glossy.css b/codebase/dhtmlxscheduler_glossy.css
new file mode 100644
index 0000000..45c6ff7
--- /dev/null
+++ b/codebase/dhtmlxscheduler_glossy.css
@@ -0,0 +1,6 @@
+@charset "UTF-8";
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+.dhtmlx_message_area{position:fixed;right:5px;width:250px;z-index:1000;}.dhtmlx-info{min-width:120px;padding:4px 4px 4px 20px;font-family:Tahoma;z-index:10000;margin:5px;margin-bottom:10px;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;}.dhtmlx-info.hidden{height:0;padding:0;border-width:0;margin:0;overflow:hidden;}.dhtmlx_modal_box{overflow:hidden;display:inline-block;min-width:300px;width:300px;text-align:center;position:fixed;background-color:#fff;background:-webkit-linear-gradient(top,#fff 1%,#d0d0d0 99%);background:-moz-linear-gradient(top,#fff 1%,#d0d0d0 99%);box-shadow:0 0 14px #888;font-family:Tahoma;z-index:20000;border-radius:6px;border:1px solid #fff;}.dhtmlx_popup_title{border-top-left-radius:5px;border-top-right-radius:5px;border-width:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC);background-image:-webkit-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 97%,#393939 97%);background-image:-moz-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 97%,#393939 97%);}.dhtmlx-info,.dhtmlx_popup_button,.dhtmlx_button{user-select:none;-webkit-user-select:none;-moz-user-select:-moz-none;cursor:pointer;}.dhtmlx_popup_text{overflow:hidden;}.dhtmlx_popup_controls{border-radius:6px;padding:5px;}.dhtmlx_popup_button,.dhtmlx_button{height:30px;line-height:30px;display:inline-block;margin:0 5px;border-radius:6px;color:#FFF;}.dhtmlx_popup_button{min-width:120px;}div.dhx_modal_cover{background-color:#000;cursor:default;filter:alpha(opacity = 20);opacity:.2;position:fixed;z-index:19999;left:0;top:0;width:100%;height:100%;border:none;zoom:1;}.dhtmlx-info img,.dhtmlx_modal_box img{float:left;margin-right:20px;}.dhtmlx-alert-error .dhtmlx_popup_title,.dhtmlx-confirm-error .dhtmlx_popup_title{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC);}.dhtmlx-alert-error,.dhtmlx-confirm-error{border:1px solid #f00;}.dhtmlx_button,.dhtmlx_popup_button{box-shadow:0 0 4px #888;border:1px solid #838383;}.dhtmlx_button input,.dhtmlx_popup_button div{border:1px solid #FFF;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=);background-image:-webkit-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 99%);background-image:-moz-linear-gradient(top,#707070 1%,#3d3d3d 70%,#4c4c4c 99%);border-radius:6px;font-size:15px;font-weight:normal;-moz-box-sizing:content-box;box-sizing:content-box;color:#fff;padding:0;margin:0;vertical-align:top;height:28px;line-height:28px;}.dhtmlx_button input:focus,.dhtmlx_button input:active,.dhtmlx_popup_button div:active,.dhtmlx_popup_button div:focus{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==);background-image:-webkit-linear-gradient(top,#707070 1%,#4c4c4c 99%);background-image:-moz-linear-gradient(top,#707070 1%,#4c4c4c 99%);}.dhtmlx_popup_title{color:#fff;text-shadow:1px 1px #000;height:40px;line-height:40px;font-size:20px;}.dhtmlx_popup_text{margin:15px 15px 5px 15px;font-size:14px;color:#000;min-height:30px;border-radius:6px;}.dhtmlx-info,.dhtmlx-error{font-size:14px;color:#000;box-shadow:0 0 10px #888;padding:0;background-color:#FFF;border-radius:3px;border:1px solid #fff;}.dhtmlx-info div{padding:5px 10px 5px 10px;background-color:#fff;border-radius:3px;border:1px solid #B8B8B8;}.dhtmlx-error{background-color:#d81b1b;border:1px solid #ff3c3c;box-shadow:0 0 10px #000;}.dhtmlx-error div{background-color:#d81b1b;border:1px solid #940000;color:#FFF;}.dhx_cal_container{background-color:#C2D5FC;font-family:Tahoma;font-size:8pt;position:relative;overflow:hidden;}.dhx_cal_container div{-moz-user-select:none;-moz-user-select:-moz-none;}.dhx_cal_navline{height:20px;position:absolute;z-index:3;width:750px;color:#2F3A48;}.dhx_cal_navline div{position:absolute;top:2px;white-space:nowrap;}.dhx_cal_navline .dhx_cal_date{font-weight:600;left:210px;padding-top:1px;}.dhx_cal_button .dhx_left_bg{width:1px;overflow:hidden;height:17px;z-index:20;top:0;}.dhx_cal_prev_button{background-image:url(imgs/buttons.png);background-position:0 0;width:29px;height:17px;left:50px;cursor:pointer;}.dhx_cal_next_button{background-image:url(imgs/buttons.png);background-position:-30px 0;width:29px;height:17px;left:80px;cursor:pointer;}.dhx_cal_today_button{background-image:url(imgs/buttons.png);background-position:-60px 0;width:75px;height:17px;left:112px;cursor:pointer;text-align:center;text-decoration:underline;}.dhx_cal_tab{width:59px;height:19px;text-align:center;text-decoration:underline;padding-top:2px;cursor:pointer;background-color:#D8E1EA;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;}.dhx_cal_tab.active{text-decoration:none;cursor:default;font-weight:bold;border:1px dotted #586A7E;border-bottom:0;background-color:#C2D5FC;}.dhx_cal_header{position:absolute;left:10px;top:23px;width:750px;border-top:1px dotted #8894A3;border-right:1px dotted #8894A3;z-index:2;overflow:hidden;color:#2F3A48;}.dhx_cal_data{-webkit-tap-highlight-color:transparent;border-top:1px dotted #8894A3;position:absolute;top:44px;width:600px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;}.dhx_cal_data{-ms-touch-action:pan-y;}.dhx_cal_event,.dhx_cal_event_line,.dhx_cal_event_clear{-ms-touch-action:none;}.dhx_scale_bar{position:absolute;text-align:center;background-color:#C2D5FC;padding-top:3px;border-left:1px dotted #586A7E;}.dhx_scale_holder{position:absolute;border-right:1px dotted #586A7E;background-image:url(imgs/databg.png);}.dhx_scale_holder_now{position:absolute;border-right:1px dotted #586A7E;background-image:url(imgs/databg_now.png);}.dhx_scale_hour{height:41px;width:50px;border-bottom:1px dotted #8894A3;background-color:#C2D5FC;text-align:center;line-height:40px;color:#586A7E;overflow:hidden;}.dhx_month_head{background-color:#EBEFF4;color:#2F3A48;height:18px;padding-right:5px;padding-top:3px;text-align:right;border-right:1px dotted #586A7E;}.dhx_month_body{border-right:1px dotted #586A7E;border-bottom:1px dotted #586A7E;background-color:#FFF;}.dhx_now .dhx_month_body{background-color:#E2EDFF;}.dhx_after .dhx_month_body,.dhx_before .dhx_month_body{background-color:#ECECEC;}.dhx_after .dhx_month_head,.dhx_before .dhx_month_head{background-color:#E2E3E6;color:#94A6BB;}.dhx_now .dhx_month_head{background-color:#D1DEF4;font-weight:bold;}.dhx_cal_drag{position:absolute;z-index:9999;background-color:#FFE763;border:1px solid #B7A543;opacity:.5;filter:alpha(opacity=50);}.dhx_loading{position:absolute;width:128px;height:15px;background-image:url(imgs/loading.gif);z-index:9999;}.dhx_multi_day_icon,.dhx_multi_day{background-color:#E1E6FF;background-repeat:no-repeat;border-right:1px dotted #8894A3;}.dhx_multi_day{position:absolute;border-top:1px dotted #8894A3;}.dhx_multi_day_icon,.dhx_multi_day_icon_small{background-position:center center;background-color:#E1E6FF;background-repeat:no-repeat;border-bottom:1px dotted #8894A3;border-right:1px dotted #8894A3;}.dhx_multi_day_icon{background-image:url(imgs/clock_big.gif);}.dhx_multi_day_icon_small{background-image:url(imgs/clock_small.gif);}.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container{background-color:#d0e5ff;}.dhx_scale_hour_border,.dhx_month_body_border,.dhx_scale_bar_border,.dhx_month_head_border{border-left:1px dotted #8894A3;}.dhx_cal_navline .dhx_cal_export{width:18px;height:18px;margin:2px;cursor:pointer;top:0;}.dhx_cal_navline .dhx_cal_export.pdf{left:2px;background-image:url('imgs/export_pdf.png');}.dhx_cal_navline .dhx_cal_export.ical{left:24px;background-image:url('imgs/export_ical.png');}.dhx_cal_event .dhx_header,.dhx_cal_event .dhx_title,.dhx_cal_event .dhx_body,.dhx_cal_event .dhx_footer{background-color:#FFE763;border:1px solid #B7A543;color:#887A2E;overflow:hidden;width:100%;font-family:Tahoma;font-size:8pt;}.dhx_move_denied .dhx_cal_event .dhx_header,.dhx_move_denied .dhx_cal_event .dhx_title{cursor:default;}.dhx_cal_event .dhx_header{height:1px;margin-left:1px;border-width:1px 1px 0 1px;cursor:pointer;}.dhx_cal_event .dhx_title{height:12px;border-width:0 1px 1px 1px;border-bottom-style:dotted;font-size:7pt;font-weight:bold;text-align:center;background-position:right;background-repeat:no-repeat;cursor:pointer;}.dhx_cal_event .dhx_body,.dhx_cal_event.dhx_cal_select_menu .dhx_body{border-width:0 1px 1px 1px;padding:5px;}.dhx_resize_denied,.dhx_resize_denied .dhx_event_resize{cursor:default!important;}.dhx_cal_event .dhx_event_resize{cursor:s-resize;}.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_select_menu_footer{height:1px;margin-left:2px;border-width:0 1px 1px 1px;position:relative;}.dhx_cal_event_line{background-color:#FFE763;border:1px solid #B7A543;border-radius:3px;font-family:Tahoma;font-size:8pt;height:13px;padding-left:10px;color:#887A2E;cursor:pointer;overflow:hidden;}.dhx_cal_event_clear{font-family:Tahoma;font-size:8pt;height:13px;padding-left:2px;color:#887A2E;white-space:nowrap;overflow:hidden;cursor:pointer;}.dhx_in_move{background-color:#FFFF80;}div.dhx_cal_editor{background-color:#FFE763;border:1px solid #B7A543;border-top-style:dotted;z-index:999;position:absolute;overflow:hidden;}textarea.dhx_cal_editor{width:100%;height:100%;border:0 solid black;margin:0;padding:0;overflow:auto;}div.dhx_menu_head{background-image:url(imgs/controls.gif);background-position:0 -43px;width:10px;height:10px;margin-left:5px;margin-top:1px;border:none;cursor:default;}div.dhx_menu_icon{background-image:url(imgs/controls.gif);width:20px;height:20px;margin-left:-5px;margin-top:0;border:none;cursor:pointer;}div.icon_details{background-position:0 0;}div.icon_edit{background-position:-22px 0;}div.icon_save{background-position:-84px -1px;}div.icon_cancel{background-position:-62px 0;}div.icon_delete{background-position:-42px 0;}.dhx_month_link{position:absolute;box-sizing:border-box;-moz-box-sizing:border-box;text-align:right;cursor:pointer;padding-right:10px;}.dhx_month_link a{color:blue;}.dhx_month_link a:hover{text-decoration:underline;}.dhx_global_tip{font-family:Tahoma,Helvetica;text-align:center;font-size:20px;position:fixed;top:60px;right:20px;background-color:rgba(255,255,255,0.7);color:#000;z-index:10000;padding:20px 30px;width:190px;}.dhx_global_tip div{font-size:30px;}@media(-moz-touch-enabled){.dhx_cal_container{user-select:none;-moz-user-select:none;}}.dhx_unselectable,.dhx_unselectable div{-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none;}.dhx_cal_light{-webkit-tap-highlight-color:transparent;background-color:#FFE763;border-radius:5px;font-family:Tahoma;font-size:8pt;border:1px solid #B7A64B;color:#887A2E;position:absolute;z-index:10001;width:580px;height:300px;box-shadow:5px 5px 5px #888;}.dhx_cal_light_wide{width:650px;}.dhx_mark{position:relative;top:3px;background-image:url('./imgs/controls.gif');background-position:0 -43px;padding-left:10px;}.dhx_ie6 .dhx_mark{background-position:6px -41px;}.dhx_cal_light select{font-family:Tahoma;font-size:8pt;color:#887A2E;padding:2px;margin:0;}.dhx_cal_ltitle{padding:2px 0 2px 5px;overflow:hidden;white-space:nowrap;}.dhx_cal_ltitle span{white-space:nowrap;}.dhx_cal_lsection{background-color:#DBCF8C;color:#FFF4B5;font-weight:bold;padding:5px 0 3px 10px;}.dhx_section_time{background-color:#DBCF8C;white-space:nowrap;}.dhx_cal_lsection .dhx_fullday{float:right;margin-right:5px;color:#887A2E;font-size:12px;font-weight:normal;line-height:20px;vertical-align:top;cursor:pointer;}.dhx_cal_lsection{font-size:18px;font-family:Arial;}.dhx_cal_ltext{padding:2px 0 2px 10px;overflow:hidden;}.dhx_cal_ltext textarea{background-color:#FFF4B5;overflow:auto;border:none;color:#887A2E;height:100%;width:100%;outline:none!important;resize:none;}.dhx_time{font-weight:bold;}.dhx_cal_light .dhx_title{padding-left:10px;}.dhx_cal_larea{border:1px solid #DCC43E;background-color:#FFF4B5;overflow:hidden;margin-left:3px;width:572px;height:1px;}.dhx_btn_set{padding:5px 10px 0 10px;float:left;}.dhx_btn_set div{float:left;height:21px;line-height:21px;vertical-align:middle;cursor:pointer;}.dhx_save_btn{background-image:url('./imgs/controls.gif');background-position:-84px 0;width:21px;}.dhx_cancel_btn{background-image:url('./imgs/controls.gif');background-position:-63px 0;width:20px;}.dhx_delete_btn{background-image:url('./imgs/controls.gif');background-position:-42px 0;width:20px;}.dhx_cal_cover{width:100%;height:100%;position:absolute;z-index:10000;top:0;left:0;background-color:black;opacity:.1;filter:alpha(opacity=10);}.dhx_custom_button{padding:0 3px 0 3px;color:#887A2E;font-family:Tahoma;font-size:8pt;background-color:#FFE763;font-weight:normal;margin-right:5px;margin-top:0;cursor:pointer;}.dhx_custom_button div{cursor:pointer;float:left;height:21px;line-height:21px;vertical-align:middle;}.dhx_cal_light_wide .dhx_cal_larea{border-top-width:0;}.dhx_cal_light_wide .dhx_cal_lsection{border:0;float:left;text-align:right;width:100px;height:20px;font-size:16px;padding:5px 0 0 10px;}.dhx_cal_light_wide .dhx_wrap_section{border-top:1px solid #DBCF8C;position:relative;background-color:#DBCF8C;overflow:hidden;}.dhx_cal_light_wide .dhx_section_time{padding-top:2px!important;height:20px!important;}.dhx_section_time{text-align:center;}.dhx_cal_light_wide .dhx_cal_larea{width:730px;}.dhx_cal_light_wide{width:738px;}.dhx_cal_light_wide .dhx_section_time{background:transparent;}.dhx_cal_light_wide .dhx_cal_checkbox label{padding-left:0;}.dhx_cal_wide_checkbox input{margin-top:8px;margin-left:14px;}.dhx_cal_light input{font-family:Tahoma;font-size:8pt;color:#887A2E;}.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{float:none;margin-right:0;color:#FFF4B5;font-weight:bold;font-size:16px;font-family:Arial;cursor:pointer;}.dhx_custom_button{float:right;height:21px;width:90px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;}.dhx_cal_light_wide .dhx_custom_button{position:absolute;top:0;right:0;margin-top:2px;}.dhx_cal_light_wide .dhx_repeat_right{margin-right:55px;}.dhx_minical_popup{position:absolute;z-index:10100;width:251px;height:175px;}.dhx_scale_bar_header{position:absolute;border-bottom:1px dotted #8894A3;width:100%;}.dhx_expand_icon{position:absolute;top:0;right:0;background-image:url(./imgs/collapse_expand_icon.gif);width:18px;height:18px;cursor:pointer;background-position:0 18px;z-index:16;}.dhx_scheduler_agenda .dhx_cal_data{background-image:url(./imgs/databg.png);}.dhx_agenda_area{width:100%;overflow-y:auto;background-image:url(./imgs/databg.png);}.dhx_agenda_line{height:21px;clear:both;overflow:hidden;}.dhx_agenda_line div{float:left;width:188px;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_agenda_area .dhx_agenda_line div{border-right:0 dotted #8894A3;}.dhx_v_border{position:absolute;left:187px;top:0;border-right:1px dotted #8894A3;width:1px;height:100%;}.dhx_agenda_line .dhx_event_icon{width:20px;border-width:0;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_agenda_line span{padding-left:5px;line-height:21px;}.dhx_year_body{border-left:1px dotted #586A7E;}.dhx_year_week{position:relative;}.dhx_scale_bar_last{border-right:1px dotted #586A7E;}.dhx_year_month{height:18px;padding-top:3px;border:1px dotted #586A7E;text-align:center;vertical-align:middle;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head,.dhx_year_body .dhx_before .dhx_month_head a,.dhx_year_body .dhx_after .dhx_month_head a{color:#E2E3E6!important;}.dhx_year_body .dhx_month_body{height:0;overflow:hidden;}.dhx_month_head.dhx_year_event{background-color:#FFE763;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head{cursor:default;}.dhx_year_tooltip{border:1px solid #BBB;background-image:url(./imgs/databg.png);position:absolute;z-index:9998;width:300px;height:auto;font-family:Tahoma;font-size:8pt;overflow:hidden;}.dhx_tooltip_line{line-height:20px;height:20px;overflow:hidden;}.dhx_tooltip_line .dhx_event_icon{width:20px;height:20px;padding-right:10px;float:left;border-width:0;position:relative;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_tooltip_date{float:left;width:auto;padding-left:5px;text-align:center;}.dhx_text_disabled{color:#887A2E;font-family:Tahoma;font-size:8pt;}.dhx_mini_calendar{-moz-box-shadow:5px 5px 5px #888;-khtml-box-shadow:5px 5px 5px #888;-moz-user-select:-moz-none;-webkit-user-select:none;-user-select:none;}.dhx_mini_calendar .dhx_month_head{cursor:pointer;}.dhx_mini_calendar .dhx_calendar_click{background-color:#C2D5FC;}.dhx_cal_navline div.dhx_minical_icon{width:18px;height:18px;left:190px;top:1px;cursor:pointer;background-image:url(./imgs/calendar.gif);}.dhx_matrix_scell{height:100%;}.dhx_matrix_cell,.dhx_matrix_scell{overflow:hidden;text-align:center;vertical-align:middle;border-bottom:1px dotted #8894A3;border-right:1px dotted #8894A3;}.dhx_matrix_cell{background-color:white;}.dhx_matrix_line{overflow:hidden;}.dhx_matrix_cell div,.dhx_matrix_scell div{overflow:hidden;text-align:center;height:auto;}.dhx_cal_lsection .dhx_readonly{font-size:9pt;font-size:8pt;padding:2px;color:#887A2E;}.dhx_cal_event_line .dhx_event_resize{cursor:w-resize;background:url(./imgs/resize_dots.png) repeat-y;position:absolute;top:0;width:4px;}.dhx_event_resize_start{left:0;}.dhx_event_resize_end{right:0;}.dhx_matrix_scell.folder,.dhx_data_table.folder .dhx_matrix_cell{background-color:#969394;cursor:pointer;}.dhx_matrix_scell .dhx_scell_level0{padding-left:5px;}.dhx_matrix_scell .dhx_scell_level1{padding-left:20px;}.dhx_matrix_scell .dhx_scell_level2{padding-left:35px;}.dhx_matrix_scell .dhx_scell_level3{padding-left:50px;}.dhx_matrix_scell .dhx_scell_level4{padding-left:65px;}.dhx_matrix_scell.folder{font-weight:bold;text-align:left;}.dhx_matrix_scell.folder .dhx_scell_expand{float:left;width:10px;padding-right:3px;}.dhx_matrix_scell.folder .dhx_scell_name{float:left;width:auto;}.dhx_matrix_scell.item .dhx_scell_name{padding-left:15px;text-align:left;}.dhx_data_table.folder .dhx_matrix_cell{border-right:0;}.dhx_section_timeline{overflow:hidden;padding:4px 0 2px 10px;}.dhx_section_timeline select{width:552px;}.dhx_map_area{width:100%;height:100%;overflow-y:auto;overflow-x:hidden;background-image:url(./imgs/databg.png);}.dhx_map_line .dhx_event_icon{width:20px;border-width:0;background:url(./imgs/icon.png) no-repeat;background-position:5px 4px;cursor:pointer;}.dhx_map_line{height:21px;clear:both;overflow:hidden;}.dhx_map{position:absolute;}.dhx_map_line div{float:left;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .headline_description{float:left;border-right:1px dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .dhx_map_description{float:left;border-right:0 dotted #8894A3;text-align:center;line-height:21px;overflow:hidden;}.dhx_map_line .headline_date,.dhx_map_line .headline_description{border-left:0;}.dhx_map_line .line_description{float:left;border-right:1px dotted #8894A3;text-align:left;padding-left:5px;line-height:21px;overflow:hidden;}.dhx_map_line.highlight{background-color:#C4C5CC;}.dhx_map_area .dhx_map_line div{border-right:0 dotted #8894A3;}.dhtmlXTooltip.tooltip{-moz-box-shadow:3px 3px 3px #888;-webkit-box-shadow:3px 3px 3px #888;-o-box-shadow:3px 3px 3px #888;box-shadow:3px 3px 3px #888;filter:progid:DXImageTransform.Microsoft.Shadow(color='#888888',Direction=135,Strength=5);background-color:white;border-left:1px dotted #887A2E;border-top:1px dotted #887A2E;color:#887A2E;cursor:default;padding:10px;position:absolute;z-index:500;font-family:Tahoma;font-size:8pt;}.dhx_cal_checkbox label{padding-left:5px;}.dhx_cal_light .radio{padding:2px 0 2px 10px;}.dhx_cal_light .radio input,.dhx_cal_light .radio label{line-height:15px;}.dhx_cal_light .radio input{vertical-align:middle;margin:0;padding:0;}.dhx_cal_light .radio label{vertical-align:middle;padding-right:10px;}.dhx_cal_light .combo{padding:4px;}.dhx_cal_light_wide .dhx_combo_box{width:608px!important;left:10px;}.dhx_wa_column{float:left;}.dhx_wa_column_last .dhx_wa_day_cont{border-left:1px dotted #8894A3;}.dhx_wa_scale_bar{font-family:Tahoma;padding-left:10px;font-size:11px;border-top:1px dotted #8894A3;border-bottom:1px dotted #8894A3;}.dhx_wa_day_data{background-color:#FCFEFC;overflow-y:auto;}.dhx_wa_ev_body{border-bottom:1px dotted #789;font-size:12px;padding:5px 0 5px 7px;}.dhx_wa_dnd{font-family:Tahoma;position:absolute;padding-right:7px;color:#887AE2!important;background-color:#FFE763!important;border:1px solid #B7A543;}.dhx_cal_event_selected{background-color:#9cc1db;color:white;}.dhx_second_scale_bar{border-bottom:1px dotted #586A7E;padding-top:2px;}.dhx_cal_header div div{border-left:1px dotted #8894A3;}.dhx_grid_area{width:100%;height:100%;overflow-y:auto;background-color:#FCFEFC;}.dhx_grid_area table{border-collapse:collapse;border-spacing:0;width:100%;table-layout:fixed;}.dhx_grid_area td{table-layout:fixed;text-align:center;}.dhx_grid_line{height:21px;clear:both;overflow:hidden;}.dhx_grid_line div{float:left;cursor:default;padding-top:0;padding-bottom:0;text-align:center;line-height:21px;overflow:hidden;}.dhx_grid_area td,.dhx_grid_line div{padding-left:8px;padding-right:8px;}.dhx_grid_area tr.dhx_grid_event{height:21px;overflow:hidden;margin:0 0 1px 0;}.dhx_grid_area tr.dhx_grid_event td{border-bottom:1px solid #ECEEF4;}.dhx_grid_area tr.dhx_grid_event:nth-child(2n+1) td,.dhx_grid_area tr.dhx_grid_event:nth-child(2n) td{border-bottom-width:0;border-bottom-style:none;}.dhx_grid_area tr.dhx_grid_event:nth-child(2n){background-color:#ECEEF4;;}.dhx_grid_area .dhx_grid_dummy{table-layout:auto;margin:0!important;padding:0!important;}.dhx_grid_v_border{position:absolute;border-right:1px solid #A4BED4;width:1px;height:100%;}.dhx_grid_event_selected{background-color:#9cc1db!important;color:white!important;}.dhx_grid_sort_desc .dhx_grid_view_sort{background-position:0 -55px;}.dhx_grid_sort_asc .dhx_grid_view_sort{background-position:0 -66px;}.dhx_grid_view_sort{width:10px;height:10px;position:absolute;border:none!important;top:5px;background-repeat:no-repeat;background-image:url(./imgs/images.png);}.dhx_marked_timespan{position:absolute;width:100%;}.dhx_time_block{position:absolute;width:100%;background:silver;opacity:.4;filter:alpha(opacity=40);z-index:1;}.dhx_time_block_reset{opacity:1;filter:alpha(opacity=100);}.dhx_scheduler_month .dhx_marked_timespan{display:none;}.dhx_mini_calendar .dhx_marked_timespan{display:none;}.dhx_now_time{width:100%;border-bottom:2px dotted red;z-index:1;}.dhx_scheduler_month .dhx_now_time{border-bottom:0;border-left:2px dotted red;}.dhx_matrix_now_time{border-left:2px dotted red;z-index:1;}.dhx_cal_quick_info{border:2px solid #888;border-radius:5px;position:absolute;z-index:300;background-color:#8e99ae;background-color:rgba(98,107,127,0.5);padding-left:7px;width:300px;transition:left .5s ease,right .5s;-moz-transition:left .5s ease,right .5s;-webkit-transition:left .5s ease,right .5s;-o-transition:left .5s ease,right .5s;}.dhx_no_animate{transition:none;-moz-transition:none;-webkit-transition:none;-o-transition:none;}.dhx_cal_quick_info.dhx_qi_left .dhx_qi_big_icon{float:right;}.dhx_cal_qi_title{padding:5px 0 10px 5px;color:#FFF;letter-spacing:1px;}.dhx_cal_qi_tdate{font-size:14px;}.dhx_cal_qi_tcontent{font-size:18px;font-weight:bold;}.dhx_cal_qi_content{border:1px solid #888;background-color:#fefefe;padding:16px 8px;font-size:14px;color:#444;width:275px;overflow:hidden;}.dhx_qi_big_icon{border-radius:3px;color:#444;margin:5px 9px 5px 0;min-width:60px;line-height:20px;vertical-align:middle;padding:5px 10px 5px 5px;cursor:pointer;background-color:#fefefe;border-bottom:1px solid #666;border-right:1px solid #666;float:left;}.dhx_cal_qi_controls div{float:left;height:20px;text-align:center;line-height:20px;}.dhx_qi_big_icon .dhx_menu_icon{margin:0 8px 0 0;}div.dhx_form_repeat input.radio{margin:-4px 0 0 -4px!ie;}div.dhx_form_repeat input.checkbox{margin:0 0 0 -4px!ie;}.dhx_form_repeat,.dhx_form_repeat input{padding:0;margin:0;padding-left:5px;font-family:Tahoma,Verdana;font-size:11px;line-height:24px;}.dhx_form_repeat{overflow:hidden;height:0;background-color:#FFF4B5;}.dhx_cal_light_wide .dhx_form_repeat{background-color:transparent;}.dhx_repeat_center,.dhx_repeat_left{height:115px;padding:10px 0 10px 10px;float:left;}.dhx_repeat_left{width:95px;}.dhx_repeat_center{width:335px;margin-top:12px;}.dhx_repeat_divider{float:left;height:115px;border-left:1px dotted #DCC43E;width:1px;}.dhx_repeat_right{float:right;height:115px;width:160px;padding:10px 3px 10px 10px;margin-top:7px;}input.dhx_repeat_text{height:16px;width:27px;margin:0 4px 0 4px;line-height:18px;padding:0 0 0 2px;}.dhx_form_repeat select{height:20px;width:87px;padding:0 0 0 2px;margin:0 4px 0 4px;}input.dhx_repeat_date{height:18px;width:80px;padding:0 0 0 2px;margin:0 4px 0 4px;background-repeat:no-repeat;background-position:64px 0;border:1px #7f9db9 solid;line-height:18px;}input.dhx_repeat_radio{margin-right:4px;}input.dhx_repeat_checkbox{margin:4px 4px 0 0;}.dhx_repeat_days td{padding-right:5px;}.dhx_repeat_days label{font-size:10px;}.dhx_custom_button{width:90px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;}.dhx_custom_button_recurring{background-image:url(./imgs/but_repeat.gif);background-position:-5px 20px;width:20px;margin-right:10px;}.dhx_cal_light_rec{width:640px;}.dhx_cal_light_rec .dhx_cal_larea{width:632px;}.dhx_cal_light_rec.dhx_cal_light_wide{width:816px;}.dhx_cal_light_rec.dhx_cal_light_wide .dhx_cal_larea{width:808px;}.dhx_cal_tab.active{border:none;}.dhx_multi_day{border:none;border-top:1px solid #A4BED4;}.dhx_multi_day_icon,.dhx_multi_day_icon_small{border-right:none;}.dhx_cal_container{background-image:url(imgs_glossy/top-days-bg.png);background-position:0 24px;background-repeat:repeat-x;background-color:#EBEBEB;}.dhx_cal_navline{background-color:#EBEBEB;height:23px!important;}.dhx_cal_prev_button{background-image:url(imgs_glossy/buttons.gif);width:30px;height:20px;}.dhx_cal_next_button{background-image:url(imgs_glossy/buttons.gif);width:30px;height:20px;}.dhx_cal_today_button{padding-top:3px;background-image:url(imgs_glossy/buttons.gif);width:67px;left:110px;text-decoration:none;}.dhx_cal_navline .dhx_cal_date{padding-top:4px;left:230px;}.dhx_cal_tab{background-image:url(imgs_glossy/white_tab.png);width:60px;height:15px;text-decoration:none;padding-top:4px;margin-top:4px;}.dhx_cal_tab.active{background-image:url(imgs_glossy/blue_tab.png);height:18px;width:60px;padding-top:4px;margin-top:2px;}.dhx_cal_data{border-top:1px solid #A4BED4;}.dhx_cal_header{background-image:url(imgs_glossy/top-days-bg.png);background-repeat:repeat-x;border-top:0;border-right:0;}.dhx_scale_bar{background-image:url(imgs_glossy/top-separator.gif);background-position:0 0;background-repeat:no-repeat;background-color:transparent;padding-top:3px;border-left:0;}.dhx_scale_holder{border-right:1px solid #A4BED4;}.dhx_scale_holder_now{border-right:1px solid #A4BED4;}.dhx_scale_hour{background-image:url(imgs_glossy/left-time-bg.png);border-bottom:1px solid #A4BED4;color:#2F3A48;}.dhx_multi_day{background-image:url(imgs_glossy/multi-days-bg.png);background-repeat:repeat;border-bottom:1px solid #A4BED4;border-left:0;}.dhx_multi_day_icon,.dhx_multi_day_icon_small{background-image:url(imgs_glossy/clock_big.png);border-bottom:1px solid #A4BED4;border-left:1px solid #fff;background-color:transparent;background-repeat:no-repeat;}.dhx_multi_day_icon_small{background-image:url(imgs_glossy/clock_small.png);}.dhx_month_head{background-color:#FFF;}.dhx_after .dhx_month_head,.dhx_before .dhx_month_head{background-color:#EFEDE2;}.dhx_now .dhx_month_head{background-color:#E4EFFF;}.dhx_after .dhx_month_body,.dhx_before .dhx_month_body{background-color:#EFEDE2;}.dhx_cal_event div{border:1px solid #FFBD51;background-color:#FFE4AB;color:#000;}.dhx_cal_event_clear{color:#000;}.dhx_cal_event_line{background-image:url(imgs_glossy/event-bg.png);border:1px solid #FFBD51;color:#000;}.dhx_in_move{background-image:url(imgs_glossy/move.png);}.dhx_cal_event .dhx_body{background-color:#FFE4AB;}.dhx_cal_event .dhx_title{background-color:#FFE4AB;}.dhx_cal_light{-moz-box-shadow:5px 5px 5px #888;-khtml-box-shadow:5px 5px 5px #888;background-color:#EBEBEB;border:2px solid #A4BED4;color:#000;}.dhx_cal_larea{border:1px solid #A4BED4;border-width:0 1px 1px;background-color:#FFF;}.dhx_cal_lsection{background-image:url(imgs_glossy/lightbox.png);font-size:14px;padding:5px 0 5px 10px;color:#000;}.dhx_cal_light_wide .dhx_cal_lsection{background-image:url(imgs_glossy/multi-days-bg.png);}.dhx_cal_ltext textarea{background-color:#fff;color:#000;}.dhx_cal_light select,.dhx_cal_light input{color:#000;}.dhx_save_btn{background-image:url(imgs_glossy/controlls5.png);}.dhx_cancel_btn{background-image:url(imgs_glossy/controlls5.png);}.dhx_delete_btn{background-image:url(imgs_glossy/controlls5.png);}div.dhx_menu_head{background-image:url(imgs_glossy/controlls5.png);border:1px solid #FFE4AB;}div.dhx_menu_icon{background-image:url(imgs_glossy/controlls5.png);border:medium none;}.dhx_section_time{height:20px!important;padding:7px 0!important;text-align:center;background:white;}div.dhx_cal_editor{background-color:#FFE4AB;}.dhx_year_month{background-image:url(imgs_glossy/top-days-bg.png);border:0;}.dhx_year_week{background-image:url(imgs_glossy/top-days-bg.png);}.dhx_month_head{border-right:1px solid #A4BED4;}.dhx_month_body,.dhx_matrix_cell,.dhx_matrix_scell{border-right:1px solid #A4BED4;border-bottom:1px solid #A4BED4;}.dhx_year_body{border-left:1px solid #A4BED4;}.dhx_scale_bar_last{border-right:none;}.dhx_month_head.dhx_year_event{background-color:#FFE4AB;}.dhx_year_body .dhx_before .dhx_month_head,.dhx_year_body .dhx_after .dhx_month_head,.dhx_year_body .dhx_before .dhx_month_head a,.dhx_year_body .dhx_after .dhx_month_head a{color:#EFEDE2!important;}.dhx_cal_lsection .dhx_readonly{color:#000;}.dhx_year_tooltip{-moz-box-shadow:2px 2px 2px #888;-khtml-box-shadow:2px 2px 2px #888;}.dhx_custom_button{margin-top:-2px;}.dhx_cal_lsection .dhx_fullday{color:#000;}.dhx_cal_lsection.dhx_cal_checkbox{height:16px;line-height:18px;}.dhx_cal_light_wide .dhx_cal_lsection.dhx_cal_checkbox{height:20px;}.dhx_cal_light_wide .dhx_combo_box{width:602px!important;left:0;}.dhx_cal_checkbox label{vertical-align:top;}.dhx_cal_light_wide .dhx_cal_lsection{color:black;}.dhx_cal_light_wide .dhx_wrap_section{border-top:1px solid #A4BED4;background-image:url(imgs_glossy/multi-days-bg.png);}.dhx_cal_light_wide .dhx_cal_ltext{border-left:1px solid #A4BED4;}.dhx_cal_light_wide .dhx_cal_ltext{background-color:white;}.dhx_custom_button{background:white;color:black;}.dhx_form_repeat{background:white;}.dhx_repeat_divider{border-left:1px solid #A4BED4;}.dhx_cal_header.dhx_second_cal_header{background-image:url("imgs_glossy/second-top-days-bg.png");padding-right:20px;}.dhx_cal_header div div{border-left:0;}.dhx_scale_bar{padding-top:4px;}.dhx_second_scale_bar{border-bottom:0;padding-top:4px;}.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday,.dhx_cal_lsection .dhx_fullday{color:#000;font-size:14px;}.dhx_cal_light_wide .dhx_cal_lsection{font-size:14px;padding-right:10px;}.dhx_scale_hour_border,.dhx_month_body_border,.dhx_scale_bar_border,.dhx_month_head_border{border-left:1px solid #A4BED4;}.dhx_cal_navline .dhx_cal_export{width:18px;height:18px;margin:2px;cursor:pointer;top:1px;}.dhx_cal_navline .dhx_cal_export.pdf{left:2px;background-image:url('imgs_glossy/export_pdf.png');}.dhx_cal_navline .dhx_cal_export.ical{left:24px;background-image:url('imgs_glossy/export_ical.png');} \ No newline at end of file
diff --git a/codebase/ext/dhtmlxscheduler_active_links.js b/codebase/ext/dhtmlxscheduler_active_links.js
new file mode 100644
index 0000000..dac5ab0
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_active_links.js
@@ -0,0 +1,7 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.active_link_view="day";
+scheduler.attachEvent("onTemplatesReady",function(){var d=scheduler.date.str_to_date(scheduler.config.api_date),b=scheduler.date.date_to_str(scheduler.config.api_date),e=scheduler.templates.month_day;scheduler.templates.month_day=function(a){return"<a jump_to='"+b(a)+"' href='#'>"+e(a)+"</a>"};var f=scheduler.templates.week_scale_date;scheduler.templates.week_scale_date=function(a){return"<a jump_to='"+b(a)+"' href='#'>"+f(a)+"</a>"};dhtmlxEvent(this._obj,"click",function(a){var b=a.target||event.srcElement,
+c=b.getAttribute("jump_to");if(c)return scheduler.setCurrentView(d(c),scheduler.config.active_link_view),a&&a.preventDefault&&a.preventDefault(),!1})});
diff --git a/codebase/ext/dhtmlxscheduler_agenda_view.js b/codebase/ext/dhtmlxscheduler_agenda_view.js
new file mode 100644
index 0000000..0449169
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_agenda_view.js
@@ -0,0 +1,11 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.date.add_agenda=function(a){return scheduler.date.add(a,1,"year")};scheduler.templates.agenda_time=function(a,d,c){return c._timed?this.day_date(c.start_date,c.end_date,c)+" "+this.event_date(a):scheduler.templates.day_date(a)+" &ndash; "+scheduler.templates.day_date(d)};scheduler.templates.agenda_text=function(a,d,c){return c.text};scheduler.templates.agenda_date=function(){return""};scheduler.date.agenda_start=function(){return scheduler.date.date_part(scheduler._currentDate())};
+scheduler.attachEvent("onTemplatesReady",function(){function a(c){if(c){var a=scheduler.locale.labels;scheduler._els.dhx_cal_header[0].innerHTML="<div class='dhx_agenda_line'><div>"+a.date+"</div><span style='padding-left:25px'>"+a.description+"</span></div>";scheduler._table_view=!0;scheduler.set_sizes()}}function d(){var c=scheduler._date,a=scheduler.get_visible_events();a.sort(function(b,a){return b.start_date>a.start_date?1:-1});for(var d="<div class='dhx_agenda_area'>",e=0;e<a.length;e++){var b=
+a[e],g=b.color?"background:"+b.color+";":"",h=b.textColor?"color:"+b.textColor+";":"",i=scheduler.templates.event_class(b.start_date,b.end_date,b);d+="<div class='dhx_agenda_line"+(i?" "+i:"")+"' event_id='"+b.id+"' style='"+h+""+g+""+(b._text_style||"")+"'><div class='dhx_agenda_event_time'>"+scheduler.templates.agenda_time(b.start_date,b.end_date,b)+"</div>";d+="<div class='dhx_event_icon icon_details'>&nbsp</div>";d+="<span>"+scheduler.templates.agenda_text(b.start_date,b.end_date,b)+"</span></div>"}d+=
+"<div class='dhx_v_border'></div></div>";scheduler._els.dhx_cal_data[0].innerHTML=d;scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop=scheduler._agendaScrollTop||0;var f=scheduler._els.dhx_cal_data[0].childNodes[0],k=f.childNodes[f.childNodes.length-1];k.style.height=f.offsetHeight<scheduler._els.dhx_cal_data[0].offsetHeight?"100%":f.offsetHeight+"px";var j=scheduler._els.dhx_cal_data[0].firstChild.childNodes;scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates.agenda_date(scheduler._min_date,
+scheduler._max_date,scheduler._mode);scheduler._rendered=[];for(e=0;e<j.length-1;e++)scheduler._rendered[e]=j[e]}var c=scheduler.dblclick_dhx_cal_data;scheduler.dblclick_dhx_cal_data=function(){if(this._mode=="agenda")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(c)return c.apply(this,arguments)};scheduler.attachEvent("onSchedulerResize",function(){return this._mode=="agenda"?(this.agenda_view(!0),!1):!0});var g=scheduler.render_data;scheduler.render_data=function(a){if(this._mode==
+"agenda")d();else return g.apply(this,arguments)};var h=scheduler.render_view_data;scheduler.render_view_data=function(){if(this._mode=="agenda")scheduler._agendaScrollTop=scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop,scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop=0;return h.apply(this,arguments)};scheduler.agenda_view=function(c){scheduler._min_date=scheduler.config.agenda_start||scheduler.date.agenda_start(scheduler._date);scheduler._max_date=scheduler.config.agenda_end||scheduler.date.add_agenda(scheduler._min_date,
+1);scheduler._table_view=!0;a(c);c&&d()}});
diff --git a/codebase/ext/dhtmlxscheduler_all_timed.js b/codebase/ext/dhtmlxscheduler_all_timed.js
new file mode 100644
index 0000000..3c355ec
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_all_timed.js
@@ -0,0 +1,8 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){scheduler.config.all_timed="short";var l=function(a){return!((a.end_date-a.start_date)/36E5>=24)},m=scheduler._pre_render_events_line;scheduler._pre_render_events_line=function(a,f){function g(a){var b=i(a.start_date);return+a.end_date>+b}function i(a){var b=scheduler.date.add(a,1,"day");return b=scheduler.date.date_part(b)}function j(a,b){var c=scheduler.date.date_part(new Date(a));c.setHours(b);return c}if(!this.config.all_timed)return m.call(this,a,f);for(var d=0;d<a.length;d++){var e=
+a[d];if(!e._timed)if(this.config.all_timed=="short"&&!l(e))a.splice(d--,1);else{var b=this._lame_copy({},e);b.start_date=new Date(b.start_date);if(g(e)){if(b.end_date=i(b.start_date),this.config.last_hour!=24)b.end_date=j(b.start_date,this.config.last_hour)}else b.end_date=new Date(e.end_date);var h=!1;b.start_date<this._max_date&&b.end_date>this._min_date&&b.start_date<b.end_date&&(a[d]=b,h=!0);var c=this._lame_copy({},e);c.end_date=new Date(c.end_date);c.start_date=c.start_date<this._min_date?j(this._min_date,
+this.config.first_hour):j(i(e.start_date),this.config.first_hour);c.start_date<this._max_date&&c.start_date<c.end_date&&(h?a.splice(d+1,0,c):a[d--]=c)}}var k=this._drag_mode=="move"?!1:f;return m.call(this,a,k)};var h=scheduler.get_visible_events;scheduler.get_visible_events=function(a){return!this.config.all_timed||!this.config.multi_day?h.call(this,a):h.call(this,!1)};scheduler.attachEvent("onBeforeViewChange",function(a,f,g){scheduler._allow_dnd=g=="day"||g=="week";return!0});scheduler._is_main_area_event=
+function(a){return!(!a._timed&&!(this.config.all_timed===!0||this.config.all_timed=="short"&&l(a)))};var k=scheduler.updateEvent;scheduler.updateEvent=function(a){var f=scheduler.config.all_timed&&!(scheduler.isOneDayEvent(scheduler._events[a])||scheduler.getState().drag_id);if(f){var g=scheduler.config.update_render;scheduler.config.update_render=!0}k.apply(scheduler,arguments);if(f)scheduler.config.update_render=g}})();
diff --git a/codebase/ext/dhtmlxscheduler_collision.js b/codebase/ext/dhtmlxscheduler_collision.js
new file mode 100644
index 0000000..0cadfd0
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_collision.js
@@ -0,0 +1,8 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){function h(b){var a=scheduler._props?scheduler._props[scheduler._mode]:null,c=scheduler.matrix?scheduler.matrix[scheduler._mode]:null,f=a||c;if(a)var g=f.map_to;if(c)g=f.y_property;f&&b&&(m=scheduler.getEvent(b)[g])}var m,d;scheduler.config.collision_limit=1;scheduler.attachEvent("onBeforeDrag",function(b){h(b);return!0});scheduler.attachEvent("onBeforeLightbox",function(b){var a=scheduler.getEvent(b);d=[a.start_date,a.end_date];h(b);return!0});scheduler.attachEvent("onEventChanged",function(b){if(!b)return!0;
+var a=scheduler.getEvent(b);if(!scheduler.checkCollision(a)){if(!d)return!1;a.start_date=d[0];a.end_date=d[1];a._timed=this.isOneDayEvent(a)}return!0});scheduler.attachEvent("onBeforeEventChanged",function(b){return scheduler.checkCollision(b)});scheduler.attachEvent("onEventAdded",function(b,a){var c=scheduler.checkCollision(a);c||scheduler.deleteEvent(b)});scheduler.attachEvent("onEventSave",function(b,a){a=scheduler._lame_clone(a);a.id=b;if(!a.start_date||!a.end_date){var c=scheduler.getEvent(b);
+a.start_date=new Date(c.start_date);a.end_date=new Date(c.end_date)}a.rec_type&&scheduler._roll_back_dates(a);return scheduler.checkCollision(a)});scheduler.checkCollision=function(b){var a=[],c=scheduler.config.collision_limit;if(b.rec_type)for(var f=scheduler.getRecDates(b),g=0;g<f.length;g++)for(var d=scheduler.getEvents(f[g].start_date,f[g].end_date),i=0;i<d.length;i++)(d[i].event_pid||d[i].id)!=b.id&&a.push(d[i]);else for(var a=scheduler.getEvents(b.start_date,b.end_date),e=0;e<a.length;e++)if(a[e].id==
+b.id){a.splice(e,1);break}var h=scheduler._props?scheduler._props[scheduler._mode]:null,n=scheduler.matrix?scheduler.matrix[scheduler._mode]:null,l=h||n;if(h)var j=l.map_to;if(n)j=l.y_property;var k=!0;if(l){for(var o=0,e=0;e<a.length;e++)a[e][j]==b[j]&&a[e].id!=b.id&&o++;o>=c&&(k=!1)}else a.length>=c&&(k=!1);if(!k){var p=!scheduler.callEvent("onEventCollision",[b,a]);p||(b[j]=m||b[j]);return p}return k}})();
diff --git a/codebase/ext/dhtmlxscheduler_container_autoresize.js b/codebase/ext/dhtmlxscheduler_container_autoresize.js
new file mode 100644
index 0000000..8a3ba2f
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_container_autoresize.js
@@ -0,0 +1,10 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){scheduler.config.container_autoresize=!0;scheduler.config.month_day_min_height=90;var p=scheduler._pre_render_events;scheduler._pre_render_events=function(e,c){if(!scheduler.config.container_autoresize)return p.apply(this,arguments);var g=this.xy.bar_height,l=this._colsS.heights,a=this._colsS.heights=[0,0,0,0,0,0,0],b=this._els.dhx_cal_data[0],e=this._table_view?this._pre_render_events_table(e,c):this._pre_render_events_line(e,c);if(this._table_view)if(c)this._colsS.heights=l;else{var f=
+b.firstChild;if(f.rows){for(var d=0;d<f.rows.length;d++){a[d]++;if(a[d]*g>this._colsS.height-22){var h=f.rows[d].cells,j=this._colsS.height-22;this.config.max_month_events*1!==this.config.max_month_events||a[d]<=this.config.max_month_events?j=a[d]*g:(this.config.max_month_events+1)*g>this._colsS.height-22&&(j=(this.config.max_month_events+1)*g);for(var i=0;i<h.length;i++)h[i].childNodes[1].style.height=j+"px";a[d]=(a[d-1]||0)+h[0].offsetHeight}a[d]=(a[d-1]||0)+f.rows[d].cells[0].offsetHeight}a.unshift(0)}else if(!e.length&&
+this._els.dhx_multi_day[0].style.visibility=="visible"&&(a[0]=-1),e.length||a[0]==-1){var n=f.parentNode.childNodes,m=(a[0]+1)*g+1+"px";b.style.top=this._els.dhx_cal_navline[0].offsetHeight+this._els.dhx_cal_header[0].offsetHeight+parseInt(m,10)+"px";b.style.height=this._obj.offsetHeight-parseInt(b.style.top,10)-(this.xy.margin_top||0)+"px";var k=this._els.dhx_multi_day[0];k.style.height=m;k.style.visibility=a[0]==-1?"hidden":"visible";k=this._els.dhx_multi_day[1];k.style.height=m;k.style.visibility=
+a[0]==-1?"hidden":"visible";k.className=a[0]?"dhx_multi_day_icon":"dhx_multi_day_icon_small";this._dy_shift=(a[0]+1)*g;a[0]=0}}return e};var n=["dhx_cal_navline","dhx_cal_header","dhx_multi_day","dhx_cal_data"],o=function(e){for(var c=0,g=0;g<n.length;g++){var l=n[g],a=scheduler._els[l]?scheduler._els[l][0]:null,b=0;switch(l){case "dhx_cal_navline":case "dhx_cal_header":b=parseInt(a.style.height,10);break;case "dhx_multi_day":b=a?a.offsetHeight:0;b==1&&(b=0);break;case "dhx_cal_data":var b=Math.max(a.offsetHeight-
+1,a.scrollHeight),f=scheduler.getState().mode;if(f=="month"){if(scheduler.config.month_day_min_height&&!e)var d=a.getElementsByTagName("tr").length,b=d*scheduler.config.month_day_min_height;if(e)a.style.height=b+"px"}if(scheduler.matrix&&scheduler.matrix[f])if(e)b+=2,a.style.height=b+"px";else for(var b=2,h=scheduler.matrix[f],j=h.y_unit,i=0;i<j.length;i++)b+=!j[i].children?h.dy:h.folder_dy||h.dy;if(f=="day"||f=="week")b+=2}c+=b}scheduler._obj.style.height=c+"px";e||scheduler.updateView()},c=function(){var c=
+scheduler.getState().mode;o();(scheduler.matrix&&scheduler.matrix[c]||c=="month")&&window.setTimeout(function(){o(!0)},1)};scheduler.attachEvent("onViewChange",c);scheduler.attachEvent("onXLE",c);scheduler.attachEvent("onEventChanged",c);scheduler.attachEvent("onEventCreated",c);scheduler.attachEvent("onEventAdded",c);scheduler.attachEvent("onEventDeleted",c);scheduler.attachEvent("onAfterSchedulerResize",c);scheduler.attachEvent("onClearAll",c)})();
diff --git a/codebase/ext/dhtmlxscheduler_cookie.js b/codebase/ext/dhtmlxscheduler_cookie.js
new file mode 100644
index 0000000..f7db363
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_cookie.js
@@ -0,0 +1,6 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){function h(e,a,b){var c=e+"="+b+(a?"; "+a:"");document.cookie=c}function i(e){var a=e+"=";if(document.cookie.length>0){var b=document.cookie.indexOf(a);if(b!=-1){b+=a.length;var c=document.cookie.indexOf(";",b);if(c==-1)c=document.cookie.length;return document.cookie.substring(b,c)}}return""}var g=!0;scheduler.attachEvent("onBeforeViewChange",function(e,a,b,c){if(g){g=!1;var d=i("scheduler_settings");if(d){if(!scheduler._min_date)scheduler._min_date=c;d=unescape(d).split("@");d[0]=this.templates.xml_date(d[0]);
+var f=this.isViewExists(d[1])?d[1]:b,j=!isNaN(+d[0])?d[0]:c;window.setTimeout(function(){scheduler.setCurrentView(j,f)},1);return!1}}var k=escape(this.templates.xml_format(c||a)+"@"+(b||e));h("scheduler_settings","expires=Sun, 31 Jan 9999 22:00:00 GMT",k);return!0});var f=scheduler._load;scheduler._load=function(){var e=arguments;if(!scheduler._date&&scheduler._load_mode){var a=this;window.setTimeout(function(){f.apply(a,e)},1)}else f.apply(this,e)}})();
diff --git a/codebase/ext/dhtmlxscheduler_editors.js b/codebase/ext/dhtmlxscheduler_editors.js
new file mode 100644
index 0000000..8cddbb8
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_editors.js
@@ -0,0 +1,11 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.form_blocks.combo={render:function(a){if(!a.cached_options)a.cached_options={};var d="";d+="<div class='"+a.type+"' style='height:"+(a.height||20)+"px;' ></div>";return d},set_value:function(a,d,c,b){(function(){function b(){a._combo&&a._combo.DOMParent&&a._combo.destructor()}b();var c=scheduler.attachEvent("onAfterLightbox",function(){b();scheduler.detachEvent(c)})})();window.dhx_globalImgPath=b.image_path||"/";a._combo=new dhtmlXCombo(a,b.name,a.offsetWidth-8);b.onchange&&a._combo.attachEvent("onChange",
+b.onchange);b.options_height&&a._combo.setOptionHeight(b.options_height);var e=a._combo;e.enableFilteringMode(b.filtering,b.script_path||null,!!b.cache);if(b.script_path){var f=c[b.map_to];f?b.cached_options[f]?(e.addOption(f,b.cached_options[f]),e.disable(1),e.selectOption(0),e.disable(0)):dhtmlxAjax.get(b.script_path+"?id="+f+"&uid="+scheduler.uid(),function(a){var c=a.doXPath("//option")[0],d=c.childNodes[0].nodeValue;b.cached_options[f]=d;e.addOption(f,d);e.disable(1);e.selectOption(0);e.disable(0)}):
+e.setComboValue("")}else{for(var g=[],h=0;h<b.options.length;h++){var i=b.options[h],j=[i.key,i.label,i.css];g.push(j)}e.addOption(g);if(c[b.map_to]){var k=e.getIndexByValue(c[b.map_to]);e.selectOption(k)}}},get_value:function(a,d,c){var b=a._combo.getSelectedValue();c.script_path&&(c.cached_options[b]=a._combo.getSelectedText());return b},focus:function(){}};
+scheduler.form_blocks.radio={render:function(a){var d="";d+="<div class='dhx_cal_ltext dhx_cal_radio' style='height:"+a.height+"px;' >";for(var c=0;c<a.options.length;c++){var b=scheduler.uid();d+="<input id='"+b+"' type='radio' name='"+a.name+"' value='"+a.options[c].key+"'><label for='"+b+"'> "+a.options[c].label+"</label>";a.vertical&&(d+="<br/>")}d+="</div>";return d},set_value:function(a,d,c,b){for(var e=a.getElementsByTagName("input"),f=0;f<e.length;f++){e[f].checked=!1;var g=c[b.map_to]||d;
+if(e[f].value==g)e[f].checked=!0}},get_value:function(a){for(var d=a.getElementsByTagName("input"),c=0;c<d.length;c++)if(d[c].checked)return d[c].value},focus:function(){}};
+scheduler.form_blocks.checkbox={render:function(a){return scheduler.config.wide_form?'<div class="dhx_cal_wide_checkbox" '+(a.height?"style='height:"+a.height+"px;'":"")+"></div>":""},set_value:function(a,d,c,b){var a=document.getElementById(b.id),e=scheduler.uid(),f=typeof b.checked_value!="undefined"?c[b.map_to]==b.checked_value:!!d;a.className+=" dhx_cal_checkbox";var g="<input id='"+e+"' type='checkbox' value='true' name='"+b.name+"'"+(f?"checked='true'":"")+"'>",h="<label for='"+e+"'>"+(scheduler.locale.labels["section_"+
+b.name]||b.name)+"</label>";scheduler.config.wide_form?(a.innerHTML=h,a.nextSibling.innerHTML=g):a.innerHTML=g+h;if(b.handler){var i=a.getElementsByTagName("input")[0];i.onclick=b.handler}},get_value:function(a,d,c){var a=document.getElementById(c.id),b=a.getElementsByTagName("input")[0];b||(b=a.nextSibling.getElementsByTagName("input")[0]);return b.checked?c.checked_value||!0:c.unchecked_value||!1},focus:function(){}};
diff --git a/codebase/ext/dhtmlxscheduler_expand.js b/codebase/ext/dhtmlxscheduler_expand.js
new file mode 100644
index 0000000..7df19f2
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_expand.js
@@ -0,0 +1,8 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.expand=function(){var a=scheduler._obj;do a._position=a.style.position||"",a.style.position="static";while((a=a.parentNode)&&a.style);a=scheduler._obj;a.style.position="absolute";a._width=a.style.width;a._height=a.style.height;a.style.width=a.style.height="100%";a.style.top=a.style.left="0px";var b=document.body;b.scrollTop=0;if(b=b.parentNode)b.scrollTop=0;document.body._overflow=document.body.style.overflow||"";document.body.style.overflow="hidden";scheduler._maximize()};
+scheduler.collapse=function(){var a=scheduler._obj;do a.style.position=a._position;while((a=a.parentNode)&&a.style);a=scheduler._obj;a.style.width=a._width;a.style.height=a._height;document.body.style.overflow=document.body._overflow;scheduler._maximize()};scheduler.attachEvent("onTemplatesReady",function(){var a=document.createElement("DIV");a.className="dhx_expand_icon";scheduler.toggleIcon=a;scheduler._obj.appendChild(a);a.onclick=function(){scheduler.expanded?scheduler.collapse():scheduler.expand()}});
+scheduler._maximize=function(){this.expanded=!this.expanded;this.toggleIcon.style.backgroundPosition="0 "+(this.expanded?"0":"18")+"px";for(var a=["left","top"],b=0;b<a.length;b++){var d=scheduler.xy["margin_"+a[b]],c=scheduler["_prev_margin_"+a[b]];scheduler.xy["margin_"+a[b]]?(scheduler["_prev_margin_"+a[b]]=scheduler.xy["margin_"+a[b]],scheduler.xy["margin_"+a[b]]=0):c&&(scheduler.xy["margin_"+a[b]]=scheduler["_prev_margin_"+a[b]],delete scheduler["_prev_margin_"+a[b]])}scheduler.callEvent("onSchedulerResize",
+[])&&(scheduler.update_view(),scheduler.callEvent("onAfterSchedulerResize"))};
diff --git a/codebase/ext/dhtmlxscheduler_grid_view.js b/codebase/ext/dhtmlxscheduler_grid_view.js
new file mode 100644
index 0000000..8f7d006
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_grid_view.js
@@ -0,0 +1,28 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){scheduler._grid={sort_rules:{"int":function(b,d,a){return a(b)*1<a(d)*1?1:-1},str:function(b,d,a){return a(b)<a(d)?1:-1},date:function(b,d,a){return new Date(a(b))<new Date(a(d))?1:-1}},_getObjName:function(b){return"grid_"+b},_getViewName:function(b){return b.replace(/^grid_/,"")}}})();
+scheduler.createGridView=function(b){function d(a){return!(a!==void 0&&(a*1!=a||a<0))}var a=b.name||"grid",c=scheduler._grid._getObjName(a);scheduler.config[a+"_start"]=b.from||new Date(0);scheduler.config[a+"_end"]=b.to||new Date(9999,1,1);scheduler[c]=b;scheduler[c].defPadding=8;scheduler[c].columns=scheduler[c].fields;delete scheduler[c].fields;for(var e=scheduler[c].columns,f=0;f<e.length;f++){if(d(e[f].width))e[f].initialWidth=e[f].width;d(e[f].paddingLeft)||delete e[f].paddingLeft;d(e[f].paddingRight)||
+delete e[f].paddingRight}scheduler[c].select=b.select===void 0?!0:b.select;scheduler.locale.labels[a+"_tab"]===void 0&&(scheduler.locale.labels[a+"_tab"]=scheduler[c].label||scheduler.locale.labels.grid_tab);scheduler[c]._selected_divs=[];scheduler.date[a+"_start"]=function(a){return a};scheduler.date["add_"+a]=function(a,b){var c=new Date(a);c.setMonth(c.getMonth()+b);return c};scheduler.templates[a+"_date"]=function(a,b){return scheduler.templates.day_date(a)+" - "+scheduler.templates.day_date(b)};
+scheduler.templates[a+"_full_date"]=function(b,c,d){return scheduler.isOneDayEvent(d)?this[a+"_single_date"](b):scheduler.templates.day_date(b)+" &ndash; "+scheduler.templates.day_date(c)};scheduler.templates[a+"_single_date"]=function(a){return scheduler.templates.day_date(a)+" "+this.event_date(a)};scheduler.templates[a+"_field"]=function(a,b){return b[a]};scheduler.attachEvent("onTemplatesReady",function(){scheduler.attachEvent("onDblClick",function(b){return this._mode==a?(scheduler._click.buttons.details(b),
+!1):!0});scheduler.attachEvent("onClick",function(b,d){return this._mode==a&&scheduler[c].select?(scheduler._grid.unselectEvent("",a),scheduler._grid.selectEvent(b,a,d),!1):!0});scheduler.attachEvent("onSchedulerResize",function(){return this._mode==a?(this[a+"_view"](!0),window.setTimeout(function(){scheduler.callEvent("onAfterSchedulerResize",[])},1),!1):!0});var b=scheduler.render_data;scheduler.render_data=function(d){if(this._mode==a)scheduler._grid._fill_grid_tab(c);else return b.apply(this,
+arguments)};var d=scheduler.render_view_data;scheduler.render_view_data=function(){if(this._mode==a)scheduler._grid._gridScrollTop=scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop,scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop=0;scheduler._els.dhx_cal_data[0].style.overflowY="auto";return d.apply(this,arguments)}});scheduler[a+"_view"]=function(b){b?(scheduler._min_date=scheduler[c].paging?scheduler.date[a+"_start"](new Date(scheduler._date)):scheduler.config[a+"_start"],scheduler._max_date=
+scheduler[c].paging?scheduler.date.add(scheduler._min_date,1,a):scheduler.config[a+"_end"],scheduler._grid.set_full_view(c),scheduler._els.dhx_cal_date[0].innerHTML=scheduler._min_date>new Date(0)&&scheduler._max_date<new Date(9999,1,1)?scheduler.templates[a+"_date"](scheduler._min_date,scheduler._max_date):"",scheduler._grid._fill_grid_tab(c),scheduler._gridView=c):(scheduler._grid._sort_marker=null,delete scheduler._gridView,scheduler._rendered=[],scheduler[c]._selected_divs=[])}};
+scheduler.dblclick_dhx_grid_area=function(){!this.config.readonly&&this.config.dblclick_create&&this.addEventNow()};if(scheduler._click.dhx_cal_header)scheduler._old_header_click=scheduler._click.dhx_cal_header;
+scheduler._click.dhx_cal_header=function(b){if(scheduler._gridView){var d=b||window.event,a=scheduler._grid.get_sort_params(d,scheduler._gridView);scheduler._grid.draw_sort_marker(d.originalTarget||d.srcElement,a.dir);scheduler.clear_view();scheduler._grid._fill_grid_tab(scheduler._gridView,a)}else if(scheduler._old_header_click)return scheduler._old_header_click.apply(this,arguments)};
+scheduler._grid.selectEvent=function(b,d,a){if(scheduler.callEvent("onBeforeRowSelect",[b,a])){var c=scheduler._grid._getObjName(d);scheduler.for_rendered(b,function(a){a.className+=" dhx_grid_event_selected";scheduler[c]._selected_divs.push(a)});scheduler._select_id=b}};scheduler._grid._unselectDiv=function(b){b.className=b.className.replace(/ dhx_grid_event_selected/,"")};
+scheduler._grid.unselectEvent=function(b,d){var a=scheduler._grid._getObjName(d);if(a&&scheduler[a]._selected_divs)if(b)for(c=0;c<scheduler[a]._selected_divs.length;c++){if(scheduler[a]._selected_divs[c].getAttribute("event_id")==b){scheduler._grid._unselectDiv(scheduler[a]._selected_divs[c]);scheduler[a]._selected_divs.slice(c,1);break}}else{for(var c=0;c<scheduler[a]._selected_divs.length;c++)scheduler._grid._unselectDiv(scheduler[a]._selected_divs[c]);scheduler[a]._selected_divs=[]}};
+scheduler._grid.get_sort_params=function(b,d){var a=b.originalTarget||b.srcElement;if(a.className=="dhx_grid_view_sort")a=a.parentNode;for(var c=!a.className||a.className.indexOf("dhx_grid_sort_asc")==-1?"asc":"desc",e=0,f=0;f<a.parentNode.childNodes.length;f++)if(a.parentNode.childNodes[f]==a){e=f;break}var i=null;if(scheduler[d].columns[e].template)var g=scheduler[d].columns[e].template,i=function(a){return g(a.start_date,a.end_date,a)};else{var k=scheduler[d].columns[e].id;k=="date"&&(k="start_date");
+i=function(a){return a[k]}}var h=scheduler[d].columns[e].sort;typeof h!="function"&&(h=scheduler._grid.sort_rules[h]||scheduler._grid.sort_rules.str);return{dir:c,value:i,rule:h}};
+scheduler._grid.draw_sort_marker=function(b,d){if(b.className=="dhx_grid_view_sort")b=b.parentNode;if(scheduler._grid._sort_marker)scheduler._grid._sort_marker.className=scheduler._grid._sort_marker.className.replace(/( )?dhx_grid_sort_(asc|desc)/,""),scheduler._grid._sort_marker.removeChild(scheduler._grid._sort_marker.lastChild);b.className+=" dhx_grid_sort_"+d;scheduler._grid._sort_marker=b;var a="<div class='dhx_grid_view_sort' style='left:"+(+b.style.width.replace("px","")-15+b.offsetLeft)+"px'>&nbsp;</div>";
+b.innerHTML+=a};scheduler._grid.sort_grid=function(b){var b=b||{dir:"desc",value:function(a){return a.start_date},rule:scheduler._grid.sort_rules.date},d=scheduler.get_visible_events();b.dir=="desc"?d.sort(function(a,c){return b.rule(a,c,b.value)}):d.sort(function(a,c){return-b.rule(a,c,b.value)});return d};scheduler._grid.set_full_view=function(b){if(b){var d=scheduler.locale.labels,a=scheduler._grid._print_grid_header(b);scheduler._els.dhx_cal_header[0].innerHTML=a;scheduler._table_view=!0;scheduler.set_sizes()}};
+scheduler._grid._calcPadding=function(b,d){var a=(b.paddingLeft!==void 0?1*b.paddingLeft:scheduler[d].defPadding)+(b.paddingRight!==void 0?1*b.paddingRight:scheduler[d].defPadding);return a};
+scheduler._grid._getStyles=function(b,d){for(var a=[],c="",e=0;d[e];e++)switch(c=d[e]+":",d[e]){case "text-align":b.align&&a.push(c+b.align);break;case "vertical-align":b.valign&&a.push(c+b.valign);break;case "padding-left":b.paddingLeft!=void 0&&a.push(c+(b.paddingLeft||"0")+"px");break;case "padding-right":b.paddingRight!=void 0&&a.push(c+(b.paddingRight||"0")+"px")}return a};
+scheduler._grid._fill_grid_tab=function(b,d){for(var a=scheduler._date,c=scheduler._grid.sort_grid(d),e=scheduler[b].columns,f="<div>",i=-2,g=0;g<e.length;g++){var k=scheduler._grid._calcPadding(e[g],b);i+=e[g].width+k;g<e.length-1&&(f+="<div class='dhx_grid_v_border' style='left:"+i+"px'></div>")}f+="</div>";f+="<div class='dhx_grid_area'><table>";for(g=0;g<c.length;g++)f+=scheduler._grid._print_event_row(c[g],b);f+="</table></div>";scheduler._els.dhx_cal_data[0].innerHTML=f;scheduler._els.dhx_cal_data[0].scrollTop=
+scheduler._grid._gridScrollTop||0;var h=scheduler._els.dhx_cal_data[0].getElementsByTagName("tr");scheduler._rendered=[];for(g=0;g<h.length;g++)scheduler._rendered[g]=h[g]};
+scheduler._grid._print_event_row=function(b,d){var a=[];b.color&&a.push("background:"+b.color);b.textColor&&a.push("color:"+b.textColor);b._text_style&&a.push(b._text_style);scheduler[d].rowHeight&&a.push("height:"+scheduler[d].rowHeight+"px");var c="";a.length&&(c="style='"+a.join(";")+"'");for(var e=scheduler[d].columns,f=scheduler.templates.event_class(b.start_date,b.end_date,b),i="<tr class='dhx_grid_event"+(f?" "+f:"")+"' event_id='"+b.id+"' "+c+">",g=scheduler._grid._getViewName(d),k=["text-align",
+"vertical-align","padding-left","padding-right"],h=0;h<e.length;h++){var j;j=e[h].template?e[h].template(b.start_date,b.end_date,b):e[h].id=="date"?scheduler.templates[g+"_full_date"](b.start_date,b.end_date,b):e[h].id=="start_date"||e[h].id=="end_date"?scheduler.templates[g+"_single_date"](b[e[h].id]):scheduler.templates[g+"_field"](e[h].id,b);var l=scheduler._grid._getStyles(e[h],k),m=e[h].css?' class="'+e[h].css+'"':"";i+="<td style='width:"+e[h].width+"px;"+l.join(";")+"' "+m+">"+j+"</td>"}i+=
+"<td class='dhx_grid_dummy'></td></tr>";return i};
+scheduler._grid._print_grid_header=function(b){for(var d="<div class='dhx_grid_line'>",a=scheduler[b].columns,c=[],e=a.length,f=scheduler._obj.clientWidth-2*a.length-20,i=0;i<a.length;i++){var g=a[i].initialWidth*1;!isNaN(g)&&a[i].initialWidth!=""&&a[i].initialWidth!=null&&typeof a[i].initialWidth!="boolean"?(e--,f-=g,c[i]=g):c[i]=null}for(var k=Math.floor(f/e),h=["text-align","padding-left","padding-right"],j=0;j<a.length;j++){var l=!c[j]?k:c[j];a[j].width=l-scheduler._grid._calcPadding(a[j],b);
+var m=scheduler._grid._getStyles(a[j],h);d+="<div style='width:"+(a[j].width-1)+"px;"+m.join(";")+"'>"+(a[j].label===void 0?a[j].id:a[j].label)+"</div>"}d+="</div>";return d};
diff --git a/codebase/ext/dhtmlxscheduler_html_templates.js b/codebase/ext/dhtmlxscheduler_html_templates.js
new file mode 100644
index 0000000..07cc112
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_html_templates.js
@@ -0,0 +1,5 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){for(var c=document.body.getElementsByTagName("DIV"),b=0;b<c.length;b++){var a=c[b].className||"",a=a.split(":");if(a.length==2&&a[0]=="template"){var d='return "'+(c[b].innerHTML||"").replace(/\"/g,'\\"').replace(/[\n\r]+/g,"")+'";',d=unescape(d).replace(/\{event\.([a-z]+)\}/g,function(b,a){return'"+ev.'+a+'+"'});scheduler.templates[a[1]]=Function("start","end","ev",d);c[b].style.display="none"}}});
diff --git a/codebase/ext/dhtmlxscheduler_key_nav.js b/codebase/ext/dhtmlxscheduler_key_nav.js
new file mode 100644
index 0000000..354a469
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_key_nav.js
@@ -0,0 +1,7 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(scheduler._temp_key_scope=function(){function j(b){delete b.rec_type;delete b.rec_pattern;delete b.event_pid;delete b.event_length}var h=!1,i,f=null;scheduler.attachEvent("onBeforeLightbox",function(){return h=!0});scheduler.attachEvent("onAfterLightbox",function(){h=!1;return!0});scheduler.attachEvent("onMouseMove",function(b,a){i=scheduler.getActionData(a).date});dhtmlxEvent(document,_isOpera?"keypress":"keydown",function(b){b=b||event;if(!h){var a=window.scheduler;if(b.keyCode==37||b.keyCode==
+39){b.cancelBubble=!0;var l=a.date.add(a._date,b.keyCode==37?-1:1,a._mode);a.setCurrentView(l);return!0}var g=a._select_id;if(b.ctrlKey&&b.keyCode==67){if(g)a._buffer_id=g,f=!0,a.callEvent("onEventCopied",[a.getEvent(g)]);return!0}if(b.ctrlKey&&b.keyCode==88&&g){f=!1;a._buffer_id=g;var c=a.getEvent(g);a.updateEvent(c.id);a.callEvent("onEventCut",[c])}if(b.ctrlKey&&b.keyCode==86){if(c=a.getEvent(a._buffer_id)){var k=c.end_date-c.start_date;if(f){var e=a._lame_clone(c);j(e);e.id=a.uid();e.start_date=
+new Date(i);e.end_date=new Date(e.start_date.valueOf()+k);a.addEvent(e);a.callEvent("onEventPasted",[f,e,c])}else{var d=a._lame_copy({},c);j(d);d.start_date=new Date(i);d.end_date=new Date(d.start_date.valueOf()+k);var m=a.callEvent("onBeforeEventChanged",[d,b,!1]);if(m)c.start_date=new Date(d.start_date),c.end_date=new Date(d.end_date),a.render_view_data(),a.callEvent("onEventPasted",[f,c,d]),f=!0}}return!0}}})})();
diff --git a/codebase/ext/dhtmlxscheduler_limit.js b/codebase/ext/dhtmlxscheduler_limit.js
new file mode 100644
index 0000000..ac4c096
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_limit.js
@@ -0,0 +1,33 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.limit_start=null;scheduler.config.limit_end=null;scheduler.config.limit_view=!1;scheduler.config.check_limits=!0;scheduler.config.mark_now=!0;scheduler.config.display_marked_timespans=!0;
+(scheduler._temp_limit_scope=function(){function A(b,a,c,d,e){function g(a,b,c,d){var e=[];if(a&&a[b])for(var g=a[b],i=h(c,d,g),k=0;k<i.length;k++)e=f._add_timespan_zones(e,i[k].zones);return e}function h(a,b,c){var d=c[b]&&c[b][e]?c[b][e]:c[a]&&c[a][e]?c[a][e]:[];return d}var f=scheduler,i=[],l={_props:"map_to",matrix:"y_property"},m;for(m in l){var n=l[m];if(f[m])for(var k in f[m]){var o=f[m][k],j=o[n];b[j]&&(i=f._add_timespan_zones(i,g(a[k],b[j],c,d)))}}return i=f._add_timespan_zones(i,g(a,"global",
+c,d))}var u=null,t="dhx_time_block",v="default",B=function(b,a,c){a instanceof Date&&c instanceof Date?(b.start_date=a,b.end_date=c):(b.days=a,b.zones=c);return b},x=function(b,a,c){var d=typeof b=="object"?b:{days:b};d.type=t;d.css="";if(a){if(c)d.sections=c;d=B(d,b,a)}return d};scheduler.blockTime=function(b,a,c){var d=x(b,a,c);return scheduler.addMarkedTimespan(d)};scheduler.unblockTime=function(b,a,c){var a=a||"fullday",d=x(b,a,c);return scheduler.deleteMarkedTimespan(d)};scheduler.attachEvent("onBeforeViewChange",
+function(b,a,c,d){d=d||a;c=c||b;return scheduler.config.limit_view&&(d.valueOf()>scheduler.config.limit_end.valueOf()||this.date.add(d,1,c)<=scheduler.config.limit_start.valueOf())?(setTimeout(function(){scheduler.setCurrentView(scheduler._date,c)},1),!1):!0});scheduler.checkInMarkedTimespan=function(b,a,c){for(var a=a||v,d=!0,e=new Date(b.start_date.valueOf()),g=scheduler.date.add(e,1,"day"),h=scheduler._marked_timespans;e<b.end_date;e=scheduler.date.date_part(g),g=scheduler.date.add(e,1,"day")){var f=
++scheduler.date.date_part(new Date(e)),i=e.getDay(),l=A(b,h,i,f,a);if(l)for(var m=0;m<l.length;m+=2){var n=scheduler._get_zone_minutes(e),k=b.end_date>g||b.end_date.getDate()!=e.getDate()?1440:scheduler._get_zone_minutes(b.end_date),o=l[m],j=l[m+1];if(o<k&&j>n&&(d=c=="function"?c(b,n,k,o,j):!1,!d))break}}return!d};var s=scheduler.checkLimitViolation=function(b){if(!b)return!0;if(!scheduler.config.check_limits)return!0;for(var a=scheduler,c=a.config,d=[],d=b.rec_type?scheduler.getRecDates(b):[b],e=
+!0,g=0;g<d.length;g++){var h=!0,f=d[g];f._timed=scheduler.isOneDayEvent(f);(h=c.limit_start&&c.limit_end?f.start_date.valueOf()>=c.limit_start.valueOf()&&f.end_date.valueOf()<=c.limit_end.valueOf():!0)&&(h=!scheduler.checkInMarkedTimespan(f,t,function(b,c,d,e,f){var g=!0;if(c<=f&&c>=e){if(f==1440||d<f)g=!1;b._timed&&a._drag_id&&a._drag_mode=="new-size"?(b.start_date.setHours(0),b.start_date.setMinutes(f)):g=!1}if(d>=e&&d<f||c<e&&d>f)b._timed&&a._drag_id&&a._drag_mode=="new-size"?(b.end_date.setHours(0),
+b.end_date.setMinutes(e)):g=!1;return g}));if(!h)a._drag_id=null,a._drag_mode=null,h=a.checkEvent("onLimitViolation")?a.callEvent("onLimitViolation",[f.id,f]):h;e=e&&h}return e};scheduler.attachEvent("onMouseDown",function(b){return!(b=t)});scheduler.attachEvent("onBeforeDrag",function(b){return!b?!0:s(scheduler.getEvent(b))});scheduler.attachEvent("onClick",function(b){return s(scheduler.getEvent(b))});scheduler.attachEvent("onBeforeLightbox",function(b){var a=scheduler.getEvent(b);u=[a.start_date,
+a.end_date];return s(a)});scheduler.attachEvent("onEventSave",function(b,a){if(!a.start_date||!a.end_date){var c=scheduler.getEvent(b);a.start_date=new Date(c.start_date);a.end_date=new Date(c.end_date)}if(a.rec_type){var d=scheduler._lame_clone(a);scheduler._roll_back_dates(d);return s(d)}return s(a)});scheduler.attachEvent("onEventAdded",function(b){if(!b)return!0;var a=scheduler.getEvent(b);if(!s(a)&&scheduler.config.limit_start&&scheduler.config.limit_end){if(a.start_date<scheduler.config.limit_start)a.start_date=
+new Date(scheduler.config.limit_start);if(a.start_date.valueOf()>=scheduler.config.limit_end.valueOf())a.start_date=this.date.add(scheduler.config.limit_end,-1,"day");if(a.end_date<scheduler.config.limit_start)a.end_date=new Date(scheduler.config.limit_start);if(a.end_date.valueOf()>=scheduler.config.limit_end.valueOf())a.end_date=this.date.add(scheduler.config.limit_end,-1,"day");if(a.start_date.valueOf()>=a.end_date.valueOf())a.end_date=this.date.add(a.start_date,this.config.event_duration||this.config.time_step,
+"minute");a._timed=this.isOneDayEvent(a)}return!0});scheduler.attachEvent("onEventChanged",function(b){if(!b)return!0;var a=scheduler.getEvent(b);if(!s(a)){if(!u)return!1;a.start_date=u[0];a.end_date=u[1];a._timed=this.isOneDayEvent(a)}return!0});scheduler.attachEvent("onBeforeEventChanged",function(b){return s(b)});scheduler.attachEvent("onBeforeEventCreated",function(b){var a=scheduler.getActionData(b).date,c={_timed:!0,start_date:a,end_date:scheduler.date.add(a,scheduler.config.time_step,"minute")};
+return s(c)});scheduler.attachEvent("onViewChange",function(){scheduler._mark_now()});scheduler.attachEvent("onSchedulerResize",function(){window.setTimeout(function(){scheduler._mark_now()},1);return!0});scheduler.attachEvent("onTemplatesReady",function(){scheduler._mark_now_timer=window.setInterval(function(){scheduler._mark_now()},6E4)});scheduler._mark_now=function(b){var a="dhx_now_time";this._els[a]||(this._els[a]=[]);var c=scheduler._currentDate(),d=this.config;scheduler._remove_mark_now();
+if(!b&&d.mark_now&&c<this._max_date&&c>this._min_date&&c.getHours()>=d.first_hour&&c.getHours()<d.last_hour){var e=this.locate_holder_day(c);this._els[a]=scheduler._append_mark_now(e,c)}};scheduler._append_mark_now=function(b,a){var c="dhx_now_time",d=scheduler._get_zone_minutes(a),e={zones:[d,d+1],css:c,type:c};if(this._table_view){if(this._mode=="month")return e.days=+scheduler.date.date_part(a),scheduler._render_marked_timespan(e,null,null)}else if(this._props&&this._props[this._mode]){for(var g=
+this._els.dhx_cal_data[0].childNodes,h=[],f=0;f<g.length-1;f++){var i=b+f;e.days=i;var l=scheduler._render_marked_timespan(e,null,i)[0];h.push(l)}return h}else return e.days=b,scheduler._render_marked_timespan(e,null,b)};scheduler._remove_mark_now=function(){for(var b="dhx_now_time",a=this._els[b],c=0;c<a.length;c++){var d=a[c],e=d.parentNode;e&&e.removeChild(d)}this._els[b]=[]};scheduler._marked_timespans={global:{}};scheduler._get_zone_minutes=function(b){return b.getHours()*60+b.getMinutes()};
+scheduler._prepare_timespan_options=function(b){var a=[],c=[];if(b.days=="fullweek")b.days=[0,1,2,3,4,5,6];if(b.days instanceof Array){for(var d=b.days.slice(),e=0;e<d.length;e++){var g=scheduler._lame_clone(b);g.days=d[e];a.push.apply(a,scheduler._prepare_timespan_options(g))}return a}if(!b||!(b.start_date&&b.end_date&&b.end_date>b.start_date||b.days!==void 0&&b.zones))return a;var h=0,f=1440;if(b.zones=="fullday")b.zones=[h,f];if(b.zones&&b.invert_zones)b.zones=scheduler.invertZones(b.zones);b.id=
+scheduler.uid();b.css=b.css||"";b.type=b.type||v;var i=b.sections;if(i)for(var l in i){if(i.hasOwnProperty(l)){var m=i[l];m instanceof Array||(m=[m]);for(e=0;e<m.length;e++){var n=scheduler._lame_copy({},b);n.sections={};n.sections[l]=m[e];c.push(n)}}}else c.push(b);for(var k=0;k<c.length;k++){var o=c[k],j=o.start_date,p=o.end_date;if(j&&p)for(var q=scheduler.date.date_part(new Date(j)),w=scheduler.date.add(q,1,"day");q<p;){n=scheduler._lame_copy({},o);delete n.start_date;delete n.end_date;n.days=
+q.valueOf();var r=j>q?scheduler._get_zone_minutes(j):h,s=p>w||p.getDate()!=q.getDate()?f:scheduler._get_zone_minutes(p);n.zones=[r,s];a.push(n);q=w;w=scheduler.date.add(w,1,"day")}else{if(o.days instanceof Date)o.days=scheduler.date.date_part(o.days).valueOf();o.zones=b.zones.slice();a.push(o)}}return a};scheduler._get_dates_by_index=function(b,a,c){for(var d=[],a=scheduler.date.date_part(new Date(a||scheduler._min_date)),c=new Date(c||scheduler._max_date),e=a.getDay(),g=b-e>=0?b-e:7-a.getDay()+b,
+h=scheduler.date.add(a,g,"day");h<c;h=scheduler.date.add(h,1,"week"))d.push(h);return d};scheduler._get_css_classes_by_config=function(b){var a=[];b.type==t&&(a.push(t),b.css&&a.push(t+"_reset"));a.push("dhx_marked_timespan",b.css);return a.join(" ")};scheduler._get_block_by_config=function(b){var a=document.createElement("DIV");if(b.html)typeof b.html=="string"?a.innerHTML=b.html:a.appendChild(b.html);return a};scheduler._render_marked_timespan=function(b,a,c){var d=[],e=scheduler.config,g=this._min_date,
+h=this._max_date,f=!1;if(!e.display_marked_timespans)return d;if(!c&&c!==0){if(b.days<7)c=b.days;else{var i=new Date(b.days),f=+i;if(!(+h>=+i&&+g<=+i))return d;c=i.getDay()}var l=g.getDay();l>c?c=7-(l-c):c-=l}var m=b.zones,n=scheduler._get_css_classes_by_config(b);if(scheduler._table_view&&scheduler._mode=="month"){var k=[],o=[];if(a)k.push(a),o.push(c);else for(var o=f?[f]:scheduler._get_dates_by_index(c),j=0;j<o.length;j++)k.push(this._scales[o[j]]);for(j=0;j<k.length;j++)for(var a=k[j],c=o[j],
+p=0;p<m.length;p+=2){var q=m[j],s=m[j+1];if(s<=q)return[];var r=scheduler._get_block_by_config(b);r.className=n;var t=a.offsetHeight-1,u=a.offsetWidth-1,v=Math.floor((this._correct_shift(c,1)-g.valueOf())/(864E5*this._cols.length)),x=this.locate_holder_day(c,!1)%this._cols.length,A=this._colsS[x],B=this._colsS.heights[v]+(this._colsS.height?this.xy.month_scale_height+2:2)-1;r.style.top=B+"px";r.style.lineHeight=r.style.height=t+"px";r.style.left=A+Math.round(q/1440*u)+"px";r.style.width=Math.round((s-
+q)/1440*u)+"px";a.appendChild(r);d.push(r)}}else{var y=c;if(this._props&&this._props[this._mode]&&b.sections&&b.sections[this._mode]){var z=this._props[this._mode],y=z.order[b.sections[this._mode]];z.size&&y>z.position+z.size&&(y=0)}a=a?a:scheduler.locate_holder(y);for(j=0;j<m.length;j+=2){q=Math.max(m[j],e.first_hour*60);s=Math.min(m[j+1],e.last_hour*60);if(s<=q)if(j+2<m.length)continue;else return[];r=scheduler._get_block_by_config(b);r.className=n;var D=this.config.hour_size_px*24+1,C=36E5;r.style.top=
+Math.round((q*6E4-this.config.first_hour*C)*this.config.hour_size_px/C)%D+"px";r.style.lineHeight=r.style.height=Math.max(Math.round((s-q)*6E4*this.config.hour_size_px/C)%D,1)+"px";a.appendChild(r);d.push(r)}}return d};scheduler.markTimespan=function(b){var a=scheduler._prepare_timespan_options(b);if(a.length){for(var c=[],d=0;d<a.length;d++){var e=a[d],g=scheduler._render_marked_timespan(e,null,null);g.length&&c.push.apply(c,g)}return c}};scheduler.unmarkTimespan=function(b){if(b)for(var a=0;a<b.length;a++){var c=
+b[a];c.parentNode&&c.parentNode.removeChild(c)}};scheduler._marked_timespans_ids={};scheduler.addMarkedTimespan=function(b){var a=scheduler._prepare_timespan_options(b),c="global";if(a.length){var d=a[0].id,e=scheduler._marked_timespans,g=scheduler._marked_timespans_ids;g[d]||(g[d]=[]);for(var h=0;h<a.length;h++){var f=a[h],i=f.days,l=f.zones,m=f.css,n=f.sections,k=f.type;f.id=d;if(n)for(var o in n){if(n.hasOwnProperty(o)){e[o]||(e[o]={});var j=n[o],p=e[o];p[j]||(p[j]={});p[j][i]||(p[j][i]={});if(!p[j][i][k]){p[j][i][k]=
+[];if(!scheduler._marked_timespans_types)scheduler._marked_timespans_types={};scheduler._marked_timespans_types[k]||(scheduler._marked_timespans_types[k]=!0)}var q=p[j][i][k];f._array=q;q.push(f);g[d].push(f)}}else{e[c][i]||(e[c][i]={});e[c][i][k]||(e[c][i][k]=[]);if(!scheduler._marked_timespans_types)scheduler._marked_timespans_types={};scheduler._marked_timespans_types[k]||(scheduler._marked_timespans_types[k]=!0);q=e[c][i][k];f._array=q;q.push(f);g[d].push(f)}}return d}};scheduler._add_timespan_zones=
+function(b,a){var c=b.slice(),a=a.slice();if(!c.length)return a;for(var d=0;d<c.length;d+=2)for(var e=c[d],g=c[d+1],h=d+2==c.length,f=0;f<a.length;f+=2){var i=a[f],l=a[f+1];if(l>g&&i<=g||i<e&&l>=e)c[d]=Math.min(e,i),c[d+1]=Math.max(g,l),d-=2;else{if(!h)continue;var m=e>i?0:2;c.splice(d+m,0,i,l)}a.splice(f--,2);break}return c};scheduler._subtract_timespan_zones=function(b,a){for(var c=b.slice(),d=0;d<c.length;d+=2)for(var e=c[d],g=c[d+1],h=0;h<a.length;h+=2){var f=a[h],i=a[h+1];if(i>e&&f<g){var l=
+!1;e>=f&&g<=i&&c.splice(d,2);e<f&&(c.splice(d,2,e,f),l=!0);g>i&&c.splice(l?d+2:d,l?0:2,i,g);d-=2;break}}return c};scheduler.invertZones=function(b){return scheduler._subtract_timespan_zones([0,1440],b.slice())};scheduler._delete_marked_timespan_by_id=function(b){var a=scheduler._marked_timespans_ids[b];if(a)for(var c=0;c<a.length;c++)for(var d=a[c],e=d._array,g=0;g<e.length;g++)if(e[g]==d){e.splice(g,1);break}};scheduler._delete_marked_timespan_by_config=function(b){var a=scheduler._marked_timespans,
+c=b.sections,d=b.days,e=b.type||v,g=[];if(c)for(var h in c){if(c.hasOwnProperty(h)&&a[h]){var f=c[h];a[h][f]&&a[h][f][d]&&a[h][f][d][e]&&(g=a[h][f][d][e])}}else a.global[d]&&a.global[d][e]&&(g=a.global[d][e]);for(var i=0;i<g.length;i++){var l=g[i],m=scheduler._subtract_timespan_zones(l.zones,b.zones);if(m.length)l.zones=m;else{g.splice(i,1);i--;for(var n=scheduler._marked_timespans_ids[l.id],k=0;k<n.length;k++)if(n[k]==l){n.splice(k,1);break}}}};scheduler.deleteMarkedTimespan=function(b){if(!arguments.length)scheduler._marked_timespans=
+{global:{}},scheduler._marked_timespans_ids={},scheduler._marked_timespans_types={};if(typeof b!="object")scheduler._delete_marked_timespan_by_id(b);else{if(!b.start_date||!b.end_date){if(!b.days)b.days="fullweek";if(!b.zones)b.zones="fullday"}var a=[];if(b.type)a.push(b.type);else for(var c in scheduler._marked_timespans_types)a.push(c);for(var d=scheduler._prepare_timespan_options(b),e=0;e<d.length;e++)for(var g=d[e],h=0;h<a.length;h++){var f=scheduler._lame_clone(g);f.type=a[h];scheduler._delete_marked_timespan_by_config(f)}}};
+scheduler._get_types_to_render=function(b,a){var c=b?b:{},d;for(d in a||{})a.hasOwnProperty(d)&&(c[d]=a[d]);return c};scheduler._get_configs_to_render=function(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push.apply(a,b[c]);return a};scheduler.attachEvent("onScaleAdd",function(b,a){if(!(scheduler._table_view&&scheduler._mode!="month")){var c=a.getDay(),d=a.valueOf(),e=this._mode,g=scheduler._marked_timespans,h=[];if(this._props&&this._props[e]){var f=this._props[e],i=f.options,l=scheduler._get_unit_index(f,
+a),m=i[l],a=scheduler.date.date_part(new Date(this._date)),c=a.getDay(),d=a.valueOf();if(g[e]&&g[e][m.key]){var n=g[e][m.key],k=scheduler._get_types_to_render(n[c],n[d]);h.push.apply(h,scheduler._get_configs_to_render(k))}}var o=g.global,j=o[d]||o[c];h.push.apply(h,scheduler._get_configs_to_render(j));for(var p=0;p<h.length;p++)scheduler._render_marked_timespan(h[p],b,a)}})})();
diff --git a/codebase/ext/dhtmlxscheduler_map_view.js b/codebase/ext/dhtmlxscheduler_map_view.js
new file mode 100644
index 0000000..29252fb
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_map_view.js
@@ -0,0 +1,29 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.xy.map_date_width=188;scheduler.xy.map_description_width=400;scheduler.config.map_resolve_event_location=!0;scheduler.config.map_resolve_user_location=!0;scheduler.config.map_initial_position=new google.maps.LatLng(48.724,8.215);scheduler.config.map_error_position=new google.maps.LatLng(15,15);scheduler.config.map_infowindow_max_width=300;scheduler.config.map_type=google.maps.MapTypeId.ROADMAP;scheduler.config.map_zoom_after_resolve=15;scheduler.locale.labels.marker_geo_success="It seems you are here.";
+scheduler.locale.labels.marker_geo_fail="Sorry, could not get your current position using geolocation.";scheduler.templates.marker_date=scheduler.date.date_to_str("%Y-%m-%d %H:%i");scheduler.templates.marker_text=function(g,i,f){return"<div><b>"+f.text+"</b><br/><br/>"+(f.event_location||"")+"<br/><br/>"+scheduler.templates.marker_date(g)+" - "+scheduler.templates.marker_date(i)+"</div>"};
+scheduler.dblclick_dhx_map_area=function(){!this.config.readonly&&this.config.dblclick_create&&this.addEventNow({start_date:scheduler._date,end_date:scheduler.date.add(scheduler._date,scheduler.config.time_step,"minute")})};scheduler.templates.map_time=function(g,i,f){return f._timed?this.day_date(f.start_date,f.end_date,f)+" "+this.event_date(g):scheduler.templates.day_date(g)+" &ndash; "+scheduler.templates.day_date(i)};scheduler.templates.map_text=function(g,i,f){return f.text};
+scheduler.date.map_start=function(g){return g};scheduler.date.add_map=function(g){return new Date(g.valueOf())};scheduler.templates.map_date=function(){return""};scheduler._latLngUpdate=!1;
+scheduler.attachEvent("onSchedulerReady",function(){function g(a){if(a){var b=scheduler.locale.labels;scheduler._els.dhx_cal_header[0].innerHTML="<div class='dhx_map_line' style='width: "+(scheduler.xy.map_date_width+scheduler.xy.map_description_width+2)+"px;' ><div class='headline_date' style='width: "+scheduler.xy.map_date_width+"px;'>"+b.date+"</div><div class='headline_description' style='width: "+scheduler.xy.map_description_width+"px;'>"+b.description+"</div></div>";scheduler._table_view=!0;
+scheduler.set_sizes()}}function i(){scheduler._selected_event_id=null;scheduler.map._infowindow.close();var a=scheduler.map._markers,b;for(b in a)a.hasOwnProperty(b)&&(a[b].setMap(null),delete scheduler.map._markers[b],scheduler.map._infowindows_content[b]&&delete scheduler.map._infowindows_content[b])}function f(){var a=scheduler.get_visible_events();a.sort(function(a,b){return a.start_date.valueOf()==b.start_date.valueOf()?a.id>b.id?1:-1:a.start_date>b.start_date?1:-1});for(var b="<div class='dhx_map_area'>",
+d=0;d<a.length;d++){var c=a[d],e=c.id==scheduler._selected_event_id?"dhx_map_line highlight":"dhx_map_line",f=c.color?"background:"+c.color+";":"",g=c.textColor?"color:"+c.textColor+";":"";b+="<div class='"+e+"' event_id='"+c.id+"' style='"+f+""+g+""+(c._text_style||"")+" width: "+(scheduler.xy.map_date_width+scheduler.xy.map_description_width+2)+"px;'><div style='width: "+scheduler.xy.map_date_width+"px;' >"+scheduler.templates.map_time(c.start_date,c.end_date,c)+"</div>";b+="<div class='dhx_event_icon icon_details'>&nbsp</div>";
+b+="<div class='line_description' style='width:"+(scheduler.xy.map_description_width-25)+"px;'>"+scheduler.templates.map_text(c.start_date,c.end_date,c)+"</div></div>"}b+="<div class='dhx_v_border' style='left: "+(scheduler.xy.map_date_width-2)+"px;'></div><div class='dhx_v_border_description'></div></div>";scheduler._els.dhx_cal_data[0].scrollTop=0;scheduler._els.dhx_cal_data[0].innerHTML=b;scheduler._els.dhx_cal_data[0].style.width=scheduler.xy.map_date_width+scheduler.xy.map_description_width+
+1+"px";var h=scheduler._els.dhx_cal_data[0].firstChild.childNodes;scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates[scheduler._mode+"_date"](scheduler._min_date,scheduler._max_date,scheduler._mode);scheduler._rendered=[];for(d=0;d<h.length-2;d++)scheduler._rendered[d]=h[d]}function l(a){var b=document.getElementById(a),d=scheduler._y-scheduler.xy.nav_height;d<0&&(d=0);var c=scheduler._x-scheduler.xy.map_date_width-scheduler.xy.map_description_width-1;c<0&&(c=0);b.style.height=d+"px";b.style.width=
+c+"px";b.style.marginLeft=scheduler.xy.map_date_width+scheduler.xy.map_description_width+1+"px";b.style.marginTop=scheduler.xy.nav_height+2+"px"}scheduler._isMapPositionSet=!1;var h=document.createElement("div");h.className="dhx_map";h.id="dhx_gmap";h.style.dispay="none";var n=scheduler._obj;n.appendChild(h);scheduler._els.dhx_gmap=[];scheduler._els.dhx_gmap.push(h);l("dhx_gmap");var o={zoom:scheduler.config.map_inital_zoom||10,center:scheduler.config.map_initial_position,mapTypeId:scheduler.config.map_type||
+google.maps.MapTypeId.ROADMAP},e=new google.maps.Map(document.getElementById("dhx_gmap"),o);e.disableDefaultUI=!1;e.disableDoubleClickZoom=!scheduler.config.readonly;google.maps.event.addListener(e,"dblclick",function(a){if(!scheduler.config.readonly&&scheduler.config.dblclick_create){var b=a.latLng;geocoder.geocode({latLng:b},function(a,c){if(c==google.maps.GeocoderStatus.OK)b=a[0].geometry.location,scheduler.addEventNow({lat:b.lat(),lng:b.lng(),event_location:a[0].formatted_address,start_date:scheduler._date,
+end_date:scheduler.date.add(scheduler._date,scheduler.config.time_step,"minute")})})}});var m={content:""};if(scheduler.config.map_infowindow_max_width)m.maxWidth=scheduler.config.map_infowindow_max_width;scheduler.map={_points:[],_markers:[],_infowindow:new google.maps.InfoWindow(m),_infowindows_content:[],_initialization_count:-1,_obj:e};geocoder=new google.maps.Geocoder;scheduler.config.map_resolve_user_location&&navigator.geolocation&&(scheduler._isMapPositionSet||navigator.geolocation.getCurrentPosition(function(a){var b=
+new google.maps.LatLng(a.coords.latitude,a.coords.longitude);e.setCenter(b);e.setZoom(scheduler.config.map_zoom_after_resolve||10);scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);scheduler.map._infowindow.position=e.getCenter();scheduler.map._infowindow.open(e);scheduler._isMapPositionSet=!0},function(){scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);scheduler.map._infowindow.setPosition(e.getCenter());scheduler.map._infowindow.open(e);
+scheduler._isMapPositionSet=!0}));google.maps.event.addListener(e,"resize",function(){h.style.zIndex="5";e.setZoom(e.getZoom())});google.maps.event.addListener(e,"tilesloaded",function(){h.style.zIndex="5"});h.style.display="none";scheduler.attachEvent("onSchedulerResize",function(){return this._mode=="map"?(this.map_view(!0),!1):!0});var p=scheduler.render_data;scheduler.render_data=function(a,b){if(this._mode=="map"){f();for(var d=scheduler.get_visible_events(),c=0;c<d.length;c++)scheduler.map._markers[d[c].id]||
+j(d[c],!1,!1)}else return p.apply(this,arguments)};scheduler.map_view=function(a){scheduler.map._initialization_count++;var b=scheduler._els.dhx_gmap[0];scheduler._els.dhx_cal_data[0].style.width=scheduler.xy.map_date_width+scheduler.xy.map_description_width+1+"px";scheduler._min_date=scheduler.config.map_start||scheduler._currentDate();scheduler._max_date=scheduler.config.map_end||scheduler.date.add(scheduler._currentDate(),1,"year");scheduler._table_view=!0;g(a);if(a){i();f();b.style.display="block";
+l("dhx_gmap");for(var d=scheduler.map._obj.getCenter(),c=scheduler.get_visible_events(),e=0;e<c.length;e++)scheduler.map._markers[c[e].id]||j(c[e])}else b.style.display="none";google.maps.event.trigger(scheduler.map._obj,"resize");scheduler.map._initialization_count===0&&d&&scheduler.map._obj.setCenter(d);scheduler._selected_event_id&&q(scheduler._selected_event_id)};var q=function(a){scheduler.map._obj.setCenter(scheduler.map._points[a]);scheduler.callEvent("onClick",[a])},j=function(a,b,d){var c=
+scheduler.config.map_error_position;a.lat&&a.lng&&(c=new google.maps.LatLng(a.lat,a.lng));var e=scheduler.templates.marker_text(a.start_date,a.end_date,a);scheduler._new_event||(scheduler.map._infowindows_content[a.id]=e,scheduler.map._markers[a.id]&&scheduler.map._markers[a.id].setMap(null),scheduler.map._markers[a.id]=new google.maps.Marker({position:c,map:scheduler.map._obj}),google.maps.event.addListener(scheduler.map._markers[a.id],"click",function(){scheduler.map._infowindow.setContent(scheduler.map._infowindows_content[a.id]);
+scheduler.map._infowindow.open(scheduler.map._obj,scheduler.map._markers[a.id]);scheduler._selected_event_id=a.id;scheduler.render_data()}),scheduler.map._points[a.id]=c,b&&scheduler.map._obj.setCenter(scheduler.map._points[a.id]),d&&scheduler.callEvent("onClick",[a.id]))};scheduler.attachEvent("onClick",function(a){if(this._mode=="map"){scheduler._selected_event_id=a;for(var b=0;b<scheduler._rendered.length;b++)scheduler._rendered[b].className="dhx_map_line",scheduler._rendered[b].getAttribute("event_id")==
+a&&(scheduler._rendered[b].className+=" highlight");scheduler.map._points[a]&&scheduler.map._markers[a]&&(scheduler.map._obj.setCenter(scheduler.map._points[a]),google.maps.event.trigger(scheduler.map._markers[a],"click"))}return!0});var k=function(a){a.event_location&&geocoder?geocoder.geocode({address:a.event_location,language:scheduler.uid().toString()},function(b,d){var c={};if(d!=google.maps.GeocoderStatus.OK){if(c=scheduler.callEvent("onLocationError",[a.id]),!c||c===!0)c=scheduler.config.map_error_position}else c=
+b[0].geometry.location;a.lat=c.lat();a.lng=c.lng();scheduler._selected_event_id=a.id;scheduler._latLngUpdate=!0;scheduler.callEvent("onEventChanged",[a.id,a]);j(a,!0,!0)}):j(a,!0,!0)},r=function(a){a.event_location&&geocoder&&geocoder.geocode({address:a.event_location,language:scheduler.uid().toString()},function(b,d){var c={};if(d!=google.maps.GeocoderStatus.OK){if(c=scheduler.callEvent("onLocationError",[a.id]),!c||c===!0)c=scheduler.config.map_error_position}else c=b[0].geometry.location;a.lat=
+c.lat();a.lng=c.lng();scheduler._latLngUpdate=!0;scheduler.callEvent("onEventChanged",[a.id,a])})},s=function(a,b,d,c){setTimeout(function(){var c=a.apply(b,d);a=b=d=null;return c},c||1)};scheduler.attachEvent("onEventChanged",function(a){if(this._latLngUpdate)this._latLngUpdate=!1;else{var b=scheduler.getEvent(a);b.start_date<scheduler._min_date&&b.end_date>scheduler._min_date||b.start_date<scheduler._max_date&&b.end_date>scheduler._max_date||b.start_date.valueOf()>=scheduler._min_date&&b.end_date.valueOf()<=
+scheduler._max_date?(scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null),k(b)):(scheduler._selected_event_id=null,scheduler.map._infowindow.close(),scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null))}return!0});scheduler.attachEvent("onEventIdChange",function(a,b){var d=scheduler.getEvent(b);if(d.start_date<scheduler._min_date&&d.end_date>scheduler._min_date||d.start_date<scheduler._max_date&&d.end_date>scheduler._max_date||d.start_date.valueOf()>=scheduler._min_date&&
+d.end_date.valueOf()<=scheduler._max_date)scheduler.map._markers[a]&&(scheduler.map._markers[a].setMap(null),delete scheduler.map._markers[a]),scheduler.map._infowindows_content[a]&&delete scheduler.map._infowindows_content[a],k(d);return!0});scheduler.attachEvent("onEventAdded",function(a,b){if(!scheduler._dataprocessor&&(b.start_date<scheduler._min_date&&b.end_date>scheduler._min_date||b.start_date<scheduler._max_date&&b.end_date>scheduler._max_date||b.start_date.valueOf()>=scheduler._min_date&&
+b.end_date.valueOf()<=scheduler._max_date))scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null),k(b);return!0});scheduler.attachEvent("onBeforeEventDelete",function(a){scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null);scheduler._selected_event_id=null;scheduler.map._infowindow.close();return!0});scheduler._event_resolve_delay=1500;scheduler.attachEvent("onEventLoading",function(a){scheduler.config.map_resolve_event_location&&a.event_location&&!a.lat&&!a.lng&&(scheduler._event_resolve_delay+=
+1500,s(r,this,[a],scheduler._event_resolve_delay));return!0});scheduler.attachEvent("onEventCancel",function(a,b){b&&(scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null),scheduler.map._infowindow.close());return!0})});
diff --git a/codebase/ext/dhtmlxscheduler_minical.js b/codebase/ext/dhtmlxscheduler_minical.js
new file mode 100644
index 0000000..b1b02af
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_minical.js
@@ -0,0 +1,28 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.templates.calendar_month=scheduler.date.date_to_str("%F %Y");scheduler.templates.calendar_scale_date=scheduler.date.date_to_str("%D");scheduler.templates.calendar_date=scheduler.date.date_to_str("%d");scheduler.config.minicalendar={mark_events:!0};scheduler._synced_minicalendars=[];
+scheduler.renderCalendar=function(a,b,c){var d=null,f=a.date||scheduler._currentDate();typeof f=="string"&&(f=this.templates.api_date(f));if(b)d=this._render_calendar(b.parentNode,f,a,b),scheduler.unmarkCalendar(d);else{var e=a.container,h=a.position;typeof e=="string"&&(e=document.getElementById(e));typeof h=="string"&&(h=document.getElementById(h));if(h&&typeof h.left=="undefined")var k=getOffset(h),h={top:k.top+h.offsetHeight,left:k.left};e||(e=scheduler._get_def_cont(h));d=this._render_calendar(e,
+f,a);d.onclick=function(a){var a=a||event,b=a.target||a.srcElement;if(b.className.indexOf("dhx_month_head")!=-1){var c=b.parentNode.className;if(c.indexOf("dhx_after")==-1&&c.indexOf("dhx_before")==-1){var d=scheduler.templates.xml_date(this.getAttribute("date"));d.setDate(parseInt(b.innerHTML,10));scheduler.unmarkCalendar(this);scheduler.markCalendar(this,d,"dhx_calendar_click");this._last_date=d;this.conf.handler&&this.conf.handler.call(scheduler,d,this)}}}}if(scheduler.config.minicalendar.mark_events)for(var j=
+scheduler.date.month_start(f),n=scheduler.date.add(j,1,"month"),l=this.getEvents(j,n),s=this["filter_"+this._mode],p=0;p<l.length;p++){var g=l[p];if(!s||s(g.id,g)){var i=g.start_date;i.valueOf()<j.valueOf()&&(i=j);for(i=scheduler.date.date_part(new Date(i.valueOf()));i<g.end_date;)if(this.markCalendar(d,i,"dhx_year_event"),i=this.date.add(i,1,"day"),i.valueOf()>=n.valueOf())break}}this._markCalendarCurrentDate(d);d.conf=a;a.sync&&!c&&this._synced_minicalendars.push(d);return d};
+scheduler._get_def_cont=function(a){if(!this._def_count)this._def_count=document.createElement("DIV"),this._def_count.className="dhx_minical_popup",this._def_count.onclick=function(a){(a||event).cancelBubble=!0},document.body.appendChild(this._def_count);this._def_count.style.left=a.left+"px";this._def_count.style.top=a.top+"px";this._def_count._created=new Date;return this._def_count};
+scheduler._locateCalendar=function(a,b){typeof b=="string"&&(b=scheduler.templates.api_date(b));if(+b>+a._max_date||+b<+a._min_date)return null;for(var c=a.childNodes[2].childNodes[0],d=0,f=new Date(a._min_date);+this.date.add(f,1,"week")<=+b;)f=this.date.add(f,1,"week"),d++;var e=scheduler.config.start_on_monday,h=(b.getDay()||(e?7:0))-(e?1:0);return c.rows[d].cells[h].firstChild};scheduler.markCalendar=function(a,b,c){var d=this._locateCalendar(a,b);d&&(d.className+=" "+c)};
+scheduler.unmarkCalendar=function(a,b,c){b=b||a._last_date;c=c||"dhx_calendar_click";if(b){var d=this._locateCalendar(a,b);if(d)d.className=(d.className||"").replace(RegExp(c,"g"))}};
+scheduler._week_template=function(a){for(var b=a||250,c=0,d=document.createElement("div"),f=this.date.week_start(scheduler._currentDate()),e=0;e<7;e++)this._cols[e]=Math.floor(b/(7-e)),this._render_x_header(e,c,f,d),f=this.date.add(f,1,"day"),b-=this._cols[e],c+=this._cols[e];d.lastChild.className+=" dhx_scale_bar_last";return d};scheduler.updateCalendar=function(a,b){a.conf.date=b;this.renderCalendar(a.conf,a,!0)};scheduler._mini_cal_arrows=["&nbsp","&nbsp"];
+scheduler._render_calendar=function(a,b,c,d){var f=scheduler.templates,e=this._cols;this._cols=[];var h=this._mode;this._mode="calendar";var k=this._colsS;this._colsS={height:0};var j=new Date(this._min_date),n=new Date(this._max_date),l=new Date(scheduler._date),s=f.month_day;f.month_day=f.calendar_date;var b=this.date.month_start(b),p=this._week_template(a.offsetWidth-1-this.config.minicalendar.padding),g;d?g=d:(g=document.createElement("DIV"),g.className="dhx_cal_container dhx_mini_calendar");
+g.setAttribute("date",this.templates.xml_format(b));g.innerHTML="<div class='dhx_year_month'></div><div class='dhx_year_week'>"+p.innerHTML+"</div><div class='dhx_year_body'></div>";g.childNodes[0].innerHTML=this.templates.calendar_month(b);if(c.navigation)for(var i=function(a,b){var c=scheduler.date.add(a._date,b,"month");scheduler.updateCalendar(a,c);scheduler._date.getMonth()==a._date.getMonth()&&scheduler._date.getFullYear()==a._date.getFullYear()&&scheduler._markCalendarCurrentDate(a)},w=["dhx_cal_prev_button",
+"dhx_cal_next_button"],x=["left:1px;top:2px;position:absolute;","left:auto; right:1px;top:2px;position:absolute;"],y=[-1,1],z=function(a){return function(){if(c.sync)for(var b=scheduler._synced_minicalendars,d=0;d<b.length;d++)i(b[d],a);else i(g,a)}},o=0;o<2;o++){var q=document.createElement("DIV");q.className=w[o];q.style.cssText=x[o];q.innerHTML=this._mini_cal_arrows[o];g.firstChild.appendChild(q);q.onclick=z(y[o])}g._date=new Date(b);g.week_start=(b.getDay()-(this.config.start_on_monday?1:0)+7)%
+7;var A=g._min_date=this.date.week_start(b);g._max_date=this.date.add(g._min_date,6,"week");this._reset_month_scale(g.childNodes[2],b,A);for(var m=g.childNodes[2].firstChild.rows,r=m.length;r<6;r++){var v=m[m.length-1];m[0].parentNode.appendChild(v.cloneNode(!0));for(var t=parseInt(v.childNodes[v.childNodes.length-1].childNodes[0].innerHTML),t=t<10?t:0,u=0;u<m[r].childNodes.length;u++)m[r].childNodes[u].className="dhx_after",m[r].childNodes[u].childNodes[0].innerHTML=scheduler.date.to_fixed(++t)}d||
+a.appendChild(g);g.childNodes[1].style.height=g.childNodes[1].childNodes[0].offsetHeight-1+"px";this._cols=e;this._mode=h;this._colsS=k;this._min_date=j;this._max_date=n;scheduler._date=l;f.month_day=s;return g};
+scheduler.destroyCalendar=function(a,b){if(!a&&this._def_count&&this._def_count.firstChild&&(b||(new Date).valueOf()-this._def_count._created.valueOf()>500))a=this._def_count.firstChild;if(a&&(a.onclick=null,a.innerHTML="",a.parentNode&&a.parentNode.removeChild(a),this._def_count))this._def_count.style.top="-1000px"};scheduler.isCalendarVisible=function(){return this._def_count&&parseInt(this._def_count.style.top,10)>0?this._def_count:!1};
+scheduler.attachEvent("onTemplatesReady",function(){dhtmlxEvent(document.body,"click",function(){scheduler.destroyCalendar()})});scheduler.templates.calendar_time=scheduler.date.date_to_str("%d-%m-%Y");
+scheduler.form_blocks.calendar_time={render:function(){var a="<input class='dhx_readonly' type='text' readonly='true'>",b=scheduler.config,c=this.date.date_part(scheduler._currentDate()),d=1440,f=0;b.limit_time_select&&(f=60*b.first_hour,d=60*b.last_hour+1);c.setHours(f/60);a+=" <select>";for(var e=f;e<d;e+=this.config.time_step*1){var h=this.templates.time_picker(c);a+="<option value='"+e+"'>"+h+"</option>";c=this.date.add(c,this.config.time_step,"minute")}a+="</select>";var k=scheduler.config.full_day;
+return"<div style='height:30px;padding-top:0; font-size:inherit;' class='dhx_section_time'>"+a+"<span style='font-weight:normal; font-size:10pt;'> &nbsp;&ndash;&nbsp; </span>"+a+"</div>"},set_value:function(a,b,c){function d(a,b,d){h(a,b,d);a.value=scheduler.templates.calendar_time(b);a._date=scheduler.date.date_part(new Date(b))}var f=a.getElementsByTagName("input"),e=a.getElementsByTagName("select"),h=function(a,b,d){a.onclick=function(){scheduler.destroyCalendar(null,!0);scheduler.renderCalendar({position:a,
+date:new Date(this._date),navigation:!0,handler:function(b){a.value=scheduler.templates.calendar_time(b);a._date=new Date(b);scheduler.destroyCalendar();scheduler.config.event_duration&&scheduler.config.auto_end_date&&d==0&&l()}})}};if(scheduler.config.full_day){if(!a._full_day){var k="<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> "+scheduler.locale.labels.full_day+"&nbsp;</label></input>";scheduler.config.wide_form||(k=a.previousSibling.innerHTML+k);a.previousSibling.innerHTML=
+k;a._full_day=!0}var j=a.previousSibling.getElementsByTagName("input")[0],n=scheduler.date.time_part(c.start_date)==0&&scheduler.date.time_part(c.end_date)==0;j.checked=n;e[0].disabled=j.checked;e[1].disabled=j.checked;j.onclick=function(){if(j.checked==!0){var b={};scheduler.form_blocks.calendar_time.get_value(a,b);var h=scheduler.date.date_part(b.start_date),g=scheduler.date.date_part(b.end_date);if(+g==+h||+g>=+h&&(c.end_date.getHours()!=0||c.end_date.getMinutes()!=0))g=scheduler.date.add(g,1,
+"day")}var i=h||c.start_date,k=g||c.end_date;d(f[0],i);d(f[1],k);e[0].value=i.getHours()*60+i.getMinutes();e[1].value=k.getHours()*60+k.getMinutes();e[0].disabled=j.checked;e[1].disabled=j.checked}}if(scheduler.config.event_duration&&scheduler.config.auto_end_date){var l=function(){start_date=scheduler.date.add(f[0]._date,e[0].value,"minute");end_date=new Date(start_date.getTime()+scheduler.config.event_duration*6E4);f[1].value=scheduler.templates.calendar_time(end_date);f[1]._date=scheduler.date.date_part(new Date(end_date));
+e[1].value=end_date.getHours()*60+end_date.getMinutes()};e[0].onchange=l}d(f[0],c.start_date,0);d(f[1],c.end_date,1);h=function(){};e[0].value=c.start_date.getHours()*60+c.start_date.getMinutes();e[1].value=c.end_date.getHours()*60+c.end_date.getMinutes()},get_value:function(a,b){var c=a.getElementsByTagName("input"),d=a.getElementsByTagName("select");b.start_date=scheduler.date.add(c[0]._date,d[0].value,"minute");b.end_date=scheduler.date.add(c[1]._date,d[1].value,"minute");if(b.end_date<=b.start_date)b.end_date=
+scheduler.date.add(b.start_date,scheduler.config.time_step,"minute")},focus:function(){}};scheduler.linkCalendar=function(a,b){var c=function(){var d=scheduler._date,c=new Date(d.valueOf());b&&(c=b(c));c.setDate(1);scheduler.updateCalendar(a,c);return!0};scheduler.attachEvent("onViewChange",c);scheduler.attachEvent("onXLE",c);scheduler.attachEvent("onEventAdded",c);scheduler.attachEvent("onEventChanged",c);scheduler.attachEvent("onAfterEventDelete",c);c()};
+scheduler._markCalendarCurrentDate=function(a){var b=scheduler._date,c=scheduler._mode,d=scheduler.date.month_start(new Date(a._date)),f=scheduler.date.add(d,1,"month");if(c=="day"||this._props&&this._props[c])d.valueOf()<=b.valueOf()&&f>b&&scheduler.markCalendar(a,b,"dhx_calendar_click");else if(c=="week")for(var e=scheduler.date.week_start(new Date(b.valueOf())),h=0;h<7;h++)d.valueOf()<=e.valueOf()&&f>e&&scheduler.markCalendar(a,e,"dhx_calendar_click"),e=scheduler.date.add(e,1,"day")};
+scheduler.attachEvent("onEventCancel",function(){scheduler.destroyCalendar(null,!0)});
diff --git a/codebase/ext/dhtmlxscheduler_multiselect.js b/codebase/ext/dhtmlxscheduler_multiselect.js
new file mode 100644
index 0000000..deb4d29
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_multiselect.js
@@ -0,0 +1,7 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.form_blocks.multiselect={render:function(d){for(var a="<div class='dhx_multi_select_"+d.name+"' style='overflow: auto; height: "+d.height+"px; position: relative;' >",b=0;b<d.options.length;b++)a+="<label><input type='checkbox' value='"+d.options[b].key+"'/>"+d.options[b].label+"</label>",convertStringToBoolean(d.vertical)&&(a+="<br/>");a+="</div>";return a},set_value:function(d,a,b,c){function h(b){for(var c=d.getElementsByTagName("input"),a=0;a<c.length;a++)c[a].checked=!!b[c[a].value]}
+for(var f=d.getElementsByTagName("input"),e=0;e<f.length;e++)f[e].checked=!1;f=[];if(b[c.map_to]){for(var i=b[c.map_to].split(","),e=0;e<i.length;e++)f[i[e]]=!0;h(f)}else if(!scheduler._new_event&&c.script_url){var g=document.createElement("div");g.className="dhx_loading";g.style.cssText="position: absolute; top: 40%; left: 40%;";d.appendChild(g);dhtmlxAjax.get(c.script_url+"?dhx_crosslink_"+c.map_to+"="+b.id+"&uid="+scheduler.uid(),function(b){for(var a=b.doXPath("//data/item"),e=[],f=0;f<a.length;f++)e[a[f].getAttribute(c.map_to)]=
+!0;h(e);d.removeChild(g)})}},get_value:function(d){for(var a=[],b=d.getElementsByTagName("input"),c=0;c<b.length;c++)b[c].checked&&a.push(b[c].value);return a.join(",")},focus:function(){}};
diff --git a/codebase/ext/dhtmlxscheduler_multisource.js b/codebase/ext/dhtmlxscheduler_multisource.js
new file mode 100644
index 0000000..fd8b767
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_multisource.js
@@ -0,0 +1,5 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){function e(a){var b=function(){};b.prototype=a;return b}var d=scheduler._load;scheduler._load=function(a,b){a=a||this._load_url;if(typeof a=="object")for(var f=e(this._loaded),c=0;c<a.length;c++)this._loaded=new f,d.call(this,a[c],b);else d.apply(this,arguments)}})();
diff --git a/codebase/ext/dhtmlxscheduler_mvc.js b/codebase/ext/dhtmlxscheduler_mvc.js
new file mode 100644
index 0000000..096fb30
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_mvc.js
@@ -0,0 +1,7 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){function d(a){var b={},c;for(c in a)c.indexOf("_")!==0&&(b[c]=a[c]);return b}function f(){clearTimeout(e);e=setTimeout(function(){scheduler.updateView()},1)}var e;scheduler.backbone=function(){events.bind("reset",function(){scheduler.clearAll();scheduler.parse(events.toJSON(),"json")});events.bind("change",function(a,b){if(b.changes&&b.changes.id){var c=a.previous("id");scheduler.changeEventId(c,a.id)}var d=a.id;scheduler._init_event(scheduler._events[d]=a.toJSON());f()});events.bind("remove",
+function(a){scheduler._events[a.id]&&scheduler.deleteEvent(a.id)});events.bind("add",function(a){if(!scheduler._events[a.id]){var b=a.toJSON();scheduler._init_event(b);scheduler.addEvent(b)}});scheduler.attachEvent("onEventCreated",function(a){var b=new events.model(scheduler.getEvent(a));scheduler._events[a]=b.toJSON();return!0});scheduler.attachEvent("onEventAdded",function(a){events.get(a)||events.add(new events.model(d(scheduler.getEvent(a))));return!0});scheduler.attachEvent("onEventChanged",
+function(a){var b=events.get(a),c=d(scheduler.getEvent(a));b.set(c);return!0});scheduler.attachEvent("onEventDeleted",function(a){events.get(a)&&events.remove(a);return!0})}})();
diff --git a/codebase/ext/dhtmlxscheduler_offline.js b/codebase/ext/dhtmlxscheduler_offline.js
new file mode 100644
index 0000000..c69e356
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_offline.js
@@ -0,0 +1,8 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.load=function(a,c,b){if(typeof c=="string")var f=this._process=c,c=b;this._load_url=a;this._after_call=c;a.$proxy?a.load(this,typeof f=="string"?f:null):this._load(a,this._date)};scheduler._dp_init_backup=scheduler._dp_init;
+scheduler._dp_init=function(a){a._sendData=function(c,b){if(c){if(!this.callEvent("onBeforeDataSending",b?[b,this.getState(b),c]:[null,null,c]))return!1;b&&(this._in_progress[b]=(new Date).valueOf());if(this.serverProcessor.$proxy){var a=this._tMode!="POST"?"get":"post",d=[],e;for(e in c)d.push({id:e,data:c[e],operation:this.getState(e)});this.serverProcessor._send(d,a,this)}else{var h=new dtmlXMLLoaderObject(this.afterUpdate,this,!0),g=this.serverProcessor+(this._user?getUrlSymbol(this.serverProcessor)+
+["dhx_user="+this._user,"dhx_version="+this.obj.getUserData(0,"version")].join("&"):"");this._tMode!="POST"?h.loadXML(g+(g.indexOf("?")!=-1?"&":"?")+this.serialize(c,b)):h.loadXML(g,!0,this.serialize(c,b));this._waitMode++}}};a._updatesToParams=function(c){for(var b={},a=0;a<c.length;a++)b[c[a].id]=c[a].data;return this.serialize(b)};a._processResult=function(a,b,f){if(f.status!=200)for(var d in this._in_progress){var e=this.getState(d);this.afterUpdateCallback(d,d,e,null)}else b=new dtmlXMLLoaderObject(function(){},
+this,!0),b.loadXMLString(a),b.xmlDoc=f,this.afterUpdate(this,null,null,null,b)};this._dp_init_backup(a)};if(window.dataProcessor)dataProcessor.prototype.init=function(a){this.init_original(a);a._dataprocessor=this;this.setTransactionMode("POST",!0);this.serverProcessor.$proxy||(this.serverProcessor+=(this.serverProcessor.indexOf("?")!=-1?"&":"?")+"editing=true")};
diff --git a/codebase/ext/dhtmlxscheduler_outerdrag.js b/codebase/ext/dhtmlxscheduler_outerdrag.js
new file mode 100644
index 0000000..9330c60
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_outerdrag.js
@@ -0,0 +1,7 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){var c=new dhtmlDragAndDropObject,f=c.stopDrag,d;c.stopDrag=function(b){d=b||event;return f.apply(this,arguments)};c.addDragLanding(scheduler._els.dhx_cal_data[0],{_drag:function(b,c,f,h){if(!scheduler.checkEvent("onBeforeExternalDragIn")||scheduler.callEvent("onBeforeExternalDragIn",[b,c,f,h,d])){var i=scheduler.attachEvent("onEventCreated",function(a){if(!scheduler.callEvent("onExternalDragIn",[a,b,d]))this._drag_mode=this._drag_id=null,this.deleteEvent(a)}),
+g=scheduler.getActionData(d),a={start_date:new Date(g.date)};if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){var e=scheduler.matrix[scheduler._mode];a[e.y_property]=g.section;var j=scheduler._locate_cell_timeline(d);a.start_date=e._trace_x[j.x];a.end_date=scheduler.date.add(a.start_date,e.x_step,e.x_unit)}if(scheduler._props&&scheduler._props[scheduler._mode])a[scheduler._props[scheduler._mode].map_to]=g.section;scheduler.addEventNow(a);scheduler.detachEvent(i)}},_dragIn:function(b){return b},
+_dragOut:function(){return this}})});
diff --git a/codebase/ext/dhtmlxscheduler_pdf.js b/codebase/ext/dhtmlxscheduler_pdf.js
new file mode 100644
index 0000000..00ab782
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_pdf.js
@@ -0,0 +1,19 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){function g(a){return a.replace(newline_regexp,"\n").replace(html_regexp,"")}function y(a,e){a=parseFloat(a);e=parseFloat(e);isNaN(e)||(a-=e);var c=s(a),a=a-c.width+c.cols*h;return isNaN(a)?"auto":100*a/h}function B(a,e,c){a=parseFloat(a);e=parseFloat(e);!isNaN(e)&&c&&(a-=e);var d=s(a),a=a-d.width+d.cols*h;return isNaN(a)?"auto":100*a/(h-(!isNaN(e)?e:0))}function s(a){for(var e=0,c=scheduler._els.dhx_cal_header[0].childNodes,d=c[1]?c[1].childNodes:c[0].childNodes,b=0;b<d.length;b++){var f=
+d[b].style?d[b]:d[b].parentNode,g=parseFloat(f.style.width);if(a>g)a-=g+1,e+=g+1;else break}return{width:e,cols:b}}function z(a){a=parseFloat(a);return isNaN(a)?"auto":100*a/n}function k(a,e){return(window.getComputedStyle?window.getComputedStyle(a,null)[e]:a.currentStyle?a.currentStyle[e]:null)||""}function F(a,e){for(var c=parseInt(a.style.left,10),d=0;d<scheduler._cols.length;d++)if(c-=scheduler._cols[d],c<0)return d;return e}function G(a,e){for(var c=parseInt(a.style.top,10),d=0;d<scheduler._colsS.heights.length;d++)if(scheduler._colsS.heights[d]>
+c)return d;return e}function H(a){return a?"<"+a+">":""}function q(a){return a?"</"+a+">":""}function t(a,e,c,d){var b="<"+a+" profile='"+e+"'";c&&(b+=" header='"+c+"'");d&&(b+=" footer='"+d+"'");b+=">";return b}function u(){var a="",e=scheduler._mode;scheduler.matrix&&scheduler.matrix[scheduler._mode]&&(e=scheduler.matrix[scheduler._mode].render=="cell"?"matrix":"timeline");a+="<scale mode='"+e+"' today='"+scheduler._els.dhx_cal_date[0].innerHTML+"'>";if(scheduler._mode=="week_agenda")for(var c=
+scheduler._els.dhx_cal_data[0].getElementsByTagName("DIV"),d=0;d<c.length;d++)c[d].className=="dhx_wa_scale_bar"&&(a+="<column>"+g(c[d].innerHTML)+"</column>");else if(scheduler._mode=="agenda"||scheduler._mode=="map")c=scheduler._els.dhx_cal_header[0].childNodes[0].childNodes,a+="<column>"+g(c[0].innerHTML)+"</column><column>"+g(c[1].innerHTML)+"</column>";else if(scheduler._mode=="year"){c=scheduler._els.dhx_cal_data[0].childNodes;for(d=0;d<c.length;d++)a+="<month label='"+g(c[d].childNodes[0].innerHTML)+
+"'>",a+=r(c[d].childNodes[1].childNodes),a+=v(c[d].childNodes[2]),a+="</month>"}else{a+="<x>";c=scheduler._els.dhx_cal_header[0].childNodes;a+=r(c);a+="</x>";var b=scheduler._els.dhx_cal_data[0];if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){a+="<y>";for(d=0;d<b.firstChild.rows.length;d++){var f=b.firstChild.rows[d];a+="<row><![CDATA["+g(f.cells[0].innerHTML)+"]]\></row>"}a+="</y>";n=b.firstChild.rows[0].cells[0].offsetHeight}else if(b.firstChild.tagName=="TABLE")a+=v(b);else{for(b=b.childNodes[b.childNodes.length-
+1];b.className.indexOf("dhx_scale_holder")==-1;)b=b.previousSibling;b=b.childNodes;a+="<y>";for(d=0;d<b.length;d++)a+="\n<row><![CDATA["+g(b[d].innerHTML)+"]]\></row>";a+="</y>";n=b[0].offsetHeight}}a+="</scale>";return a}function v(a){for(var e="",c=a.firstChild.rows,d=0;d<c.length;d++){for(var b=[],f=0;f<c[d].cells.length;f++)b.push(c[d].cells[f].firstChild.innerHTML);e+="\n<row height='"+a.firstChild.rows[d].cells[0].offsetHeight+"'><![CDATA["+g(b.join("|"))+"]]\></row>";n=a.firstChild.rows[0].cells[0].offsetHeight}return e}
+function r(a){var e="";if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){if(scheduler.matrix[scheduler._mode].second_scale)var c=a[1].childNodes;a=a[0].childNodes}for(var d=0;d<a.length;d++)e+="\n<column><![CDATA["+g(a[d].innerHTML)+"]]\></column>";h=a[0].offsetWidth;if(c)for(var b=0,f=a[0].offsetWidth,o=1,d=0;d<c.length;d++)e+="\n<column second_scale='"+o+"'><![CDATA["+g(c[d].innerHTML)+"]]\></column>",b+=c[d].offsetWidth,b>=f&&(f+=a[o]?a[o].offsetWidth:0,o++),h=c[0].offsetWidth;return e}function C(a){var e=
+"",c=scheduler._rendered,d=scheduler.matrix&&scheduler.matrix[scheduler._mode];if(scheduler._mode=="agenda"||scheduler._mode=="map")for(var b=0;b<c.length;b++)e+="<event><head><![CDATA["+g(c[b].childNodes[0].innerHTML)+"]]\></head><body><![CDATA["+g(c[b].childNodes[2].innerHTML)+"]]\></body></event>";else if(scheduler._mode=="week_agenda")for(b=0;b<c.length;b++)e+="<event day='"+c[b].parentNode.getAttribute("day")+"'><body>"+g(c[b].innerHTML)+"</body></event>";else if(scheduler._mode=="year"){c=scheduler.get_visible_events();
+for(b=0;b<c.length;b++){var f=c[b].start_date;if(f.valueOf()<scheduler._min_date.valueOf())f=scheduler._min_date;for(;f<c[b].end_date;){var o=f.getMonth()+12*(f.getFullYear()-scheduler._min_date.getFullYear())-scheduler.week_starts._month,p=scheduler.week_starts[o]+f.getDate()-1,j=a?k(scheduler._get_year_cell(f),"color"):"",i=a?k(scheduler._get_year_cell(f),"backgroundColor"):"";e+="<event day='"+p%7+"' week='"+Math.floor(p/7)+"' month='"+o+"' backgroundColor='"+i+"' color='"+j+"'></event>";f=scheduler.date.add(f,
+1,"day");if(f.valueOf()>=scheduler._max_date.valueOf())break}}}else if(d&&d.render=="cell"){c=scheduler._els.dhx_cal_data[0].getElementsByTagName("TD");for(b=0;b<c.length;b++)j=a?k(c[b],"color"):"",i=a?k(c[b],"backgroundColor"):"",e+="\n<event><body backgroundColor='"+i+"' color='"+j+"'><![CDATA["+g(c[b].innerHTML)+"]]\></body></event>"}else for(b=0;b<c.length;b++){var l,h;if(scheduler.matrix&&scheduler.matrix[scheduler._mode])l=y(c[b].style.left),h=y(c[b].offsetWidth)-1;else{var D=scheduler.config.use_select_menu_space?
+0:26;l=B(c[b].style.left,D,!0);h=B(c[b].style.width,D)-1}if(!isNaN(h*1)){var m=z(c[b].style.top),q=z(c[b].style.height),A=c[b].className.split(" ")[0].replace("dhx_cal_","");if(A!=="dhx_tooltip_line"){var w=scheduler.getEvent(c[b].getAttribute("event_id"));if(w){var p=w._sday,x=w._sweek,s=w._length||0;if(scheduler._mode=="month")q=parseInt(c[b].offsetHeight,10),m=parseInt(c[b].style.top,10)-22,p=F(c[b],p),x=G(c[b],x);else if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){var p=0,t=c[b].parentNode.parentNode.parentNode,
+x=t.rowIndex,u=n;n=c[b].parentNode.offsetHeight;m=z(c[b].style.top);m-=m*0.2;n=u}else{if(c[b].parentNode==scheduler._els.dhx_cal_data[0])continue;var r=scheduler._els.dhx_cal_data[0].childNodes[0],v=parseFloat(r.className.indexOf("dhx_scale_holder")!=-1?r.style.left:0);l+=y(c[b].parentNode.style.left,v)}e+="\n<event week='"+x+"' day='"+p+"' type='"+A+"' x='"+l+"' y='"+m+"' width='"+h+"' height='"+q+"' len='"+s+"'>";A=="event"?(e+="<header><![CDATA["+g(c[b].childNodes[1].innerHTML)+"]]\></header>",
+j=a?k(c[b].childNodes[2],"color"):"",i=a?k(c[b].childNodes[2],"backgroundColor"):"",e+="<body backgroundColor='"+i+"' color='"+j+"'><![CDATA["+g(c[b].childNodes[2].innerHTML)+"]]\></body>"):(j=a?k(c[b],"color"):"",i=a?k(c[b],"backgroundColor"):"",e+="<body backgroundColor='"+i+"' color='"+j+"'><![CDATA["+g(c[b].innerHTML)+"]]\></body>");e+="</event>"}}}}return e}function E(a,e,c,d,b,f,g){var h=!1;b=="fullcolor"&&(h=!0,b="color");b=b||"color";html_regexp=RegExp("<[^>]*>","g");newline_regexp=RegExp("<br[^>]*>",
+"g");var j=scheduler.uid(),i=document.createElement("div");i.style.display="none";document.body.appendChild(i);i.innerHTML='<form id="'+j+'" method="post" target="_blank" action="'+d+'" accept-charset="utf-8" enctype="application/x-www-form-urlencoded"><input type="hidden" name="mycoolxmlbody"/> </form>';var l="";if(a){for(var k=scheduler._date,n=scheduler._mode,l=t("pages",b,f,g),m=new Date(a);+m<+e;m=scheduler.date.add(m,1,c))scheduler.setCurrentView(m,c),l+=H("page")+u().replace("\u2013","-")+
+C(h)+q("page");l+=q("pages");scheduler.setCurrentView(k,n)}else l=t("data",b,f,g)+u().replace("\u2013","-")+C(h)+q("data");document.getElementById(j).firstChild.value=encodeURIComponent(l);document.getElementById(j).submit();i.parentNode.removeChild(i)}var h,n;scheduler.toPDF=function(a,e,c,d){return E.apply(this,[null,null,null,a,e,c,d])};scheduler.toPDFRange=function(a,e,c,d,b,f,g){typeof a=="string"&&(a=scheduler.templates.api_date(a),e=scheduler.templates.api_date(e));return E.apply(this,arguments)}})();
diff --git a/codebase/ext/dhtmlxscheduler_quick_info.js b/codebase/ext/dhtmlxscheduler_quick_info.js
new file mode 100644
index 0000000..7eb6c6e
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_quick_info.js
@@ -0,0 +1,14 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.icons_select=["icon_details","icon_delete"];scheduler.config.details_on_create=!0;scheduler.xy.menu_width=0;scheduler.attachEvent("onClick",function(b){scheduler.showQuickInfo(b);return!0});(function(){for(var b=["onEmptyClick","onViewChange","onLightbox","onBeforeEventDelete","onBeforeDrag"],a=function(){scheduler._hideQuickInfo();return!0},c=0;c<b.length;c++)scheduler.attachEvent(b[c],a)})();scheduler.templates.quick_info_title=function(b,a,c){return c.text.substr(0,50)};
+scheduler.templates.quick_info_content=function(b,a,c){return c.details||c.text};scheduler.templates.quick_info_date=function(b,a,c){return scheduler.isOneDayEvent(c)?scheduler.templates.day_date(b,a,c)+" "+scheduler.templates.event_header(b,a,c):scheduler.templates.week_date(b,a,c)};scheduler.showQuickInfo=function(b){if(b!=this._quick_info_box_id){this.hideQuickInfo(!0);var a=this._get_event_counter_part(b);if(a)this._quick_info_box=this._init_quick_info(a),this._fill_quick_data(b),this._show_quick_info(a)}};
+scheduler._hideQuickInfo=function(){scheduler.hideQuickInfo()};scheduler.hideQuickInfo=function(b){var a=this._quick_info_box;this._quick_info_box_id=0;if(a&&a.parentNode){if(scheduler.config.quick_info_detached)return a.parentNode.removeChild(a);a.style.right=="auto"?a.style.left="-350px":a.style.right="-350px";b&&a.parentNode.removeChild(a)}};dhtmlxEvent(window,"keydown",function(b){b.keyCode==27&&scheduler.hideQuickInfo()});
+scheduler._show_quick_info=function(b){var a=scheduler._quick_info_box;if(scheduler.config.quick_info_detached){scheduler._obj.appendChild(a);var c=a.offsetWidth,e=a.offsetHeight;a.style.left=b.left-b.dx*(c-b.width)+"px";a.style.top=b.top-(b.dy?e:-b.height)+"px"}else a.style.top=this.xy.scale_height+this.xy.nav_height+20+"px",b.dx==1?(a.style.right="auto",a.style.left="-300px",setTimeout(function(){a.style.left="-10px"},1)):(a.style.left="auto",a.style.right="-300px",setTimeout(function(){a.style.right=
+"-10px"},1)),a.className=a.className.replace("dhx_qi_left","").replace("dhx_qi_left","")+" dhx_qi_"+(b==1?"left":"right"),scheduler._obj.appendChild(a)};
+scheduler._init_quick_info=function(){if(!this._quick_info_box){var b=scheduler.xy,a=this._quick_info_box=document.createElement("div");a.className="dhx_cal_quick_info";scheduler.$testmode&&(a.className+=" dhx_no_animate");var c='<div class="dhx_cal_qi_title" style="height:'+b.quick_info_title+'px"><div class="dhx_cal_qi_tcontent"></div><div class="dhx_cal_qi_tdate"></div></div><div class="dhx_cal_qi_content"></div>';c+='<div class="dhx_cal_qi_controls" style="height:'+b.quick_info_buttons+'px">';
+for(var e=scheduler.config.icons_select,d=0;d<e.length;d++)c+='<div class="dhx_qi_big_icon '+e[d]+'" title="'+scheduler.locale.labels[e[d]]+"\"><div class='dhx_menu_icon "+e[d]+"'></div><div>"+scheduler.locale.labels[e[d]]+"</div></div>";c+="</div>";a.innerHTML=c;dhtmlxEvent(a,"click",function(a){a=a||event;scheduler._qi_button_click(a.target||a.srcElement)});scheduler.config.quick_info_detached&&dhtmlxEvent(scheduler._els.dhx_cal_data[0],"scroll",function(){scheduler.hideQuickInfo()})}return this._quick_info_box};
+scheduler._qi_button_click=function(b){var a=scheduler._quick_info_box;if(b&&b!=a){var c=b.className;if(c.indexOf("_icon")!=-1){var e=scheduler._quick_info_box_id;scheduler._click.buttons[c.split(" ")[1].replace("icon_","")](e)}else scheduler._qi_button_click(b.parentNode)}};
+scheduler._get_event_counter_part=function(b){for(var a=scheduler.getRenderedEvent(b),c=0,e=0,d=a;d&&d!=scheduler._obj;)c+=d.offsetLeft,e+=d.offsetTop-d.scrollTop,d=d.offsetParent;if(d){var f=c+a.offsetWidth/2>scheduler._x/2?1:0,g=e+a.offsetHeight/2>scheduler._y/2?1:0;return{left:c,top:e,dx:f,dy:g,width:a.offsetWidth,height:a.offsetHeight}}return 0};
+scheduler._fill_quick_data=function(b){var a=scheduler.getEvent(b),c=scheduler._quick_info_box;scheduler._quick_info_box_id=b;var e=c.firstChild.firstChild;e.innerHTML=scheduler.templates.quick_info_title(a.start_date,a.end_date,a);var d=e.nextSibling;d.innerHTML=scheduler.templates.quick_info_date(a.start_date,a.end_date,a);var f=c.firstChild.nextSibling;f.innerHTML=scheduler.templates.quick_info_content(a.start_date,a.end_date,a)};
diff --git a/codebase/ext/dhtmlxscheduler_readonly.js b/codebase/ext/dhtmlxscheduler_readonly.js
new file mode 100644
index 0000000..7eb8938
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_readonly.js
@@ -0,0 +1,10 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){function e(d,b,a,c){for(var i=b.getElementsByTagName(d),h=a.getElementsByTagName(d),g=h.length-1;g>=0;g--)if(a=h[g],c){var f=document.createElement("SPAN");f.className="dhx_text_disabled";f.innerHTML=c(i[g]);a.parentNode.insertBefore(f,a);a.parentNode.removeChild(a)}else if(a.disabled=!0,b.checked)a.checked=!0}var r=scheduler.config.lightbox.sections,k=null,n=scheduler.config.buttons_left.slice(),o=scheduler.config.buttons_right.slice();scheduler.attachEvent("onBeforeLightbox",
+function(d){if(this.config.readonly_form||this.getEvent(d).readonly){this.config.readonly_active=!0;for(var b=0;b<this.config.lightbox.sections.length;b++)this.config.lightbox.sections[b].focus=!1}else this.config.readonly_active=!1,scheduler.config.buttons_left=n.slice(),scheduler.config.buttons_right=o.slice();var a=this.config.lightbox.sections;if(this.config.readonly_active){for(var c=!1,b=0;b<a.length;b++)if(a[b].type=="recurring"){k=a[b];this.config.readonly_active&&a.splice(b,1);break}!c&&
+!this.config.readonly_active&&k&&a.splice(a.length-2,0,k);for(var i=["dhx_delete_btn","dhx_save_btn"],h=[scheduler.config.buttons_left,scheduler.config.buttons_right],b=0;b<i.length;b++)for(var g=i[b],f=0;f<h.length;f++){for(var e=h[f],l=-1,j=0;j<e.length;j++)if(e[j]==g){l=j;break}l!=-1&&e.splice(l,1)}}this.resetLightbox();return!0});var p=scheduler._fill_lightbox;scheduler._fill_lightbox=function(){var d=this.getLightbox();if(this.config.readonly_active)d.style.visibility="hidden",d.style.display=
+"block";var b=p.apply(this,arguments);if(this.config.readonly_active)d.style.visibility="",d.style.display="none";if(this.config.readonly_active){var a=this.getLightbox(),c=this._lightbox_r=a.cloneNode(!0);c.id=scheduler.uid();e("textarea",a,c,function(a){return a.value});e("input",a,c,!1);e("select",a,c,function(a){return!a.options.length?"":a.options[Math.max(a.selectedIndex||0,0)].text});a.parentNode.insertBefore(c,a);m.call(this,c);scheduler._lightbox&&scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);
+this._lightbox=c;if(scheduler.config.drag_lightbox)c.firstChild.onmousedown=scheduler._ready_to_dnd;this.setLightboxSize();c.onclick=function(a){var b=a?a.target:event.srcElement;if(!b.className)b=b.previousSibling;if(b&&b.className)switch(b.className){case "dhx_cancel_btn":scheduler.callEvent("onEventCancel",[scheduler._lightbox_id]),scheduler._edit_stop_event(scheduler.getEvent(scheduler._lightbox_id),!1),scheduler.hide_lightbox()}}}return b};var m=scheduler.showCover;scheduler.showCover=function(){this.config.readonly_active||
+m.apply(this,arguments)};var q=scheduler.hide_lightbox;scheduler.hide_lightbox=function(){if(this._lightbox_r)this._lightbox_r.parentNode.removeChild(this._lightbox_r),this._lightbox_r=this._lightbox=null;return q.apply(this,arguments)}});
diff --git a/codebase/ext/dhtmlxscheduler_recurring.js b/codebase/ext/dhtmlxscheduler_recurring.js
new file mode 100644
index 0000000..303fe20
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_recurring.js
@@ -0,0 +1,41 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.occurrence_timestamp_in_utc=!1;
+scheduler.form_blocks.recurring={render:function(){return scheduler.__recurring_template},_ds:{},_init_set_value:function(a,b,c){function d(a){for(var b=0;b<a.length;b++){var c=a[b];c.type=="checkbox"||c.type=="radio"?(h[c.name]||(h[c.name]=[]),h[c.name].push(c)):h[c.name]=c}}function f(a){for(var b=h[a],c=0;c<b.length;c++)if(b[c].checked)return b[c].value}function e(){m("dhx_repeat_day").style.display="none";m("dhx_repeat_week").style.display="none";m("dhx_repeat_month").style.display="none";m("dhx_repeat_year").style.display=
+"none";m("dhx_repeat_"+this.value).style.display="block"}function g(a){var b=[f("repeat")];for(q[b[0]](b,a);b.length<5;)b.push("");var c="";if(h.end[0].checked)a.end=new Date(9999,1,1),c="no";else if(h.end[2].checked)a.end=j(h.date_of_end.value);else{scheduler.transpose_type(b.join("_"));var c=Math.max(1,h.occurences_count.value),e=b[0]=="week"&&b[4]&&b[4].toString().indexOf(scheduler.config.start_on_monday?1:0)==-1?1:0;a.end=scheduler.date.add(new Date(a.start),c+e,b.join("_"))}return b.join("_")+
+"#"+c}function i(a,b){var c=a.split("#"),a=c[0].split("_");r[a[0]](a,b);var e=h.repeat[{day:0,week:1,month:2,year:3}[a[0]]];switch(c[1]){case "no":h.end[0].checked=!0;break;case "":h.end[2].checked=!0;h.date_of_end.value=l(b.end);break;default:h.end[1].checked=!0,h.occurences_count.value=c[1]}e.checked=!0;e.onclick()}scheduler.form_blocks.recurring._ds={start:c.start_date,end:c._end_date};var k=scheduler.date.str_to_date(scheduler.config.repeat_date),j=function(a){var b=k(a);scheduler.config.include_end_by&&
+(b=scheduler.date.add(b,1,"day"));return b},l=scheduler.date.date_to_str(scheduler.config.repeat_date),n=a.getElementsByTagName("FORM")[0],h=[];d(n.getElementsByTagName("INPUT"));d(n.getElementsByTagName("SELECT"));if(!scheduler.config.repeat_date_of_end){var s=scheduler.date.date_to_str(scheduler.config.repeat_date);scheduler.config.repeat_date_of_end=s(scheduler.date.add(scheduler._currentDate(),30,"day"))}h.date_of_end.value=scheduler.config.repeat_date_of_end;var m=function(a){return document.getElementById(a)};
+scheduler.form_blocks.recurring._get_repeat_code=g;var q={month:function(a,b){f("month_type")=="d"?(a.push(Math.max(1,h.month_count.value)),b.start.setDate(h.month_day.value)):(a.push(Math.max(1,h.month_count2.value)),a.push(h.month_day2.value),a.push(Math.max(1,h.month_week2.value)),b.start.setDate(1));b._start=!0},week:function(a,b){a.push(Math.max(1,h.week_count.value));a.push("");a.push("");for(var c=[],e=h.week_day,d=b.start.getDay(),f=!1,g=0;g<e.length;g++)e[g].checked&&(c.push(e[g].value),
+f=f||e[g].value==d);c.length||(c.push(d),f=!0);c.sort();if(scheduler.config.repeat_precise){if(!f)scheduler.transpose_day_week(b.start,c,1,7),b._start=!0}else b.start=scheduler.date.week_start(b.start),b._start=!0;a.push(c.join(","))},day:function(a){f("day_type")=="d"?a.push(Math.max(1,h.day_count.value)):(a.push("week"),a.push(1),a.push(""),a.push(""),a.push("1,2,3,4,5"),a.splice(0,1))},year:function(a,b){f("year_type")=="d"?(a.push("1"),b.start.setMonth(0),b.start.setDate(h.year_day.value),b.start.setMonth(h.year_month.value)):
+(a.push("1"),a.push(h.year_day2.value),a.push(h.year_week2.value),b.start.setDate(1),b.start.setMonth(h.year_month2.value));b._start=!0}},r={week:function(a){h.week_count.value=a[1];for(var b=h.week_day,c=a[4].split(","),e={},d=0;d<c.length;d++)e[c[d]]=!0;for(d=0;d<b.length;d++)b[d].checked=!!e[b[d].value]},month:function(a,b){a[2]==""?(h.month_type[0].checked=!0,h.month_count.value=a[1],h.month_day.value=b.start.getDate()):(h.month_type[1].checked=!0,h.month_count2.value=a[1],h.month_week2.value=
+a[3],h.month_day2.value=a[2])},day:function(a){h.day_type[0].checked=!0;h.day_count.value=a[1]},year:function(a,b){a[2]==""?(h.year_type[0].checked=!0,h.year_day.value=b.start.getDate(),h.year_month.value=b.start.getMonth()):(h.year_type[1].checked=!0,h.year_week2.value=a[3],h.year_day2.value=a[2],h.year_month2.value=b.start.getMonth())}};scheduler.form_blocks.recurring._set_repeat_code=i;for(var o=0;o<n.elements.length;o++){var p=n.elements[o];switch(p.name){case "repeat":p.onclick=e}}scheduler._lightbox._rec_init_done=
+!0},set_value:function(a,b,c){var d=scheduler.form_blocks.recurring;scheduler._lightbox._rec_init_done||d._init_set_value(a,b,c);a.open=!c.rec_type;a.blocked=c.event_pid&&c.event_pid!="0"?!0:!1;var f=d._ds;f.start=c.start_date;f.end=c._end_date;d.button_click(0,a.previousSibling.firstChild.firstChild,a,a);b&&d._set_repeat_code(b,f)},get_value:function(a,b){if(a.open){var c=scheduler.form_blocks.recurring._ds,d={};this.formSection("time").getValue(d);c.start=d.start_date;b.rec_type=scheduler.form_blocks.recurring._get_repeat_code(c);
+c._start?(b.start_date=new Date(c.start),b._start_date=new Date(c.start),c._start=!1):b._start_date=null;b._end_date=c.end;b.rec_pattern=b.rec_type.split("#")[0]}else b.rec_type=b.rec_pattern="",b._end_date=b.end_date;return b.rec_type},focus:function(){},button_click:function(a,b,c,d){!d.open&&!d.blocked?(d.style.height="115px",b.style.backgroundPosition="-5px 0px",b.nextSibling.innerHTML=scheduler.locale.labels.button_recurring_open):(d.style.height="0px",b.style.backgroundPosition="-5px 20px",
+b.nextSibling.innerHTML=scheduler.locale.labels.button_recurring);d.open=!d.open;scheduler.setLightboxSize()}};scheduler._rec_markers={};scheduler._rec_markers_pull={};scheduler._add_rec_marker=function(a,b){a._pid_time=b;this._rec_markers[a.id]=a;this._rec_markers_pull[a.event_pid]||(this._rec_markers_pull[a.event_pid]={});this._rec_markers_pull[a.event_pid][b]=a};scheduler._get_rec_marker=function(a,b){var c=this._rec_markers_pull[b];return c?c[a]:null};
+scheduler._get_rec_markers=function(a){return this._rec_markers_pull[a]||[]};scheduler._rec_temp=[];(function(){var a=scheduler.addEvent;scheduler.addEvent=function(b,c,d,f,e){var g=a.apply(this,arguments);if(g){var i=scheduler.getEvent(g);i.event_pid!=0&&scheduler._add_rec_marker(i,i.event_length*1E3);if(i.rec_type)i.rec_pattern=i.rec_type.split("#")[0]}return g}})();
+scheduler.attachEvent("onEventIdChange",function(a,b){if(!this._ignore_call){this._ignore_call=!0;for(var c=0;c<this._rec_temp.length;c++){var d=this._rec_temp[c];if(d.event_pid==a)d.event_pid=b,this.changeEventId(d.id,b+"#"+d.id.split("#")[1])}delete this._ignore_call}});
+scheduler.attachEvent("onConfirmedBeforeEventDelete",function(a){var b=this.getEvent(a);if(a.toString().indexOf("#")!=-1||b.event_pid&&b.event_pid!="0"&&b.rec_type&&b.rec_type!="none"){var a=a.split("#"),c=this.uid(),d=a[1]?a[1]:b._pid_time/1E3,f=this._copy_event(b);f.id=c;f.event_pid=b.event_pid||a[0];var e=d;f.event_length=e;f.rec_type=f.rec_pattern="none";this.addEvent(f);this._add_rec_marker(f,e*1E3)}else{b.rec_type&&this._lightbox_id&&this._roll_back_dates(b);var g=this._get_rec_markers(a),i;
+for(i in g)if(g.hasOwnProperty(i))a=g[i].id,this.getEvent(a)&&this.deleteEvent(a,!0)}return!0});
+scheduler.attachEvent("onEventChanged",function(a){if(this._loading)return!0;var b=this.getEvent(a);if(a.toString().indexOf("#")!=-1){var a=a.split("#"),c=this.uid();this._not_render=!0;var d=this._copy_event(b);d.id=c;d.event_pid=a[0];var f=a[1];d.event_length=f;d.rec_type=d.rec_pattern="";this._add_rec_marker(d,f*1E3);this.addEvent(d);this._not_render=!1}else{b.rec_type&&this._lightbox_id&&this._roll_back_dates(b);var e=this._get_rec_markers(a),g;for(g in e)e.hasOwnProperty(g)&&(delete this._rec_markers[e[g].id],
+this.deleteEvent(e[g].id,!0));delete this._rec_markers_pull[a];for(var i=!1,k=0;k<this._rendered.length;k++)this._rendered[k].getAttribute("event_id")==a&&(i=!0);if(!i)this._select_id=null}return!0});scheduler.attachEvent("onEventAdded",function(a){if(!this._loading){var b=this.getEvent(a);b.rec_type&&!b.event_length&&this._roll_back_dates(b)}return!0});
+scheduler.attachEvent("onEventSave",function(a,b){var c=this.getEvent(a);if(!c.rec_type&&b.rec_type&&(a+"").indexOf("#")==-1)this._select_id=null;return!0});scheduler.attachEvent("onEventCreated",function(a){var b=this.getEvent(a);if(!b.rec_type)b.rec_type=b.rec_pattern=b.event_length=b.event_pid="";return!0});scheduler.attachEvent("onEventCancel",function(a){var b=this.getEvent(a);b.rec_type&&(this._roll_back_dates(b),this.render_view_data())});
+scheduler._roll_back_dates=function(a){a.event_length=(a.end_date.valueOf()-a.start_date.valueOf())/1E3;a.end_date=a._end_date;a._start_date&&(a.start_date.setMonth(0),a.start_date.setDate(a._start_date.getDate()),a.start_date.setMonth(a._start_date.getMonth()),a.start_date.setFullYear(a._start_date.getFullYear()))};scheduler._validId=function(a){return a.toString().indexOf("#")==-1};scheduler.showLightbox_rec=scheduler.showLightbox;
+scheduler.showLightbox=function(a){var b=this.locale,c=scheduler.config.lightbox_recurring,d=this.getEvent(a),f=d.event_pid,e=a.toString().indexOf("#")!=-1;e&&(f=a.split("#")[0]);var g=function(a){var b=scheduler.getEvent(a);b._end_date=b.end_date;b.end_date=new Date(b.start_date.valueOf()+b.event_length*1E3);return scheduler.showLightbox_rec(a)};if((f||f==0)&&d.rec_type)return g(a);if(!f||f==0||!b.labels.confirm_recurring||c=="instance"||c=="series"&&!e)return this.showLightbox_rec(a);if(c=="ask"){var i=
+this;dhtmlx.modalbox({text:b.labels.confirm_recurring,title:b.labels.title_confirm_recurring,width:"500px",position:"middle",buttons:[b.labels.button_edit_series,b.labels.button_edit_occurrence,b.labels.icon_cancel],callback:function(b){switch(+b){case 0:return g(f);case 1:return i.showLightbox_rec(a)}}})}else g(f)};scheduler.get_visible_events_rec=scheduler.get_visible_events;
+scheduler.get_visible_events=function(a){for(var b=0;b<this._rec_temp.length;b++)delete this._events[this._rec_temp[b].id];this._rec_temp=[];for(var c=this.get_visible_events_rec(a),d=[],b=0;b<c.length;b++)c[b].rec_type?c[b].rec_pattern!="none"&&this.repeat_date(c[b],d):d.push(c[b]);return d};
+(function(){var a=scheduler.isOneDayEvent;scheduler.isOneDayEvent=function(b){return b.rec_type?!0:a.call(this,b)};var b=scheduler.updateEvent;scheduler.updateEvent=function(a){var d=scheduler.getEvent(a);if(d.rec_type)d.rec_pattern=(d.rec_type||"").split("#")[0];d&&d.rec_type&&a.toString().indexOf("#")===-1?scheduler.update_view():b.call(this,a)}})();scheduler.transponse_size={day:1,week:7,month:1,year:12};
+scheduler.date.day_week=function(a,b,c){a.setDate(1);var c=(c-1)*7,d=a.getDay(),f=b*1+c-d+1;a.setDate(f<=c?f+7:f)};scheduler.transpose_day_week=function(a,b,c,d,f){for(var e=(a.getDay()||(scheduler.config.start_on_monday?7:0))-c,g=0;g<b.length;g++)if(b[g]>e)return a.setDate(a.getDate()+b[g]*1-e-(d?c:f));this.transpose_day_week(a,b,c+d,null,c)};
+scheduler.transpose_type=function(a){var b="transpose_"+a;if(!this.date[b]){var c=a.split("_"),d=864E5,f="add_"+a,e=this.transponse_size[c[0]]*c[1];if(c[0]=="day"||c[0]=="week"){var g=null;if(c[4]&&(g=c[4].split(","),scheduler.config.start_on_monday)){for(var i=0;i<g.length;i++)g[i]=g[i]*1||7;g.sort()}this.date[b]=function(a,b){var c=Math.floor((b.valueOf()-a.valueOf())/(d*e));c>0&&a.setDate(a.getDate()+c*e);g&&scheduler.transpose_day_week(a,g,1,e)};this.date[f]=function(a,b){var c=new Date(a.valueOf());
+if(g)for(var d=0;d<b;d++)scheduler.transpose_day_week(c,g,0,e);else c.setDate(c.getDate()+b*e);return c}}else if(c[0]=="month"||c[0]=="year")this.date[b]=function(a,b){var d=Math.ceil((b.getFullYear()*12+b.getMonth()*1-(a.getFullYear()*12+a.getMonth()*1))/e);d>=0&&a.setMonth(a.getMonth()+d*e);c[3]&&scheduler.date.day_week(a,c[2],c[3])},this.date[f]=function(a,b){var d=new Date(a.valueOf());d.setMonth(d.getMonth()+b*e);c[3]&&scheduler.date.day_week(d,c[2],c[3]);return d}}};
+scheduler.repeat_date=function(a,b,c,d,f){var d=d||this._min_date,f=f||this._max_date,e=new Date(a.start_date.valueOf());if(!a.rec_pattern&&a.rec_type)a.rec_pattern=a.rec_type.split("#")[0];this.transpose_type(a.rec_pattern);for(scheduler.date["transpose_"+a.rec_pattern](e,d);e<a.start_date||scheduler._fix_daylight_saving_date(e,d,a,e,new Date(e.valueOf()+a.event_length*1E3)).valueOf()<=d.valueOf()||e.valueOf()+a.event_length*1E3<=d.valueOf();)e=this.date.add(e,1,a.rec_pattern);for(;e<f&&e<a.end_date;){var g=
+scheduler.config.occurrence_timestamp_in_utc?Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()):e.valueOf(),i=this._get_rec_marker(g,a.id);if(i)c&&b.push(i);else{var k=new Date(e.valueOf()+a.event_length*1E3),j=this._copy_event(a);j.text=a.text;j.start_date=e;j.event_pid=a.id;j.id=a.id+"#"+Math.ceil(g/1E3);j.end_date=k;j.end_date=scheduler._fix_daylight_saving_date(j.start_date,j.end_date,a,e,j.end_date);j._timed=this.isOneDayEvent(j);if(!j._timed&&!this._table_view&&
+!this.config.multi_day)break;b.push(j);c||(this._events[j.id]=j,this._rec_temp.push(j))}e=this.date.add(e,1,a.rec_pattern)}};scheduler._fix_daylight_saving_date=function(a,b,c,d,f){var e=a.getTimezoneOffset()-b.getTimezoneOffset();return e?e>0?new Date(d.valueOf()+c.event_length*1E3-e*6E4):new Date(b.valueOf()-e*6E4):new Date(f.valueOf())};
+scheduler.getRecDates=function(a,b){var c=typeof a=="object"?a:scheduler.getEvent(a),d=0,f=[],b=b||100,e=new Date(c.start_date.valueOf()),g=new Date(e.valueOf());if(!c.rec_type)return[{start_date:c.start_date,end_date:c.end_date}];if(c.rec_type=="none")return[];this.transpose_type(c.rec_pattern);for(scheduler.date["transpose_"+c.rec_pattern](e,g);e<c.start_date||e.valueOf()+c.event_length*1E3<=g.valueOf();)e=this.date.add(e,1,c.rec_pattern);for(;e<c.end_date;){var i=this._get_rec_marker(e.valueOf(),
+c.id),k=!0;if(i)i.rec_type=="none"?k=!1:f.push({start_date:i.start_date,end_date:i.end_date});else{var j=new Date(e),l=new Date(e.valueOf()+c.event_length*1E3),l=scheduler._fix_daylight_saving_date(j,l,c,e,l);f.push({start_date:j,end_date:l})}e=this.date.add(e,1,c.rec_pattern);if(k&&(d++,d==b))break}return f};
+scheduler.getEvents=function(a,b){var c=[],d;for(d in this._events){var f=this._events[d];if(f&&f.start_date<b&&f.end_date>a)if(f.rec_pattern){if(f.rec_pattern!="none"){var e=[];this.repeat_date(f,e,!0,a,b);for(var g=0;g<e.length;g++)!e[g].rec_pattern&&e[g].start_date<b&&e[g].end_date>a&&!this._rec_markers[e[g].id]&&c.push(e[g])}}else f.id.toString().indexOf("#")==-1&&c.push(f)}return c};scheduler.config.repeat_date="%m.%d.%Y";
+scheduler.config.lightbox.sections=[{name:"description",height:130,map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type",button:"recurring"},{name:"time",height:72,type:"time",map_to:"auto"}];scheduler._copy_dummy=function(){var a=new Date(this.start_date),b=new Date(this.end_date);this.start_date=a;this.end_date=b;this.event_length=this.event_pid=this.rec_pattern=this.rec_type=null};scheduler.config.include_end_by=!1;scheduler.config.lightbox_recurring="ask";
+scheduler.attachEvent("onClearAll",function(){scheduler._rec_markers={};scheduler._rec_markers_pull={};scheduler._rec_temp=[]});
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Daily</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Weekly</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Monthly</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Yearly</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />day<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Every workday</label> </div> <div style="display:none;" id="dhx_repeat_week"> Repeat every<input class="dhx_repeat_text" type="text" name="week_count" value="1" />week next days:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Monday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Thursday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tuesday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Friday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Wednesday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Saturday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sunday</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repeat</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />day every<input class="dhx_repeat_text" type="text" name="month_count" value="1" />month<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="0">Sunday</select>every<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />month<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />day<select name="year_month"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select>month<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="7">Sunday</select>of<select name="year_month2"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>No end date</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />After</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurrences<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />End by</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+
+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
diff --git a/codebase/ext/dhtmlxscheduler_serialize.js b/codebase/ext/dhtmlxscheduler_serialize.js
new file mode 100644
index 0000000..7dfd070
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_serialize.js
@@ -0,0 +1,9 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.data_attributes=function(){var g=[],c=scheduler.templates.xml_format,b;for(b in this._events){var e=this._events[b],d;for(d in e)d.substr(0,1)!="_"&&g.push([d,d=="start_date"||d=="end_date"?c:null]);break}return g};
+scheduler.toXML=function(g){var c=[],b=this.data_attributes(),e;for(e in this._events){var d=this._events[e];if(d.id.toString().indexOf("#")==-1){c.push("<event>");for(var a=0;a<b.length;a++)c.push("<"+b[a][0]+"><![CDATA["+(b[a][1]?b[a][1](d[b[a][0]]):d[b[a][0]])+"]]\></"+b[a][0]+">");c.push("</event>")}}return(g||"")+"<data>"+c.join("\n")+"</data>"};
+scheduler.toJSON=function(){var g=[],c=this.data_attributes(),b;for(b in this._events){var e=this._events[b];if(e.id.toString().indexOf("#")==-1){for(var e=this._events[b],d=[],a=0;a<c.length;a++)d.push(' "'+c[a][0]+'": "'+((c[a][1]?c[a][1](e[c[a][0]]):e[c[a][0]])||"").toString().replace(/\n/g,"")+'" ');g.push("{"+d.join(",")+"}")}}return"["+g.join(",\n")+"]"};
+scheduler.toICal=function(g){var c="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\nDESCRIPTION:",b="END:VCALENDAR",e=scheduler.date.date_to_str("%Y%m%dT%H%i%s"),d=scheduler.date.date_to_str("%Y%m%d"),a=[],h;for(h in this._events){var f=this._events[h];f.id.toString().indexOf("#")==-1&&(a.push("BEGIN:VEVENT"),!f._timed||!f.start_date.getHours()&&!f.start_date.getMinutes()?a.push("DTSTART:"+d(f.start_date)):a.push("DTSTART:"+e(f.start_date)),!f._timed||!f.end_date.getHours()&&
+!f.end_date.getMinutes()?a.push("DTEND:"+d(f.end_date)):a.push("DTEND:"+e(f.end_date)),a.push("SUMMARY:"+f.text),a.push("END:VEVENT"))}return c+(g||"")+"\n"+a.join("\n")+"\n"+b};
diff --git a/codebase/ext/dhtmlxscheduler_timeline.js b/codebase/ext/dhtmlxscheduler_timeline.js
new file mode 100644
index 0000000..bbbe8fe
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_timeline.js
@@ -0,0 +1,52 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(scheduler._temp_matrix_scope=function(){function H(){for(var a=scheduler.get_visible_events(),c=[],b=0;b<this.y_unit.length;b++)c[b]=[];c[d]||(c[d]=[]);for(b=0;b<a.length;b++){for(var d=this.order[a[b][this.y_property]],h=0;this._trace_x[h+1]&&a[b].start_date>=this._trace_x[h+1];)h++;for(;this._trace_x[h]&&a[b].end_date>this._trace_x[h];)c[d][h]||(c[d][h]=[]),c[d][h].push(a[b]),h++}return c}function w(a,c,b){var d=0,h=b._step,e=b.round_position,l=0,f=c?a.end_date:a.start_date;if(f.valueOf()>scheduler._max_date.valueOf())f=
+scheduler._max_date;var k=f-scheduler._min_date_timeline;if(k>0){var m=scheduler._get_date_index(b,f);scheduler._ignores[m]&&(e=!0);for(var i=0;i<m;i++)d+=scheduler._cols[i];var p=scheduler.date.add(scheduler._min_date_timeline,scheduler.matrix[scheduler._mode].x_step*m,scheduler.matrix[scheduler._mode].x_unit);e?+f>+p&&c&&(l=scheduler._cols[m]):(k=f-p,b.first_hour||b.last_hour?(k-=b._start_correction,k<0&&(k=0),l=Math.round(k/h),l>scheduler._cols[m]&&(l=scheduler._cols[m])):l=Math.round(k/h))}d+=
+c?k!=0&&!e?l-12:l-14:l+1;return d}function t(a,c){var b=scheduler._get_date_index(this,a),d=this._trace_x[b];c&&+a!=+this._trace_x[b]&&(d=this._trace_x[b+1]?this._trace_x[b+1]:scheduler.date.add(this._trace_x[b],this.x_step,this.x_unit));return new Date(d)}function I(a){var c="";if(a&&this.render!="cell"){a.sort(this.sort||function(a,b){return a.start_date.valueOf()==b.start_date.valueOf()?a.id>b.id?1:-1:a.start_date>b.start_date?1:-1});for(var b=[],d=a.length,h=0;h<d;h++){var e=a[h];e._inner=!1;
+for(var l=this.round_position?t.apply(this,[e.start_date,!1]):e.start_date,f=this.round_position?t.apply(this,[e.end_date,!0]):e.end_date;b.length;){var k=b[b.length-1];if(k.end_date.valueOf()<=l.valueOf())b.splice(b.length-1,1);else break}for(var m=!1,i=0;i<b.length;i++){var p=b[i];if(p.end_date.valueOf()<=l.valueOf()){m=!0;e._sorder=p._sorder;b.splice(i,1);e._inner=!0;break}}if(b.length)b[b.length-1]._inner=!0;if(!m)if(b.length)if(b.length<=b[b.length-1]._sorder){if(b[b.length-1]._sorder)for(var g=
+0;g<b.length;g++){for(var q=!1,n=0;n<b.length;n++)if(b[n]._sorder==g){q=!0;break}if(!q){e._sorder=g;break}}else e._sorder=0;e._inner=!0}else{for(var q=b[0]._sorder,o=1;o<b.length;o++)if(b[o]._sorder>q)q=b[o]._sorder;e._sorder=q+1;e._inner=!1}else e._sorder=0;b.push(e);b.length>(b.max_count||0)?(b.max_count=b.length,e._count=b.length):e._count=e._count?e._count:1}for(var j=0;j<a.length;j++)a[j]._count=b.max_count;for(var r=0;r<d;r++)c+=scheduler.render_timeline_event.call(this,a[r],!1)}return c}function J(a){var c=
+"<table style='table-layout:fixed;' cellspacing='0' cellpadding='0'>",b=[];scheduler._load_mode&&scheduler._load();if(this.render=="cell")b=H.call(this);else for(var d=scheduler.get_visible_events(),h=this.order,e=0;e<d.length;e++){var l=d[e],f=l[this.y_property],k=this.order[f];if(this.show_unassigned&&!f)for(var m in h){if(h.hasOwnProperty(m)){k=h[m];b[k]||(b[k]=[]);var i=scheduler._lame_copy({},l);i[this.y_property]=m;b[k].push(i)}}else b[k]||(b[k]=[]),b[k].push(l)}for(var p=0,g=0;g<scheduler._cols.length;g++)p+=
+scheduler._cols[g];var q=new Date,n=scheduler._cols.length-scheduler._ignores_detected;this._step=q=(scheduler.date.add(q,this.x_step*n,this.x_unit)-q-(this._start_correction+this._end_correction)*n)/p;this._summ=p;var o=scheduler._colsS.heights=[];this._events_height={};this._section_height={};for(g=0;g<this.y_unit.length;g++){var j=this._logic(this.render,this.y_unit[g],this);scheduler._merge(j,{height:this.dy});if(this.section_autoheight){if(this.y_unit.length*j.height<a.offsetHeight)j.height=
+Math.max(j.height,Math.floor((a.offsetHeight-1)/this.y_unit.length));this._section_height[this.y_unit[g].key]=j.height}scheduler._merge(j,{tr_className:"",style_height:"height:"+j.height+"px;",style_width:"width:"+(this.dx-1)+"px;",td_className:"dhx_matrix_scell"+(scheduler.templates[this.name+"_scaley_class"](this.y_unit[g].key,this.y_unit[g].label,this.y_unit[g])?" "+scheduler.templates[this.name+"_scaley_class"](this.y_unit[g].key,this.y_unit[g].label,this.y_unit[g]):""),td_content:scheduler.templates[this.name+
+"_scale_label"](this.y_unit[g].key,this.y_unit[g].label,this.y_unit[g]),summ_width:"width:"+p+"px;",table_className:""});var r=I.call(this,b[g]);if(this.fit_events){var s=this._events_height[this.y_unit[g].key]||0;j.height=s>j.height?s:j.height;j.style_height="height:"+j.height+"px;";this._section_height[this.y_unit[g].key]=j.height}c+="<tr class='"+j.tr_className+"' style='"+j.style_height+"'><td class='"+j.td_className+"' style='"+j.style_width+" height:"+(j.height-1)+"px;'>"+j.td_content+"</td>";
+if(this.render=="cell")for(e=0;e<scheduler._cols.length;e++)c+=scheduler._ignores[e]?"<td></td>":"<td class='dhx_matrix_cell "+scheduler.templates[this.name+"_cell_class"](b[g][e],this._trace_x[e],this.y_unit[g])+"' style='width:"+(scheduler._cols[e]-1)+"px'><div style='width:"+(scheduler._cols[e]-1)+"px'>"+scheduler.templates[this.name+"_cell_value"](b[g][e])+"</div></td>";else{c+="<td><div style='"+j.summ_width+" "+j.style_height+" position:relative;' class='dhx_matrix_line'>";c+=r;c+="<table class='"+
+j.table_className+"' cellpadding='0' cellspacing='0' style='"+j.summ_width+" "+j.style_height+"' >";for(e=0;e<scheduler._cols.length;e++)c+=scheduler._ignores[e]?"<td></td>":"<td class='dhx_matrix_cell "+scheduler.templates[this.name+"_cell_class"](b[g],this._trace_x[e],this.y_unit[g])+"' style='width:"+(scheduler._cols[e]-1)+"px'><div style='width:"+(scheduler._cols[e]-1)+"px'></div></td>";c+="</table>";c+="</div></td>"}c+="</tr>"}c+="</table>";this._matrix=b;a.innerHTML=c;scheduler._rendered=[];
+for(var B=scheduler._obj.getElementsByTagName("DIV"),g=0;g<B.length;g++)B[g].getAttribute("event_id")&&scheduler._rendered.push(B[g]);this._scales={};for(g=0;g<a.firstChild.rows.length;g++){o.push(a.firstChild.rows[g].offsetHeight);var x=this.y_unit[g].key,z=this._scales[x]=scheduler._isRender("cell")?a.firstChild.rows[g]:a.firstChild.rows[g].childNodes[1].getElementsByTagName("div")[0];scheduler.callEvent("onScaleAdd",[z,x])}}function K(a){var c=scheduler.xy.scale_height,b=this._header_resized||
+scheduler.xy.scale_height;scheduler._cols=[];scheduler._colsS={height:0};this._trace_x=[];var d=scheduler._x-this.dx-scheduler.xy.scroll_width,h=[this.dx],e=scheduler._els.dhx_cal_header[0];e.style.width=h[0]+d+"px";scheduler._min_date_timeline=scheduler._min_date;var l=scheduler.config.preserve_scale_length,f=scheduler._min_date;scheduler._process_ignores(f,this.x_size,this.x_unit,this.x_step,l);var k=this.x_size+(l?scheduler._ignores_detected:0);if(k!=this.x_size)scheduler._max_date=scheduler.date.add(scheduler._min_date,
+k*this.x_step,this.x_unit);for(var m=k-scheduler._ignores_detected,i=0;i<k;i++)this._trace_x[i]=new Date(f),f=scheduler.date.add(f,this.x_step,this.x_unit),scheduler._ignores[i]?(scheduler._cols[i]=0,m++):scheduler._cols[i]=Math.floor(d/(m-i)),d-=scheduler._cols[i],h[i+1]=h[i]+scheduler._cols[i];a.innerHTML="<div></div>";if(this.second_scale){for(var p=this.second_scale.x_unit,g=[this._trace_x[0]],q=[],n=[this.dx,this.dx],o=0,j=0;j<this._trace_x.length;j++){var r=this._trace_x[j],s=E(p,r,g[o]);s&&
+(++o,g[o]=r,n[o+1]=n[o]);var B=o+1;q[o]=scheduler._cols[j]+(q[o]||0);n[B]+=scheduler._cols[j]}a.innerHTML="<div></div><div></div>";var x=a.firstChild;x.style.height=b+"px";var z=a.lastChild;z.style.position="relative";for(var u=0;u<g.length;u++){var y=g[u],C=scheduler.templates[this.name+"_second_scalex_class"](y),A=document.createElement("DIV");A.className="dhx_scale_bar dhx_second_scale_bar"+(C?" "+C:"");scheduler.set_xy(A,q[u]-1,b-3,n[u],0);A.innerHTML=scheduler.templates[this.name+"_second_scale_date"](y);
+x.appendChild(A)}}scheduler.xy.scale_height=b;for(var a=a.lastChild,v=0;v<this._trace_x.length;v++)if(!scheduler._ignores[v]){f=this._trace_x[v];scheduler._render_x_header(v,h[v],f,a);var w=scheduler.templates[this.name+"_scalex_class"](f);w&&(a.lastChild.className+=" "+w)}scheduler.xy.scale_height=c;var t=this._trace_x;a.onclick=function(a){var b=F(a);b&&scheduler.callEvent("onXScaleClick",[b.x,t[b.x],a||event])};a.ondblclick=function(a){var b=F(a);b&&scheduler.callEvent("onXScaleDblClick",[b.x,
+t[b.x],a||event])}}function E(a,c,b){switch(a){case "hour":return c.getHours()!=b.getHours()||E("day",c,b);case "day":return!(c.getDate()==b.getDate()&&c.getMonth()==b.getMonth()&&c.getFullYear()==b.getFullYear());case "week":return!(scheduler.date.getISOWeek(c)==scheduler.date.getISOWeek(b)&&c.getFullYear()==b.getFullYear());case "month":return!(c.getMonth()==b.getMonth()&&c.getFullYear()==b.getFullYear());case "year":return c.getFullYear()!=b.getFullYear();default:return!1}}function L(a){if(a){scheduler.set_sizes();
+G();var c=scheduler._min_date;K.call(this,scheduler._els.dhx_cal_header[0]);J.call(this,scheduler._els.dhx_cal_data[0]);scheduler._min_date=c;scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates[this.name+"_date"](scheduler._min_date,scheduler._max_date);scheduler._mark_now&&scheduler._mark_now()}D()}function D(){if(scheduler._tooltip)scheduler._tooltip.style.display="none",scheduler._tooltip.date=""}function M(a,c,b){if(a.render=="cell"){var d=c.x+"_"+c.y,h=a._matrix[c.y][c.x];if(!h)return D();
+h.sort(function(a,b){return a.start_date>b.start_date?1:-1});if(scheduler._tooltip){if(scheduler._tooltip.date==d)return;scheduler._tooltip.innerHTML=""}else{var e=scheduler._tooltip=document.createElement("DIV");e.className="dhx_year_tooltip";document.body.appendChild(e);e.onclick=scheduler._click.dhx_cal_data}for(var l="",f=0;f<h.length;f++){var k=h[f].color?"background-color:"+h[f].color+";":"",m=h[f].textColor?"color:"+h[f].textColor+";":"";l+="<div class='dhx_tooltip_line' event_id='"+h[f].id+
+"' style='"+k+""+m+"'>";l+="<div class='dhx_tooltip_date'>"+(h[f]._timed?scheduler.templates.event_date(h[f].start_date):"")+"</div>";l+="<div class='dhx_event_icon icon_details'>&nbsp;</div>";l+=scheduler.templates[a.name+"_tooltip"](h[f].start_date,h[f].end_date,h[f])+"</div>"}scheduler._tooltip.style.display="";scheduler._tooltip.style.top="0px";scheduler._tooltip.style.left=document.body.offsetWidth-b.left-scheduler._tooltip.offsetWidth<0?b.left-scheduler._tooltip.offsetWidth+"px":b.left+c.src.offsetWidth+
+"px";scheduler._tooltip.date=d;scheduler._tooltip.innerHTML=l;scheduler._tooltip.style.top=document.body.offsetHeight-b.top-scheduler._tooltip.offsetHeight<0?b.top-scheduler._tooltip.offsetHeight+c.src.offsetHeight+"px":b.top+"px"}}function G(){dhtmlxEvent(scheduler._els.dhx_cal_data[0],"mouseover",function(a){var c=scheduler.matrix[scheduler._mode];if(c&&c.render=="cell"){if(c){var b=scheduler._locate_cell_timeline(a),a=a||event,d=a.target||a.srcElement;if(b)return M(c,b,getOffset(b.src))}D()}});
+G=function(){}}function N(a){for(var c=a.parentNode.childNodes,b=0;b<c.length;b++)if(c[b]==a)return b;return-1}function F(a){for(var a=a||event,c=a.target?a.target:a.srcElement;c&&c.tagName!="DIV";)c=c.parentNode;if(c&&c.tagName=="DIV"){var b=c.className.split(" ")[0];if(b=="dhx_scale_bar")return{x:N(c),y:-1,src:c,scale:!0}}}scheduler.matrix={};scheduler._merge=function(a,c){for(var b in c)typeof a[b]=="undefined"&&(a[b]=c[b])};scheduler.createTimelineView=function(a){scheduler._skin_init();scheduler._merge(a,
+{section_autoheight:!0,name:"matrix",x:"time",y:"time",x_step:1,x_unit:"hour",y_unit:"day",y_step:1,x_start:0,x_size:24,y_start:0,y_size:7,render:"cell",dx:200,dy:50,event_dy:scheduler.xy.bar_height-5,event_min_dy:scheduler.xy.bar_height-5,resize_events:!0,fit_events:!0,show_unassigned:!1,second_scale:!1,round_position:!1,_logic:function(a,b,c){var f={};scheduler.checkEvent("onBeforeSectionRender")&&(f=scheduler.callEvent("onBeforeSectionRender",[a,b,c]));return f}});a._original_x_start=a.x_start;
+if(a.x_unit!="day")a.first_hour=a.last_hour=0;a._start_correction=a.first_hour?a.first_hour*36E5:0;a._end_correction=a.last_hour?(24-a.last_hour)*36E5:0;scheduler.checkEvent("onTimelineCreated")&&scheduler.callEvent("onTimelineCreated",[a]);var c=scheduler.render_data;scheduler.render_data=function(b,e){if(this._mode==a.name)if(e&&!a.show_unassigned&&a.render!="cell")for(var d=0;d<b.length;d++)this.clear_event(b[d]),this.render_timeline_event.call(this.matrix[this._mode],b[d],!0);else scheduler._renderMatrix.call(a,
+!0,!0);else return c.apply(this,arguments)};scheduler.matrix[a.name]=a;scheduler.templates[a.name+"_cell_value"]=function(a){return a?a.length:""};scheduler.templates[a.name+"_cell_class"]=function(){return""};scheduler.templates[a.name+"_scalex_class"]=function(){return""};scheduler.templates[a.name+"_second_scalex_class"]=function(){return""};scheduler.templates[a.name+"_scaley_class"]=function(){return""};scheduler.templates[a.name+"_scale_label"]=function(a,b){return b};scheduler.templates[a.name+
+"_tooltip"]=function(a,b,c){return c.text};scheduler.templates[a.name+"_date"]=function(a,b){return a.getDay()==b.getDay()&&b-a<864E5||+a==+scheduler.date.date_part(new Date(b))||+scheduler.date.add(a,1,"day")==+b&&b.getHours()==0&&b.getMinutes()==0?scheduler.templates.day_date(a):a.getDay()!=b.getDay()&&b-a<864E5?scheduler.templates.day_date(a)+" &ndash; "+scheduler.templates.day_date(b):scheduler.templates.week_date(a,b)};scheduler.templates[a.name+"_scale_date"]=scheduler.date.date_to_str(a.x_date||
+scheduler.config.hour_date);scheduler.templates[a.name+"_second_scale_date"]=scheduler.date.date_to_str(a.second_scale&&a.second_scale.x_date?a.second_scale.x_date:scheduler.config.hour_date);scheduler.date["add_"+a.name]=function(b,c){var d=scheduler.date.add(b,(a.x_length||a.x_size)*c*a.x_step,a.x_unit);if(a.x_unit=="minute"||a.x_unit=="hour"){var f=a.x_length||a.x_size;if(+scheduler.date.date_part(new Date(b))==+scheduler.date.date_part(new Date(d)))a.x_start+=c*f;else{var k=a.x_unit=="hour"?a.x_step*
+60:a.x_step,m=1440/(f*k)-1,i=Math.round(m*f);c>0?a.x_start-=i:a.x_start=i+a.x_start}}return d};scheduler.attachEvent("onBeforeTodayDisplayed",function(){a.x_start=a._original_x_start;return!0});scheduler.date[a.name+"_start"]=function(b){var c=scheduler.date[a.x_unit+"_start"]||scheduler.date.day_start,d=c.call(scheduler.date,b);return d=scheduler.date.add(d,a.x_step*a.x_start,a.x_unit)};scheduler.attachEvent("onSchedulerResize",function(){return this._mode==a.name?(scheduler._renderMatrix.call(a,
+!0,!0),!1):!0});scheduler.attachEvent("onOptionsLoad",function(){a.order={};scheduler.callEvent("onOptionsLoadStart",[]);for(var b=0;b<a.y_unit.length;b++)a.order[a.y_unit[b].key]=b;scheduler.callEvent("onOptionsLoadFinal",[]);scheduler._date&&a.name==scheduler._mode&&scheduler.setCurrentView(scheduler._date,scheduler._mode)});scheduler.callEvent("onOptionsLoad",[a]);scheduler[a.name+"_view"]=function(){scheduler._renderMatrix.apply(a,arguments)};var b=new Date,d=scheduler.date.add(b,a.x_step,a.x_unit).valueOf()-
+b.valueOf();scheduler["mouse_"+a.name]=function(b){var c=this._drag_event;if(this._drag_id)c=this.getEvent(this._drag_id),this._drag_event._dhx_changed=!0;b.x-=a.dx;for(var d=0,f=0,k=0;f<=this._cols.length-1;f++){var m=this._cols[f];d+=m;if(d>b.x){var i=(b.x-(d-m))/m,i=i<0?0:i;break}}if(f==0&&this._ignores[0]){f=1;for(i=0;this._ignores[f];)f++}else if(f==this._cols.length&&this._ignores[f-1]){f=this._cols.length-1;for(i=0;this._ignores[f];)f--;f++}for(d=0;k<this._colsS.heights.length;k++)if(d+=this._colsS.heights[k],
+d>b.y)break;b.fields={};a.y_unit[k]||(k=a.y_unit.length-1);if(k>=0&&a.y_unit[k]&&(b.section=b.fields[a.y_property]=a.y_unit[k].key,c)){if(c[a.y_property]!=b.section){var p=scheduler._get_timeline_event_height(c,a);c._sorder=scheduler._get_dnd_order(c._sorder,p,a._section_height[b.section])}c[a.y_property]=b.section}b.x=0;b.force_redraw=!0;b.custom=!0;var g;if(f>=a._trace_x.length)g=scheduler.date.add(a._trace_x[a._trace_x.length-1],a.x_step,a.x_unit),a._end_correction&&(g=new Date(g-a._end_correction));
+else{var q=i*m*a._step+a._start_correction;g=new Date(+a._trace_x[f]+q)}if(this._drag_mode=="move"&&this._drag_id&&this._drag_event){var c=this.getEvent(this._drag_id),n=this._drag_event;b._ignores=this._ignores_detected||a._start_correction||a._end_correction;if(!n._move_delta&&(n._move_delta=(c.start_date-g)/6E4,this.config.preserve_length&&b._ignores))n._move_delta=this._get_real_event_length(c.start_date,g,a),n._event_length=this._get_real_event_length(c.start_date,c.end_date,a);if(this.config.preserve_length&&
+b._ignores){var o=n._event_length,j=this._get_fictional_event_length(g,n._move_delta,a,!0);g=new Date(g-j)}else g=scheduler.date.add(g,n._move_delta,"minute")}if(this._drag_mode=="resize"&&c){var r=!!(Math.abs(c.start_date-g)<Math.abs(c.end_date-g));if(a._start_correction||a._end_correction){var s=!this._drag_event||this._drag_event._resize_from_start==void 0;s||Math.abs(c.end_date-c.start_date)<=6E4*this.config.time_step?this._drag_event._resize_from_start=b.resize_from_start=r:b.resize_from_start=
+this._drag_event._resize_from_start}else b.resize_from_start=r}if(a.round_position)switch(this._drag_mode){case "move":if(!this.config.preserve_length&&(g=t.call(a,g,!1),a.x_unit=="day"))b.custom=!1;break;case "resize":if(this._drag_event){if(this._drag_event._resize_from_start==null)this._drag_event._resize_from_start=b.resize_from_start;b.resize_from_start=this._drag_event._resize_from_start;g=t.call(a,g,!this._drag_event._resize_from_start)}}b.y=Math.round((g-this._min_date)/(6E4*this.config.time_step));
+b.shift=this.config.time_step;return b}};scheduler._get_timeline_event_height=function(a,c){var b=a[c.y_property],d=c.event_dy;c.event_dy=="full"&&(d=c.section_autoheight?c._section_height[b]-6:c.dy-3);c.resize_events&&(d=Math.max(Math.floor(d/a._count),c.event_min_dy));return d};scheduler._get_timeline_event_y=function(a,c){var b=a,d=2+b*c+(b?b*2:0);scheduler.config.cascade_event_display&&(d=2+b*scheduler.config.cascade_event_margin+(b?b*2:0));return d};scheduler.render_timeline_event=function(a,
+c){var b=a[this.y_property];if(!b)return"";var d=a._sorder,h=w(a,!1,this),e=w(a,!0,this),l=scheduler._get_timeline_event_height(a,this),f=l-2;!a._inner&&this.event_dy=="full"&&(f=(f+2)*(a._count-d)-2);var k=scheduler._get_timeline_event_y(a._sorder,l),m=l+k+2;if(!this._events_height[b]||this._events_height[b]<m)this._events_height[b]=m;var i=scheduler.templates.event_class(a.start_date,a.end_date,a),i="dhx_cal_event_line "+(i||""),p=a.color?"background:"+a.color+";":"",g=a.textColor?"color:"+a.textColor+
+";":"",q=scheduler.templates.event_bar_text(a.start_date,a.end_date,a),n='<div event_id="'+a.id+'" class="'+i+'" style="'+p+""+g+"position:absolute; top:"+k+"px; height: "+f+"px; left:"+h+"px; width:"+Math.max(0,e-h)+"px;"+(a._text_style||"")+'">';if(scheduler.config.drag_resize&&!scheduler.config.readonly){var o="dhx_event_resize";n+="<div class='"+o+" "+o+"_start' style='height: "+f+"px;'></div><div class='"+o+" "+o+"_end' style='height: "+f+"px;'></div>"}n+=q+"</div>";if(c){var j=document.createElement("DIV");
+j.innerHTML=n;var r=this.order[b],s=scheduler._els.dhx_cal_data[0].firstChild.rows[r].cells[1].firstChild;scheduler._rendered.push(j.firstChild);s.appendChild(j.firstChild)}else return n};scheduler._renderMatrix=function(a,c){if(!c)scheduler._els.dhx_cal_data[0].scrollTop=0;scheduler._min_date=scheduler.date[this.name+"_start"](scheduler._date);scheduler._max_date=scheduler.date.add(scheduler._min_date,this.x_size*this.x_step,this.x_unit);scheduler._table_view=!0;if(this.second_scale){if(a&&!this._header_resized)this._header_resized=
+scheduler.xy.scale_height,scheduler.xy.scale_height*=2,scheduler._els.dhx_cal_header[0].className+=" dhx_second_cal_header";if(!a&&this._header_resized){scheduler.xy.scale_height/=2;this._header_resized=!1;var b=scheduler._els.dhx_cal_header[0];b.className=b.className.replace(/ dhx_second_cal_header/gi,"")}}L.call(this,a)};scheduler._locate_cell_timeline=function(a){for(var a=a||event,c=a.target?a.target:a.srcElement,b={},d=scheduler.matrix[scheduler._mode],h=scheduler.getActionData(a),e=0;e<d._trace_x.length-
+1;e++)if(+h.date<d._trace_x[e+1])break;b.x=e;b.y=d.order[h.section];var l=scheduler._isRender("cell")?1:0;b.src=d._scales[h.section]?d._scales[h.section].getElementsByTagName("td")[e+l]:null;for(var f=!1;b.x==0&&c.className!="dhx_cal_data"&&c.parentNode;)if(c.className.split(" ")[0]=="dhx_matrix_scell"){f=!0;break}else c=c.parentNode;if(f)b.x=-1,b.src=c,b.scale=!0;return b};var O=scheduler._click.dhx_cal_data;scheduler._click.dhx_marked_timespan=scheduler._click.dhx_cal_data=function(a){var c=O.apply(this,
+arguments),b=scheduler.matrix[scheduler._mode];if(b){var d=scheduler._locate_cell_timeline(a);d&&(d.scale?scheduler.callEvent("onYScaleClick",[d.y,b.y_unit[d.y],a||event]):scheduler.callEvent("onCellClick",[d.x,d.y,b._trace_x[d.x],(b._matrix[d.y]||{})[d.x]||[],a||event]))}return c};scheduler.dblclick_dhx_marked_timespan=scheduler.dblclick_dhx_matrix_cell=function(a){var c=scheduler.matrix[scheduler._mode];if(c){var b=scheduler._locate_cell_timeline(a);b&&(b.scale?scheduler.callEvent("onYScaleDblClick",
+[b.y,c.y_unit[b.y],a||event]):scheduler.callEvent("onCellDblClick",[b.x,b.y,c._trace_x[b.x],(c._matrix[b.y]||{})[b.x]||[],a||event]))}};scheduler.dblclick_dhx_matrix_scell=function(a){return scheduler.dblclick_dhx_matrix_cell(a)};scheduler._isRender=function(a){return scheduler.matrix[scheduler._mode]&&scheduler.matrix[scheduler._mode].render==a};scheduler.attachEvent("onCellDblClick",function(a,c,b,d,h){if(!(this.config.readonly||h.type=="dblclick"&&!this.config.dblclick_create)){var e=scheduler.matrix[scheduler._mode],
+l={};l.start_date=e._trace_x[a];l.end_date=e._trace_x[a+1]?e._trace_x[a+1]:scheduler.date.add(e._trace_x[a],e.x_step,e.x_unit);if(e._start_correction)l.start_date=new Date(l.start_date*1+e._start_correction);if(e._end_correction)l.end_date=new Date(l.end_date-e._end_correction);l[e.y_property]=e.y_unit[c].key;scheduler.addEventNow(l,null,h)}});scheduler.attachEvent("onBeforeDrag",function(){return!scheduler._isRender("cell")});scheduler.attachEvent("onEventChanged",function(a,c){c._timed=this.isOneDayEvent(c)});
+var P=scheduler._render_marked_timespan;scheduler._render_marked_timespan=function(a,c,b,d,h){if(!scheduler.config.display_marked_timespans)return[];if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){if(!scheduler._isRender("cell")){var e=scheduler._lame_copy({},scheduler.matrix[scheduler._mode]);e.round_position=!1;var l=[],f=[],k=[];if(b)k=[c],f=[b];else{var m=e.order,i;for(i in m)m.hasOwnProperty(i)&&(f.push(i),k.push(e._scales[i]))}var d=d?new Date(d):scheduler._min_date,h=h?new Date(h):
+scheduler._max_date,p=[];if(a.days>6){var g=new Date(a.days);scheduler.date.date_part(new Date(d))<=+g&&+h>=+g&&p.push(g)}else p.push.apply(p,scheduler._get_dates_by_index(a.days));for(var q=a.zones,n=scheduler._get_css_classes_by_config(a),o=0;o<f.length;o++)for(var c=k[o],b=f[o],j=0;j<p.length;j++)for(var r=p[j],s=0;s<q.length;s+=2){var t=q[s],x=q[s+1],z=new Date(+r+t*6E4),u=new Date(+r+x*6E4);if(d<u&&h>z){var y=scheduler._get_block_by_config(a);y.className=n;var C=w({start_date:z},!1,e)-1,A=w({start_date:u},
+!1,e)-1,v=Math.max(1,A-C-1),D=e._section_height[b]-1;y.style.cssText="height: "+D+"px; left: "+C+"px; width: "+v+"px; top: 0;";c.insertBefore(y,c.firstChild);l.push(y)}}return l}}else return P.apply(scheduler,[a,c,b])};var Q=scheduler._append_mark_now;scheduler._append_mark_now=function(a,c){if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){var b=scheduler._currentDate(),d=scheduler._get_zone_minutes(b),h={days:+scheduler.date.date_part(b),zones:[d,d+1],css:"dhx_matrix_now_time",type:"dhx_now_time"};
+return scheduler._render_marked_timespan(h)}else return Q.apply(scheduler,[a,c])};scheduler.attachEvent("onScaleAdd",function(a,c){var b=scheduler._marked_timespans;if(b&&scheduler.matrix&&scheduler.matrix[scheduler._mode])for(var d=scheduler._mode,h=scheduler._min_date,e=scheduler._max_date,l=b.global,f=scheduler.date.date_part(new Date(h));f<e;f=scheduler.date.add(f,1,"day")){var k=+f,m=f.getDay(),i=[],p=l[k]||l[m];i.push.apply(i,scheduler._get_configs_to_render(p));if(b[d]&&b[d][c]){var g=[],q=
+scheduler._get_types_to_render(b[d][c][m],b[d][c][k]);g.push.apply(g,scheduler._get_configs_to_render(q));g.length&&(i=g)}for(var n=0;n<i.length;n++){var o=i[n],j=o.days;j<7?(j=k,scheduler._render_marked_timespan(o,a,c,f,scheduler.date.add(f,1,"day")),j=m):scheduler._render_marked_timespan(o,a,c,f,scheduler.date.add(f,1,"day"))}}});scheduler._get_date_index=function(a,c){for(var b=0,d=a._trace_x;b<d.length-1&&+c>=+d[b+1];)b++;return b}})();
diff --git a/codebase/ext/dhtmlxscheduler_tooltip.js b/codebase/ext/dhtmlxscheduler_tooltip.js
new file mode 100644
index 0000000..aeeeb8b
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_tooltip.js
@@ -0,0 +1,13 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+window.dhtmlXTooltip=scheduler.dhtmlXTooltip=window.dhtmlxTooltip={};dhtmlXTooltip.config={className:"dhtmlXTooltip tooltip",timeout_to_display:50,timeout_to_hide:50,delta_x:15,delta_y:-20};dhtmlXTooltip.tooltip=document.createElement("div");dhtmlXTooltip.tooltip.className=dhtmlXTooltip.config.className;
+dhtmlXTooltip.show=function(b,d){if(!scheduler.config.touch||scheduler.config.touch_tooltip){var c=dhtmlXTooltip,g=this.tooltip,a=g.style;c.tooltip.className=c.config.className;var h=this.position(b),i=b.target||b.srcElement;if(!this.isTooltip(i)){var e=h.x+(c.config.delta_x||0),f=h.y-(c.config.delta_y||0);a.visibility="hidden";a.removeAttribute?(a.removeAttribute("right"),a.removeAttribute("bottom")):(a.removeProperty("right"),a.removeProperty("bottom"));a.left="0";a.top="0";this.tooltip.innerHTML=
+d;document.body.appendChild(this.tooltip);var j=this.tooltip.offsetWidth,k=this.tooltip.offsetHeight;document.body.offsetWidth-e-j<0?(a.removeAttribute?a.removeAttribute("left"):a.removeProperty("left"),a.right=document.body.offsetWidth-e+2*(c.config.delta_x||0)+"px"):a.left=e<0?h.x+Math.abs(c.config.delta_x||0)+"px":e+"px";document.body.offsetHeight-f-k<0?(a.removeAttribute?a.removeAttribute("top"):a.removeProperty("top"),a.bottom=document.body.offsetHeight-f-2*(c.config.delta_y||0)+"px"):a.top=
+f<0?h.y+Math.abs(c.config.delta_y||0)+"px":f+"px";a.visibility="visible";scheduler.callEvent("onTooltipDisplayed",[this.tooltip,this.tooltip.event_id])}}};dhtmlXTooltip._clearTimeout=function(){this.tooltip._timeout_id&&window.clearTimeout(this.tooltip._timeout_id)};dhtmlXTooltip.hide=function(){if(this.tooltip.parentNode){var b=this.tooltip.event_id;this.tooltip.event_id=null;this.tooltip.parentNode.removeChild(this.tooltip);scheduler.callEvent("onAfterTooltip",[b])}this._clearTimeout()};
+dhtmlXTooltip.delay=function(b,d,c,g){this._clearTimeout();this.tooltip._timeout_id=setTimeout(function(){var a=b.apply(d,c);b=d=c=null;return a},g||this.config.timeout_to_display)};dhtmlXTooltip.isTooltip=function(b){var d=!1;for(b.className.split(" ");b&&!d;)d=b.className==this.tooltip.className,b=b.parentNode;return d};
+dhtmlXTooltip.position=function(b){b=b||window.event;if(b.pageX||b.pageY)return{x:b.pageX,y:b.pageY};var d=window._isIE&&document.compatMode!="BackCompat"?document.documentElement:document.body;return{x:b.clientX+d.scrollLeft-d.clientLeft,y:b.clientY+d.scrollTop-d.clientTop}};
+scheduler.attachEvent("onMouseMove",function(b,d){var c=window.event||d,g=c.target||c.srcElement,a=dhtmlXTooltip,h=a.isTooltip(g),i=a.isTooltipTarget&&a.isTooltipTarget(g);if(b||h||i){var e;if(b||a.tooltip.event_id){var f=scheduler.getEvent(b)||scheduler.getEvent(a.tooltip.event_id);if(!f)return;a.tooltip.event_id=f.id;e=scheduler.templates.tooltip_text(f.start_date,f.end_date,f);if(!e)return a.hide()}i&&(e="");var j=void 0;_isIE&&(j=document.createEventObject(c));scheduler.callEvent("onBeforeTooltip",
+[b])&&e&&a.delay(a.show,a,[j||c,e])}else a.delay(a.hide,a,[],a.config.timeout_to_hide)});scheduler.attachEvent("onBeforeDrag",function(){dhtmlXTooltip.hide();return!0});scheduler.attachEvent("onEventDeleted",function(){dhtmlXTooltip.hide();return!0});scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%Y-%m-%d %H:%i");
+scheduler.templates.tooltip_text=function(b,d,c){return"<b>Event:</b> "+c.text+"<br/><b>Start date:</b> "+scheduler.templates.tooltip_date_format(b)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(d)};
diff --git a/codebase/ext/dhtmlxscheduler_treetimeline.js b/codebase/ext/dhtmlxscheduler_treetimeline.js
new file mode 100644
index 0000000..0cd4ca5
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_treetimeline.js
@@ -0,0 +1,19 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTimelineCreated",function(a){if(a.render=="tree")a.y_unit_original=a.y_unit,a.y_unit=scheduler._getArrayToDisplay(a.y_unit_original),scheduler.attachEvent("onOptionsLoadStart",function(){a.y_unit=scheduler._getArrayToDisplay(a.y_unit_original)}),scheduler.form_blocks[a.name]={render:function(b){var d="<div class='dhx_section_timeline' style='overflow: hidden; height: "+b.height+"px'></div>";return d},set_value:function(b,d,g,e){var c=scheduler._getArrayForSelect(scheduler.matrix[e.type].y_unit_original,
+e.type);b.innerHTML="";var a=document.createElement("select");b.appendChild(a);var h=b.getElementsByTagName("select")[0];if(!h._dhx_onchange&&e.onchange)h.onchange=e.onchange,h._dhx_onchange=!0;for(var k=0;k<c.length;k++){var j=document.createElement("option");j.value=c[k].key;if(j.value==g[scheduler.matrix[e.type].y_property])j.selected=!0;j.innerHTML=c[k].label;h.appendChild(j)}},get_value:function(b){return b.firstChild.value},focus:function(){}}});
+scheduler.attachEvent("onBeforeSectionRender",function(a,b,d){var g={};if(a=="tree"){var e,c,f,h,k,j;b.children?(e=d.folder_dy||d.dy,d.folder_dy&&!d.section_autoheight&&(f="height:"+d.folder_dy+"px;"),c="dhx_row_folder",h="dhx_matrix_scell folder",k="<div class='dhx_scell_expand'>"+(b.open?"-":"+")+"</div>",j=d.folder_events_available?"dhx_data_table folder_events":"dhx_data_table folder"):(e=d.dy,c="dhx_row_item",h="dhx_matrix_scell item",k="",j="dhx_data_table");var i="<div class='dhx_scell_level"+
+b.level+"'>"+k+"<div class='dhx_scell_name'>"+(scheduler.templates[d.name+"_scale_label"](b.key,b.label,b)||b.label)+"</div></div>",g={height:e,style_height:f,tr_className:c,td_className:h,td_content:i,table_className:j}}return g});var section_id_before;
+scheduler.attachEvent("onBeforeEventChanged",function(a,b,d){if(scheduler._isRender("tree")){var g=scheduler.getSection(a[scheduler.matrix[scheduler._mode].y_property]);if(g&&typeof g.children!="undefined"&&!scheduler.matrix[scheduler._mode].folder_events_available)return d||(a[scheduler.matrix[scheduler._mode].y_property]=section_id_before),!1}return!0});
+scheduler.attachEvent("onBeforeDrag",function(a,b,d){if(scheduler._isRender("tree")){var g=scheduler._locate_cell_timeline(d);if(g){var e=scheduler.matrix[scheduler._mode].y_unit[g.y].key;if(typeof scheduler.matrix[scheduler._mode].y_unit[g.y].children!="undefined"&&!scheduler.matrix[scheduler._mode].folder_events_available)return!1}var c=scheduler.getEvent(a);section_id_before=e||c[scheduler.matrix[scheduler._mode].y_property]}return!0});
+scheduler._getArrayToDisplay=function(a){var b=[],d=function(a,e){for(var c=e||0,f=0;f<a.length;f++){a[f].level=c;if(typeof a[f].children!="undefined"&&typeof a[f].key=="undefined")a[f].key=scheduler.uid();b.push(a[f]);a[f].open&&a[f].children&&d(a[f].children,c+1)}};d(a);return b};
+scheduler._getArrayForSelect=function(a,b){var d=[],g=function(a){for(var c=0;c<a.length;c++)scheduler.matrix[b].folder_events_available?d.push(a[c]):typeof a[c].children=="undefined"&&d.push(a[c]),a[c].children&&g(a[c].children,b)};g(a);return d};
+scheduler._toggleFolderDisplay=function(a,b,d){var g,e=function(a,b,c,d){for(var i=0;i<b.length;i++){if((b[i].key==a||d)&&b[i].children)if(b[i].open=typeof c!="undefined"?c:!b[i].open,g=!0,!d&&g)break;b[i].children&&e(a,b[i].children,c,d)}},c=scheduler.getSection(a);if(scheduler.callEvent("onBeforeFolderToggle",[c,b,d]))e(a,scheduler.matrix[scheduler._mode].y_unit_original,b,d),scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original),
+scheduler.callEvent("onOptionsLoad",[]),scheduler.callEvent("onAfterFolderToggle",[c,b,d])};scheduler.attachEvent("onCellClick",function(a,b){scheduler._isRender("tree")&&(scheduler.matrix[scheduler._mode].folder_events_available||typeof scheduler.matrix[scheduler._mode].y_unit[b].children!="undefined"&&scheduler._toggleFolderDisplay(scheduler.matrix[scheduler._mode].y_unit[b].key))});
+scheduler.attachEvent("onYScaleClick",function(a,b){scheduler._isRender("tree")&&typeof b.children!="undefined"&&scheduler._toggleFolderDisplay(b.key)});scheduler.getSection=function(a){if(scheduler._isRender("tree")){var b,d=function(a,e){for(var c=0;c<e.length;c++)e[c].key==a&&(b=e[c]),e[c].children&&d(a,e[c].children)};d(a,scheduler.matrix[scheduler._mode].y_unit_original);return b||null}};
+scheduler.deleteSection=function(a){if(scheduler._isRender("tree")){var b=!1,d=function(a,e){for(var c=0;c<e.length;c++){e[c].key==a&&(e.splice(c,1),b=!0);if(b)break;e[c].children&&d(a,e[c].children)}};d(a,scheduler.matrix[scheduler._mode].y_unit_original);scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);scheduler.callEvent("onOptionsLoad",[]);return b}};
+scheduler.deleteAllSections=function(){if(scheduler._isRender("tree"))scheduler.matrix[scheduler._mode].y_unit_original=[],scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original),scheduler.callEvent("onOptionsLoad",[])};
+scheduler.addSection=function(a,b){if(scheduler._isRender("tree")){var d=!1,g=function(a,c,f){if(b)for(var h=0;h<f.length;h++){f[h].key==c&&typeof f[h].children!="undefined"&&(f[h].children.push(a),d=!0);if(d)break;f[h].children&&g(a,c,f[h].children)}else f.push(a),d=!0};g(a,b,scheduler.matrix[scheduler._mode].y_unit_original);scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);scheduler.callEvent("onOptionsLoad",[]);return d}};
+scheduler.openAllSections=function(){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(1,!0,!0)};scheduler.closeAllSections=function(){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(1,!1,!0)};scheduler.openSection=function(a){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(a,!0)};scheduler.closeSection=function(a){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(a,!1)};
diff --git a/codebase/ext/dhtmlxscheduler_units.js b/codebase/ext/dhtmlxscheduler_units.js
new file mode 100644
index 0000000..07b04a7
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_units.js
@@ -0,0 +1,16 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler._props={};
+scheduler.createUnitsView=function(a,g,j,f,k,l){if(typeof a=="object")j=a.list,g=a.property,f=a.size||0,k=a.step||1,l=a.skip_incorrect,a=a.name;scheduler._props[a]={map_to:g,options:j,step:k,position:0};if(f>scheduler._props[a].options.length)scheduler._props[a]._original_size=f,f=0;scheduler._props[a].size=f;scheduler._props[a].skip_incorrect=l||!1;scheduler.date[a+"_start"]=scheduler.date.day_start;scheduler.templates[a+"_date"]=function(a){return scheduler.templates.day_date(a)};scheduler._get_unit_index=
+function(a,i){var h=a.position||0,g=Math.floor((scheduler._correct_shift(+i,1)-+scheduler._min_date)/864E5);return h+g};scheduler.templates[a+"_scale_text"]=function(a,i,h){return h.css?"<span class='"+h.css+"'>"+i+"</span>":i};scheduler.templates[a+"_scale_date"]=function(c){var i=scheduler._props[a],h=i.options;if(!h.length)return"";var g=scheduler._get_unit_index(i,c),b=h[g];return scheduler.templates[a+"_scale_text"](b.key,b.label,b)};scheduler.date["add_"+a]=function(a,g){return scheduler.date.add(a,
+g,"day")};scheduler.date["get_"+a+"_end"]=function(c){return scheduler.date.add(c,scheduler._props[a].size||scheduler._props[a].options.length,"day")};scheduler.attachEvent("onOptionsLoad",function(){for(var c=scheduler._props[a],g=c.order={},h=c.options,f=0;f<h.length;f++)g[h[f].key]=f;if(c._original_size&&c.size==0)c.size=c._original_size,delete c.original_size;c.size>h.length?(c._original_size=c.size,c.size=0):c.size=c._original_size||c.size;scheduler._date&&scheduler._mode==a&&scheduler.setCurrentView(scheduler._date,
+scheduler._mode)});scheduler.callEvent("onOptionsLoad",[])};scheduler.scrollUnit=function(a){var g=scheduler._props[this._mode];if(g)g.position=Math.min(Math.max(0,g.position+a),g.options.length-g.size),this.update_view()};
+(function(){var a=function(b){var d=scheduler._props[scheduler._mode];if(d&&d.order&&d.skip_incorrect){for(var a=[],e=0;e<b.length;e++)typeof d.order[b[e][d.map_to]]!="undefined"&&a.push(b[e]);b.splice(0,b.length);b.push.apply(b,a)}return b},g=scheduler._pre_render_events_table;scheduler._pre_render_events_table=function(b,d){b=a(b);return g.apply(this,[b,d])};var j=scheduler._pre_render_events_line;scheduler._pre_render_events_line=function(b,d){b=a(b);return j.apply(this,[b,d])};var f=function(b,
+d){if(b&&typeof b.order[d[b.map_to]]=="undefined"){var a=scheduler,e=864E5,c=Math.floor((d.end_date-a._min_date)/e);d[b.map_to]=b.options[Math.min(c+b.position,b.options.length-1)].key;return!0}},k=scheduler._reset_scale,l=scheduler.is_visible_events;scheduler.is_visible_events=function(b){var d=l.apply(this,arguments);if(d){var a=scheduler._props[this._mode];if(a&&a.size){var e=a.order[b[a.map_to]];if(e<a.position||e>=a.size+a.position)return!1}}return d};scheduler._reset_scale=function(){var b=
+scheduler._props[this._mode],a=k.apply(this,arguments);if(b){this._max_date=this.date.add(this._min_date,1,"day");for(var c=this._els.dhx_cal_data[0].childNodes,e=0;e<c.length;e++)c[e].className=c[e].className.replace("_now","");if(b.size&&b.size<b.options.length){var g=this._els.dhx_cal_header[0],f=document.createElement("DIV");if(b.position)f.className="dhx_cal_prev_button",f.style.cssText="left:1px;top:2px;position:absolute;",f.innerHTML="&nbsp;",g.firstChild.appendChild(f),f.onclick=function(){scheduler.scrollUnit(b.step*
+-1)};if(b.position+b.size<b.options.length)f=document.createElement("DIV"),f.className="dhx_cal_next_button",f.style.cssText="left:auto; right:0px;top:2px;position:absolute;",f.innerHTML="&nbsp;",g.lastChild.appendChild(f),f.onclick=function(){scheduler.scrollUnit(b.step)}}}return a};var c=scheduler._get_event_sday;scheduler._get_event_sday=function(b){var a=scheduler._props[this._mode];return a?(f(a,b),a.order[b[a.map_to]]-a.position):c.call(this,b)};var i=scheduler.locate_holder_day;scheduler.locate_holder_day=
+function(a,d,c){var e=scheduler._props[this._mode];return e&&c?(f(e,c),e.order[c[e.map_to]]*1+(d?1:0)-e.position):i.apply(this,arguments)};var h=scheduler._mouse_coords;scheduler._mouse_coords=function(){var a=scheduler._props[this._mode],d=h.apply(this,arguments);if(a){if(!this._drag_event)this._drag_event={};var c=this._drag_event;if(this._drag_id&&this._drag_mode)c=this.getEvent(this._drag_id),this._drag_event._dhx_changed=!0;var e=Math.min(d.x+a.position,a.options.length-1),f=a.map_to;d.section=
+c[f]=(a.options[e]||{}).key;d.x=0}d.force_redraw=!0;return d};var m=scheduler._time_order;scheduler._time_order=function(a){var d=scheduler._props[this._mode];d?a.sort(function(a,b){return d.order[a[d.map_to]]>d.order[b[d.map_to]]?1:-1}):m.apply(this,arguments)};scheduler.attachEvent("onEventAdded",function(a,d){if(this._loading)return!0;for(var c in scheduler._props){var e=scheduler._props[c];if(typeof d[e.map_to]=="undefined")d[e.map_to]=e.options[0].key}return!0});scheduler.attachEvent("onEventCreated",
+function(a,d){var c=scheduler._props[this._mode];if(c&&d){var e=this.getEvent(a);this._mouse_coords(d);f(c,e);this.event_updated(e)}return!0})})();
diff --git a/codebase/ext/dhtmlxscheduler_url.js b/codebase/ext/dhtmlxscheduler_url.js
new file mode 100644
index 0000000..e794c2b
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_url.js
@@ -0,0 +1,6 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){var d=!0,e=scheduler.date.str_to_date("%Y-%m-%d"),h=scheduler.date.date_to_str("%Y-%m-%d");scheduler.attachEvent("onBeforeViewChange",function(i,j,f,k){if(d){d=!1;for(var a={},g=(document.location.hash||"").replace("#","").split(","),b=0;b<g.length;b++){var c=g[b].split("=");c.length==2&&(a[c[0]]=c[1])}if(a.date||a.mode){try{this.setCurrentView(a.date?e(a.date):null,a.mode||null)}catch(m){this.setCurrentView(a.date?e(a.date):null,f)}return!1}}var l=
+"#date="+h(k||j)+",mode="+(f||i);document.location.hash=l;return!0})});
diff --git a/codebase/ext/dhtmlxscheduler_week_agenda.js b/codebase/ext/dhtmlxscheduler_week_agenda.js
new file mode 100644
index 0000000..e211b99
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_week_agenda.js
@@ -0,0 +1,19 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler._wa={};scheduler.xy.week_agenda_scale_height=20;scheduler.templates.week_agenda_event_text=function(c,g,h){return scheduler.templates.event_date(c)+" "+h.text};scheduler.date.week_agenda_start=scheduler.date.week_start;scheduler.date.week_agenda_end=function(c){return scheduler.date.add(c,7,"day")};scheduler.date.add_week_agenda=function(c,g){return scheduler.date.add(c,g*7,"day")};
+scheduler.attachEvent("onSchedulerReady",function(){var c=scheduler.templates;if(!c.week_agenda_date)c.week_agenda_date=c.week_date});(function(){var c=scheduler.date.date_to_str("%l, %F %d");scheduler.templates.week_agenda_scale_date=function(g){return c(g)}})();
+scheduler.attachEvent("onTemplatesReady",function(){scheduler.attachEvent("onSchedulerResize",function(){return this._mode=="week_agenda"?(this.week_agenda_view(!0),!1):!0});var c=scheduler.render_data;scheduler.render_data=function(b){if(this._mode=="week_agenda")scheduler.week_agenda_view(!0);else return c.apply(this,arguments)};var g=function(){scheduler._cols=[];var b=parseInt(scheduler._els.dhx_cal_data[0].style.width);scheduler._cols.push(Math.floor(b/2));scheduler._cols.push(b-scheduler._cols[0]-
+1);scheduler._colsS={0:[],1:[]};for(var a=parseInt(scheduler._els.dhx_cal_data[0].style.height),m=0;m<3;m++)scheduler._colsS[0].push(Math.floor(a/(3-scheduler._colsS[0].length))),a-=scheduler._colsS[0][m];scheduler._colsS[1].push(scheduler._colsS[0][0]);scheduler._colsS[1].push(scheduler._colsS[0][1]);a=scheduler._colsS[0][scheduler._colsS[0].length-1];scheduler._colsS[1].push(Math.floor(a/2));scheduler._colsS[1].push(a-scheduler._colsS[1][scheduler._colsS[1].length-1])},h=function(){g();scheduler._els.dhx_cal_data[0].innerHTML=
+"";scheduler._rendered=[];for(var b="",a=0;a<2;a++){var m=scheduler._cols[a],c="dhx_wa_column";a==1&&(c+=" dhx_wa_column_last");b+="<div class='"+c+"' style='width: "+m+"px;'>";for(var e=0;e<scheduler._colsS[a].length;e++){var j=scheduler.xy.week_agenda_scale_height-2,u=scheduler._colsS[a][e]-j-2,k=Math.min(6,e*2+a);b+="<div class='dhx_wa_day_cont'><div style='height:"+j+"px; line-height:"+j+"px;' class='dhx_wa_scale_bar'></div><div style='height:"+u+"px;' class='dhx_wa_day_data' day='"+k+"'></div></div>"}b+=
+"</div>"}scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates[scheduler._mode+"_date"](scheduler._min_date,scheduler._max_date,scheduler._mode);scheduler._els.dhx_cal_data[0].innerHTML=b;for(var l=scheduler._els.dhx_cal_data[0].getElementsByTagName("div"),o=[],a=0;a<l.length;a++)l[a].className=="dhx_wa_day_cont"&&o.push(l[a]);scheduler._wa._selected_divs=[];for(var h=scheduler.get_visible_events(),i=scheduler.date.week_start(scheduler._date),n=scheduler.date.add(i,1,"day"),a=0;a<7;a++){o[a]._date=
+i;var v=o[a].childNodes[0],w=o[a].childNodes[1];v.innerHTML=scheduler.templates.week_agenda_scale_date(i);for(var p=[],r=0;r<h.length;r++){var s=h[r];s.start_date<n&&s.end_date>i&&p.push(s)}p.sort(function(a,b){return a.start_date.valueOf()==b.start_date.valueOf()?a.id>b.id?1:-1:a.start_date>b.start_date?1:-1});for(e=0;e<p.length;e++){var d=p[e],f=document.createElement("div");scheduler._rendered.push(f);var t=scheduler.templates.event_class(d.start_date,d.end_date,d);f.className="dhx_wa_ev_body"+
+(t?" "+t:"");if(d._text_style)f.style.cssText=d._text_style;if(d.color)f.style.background=d.color;if(d.textColor)f.style.color=d.textColor;if(scheduler._select_id&&d.id==scheduler._select_id&&(scheduler.config.week_agenda_select||scheduler.config.week_agenda_select===void 0))f.className+=" dhx_cal_event_selected",scheduler._wa._selected_divs.push(f);var q="";d._timed||(q="middle",d.start_date.valueOf()>=i.valueOf()&&d.start_date.valueOf()<=n.valueOf()&&(q="start"),d.end_date.valueOf()>=i.valueOf()&&
+d.end_date.valueOf()<=n.valueOf()&&(q="end"));f.innerHTML=scheduler.templates.week_agenda_event_text(d.start_date,d.end_date,d,i,q);f.setAttribute("event_id",d.id);w.appendChild(f)}i=scheduler.date.add(i,1,"day");n=scheduler.date.add(n,1,"day")}};scheduler.week_agenda_view=function(b){scheduler._min_date=scheduler.date.week_start(scheduler._date);scheduler._max_date=scheduler.date.add(scheduler._min_date,1,"week");scheduler.set_sizes();if(b)scheduler._table_view=scheduler._allow_dnd=!0,scheduler._wa._prev_data_border=
+scheduler._els.dhx_cal_data[0].style.borderTop,scheduler._els.dhx_cal_data[0].style.borderTop=0,scheduler._els.dhx_cal_data[0].style.overflowY="hidden",scheduler._els.dhx_cal_date[0].innerHTML="",scheduler._els.dhx_cal_data[0].style.top=parseInt(scheduler._els.dhx_cal_data[0].style.top)-20-1+"px",scheduler._els.dhx_cal_data[0].style.height=parseInt(scheduler._els.dhx_cal_data[0].style.height)+20+1+"px",scheduler._els.dhx_cal_header[0].style.display="none",h();else{scheduler._table_view=scheduler._allow_dnd=
+!1;if(scheduler._wa._prev_data_border)scheduler._els.dhx_cal_data[0].style.borderTop=scheduler._wa._prev_data_border;scheduler._els.dhx_cal_data[0].style.overflowY="auto";scheduler._els.dhx_cal_data[0].style.top=parseInt(scheduler._els.dhx_cal_data[0].style.top)+20+"px";scheduler._els.dhx_cal_data[0].style.height=parseInt(scheduler._els.dhx_cal_data[0].style.height)-20+"px";scheduler._els.dhx_cal_header[0].style.display="block"}};scheduler.mouse_week_agenda=function(b){for(var a=b.ev,c=a.srcElement||
+a.target;c.parentNode;){if(c._date)var g=c._date;c=c.parentNode}if(!g)return b;b.x=0;var e=g.valueOf()-scheduler._min_date.valueOf();b.y=Math.ceil(e/6E4/this.config.time_step);if(this._drag_mode=="move"){this._drag_event._dhx_changed=!0;this._select_id=this._drag_id;for(var j=0;j<scheduler._rendered.length;j++)if(scheduler._drag_id==this._rendered[j].getAttribute("event_id"))var h=this._rendered[j];if(!scheduler._wa._dnd){var k=h.cloneNode(!0);this._wa._dnd=k;k.className=h.className;k.id="dhx_wa_dnd";
+k.className+=" dhx_wa_dnd";document.body.appendChild(k)}var l=document.getElementById("dhx_wa_dnd");l.style.top=(a.pageY||a.clientY)+20+"px";l.style.left=(a.pageX||a.clientX)+20+"px"}return b};scheduler.attachEvent("onBeforeEventChanged",function(){if(this._mode=="week_agenda"&&this._drag_mode=="move"){var b=document.getElementById("dhx_wa_dnd");b.parentNode.removeChild(b);scheduler._wa._dnd=!1}return!0});scheduler.attachEvent("onEventSave",function(b,a,c){if(c&&this._mode=="week_agenda")this._select_id=
+b;return!0});scheduler._wa._selected_divs=[];scheduler.attachEvent("onClick",function(b){if(this._mode=="week_agenda"&&(scheduler.config.week_agenda_select||scheduler.config.week_agenda_select===void 0)){if(scheduler._wa._selected_divs)for(var a=0;a<this._wa._selected_divs.length;a++){var c=this._wa._selected_divs[a];c.className=c.className.replace(/ dhx_cal_event_selected/,"")}this.for_rendered(b,function(a){a.className+=" dhx_cal_event_selected";scheduler._wa._selected_divs.push(a)});scheduler.select(b);
+return!1}return!0})});
diff --git a/codebase/ext/dhtmlxscheduler_year_view.js b/codebase/ext/dhtmlxscheduler_year_view.js
new file mode 100644
index 0000000..bf36dd1
--- /dev/null
+++ b/codebase/ext/dhtmlxscheduler_year_view.js
@@ -0,0 +1,20 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.year_x=4;scheduler.config.year_y=3;scheduler.xy.year_top=0;scheduler.templates.year_date=function(n){return scheduler.date.date_to_str(scheduler.locale.labels.year_tab+" %Y")(n)};scheduler.templates.year_month=scheduler.date.date_to_str("%F");scheduler.templates.year_scale_date=scheduler.date.date_to_str("%D");scheduler.templates.year_tooltip=function(n,q,u){return u.text};
+(function(){function n(b){return m(b,function(a){return a.nodeName.toLowerCase()=="td"})}function q(b){return m(b,function(a){return a.nodeName.toLowerCase()=="table"})}function u(b){b=q(b);return m(b,function(a){return a.hasAttribute&&a.hasAttribute("date")})}function m(b,a){for(;b&&!a(b);)b=b.parentNode;return b}var k=function(){return scheduler._mode=="year"};scheduler.dblclick_dhx_month_head=function(b){if(k()){var a=b.target||b.srcElement;if(a.parentNode.className.indexOf("dhx_before")!=-1||
+a.parentNode.className.indexOf("dhx_after")!=-1)return!1;var c=this.templates.xml_date(a.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getAttribute("date"));c.setDate(parseInt(a.innerHTML,10));var e=this.date.add(c,1,"day");!this.config.readonly&&this.config.dblclick_create&&this.addEventNow(c.valueOf(),e.valueOf(),b)}};var v=scheduler.changeEventId;scheduler.changeEventId=function(){v.apply(this,arguments);k()&&this.year_view(!0)};var w=scheduler.render_data,x=scheduler.date.date_to_str("%Y/%m/%d"),
+y=scheduler.date.str_to_date("%Y/%m/%d");scheduler.render_data=function(b){if(!k())return w.apply(this,arguments);for(var a=0;a<b.length;a++)this._year_render_event(b[a])};var z=scheduler.clear_view;scheduler.clear_view=function(){if(!k())return z.apply(this,arguments);for(var b in o)if(o.hasOwnProperty(b)){var a=o[b];a.className="dhx_month_head";a.setAttribute("date","")}o={}};scheduler._hideToolTip=function(){if(this._tooltip)this._tooltip.style.display="none",this._tooltip.date=new Date(9999,1,
+1)};scheduler._showToolTip=function(b,a,c,e){if(this._tooltip){if(this._tooltip.date.valueOf()==b.valueOf())return;this._tooltip.innerHTML=""}else{var d=this._tooltip=document.createElement("DIV");d.className="dhx_year_tooltip";document.body.appendChild(d);d.onclick=scheduler._click.dhx_cal_data}for(var f=this.getEvents(b,this.date.add(b,1,"day")),l="",i=0;i<f.length;i++){var p=f[i],g=p.color?"background:"+p.color+";":"",j=p.textColor?"color:"+p.textColor+";":"";l+="<div class='dhx_tooltip_line' style='"+
+g+""+j+"' event_id='"+f[i].id+"'>";l+="<div class='dhx_tooltip_date' style='"+g+""+j+"'>"+(f[i]._timed?this.templates.event_date(f[i].start_date):"")+"</div>";l+="<div class='dhx_event_icon icon_details'>&nbsp;</div>";l+=this.templates.year_tooltip(f[i].start_date,f[i].end_date,f[i])+"</div>"}this._tooltip.style.display="";this._tooltip.style.top="0px";this._tooltip.style.left=document.body.offsetWidth-a.left-this._tooltip.offsetWidth<0?a.left-this._tooltip.offsetWidth+"px":a.left+e.offsetWidth+"px";
+this._tooltip.date=b;this._tooltip.innerHTML=l;this._tooltip.style.top=document.body.offsetHeight-a.top-this._tooltip.offsetHeight<0?a.top-this._tooltip.offsetHeight+e.offsetHeight+"px":a.top+"px"};scheduler._init_year_tooltip=function(){dhtmlxEvent(scheduler._els.dhx_cal_data[0],"mouseover",function(b){if(k()){var b=b||event,a=b.target||b.srcElement;if(a.tagName.toLowerCase()=="a")a=a.parentNode;(a.className||"").indexOf("dhx_year_event")!=-1?scheduler._showToolTip(y(a.getAttribute("date")),getOffset(a),
+b,a):scheduler._hideToolTip()}});this._init_year_tooltip=function(){}};scheduler.attachEvent("onSchedulerResize",function(){return k()?(this.year_view(!0),!1):!0});scheduler._get_year_cell=function(b){var a=b.getMonth()+12*(b.getFullYear()-this._min_date.getFullYear())-this.week_starts._month,c=this._els.dhx_cal_data[0].childNodes[a],b=this.week_starts[a]+b.getDate()-1;return c.childNodes[2].firstChild.rows[Math.floor(b/7)].cells[b%7].firstChild};var o={};scheduler._mark_year_date=function(b,a){var c=
+x(b),e=this._get_year_cell(b),d=this.templates.event_class(a.start_date,a.end_date,a);if(!o[c])e.className="dhx_month_head dhx_year_event",e.setAttribute("date",c),o[c]=e;e.className+=d?" "+d:""};scheduler._unmark_year_date=function(b){this._get_year_cell(b).className="dhx_month_head"};scheduler._year_render_event=function(b){for(var a=b.start_date,a=a.valueOf()<this._min_date.valueOf()?this._min_date:this.date.date_part(new Date(a));a<b.end_date;)if(this._mark_year_date(a,b),a=this.date.add(a,1,
+"day"),a.valueOf()>=this._max_date.valueOf())break};scheduler.year_view=function(b){if(b){var a=scheduler.xy.scale_height;scheduler.xy.scale_height=-1}scheduler._els.dhx_cal_header[0].style.display=b?"none":"";scheduler.set_sizes();if(b)scheduler.xy.scale_height=a;scheduler._table_view=b;if(!this._load_mode||!this._load())if(b){scheduler._init_year_tooltip();scheduler._reset_year_scale();if(scheduler._load_mode&&scheduler._load())return scheduler._render_wait=!0;scheduler.render_view_data()}else scheduler._hideToolTip()};
+scheduler._reset_year_scale=function(){this._cols=[];this._colsS={};var b=[],a=this._els.dhx_cal_data[0],c=this.config;a.scrollTop=0;a.innerHTML="";var e=Math.floor(parseInt(a.style.width)/c.year_x),d=Math.floor((parseInt(a.style.height)-scheduler.xy.year_top)/c.year_y);d<190&&(d=190,e=Math.floor((parseInt(a.style.width)-scheduler.xy.scroll_width)/c.year_x));for(var f=e-11,l=0,i=document.createElement("div"),p=this.date.week_start(scheduler._currentDate()),g=0;g<7;g++)this._cols[g]=Math.floor(f/(7-
+g)),this._render_x_header(g,l,p,i),p=this.date.add(p,1,"day"),f-=this._cols[g],l+=this._cols[g];i.lastChild.className+=" dhx_scale_bar_last";for(var j=this.date[this._mode+"_start"](this.date.copy(this._date)),k=j,g=0;g<c.year_y;g++)for(var t=0;t<c.year_x;t++){var h=document.createElement("DIV");h.style.cssText="position:absolute;";h.setAttribute("date",this.templates.xml_format(j));h.innerHTML="<div class='dhx_year_month'></div><div class='dhx_year_week'>"+i.innerHTML+"</div><div class='dhx_year_body'></div>";
+h.childNodes[0].innerHTML=this.templates.year_month(j);for(var o=this.date.week_start(j),n=this._reset_month_scale(h.childNodes[2],j,o),r=h.childNodes[2].firstChild.rows,s=r.length;s<6;s++){r[0].parentNode.appendChild(r[0].cloneNode(!0));for(var m=0;m<r[s].childNodes.length;m++)r[s].childNodes[m].className="dhx_after",r[s].childNodes[m].firstChild.innerHTML=scheduler.templates.month_day(n),n=scheduler.date.add(n,1,"day")}a.appendChild(h);h.childNodes[1].style.height=h.childNodes[1].childNodes[0].offsetHeight+
+"px";var q=Math.round((d-190)/2);h.style.marginTop=q+"px";this.set_xy(h,e-10,d-q-10,e*t+5,d*g+5+scheduler.xy.year_top);b[g*c.year_x+t]=(j.getDay()-(this.config.start_on_monday?1:0)+7)%7;j=this.date.add(j,1,"month")}this._els.dhx_cal_date[0].innerHTML=this.templates[this._mode+"_date"](k,j,this._mode);this.week_starts=b;b._month=k.getMonth();this._min_date=k;this._max_date=j};var A=scheduler.getActionData;scheduler.getActionData=function(b){function a(a){a=u(a);if(!a)return null;var b=a.getAttribute("date");
+return!b?null:scheduler.date.week_start(scheduler.templates.xml_date(b))}function c(a){var b=q(a);if(!b)return null;for(var d=0,c=0,d=0,e=b.rows.length;d<e;d++){for(var f=b.rows[d].getElementsByTagName("td"),c=0,h=f.length;c<h;c++)if(f[c]==a)break;if(c<h)break}return d<e?{day:c,week:d}:null}if(!k())return A.apply(scheduler,arguments);var e=b?b.target:event.srcElement,d=a(e),f=n(e),l=c(f);l&&d?(d=scheduler.date.add(d,l.week,"week"),d=scheduler.date.add(d,l.day,"day")):d=null;return{date:d,section:null}};
+var B=scheduler._locate_event;scheduler._locate_event=function(b){if(!k())return B.apply(scheduler,arguments);var a=m(b,function(a){return a.className&&a.className.indexOf("dhx_year_event")!=-1&&a.hasAttribute&&a.hasAttribute("date")});if(!a||!a.hasAttribute("date"))return null;var c=scheduler.templates.xml_date(a.getAttribute("date")),e=scheduler.getEvents(c,scheduler.date.add(c,1,"day"));return!e.length?null:e[0].id}})();
diff --git a/codebase/imgs/but_repeat.gif b/codebase/imgs/but_repeat.gif
new file mode 100644
index 0000000..dd6595e
--- /dev/null
+++ b/codebase/imgs/but_repeat.gif
Binary files differ
diff --git a/codebase/imgs/buttons.png b/codebase/imgs/buttons.png
new file mode 100644
index 0000000..5036c9c
--- /dev/null
+++ b/codebase/imgs/buttons.png
Binary files differ
diff --git a/codebase/imgs/calendar.gif b/codebase/imgs/calendar.gif
new file mode 100644
index 0000000..6725708
--- /dev/null
+++ b/codebase/imgs/calendar.gif
Binary files differ
diff --git a/codebase/imgs/clock_big.gif b/codebase/imgs/clock_big.gif
new file mode 100644
index 0000000..61f7dc2
--- /dev/null
+++ b/codebase/imgs/clock_big.gif
Binary files differ
diff --git a/codebase/imgs/clock_small.gif b/codebase/imgs/clock_small.gif
new file mode 100644
index 0000000..9120ee7
--- /dev/null
+++ b/codebase/imgs/clock_small.gif
Binary files differ
diff --git a/codebase/imgs/collapse_expand_icon.gif b/codebase/imgs/collapse_expand_icon.gif
new file mode 100644
index 0000000..64da948
--- /dev/null
+++ b/codebase/imgs/collapse_expand_icon.gif
Binary files differ
diff --git a/codebase/imgs/controls.gif b/codebase/imgs/controls.gif
new file mode 100644
index 0000000..9732e2d
--- /dev/null
+++ b/codebase/imgs/controls.gif
Binary files differ
diff --git a/codebase/imgs/databg.png b/codebase/imgs/databg.png
new file mode 100644
index 0000000..3bba608
--- /dev/null
+++ b/codebase/imgs/databg.png
Binary files differ
diff --git a/codebase/imgs/databg_now.png b/codebase/imgs/databg_now.png
new file mode 100644
index 0000000..510dfd0
--- /dev/null
+++ b/codebase/imgs/databg_now.png
Binary files differ
diff --git a/codebase/imgs/export_ical.png b/codebase/imgs/export_ical.png
new file mode 100644
index 0000000..fb915ae
--- /dev/null
+++ b/codebase/imgs/export_ical.png
Binary files differ
diff --git a/codebase/imgs/export_pdf.png b/codebase/imgs/export_pdf.png
new file mode 100644
index 0000000..7b9d81f
--- /dev/null
+++ b/codebase/imgs/export_pdf.png
Binary files differ
diff --git a/codebase/imgs/icon.png b/codebase/imgs/icon.png
new file mode 100644
index 0000000..31d6626
--- /dev/null
+++ b/codebase/imgs/icon.png
Binary files differ
diff --git a/codebase/imgs/images.png b/codebase/imgs/images.png
new file mode 100644
index 0000000..8faac63
--- /dev/null
+++ b/codebase/imgs/images.png
Binary files differ
diff --git a/codebase/imgs/loading.gif b/codebase/imgs/loading.gif
new file mode 100644
index 0000000..f5e71df
--- /dev/null
+++ b/codebase/imgs/loading.gif
Binary files differ
diff --git a/codebase/imgs/resize_dots.png b/codebase/imgs/resize_dots.png
new file mode 100644
index 0000000..44045c2
--- /dev/null
+++ b/codebase/imgs/resize_dots.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/arrow_left.png b/codebase/imgs_dhx_terrace/arrow_left.png
new file mode 100644
index 0000000..133dabc
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/arrow_left.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/arrow_right.png b/codebase/imgs_dhx_terrace/arrow_right.png
new file mode 100644
index 0000000..ced03e5
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/arrow_right.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/but_repeat.gif b/codebase/imgs_dhx_terrace/but_repeat.gif
new file mode 100644
index 0000000..9306667
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/but_repeat.gif
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/calendar.gif b/codebase/imgs_dhx_terrace/calendar.gif
new file mode 100644
index 0000000..8c12c94
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/calendar.gif
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/clock_big.gif b/codebase/imgs_dhx_terrace/clock_big.gif
new file mode 100644
index 0000000..26b331c
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/clock_big.gif
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/clock_small.gif b/codebase/imgs_dhx_terrace/clock_small.gif
new file mode 100644
index 0000000..9646dab
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/clock_small.gif
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/close_icon.png b/codebase/imgs_dhx_terrace/close_icon.png
new file mode 100644
index 0000000..4aa5d66
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/close_icon.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/collapse_expand_icon.gif b/codebase/imgs_dhx_terrace/collapse_expand_icon.gif
new file mode 100644
index 0000000..bf64cc8
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/collapse_expand_icon.gif
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/controls.png b/codebase/imgs_dhx_terrace/controls.png
new file mode 100644
index 0000000..f9a99e2
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/controls.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/databg.png b/codebase/imgs_dhx_terrace/databg.png
new file mode 100644
index 0000000..1b02c11
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/databg.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/databg_now.png b/codebase/imgs_dhx_terrace/databg_now.png
new file mode 100644
index 0000000..f187514
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/databg_now.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/export_ical.png b/codebase/imgs_dhx_terrace/export_ical.png
new file mode 100644
index 0000000..ca496f5
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/export_ical.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/export_pdf.png b/codebase/imgs_dhx_terrace/export_pdf.png
new file mode 100644
index 0000000..ebadc7c
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/export_pdf.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/resize_dots.png b/codebase/imgs_dhx_terrace/resize_dots.png
new file mode 100644
index 0000000..c26e2a3
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/resize_dots.png
Binary files differ
diff --git a/codebase/imgs_dhx_terrace/resizing.png b/codebase/imgs_dhx_terrace/resizing.png
new file mode 100644
index 0000000..389ca54
--- /dev/null
+++ b/codebase/imgs_dhx_terrace/resizing.png
Binary files differ
diff --git a/codebase/imgs_glossy/blue_tab.png b/codebase/imgs_glossy/blue_tab.png
new file mode 100644
index 0000000..f874fa3
--- /dev/null
+++ b/codebase/imgs_glossy/blue_tab.png
Binary files differ
diff --git a/codebase/imgs_glossy/blue_tab_wide.png b/codebase/imgs_glossy/blue_tab_wide.png
new file mode 100644
index 0000000..88e22e1
--- /dev/null
+++ b/codebase/imgs_glossy/blue_tab_wide.png
Binary files differ
diff --git a/codebase/imgs_glossy/but_repeat.gif b/codebase/imgs_glossy/but_repeat.gif
new file mode 100644
index 0000000..dd6595e
--- /dev/null
+++ b/codebase/imgs_glossy/but_repeat.gif
Binary files differ
diff --git a/codebase/imgs_glossy/buttons.gif b/codebase/imgs_glossy/buttons.gif
new file mode 100644
index 0000000..0c60904
--- /dev/null
+++ b/codebase/imgs_glossy/buttons.gif
Binary files differ
diff --git a/codebase/imgs_glossy/calendar.gif b/codebase/imgs_glossy/calendar.gif
new file mode 100644
index 0000000..6725708
--- /dev/null
+++ b/codebase/imgs_glossy/calendar.gif
Binary files differ
diff --git a/codebase/imgs_glossy/clock_big.png b/codebase/imgs_glossy/clock_big.png
new file mode 100644
index 0000000..8f78955
--- /dev/null
+++ b/codebase/imgs_glossy/clock_big.png
Binary files differ
diff --git a/codebase/imgs_glossy/clock_small.png b/codebase/imgs_glossy/clock_small.png
new file mode 100644
index 0000000..697be65
--- /dev/null
+++ b/codebase/imgs_glossy/clock_small.png
Binary files differ
diff --git a/codebase/imgs_glossy/collapse_expand_icon.gif b/codebase/imgs_glossy/collapse_expand_icon.gif
new file mode 100644
index 0000000..64da948
--- /dev/null
+++ b/codebase/imgs_glossy/collapse_expand_icon.gif
Binary files differ
diff --git a/codebase/imgs_glossy/controlls5.png b/codebase/imgs_glossy/controlls5.png
new file mode 100644
index 0000000..2495720
--- /dev/null
+++ b/codebase/imgs_glossy/controlls5.png
Binary files differ
diff --git a/codebase/imgs_glossy/databg.png b/codebase/imgs_glossy/databg.png
new file mode 100644
index 0000000..f0ffbda
--- /dev/null
+++ b/codebase/imgs_glossy/databg.png
Binary files differ
diff --git a/codebase/imgs_glossy/databg_now.png b/codebase/imgs_glossy/databg_now.png
new file mode 100644
index 0000000..9f371b4
--- /dev/null
+++ b/codebase/imgs_glossy/databg_now.png
Binary files differ
diff --git a/codebase/imgs_glossy/event-bg.png b/codebase/imgs_glossy/event-bg.png
new file mode 100644
index 0000000..a3bae3e
--- /dev/null
+++ b/codebase/imgs_glossy/event-bg.png
Binary files differ
diff --git a/codebase/imgs_glossy/export_ical.png b/codebase/imgs_glossy/export_ical.png
new file mode 100644
index 0000000..fb915ae
--- /dev/null
+++ b/codebase/imgs_glossy/export_ical.png
Binary files differ
diff --git a/codebase/imgs_glossy/export_pdf.png b/codebase/imgs_glossy/export_pdf.png
new file mode 100644
index 0000000..7b9d81f
--- /dev/null
+++ b/codebase/imgs_glossy/export_pdf.png
Binary files differ
diff --git a/codebase/imgs_glossy/icon.png b/codebase/imgs_glossy/icon.png
new file mode 100644
index 0000000..31d6626
--- /dev/null
+++ b/codebase/imgs_glossy/icon.png
Binary files differ
diff --git a/codebase/imgs_glossy/left-separator.png b/codebase/imgs_glossy/left-separator.png
new file mode 100644
index 0000000..22d6309
--- /dev/null
+++ b/codebase/imgs_glossy/left-separator.png
Binary files differ
diff --git a/codebase/imgs_glossy/left-time-bg.png b/codebase/imgs_glossy/left-time-bg.png
new file mode 100644
index 0000000..287a23b
--- /dev/null
+++ b/codebase/imgs_glossy/left-time-bg.png
Binary files differ
diff --git a/codebase/imgs_glossy/lightbox.png b/codebase/imgs_glossy/lightbox.png
new file mode 100644
index 0000000..f0314fa
--- /dev/null
+++ b/codebase/imgs_glossy/lightbox.png
Binary files differ
diff --git a/codebase/imgs_glossy/loading.gif b/codebase/imgs_glossy/loading.gif
new file mode 100644
index 0000000..f5e71df
--- /dev/null
+++ b/codebase/imgs_glossy/loading.gif
Binary files differ
diff --git a/codebase/imgs_glossy/move.png b/codebase/imgs_glossy/move.png
new file mode 100644
index 0000000..15681b3
--- /dev/null
+++ b/codebase/imgs_glossy/move.png
Binary files differ
diff --git a/codebase/imgs_glossy/multi-days-bg.png b/codebase/imgs_glossy/multi-days-bg.png
new file mode 100644
index 0000000..f43a463
--- /dev/null
+++ b/codebase/imgs_glossy/multi-days-bg.png
Binary files differ
diff --git a/codebase/imgs_glossy/second-top-days-bg.png b/codebase/imgs_glossy/second-top-days-bg.png
new file mode 100644
index 0000000..8f9a4f6
--- /dev/null
+++ b/codebase/imgs_glossy/second-top-days-bg.png
Binary files differ
diff --git a/codebase/imgs_glossy/top-days-bg.png b/codebase/imgs_glossy/top-days-bg.png
new file mode 100644
index 0000000..094b805
--- /dev/null
+++ b/codebase/imgs_glossy/top-days-bg.png
Binary files differ
diff --git a/codebase/imgs_glossy/top-separator.gif b/codebase/imgs_glossy/top-separator.gif
new file mode 100644
index 0000000..18b4bfa
--- /dev/null
+++ b/codebase/imgs_glossy/top-separator.gif
Binary files differ
diff --git a/codebase/imgs_glossy/white_tab.png b/codebase/imgs_glossy/white_tab.png
new file mode 100644
index 0000000..7ee9285
--- /dev/null
+++ b/codebase/imgs_glossy/white_tab.png
Binary files differ
diff --git a/codebase/imgs_glossy/white_tab_wide.png b/codebase/imgs_glossy/white_tab_wide.png
new file mode 100644
index 0000000..6e5ffb8
--- /dev/null
+++ b/codebase/imgs_glossy/white_tab_wide.png
Binary files differ
diff --git a/license.txt b/license.txt
new file mode 100644
index 0000000..ecbc059
--- /dev/null
+++ b/license.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. \ No newline at end of file
diff --git a/sources/dhtmlxscheduler.css b/sources/dhtmlxscheduler.css
new file mode 100644
index 0000000..0b97490
--- /dev/null
+++ b/sources/dhtmlxscheduler.css
@@ -0,0 +1,2244 @@
+@charset "UTF-8";
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+
+.dhtmlx_message_area{
+ position:fixed;
+ right:5px;
+ width:250px;
+ z-index:1000;
+}
+
+.dhtmlx-info{
+ min-width: 120px;
+ padding:4px 4px 4px 20px;
+ font-family:Tahoma;
+ z-index: 10000;
+
+ margin:5px;
+ margin-bottom:10px;
+
+ -webkit-transition: all .5s ease;
+ -moz-transition: all .5s ease;
+ -o-transition: all .5s ease;
+ transition: all .5s ease;
+}
+.dhtmlx-info.hidden{
+ height:0px;
+ padding:0px;
+ border-width:0px;
+ margin:0px;
+ overflow:hidden;
+}
+
+.dhtmlx_modal_box{
+ overflow:hidden;
+ display: inline-block;
+ min-width: 300px;
+ width: 300px;
+ text-align: center;
+ position:fixed;
+
+ background-color: #fff;
+ background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%);
+ background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%);
+ box-shadow: 0px 0px 14px #888;
+
+ font-family: Tahoma;
+
+ z-index:20000;
+
+ border-radius:6px;
+ border: 1px solid #ffffff;
+}
+
+.dhtmlx_popup_title{
+ border-top-left-radius:5px;
+ border-top-right-radius:5px;
+
+ border-width:0px;
+
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%);
+}
+
+.dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{
+ user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select:-moz-none;
+
+ cursor:pointer;
+}
+
+.dhtmlx_popup_text{
+ overflow:hidden;
+}
+
+.dhtmlx_popup_controls{
+ border-radius:6px;
+ padding:5px;
+}
+
+.dhtmlx_popup_button, .dhtmlx_button{
+ height: 30px;
+ line-height:30px;
+
+ display: inline-block;
+ margin: 0 5px;
+ border-radius: 6px;
+
+ color:#FFF;
+}
+.dhtmlx_popup_button{
+ min-width: 120px;
+}
+
+div.dhx_modal_cover {
+ background-color:#000;
+ cursor:default;
+
+ filter:alpha(opacity = 20);
+ opacity: 0.2;
+
+ position: fixed;
+ z-index:19999;
+ left: 0px; top: 0px;
+ width: 100%; height: 100%;
+
+ border: none;
+ zoom: 1;
+}
+
+.dhtmlx-info img, .dhtmlx_modal_box img{
+ float:left;
+ margin-right:20px;
+}
+
+.dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC);
+}
+.dhtmlx-alert-error, .dhtmlx-confirm-error {
+ border: 1px solid #ff0000;
+}
+
+/*Skin section*/
+.dhtmlx_button, .dhtmlx_popup_button{
+ box-shadow: 0px 0px 4px #888;
+ border:1px solid #838383;
+}
+.dhtmlx_button input, .dhtmlx_popup_button div{
+ border:1px solid #FFF;
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%);
+
+ border-radius:6px;
+ font-size:15px;
+ font-weight:normal;
+ -moz-box-sizing:content-box;
+ box-sizing:content-box;
+
+ color:#fff; padding:0px; margin:0px;
+ vertical-align:top;
+
+ height:28px;
+ line-height:28px;
+}
+
+.dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{
+
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%);
+}
+.dhtmlx_popup_title{
+ color:#fff;
+ text-shadow: 1px 1px #000;
+ height:40px; line-height:40px;
+ font-size:20px;
+}
+.dhtmlx_popup_text{
+ margin:15px 15px 5px 15px;
+ font-size:14px;
+ color:#000;
+ min-height:30px;
+ border-radius:6px;
+}
+
+
+.dhtmlx-info, .dhtmlx-error{
+ font-size:14px;
+ color:#000;
+ box-shadow: 0px 0px 10px #888;
+
+ padding:0px;
+
+ background-color:#FFF;
+ border-radius:3px;
+ border:1px solid #ffffff;
+}
+.dhtmlx-info div{
+ padding:5px 10px 5px 10px;
+ background-color: #fff;
+
+ border-radius:3px;
+ border:1px solid #B8B8B8;
+}
+.dhtmlx-error{
+ background-color: #d81b1b;
+ border:1px solid #ff3c3c;
+ box-shadow: 0px 0px 10px #000;
+}
+.dhtmlx-error div{
+ background-color: #d81b1b;
+ border:1px solid #940000;
+ color:#FFF;
+}
+
+
+.dhx_cal_container{
+ background-color:#C2D5FC;
+ font-family:Tahoma;
+ font-size:8pt;
+ position:relative;
+ overflow:hidden;
+}
+.dhx_cal_container div{
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_navline{
+ height:20px;
+ position:absolute;
+ z-index:3;
+ width:750px;
+ color:#2F3A48;
+}
+.dhx_cal_navline div{
+ position:absolute;
+ top:2px;
+ white-space:nowrap;
+}
+.dhx_cal_navline .dhx_cal_date {
+ font-weight:600;
+ left:210px;
+ padding-top: 1px;
+}
+.dhx_cal_button .dhx_left_bg{
+ width:1px; overflow:hidden;
+ height:17px;
+ z-index:20;
+ top:0px;
+}
+.dhx_cal_prev_button{
+ background-image:url(imgs/buttons.png);
+ background-position:0px 0px;
+ width:29px; height:17px;
+ left:50px; cursor:pointer;
+}
+.dhx_cal_next_button{
+ background-image:url(imgs/buttons.png);
+ background-position: -30px 0px;
+ width:29px; height:17px;
+ left:80px; cursor:pointer;
+}
+.dhx_cal_today_button{
+ background-image:url(imgs/buttons.png);
+ background-position: -60px 0px;
+ width:75px; height:17px;
+ left:112px; cursor:pointer;
+ text-align:center;
+ text-decoration:underline;
+}
+.dhx_cal_tab{
+ width:59px; height:19px;
+ text-align:center;
+ text-decoration:underline;
+ padding-top:2px;
+ cursor:pointer;
+ background-color: #D8E1EA;
+
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.dhx_cal_tab.active{
+ text-decoration:none;
+
+ cursor:default;
+ font-weight:bold;
+ border: 1px dotted #586A7E;
+ border-bottom: 0;
+ background-color: #C2D5FC;
+}
+.dhx_cal_header{
+ position:absolute;
+ left:10px; top:23px;
+ width:750px;
+ border-top:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+ z-index:2;
+ overflow:hidden;
+ color:#2F3A48;
+}
+.dhx_cal_data{
+ -webkit-tap-highlight-color:transparent;
+ border-top:1px dotted #8894A3;
+ position:absolute;
+ top:44px;
+ width:600px;
+ overflow-y:auto;
+ overflow-x:hidden;
+ -webkit-overflow-scrolling: touch;
+}
+.dhx_cal_data{
+ -ms-touch-action: pan-y;
+}
+.dhx_cal_event, .dhx_cal_event_line, .dhx_cal_event_clear {
+ -ms-touch-action: none;
+}
+
+.dhx_scale_bar{
+ position:absolute;
+ text-align:center;
+ background-color:#C2D5FC;
+ padding-top:3px;
+ border-left:1px dotted #586A7E;
+}
+.dhx_scale_holder{
+ position:absolute;
+ border-right:1px dotted #586A7E;
+ background-image:url(imgs/databg.png);
+}
+.dhx_scale_holder_now{
+ position:absolute;
+ border-right:1px dotted #586A7E;
+ background-image:url(imgs/databg_now.png);
+}
+.dhx_scale_hour{
+ height:41px;
+ width:50px;
+ border-bottom:1px dotted #8894A3;
+ background-color:#C2D5FC;
+ text-align:center;
+ line-height:40px;
+ color:#586A7E;
+ overflow:hidden;
+}
+.dhx_month_head{
+ background-color:#EBEFF4;
+ color:#2F3A48;
+ height:18px;
+ padding-right:5px;
+ padding-top:3px;
+ text-align:right;
+ border-right:1px dotted #586A7E;
+}
+.dhx_month_body{
+ border-right:1px dotted #586A7E;
+ border-bottom:1px dotted #586A7E;
+ background-color:#FFFFFF;
+}
+.dhx_now .dhx_month_body{
+ background-color:#E2EDFF;
+}
+.dhx_after .dhx_month_body, .dhx_before .dhx_month_body{
+ background-color:#ECECEC;
+}
+.dhx_after .dhx_month_head, .dhx_before .dhx_month_head{
+ background-color:#E2E3E6;
+ color:#94A6BB;
+}
+.dhx_now .dhx_month_head{
+ background-color:#D1DEF4;
+ font-weight:bold;
+}
+.dhx_cal_drag{
+ position:absolute;
+ z-index:9999;
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ opacity:0.5;
+ filter:alpha(opacity=50);
+}
+.dhx_loading{
+ position:absolute;
+ width:128px;
+ height:15px;
+ background-image:url(imgs/loading.gif);
+ z-index:9999;
+}
+.dhx_multi_day_icon, .dhx_multi_day{
+ background-color:#E1E6FF;
+ background-repeat:no-repeat;
+ border-right:1px dotted #8894A3;
+}
+.dhx_multi_day{
+ position: absolute;
+ border-top:1px dotted #8894A3;
+}
+.dhx_multi_day_icon, .dhx_multi_day_icon_small{
+ background-position: center center;
+ background-color:#E1E6FF;
+ background-repeat:no-repeat;
+ border-bottom:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+}
+.dhx_multi_day_icon{
+ background-image:url(imgs/clock_big.gif);
+}
+.dhx_multi_day_icon_small{
+ background-image:url(imgs/clock_small.gif);
+
+}
+.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container {
+ background-color: #d0e5ff;
+}
+
+/* left border config option support */
+.dhx_scale_hour_border, .dhx_month_body_border, .dhx_scale_bar_border, .dhx_month_head_border {
+ border-left: 1px dotted #8894A3;
+}
+
+/* export to PDF and iCal buttons start */
+.dhx_cal_navline .dhx_cal_export{
+ width:18px;
+ height:18px;
+ margin:2px;
+ cursor:pointer;
+ top: 0px;
+}
+.dhx_cal_navline .dhx_cal_export.pdf{
+ left: 2px;
+ background-image:url('imgs/export_pdf.png');
+}
+.dhx_cal_navline .dhx_cal_export.ical{
+ left: 24px;
+ background-image:url('imgs/export_ical.png');
+}
+/* export to PDF and iCal buttons end */
+.dhx_cal_event .dhx_header, .dhx_cal_event .dhx_title, .dhx_cal_event .dhx_body, .dhx_cal_event .dhx_footer {
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ color:#887A2E;
+ overflow:hidden;
+ width:100%;
+
+ font-family:Tahoma;
+ font-size:8pt;
+}
+.dhx_move_denied .dhx_cal_event .dhx_header, .dhx_move_denied .dhx_cal_event .dhx_title{
+ cursor:default;
+}
+.dhx_cal_event .dhx_header{
+ height:1px;
+ margin-left:1px;
+ border-width:1px 1px 0px 1px;
+ cursor:pointer;
+}
+.dhx_cal_event .dhx_title {
+ height:12px;
+ border-width:0px 1px 1px 1px;
+ border-bottom-style:dotted;
+
+ font-size:7pt;
+ font-weight:bold;
+ text-align:center;
+
+ background-position:right;
+ background-repeat:no-repeat;
+ cursor:pointer;
+}
+.dhx_cal_event .dhx_body, .dhx_cal_event.dhx_cal_select_menu .dhx_body{
+ border-width:0 1px 1px 1px;
+ padding:5px;
+}
+.dhx_resize_denied, .dhx_resize_denied .dhx_event_resize {
+ cursor:default !important;
+}
+
+
+.dhx_cal_event .dhx_event_resize {
+ cursor:s-resize;
+}
+.dhx_cal_event .dhx_footer, .dhx_cal_event .dhx_select_menu_footer{
+ height:1px;
+ margin-left:2px;
+ border-width:0px 1px 1px 1px;
+ position: relative;
+}
+.dhx_cal_event_line{
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ border-radius:3px;
+ font-family:Tahoma;
+ font-size:8pt;
+ height:13px;
+ padding-left:10px;
+ color:#887A2E;
+ cursor:pointer;
+ overflow:hidden;
+}
+.dhx_cal_event_clear{
+ font-family:Tahoma;
+ font-size:8pt;
+ height:13px;
+ padding-left:2px;
+ color:#887A2E;
+ white-space:nowrap;
+ overflow:hidden;
+ cursor:pointer;
+}
+.dhx_in_move{
+ background-color:#FFFF80;
+}
+div.dhx_cal_editor{
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ border-top-style:dotted;
+ z-index:999;
+ position:absolute;
+ overflow:hidden;
+}
+textarea.dhx_cal_editor {
+ width: 100%;
+ height: 100%;
+ border: 0 solid black;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+}
+div.dhx_menu_head{
+ background-image:url(imgs/controls.gif);
+ background-position: 0px -43px;
+ width:10px; height:10px;
+ margin-left:5px; margin-top:1px;
+ border:none;
+ cursor:default;
+}
+div.dhx_menu_icon{
+ background-image:url(imgs/controls.gif);
+ width:20px; height:20px;
+ margin-left:-5px; margin-top:0px;
+ border:none;
+ cursor:pointer;
+}
+div.icon_details{
+ background-position: 0px 0px;
+}
+div.icon_edit{
+ background-position: -22px 0px;
+}
+div.icon_save{
+ background-position: -84px -1px;
+}
+div.icon_cancel{
+ background-position: -62px 0px;
+}
+div.icon_delete{
+ background-position: -42px 0px;
+}
+
+/*view more link in month view*/
+.dhx_month_link{
+ position: absolute;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ text-align: right;
+
+ cursor: pointer;
+ padding-right: 10px;
+}
+.dhx_month_link a{
+ color: blue;
+}
+.dhx_month_link a:hover{
+ text-decoration: underline;
+}
+.dhx_global_tip{
+ font-family:Tahoma, Helvetica;
+ text-align:center;
+ font-size:20px;
+ position:fixed;
+ top:60px; right:20px;
+ background-color: rgba(255,255,255,0.7);
+ color:#000;
+ z-index:10000;
+ padding:20px 30px; width:190px;
+}
+.dhx_global_tip div{
+ font-size:30px;
+}
+
+@media (-moz-touch-enabled) {
+ .dhx_cal_container{
+ user-select:none;
+ -moz-user-select:none;
+ }
+}
+.dhx_unselectable, .dhx_unselectable div{
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_light{
+ -webkit-tap-highlight-color:transparent;
+ background-color:#FFE763;
+ border-radius:5px;
+ font-family:Tahoma;
+ font-size:8pt;
+ border:1px solid #B7A64B;
+ color:#887A2E;
+
+ position:absolute;
+ z-index:10001;
+
+ width:580px;
+ height:300px;
+
+ box-shadow:5px 5px 5px #888;
+}
+.dhx_cal_light_wide{
+ width:650px;
+}
+.dhx_mark{
+ position:relative; top:3px;
+ background-image:url('./imgs/controls.gif');
+ background-position: 0px -43px;
+ padding-left:10px;
+}
+.dhx_ie6 .dhx_mark{
+ background-position: 6px -41px;
+}
+
+.dhx_cal_light select{
+ font-family:Tahoma;
+ font-size:8pt;
+ color:#887A2E;
+ padding:2px;
+ margin:0px;
+}
+.dhx_cal_ltitle{
+ padding:2px 0px 2px 5px;
+ overflow:hidden;
+ white-space:nowrap;
+}
+.dhx_cal_ltitle span{
+ white-space:nowrap;
+}
+.dhx_cal_lsection{
+ background-color:#DBCF8C;
+ color:#FFF4B5;
+ font-weight:bold;
+ padding:5px 0px 3px 10px;
+}
+.dhx_section_time{
+ background-color:#DBCF8C;
+ white-space:nowrap;
+}
+.dhx_cal_lsection .dhx_fullday{
+ float:right;
+ margin-right:5px;
+ color:#887A2E;
+ font-size:12px;
+ font-weight:normal;
+ line-height:20px;
+ vertical-align:top;
+ cursor:pointer;
+}
+.dhx_cal_lsection{
+ font-size:18px;
+ font-family:Arial;
+}
+.dhx_cal_ltext{
+ padding:2px 0px 2px 10px;
+ overflow:hidden;
+}
+.dhx_cal_ltext textarea{
+ background-color: #FFF4B5; /* #FFF4B5; should be the same for dhx_cal_larea, was transperent */
+ overflow:auto;
+ border:none;
+ color:#887A2E;
+ height:100%;
+ width:100%;
+ outline:none !important;
+ resize: none;
+}
+.dhx_time{
+ font-weight:bold;
+}
+.dhx_cal_light .dhx_title{
+ padding-left:10px;
+}
+.dhx_cal_larea{
+ border:1px solid #DCC43E;
+ background-color:#FFF4B5;
+ overflow:hidden;
+
+ margin-left:3px;
+
+ width:572px;
+ height:1px;
+}
+.dhx_btn_set{
+ padding:5px 10px 0px 10px;
+ float:left;
+}
+.dhx_btn_set div{
+ float:left;
+ height:21px;
+ line-height:21px;
+ vertical-align:middle;
+ cursor:pointer;
+}
+.dhx_save_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-84px 0px;
+ width:21px;
+
+}
+.dhx_cancel_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-63px 0px;
+ width:20px;
+}
+.dhx_delete_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-42px 0px;
+ width:20px;
+}
+.dhx_cal_cover{
+ width:100%;
+ height:100%;
+ position:absolute;
+ z-index:10000;
+ top:0px;
+ left:0px;
+ background-color:black;
+
+ opacity:0.1;
+ filter:alpha(opacity=10);
+}
+.dhx_custom_button{
+ padding:0px 3px 0px 3px;
+ color:#887A2E;
+ font-family:Tahoma;
+ font-size:8pt;
+ background-color:#FFE763;
+ font-weight:normal;
+ margin-right:5px;
+ margin-top:0px;
+ cursor:pointer;
+}
+.dhx_custom_button div{
+ cursor:pointer;
+ float:left;
+ height:21px;
+ line-height:21px;
+ vertical-align:middle;
+}
+
+
+.dhx_cal_light_wide .dhx_cal_larea{
+ border-top-width:0px;
+}
+.dhx_cal_light_wide .dhx_cal_lsection{
+ border:0px;
+ float:left;
+ text-align:right;
+ width:100px;
+ height:20px;
+ font-size:16px;
+ padding: 5px 0px 0px 10px;
+}
+.dhx_cal_light_wide .dhx_wrap_section{
+ border-top:1px solid #DBCF8C;
+ position:relative;
+ background-color:#DBCF8C;
+ overflow:hidden;
+}
+.dhx_cal_light_wide .dhx_section_time{
+ padding-top:2px !important;
+ height:20px !important;
+}
+.dhx_section_time{
+ text-align: center;
+}
+.dhx_cal_light_wide .dhx_cal_larea{
+ width:730px;
+}
+.dhx_cal_light_wide{
+ width:738px;
+}
+
+.dhx_cal_light_wide .dhx_section_time{
+ background:transparent;
+}
+.dhx_cal_light_wide .dhx_cal_checkbox label{
+ padding-left:0px;
+}
+.dhx_cal_wide_checkbox input{
+ margin-top:8px;
+ margin-left:14px;
+}
+.dhx_cal_light input{
+ font-family:Tahoma;
+ font-size:8pt;
+ color:#887A2E;
+}
+.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{
+ float:none;
+ margin-right:0px;
+ color:#FFF4B5;
+ font-weight:bold;
+ font-size:16px;
+ font-family:Arial;
+ cursor:pointer;
+}
+.dhx_custom_button{
+ float: right;
+ height: 21px;
+ width:90px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+.dhx_cal_light_wide .dhx_custom_button {
+ position:absolute;
+ top:0;
+ right:0;
+ margin-top: 2px;
+}
+.dhx_cal_light_wide .dhx_repeat_right {
+ margin-right: 55px;
+}
+.dhx_minical_popup{
+ position:absolute;z-index:10100;
+ width:251px; height:175px;
+}
+.dhx_scale_bar_header {
+ position: absolute;
+ border-bottom: 1px dotted #8894A3;
+ width: 100%;
+}
+.dhx_expand_icon {
+ position:absolute; top:0px; right:0px;
+ background-image:url(./imgs/collapse_expand_icon.gif);
+ width:18px; height:18px;
+ cursor:pointer;
+ background-position:0px 18px;
+ z-index:16;
+}
+.dhx_scheduler_agenda .dhx_cal_data {
+ background-image:url(./imgs/databg.png);
+}
+.dhx_agenda_area{
+ width:100%;
+ overflow-y:auto;
+ background-image:url(./imgs/databg.png);
+}
+.dhx_agenda_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_agenda_line div{
+ float:left;
+ width:188px;
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_agenda_area .dhx_agenda_line div{
+ border-right:0px dotted #8894A3;
+}
+.dhx_v_border{
+ position:absolute;
+ left:187px;
+ top:0;
+ border-right:1px dotted #8894A3;
+ width:1px;
+ height:100%;
+}
+.dhx_agenda_line .dhx_event_icon{
+ width:20px;
+ border-width:0px;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+.dhx_agenda_line span{
+ padding-left:5px;
+ line-height:21px;
+}
+
+
+.dhx_year_body{
+ border-left:1px dotted #586A7E;
+}
+.dhx_year_week{
+ position:relative;
+}
+.dhx_scale_bar_last{
+ border-right:1px dotted #586A7E;
+}
+.dhx_year_month{
+ height:18px;
+ padding-top:3px;
+ border:1px dotted #586A7E;
+ text-align:center;
+ vertical-align:middle;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head, .dhx_year_body .dhx_before .dhx_month_head a, .dhx_year_body .dhx_after .dhx_month_head a{
+ color:#E2E3E6 !important;
+}
+.dhx_year_body .dhx_month_body{
+ height:0px;
+ overflow:hidden;
+}
+.dhx_month_head.dhx_year_event{
+ background-color:#FFE763;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head{
+ cursor: default;
+}
+.dhx_year_tooltip{
+ border:1px solid #BBBBBB;
+ background-image:url(./imgs/databg.png);
+ position:absolute;
+ z-index:9998;
+ width:300px;
+ height:auto;
+ font-family:Tahoma;
+ font-size:8pt;
+ overflow:hidden;
+}
+
+.dhx_tooltip_line{
+ line-height:20px;
+ height:20px;
+ overflow:hidden;
+}
+
+.dhx_tooltip_line .dhx_event_icon{
+ width:20px; height:20px;
+ padding-right:10px;
+ float:left;
+ border-width:0px;
+ position:relative;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+
+.dhx_tooltip_date{
+ float:left;
+ width:auto;
+ padding-left:5px;
+ text-align:center;
+}
+
+.dhx_text_disabled{
+ color:#887A2E;
+ font-family:Tahoma;
+ font-size:8pt;
+}
+
+.dhx_mini_calendar{
+ -moz-box-shadow:5px 5px 5px #888; /*Doesn't work in IE*/
+ -khtml-box-shadow: 5px 5px 5px #888;
+
+ -moz-user-select:-moz-none;
+ -webkit-user-select:none;
+ -user-select:none;
+}
+
+.dhx_mini_calendar .dhx_month_head{
+ cursor:pointer;
+}
+.dhx_mini_calendar .dhx_calendar_click{
+ background-color: #C2D5FC;
+}
+.dhx_cal_navline div.dhx_minical_icon{
+ width:18px;
+ height:18px;
+ left:190px;
+ top:1px;
+ cursor:pointer;
+ background-image:url(./imgs/calendar.gif);
+}
+
+.dhx_matrix_scell {
+ height: 100%;
+}
+
+.dhx_matrix_cell, .dhx_matrix_scell{
+ overflow:hidden;
+ text-align:center;
+ vertical-align:middle;
+ border-bottom:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+}
+.dhx_matrix_cell{
+ background-color:white;
+}
+.dhx_matrix_line{
+ overflow: hidden;
+}
+.dhx_matrix_cell div, .dhx_matrix_scell div{
+ overflow:hidden;
+ text-align:center;
+ height:auto;
+}
+
+.dhx_cal_lsection .dhx_readonly{
+ font-size:9pt;
+ font-size:8pt;
+ padding:2px;
+ color:#887A2E;
+}
+.dhx_cal_event_line .dhx_event_resize {
+ cursor: w-resize;
+ background: url(./imgs/resize_dots.png) repeat-y;
+ position: absolute;
+ top: 0;
+ width: 4px;
+}
+.dhx_event_resize_start {
+ left: 0;
+}
+.dhx_event_resize_end {
+ right: 0;
+}
+
+/* Tree view */
+.dhx_matrix_scell.folder, .dhx_data_table.folder .dhx_matrix_cell{
+ background-color: #969394;
+ cursor: pointer;
+}
+.dhx_matrix_scell .dhx_scell_level0{
+ padding-left: 5px;
+}
+.dhx_matrix_scell .dhx_scell_level1{
+ padding-left: 20px;
+}
+.dhx_matrix_scell .dhx_scell_level2{
+ padding-left: 35px;
+}
+.dhx_matrix_scell .dhx_scell_level3{
+ padding-left: 50px;
+}
+.dhx_matrix_scell .dhx_scell_level4{
+ padding-left: 65px;
+}
+
+.dhx_matrix_scell.folder{
+ font-weight: bold;
+ text-align: left;
+}
+.dhx_matrix_scell.folder .dhx_scell_expand{
+ float: left;
+ width: 10px;
+ padding-right:3px;
+}
+.dhx_matrix_scell.folder .dhx_scell_name{
+ float: left;
+ width: auto;
+}
+.dhx_matrix_scell.item .dhx_scell_name{
+ padding-left:15px;
+ text-align: left;
+}
+.dhx_data_table.folder .dhx_matrix_cell{
+ border-right: 0;
+}
+.dhx_section_timeline {
+ overflow: hidden;
+ padding: 4px 0 2px 10px;
+}
+.dhx_section_timeline select{
+ width: 552px;
+}
+
+/* Tree view end*/
+
+/* Map view */
+.dhx_map_area{
+ width:100%;
+ height:100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-image:url(./imgs/databg.png);
+}
+.dhx_map_line .dhx_event_icon{
+ width:20px;
+ border-width:0px;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+.dhx_map_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_map {
+ position:absolute;
+}
+.dhx_map_line div{
+ float:left;
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .headline_description{
+ float:left;
+
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .dhx_map_description{
+ float:left;
+ border-right: 0 dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .headline_date, .dhx_map_line .headline_description {
+ border-left: 0;
+}
+.dhx_map_line .line_description {
+ float:left;
+ border-right:1px dotted #8894A3;
+ text-align:left;
+ padding-left:5px;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line.highlight{
+ background-color: #C4C5CC;
+}
+.dhx_map_area .dhx_map_line div{
+ border-right:0px dotted #8894A3;
+}
+/* Map view end */
+
+/* dhtmlXTooltip start */
+.dhtmlXTooltip.tooltip{
+ -moz-box-shadow:3px 3px 3px #888888;
+ -webkit-box-shadow:3px 3px 3px #888888;
+ -o-box-shadow:3px 3px 3px #888888;
+ box-shadow:3px 3px 3px #888888;
+ filter:
+ progid:DXImageTransform.Microsoft.Shadow(color='#888888', Direction=135, Strength=5)
+ ;
+ background-color:white;
+ border-left:1px dotted #887A2E;
+ border-top:1px dotted #887A2E;
+ color:#887A2E;
+ cursor:default;
+ padding:10px;
+ position:absolute;
+ z-index:500;
+ font-family: Tahoma;
+ font-size: 8pt;
+}
+/* dhtmlXTooltip end */
+
+/* Lightbox checkbox section */
+.dhx_cal_checkbox label {
+ padding-left: 5px;
+}
+/* Lightbox checkbox section end */
+
+
+/* Lightbox radiobuttons section */
+.dhx_cal_light .radio {
+ padding: 2px 0px 2px 10px;
+}
+.dhx_cal_light .radio input, .dhx_cal_light .radio label{
+ line-height: 15px;
+}
+.dhx_cal_light .radio input {
+ vertical-align: middle;
+ margin: 0px;
+ padding: 0px;
+}
+.dhx_cal_light .radio label {
+ vertical-align: middle;
+ padding-right: 10px;
+}
+/* Lightbox radiobuttons section end */
+
+
+/* Lightbox dhtmlx combo section */
+.dhx_cal_light .combo {
+ padding: 4px;
+}
+.dhx_cal_light_wide .dhx_combo_box/*, .dhx_cal_light_wide .combo*/ {
+ width: 608px !important;
+ left: 10px;
+}
+/* Lightbox dhtmlx combo section end */
+
+/* Agenda week start */
+.dhx_wa_column {
+ float: left;
+}
+.dhx_wa_column_last .dhx_wa_day_cont{
+ border-left: 1px dotted #8894A3;
+}
+.dhx_wa_scale_bar {
+ font-family: Tahoma;
+ padding-left: 10px;
+ font-size: 11px;
+ border-top: 1px dotted #8894A3;
+ border-bottom: 1px dotted #8894A3;
+}
+.dhx_wa_day_data {
+ background-color: #FCFEFC;
+ overflow-y: auto;
+}
+.dhx_wa_ev_body {
+ border-bottom: 1px dotted #778899;
+ font-size: 12px;
+ padding: 5px 0 5px 7px;
+}
+.dhx_wa_dnd {
+ font-family: Tahoma;
+ position: absolute;
+ padding-right: 7px;
+ color: #887AE2 !important;
+ background-color: #FFE763 !important;
+ border: 1px solid #B7A543;
+}
+.dhx_cal_event_selected{
+ background-color: #9cc1db;
+ color: white;
+}
+/* Agenda week end */
+
+/* timeline second scale start */
+.dhx_second_scale_bar {
+ border-bottom: 1px dotted #586A7E;
+ padding-top: 2px;
+}
+/* timeline second scale end */
+
+
+/* grid view */
+
+.dhx_cal_header div div{
+ border-left: 1px dotted #8894A3;
+}
+
+.dhx_grid_area{
+ width:100%;
+ height:100%;
+ overflow-y:auto;
+ background-color:#FCFEFC;
+}
+.dhx_grid_area table{
+ border-collapse: collapse;
+ border-spacing: 0;
+ width:100%;
+ table-layout:fixed;
+}
+.dhx_grid_area td{
+ table-layout:fixed;
+ text-align:center;
+}
+
+.dhx_grid_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_grid_line div{
+ float:left;
+ cursor:default;
+ padding-top: 0;
+ padding-bottom: 0;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+
+.dhx_grid_area td, .dhx_grid_line div{
+ padding-left:8px;
+ padding-right:8px;
+}
+
+
+.dhx_grid_area tr.dhx_grid_event{
+ height:21px;
+ overflow:hidden;
+ margin:0 0 1px 0;
+}
+.dhx_grid_area tr.dhx_grid_event td{
+ /*borders for old ies*/
+ border-bottom:1px solid #ECEEF4;
+}
+.dhx_grid_area tr.dhx_grid_event:nth-child(2n+1) td, .dhx_grid_area tr.dhx_grid_event:nth-child(2n) td{
+ border-bottom-width:0px;
+ border-bottom-style:none;
+}
+.dhx_grid_area tr.dhx_grid_event:nth-child(2n){
+ background-color:#ECEEF4;;
+}
+.dhx_grid_area .dhx_grid_dummy{
+ table-layout:auto;
+ margin:0 !important;
+ padding:0 !important;
+}
+
+.dhx_grid_v_border{
+ position:absolute;
+ border-right:1px solid #A4BED4;
+ width:1px;
+ height:100%;
+}
+
+.dhx_grid_event_selected{
+ background-color: #9cc1db !important;
+ color: white !important;
+}
+
+.dhx_grid_sort_desc .dhx_grid_view_sort{
+ background-position: 0 -55px;
+}
+.dhx_grid_sort_asc .dhx_grid_view_sort{
+ background-position: 0 -66px;
+}
+.dhx_grid_view_sort{
+ width:10px;
+ height:10px;
+ position: absolute;
+ border:none !important;
+ top: 5px;
+ background-repeat:no-repeat;
+ background-image: url(./imgs/images.png);
+}
+/* end grid */
+
+/* marked timespans */
+.dhx_marked_timespan {
+ position: absolute;
+ width: 100%;
+}
+.dhx_time_block {
+ position:absolute;
+ width:100%;
+ background:silver;
+ opacity:0.4;
+ filter:alpha(opacity=40);
+ z-index:1;
+}
+.dhx_time_block_reset {
+ opacity: 1;
+ filter:alpha(opacity=100);
+}
+.dhx_scheduler_month .dhx_marked_timespan {
+ display: none;
+}
+.dhx_mini_calendar .dhx_marked_timespan {
+ display: none;
+}
+/* now time */
+.dhx_now_time {
+ width:100%;
+ border-bottom:2px dotted red;
+ z-index: 1;
+}
+.dhx_scheduler_month .dhx_now_time {
+ border-bottom: 0;
+ border-left: 2px dotted red;
+}
+.dhx_matrix_now_time {
+ border-left:2px dotted red;
+ z-index: 1;
+}
+
+
+
+/* Quick info */
+.dhx_cal_quick_info{
+ border: 2px solid #888;
+ border-radius: 5px;
+ position: absolute;
+ z-index: 300;
+
+ background-color: rgb(142, 153, 174);
+ background-color: rgba(98,107,127,0.5);
+ padding-left: 7px;
+ width:300px;
+
+ transition: left 0.5s ease, right 0.5s;
+ -moz-transition: left 0.5s ease, right 0.5s;
+ -webkit-transition: left 0.5s ease, right 0.5s;
+ -o-transition: left 0.5s ease, right 0.5s;
+}
+.dhx_no_animate{
+ transition: none;
+ -moz-transition: none;
+ -webkit-transition: none;
+ -o-transition: none;
+}
+.dhx_cal_quick_info.dhx_qi_left .dhx_qi_big_icon{
+ float:right;
+}
+.dhx_cal_qi_title{
+ padding: 5px 0px 10px 5px;
+ color: #FFF;
+ letter-spacing:1px;
+}
+.dhx_cal_qi_tdate{
+ font-size:14px;
+}
+.dhx_cal_qi_tcontent{
+ font-size:18px;
+ font-weight:bold;
+}
+.dhx_cal_qi_content{
+ border: 1px solid #888;
+ background-color: #fefefe;
+ padding: 16px 8px;
+
+ font-size:14px;
+
+ color:#444;
+ width:275px;
+ overflow: hidden;
+}
+
+.dhx_qi_big_icon{
+ border-radius: 3px;
+ color:#444;
+
+ margin:5px 9px 5px 0px;
+ min-width:60px;
+ line-height:20px;
+ vertical-align:middle;
+ padding: 5px 10px 5px 5px;
+ cursor:pointer;
+ background-color:#fefefe;
+
+ border-bottom:1px solid #666;
+ border-right:1px solid #666;
+
+ float:left;
+}
+
+.dhx_cal_qi_controls div{
+ float: left;
+ height: 20px;
+ text-align: center;
+ line-height:20px;
+}
+.dhx_qi_big_icon .dhx_menu_icon{
+ margin: 0 8px 0 0px;
+}
+/*IE*/
+div.dhx_form_repeat input.radio { margin:-4px 0 0 -4px !ie; }
+div.dhx_form_repeat input.checkbox { margin:0 0 0 -4px !ie; }
+
+/*All*/
+.dhx_form_repeat, .dhx_form_repeat input {
+ padding:0;
+ margin:0;
+ padding-left:5px;
+ font-family:Tahoma, Verdana;
+ font-size:11px;
+ line-height:24px;
+}
+
+.dhx_form_repeat {
+ overflow:hidden;
+ /*height:115px;*/
+ height:0px;
+ background-color: #FFF4B5;
+ /*border: 1px solid #DCC43E;*/
+}
+
+.dhx_cal_light_wide .dhx_form_repeat {
+ background-color: transparent;
+}
+
+
+.dhx_repeat_center, .dhx_repeat_left{
+ height:115px;
+ padding:10px 0 10px 10px;
+ float:left;
+}
+
+.dhx_repeat_left{
+ width:95px;
+}
+
+.dhx_repeat_center{
+ width:335px;
+ margin-top:12px;
+}
+
+.dhx_repeat_divider{
+ float:left;
+ height:115px;
+ border-left:1px dotted #DCC43E;
+ /*background-color: #DCC43E;*/
+ width:1px;
+}
+
+.dhx_repeat_right {
+ float:right;
+ height:115px;
+ width:160px;
+ padding:10px 3px 10px 10px;
+ margin-top:7px;
+}
+
+input.dhx_repeat_text {
+ height:16px;
+ width: 27px;
+ margin: 0 4px 0 4px;
+ line-height:18px;
+ padding: 0 0 0 2px;
+}
+
+.dhx_form_repeat select {
+ height: 20px;
+ width: 87px;
+ padding:0 0 0 2px;
+ margin: 0 4px 0 4px;
+}
+
+input.dhx_repeat_date{
+ height: 18px;
+ width: 80px;
+ padding:0 0 0 2px;
+ margin: 0 4px 0 4px;
+ background-repeat:no-repeat;
+ background-position:64px 0;
+ border:1px #7f9db9 solid;
+ line-height:18px;
+}
+
+input.dhx_repeat_radio {
+ margin-right:4px;
+}
+
+input.dhx_repeat_checkbox {
+ margin:4px 4px 0 0;
+}
+
+.dhx_repeat_days td {
+ padding-right:5px;
+}
+.dhx_repeat_days label {
+ font-size:10px;
+}
+.dhx_custom_button{
+ width:90px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+.dhx_custom_button_recurring{
+ background-image:url(./imgs/but_repeat.gif);
+ background-position:-5px 20px;
+ width:20px;
+ margin-right:10px;
+}
+
+/* increase width of lightbox */
+.dhx_cal_light_rec{
+ width:640px;
+}
+.dhx_cal_light_rec .dhx_cal_larea{
+ width:632px;
+}
+.dhx_cal_light_rec.dhx_cal_light_wide{
+ width:816px;
+}
+.dhx_cal_light_rec.dhx_cal_light_wide .dhx_cal_larea{
+ width:808px;
+}
+/* event start */
+.dhx_cal_event .dhx_title {
+ border-width: 1px 1px 0 1px;
+ padding-top: 1px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+
+ font-family: arial;
+ font-weight: bold;
+ font-size: 12px;
+}
+
+.dhx_cal_event .dhx_body, .dhx_cal_event.dhx_cal_select_menu .dhx_body {
+ padding-bottom: 8px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+
+}
+
+.dhx_cal_event .dhx_header, .dhx_cal_event.dhx_cal_select_menu .dhx_footer {
+ display: none;
+}
+
+.dhx_cal_event .dhx_footer {
+ height: 5px;
+ border: 0;
+ margin-top: -6px;
+ background: url(imgs_dhx_terrace/resizing.png) no-repeat center center;
+}
+
+.dhx_cal_event .dhx_header, .dhx_cal_event .dhx_footer, .dhx_cal_event .dhx_body, .dhx_cal_event .dhx_title {
+ background-color: #1796b0;
+ border-color: transparent;
+ color: white;
+}
+
+div.dhx_cal_editor {
+ border: 1px solid transparent;
+ background-color: #1796b0;
+}
+
+.dhx_cal_editor {
+ font-size: 12px;
+ font-family: Arial, sans-serif;
+}
+
+div.dhx_menu_head, div.dhx_menu_icon {
+ background-image: url(imgs_dhx_terrace/controls.png);
+}
+
+.dhx_cal_event_line {
+ border: 1px solid transparent;
+ background-color: #1796b0;
+ color: white;
+ height: 17px;
+ line-height: 17px;
+ -webkit-border-radius: 2px;
+ -moz-border-radius: 2px;
+ border-radius: 2px;
+}
+.dhx_cal_event_line_start {
+ -webkit-border-top-left-radius: 9px;
+ -webkit-border-bottom-left-radius: 9px;
+ -moz-border-radius-topleft: 9px;
+ -moz-border-radius-bottomleft: 9px;
+ border-top-left-radius: 9px;
+ border-bottom-left-radius: 9px;
+}
+.dhx_cal_event_line_end {
+ -webkit-border-top-right-radius: 9px;
+ -webkit-border-bottom-right-radius: 9px;
+ -moz-border-radius-topright: 9px;
+ -moz-border-radius-bottomright: 9px;
+ border-top-right-radius: 9px;
+ border-bottom-right-radius: 9px;
+}
+
+.dhx_cal_event .dhx_body, .dhx_cal_event_line {
+ font-size: 12px;
+ font-family: Arial, sans-serif;
+}
+
+/* event end */
+
+/* scales, containers start */
+.dhx_cal_container {
+ background-color: white;
+}
+
+.dhx_cal_data {
+ border-top: 1px solid #CECECE;
+}
+.dhx_scale_holder {
+ background-image: url(imgs_dhx_terrace/databg.png);
+ border-right: 1px solid #CECECE;
+}
+
+.dhx_scale_holder_now {
+ background-image: url(imgs_dhx_terrace/databg_now.png);
+ border-right: 1px solid #CECECE;
+}
+
+.dhx_scale_hour {
+ border-bottom: 1px solid #CECECE;
+ background-color: white;
+ font: 11px/44px Arial;
+ color: #767676;
+}
+
+.dhx_cal_header {
+ border: 1px solid #CECECE;
+ border-left: 0;
+ border-bottom: 0;
+}
+.dhx_scale_bar {
+ border-left: 1px solid #CECECE;
+}
+
+.dhx_scale_bar {
+ font: 11px/16px Arial;
+ color: #767676;
+ padding-top: 2px;
+ background-color: white;
+}
+
+/* scales, containers end */
+
+/* navigation start */
+.dhx_cal_navline div {
+ top: 14px;
+}
+.dhx_cal_tab, .dhx_cal_date, .dhx_cal_today_button, .dhx_cal_prev_button, .dhx_cal_next_button {
+ color: #454544;
+ height: 30px;
+ line-height: 30px;
+ background: none;
+ border: 1px solid #CECECE;
+}
+
+.dhx_cal_navline .dhx_cal_date {
+ border: 0;
+ font-size: 18px;
+ font-weight: normal;
+ font-family: arial;
+ width: 100%;
+ top: 14px;
+ text-align: center;
+ position: absolute;
+ left: 0;
+ z-index: -1;
+}
+.dhx_cal_today_button {
+ color: #747473;
+ left: auto;
+ right: 123px;
+ background: none;
+ text-decoration: none;
+
+ width: 80px;
+ font-size: 12px;
+ font-weight: bold;
+ font-family: arial;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.dhx_cal_prev_button, .dhx_cal_next_button {
+ left: auto;
+ width: 46px;
+}
+.dhx_cal_prev_button {
+ right: 61px;
+ background: url(imgs_dhx_terrace/arrow_left.png) no-repeat center center;
+ -webkit-border-top-left-radius:5px;
+ -webkit-border-bottom-left-radius:5px;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-bottomleft:5px;
+ border-top-left-radius:5px;
+ border-bottom-left-radius:5px;
+}
+.dhx_cal_next_button {
+ right: 14px;
+ background: url(imgs_dhx_terrace/arrow_right.png) no-repeat center center;
+ -webkit-border-top-right-radius:5px;
+ -webkit-border-bottom-right-radius:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomright:5px;
+ border-top-right-radius:5px;
+ border-bottom-right-radius:5px;
+}
+.dhx_cal_tab {
+ color: #747473;
+ width: 60px;
+ padding-top: 0;
+ text-decoration: none;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ border-radius: 0px;
+ font-weight: bold;
+ font-family: arial;
+ font-size: 12px;
+}
+.dhx_cal_tab.active {
+ background-color: #F0EDE7;
+ color: #454544;
+ border: 1px solid #CECECE;
+ text-shadow: 0px 1px 0px white;
+}
+.dhx_cal_tab_first {
+ -webkit-border-top-left-radius:5px;
+ -webkit-border-bottom-left-radius:5px;
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-bottomleft:5px;
+ border-top-left-radius:5px;
+ border-bottom-left-radius:5px;
+}
+.dhx_cal_tab_last {
+ -webkit-border-top-right-radius:5px;
+ -webkit-border-bottom-right-radius:5px;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-bottomright:5px;
+ border-top-right-radius:5px;
+ border-bottom-right-radius:5px;
+}
+.dhx_cal_tab_standalone {
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ padding: 0 5px;
+}
+.dhx_multi_day, .dhx_multi_day_icon_small, .dhx_multi_day_icon {
+ background-color: white;
+}
+.dhx_multi_day {
+ border-top: 1px solid #CECECE;
+}
+.dhx_multi_day_icon, .dhx_multi_day_icon_small {
+ border-bottom: 1px solid #CECECE;
+ border-right: 1px solid #CECECE;
+}
+.dhx_multi_day_icon_small {
+ background-image: url(imgs_dhx_terrace/clock_small.gif);
+}
+.dhx_multi_day_icon {
+ background-image: url(imgs_dhx_terrace/clock_big.gif);
+}
+/* navigation end */
+
+/* month view start */
+.dhx_month_head, .dhx_after .dhx_month_head, .dhx_before .dhx_month_head, .dhx_after .dhx_month_body,
+.dhx_before .dhx_month_body {
+ background-color: white;
+}
+
+.dhx_month_head {
+ height: 21px;
+ padding-top: 0;
+ font: 12px/21px Arial;
+ color: #362d26;
+ border-right: 1px solid #CECECE;
+}
+
+.dhx_after .dhx_month_head, .dhx_before .dhx_month_head, .dhx_after .dhx_month_head, .dhx_before .dhx_month_head {
+ color: #bbbbbb;
+}
+
+.dhx_month_body {
+ border-right: 1px solid #CECECE;
+ border-bottom: 1px solid #CECECE;
+}
+.dhx_now .dhx_month_head, .dhx_now .dhx_month_body {
+ background-color: #FFF3A1;
+ font-weight: normal;
+}
+.dhx_cal_event_clear {
+ color: #0E64A0;
+}
+/* month view end */
+
+
+/* lightbox start */
+.dhx_cal_larea {
+ margin-left: 0;
+}
+.dhx_cal_light_wide .dhx_cal_larea {
+ margin-left: 3px;
+}
+.dhx_cal_light_wide .dhx_wrap_section {
+ padding: 5px 0;
+}
+.dhx_cal_light, .dhx_cal_larea, .dhx_cal_lsection, .dhx_wrap_section, .dhx_cal_light_wide .dhx_wrap_section, .dhx_cal_ltext textarea {
+ background-color: white;
+}
+.dhx_cal_lsection, .dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday, .dhx_cal_lsection .dhx_fullday, .dhx_cal_light input {
+ color: #747473;
+}
+.dhx_cal_light_wide .dhx_wrap_section {
+ border-top: 0;
+ border-bottom: 1px solid #CECECE;
+}
+.dhx_cal_larea {
+ border: 1px solid transparent;
+}
+.dhx_cal_ltext textarea, .dhx_cal_light select, .dhx_cal_light {
+ color: #2E2E2E;
+}
+.dhx_cal_light {
+ border: 1px solid #CECECE;
+}
+.dhx_cal_light_wide .dhx_cal_lsection, .dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday {
+ font-size: 13px;
+}
+.dhx_section_time {
+ background-color: transparent;
+}
+.dhx_save_btn, .dhx_cancel_btn, .dhx_delete_btn, .dhx_btn_set div:first-child {
+ display: none;
+}
+.dhx_btn_set, .dhx_btn_set div {
+ height: 30px;
+ padding: 0 20px;
+ line-height: 30px;
+}
+.dhx_btn_set {
+ margin: 12px 0 0 0;
+ padding: 0;
+ font-size: 12px;
+ color: #454544;
+ font-weight: bold;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.dhx_left_btn_set {
+ margin-left: 20px
+}
+.dhx_right_btn_set {
+ margin-right: 20px;
+}
+.dhx_save_btn_set {
+ border: 1px solid #22A1BC;
+ color: white;
+ text-shadow:0px -1px 0px #6F6F6F;
+ background-color: #22A1BC;
+}
+.dhx_btn_set, .dhx_cancel_btn_set {
+ border: 1px solid #CECECE;
+}
+.dhx_delete_btn_set {
+ border: 1px solid #FF8831;
+ background-color: #FF8831;
+ color: white;
+ text-shadow:0px -1px 0px #93755F;
+}
+.dhx_cal_ltitle {
+ height: 30px;
+ line-height: 30px;
+ border-bottom: 1px solid #CECECE;
+}
+
+.dhx_cal_ltitle span{
+ float: left;
+}
+.dhx_cal_light .dhx_title {
+ padding-left: 13px;
+}
+
+.dhx_mark {
+ display: none;
+}
+.dhx_time {
+ padding-left: 10px;
+}
+.dhx_close_icon {
+ float: right;
+ width: 9px;
+ height: 9px;
+ background: url(imgs_dhx_terrace/close_icon.png) no-repeat center center;
+ padding: 10px;
+ margin-top: 1px;
+}
+.dhx_cal_light_wide .dhx_cal_ltext.dhx_cal_template {
+ line-height: 22px;
+}
+.dhx_cal_ltext textarea {
+ line-height: 20px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ border: 1px solid #CECECE;
+ background-color: #F9F9F9;
+}
+/* lightbox end */
+
+/* modal box */
+.dhtmlx_modal_box {
+ background: white;
+ width: 330px;
+}
+.dhtmlx_popup_controls {
+ padding-bottom: 9px;
+}
+.dhtmlx_popup_button, .dhtmlx_popup_button:active, .dhtmlx_popup_button div, .dhtmlx_popup_button div:active {
+ color: #444;
+ background: white;
+ box-shadow: none;
+}
+.dhtmlx_popup_button.dhtmlx_ok_button {
+ border: 1px solid #22A1BC;
+ background-color: #22A1BC;
+}
+.dhtmlx_popup_button.dhtmlx_ok_button div {
+ background: #22A1BC;
+ border: 1px solid #22A1BC;
+ color: white;
+ text-shadow:0px -1px 0px #6F6F6F;
+}
+
+/* mobdal box end */
+
+/* minicalendar */
+.dhx_cal_container.dhx_mini_calendar {
+ box-sizing:border-box;
+ border: 1px solid #CECECE;
+ box-shadow:2px 2px 5px #CCC;
+ border-radius: 3px;
+}
+.dhx_mini_calendar .dhx_year_month {
+ border: 1px solid #CECECE;
+ font-family: Arial;
+}
+.dhx_mini_calendar .dhx_month_head, .dhx_mini_calendar .dhx_year_month, .dhx_mini_calendar .dhx_month_body,
+.dhx_mini_calendar .dhx_scale_bar, .dhx_mini_calendar .dhx_year_body{
+ border-color: transparent;
+}
+.dhx_mini_calendar .dhx_year_body{
+ padding-top:1px;
+}
+.dhx_mini_calendar .dhx_scale_bar {
+ border-width: 0;
+}
+.dhx_mini_calendar .dhx_year_week {
+ border-bottom: 1px solid #CECECE;
+ padding-top: 1px;
+}
+.dhx_mini_calendar .dhx_month_head {
+ padding-right: 0;
+ margin-right:1px;
+ text-align: center;
+}
+.dhx_mini_calendar .dhx_cal_prev_button, .dhx_mini_calendar .dhx_cal_next_button {
+ border: 0;
+ height: 20px;
+}
+/* minicalendar end */
+
+.dhx_cal_navline div.dhx_minical_icon{
+ left:210px;
+ top:14px;
+ width:30px; height:30px;
+ background: url(./imgs_dhx_terrace/calendar.gif) no-repeat;
+ background-position: 3px 5px;
+}
+
+/* timeline */
+.dhx_cal_event_line .dhx_event_resize {
+ background: url(./imgs_dhx_terrace/resize_dots.png) repeat-y;
+}
+.dhx_matrix_scell, .dhx_matrix_cell {
+ border-bottom: 1px solid #CECECE;
+ border-right: 1px solid #CECECE;
+}
+.dhx_cal_header div div {
+ border-left: 1px solid #CECECE;
+}
+.dhx_matrix_scell.folder {
+ border-right: 0;
+}
+.dhx_second_scale_bar {
+ border-bottom: 1px solid #CECECE;
+}
+
+/* timeline end */
+
+/* recurring */
+.dhx_repeat_divider {
+ border-left: 1px solid #CECECE;
+}
+.dhx_custom_button {
+ background-color: white;
+ border: 1px solid #CECECE;
+ color: #747473;
+}
+.dhx_cal_light_wide .dhx_custom_button {
+ margin-top: 6px;
+}
+.dhx_custom_button_recurring {
+ background-image: url(./imgs_dhx_terrace/but_repeat.gif);
+}
+/* recurring end */
+
+/* agenda */
+.dhx_v_border, .dhx_agenda_line div {
+ border-right: 1px solid #CECECE;
+}
+/* agenda end */
+
+/* year */
+.dhx_year_month {
+ border: 1px solid #CECECE;
+}
+.dhx_scale_bar_last {
+ border-right: 1px solid #CECECE;
+}
+.dhx_year_body {
+ border-left: 1px solid #CECECE;
+}
+/* year end */
+
+/* expand */
+.dhx_expand_icon {
+ top: -3px;
+}
+/* expand end */
+
+/* units view */
+.dhx_scale_bar .dhx_cal_next_button, .dhx_scale_bar .dhx_cal_prev_button {
+ width: 20px;
+ height: 20px;
+ top: 0px !important;
+ border: 0;
+}
+.dhx_scale_bar .dhx_cal_next_button {
+ right: 1px !important;
+ border-left: 1px solid #CECECE;
+}
+.dhx_scale_bar .dhx_cal_prev_button {
+ left: 1px !important;
+ border-right: 1px solid #CECECE;
+}
+/* units view end */
+
+/* map view */
+.dhx_map_line .headline_date, .dhx_map_line .headline_description {
+ border: 0;
+}
+.dhx_map_line .headline_date {
+ border-right: 1px solid #CECECE;
+}
+/* map view end */
+
+/* tooltip start */
+.dhtmlXTooltip.tooltip {
+ border-left: 1px solid #CECECE;
+ border-top: 1px solid #CECECE;
+ color: #747473;
+ font-size: 12px;
+ line-height: 16px;
+}
+/* tooltip end */
+
+/* week agenda start */
+.dhx_wa_scale_bar {
+ border-top: 1px solid #CECECE;
+ border-bottom: 1px solid #CECECE;
+}
+.dhx_wa_column_last .dhx_wa_day_cont {
+ border-left: 1px solid #CECECE;
+}
+.dhx_wa_ev_body {
+ border-bottom: 1px solid #CECECE;
+}
+.dhx_wa_scale_bar {
+ background-color: #f0ede7;
+}
+.dhx_wa_ev_body.dhx_cal_event_selected {
+ background-color: #fff3a1;
+ color: #362d26;
+}
+.dhx_wa_dnd {
+ background-color: #fddb93 !important;
+ color: #747473 !important;
+ border: 1px solid #ccb177;
+}
+/* week agenda end */
+
+/* readonly start */
+.dhx_text_disabled {
+ color: #2E2E2E;
+}
+.dhx_cal_ltext .dhx_text_disabled {
+ line-height: 22px;
+}
+/* readonly end */
+
+
+/* grid view start */
+.dhx_grid_v_border{
+ border-right-color:#CECECE;
+}
+/* grid view end*/
+
+/* left border support */
+.dhx_scale_hour_border, .dhx_month_body_border, .dhx_scale_bar_border, .dhx_month_head_border {
+ border-left: 1px solid #CECECE;
+}
+
+
+.dhx_cal_quick_info{
+ background: rgba(50,50,50,0.5);
+}
+.dhx_qi_big_icon{
+ background: #1796b0;
+ color:white;
+}
+
+
+/* export to PDF and iCal buttons start */
+.dhx_cal_navline .dhx_cal_export{
+ width:32px;
+ height:32px;
+ margin:2px;
+ cursor:pointer;
+ top: 12px;
+}
+.dhx_cal_navline .dhx_cal_export.pdf{
+ left: auto;
+ right: 249px;
+ background-image:url('imgs_dhx_terrace/export_pdf.png');
+}
+.dhx_cal_navline .dhx_cal_export.ical{
+ left: auto;
+ right: 210px;
+ background-image:url('imgs_dhx_terrace/export_ical.png');
+}
+/* export to PDF and iCal buttons end */
+
+
+/* minicalendar */
+.dhx_mini_calendar{
+ padding:5px;
+}
+.dhx_mini_calendar .dhx_year_event, .dhx_mini_calendar .dhx_calendar_click {
+ border-radius: 7px;
+}
+.dhx_mini_calendar .dhx_month_head{
+ margin:2px 2px;
+}
+.dhx_mini_calendar .dhx_year_month{
+ line-height: 20px;
+ height:25px;
+ font-size: 14px;
+}
+.dhx_mini_calendar .dhx_cal_prev_button{
+ top:8px !important;
+}
+.dhx_mini_calendar .dhx_cal_next_button{
+ top:8px !important;
+}
diff --git a/sources/dhtmlxscheduler.js b/sources/dhtmlxscheduler.js
new file mode 100644
index 0000000..d25ed2e
--- /dev/null
+++ b/sources/dhtmlxscheduler.js
@@ -0,0 +1,5650 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+
+if (!window.dhtmlx) {
+ dhtmlx = function(obj){
+ for (var a in obj) dhtmlx[a]=obj[a];
+ return dhtmlx; //simple singleton
+ };
+}
+dhtmlx.extend_api=function(name,map,ext){
+ var t = window[name];
+ if (!t) return; //component not defined
+ window[name]=function(obj){
+ if (obj && typeof obj == "object" && !obj.tagName){
+ var that = t.apply(this,(map._init?map._init(obj):arguments));
+ //global settings
+ for (var a in dhtmlx)
+ if (map[a]) this[map[a]](dhtmlx[a]);
+ //local settings
+ for (var a in obj){
+ if (map[a]) this[map[a]](obj[a]);
+ else if (a.indexOf("on")==0){
+ this.attachEvent(a,obj[a]);
+ }
+ }
+ } else
+ var that = t.apply(this,arguments);
+ if (map._patch) map._patch(this);
+ return that||this;
+ };
+ window[name].prototype=t.prototype;
+ if (ext)
+ dhtmlXHeir(window[name].prototype,ext);
+};
+
+dhtmlxAjax={
+ get:function(url,callback){
+ var t=new dtmlXMLLoaderObject(true);
+ t.async=(arguments.length<3);
+ t.waitCall=callback;
+ t.loadXML(url)
+ return t;
+ },
+ post:function(url,post,callback){
+ var t=new dtmlXMLLoaderObject(true);
+ t.async=(arguments.length<4);
+ t.waitCall=callback;
+ t.loadXML(url,true,post)
+ return t;
+ },
+ getSync:function(url){
+ return this.get(url,null,true)
+ },
+ postSync:function(url,post){
+ return this.post(url,post,null,true);
+ }
+}
+
+/**
+ * @desc: xmlLoader object
+ * @type: private
+ * @param: funcObject - xml parser function
+ * @param: object - jsControl object
+ * @param: async - sync/async mode (async by default)
+ * @param: rSeed - enable/disable random seed ( prevent IE caching)
+ * @topic: 0
+ */
+function dtmlXMLLoaderObject(funcObject, dhtmlObject, async, rSeed){
+ this.xmlDoc="";
+
+ if (typeof (async) != "undefined")
+ this.async=async;
+ else
+ this.async=true;
+
+ this.onloadAction=funcObject||null;
+ this.mainObject=dhtmlObject||null;
+ this.waitCall=null;
+ this.rSeed=rSeed||false;
+ return this;
+};
+
+dtmlXMLLoaderObject.count = 0;
+
+/**
+ * @desc: xml loading handler
+ * @type: private
+ * @param: dtmlObject - xmlLoader object
+ * @topic: 0
+ */
+dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){
+ var once = true;
+ this.check=function (){
+ if ((dhtmlObject)&&(dhtmlObject.onloadAction != null)){
+ if ((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState == 4)){
+ if (!once)
+ return;
+
+ once=false; //IE 5 fix
+ dtmlXMLLoaderObject.count++;
+ if (typeof dhtmlObject.onloadAction == "function")
+ dhtmlObject.onloadAction(dhtmlObject.mainObject, null, null, null, dhtmlObject);
+
+ if (dhtmlObject.waitCall){
+ dhtmlObject.waitCall.call(this,dhtmlObject);
+ dhtmlObject.waitCall=null;
+ }
+ }
+ }
+ };
+ return this.check;
+};
+
+/**
+ * @desc: return XML top node
+ * @param: tagName - top XML node tag name (not used in IE, required for Safari and Mozilla)
+ * @type: private
+ * @returns: top XML node
+ * @topic: 0
+ */
+dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName, oldObj){
+ if (this.xmlDoc.responseXML){
+ var temp = this.xmlDoc.responseXML.getElementsByTagName(tagName);
+ if(temp.length==0 && tagName.indexOf(":")!=-1)
+ var temp = this.xmlDoc.responseXML.getElementsByTagName((tagName.split(":"))[1]);
+ var z = temp[0];
+ } else
+ var z = this.xmlDoc.documentElement;
+
+ if (z){
+ this._retry=false;
+ return z;
+ }
+
+ if (!this._retry){
+ this._retry=true;
+ var oldObj = this.xmlDoc;
+ this.loadXMLString(this.xmlDoc.responseText.replace(/^[\s]+/,""), true);
+ return this.getXMLTopNode(tagName, oldObj);
+ }
+
+ dhtmlxError.throwError("LoadXML", "Incorrect XML", [
+ (oldObj||this.xmlDoc),
+ this.mainObject
+ ]);
+
+ return document.createElement("DIV");
+};
+
+/**
+ * @desc: load XML from string
+ * @type: private
+ * @param: xmlString - xml string
+ * @topic: 0
+ */
+dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString, silent){
+
+ if (!_isIE){
+ var parser = new DOMParser();
+ this.xmlDoc=parser.parseFromString(xmlString, "text/xml");
+ } else {
+ this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
+ this.xmlDoc.async=this.async;
+ this.xmlDoc.onreadystatechange = function(){};
+ this.xmlDoc["loadXM"+"L"](xmlString);
+ }
+
+ if (silent)
+ return;
+
+ if (this.onloadAction)
+ this.onloadAction(this.mainObject, null, null, null, this);
+
+ if (this.waitCall){
+ this.waitCall();
+ this.waitCall=null;
+ }
+}
+/**
+ * @desc: load XML
+ * @type: private
+ * @param: filePath - xml file path
+ * @param: postMode - send POST request
+ * @param: postVars - list of vars for post request
+ * @topic: 0
+ */
+dtmlXMLLoaderObject.prototype.loadXML=function(filePath, postMode, postVars, rpc){
+ if (this.rSeed)
+ filePath+=((filePath.indexOf("?") != -1) ? "&" : "?")+"a_dhx_rSeed="+(new Date()).valueOf();
+ this.filePath=filePath;
+
+ if ((!_isIE)&&(window.XMLHttpRequest))
+ this.xmlDoc=new XMLHttpRequest();
+ else {
+ this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
+ }
+
+ if (this.async)
+ this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
+ this.xmlDoc.open(postMode ? "POST" : "GET", filePath, this.async);
+
+ if (rpc){
+ this.xmlDoc.setRequestHeader("User-Agent", "dhtmlxRPC v0.1 ("+navigator.userAgent+")");
+ this.xmlDoc.setRequestHeader("Content-type", "text/xml");
+ }
+
+ else if (postMode)
+ this.xmlDoc.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
+
+ this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");
+ this.xmlDoc.send(null||postVars);
+
+ if (!this.async)
+ (new this.waitLoadFunction(this))();
+};
+/**
+ * @desc: destructor, cleans used memory
+ * @type: private
+ * @topic: 0
+ */
+dtmlXMLLoaderObject.prototype.destructor=function(){
+ this._filterXPath = null;
+ this._getAllNamedChilds = null;
+ this._retry = null;
+ this.async = null;
+ this.rSeed = null;
+ this.filePath = null;
+ this.onloadAction = null;
+ this.mainObject = null;
+ this.xmlDoc = null;
+ this.doXPath = null;
+ this.doXPathOpera = null;
+ this.doXSLTransToObject = null;
+ this.doXSLTransToString = null;
+ this.loadXML = null;
+ this.loadXMLString = null;
+ // this.waitLoadFunction = null;
+ this.doSerialization = null;
+ this.xmlNodeToJSON = null;
+ this.getXMLTopNode = null;
+ this.setXSLParamValue = null;
+ return null;
+}
+
+dtmlXMLLoaderObject.prototype.xmlNodeToJSON = function(node){
+ var t={};
+ for (var i=0; i<node.attributes.length; i++)
+ t[node.attributes[i].name]=node.attributes[i].value;
+ t["_tagvalue"]=node.firstChild?node.firstChild.nodeValue:"";
+ for (var i=0; i<node.childNodes.length; i++){
+ var name=node.childNodes[i].tagName;
+ if (name){
+ if (!t[name]) t[name]=[];
+ t[name].push(this.xmlNodeToJSON(node.childNodes[i]));
+ }
+ }
+ return t;
+}
+
+/**
+ * @desc: Call wrapper
+ * @type: private
+ * @param: funcObject - action handler
+ * @param: dhtmlObject - user data
+ * @returns: function handler
+ * @topic: 0
+ */
+function callerFunction(funcObject, dhtmlObject){
+ this.handler=function(e){
+ if (!e)
+ e=window.event;
+ funcObject(e, dhtmlObject);
+ return true;
+ };
+ return this.handler;
+};
+
+/**
+ * @desc: Calculate absolute position of html object
+ * @type: private
+ * @param: htmlObject - html object
+ * @topic: 0
+ */
+function getAbsoluteLeft(htmlObject){
+ return getOffset(htmlObject).left;
+}
+/**
+ * @desc: Calculate absolute position of html object
+ * @type: private
+ * @param: htmlObject - html object
+ * @topic: 0
+ */
+function getAbsoluteTop(htmlObject){
+ return getOffset(htmlObject).top;
+}
+
+function getOffsetSum(elem) {
+ var top=0, left=0;
+ while(elem) {
+ top = top + parseInt(elem.offsetTop);
+ left = left + parseInt(elem.offsetLeft);
+ elem = elem.offsetParent;
+ }
+ return {top: top, left: left};
+}
+function getOffsetRect(elem) {
+ var box = elem.getBoundingClientRect();
+ var body = document.body;
+ var docElem = document.documentElement;
+ var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;
+ var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;
+ var clientTop = docElem.clientTop || body.clientTop || 0;
+ var clientLeft = docElem.clientLeft || body.clientLeft || 0;
+ var top = box.top + scrollTop - clientTop;
+ var left = box.left + scrollLeft - clientLeft;
+ return { top: Math.round(top), left: Math.round(left) };
+}
+function getOffset(elem) {
+ if (elem.getBoundingClientRect) {
+ return getOffsetRect(elem);
+ } else {
+ return getOffsetSum(elem);
+ }
+}
+
+/**
+ * @desc: Convert string to it boolean representation
+ * @type: private
+ * @param: inputString - string for covertion
+ * @topic: 0
+ */
+function convertStringToBoolean(inputString){
+ if (typeof (inputString) == "string")
+ inputString=inputString.toLowerCase();
+
+ switch (inputString){
+ case "1":
+ case "true":
+ case "yes":
+ case "y":
+ case 1:
+ case true:
+ return true;
+ break;
+
+ default: return false;
+ }
+}
+
+/**
+ * @desc: find out what symbol to use as url param delimiters in further params
+ * @type: private
+ * @param: str - current url string
+ * @topic: 0
+ */
+function getUrlSymbol(str){
+ if (str.indexOf("?") != -1)
+ return "&"
+ else
+ return "?"
+}
+
+function dhtmlDragAndDropObject(){
+ if (window.dhtmlDragAndDrop)
+ return window.dhtmlDragAndDrop;
+
+ this.lastLanding=0;
+ this.dragNode=0;
+ this.dragStartNode=0;
+ this.dragStartObject=0;
+ this.tempDOMU=null;
+ this.tempDOMM=null;
+ this.waitDrag=0;
+ window.dhtmlDragAndDrop=this;
+
+ return this;
+};
+
+dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){
+ htmlNode.onmousedown=null;
+ htmlNode.dragStarter=null;
+ htmlNode.dragLanding=null;
+}
+dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode, dhtmlObject){
+ htmlNode.onmousedown=this.preCreateDragCopy;
+ htmlNode.dragStarter=dhtmlObject;
+ this.addDragLanding(htmlNode, dhtmlObject);
+}
+dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode, dhtmlObject){
+ htmlNode.dragLanding=dhtmlObject;
+}
+dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e){
+ if ((e||window.event) && (e||event).button == 2)
+ return;
+
+ if (window.dhtmlDragAndDrop.waitDrag){
+ window.dhtmlDragAndDrop.waitDrag=0;
+ document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
+ document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
+ return false;
+ }
+
+ if (window.dhtmlDragAndDrop.dragNode)
+ window.dhtmlDragAndDrop.stopDrag(e);
+
+ window.dhtmlDragAndDrop.waitDrag=1;
+ window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;
+ window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;
+ window.dhtmlDragAndDrop.dragStartNode=this;
+ window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;
+ document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;
+ document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;
+ window.dhtmlDragAndDrop.downtime = new Date().valueOf();
+
+
+ if ((e)&&(e.preventDefault)){
+ e.preventDefault();
+ return false;
+ }
+ return false;
+};
+dhtmlDragAndDropObject.prototype.callDrag=function(e){
+ if (!e)
+ e=window.event;
+ dragger=window.dhtmlDragAndDrop;
+ if ((new Date()).valueOf()-dragger.downtime<100) return;
+
+ //if ((e.button == 0)&&(_isIE))
+ // return dragger.stopDrag();
+
+ if (!dragger.dragNode){
+ if (dragger.waitDrag){
+ dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode, e);
+
+ if (!dragger.dragNode)
+ return dragger.stopDrag();
+
+ dragger.dragNode.onselectstart=function(){return false;}
+ dragger.gldragNode=dragger.dragNode;
+ document.body.appendChild(dragger.dragNode);
+ document.body.onmouseup=dragger.stopDrag;
+ dragger.waitDrag=0;
+ dragger.dragNode.pWindow=window;
+ dragger.initFrameRoute();
+ }
+ else return dragger.stopDrag(e, true);
+ }
+
+ if (dragger.dragNode.parentNode != window.document.body && dragger.gldragNode){
+ var grd = dragger.gldragNode;
+
+ if (dragger.gldragNode.old)
+ grd=dragger.gldragNode.old;
+
+ //if (!document.all) dragger.calculateFramePosition();
+ grd.parentNode.removeChild(grd);
+ var oldBody = dragger.dragNode.pWindow;
+
+ if (grd.pWindow && grd.pWindow.dhtmlDragAndDrop.lastLanding)
+ grd.pWindow.dhtmlDragAndDrop.lastLanding.dragLanding._dragOut(grd.pWindow.dhtmlDragAndDrop.lastLanding);
+
+ // var oldp=dragger.dragNode.parentObject;
+ if (_isIE){
+ var div = document.createElement("Div");
+ div.innerHTML=dragger.dragNode.outerHTML;
+ dragger.dragNode=div.childNodes[0];
+ } else
+ dragger.dragNode=dragger.dragNode.cloneNode(true);
+
+ dragger.dragNode.pWindow=window;
+ // dragger.dragNode.parentObject=oldp;
+
+ dragger.gldragNode.old=dragger.dragNode;
+ document.body.appendChild(dragger.dragNode);
+ oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode;
+ }
+
+ dragger.dragNode.style.left=e.clientX+15+(dragger.fx
+ ? dragger.fx*(-1)
+ : 0)
+ +(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";
+ dragger.dragNode.style.top=e.clientY+3+(dragger.fy
+ ? dragger.fy*(-1)
+ : 0)
+ +(document.body.scrollTop||document.documentElement.scrollTop)+"px";
+
+ if (!e.srcElement)
+ var z = e.target;
+ else
+ z=e.srcElement;
+ dragger.checkLanding(z, e);
+}
+
+dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n){
+ //this.fx = 0, this.fy = 0;
+ if (window.name){
+ var el = parent.frames[window.name].frameElement.offsetParent;
+ var fx = 0;
+ var fy = 0;
+
+ while (el){
+ fx+=el.offsetLeft;
+ fy+=el.offsetTop;
+ el=el.offsetParent;
+ }
+
+ if ((parent.dhtmlDragAndDrop)){
+ var ls = parent.dhtmlDragAndDrop.calculateFramePosition(1);
+ fx+=ls.split('_')[0]*1;
+ fy+=ls.split('_')[1]*1;
+ }
+
+ if (n)
+ return fx+"_"+fy;
+ else
+ this.fx=fx;
+ this.fy=fy;
+ }
+ return "0_0";
+}
+dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject, e){
+ if ((htmlObject)&&(htmlObject.dragLanding)){
+ if (this.lastLanding)
+ this.lastLanding.dragLanding._dragOut(this.lastLanding);
+ this.lastLanding=htmlObject;
+ this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding, this.dragStartNode, e.clientX,
+ e.clientY, e);
+ this.lastLanding_scr=(_isIE ? e.srcElement : e.target);
+ } else {
+ if ((htmlObject)&&(htmlObject.tagName != "BODY"))
+ this.checkLanding(htmlObject.parentNode, e);
+ else {
+ if (this.lastLanding)
+ this.lastLanding.dragLanding._dragOut(this.lastLanding, e.clientX, e.clientY, e);
+ this.lastLanding=0;
+
+ if (this._onNotFound)
+ this._onNotFound();
+ }
+ }
+}
+dhtmlDragAndDropObject.prototype.stopDrag=function(e, mode){
+ dragger=window.dhtmlDragAndDrop;
+
+ if (!mode){
+ dragger.stopFrameRoute();
+ var temp = dragger.lastLanding;
+ dragger.lastLanding=null;
+
+ if (temp)
+ temp.dragLanding._drag(dragger.dragStartNode, dragger.dragStartObject, temp, (_isIE
+ ? event.srcElement
+ : e.target));
+ }
+ dragger.lastLanding=null;
+
+ if ((dragger.dragNode)&&(dragger.dragNode.parentNode == document.body))
+ dragger.dragNode.parentNode.removeChild(dragger.dragNode);
+ dragger.dragNode=0;
+ dragger.gldragNode=0;
+ dragger.fx=0;
+ dragger.fy=0;
+ dragger.dragStartNode=0;
+ dragger.dragStartObject=0;
+ document.body.onmouseup=dragger.tempDOMU;
+ document.body.onmousemove=dragger.tempDOMM;
+ dragger.tempDOMU=null;
+ dragger.tempDOMM=null;
+ dragger.waitDrag=0;
+}
+
+dhtmlDragAndDropObject.prototype.stopFrameRoute=function(win){
+ if (win)
+ window.dhtmlDragAndDrop.stopDrag(1, 1);
+
+ for (var i = 0; i < window.frames.length; i++){
+ try{
+ if ((window.frames[i] != win)&&(window.frames[i].dhtmlDragAndDrop))
+ window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window);
+ } catch(e){}
+ }
+
+ try{
+ if ((parent.dhtmlDragAndDrop)&&(parent != window)&&(parent != win))
+ parent.dhtmlDragAndDrop.stopFrameRoute(window);
+ } catch(e){}
+}
+dhtmlDragAndDropObject.prototype.initFrameRoute=function(win, mode){
+ if (win){
+ window.dhtmlDragAndDrop.preCreateDragCopy();
+ window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;
+ window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;
+ window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;
+ window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;
+ window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;
+ window.waitDrag=0;
+
+ if (((!_isIE)&&(mode))&&((!_isFF)||(_FFrv < 1.8)))
+ window.dhtmlDragAndDrop.calculateFramePosition();
+ }
+ try{
+ if ((parent.dhtmlDragAndDrop)&&(parent != window)&&(parent != win))
+ parent.dhtmlDragAndDrop.initFrameRoute(window);
+ }catch(e){}
+
+ for (var i = 0; i < window.frames.length; i++){
+ try{
+ if ((window.frames[i] != win)&&(window.frames[i].dhtmlDragAndDrop))
+ window.frames[i].dhtmlDragAndDrop.initFrameRoute(window, ((!win||mode) ? 1 : 0));
+ } catch(e){}
+ }
+}
+
+_isFF = false;
+_isIE = false;
+_isOpera = false;
+_isKHTML = false;
+_isMacOS = false;
+_isChrome = false;
+_FFrv = false;
+_KHTMLrv = false;
+_OperaRv = false;
+
+if (navigator.userAgent.indexOf('Macintosh') != -1)
+ _isMacOS=true;
+
+
+if (navigator.userAgent.toLowerCase().indexOf('chrome')>-1)
+ _isChrome=true;
+
+if ((navigator.userAgent.indexOf('Safari') != -1)||(navigator.userAgent.indexOf('Konqueror') != -1)){
+ _KHTMLrv = parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Safari')+7, 5));
+
+ if (_KHTMLrv > 525){ //mimic FF behavior for Safari 3.1+
+ _isFF=true;
+ _FFrv = 1.9;
+ } else
+ _isKHTML=true;
+} else if (navigator.userAgent.indexOf('Opera') != -1){
+ _isOpera=true;
+ _OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6, 3));
+}
+
+
+else if (navigator.appName.indexOf("Microsoft") != -1){
+ _isIE=true;
+ if ((navigator.appVersion.indexOf("MSIE 8.0")!= -1 || navigator.appVersion.indexOf("MSIE 9.0")!= -1 || navigator.appVersion.indexOf("MSIE 10.0")!= -1 ) && document.compatMode != "BackCompat"){
+ _isIE=8;
+ }
+} else {
+ _isFF=true;
+ _FFrv = parseFloat(navigator.userAgent.split("rv:")[1])
+}
+
+
+//multibrowser Xpath processor
+dtmlXMLLoaderObject.prototype.doXPath=function(xpathExp, docObj, namespace, result_type){
+ if (_isKHTML || (!_isIE && !window.XPathResult))
+ return this.doXPathOpera(xpathExp, docObj);
+
+ if (_isIE){ //IE
+ if (!docObj)
+ if (!this.xmlDoc.nodeName)
+ docObj=this.xmlDoc.responseXML
+ else
+ docObj=this.xmlDoc;
+
+ if (!docObj)
+ dhtmlxError.throwError("LoadXML", "Incorrect XML", [
+ (docObj||this.xmlDoc),
+ this.mainObject
+ ]);
+
+ if (namespace != null)
+ docObj.setProperty("SelectionNamespaces", "xmlns:xsl='"+namespace+"'"); //
+
+ if (result_type == 'single'){
+ return docObj.selectSingleNode(xpathExp);
+ }
+ else {
+ return docObj.selectNodes(xpathExp)||new Array(0);
+ }
+ } else { //Mozilla
+ var nodeObj = docObj;
+
+ if (!docObj){
+ if (!this.xmlDoc.nodeName){
+ docObj=this.xmlDoc.responseXML
+ }
+ else {
+ docObj=this.xmlDoc;
+ }
+ }
+
+ if (!docObj)
+ dhtmlxError.throwError("LoadXML", "Incorrect XML", [
+ (docObj||this.xmlDoc),
+ this.mainObject
+ ]);
+
+ if (docObj.nodeName.indexOf("document") != -1){
+ nodeObj=docObj;
+ }
+ else {
+ nodeObj=docObj;
+ docObj=docObj.ownerDocument;
+ }
+ var retType = XPathResult.ANY_TYPE;
+
+ if (result_type == 'single')
+ retType=XPathResult.FIRST_ORDERED_NODE_TYPE
+ var rowsCol = new Array();
+ var col = docObj.evaluate(xpathExp, nodeObj, function(pref){
+ return namespace
+ }, retType, null);
+
+ if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE){
+ return col.singleNodeValue;
+ }
+ var thisColMemb = col.iterateNext();
+
+ while (thisColMemb){
+ rowsCol[rowsCol.length]=thisColMemb;
+ thisColMemb=col.iterateNext();
+ }
+ return rowsCol;
+ }
+}
+
+function _dhtmlxError(type, name, params){
+ if (!this.catches)
+ this.catches=new Array();
+
+ return this;
+}
+
+_dhtmlxError.prototype.catchError=function(type, func_name){
+ this.catches[type]=func_name;
+}
+_dhtmlxError.prototype.throwError=function(type, name, params){
+ if (this.catches[type])
+ return this.catches[type](type, name, params);
+
+ if (this.catches["ALL"])
+ return this.catches["ALL"](type, name, params);
+
+ alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);
+ return null;
+}
+
+window.dhtmlxError=new _dhtmlxError();
+
+
+//opera fake, while 9.0 not released
+//multibrowser Xpath processor
+dtmlXMLLoaderObject.prototype.doXPathOpera=function(xpathExp, docObj){
+ //this is fake for Opera
+ var z = xpathExp.replace(/[\/]+/gi, "/").split('/');
+ var obj = null;
+ var i = 1;
+
+ if (!z.length)
+ return [];
+
+ if (z[0] == ".")
+ obj=[docObj]; else if (z[0] == ""){
+ obj=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(z[i].replace(/\[[^\]]*\]/g, ""));
+ i++;
+ } else
+ return [];
+
+ for (i; i < z.length; i++)obj=this._getAllNamedChilds(obj, z[i]);
+
+ if (z[i-1].indexOf("[") != -1)
+ obj=this._filterXPath(obj, z[i-1]);
+ return obj;
+}
+
+dtmlXMLLoaderObject.prototype._filterXPath=function(a, b){
+ var c = new Array();
+ var b = b.replace(/[^\[]*\[\@/g, "").replace(/[\[\]\@]*/g, "");
+
+ for (var i = 0; i < a.length; i++)
+ if (a[i].getAttribute(b))
+ c[c.length]=a[i];
+
+ return c;
+}
+dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a, b){
+ var c = new Array();
+
+ if (_isKHTML)
+ b=b.toUpperCase();
+
+ for (var i = 0; i < a.length; i++)for (var j = 0; j < a[i].childNodes.length; j++){
+ if (_isKHTML){
+ if (a[i].childNodes[j].tagName&&a[i].childNodes[j].tagName.toUpperCase() == b)
+ c[c.length]=a[i].childNodes[j];
+ }
+
+ else if (a[i].childNodes[j].tagName == b)
+ c[c.length]=a[i].childNodes[j];
+ }
+
+ return c;
+}
+
+function dhtmlXHeir(a, b){
+ for (var c in b)
+ if (typeof (b[c]) == "function")
+ a[c]=b[c];
+ return a;
+}
+
+function dhtmlxEvent(el, event, handler){
+ if (el.addEventListener)
+ el.addEventListener(event, handler, false);
+
+ else if (el.attachEvent)
+ el.attachEvent("on"+event, handler);
+}
+
+//============= XSL Extension ===================================
+
+dtmlXMLLoaderObject.prototype.xslDoc=null;
+dtmlXMLLoaderObject.prototype.setXSLParamValue=function(paramName, paramValue, xslDoc){
+ if (!xslDoc)
+ xslDoc=this.xslDoc
+
+ if (xslDoc.responseXML)
+ xslDoc=xslDoc.responseXML;
+ var item =
+ this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+paramName+"']", xslDoc,
+ "http:/\/www.w3.org/1999/XSL/Transform", "single");
+
+ if (item != null)
+ item.firstChild.nodeValue=paramValue
+}
+dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(xslDoc, xmlDoc){
+ if (!xslDoc)
+ xslDoc=this.xslDoc;
+
+ if (xslDoc.responseXML)
+ xslDoc=xslDoc.responseXML
+
+ if (!xmlDoc)
+ xmlDoc=this.xmlDoc;
+
+ if (xmlDoc.responseXML)
+ xmlDoc=xmlDoc.responseXML
+
+ //MOzilla
+ if (!_isIE){
+ if (!this.XSLProcessor){
+ this.XSLProcessor=new XSLTProcessor();
+ this.XSLProcessor.importStylesheet(xslDoc);
+ }
+ var result = this.XSLProcessor.transformToDocument(xmlDoc);
+ } else {
+ var result = new ActiveXObject("Msxml2.DOMDocument.3.0");
+ try{
+ xmlDoc.transformNodeToObject(xslDoc, result);
+ }catch(e){
+ result = xmlDoc.transformNode(xslDoc);
+ }
+ }
+ return result;
+}
+
+dtmlXMLLoaderObject.prototype.doXSLTransToString=function(xslDoc, xmlDoc){
+ var res = this.doXSLTransToObject(xslDoc, xmlDoc);
+ if(typeof(res)=="string")
+ return res;
+ return this.doSerialization(res);
+}
+
+dtmlXMLLoaderObject.prototype.doSerialization=function(xmlDoc){
+ if (!xmlDoc)
+ xmlDoc=this.xmlDoc;
+ if (xmlDoc.responseXML)
+ xmlDoc=xmlDoc.responseXML
+ if (!_isIE){
+ var xmlSerializer = new XMLSerializer();
+ return xmlSerializer.serializeToString(xmlDoc);
+ } else
+ return xmlDoc.xml;
+}
+
+/**
+ * @desc:
+ * @type: private
+ */
+dhtmlxEventable=function(obj){
+ obj.attachEvent=function(name, catcher, callObj){
+ name='ev_'+name.toLowerCase();
+ if (!this[name])
+ this[name]=new this.eventCatcher(callObj||this);
+
+ return(name+':'+this[name].addEvent(catcher)); //return ID (event name & event ID)
+ }
+ obj.callEvent=function(name, arg0){
+ name='ev_'+name.toLowerCase();
+ if (this[name])
+ return this[name].apply(this, arg0);
+ return true;
+ }
+ obj.checkEvent=function(name){
+ return (!!this['ev_'+name.toLowerCase()])
+ }
+ obj.eventCatcher=function(obj){
+ var dhx_catch = [];
+ var z = function(){
+ var res = true;
+ for (var i = 0; i < dhx_catch.length; i++){
+ if (dhx_catch[i] != null){
+ var zr = dhx_catch[i].apply(obj, arguments);
+ res=res&&zr;
+ }
+ }
+ return res;
+ }
+ z.addEvent=function(ev){
+ if (typeof (ev) != "function")
+ ev=eval(ev);
+ if (ev)
+ return dhx_catch.push(ev)-1;
+ return false;
+ }
+ z.removeEvent=function(id){
+ dhx_catch[id]=null;
+ }
+ return z;
+ }
+ obj.detachEvent=function(id){
+ if (id != false){
+ var list = id.split(':'); //get EventName and ID
+ this[list[0]].removeEvent(list[1]); //remove event
+ }
+ }
+ obj.detachAllEvents = function(){
+ for (var name in this){
+ if (name.indexOf("ev_")==0)
+ delete this[name];
+ }
+ }
+ obj = null;
+};
+
+if(!window.dhtmlx)
+ window.dhtmlx = {};
+
+(function(){
+ var _dhx_msg_cfg = null;
+ function callback(config, result){
+ var usercall = config.callback;
+ modality(false);
+ config.box.parentNode.removeChild(config.box);
+ _dhx_msg_cfg = config.box = null;
+ if (usercall)
+ usercall(result);
+ }
+ function modal_key(e){
+ if (_dhx_msg_cfg){
+ e = e||event;
+ var code = e.which||event.keyCode;
+ if (dhtmlx.message.keyboard){
+ if (code == 13 || code == 32)
+ callback(_dhx_msg_cfg, true);
+ if (code == 27)
+ callback(_dhx_msg_cfg, false);
+ }
+ if (e.preventDefault)
+ e.preventDefault();
+ return !(e.cancelBubble = true);
+ }
+ }
+ if (document.attachEvent)
+ document.attachEvent("onkeydown", modal_key);
+ else
+ document.addEventListener("keydown", modal_key, true);
+
+ function modality(mode){
+ if(!modality.cover){
+ modality.cover = document.createElement("DIV");
+ //necessary for IE only
+ modality.cover.onkeydown = modal_key;
+ modality.cover.className = "dhx_modal_cover";
+ document.body.appendChild(modality.cover);
+ }
+ var height = document.body.scrollHeight;
+ modality.cover.style.display = mode?"inline-block":"none";
+ }
+
+ function button(text, result){
+ var button_css = "dhtmlx_"+text.toLowerCase().replace(/ /g, "_")+"_button"; // dhtmlx_ok_button, dhtmlx_click_me_button
+ return "<div class='dhtmlx_popup_button "+button_css+"' result='"+result+"' ><div>"+text+"</div></div>";
+ }
+
+ function info(text){
+ if (!t.area){
+ t.area = document.createElement("DIV");
+ t.area.className = "dhtmlx_message_area";
+ t.area.style[t.position]="5px";
+ document.body.appendChild(t.area);
+ }
+
+ t.hide(text.id);
+ var message = document.createElement("DIV");
+ message.innerHTML = "<div>"+text.text+"</div>";
+ message.className = "dhtmlx-info dhtmlx-" + text.type;
+ message.onclick = function(){
+ t.hide(text.id);
+ text = null;
+ };
+
+ if (t.position == "bottom" && t.area.firstChild)
+ t.area.insertBefore(message,t.area.firstChild);
+ else
+ t.area.appendChild(message);
+
+ if (text.expire > 0)
+ t.timers[text.id]=window.setTimeout(function(){
+ t.hide(text.id);
+ }, text.expire);
+
+ t.pull[text.id] = message;
+ message = null;
+
+ return text.id;
+ }
+ function _boxStructure(config, ok, cancel){
+ var box = document.createElement("DIV");
+ box.className = " dhtmlx_modal_box dhtmlx-"+config.type;
+ box.setAttribute("dhxbox", 1);
+
+ var inner = '';
+
+ if (config.width)
+ box.style.width = config.width;
+ if (config.height)
+ box.style.height = config.height;
+ if (config.title)
+ inner+='<div class="dhtmlx_popup_title">'+config.title+'</div>';
+ inner+='<div class="dhtmlx_popup_text"><span>'+(config.content?'':config.text)+'</span></div><div class="dhtmlx_popup_controls">';
+ if (ok)
+ inner += button(config.ok || "OK", true);
+ if (cancel)
+ inner += button(config.cancel || "Cancel", false);
+ if (config.buttons){
+ for (var i=0; i<config.buttons.length; i++)
+ inner += button(config.buttons[i],i);
+ }
+ inner += '</div>';
+ box.innerHTML = inner;
+
+ if (config.content){
+ var node = config.content;
+ if (typeof node == "string")
+ node = document.getElementById(node);
+ if (node.style.display == 'none')
+ node.style.display = "";
+ box.childNodes[config.title?1:0].appendChild(node);
+ }
+
+ box.onclick = function(e){
+ e = e ||event;
+ var source = e.target || e.srcElement;
+ if (!source.className) source = source.parentNode;
+ if (source.className.split(" ")[0] == "dhtmlx_popup_button"){
+ result = source.getAttribute("result");
+ result = (result == "true")||(result == "false"?false:result);
+ callback(config, result);
+ }
+ };
+ config.box = box;
+ if (ok||cancel)
+ _dhx_msg_cfg = config;
+
+ return box;
+ }
+ function _createBox(config, ok, cancel){
+ var box = config.tagName ? config : _boxStructure(config, ok, cancel);
+
+ if (!config.hidden)
+ modality(true);
+ document.body.appendChild(box);
+ var x = Math.abs(Math.floor(((window.innerWidth||document.documentElement.offsetWidth) - box.offsetWidth)/2));
+ var y = Math.abs(Math.floor(((window.innerHeight||document.documentElement.offsetHeight) - box.offsetHeight)/2));
+ if (config.position == "top")
+ box.style.top = "-3px";
+ else
+ box.style.top = y+'px';
+ box.style.left = x+'px';
+ //necessary for IE only
+ box.onkeydown = modal_key;
+
+ box.focus();
+ if (config.hidden)
+ dhtmlx.modalbox.hide(box);
+
+ return box;
+ }
+
+ function alertPopup(config){
+ return _createBox(config, true, false);
+ }
+ function confirmPopup(config){
+ return _createBox(config, true, true);
+ }
+ function boxPopup(config){
+ return _createBox(config);
+ }
+ function box_params(text, type, callback){
+ if (typeof text != "object"){
+ if (typeof type == "function"){
+ callback = type;
+ type = "";
+ }
+ text = {text:text, type:type, callback:callback };
+ }
+ return text;
+ }
+ function params(text, type, expire, id){
+ if (typeof text != "object")
+ text = {text:text, type:type, expire:expire, id:id};
+ text.id = text.id||t.uid();
+ text.expire = text.expire||t.expire;
+ return text;
+ }
+ dhtmlx.alert = function(){
+ text = box_params.apply(this, arguments);
+ text.type = text.type || "confirm";
+ return alertPopup(text);
+ };
+ dhtmlx.confirm = function(){
+ text = box_params.apply(this, arguments);
+ text.type = text.type || "alert";
+ return confirmPopup(text);
+ };
+ dhtmlx.modalbox = function(){
+ text = box_params.apply(this, arguments);
+ text.type = text.type || "alert";
+ return boxPopup(text);
+ };
+ dhtmlx.modalbox.hide = function(node){
+ while (node && node.getAttribute && !node.getAttribute("dhxbox"))
+ node = node.parentNode;
+ if (node){
+ node.parentNode.removeChild(node);
+ modality(false);
+ }
+ };
+ var t = dhtmlx.message = function(text, type, expire, id){
+ text = params.apply(this, arguments);
+ text.type = text.type||"info";
+
+ var subtype = text.type.split("-")[0];
+ switch (subtype){
+ case "alert":
+ return alertPopup(text);
+ case "confirm":
+ return confirmPopup(text);
+ case "modalbox":
+ return boxPopup(text);
+ default:
+ return info(text);
+ break;
+ }
+ };
+
+ t.seed = (new Date()).valueOf();
+ t.uid = function(){return t.seed++;};
+ t.expire = 4000;
+ t.keyboard = true;
+ t.position = "top";
+ t.pull = {};
+ t.timers = {};
+
+ t.hideAll = function(){
+ for (var key in t.pull)
+ t.hide(key);
+ };
+ t.hide = function(id){
+ var obj = t.pull[id];
+ if (obj && obj.parentNode){
+ window.setTimeout(function(){
+ obj.parentNode.removeChild(obj);
+ obj = null;
+ },2000);
+ obj.className+=" hidden";
+
+ if(t.timers[id])
+ window.clearTimeout(t.timers[id]);
+ delete t.pull[id];
+ }
+ };
+})();
+/**
+ * @desc: constructor, data processor object
+ * @param: serverProcessorURL - url used for update
+ * @type: public
+ */
+function dataProcessor(serverProcessorURL){
+ this.serverProcessor = serverProcessorURL;
+ this.action_param="!nativeeditor_status";
+
+ this.object = null;
+ this.updatedRows = []; //ids of updated rows
+
+ this.autoUpdate = true;
+ this.updateMode = "cell";
+ this._tMode="GET";
+ this.post_delim = "_";
+
+ this._waitMode=0;
+ this._in_progress={};//?
+ this._invalid={};
+ this.mandatoryFields=[];
+ this.messages=[];
+
+ this.styles={
+ updated:"font-weight:bold;",
+ inserted:"font-weight:bold;",
+ deleted:"text-decoration : line-through;",
+ invalid:"background-color:FFE0E0;",
+ invalid_cell:"border-bottom:2px solid red;",
+ error:"color:red;",
+ clear:"font-weight:normal;text-decoration:none;"
+ };
+
+ this.enableUTFencoding(true);
+ dhtmlxEventable(this);
+
+ return this;
+ }
+
+dataProcessor.prototype={
+ /**
+ * @desc: select GET or POST transaction model
+ * @param: mode - GET/POST
+ * @param: total - true/false - send records row by row or all at once (for grid only)
+ * @type: public
+ */
+ setTransactionMode:function(mode,total){
+ this._tMode=mode;
+ this._tSend=total;
+ },
+ escape:function(data){
+ if (this._utf)
+ return encodeURIComponent(data);
+ else
+ return escape(data);
+ },
+ /**
+ * @desc: allows to set escaping mode
+ * @param: true - utf based escaping, simple - use current page encoding
+ * @type: public
+ */
+ enableUTFencoding:function(mode){
+ this._utf=convertStringToBoolean(mode);
+ },
+ /**
+ * @desc: allows to define, which column may trigger update
+ * @param: val - array or list of true/false values
+ * @type: public
+ */
+ setDataColumns:function(val){
+ this._columns=(typeof val == "string")?val.split(","):val;
+ },
+ /**
+ * @desc: get state of updating
+ * @returns: true - all in sync with server, false - some items not updated yet.
+ * @type: public
+ */
+ getSyncState:function(){
+ return !this.updatedRows.length;
+ },
+ /**
+ * @desc: enable/disable named field for data syncing, will use column ids for grid
+ * @param: mode - true/false
+ * @type: public
+ */
+ enableDataNames:function(mode){
+ this._endnm=convertStringToBoolean(mode);
+ },
+ /**
+ * @desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode
+ * @param: mode - true/false
+ * @type: public
+ */
+ enablePartialDataSend:function(mode){
+ this._changed=convertStringToBoolean(mode);
+ },
+ /**
+ * @desc: set if rows should be send to server automaticaly
+ * @param: mode - "row" - based on row selection changed, "cell" - based on cell editing finished, "off" - manual data sending
+ * @type: public
+ */
+ setUpdateMode:function(mode,dnd){
+ this.autoUpdate = (mode=="cell");
+ this.updateMode = mode;
+ this.dnd=dnd;
+ },
+ ignore:function(code,master){
+ this._silent_mode=true;
+ code.call(master||window);
+ this._silent_mode=false;
+ },
+ /**
+ * @desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)
+ * @param: rowId - id of row to set update-status for
+ * @param: state - true for "updated", false for "not updated"
+ * @param: mode - update mode name
+ * @type: public
+ */
+ setUpdated:function(rowId,state,mode){
+ if (this._silent_mode) return;
+ var ind=this.findRow(rowId);
+
+ mode=mode||"updated";
+ var existing = this.obj.getUserData(rowId,this.action_param);
+ if (existing && mode == "updated") mode=existing;
+ if (state){
+ this.set_invalid(rowId,false); //clear previous error flag
+ this.updatedRows[ind]=rowId;
+ this.obj.setUserData(rowId,this.action_param,mode);
+ if (this._in_progress[rowId])
+ this._in_progress[rowId]="wait";
+ } else{
+ if (!this.is_invalid(rowId)){
+ this.updatedRows.splice(ind,1);
+ this.obj.setUserData(rowId,this.action_param,"");
+ }
+ }
+
+ //clear changed flag
+ if (!state)
+ this._clearUpdateFlag(rowId);
+
+ this.markRow(rowId,state,mode);
+ if (state && this.autoUpdate) this.sendData(rowId);
+ },
+ _clearUpdateFlag:function(id){},
+ markRow:function(id,state,mode){
+ var str="";
+ var invalid=this.is_invalid(id);
+ if (invalid){
+ str=this.styles[invalid];
+ state=true;
+ }
+ if (this.callEvent("onRowMark",[id,state,mode,invalid])){
+ //default logic
+ str=this.styles[state?mode:"clear"]+str;
+
+ this.obj[this._methods[0]](id,str);
+
+ if (invalid && invalid.details){
+ str+=this.styles[invalid+"_cell"];
+ for (var i=0; i < invalid.details.length; i++)
+ if (invalid.details[i])
+ this.obj[this._methods[1]](id,i,str);
+ }
+ }
+ },
+ getState:function(id){
+ return this.obj.getUserData(id,this.action_param);
+ },
+ is_invalid:function(id){
+ return this._invalid[id];
+ },
+ set_invalid:function(id,mode,details){
+ if (details) mode={value:mode, details:details, toString:function(){ return this.value.toString(); }};
+ this._invalid[id]=mode;
+ },
+ /**
+ * @desc: check mandatory fields and varify values of cells, initiate update (if specified)
+ * @param: rowId - id of row to set update-status for
+ * @type: public
+ */
+ checkBeforeUpdate:function(rowId){
+ return true;
+ },
+ /**
+ * @desc: send row(s) values to server
+ * @param: rowId - id of row which data to send. If not specified, then all "updated" rows will be send
+ * @type: public
+ */
+ sendData:function(rowId){
+ if (this._waitMode && (this.obj.mytype=="tree" || this.obj._h2)) return;
+ if (this.obj.editStop) this.obj.editStop();
+
+
+ if(typeof rowId == "undefined" || this._tSend) return this.sendAllData();
+ if (this._in_progress[rowId]) return false;
+
+ this.messages=[];
+ if (!this.checkBeforeUpdate(rowId) && this.callEvent("onValidatationError",[rowId,this.messages])) return false;
+ this._beforeSendData(this._getRowData(rowId),rowId);
+ },
+ _beforeSendData:function(data,rowId){
+ if (!this.callEvent("onBeforeUpdate",[rowId,this.getState(rowId),data])) return false;
+ this._sendData(data,rowId);
+ },
+ serialize:function(data, id){
+ if (typeof data == "string")
+ return data;
+ if (typeof id != "undefined")
+ return this.serialize_one(data,"");
+ else{
+ var stack = [];
+ var keys = [];
+ for (var key in data)
+ if (data.hasOwnProperty(key)){
+ stack.push(this.serialize_one(data[key],key+this.post_delim));
+ keys.push(key);
+ }
+ stack.push("ids="+this.escape(keys.join(",")));
+ if (dhtmlx.security_key)
+ stack.push("dhx_security="+dhtmlx.security_key);
+ return stack.join("&");
+ }
+ },
+ serialize_one:function(data, pref){
+ if (typeof data == "string")
+ return data;
+ var stack = [];
+ for (var key in data)
+ if (data.hasOwnProperty(key))
+ stack.push(this.escape((pref||"")+key)+"="+this.escape(data[key]));
+ return stack.join("&");
+ },
+ _sendData:function(a1,rowId){
+ if (!a1) return; //nothing to send
+ if (!this.callEvent("onBeforeDataSending",rowId?[rowId,this.getState(rowId),a1]:[null, null, a1])) return false;
+
+ if (rowId)
+ this._in_progress[rowId]=(new Date()).valueOf();
+ var a2=new dtmlXMLLoaderObject(this.afterUpdate,this,true);
+
+ var a3 = this.serverProcessor+(this._user?(getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+this.obj.getUserData(0,"version")].join("&")):"");
+
+ if (this._tMode!="POST")
+ a2.loadXML(a3+((a3.indexOf("?")!=-1)?"&":"?")+this.serialize(a1,rowId));
+ else
+ a2.loadXML(a3,true,this.serialize(a1,rowId));
+
+ this._waitMode++;
+ },
+ sendAllData:function(){
+ if (!this.updatedRows.length) return;
+
+ this.messages=[]; var valid=true;
+ for (var i=0; i<this.updatedRows.length; i++)
+ valid&=this.checkBeforeUpdate(this.updatedRows[i]);
+ if (!valid && !this.callEvent("onValidatationError",["",this.messages])) return false;
+
+ if (this._tSend)
+ this._sendData(this._getAllData());
+ else
+ for (var i=0; i<this.updatedRows.length; i++)
+ if (!this._in_progress[this.updatedRows[i]]){
+ if (this.is_invalid(this.updatedRows[i])) continue;
+ this._beforeSendData(this._getRowData(this.updatedRows[i]),this.updatedRows[i]);
+ if (this._waitMode && (this.obj.mytype=="tree" || this.obj._h2)) return; //block send all for tree
+ }
+ },
+
+
+
+
+
+
+
+
+ _getAllData:function(rowId){
+ var out={};
+ var has_one = false;
+ for(var i=0;i<this.updatedRows.length;i++){
+ var id=this.updatedRows[i];
+ if (this._in_progress[id] || this.is_invalid(id)) continue;
+ if (!this.callEvent("onBeforeUpdate",[id,this.getState(id)])) continue;
+ out[id]=this._getRowData(id,id+this.post_delim);
+ has_one = true;
+ this._in_progress[id]=(new Date()).valueOf();
+ }
+ return has_one?out:null;
+ },
+
+
+ /**
+ * @desc: specify column which value should be varified before sending to server
+ * @param: ind - column index (0 based)
+ * @param: verifFunction - function (object) which should verify cell value (if not specified, then value will be compared to empty string). Two arguments will be passed into it: value and column name
+ * @type: public
+ */
+ setVerificator:function(ind,verifFunction){
+ this.mandatoryFields[ind] = verifFunction||(function(value){return (value!="");});
+ },
+ /**
+ * @desc: remove column from list of those which should be verified
+ * @param: ind - column Index (0 based)
+ * @type: public
+ */
+ clearVerificator:function(ind){
+ this.mandatoryFields[ind] = false;
+ },
+
+
+
+
+
+ findRow:function(pattern){
+ var i=0;
+ for(i=0;i<this.updatedRows.length;i++)
+ if(pattern==this.updatedRows[i]) break;
+ return i;
+ },
+
+
+
+
+
+
+
+
+
+
+
+ /**
+ * @desc: define custom actions
+ * @param: name - name of action, same as value of action attribute
+ * @param: handler - custom function, which receives a XMl response content for action
+ * @type: private
+ */
+ defineAction:function(name,handler){
+ if (!this._uActions) this._uActions=[];
+ this._uActions[name]=handler;
+ },
+
+
+
+
+ /**
+* @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system
+* @param: sid - id of item before update
+* @param: tid - id of item after up0ate
+* @param: action - action name
+* @type: public
+* @topic: 0
+*/
+ afterUpdateCallback:function(sid, tid, action, btag) {
+ var marker = sid;
+ var correct=(action!="error" && action!="invalid");
+ if (!correct) this.set_invalid(sid,action);
+ if ((this._uActions)&&(this._uActions[action])&&(!this._uActions[action](btag)))
+ return (delete this._in_progress[marker]);
+
+ if (this._in_progress[marker]!="wait")
+ this.setUpdated(sid, false);
+
+ var soid = sid;
+
+ switch (action) {
+ case "update":
+ case "updated":
+ case "inserted":
+ case "insert":
+ if (tid != sid) {
+ this.obj[this._methods[2]](sid, tid);
+ sid = tid;
+ }
+ break;
+ case "delete":
+ case "deleted":
+ this.obj.setUserData(sid, this.action_param, "true_deleted");
+ this.obj[this._methods[3]](sid);
+ delete this._in_progress[marker];
+ return this.callEvent("onAfterUpdate", [sid, action, tid, btag]);
+ break;
+ }
+
+ if (this._in_progress[marker]!="wait"){
+ if (correct) this.obj.setUserData(sid, this.action_param,'');
+ delete this._in_progress[marker];
+ } else {
+ delete this._in_progress[marker];
+ this.setUpdated(tid,true,this.obj.getUserData(sid,this.action_param));
+ }
+
+ this.callEvent("onAfterUpdate", [sid, action, tid, btag]);
+ },
+
+ /**
+ * @desc: response from server
+ * @param: xml - XMLLoader object with response XML
+ * @type: private
+ */
+ afterUpdate:function(that,b,c,d,xml){
+ xml.getXMLTopNode("data"); //fix incorrect content type in IE
+ if (!xml.xmlDoc.responseXML) return;
+ var atag=xml.doXPath("//data/action");
+ for (var i=0; i<atag.length; i++){
+ var btag=atag[i];
+ var action = btag.getAttribute("type");
+ var sid = btag.getAttribute("sid");
+ var tid = btag.getAttribute("tid");
+
+ that.afterUpdateCallback(sid,tid,action,btag);
+ }
+ that.finalizeUpdate();
+ },
+ finalizeUpdate:function(){
+ if (this._waitMode) this._waitMode--;
+
+ if ((this.obj.mytype=="tree" || this.obj._h2) && this.updatedRows.length)
+ this.sendData();
+ this.callEvent("onAfterUpdateFinish",[]);
+ if (!this.updatedRows.length)
+ this.callEvent("onFullSync",[]);
+ },
+
+
+
+
+
+ /**
+ * @desc: initializes data-processor
+ * @param: anObj - dhtmlxGrid object to attach this data-processor to
+ * @type: public
+ */
+ init:function(anObj){
+ this.obj = anObj;
+ if (this.obj._dp_init)
+ this.obj._dp_init(this);
+ },
+
+
+ setOnAfterUpdate:function(ev){
+ this.attachEvent("onAfterUpdate",ev);
+ },
+ enableDebug:function(mode){
+ },
+ setOnBeforeUpdateHandler:function(func){
+ this.attachEvent("onBeforeDataSending",func);
+ },
+
+
+
+ /*! starts autoupdate mode
+ @param interval
+ time interval for sending update requests
+ */
+ setAutoUpdate: function(interval, user) {
+ interval = interval || 2000;
+
+ this._user = user || (new Date()).valueOf();
+ this._need_update = false;
+ this._loader = null;
+ this._update_busy = false;
+
+ this.attachEvent("onAfterUpdate",function(sid,action,tid,xml_node){
+ this.afterAutoUpdate(sid, action, tid, xml_node);
+ });
+ this.attachEvent("onFullSync",function(){
+ this.fullSync();
+ });
+
+ var self = this;
+ window.setInterval(function(){
+ self.loadUpdate();
+ }, interval);
+ },
+
+
+ /*! process updating request answer
+ if status == collision version is depricated
+ set flag for autoupdating immidiatly
+ */
+ afterAutoUpdate: function(sid, action, tid, xml_node) {
+ if (action == 'collision') {
+ this._need_update = true;
+ return false;
+ } else {
+ return true;
+ }
+ },
+
+
+ /*! callback function for onFillSync event
+ call update function if it's need
+ */
+ fullSync: function() {
+ if (this._need_update == true) {
+ this._need_update = false;
+ this.loadUpdate();
+ }
+ return true;
+ },
+
+
+ /*! sends query to the server and call callback function
+ */
+ getUpdates: function(url,callback){
+ if (this._update_busy)
+ return false;
+ else
+ this._update_busy = true;
+
+ this._loader = this._loader || new dtmlXMLLoaderObject(true);
+
+ this._loader.async=true;
+ this._loader.waitCall=callback;
+ this._loader.loadXML(url);
+ },
+
+
+ /*! returns xml node value
+ @param node
+ xml node
+ */
+ _v: function(node) {
+ if (node.firstChild) return node.firstChild.nodeValue;
+ return "";
+ },
+
+
+ /*! returns values array of xml nodes array
+ @param arr
+ array of xml nodes
+ */
+ _a: function(arr) {
+ var res = [];
+ for (var i=0; i < arr.length; i++) {
+ res[i]=this._v(arr[i]);
+ };
+ return res;
+ },
+
+
+ /*! loads updates and processes them
+ */
+ loadUpdate: function(){
+ var self = this;
+ var version = this.obj.getUserData(0,"version");
+ var url = this.serverProcessor+getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+version].join("&");
+ url = url.replace("editing=true&","");
+ this.getUpdates(url, function(){
+ var vers = self._loader.doXPath("//userdata");
+ self.obj.setUserData(0,"version",self._v(vers[0]));
+
+ var upds = self._loader.doXPath("//update");
+ if (upds.length){
+ self._silent_mode = true;
+
+ for (var i=0; i<upds.length; i++) {
+ var status = upds[i].getAttribute('status');
+ var id = upds[i].getAttribute('id');
+ var parent = upds[i].getAttribute('parent');
+ switch (status) {
+ case 'inserted':
+ self.callEvent("insertCallback",[upds[i], id, parent]);
+ break;
+ case 'updated':
+ self.callEvent("updateCallback",[upds[i], id, parent]);
+ break;
+ case 'deleted':
+ self.callEvent("deleteCallback",[upds[i], id, parent]);
+ break;
+ }
+ }
+
+ self._silent_mode = false;
+ }
+
+ self._update_busy = false;
+ self = null;
+ });
+ }
+
+};
+
+//(c)dhtmlx ltd. www.dhtmlx.com
+/*
+ dhx_sort[index]=direction
+ dhx_filter[index]=mask
+*/
+if (window.dhtmlXGridObject){
+ dhtmlXGridObject.prototype._init_point_connector=dhtmlXGridObject.prototype._init_point;
+ dhtmlXGridObject.prototype._init_point=function(){
+ var clear_url=function(url){
+ url=url.replace(/(\?|\&)connector[^\f]*/g,"");
+ return url+(url.indexOf("?")!=-1?"&":"?")+"connector=true"+(this.hdr.rows.length > 0 ? "&dhx_no_header=1":"");
+ };
+ var combine_urls=function(url){
+ return clear_url.call(this,url)+(this._connector_sorting||"")+(this._connector_filter||"");
+ };
+ var sorting_url=function(url,ind,dir){
+ this._connector_sorting="&dhx_sort["+ind+"]="+dir;
+ return combine_urls.call(this,url);
+ };
+ var filtering_url=function(url,inds,vals){
+ for (var i=0; i<inds.length; i++)
+ inds[i]="dhx_filter["+inds[i]+"]="+encodeURIComponent(vals[i]);
+ this._connector_filter="&"+inds.join("&");
+ return combine_urls.call(this,url);
+ };
+ this.attachEvent("onCollectValues",function(ind){
+ if (this._con_f_used[ind]){
+ if (typeof(this._con_f_used[ind]) == "object")
+ return this._con_f_used[ind];
+ else
+ return false;
+ }
+ return true;
+ });
+ this.attachEvent("onDynXLS",function(){
+ this.xmlFileUrl=combine_urls.call(this,this.xmlFileUrl);
+ return true;
+ });
+ this.attachEvent("onBeforeSorting",function(ind,type,dir){
+ if (type=="connector"){
+ var self=this;
+ this.clearAndLoad(sorting_url.call(this,this.xmlFileUrl,ind,dir),function(){
+ self.setSortImgState(true,ind,dir);
+ });
+ return false;
+ }
+ return true;
+ });
+ this.attachEvent("onFilterStart",function(a,b){
+ if (this._con_f_used.length){
+ this.clearAndLoad(filtering_url.call(this,this.xmlFileUrl,a,b));
+ return false;
+ }
+ return true;
+ });
+ this.attachEvent("onXLE",function(a,b,c,xml){
+ if (!xml) return;
+ });
+
+ if (this._init_point_connector) this._init_point_connector();
+ };
+ dhtmlXGridObject.prototype._con_f_used=[];
+ dhtmlXGridObject.prototype._in_header_connector_text_filter=function(t,i){
+ if (!this._con_f_used[i])
+ this._con_f_used[i]=1;
+ return this._in_header_text_filter(t,i);
+ };
+ dhtmlXGridObject.prototype._in_header_connector_select_filter=function(t,i){
+ if (!this._con_f_used[i])
+ this._con_f_used[i]=2;
+ return this._in_header_select_filter(t,i);
+ };
+ dhtmlXGridObject.prototype.load_connector=dhtmlXGridObject.prototype.load;
+ dhtmlXGridObject.prototype.load=function(url, call, type){
+ if (!this._colls_loaded && this.cellType){
+ var ar=[];
+ for (var i=0; i < this.cellType.length; i++)
+ if (this.cellType[i].indexOf("co")==0 || this._con_f_used[i]==2) ar.push(i);
+ if (ar.length)
+ arguments[0]+=(arguments[0].indexOf("?")!=-1?"&":"?")+"connector=true&dhx_colls="+ar.join(",");
+ }
+ return this.load_connector.apply(this,arguments);
+ };
+ dhtmlXGridObject.prototype._parseHead_connector=dhtmlXGridObject.prototype._parseHead;
+ dhtmlXGridObject.prototype._parseHead=function(url, call, type){
+ this._parseHead_connector.apply(this,arguments);
+ if (!this._colls_loaded){
+ var cols = this.xmlLoader.doXPath("./coll_options", arguments[0]);
+ for (var i=0; i < cols.length; i++){
+ var f = cols[i].getAttribute("for");
+ var v = [];
+ var combo=null;
+ if (this.cellType[f] == "combo")
+ combo = this.getColumnCombo(f);
+ if (this.cellType[f].indexOf("co")==0)
+ combo=this.getCombo(f);
+
+ var os = this.xmlLoader.doXPath("./item",cols[i]);
+ for (var j=0; j<os.length; j++){
+ var val=os[j].getAttribute("value");
+
+ if (combo){
+ var lab=os[j].getAttribute("label")||val;
+
+ if (combo.addOption)
+ combo.addOption([[val, lab]]);
+ else
+ combo.put(val,lab);
+
+ v[v.length]=lab;
+ } else
+ v[v.length]=val;
+ }
+ if (this._con_f_used[f*1])
+ this._con_f_used[f*1]=v;
+ }
+ this._colls_loaded=true;
+ }
+ };
+}
+
+if (window.dataProcessor){
+ dataProcessor.prototype.init_original=dataProcessor.prototype.init;
+ dataProcessor.prototype.init=function(obj){
+ this.init_original(obj);
+ obj._dataprocessor=this;
+
+ this.setTransactionMode("POST",true);
+ this.serverProcessor+=(this.serverProcessor.indexOf("?")!=-1?"&":"?")+"editing=true";
+ };
+}
+dhtmlxError.catchError("LoadXML",function(a,b,c){
+ if (c[0].status != 0) {
+ alert(c[0].responseText);
+ }
+});
+
+window.dhtmlXScheduler = window.scheduler = { version: "4.0.1" };
+dhtmlxEventable(scheduler);
+
+scheduler.init=function(id,date,mode){
+ date=date||(scheduler._currentDate());
+ mode=mode||"week";
+
+ //hook for terrace skin
+ if (this._skin_init)
+ scheduler._skin_init();
+
+ scheduler.date.init();
+
+ this._obj=(typeof id == "string")?document.getElementById(id):id;
+ this._els=[];
+ this._scroll=true;
+ this._quirks=(_isIE && document.compatMode == "BackCompat");
+ this._quirks7=(_isIE && navigator.appVersion.indexOf("MSIE 8")==-1);
+
+ this.get_elements();
+ this.init_templates();
+ this.set_actions();
+
+ (function(){
+ var oldSize = getWindowSize();
+ dhtmlxEvent(window,"resize",function(){
+ var newSize = getWindowSize();
+
+ // ie7-8 triggers "resize" when window's elements are resized, it messes container-autoresize extension
+ // check if it's actually resized
+ if(!equals(oldSize, newSize)){
+ window.clearTimeout(scheduler._resize_timer);
+ scheduler._resize_timer=window.setTimeout(function(){
+ if (scheduler.callEvent("onSchedulerResize",[])) {
+ scheduler.update_view();
+ scheduler.callEvent("onAfterSchedulerResize", []);
+ }
+ }, 100);
+ }
+ oldSize = newSize;
+
+ });
+ function getWindowSize(){
+ return {
+ w : window.innerWidth || document.documentElement.clientWidth,
+ h : window.innerHeight || document.documentElement.clientHeight
+ };
+ }
+ function equals(a,b){
+ return a.w == b.w && a.h == b.h;
+ }
+ })();
+ this._init_touch_events();
+ this.set_sizes();
+ scheduler.callEvent('onSchedulerReady', []);
+ this.setCurrentView(date,mode);
+};
+
+scheduler.xy={
+ min_event_height:40,
+ scale_width:50,
+ scroll_width:18,
+ scale_height:20,
+ month_scale_height:20,
+ menu_width:25,
+ margin_top:0,
+ margin_left:0,
+ editor_width:140
+};
+scheduler.keys={
+ edit_save:13,
+ edit_cancel:27
+};
+scheduler.set_sizes=function(){
+ var w = this._x = this._obj.clientWidth-this.xy.margin_left;
+ var h = this._y = this._obj.clientHeight-this.xy.margin_top;
+
+ //not-table mode always has scroll - need to be fixed in future
+ var scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);
+ var scale_s=this._table_view?-1:this.xy.scale_width;
+
+ this.set_xy(this._els["dhx_cal_navline"][0],w,this.xy.nav_height,0,0);
+ this.set_xy(this._els["dhx_cal_header"][0],w-scale_x,this.xy.scale_height,scale_s,this.xy.nav_height+(this._quirks?-1:1));
+ //to support alter-skin, we need a way to alter height directly from css
+ var actual_height = this._els["dhx_cal_navline"][0].offsetHeight;
+ if (actual_height > 0) this.xy.nav_height = actual_height;
+
+ var data_y=this.xy.scale_height+this.xy.nav_height+(this._quirks?-2:0);
+ this.set_xy(this._els["dhx_cal_data"][0],w,h-(data_y+2),0,data_y+2);
+};
+scheduler.set_xy=function(node,w,h,x,y){
+ node.style.width=Math.max(0,w)+"px";
+ node.style.height=Math.max(0,h)+"px";
+ if (arguments.length>3){
+ node.style.left=x+"px";
+ node.style.top=y+"px";
+ }
+};
+scheduler.get_elements=function(){
+ //get all child elements as named hash
+ var els=this._obj.getElementsByTagName("DIV");
+ for (var i=0; i < els.length; i++){
+ var name=els[i].className;
+ if (name) name = name.split(" ")[0];
+ if (!this._els[name]) this._els[name]=[];
+ this._els[name].push(els[i]);
+
+ //check if name need to be changed
+ var t=scheduler.locale.labels[els[i].getAttribute("name")||name];
+ if (t) els[i].innerHTML=t;
+ }
+};
+scheduler.set_actions=function(){
+ for (var a in this._els)
+ if (this._click[a])
+ for (var i=0; i < this._els[a].length; i++)
+ this._els[a][i].onclick=scheduler._click[a];
+ this._obj.onselectstart=function(e){ return false; };
+ this._obj.onmousemove=function(e){
+ if (!scheduler._temp_touch_block)
+ scheduler._on_mouse_move(e||event);
+ };
+ this._obj.onmousedown=function(e){
+ if (!scheduler._ignore_next_click)
+ scheduler._on_mouse_down(e||event);
+ };
+ this._obj.onmouseup=function(e){
+ if (!scheduler._ignore_next_click)
+ scheduler._on_mouse_up(e||event);
+ };
+ this._obj.ondblclick=function(e){
+ scheduler._on_dbl_click(e||event);
+ };
+ this._obj.oncontextmenu = function(e) {
+ var ev = e||event;
+ var src = ev.target||ev.srcElement;
+ var returnValue = scheduler.callEvent("onContextMenu", [scheduler._locate_event(src), ev]);
+ return returnValue;
+ };
+};
+scheduler.select=function(id){
+ if (this._select_id==id) return;
+ this.editStop(false);
+ this.unselect();
+ this._select_id = id;
+ this.updateEvent(id);
+};
+scheduler.unselect=function(id){
+ if (id && id!=this._select_id) return;
+ var t=this._select_id;
+ this._select_id = null;
+ if (t) this.updateEvent(t);
+};
+scheduler.getState=function(){
+ return {
+ mode: this._mode,
+ date: this._date,
+ min_date: this._min_date,
+ max_date: this._max_date,
+ editor_id: this._edit_id,
+ lightbox_id: this._lightbox_id,
+ new_event: this._new_event,
+ select_id: this._select_id,
+ expanded: this.expanded,
+ drag_id: this._drag_id,
+ drag_mode: this._drag_mode
+ };
+};
+scheduler._click={
+ dhx_cal_data:function(e){
+ //in case of touch disable click processing
+ if (scheduler._ignore_next_click){
+ if (e.preventDefault)
+ e.preventDefault();
+ e.cancelBubble = true;
+ return scheduler._ignore_next_click = false;
+ }
+
+ var trg = e?e.target:event.srcElement;
+ var id = scheduler._locate_event(trg);
+
+ e = e || event;
+
+ if (!id) {
+ scheduler.callEvent("onEmptyClick",[scheduler.getActionData(e).date, e]);
+ } else {
+ if ( !scheduler.callEvent("onClick",[id,e]) || scheduler.config.readonly ) return;
+ }
+
+ if (id && scheduler.config.select) {
+
+ scheduler.select(id);
+ var mask = trg.className;
+ if (mask.indexOf("_icon")!=-1)
+ scheduler._click.buttons[mask.split(" ")[1].replace("icon_","")](id);
+ } else
+ scheduler._close_not_saved();
+ },
+ dhx_cal_prev_button:function(){
+ scheduler._click.dhx_cal_next_button(0,-1);
+ },
+ dhx_cal_next_button:function(dummy,step){
+ scheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects
+ scheduler.date[scheduler._mode+"_start"](scheduler._date),(step||1),scheduler._mode));
+ },
+ dhx_cal_today_button:function(){
+ if (scheduler.callEvent("onBeforeTodayDisplayed", [])) {
+ scheduler.setCurrentView(scheduler._currentDate());
+ }
+ },
+ dhx_cal_tab:function(){
+ var name = this.getAttribute("name");
+ var mode = name.substring(0, name.search("_tab"));
+ scheduler.setCurrentView(scheduler._date,mode);
+ },
+ buttons:{
+ "delete":function(id){
+ var c = scheduler.locale.labels.confirm_deleting;
+ scheduler._dhtmlx_confirm(c, scheduler.locale.labels.title_confirm_deleting, function(){ scheduler.deleteEvent(id) });
+ },
+ edit:function(id){ scheduler.edit(id); },
+ save:function(id){ scheduler.editStop(true); },
+ details:function(id){ scheduler.showLightbox(id); },
+ cancel:function(id){ scheduler.editStop(false); }
+ }
+};
+scheduler._dhtmlx_confirm = function(message, title, callback) {
+ if (!message)
+ return callback();
+ var opts = { text: message };
+ if (title)
+ opts.title = title;
+ if (callback) {
+ opts.callback = function(result) {
+ if (result)
+ callback();
+ };
+ }
+ dhtmlx.confirm(opts);
+};
+scheduler.addEventNow=function(start,end,e){
+ var base = {};
+ if (start && start.constructor.toString().match(/object/i) !== null){
+ base = start;
+ start = null;
+ }
+
+ var d = (this.config.event_duration||this.config.time_step)*60000;
+ if (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/d)*d;
+ var start_date = new Date(start);
+ if (!end){
+ var start_hour = this.config.first_hour;
+ if (start_hour > start_date.getHours()){
+ start_date.setHours(start_hour);
+ start = start_date.valueOf();
+ }
+ end = start.valueOf()+d;
+ }
+ var end_date = new Date(end);
+
+ // scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)
+ if(start_date.valueOf() == end_date.valueOf())
+ end_date.setTime(end_date.valueOf()+d);
+
+ base.start_date = base.start_date||start_date;
+ base.end_date = base.end_date||end_date;
+ base.text = base.text||this.locale.labels.new_event;
+ base.id = this._drag_id = this.uid();
+ this._drag_mode="new-size";
+
+ this._loading=true;
+ this.addEvent(base);
+ this.callEvent("onEventCreated",[this._drag_id,e]);
+ this._loading=false;
+
+ this._drag_event={}; //dummy , to trigger correct event updating logic
+ this._on_mouse_up(e);
+};
+scheduler._on_dbl_click=function(e,src){
+ src = src||(e.target||e.srcElement);
+ if (this.config.readonly || !src.className) return;
+ var name = src.className.split(" ")[0];
+ switch(name){
+ case "dhx_scale_holder":
+ case "dhx_scale_holder_now":
+ case "dhx_month_body":
+ case "dhx_wa_day_data":
+ case "dhx_marked_timespan":
+ if (!scheduler.config.dblclick_create) break;
+ this.addEventNow(this.getActionData(e).date,null,e);
+ break;
+ case "dhx_cal_event":
+ case "dhx_wa_ev_body":
+ case "dhx_agenda_line":
+ case "dhx_grid_event":
+ case "dhx_cal_event_line":
+ case "dhx_cal_event_clear":
+ var id = this._locate_event(src);
+ if (!this.callEvent("onDblClick",[id,e])) return;
+ if (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)
+ this.showLightbox(id);
+ else
+ this.edit(id);
+ break;
+ case "dhx_time_block":
+ case "dhx_cal_container":
+ return;
+ break;
+ default:
+ var t = this["dblclick_"+name];
+ if (t) {
+ t.call(this,e);
+ }
+ else {
+ if (src.parentNode && src != this)
+ return scheduler._on_dbl_click(e,src.parentNode);
+ }
+ break;
+ }
+};
+
+scheduler._mouse_coords=function(ev){
+ var pos;
+ var b=document.body;
+ var d = document.documentElement;
+ if (!_isIE && (ev.pageX || ev.pageY))
+ pos={x:ev.pageX, y:ev.pageY};
+ else pos={
+ x:ev.clientX + (b.scrollLeft||d.scrollLeft||0) - b.clientLeft,
+ y:ev.clientY + (b.scrollTop||d.scrollTop||0) - b.clientTop
+ };
+
+ //apply layout
+ pos.x-=getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);
+ pos.y-=getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els["dhx_cal_data"][0].scrollTop;
+ pos.ev = ev;
+
+ var handler = this["mouse_"+this._mode];
+ if (handler)
+ return handler.call(this,pos);
+
+ if (this._cols){
+ var column = pos.x / this._cols[0];
+ if (this._ignores)
+ for (var i=0; i<=column; i++)
+ if (this._ignores[i])
+ column++;
+ }
+
+ //transform to date
+ if (!this._table_view) {
+ //"get position" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)
+ if(!this._cols) return pos;
+ pos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));
+
+ pos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);
+ } else {
+ if (!this._cols || !this._colsS) // agenda/map views
+ return pos;
+ var dy=0;
+ for (dy=1; dy < this._colsS.heights.length; dy++)
+ if (this._colsS.heights[dy]>pos.y) break;
+
+ pos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );
+
+ if (scheduler._drag_mode || this._mode == "month")
+ pos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;
+
+ //we care about ignored days only during event moving in month view
+ if (this._drag_mode == "move"){
+ if (scheduler._ignores_detected && scheduler.config.preserve_length){
+ pos._ignores = true;
+ //get real lengtn of event
+ if (!this._drag_event._event_length)
+ this._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:"day"});
+ }
+ }
+
+ pos.x=0;
+ }
+ return pos;
+};
+scheduler._close_not_saved=function(){
+ if (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){
+ var c=scheduler.locale.labels.confirm_closing;
+
+ scheduler._dhtmlx_confirm(c, scheduler.locale.labels.title_confirm_closing, function() { scheduler.editStop(scheduler.config.positive_closing); });
+ }
+};
+scheduler._correct_shift=function(start, back){
+ return start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);
+};
+scheduler._on_mouse_move=function(e){
+ if (this._drag_mode){
+ var pos=this._mouse_coords(e);
+ if (!this._drag_pos || pos.force_redraw || this._drag_pos.x!=pos.x || this._drag_pos.y!=pos.y ){
+ var start, end;
+ if (this._edit_id!=this._drag_id)
+ this._close_not_saved();
+
+ this._drag_pos=pos;
+
+ if (this._drag_mode=="create"){
+ this._close_not_saved();
+ this._loading=true; //will be ignored by dataprocessor
+
+ start = this._get_date_from_pos(pos).valueOf();
+
+ if (!this._drag_start) {
+ var res = this.callEvent("onBeforeEventCreated", [e, this._drag_id]);
+ if (!res)
+ return;
+
+
+ this._drag_start=start;
+ return;
+ }
+
+ end = start;
+ if (end == this._drag_start) {
+ }
+
+ var start_date = new Date(this._drag_start);
+ var end_date = new Date(end);
+ if ( (this._mode == "day" || this._mode == "week")
+ && (start_date.getHours() == end_date.getHours() && start_date.getMinutes() == end_date.getMinutes()) ) {
+ end_date = new Date(this._drag_start+1000);
+ }
+
+
+ this._drag_id=this.uid();
+ this.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);
+
+ this.callEvent("onEventCreated",[this._drag_id,e]);
+ this._loading=false;
+ this._drag_mode="new-size";
+
+ }
+
+ var ev=this.getEvent(this._drag_id);
+
+ if (this._drag_mode=="move"){
+ start = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60 -(scheduler._move_pos_shift||0) )*60000;
+ if (!pos.custom && this._table_view) start+=this.date.time_part(ev.start_date)*1000;
+ start = this._correct_shift(start);
+
+ if (pos._ignores && this.config.preserve_length && this._table_view){
+ if (this.matrix)
+ var obj = this.matrix[this._mode];
+ obj = obj || { x_step:1, x_unit:"day" };
+ end = start*1 + this._get_fictional_event_length(start, this._drag_event._event_length, obj);
+ } else
+ end = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);
+ } else { // resize
+ start = ev.start_date.valueOf();
+ end = ev.end_date.valueOf();
+ if (this._table_view) {
+ var resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);
+ if (this._mode == "month")
+ resize_date = this._correct_shift(resize_date, false);
+
+ if (pos.resize_from_start)
+ start = resize_date;
+ else
+ end = resize_date;
+ } else {
+ end = this.date.date_part(new Date(ev.end_date)).valueOf()+pos.y*this.config.time_step*60000;
+ this._els["dhx_cal_data"][0].style.cursor="s-resize";
+ if (this._mode == "week" || this._mode == "day")
+ end = this._correct_shift(end);
+ }
+ if (this._drag_mode == "new-size") {
+ if (end <= this._drag_start){
+ var shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);
+ start = end-(pos.shift?0:shift);
+ end = this._drag_start+(shift||(this.config.time_step*60000));
+ } else {
+ start = this._drag_start;
+ }
+ } else {
+ if (end<=start)
+ end=start+this.config.time_step*60000;
+ }
+ }
+ var new_end = new Date(end-1);
+ var new_start = new Date(start);
+ //prevent out-of-borders situation for day|week view
+ if ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()<this.config.last_hour) || scheduler._allow_dnd ){
+ ev.start_date=new_start;
+ ev.end_date=new Date(end);
+ if (this.config.update_render){
+ //fix for repaint after dnd and scroll issue, #231
+ var sx = scheduler._els["dhx_cal_data"][0].scrollTop;
+ this.update_view();
+ scheduler._els["dhx_cal_data"][0].scrollTop = sx;
+ } else
+ this.updateEvent(this._drag_id);
+ }
+ if (this._table_view) {
+ this.for_rendered(this._drag_id,function(r){
+ r.className+=" dhx_in_move";
+ });
+ }
+ }
+ } else {
+ if (scheduler.checkEvent("onMouseMove")){
+ var id = this._locate_event(e.target||e.srcElement);
+ this.callEvent("onMouseMove",[id,e]);
+ }
+ }
+};
+scheduler._on_mouse_down=function(e,src) {
+ // on Mac we do not get onmouseup event when clicking right mouse button leaving us in dnd state
+ // let's ignore right mouse button then
+ if (e.button == 2)
+ return;
+
+ if (this.config.readonly || this._drag_mode) return;
+ src = src||(e.target||e.srcElement);
+ var classname = src.className && src.className.split(" ")[0];
+
+ switch (classname) {
+ case "dhx_cal_event_line":
+ case "dhx_cal_event_clear":
+ if (this._table_view)
+ this._drag_mode="move"; //item in table mode
+ break;
+ case "dhx_event_move":
+ case "dhx_wa_ev_body":
+ this._drag_mode="move";
+ break;
+ case "dhx_event_resize":
+ this._drag_mode="resize";
+ break;
+ case "dhx_scale_holder":
+ case "dhx_scale_holder_now":
+ case "dhx_month_body":
+ case "dhx_matrix_cell":
+ case "dhx_marked_timespan":
+ this._drag_mode="create";
+ this.unselect(this._select_id);
+ break;
+ case "":
+ if (src.parentNode)
+ return scheduler._on_mouse_down(e,src.parentNode);
+ default:
+ if (scheduler.checkEvent("onMouseDown") && scheduler.callEvent("onMouseDown", [classname])) {
+ if (src.parentNode && src != this) {
+ return scheduler._on_mouse_down(e,src.parentNode);
+ }
+ }
+ this._drag_mode=null;
+ this._drag_id=null;
+ break;
+ }
+ if (this._drag_mode){
+ var id = this._locate_event(src);
+ if (!this.config["drag_"+this._drag_mode] || !this.callEvent("onBeforeDrag",[id, this._drag_mode, e]))
+ this._drag_mode=this._drag_id=0;
+ else {
+ this._drag_id= id;
+ this._drag_event = scheduler._lame_clone(this.getEvent(this._drag_id) || {});
+ }
+ }
+ this._drag_start=null;
+};
+scheduler._on_mouse_up=function(e){
+ if (e && e.button == 2 && scheduler.config.touch) return;
+ if (this._drag_mode && this._drag_id){
+ this._els["dhx_cal_data"][0].style.cursor="default";
+ //drop
+ var ev=this.getEvent(this._drag_id);
+ if (this._drag_event._dhx_changed || !this._drag_event.start_date || ev.start_date.valueOf()!=this._drag_event.start_date.valueOf() || ev.end_date.valueOf()!=this._drag_event.end_date.valueOf()){
+ var is_new=(this._drag_mode=="new-size");
+ if (!this.callEvent("onBeforeEventChanged",[ev, e, is_new, this._drag_event])){
+ if (is_new)
+ this.deleteEvent(ev.id, true);
+ else {
+ this._drag_event._dhx_changed = false;
+ scheduler._lame_copy(ev, this._drag_event);
+ this.updateEvent(ev.id);
+ }
+ } else {
+ var drag_id = this._drag_id;
+ this._drag_id = this._drag_mode = null;
+ if (is_new && this.config.edit_on_create){
+ this.unselect();
+ this._new_event=new Date();//timestamp of creation
+ //if selection disabled - force lightbox usage
+ if (this._table_view || this.config.details_on_create || !this.config.select) {
+ return this.showLightbox(drag_id);
+ }
+ this._drag_pos = true; //set flag to trigger full redraw
+ this._select_id = this._edit_id = drag_id;
+ } else {
+ if (!this._new_event)
+ this.callEvent(is_new?"onEventAdded":"onEventChanged",[drag_id,this.getEvent(drag_id)]);
+ }
+ }
+ }
+ if (this._drag_pos) this.render_view_data(); //redraw even if there is no real changes - necessary for correct positioning item after drag
+ }
+ this._drag_id = null;
+ this._drag_mode=null;
+ this._drag_pos=null;
+};
+scheduler.update_view=function(){
+ this._reset_scale();
+ if (this._load_mode && this._load()) return this._render_wait = true;
+ this.render_view_data();
+};
+
+scheduler.isViewExists = function(mode){
+ return !!(scheduler[mode+ "_view"] ||
+ (scheduler.date[mode+ "_start"] && scheduler.templates[mode+ "_date"] && scheduler.templates[mode+ "_scale_date"]));
+};
+
+scheduler.updateView = function(date, mode) {
+ date = date || this._date;
+ mode = mode || this._mode;
+ var dhx_cal_data = 'dhx_cal_data';
+
+ if (!this._mode)
+ this._obj.className += " dhx_scheduler_" + mode; else {
+ this._obj.className = this._obj.className.replace("dhx_scheduler_" + this._mode, "dhx_scheduler_" + mode);
+ }
+
+ var prev_scroll = (this._mode == mode && this.config.preserve_scroll) ? this._els[dhx_cal_data][0].scrollTop : false; // saving current scroll
+
+ //hide old custom view
+ if (this[this._mode + "_view"] && mode && this._mode != mode)
+ this[this._mode + "_view"](false);
+
+ this._close_not_saved();
+
+ var dhx_multi_day = 'dhx_multi_day';
+ if (this._els[dhx_multi_day]) {
+ this._els[dhx_multi_day][0].parentNode.removeChild(this._els[dhx_multi_day][0]);
+ this._els[dhx_multi_day] = null;
+ }
+
+ this._mode = mode;
+ this._date = date;
+ this._table_view = (this._mode == "month");
+
+ var tabs = this._els["dhx_cal_tab"];
+ if(tabs){//calendar can work without view tabs
+ for (var i = 0; i < tabs.length; i++) {
+ var name = tabs[i].className;
+ name = name.replace(/ active/g, "");
+ if (tabs[i].getAttribute("name") == this._mode + "_tab")
+ name = name + " active";
+ tabs[i].className = name;
+ }
+ }
+ //show new view
+ var view = this[this._mode + "_view"];
+ view ? view(true) : this.update_view();
+
+ if (typeof prev_scroll == "number") // if we are updating or working with the same view scrollTop should be saved
+ this._els[dhx_cal_data][0].scrollTop = prev_scroll; // restoring original scroll
+};
+scheduler.setCurrentView = function(date, mode) {
+ if (!this.callEvent("onBeforeViewChange", [this._mode, this._date, mode || this._mode, date || this._date])) return;
+ this.updateView(date, mode);
+ this.callEvent("onViewChange", [this._mode, this._date]);
+};
+scheduler._render_x_header = function(i,left,d,h){
+ //header scale
+ var head=document.createElement("DIV");
+ head.className = "dhx_scale_bar";
+
+ if(this.templates[this._mode+"_scalex_class"]){
+ //'_scalex_class' - timeline already have similar template, use the same name
+ head.className += ' ' + this.templates[this._mode+"_scalex_class"](d);
+ }
+
+ var width = this._cols[i]-1;
+
+ if (this._mode == "month" && i === 0 && this.config.left_border) {
+ head.className += " dhx_scale_bar_border";
+ left = left+1;
+ }
+ this.set_xy(head, width, this.xy.scale_height-2, left, 0);//-1 for border
+ head.innerHTML=this.templates[this._mode+"_scale_date"](d,this._mode); //TODO - move in separate method
+ h.appendChild(head);
+};
+scheduler._reset_scale=function(){
+ //current mode doesn't support scales
+ //we mustn't call reset_scale for such modes, so it just to be sure
+ if (!this.templates[this._mode + "_date"]) return;
+
+ var h = this._els["dhx_cal_header"][0];
+ var b = this._els["dhx_cal_data"][0];
+ var c = this.config;
+
+ h.innerHTML = "";
+ b.scrollTop = 0; //fix flickering in FF
+ b.innerHTML = "";
+
+ var str = ((c.readonly || (!c.drag_resize)) ? " dhx_resize_denied" : "") + ((c.readonly || (!c.drag_move)) ? " dhx_move_denied" : "");
+ if (str) b.className = "dhx_cal_data" + str;
+
+ this._scales = {};
+ this._cols = []; //store for data section
+ this._colsS = {height: 0};
+ this._dy_shift = 0;
+
+ this.set_sizes();
+ var summ=parseInt(h.style.width,10); //border delta
+ var left=0;
+
+ var d,dd,sd,today;
+ dd=this.date[this._mode+"_start"](new Date(this._date.valueOf()));
+ d=sd=this._table_view?scheduler.date.week_start(dd):dd;
+ today=this.date.date_part( scheduler._currentDate());
+
+ //reset date in header
+ var ed=scheduler.date.add(dd,1,this._mode);
+ var count = 7;
+
+ if (!this._table_view){
+ var count_n = this.date["get_"+this._mode+"_end"];
+ if (count_n) ed = count_n(dd);
+ count = Math.round((ed.valueOf()-dd.valueOf())/(1000*60*60*24));
+ }
+
+ this._min_date=d;
+ this._els["dhx_cal_date"][0].innerHTML=this.templates[this._mode+"_date"](dd,ed,this._mode);
+
+
+ this._process_ignores(sd, count, "day", 1);
+ var realcount = count - this._ignores_detected;
+
+ for (var i=0; i<count; i++){
+ if (this._ignores[i]){
+ this._cols[i] = 0;
+ realcount++;
+ } else {
+ this._cols[i]=Math.floor(summ/(realcount-i));
+ this._render_x_header(i,left,d,h);
+ }
+ if (!this._table_view){
+ var scales=document.createElement("DIV");
+ var cls = "dhx_scale_holder";
+ if (d.valueOf()==today.valueOf()) cls = "dhx_scale_holder_now";
+ scales.className=cls+" "+this.templates.week_date_class(d,today);
+ this.set_xy(scales,this._cols[i]-1,c.hour_size_px*(c.last_hour-c.first_hour),left+this.xy.scale_width+1,0);//-1 for border
+ b.appendChild(scales);
+ this.callEvent("onScaleAdd",[scales, d]);
+ }
+
+ d=this.date.add(d,1,"day");
+ summ-=this._cols[i];
+ left+=this._cols[i];
+ this._colsS[i]=(this._cols[i-1]||0)+(this._colsS[i-1]||(this._table_view?0:this.xy.scale_width+2));
+ this._colsS['col_length'] = count+1;
+ }
+
+ this._max_date=d;
+ this._colsS[count]=this._cols[count-1]+this._colsS[count-1];
+
+ if (this._table_view) // month view
+ this._reset_month_scale(b,dd,sd);
+ else{
+ this._reset_hours_scale(b,dd,sd);
+ if (c.multi_day) {
+ var dhx_multi_day = 'dhx_multi_day';
+
+ if(this._els[dhx_multi_day]) {
+ this._els[dhx_multi_day][0].parentNode.removeChild(this._els[dhx_multi_day][0]);
+ this._els[dhx_multi_day] = null;
+ }
+
+ var navline = this._els["dhx_cal_navline"][0];
+ var top = navline.offsetHeight + this._els["dhx_cal_header"][0].offsetHeight+1;
+
+ var c1 = document.createElement("DIV");
+ c1.className = dhx_multi_day;
+ c1.style.visibility="hidden";
+ this.set_xy(c1, this._colsS[this._colsS.col_length-1]+this.xy.scroll_width, 0, 0, top); // 2 extra borders, dhx_header has -1 bottom margin
+ b.parentNode.insertBefore(c1,b);
+
+ var c2 = c1.cloneNode(true);
+ c2.className = dhx_multi_day+"_icon";
+ c2.style.visibility="hidden";
+ this.set_xy(c2, this.xy.scale_width, 0, 0, top); // dhx_header has -1 bottom margin
+
+ c1.appendChild(c2);
+ this._els[dhx_multi_day]=[c1,c2];
+ this._els[dhx_multi_day][0].onclick = this._click.dhx_cal_data;
+ }
+ }
+};
+scheduler._reset_hours_scale=function(b,dd,sd){
+ var c=document.createElement("DIV");
+ c.className="dhx_scale_holder";
+
+ var date = new Date(1980,1,1,this.config.first_hour,0,0);
+ for (var i=this.config.first_hour*1; i < this.config.last_hour; i++) {
+ var cc=document.createElement("DIV");
+ cc.className="dhx_scale_hour";
+ cc.style.height=this.config.hour_size_px-(this._quirks?0:1)+"px";
+ var width = this.xy.scale_width;
+ if (this.config.left_border) {
+ width = width - 1;
+ cc.className += " dhx_scale_hour_border";
+ }
+ cc.style.width = width + "px";
+ cc.innerHTML=scheduler.templates.hour_scale(date);
+
+ c.appendChild(cc);
+ date=this.date.add(date,1,"hour");
+ }
+ b.appendChild(c);
+ if (this.config.scroll_hour)
+ b.scrollTop = this.config.hour_size_px*(this.config.scroll_hour-this.config.first_hour);
+};
+
+scheduler._currentDate = function(){
+ if(scheduler.config.now_date){
+ return new Date(scheduler.config.now_date);
+ }
+ return new Date();
+};
+
+scheduler._process_ignores = function(sd, n, mode, step, preserve){
+ this._ignores=[];
+ this._ignores_detected = 0;
+ var ignore = scheduler["ignore_"+this._mode];
+
+ if (ignore){
+ var ign_date = new Date(sd);
+ for (var i=0; i<n; i++){
+ if (ignore(ign_date)){
+ this._ignores_detected += 1;
+ this._ignores[i] = true;
+ if (preserve)
+ n++;
+ }
+ ign_date = scheduler.date.add(ign_date, step, mode);
+ }
+ }
+};
+
+scheduler._reset_month_scale=function(b,dd,sd){
+ var ed=scheduler.date.add(dd,1,"month");
+
+ //trim time part for comparation reasons
+ var cd = scheduler._currentDate();
+ this.date.date_part(cd);
+ this.date.date_part(sd);
+
+ var rows=Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);
+ var tdcss=[];
+ var height=(Math.floor(b.clientHeight/rows)-22);
+
+ this._colsS.height=height+22;
+
+
+
+ var h = this._colsS.heights = [];
+ for (var i=0; i<=7; i++) {
+ var cell_width = ((this._cols[i]||0)-1);
+ if (i === 0 && this.config.left_border) {
+ cell_width = cell_width - 1;
+ }
+ tdcss[i]=" style='height:"+height+"px; width:"+cell_width+"px;' ";
+ }
+
+
+
+ var cellheight = 0;
+ this._min_date=sd;
+ var html="<table cellpadding='0' cellspacing='0'>";
+ var rendered_dates = [];
+ for (var i=0; i<rows; i++){
+ html+="<tr>";
+
+ for (var j=0; j<7; j++) {
+ html+="<td";
+
+ var cls = "";
+ if (sd<dd)
+ cls='dhx_before';
+ else if (sd>=ed)
+ cls='dhx_after';
+ else if (sd.valueOf()==cd.valueOf())
+ cls='dhx_now';
+ html+=" class='"+cls+" "+this.templates.month_date_class(sd,cd)+"' >";
+ var body_class = "dhx_month_body";
+ var head_class = "dhx_month_head";
+ if (j === 0 && this.config.left_border) {
+ body_class += " dhx_month_body_border";
+ head_class += " dhx_month_head_border";
+ }
+ if (!this._ignores_detected || !this._ignores[j]){
+ html+="<div class='"+head_class+"'>"+this.templates.month_day(sd)+"</div>";
+ html+="<div class='"+body_class+"' "+tdcss[j]+"></div></td>";
+ } else {
+ html+="<div></div><div></div>";
+ }
+ rendered_dates.push(sd);
+ sd=this.date.add(sd,1,"day");
+ }
+ html+="</tr>";
+ h[i] = cellheight;
+ cellheight+=this._colsS.height;
+ }
+ html+="</table>";
+ this._max_date=sd;
+
+ b.innerHTML=html;
+
+ this._scales = {};
+ var divs = b.getElementsByTagName('div');
+ for (var i=0; i<rendered_dates.length; i++) { // [header, body, header, body, ...]
+ var div = divs[(i*2)+1];
+ var date = rendered_dates[i];
+ this._scales[+date] = div;
+ }
+ for (var i=0; i<rendered_dates.length; i++) {
+ var date = rendered_dates[i];
+ this.callEvent("onScaleAdd", [this._scales[+date], date]);
+ }
+
+ return sd;
+};
+scheduler.getLabel = function(property, key) {
+ var sections = this.config.lightbox.sections;
+ for (var i=0; i<sections.length; i++) {
+ if(sections[i].map_to == property) {
+ var options = sections[i].options;
+ for (var j=0; j<options.length; j++) {
+ if(options[j].key == key) {
+ return options[j].label;
+ }
+ }
+ }
+ }
+ return "";
+};
+scheduler.updateCollection = function(list_name, collection) {
+ var list = scheduler.serverList(list_name);
+ if (!list) return false;
+ list.splice(0, list.length);
+ list.push.apply(list, collection || []);
+ scheduler.callEvent("onOptionsLoad", []);
+ scheduler.resetLightbox();
+ return true;
+};
+scheduler._lame_clone = function(object, cache) {
+ var i, t, result; // iterator, types array, result
+
+ cache = cache || [];
+
+ for (i=0; i<cache.length; i+=2)
+ if(object === cache[i])
+ return cache[i+1];
+
+ if (object && typeof object == "object") {
+ result = {};
+ t = [Array,Date,Number,String,Boolean];
+ for (i=0; i<t.length; i++) {
+ if (object instanceof t[i])
+ result = i ? new t[i](object) : new t[i](); // first one is array
+ }
+ cache.push(object, result);
+ for (i in object) {
+ if (Object.prototype.hasOwnProperty.apply(object, [i]))
+ result[i] = scheduler._lame_clone(object[i], cache)
+ }
+ }
+ return result || object;
+};
+scheduler._lame_copy = function(target, source) {
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ target[key] = source[key];
+ }
+ }
+ return target;
+};
+scheduler._get_date_from_pos = function(pos) {
+ var start=this._min_date.valueOf()+(pos.y*this.config.time_step+(this._table_view?0:pos.x)*24*60)*60000;
+ return new Date(this._correct_shift(start));
+};
+// n_ev - native event
+scheduler.getActionData = function(n_ev) {
+ var pos = this._mouse_coords(n_ev);
+ return {
+ date:this._get_date_from_pos(pos),
+ section:pos.section
+ };
+};
+scheduler._focus = function(node, select){
+ if (node && node.focus){
+ if (this.config.touch){
+ window.setTimeout(function(){
+ node.focus();
+ },100);
+ } else {
+ if (select && node.select) node.select();
+ node.focus();
+ }
+ }
+}
+
+//non-linear scales
+scheduler._get_real_event_length=function(sd, fd, obj){
+ var ev_length = fd -sd;
+ var hours = (obj._start_correction + obj._end_correction)||0;
+ var ignore = this["ignore_"+this._mode];
+
+ var start_slot = 0;
+ if (obj.render){
+ start_slot = this._get_date_index(obj, sd);
+ var end_slot = this._get_date_index(obj, fd);
+ } else{
+ var end_slot = Math.round(ev_length/60/60/1000/24);
+ }
+
+ while (start_slot < end_slot){
+ var check = scheduler.date.add(fd, -obj.x_step, obj.x_unit);
+ if (ignore && ignore(fd))
+ ev_length -= (fd-check);
+ else
+ ev_length -= hours;
+
+ fd = check;
+ end_slot--;
+ }
+ return ev_length;
+};
+scheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){
+ var sd = new Date(end_date);
+ var dir = back ? -1 : 1;
+
+ //get difference caused by first|last hour
+ if (obj._start_correction || obj._end_correction){
+ if (back)
+ var today = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;
+ else
+ var today = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());
+ var per_day = (obj.last_hour - obj.first_hour)*60;
+ var days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);
+ ev_length += days * (24*60 - per_day) * 60 * 1000;
+ }
+
+ var fd = new Date(end_date*1+ev_length*dir);
+ var ignore = this["ignore_"+this._mode];
+
+ var start_slot = 0;
+ if (obj.render){
+ start_slot = this._get_date_index(obj, sd);
+ var end_slot = this._get_date_index(obj, fd);
+ } else{
+ var end_slot = Math.round(ev_length/60/60/1000/24);
+ }
+
+ while (start_slot*dir <= end_slot*dir){
+ var check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);
+ if (ignore && ignore(sd)){
+ ev_length += (check-sd)*dir;
+ end_slot += dir;
+ }
+
+ sd = check;
+ start_slot+=dir;
+ }
+
+ return ev_length;
+};
+
+scheduler.date={
+ init:function(){
+ var s = scheduler.locale.date.month_short;
+ var t = scheduler.locale.date.month_short_hash = {};
+ for (var i = 0; i < s.length; i++)
+ t[s[i]]=i;
+
+ var s = scheduler.locale.date.month_full;
+ var t = scheduler.locale.date.month_full_hash = {};
+ for (var i = 0; i < s.length; i++)
+ t[s[i]]=i;
+ },
+ date_part:function(date){
+ date.setHours(0);
+ date.setMinutes(0);
+ date.setSeconds(0);
+ date.setMilliseconds(0);
+ if (date.getHours() != 0)
+ date.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));
+ return date;
+ },
+ time_part:function(date){
+ return (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;
+ },
+ week_start:function(date){
+ var shift=date.getDay();
+ if (scheduler.config.start_on_monday){
+ if (shift===0) shift=6;
+ else shift--;
+ }
+ return this.date_part(this.add(date,-1*shift,"day"));
+ },
+ month_start:function(date){
+ date.setDate(1);
+ return this.date_part(date);
+ },
+ year_start:function(date){
+ date.setMonth(0);
+ return this.month_start(date);
+ },
+ day_start:function(date){
+ return this.date_part(date);
+ },
+ add:function(date,inc,mode){
+ var ndate=new Date(date.valueOf());
+ switch(mode){
+ case "week":
+ inc *= 7;
+ case "day":
+ ndate.setDate(ndate.getDate() + inc);
+ if (!date.getHours() && ndate.getHours()) //shift to yesterday
+ ndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));
+ break;
+ case "month": ndate.setMonth(ndate.getMonth()+inc); break;
+ case "year": ndate.setYear(ndate.getFullYear()+inc); break;
+ case "hour": ndate.setHours(ndate.getHours()+inc); break;
+ case "minute": ndate.setMinutes(ndate.getMinutes()+inc); break;
+ default:
+ return scheduler.date["add_"+mode](date,inc,mode);
+ }
+ return ndate;
+ },
+ to_fixed:function(num){
+ if (num<10) return "0"+num;
+ return num;
+ },
+ copy:function(date){
+ return new Date(date.valueOf());
+ },
+ date_to_str:function(format,utc){
+ format=format.replace(/%[a-zA-Z]/g,function(a){
+ switch(a){
+ case "%d": return "\"+scheduler.date.to_fixed(date.getDate())+\"";
+ case "%m": return "\"+scheduler.date.to_fixed((date.getMonth()+1))+\"";
+ case "%j": return "\"+date.getDate()+\"";
+ case "%n": return "\"+(date.getMonth()+1)+\"";
+ case "%y": return "\"+scheduler.date.to_fixed(date.getFullYear()%100)+\"";
+ case "%Y": return "\"+date.getFullYear()+\"";
+ case "%D": return "\"+scheduler.locale.date.day_short[date.getDay()]+\"";
+ case "%l": return "\"+scheduler.locale.date.day_full[date.getDay()]+\"";
+ case "%M": return "\"+scheduler.locale.date.month_short[date.getMonth()]+\"";
+ case "%F": return "\"+scheduler.locale.date.month_full[date.getMonth()]+\"";
+ case "%h": return "\"+scheduler.date.to_fixed((date.getHours()+11)%12+1)+\"";
+ case "%g": return "\"+((date.getHours()+11)%12+1)+\"";
+ case "%G": return "\"+date.getHours()+\"";
+ case "%H": return "\"+scheduler.date.to_fixed(date.getHours())+\"";
+ case "%i": return "\"+scheduler.date.to_fixed(date.getMinutes())+\"";
+ case "%a": return "\"+(date.getHours()>11?\"pm\":\"am\")+\"";
+ case "%A": return "\"+(date.getHours()>11?\"PM\":\"AM\")+\"";
+ case "%s": return "\"+scheduler.date.to_fixed(date.getSeconds())+\"";
+ case "%W": return "\"+scheduler.date.to_fixed(scheduler.date.getISOWeek(date))+\"";
+ default: return a;
+ }
+ });
+ if (utc) format=format.replace(/date\.get/g,"date.getUTC");
+ return new Function("date","return \""+format+"\";");
+ },
+ str_to_date:function(format,utc){
+ var splt="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);";
+ var mask=format.match(/%[a-zA-Z]/g);
+ for (var i=0; i<mask.length; i++){
+ switch(mask[i]){
+ case "%j":
+ case "%d": splt+="set[2]=temp["+i+"]||1;";
+ break;
+ case "%n":
+ case "%m": splt+="set[1]=(temp["+i+"]||1)-1;";
+ break;
+ case "%y": splt+="set[0]=temp["+i+"]*1+(temp["+i+"]>50?1900:2000);";
+ break;
+ case "%g":
+ case "%G":
+ case "%h":
+ case "%H":
+ splt+="set[3]=temp["+i+"]||0;";
+ break;
+ case "%i":
+ splt+="set[4]=temp["+i+"]||0;";
+ break;
+ case "%Y": splt+="set[0]=temp["+i+"]||0;";
+ break;
+ case "%a":
+ case "%A": splt+="set[3]=set[3]%12+((temp["+i+"]||'').toLowerCase()=='am'?0:12);";
+ break;
+ case "%s": splt+="set[5]=temp["+i+"]||0;";
+ break;
+ case "%M": splt+="set[1]=scheduler.locale.date.month_short_hash[temp["+i+"]]||0;";
+ break;
+ case "%F": splt+="set[1]=scheduler.locale.date.month_full_hash[temp["+i+"]]||0;";
+ break;
+ default:
+ break;
+ }
+ }
+ var code ="set[0],set[1],set[2],set[3],set[4],set[5]";
+ if (utc) code =" Date.UTC("+code+")";
+ return new Function("date","var set=[0,0,1,0,0,0]; "+splt+" return new Date("+code+");");
+ },
+ getISOWeek: function(ndate) {
+ if(!ndate) return false;
+ var nday = ndate.getDay();
+ if (nday === 0) {
+ nday = 7;
+ }
+ var first_thursday = new Date(ndate.valueOf());
+ first_thursday.setDate(ndate.getDate() + (4 - nday));
+ var year_number = first_thursday.getFullYear(); // year of the first Thursday
+ var ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)
+ var week_number = 1 + Math.floor( ordinal_date / 7);
+ return week_number;
+ },
+ getUTCISOWeek: function(ndate){
+ return this.getISOWeek(this.convert_to_utc(ndate));
+ },
+ convert_to_utc: function(date) {
+ return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
+ }
+};
+scheduler.locale = {
+ date:{
+ month_full:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ month_short:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ day_full:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ day_short:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+ },
+ labels:{
+ dhx_cal_today_button:"Today",
+ day_tab:"Day",
+ week_tab:"Week",
+ month_tab:"Month",
+ new_event:"New event",
+ icon_save:"Save",
+ icon_cancel:"Cancel",
+ icon_details:"Details",
+ icon_edit:"Edit",
+ icon_delete:"Delete",
+ confirm_closing:"",//Your changes will be lost, are your sure ?
+ confirm_deleting:"Event will be deleted permanently, are you sure?",
+ section_description:"Description",
+ section_time:"Time period",
+ full_day:"Full day",
+
+ /*recurring events*/
+ confirm_recurring:"Do you want to edit the whole set of repeated events?",
+ section_recurring:"Repeat event",
+ button_recurring:"Disabled",
+ button_recurring_open:"Enabled",
+ button_edit_series: "Edit series",
+ button_edit_occurrence: "Edit occurrence",
+
+ /*agenda view extension*/
+ agenda_tab:"Agenda",
+ date:"Date",
+ description:"Description",
+
+ /*year view extension*/
+ year_tab:"Year",
+
+ /* week agenda extension */
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Grid",
+ drag_to_create:"Drag to create",
+ drag_to_move:"Drag to move"
+ }
+};
+
+
+/*
+%e Day of the month without leading zeros (01..31)
+%d Day of the month, 2 digits with leading zeros (01..31)
+%j Day of the year, 3 digits with leading zeros (001..366)
+%a A textual representation of a day, two letters
+%W A full textual representation of the day of the week
+
+%c Numeric representation of a month, without leading zeros (0..12)
+%m Numeric representation of a month, with leading zeros (00..12)
+%b A short textual representation of a month, three letters (Jan..Dec)
+%M A full textual representation of a month, such as January or March (January..December)
+
+%y A two digit representation of a year (93..03)
+%Y A full numeric representation of a year, 4 digits (1993..03)
+*/
+
+scheduler.config={
+ default_date: "%j %M %Y",
+ month_date: "%F %Y",
+ load_date: "%Y-%m-%d",
+ week_date: "%l",
+ day_date: "%D, %F %j",
+ hour_date: "%H:%i",
+ month_day: "%d",
+ xml_date: "%m/%d/%Y %H:%i",
+ api_date: "%d-%m-%Y %H:%i",
+ preserve_length:true,
+ time_step: 5,
+
+ start_on_monday: 1,
+ first_hour: 0,
+ last_hour: 24,
+ readonly: false,
+ drag_resize: 1,
+ drag_move: 1,
+ drag_create: 1,
+ dblclick_create: 1,
+ edit_on_create: 1,
+ details_on_create: 0,
+
+ cascade_event_display: false,
+ cascade_event_count: 4,
+ cascade_event_margin: 30,
+
+ multi_day:true,
+ multi_day_height_limit: 0,
+
+ drag_lightbox: true,
+ preserve_scroll: true,
+ select: true,
+
+ server_utc: false,
+ touch:true,
+ touch_tip:true,
+ touch_drag:500,
+ quick_info_detached:true,
+
+ positive_closing: false,
+
+ icons_edit: ["icon_save", "icon_cancel"],
+ icons_select: ["icon_details", "icon_edit", "icon_delete"],
+ buttons_left: ["dhx_save_btn", "dhx_cancel_btn"],
+ buttons_right: ["dhx_delete_btn"],
+ lightbox: {
+ sections: [
+ {name: "description", height: 200, map_to: "text", type: "textarea", focus: true},
+ {name: "time", height: 72, type: "time", map_to: "auto"}
+ ]
+ },
+ highlight_displayed_event: true,
+ left_border: false
+};
+scheduler.templates={};
+scheduler.init_templates=function(){
+ var labels = scheduler.locale.labels;
+ labels.dhx_save_btn = labels.icon_save;
+ labels.dhx_cancel_btn = labels.icon_cancel;
+ labels.dhx_delete_btn = labels.icon_delete;
+
+
+ var d=scheduler.date.date_to_str;
+ var c=scheduler.config;
+ var f = function(a,b){
+ for (var c in b)
+ if (!a[c]) a[c]=b[c];
+ };
+ f(scheduler.templates,{
+ day_date:d(c.default_date),
+ month_date:d(c.month_date),
+ week_date:function(d1,d2){
+ return scheduler.templates.day_date(d1)+" &ndash; "+scheduler.templates.day_date(scheduler.date.add(d2,-1,"day"));
+ },
+ day_scale_date:d(c.default_date),
+ month_scale_date:d(c.week_date),
+ week_scale_date:d(c.day_date),
+ hour_scale:d(c.hour_date),
+ time_picker:d(c.hour_date),
+ event_date:d(c.hour_date),
+ month_day:d(c.month_day),
+ xml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),
+ load_format:d(c.load_date,c.server_utc),
+ xml_format:d(c.xml_date,c.server_utc),
+ api_date:scheduler.date.str_to_date(c.api_date),
+ event_header:function(start,end,ev){
+ return scheduler.templates.event_date(start)+" - "+scheduler.templates.event_date(end);
+ },
+ event_text:function(start,end,ev){
+ return ev.text;
+ },
+ event_class:function(start,end,ev){
+ return "";
+ },
+ month_date_class:function(d){
+ return "";
+ },
+ week_date_class:function(d){
+ return "";
+ },
+ event_bar_date:function(start,end,ev){
+ return scheduler.templates.event_date(start)+" ";
+ },
+ event_bar_text:function(start,end,ev){
+ return ev.text;
+ },
+ month_events_link : function(date, count){
+ return "<a>View more("+count+" events)</a>";
+ }
+ });
+ this.callEvent("onTemplatesReady",[]);
+};
+
+
+
+scheduler.uid = function() {
+ if (!this._seed) this._seed = (new Date).valueOf();
+ return this._seed++;
+};
+scheduler._events = {};
+scheduler.clearAll = function() {
+ this._events = {};
+ this._loaded = {};
+ this.clear_view();
+ this.callEvent("onClearAll", []);
+};
+scheduler.addEvent = function(start_date, end_date, text, id, extra_data) {
+ if (!arguments.length)
+ return this.addEventNow();
+ var ev = start_date;
+ if (arguments.length != 1) {
+ ev = extra_data || {};
+ ev.start_date = start_date;
+ ev.end_date = end_date;
+ ev.text = text;
+ ev.id = id;
+ }
+ ev.id = ev.id || scheduler.uid();
+ ev.text = ev.text || "";
+
+ if (typeof ev.start_date == "string") ev.start_date = this.templates.api_date(ev.start_date);
+ if (typeof ev.end_date == "string") ev.end_date = this.templates.api_date(ev.end_date);
+
+ var d = (this.config.event_duration || this.config.time_step) * 60000;
+ if (ev.start_date.valueOf() == ev.end_date.valueOf())
+ ev.end_date.setTime(ev.end_date.valueOf() + d);
+
+ ev._timed = this.isOneDayEvent(ev);
+
+ var is_new = !this._events[ev.id];
+ this._events[ev.id] = ev;
+ this.event_updated(ev);
+ if (!this._loading)
+ this.callEvent(is_new ? "onEventAdded" : "onEventChanged", [ev.id, ev]);
+ return ev.id;
+};
+scheduler.deleteEvent = function(id, silent) {
+ var ev = this._events[id];
+ if (!silent && (!this.callEvent("onBeforeEventDelete", [id, ev]) || !this.callEvent("onConfirmedBeforeEventDelete", [id, ev])))
+ return;
+ if (ev) {
+ delete this._events[id];
+ this.unselect(id);
+ this.event_updated(ev);
+ }
+
+ this.callEvent("onEventDeleted", [id, ev]);
+};
+scheduler.getEvent = function(id) {
+ return this._events[id];
+};
+scheduler.setEvent = function(id, hash) {
+ if(!hash.id)
+ hash.id = id;
+
+ this._events[id] = hash;
+};
+scheduler.for_rendered = function(id, method) {
+ for (var i = this._rendered.length - 1; i >= 0; i--)
+ if (this._rendered[i].getAttribute("event_id") == id)
+ method(this._rendered[i], i);
+};
+scheduler.changeEventId = function(id, new_id) {
+ if (id == new_id) return;
+ var ev = this._events[id];
+ if (ev) {
+ ev.id = new_id;
+ this._events[new_id] = ev;
+ delete this._events[id];
+ }
+ this.for_rendered(id, function(r) {
+ r.setAttribute("event_id", new_id);
+ });
+ if (this._select_id == id) this._select_id = new_id;
+ if (this._edit_id == id) this._edit_id = new_id;
+ //if (this._drag_id==id) this._drag_id=new_id;
+ this.callEvent("onEventIdChange", [id, new_id]);
+};
+
+(function() {
+ var attrs = ["text", "Text", "start_date", "StartDate", "end_date", "EndDate"];
+ var create_getter = function(name) {
+ return function(id) { return (scheduler.getEvent(id))[name]; };
+ };
+ var create_setter = function(name) {
+ return function(id, value) {
+ var ev = scheduler.getEvent(id);
+ ev[name] = value;
+ ev._changed = true;
+ ev._timed = this.isOneDayEvent(ev);
+ scheduler.event_updated(ev, true);
+ };
+ };
+ for (var i = 0; i < attrs.length; i += 2) {
+ scheduler["getEvent" + attrs[i + 1]] = create_getter(attrs[i]);
+ scheduler["setEvent" + attrs[i + 1]] = create_setter(attrs[i]);
+ }
+})();
+
+scheduler.event_updated = function(ev, force) {
+ if (this.is_visible_events(ev))
+ this.render_view_data();
+ else
+ this.clear_event(ev.id);
+};
+scheduler.is_visible_events = function(ev) {
+ return (ev.start_date < this._max_date && this._min_date < ev.end_date);
+};
+scheduler.isOneDayEvent = function(ev) {
+ var delta = ev.end_date.getDate() - ev.start_date.getDate();
+
+ if (!delta)
+ return ev.start_date.getMonth() == ev.end_date.getMonth() && ev.start_date.getFullYear() == ev.end_date.getFullYear();
+ else {
+ if (delta < 0) delta = Math.ceil((ev.end_date.valueOf() - ev.start_date.valueOf()) / (24 * 60 * 60 * 1000));
+ return (delta == 1 && !ev.end_date.getHours() && !ev.end_date.getMinutes() && (ev.start_date.getHours() || ev.start_date.getMinutes() ));
+ }
+
+};
+scheduler.get_visible_events = function(only_timed) {
+ //not the best strategy for sure
+ var stack = [];
+
+ for (var id in this._events)
+ if (this.is_visible_events(this._events[id]))
+ if (!only_timed || this._events[id]._timed)
+ if (this.filter_event(id, this._events[id]))
+ stack.push(this._events[id]);
+
+ return stack;
+};
+scheduler.filter_event = function(id, ev) {
+ var filter = this["filter_" + this._mode];
+ return (filter) ? filter(id, ev) : true;
+};
+scheduler._is_main_area_event = function(ev){
+ return !!ev._timed;
+};
+scheduler.render_view_data = function(evs, hold) {
+ if (!evs) {
+ if (this._not_render) {
+ this._render_wait = true;
+ return;
+ }
+ this._render_wait = false;
+
+ this.clear_view();
+ evs = this.get_visible_events(!(this._table_view || this.config.multi_day));
+ }
+ for(var i= 0, len = evs.length; i < len; i++){
+ this._recalculate_timed(evs[i]);
+ }
+
+ if (this.config.multi_day && !this._table_view) {
+
+ var tvs = [];
+ var tvd = [];
+ for (var i = 0; i < evs.length; i++) {
+ if (this._is_main_area_event(evs[i]))
+ tvs.push(evs[i]);
+ else
+ tvd.push(evs[i]);
+ }
+
+ // multiday events
+ this._rendered_location = this._els['dhx_multi_day'][0];
+ this._table_view = true;
+ this.render_data(tvd, hold);
+ this._table_view = false;
+
+ // normal events
+ this._rendered_location = this._els['dhx_cal_data'][0];
+ this._table_view = false;
+ this.render_data(tvs, hold);
+
+ } else {
+ this._rendered_location = this._els['dhx_cal_data'][0];
+ this.render_data(evs, hold);
+ }
+};
+
+
+scheduler._view_month_day = function(e){
+ var date = scheduler.getActionData(e).date;
+ if(!scheduler.callEvent("onViewMoreClick", [date]))
+ return;
+ scheduler.setCurrentView(date, "day");
+};
+
+scheduler._render_month_link = function(ev){
+ var parent = this._rendered_location;
+ var toRender = this._lame_clone(ev);
+
+ //render links in each cell of multiday events
+ for(var d = ev._sday; d < ev._eday; d++){
+
+ toRender._sday = d;
+ toRender._eday = d+1;
+
+ var date = scheduler.date;
+ var curr = scheduler._min_date;
+ curr = date.add(curr, toRender._sweek, "week");
+ curr = date.add(curr, toRender._sday, "day");
+ var count = scheduler.getEvents(curr, date.add(curr, 1, "day")).length;
+
+ var pos = this._get_event_bar_pos(toRender);
+ var widt = (pos.x2 - pos.x);
+
+ var el = document.createElement("div");
+ el.onclick = function(e){scheduler._view_month_day(e||event);};
+ el.className = "dhx_month_link";
+ el.style.top = pos.y + "px";
+ el.style.left = pos.x + "px";
+ el.style.width = widt + "px";
+ el.innerHTML = scheduler.templates.month_events_link(curr, count);
+ this._rendered.push(el);
+
+ parent.appendChild(el);
+ }
+};
+
+scheduler._recalculate_timed = function(id){
+ if(!id) return;
+ if(typeof(id) != "object")
+ var ev = this._events[id];
+ else
+ var ev = id;
+ if(!ev) return;
+ ev._timed = scheduler.isOneDayEvent(ev);
+};
+scheduler.attachEvent("onEventChanged", scheduler._recalculate_timed);
+scheduler.attachEvent("onEventAdded", scheduler._recalculate_timed);
+
+scheduler.render_data = function(evs, hold) {
+ evs = this._pre_render_events(evs, hold);
+
+ for (var i = 0; i < evs.length; i++)
+ if (this._table_view){
+ if(scheduler._mode != 'month'){
+ this.render_event_bar(evs[i]);//may be multiday section on other views
+ }else{
+
+ var max_evs = scheduler.config.max_month_events;
+ if(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){
+ //of max number events per month cell is set and event can be rendered
+ this.render_event_bar(evs[i]);
+ }else if(max_evs !== undefined && evs[i]._sorder == max_evs){
+ //render 'view more' links
+ scheduler._render_month_link(evs[i]);
+ }else{
+ //do not render events with ordinal number > maximum events per cell
+ }
+ }
+
+
+
+ }else
+ this.render_event(evs[i]);
+};
+scheduler._pre_render_events = function(evs, hold) {
+ var hb = this.xy.bar_height;
+ var h_old = this._colsS.heights;
+ var h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];
+ var data = this._els["dhx_cal_data"][0];
+
+ if (!this._table_view)
+ evs = this._pre_render_events_line(evs, hold); //ignore long events for now
+ else
+ evs = this._pre_render_events_table(evs, hold);
+
+ if (this._table_view) {
+ if (hold)
+ this._colsS.heights = h_old;
+ else {
+ var evl = data.firstChild;
+ if (evl.rows) {
+ for (var i = 0; i < evl.rows.length; i++) {
+ h[i]++;
+ if ((h[i]) * hb > this._colsS.height - 22) { // 22 - height of cell's header
+ //we have overflow, update heights
+ var cells = evl.rows[i].cells;
+
+ var cHeight = this._colsS.height - 22;
+ if(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){
+ cHeight = h[i] * hb;
+ }else if( (this.config.max_month_events + 1) * hb > this._colsS.height - 22){
+ cHeight = (this.config.max_month_events + 1) * hb;
+ }
+
+ for (var j = 0; j < cells.length; j++) {
+ cells[j].childNodes[1].style.height = cHeight + "px";
+ }
+ h[i] = (h[i - 1] || 0) + cells[0].offsetHeight;
+ }
+ h[i] = (h[i - 1] || 0) + evl.rows[i].cells[0].offsetHeight;
+ }
+ h.unshift(0);
+ if (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix && scheduler.xy.scroll_width) {
+ //we have v-scroll, decrease last day cell
+ for (var i = 0; i < evl.rows.length; i++) {
+ //get last visible cell
+ var last = 6; while (this._ignores[last]) last--;
+
+ var cell = evl.rows[i].cells[last].childNodes[0];
+ var w = cell.offsetWidth - scheduler.xy.scroll_width + "px";
+ cell.style.width = w;
+ cell.nextSibling.style.width = w;
+ }
+ evl._h_fix = true;
+ }
+ } else {
+ if (!evs.length && this._els["dhx_multi_day"][0].style.visibility == "visible")
+ h[0] = -1;
+ if (evs.length || h[0] == -1) {
+ //shift days to have space for multiday events
+ var childs = evl.parentNode.childNodes;
+
+ // +1 so multiday events would have 2px from top and 2px from bottom by default
+ var full_multi_day_height = (h[0] + 1) * hb + 1;
+
+ var used_multi_day_height = full_multi_day_height;
+ var used_multi_day_height_css = full_multi_day_height + "px";
+ if (this.config.multi_day_height_limit) {
+ used_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;
+ used_multi_day_height_css = used_multi_day_height + "px";
+ }
+
+ data.style.top = (this._els["dhx_cal_navline"][0].offsetHeight + this._els["dhx_cal_header"][0].offsetHeight + used_multi_day_height ) + 'px';
+ data.style.height = (this._obj.offsetHeight - parseInt(data.style.top, 10) - (this.xy.margin_top || 0)) + 'px';
+
+ var multi_day_section = this._els["dhx_multi_day"][0];
+ multi_day_section.style.height = used_multi_day_height_css;
+ multi_day_section.style.visibility = (h[0] == -1 ? "hidden" : "visible");
+
+ // icon
+ var multi_day_icon = this._els["dhx_multi_day"][1];
+ multi_day_icon.style.height = used_multi_day_height_css;
+ multi_day_icon.style.visibility = (h[0] == -1 ? "hidden" : "visible");
+ multi_day_icon.className = h[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small";
+ this._dy_shift = (h[0] + 1) * hb;
+ h[0] = 0;
+
+ if (used_multi_day_height != full_multi_day_height) {
+ data.style.top = (parseInt(data.style.top) + 2) + "px";
+
+ multi_day_section.style.overflowY = "auto";
+ multi_day_section.style.width = (parseInt(multi_day_section.style.width) - 2) + "px";
+
+ multi_day_icon.style.position = "fixed";
+ multi_day_icon.style.top = "";
+ multi_day_icon.style.left = "";
+ }
+ }
+ }
+ }
+ }
+
+ return evs;
+};
+scheduler._get_event_sday = function(ev) {
+ return Math.floor((ev.start_date.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));
+};
+scheduler._get_event_mapped_end_date = function(ev) {
+ var end_date = ev.end_date;
+ if (this.config.separate_short_events) {
+ var ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes
+ if (ev_duration < this._min_mapped_duration) {
+ end_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, "minute");
+ }
+ }
+ return end_date;
+};
+scheduler._pre_render_events_line = function(evs, hold){
+ evs.sort(function(a, b) {
+ if (a.start_date.valueOf() == b.start_date.valueOf())
+ return a.id > b.id ? 1 : -1;
+ return a.start_date > b.start_date ? 1 : -1;
+ });
+ var days = []; //events by weeks
+ var evs_originals = [];
+
+ this._min_mapped_duration = Math.ceil(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way
+
+ for (var i = 0; i < evs.length; i++) {
+ var ev = evs[i];
+
+ //check date overflow
+ var sd = ev.start_date;
+ var ed = ev.end_date;
+ //check scale overflow
+ var sh = sd.getHours();
+ var eh = ed.getHours();
+
+ ev._sday = this._get_event_sday(ev); // sday based on event start_date
+ if (this._ignores[ev._sday]){
+ //ignore event
+ evs.splice(i,1);
+ i--;
+ continue;
+ }
+
+ if (!days[ev._sday]) days[ev._sday] = [];
+
+ if (!hold) {
+ ev._inner = false;
+
+ var stack = days[ev._sday];
+
+ while (stack.length) {
+ var t_ev = stack[stack.length - 1];
+ var t_end_date = this._get_event_mapped_end_date(t_ev);
+ if (t_end_date.valueOf() <= ev.start_date.valueOf()) {
+ stack.splice(stack.length - 1, 1);
+ } else {
+ break;
+ }
+ }
+
+ var sorderSet = false;
+ for (var j = 0; j < stack.length; j++) {
+ var t_ev = stack[j];
+ var t_end_date = this._get_event_mapped_end_date(t_ev);
+ if (t_end_date.valueOf() <= ev.start_date.valueOf()) {
+ sorderSet = true;
+ ev._sorder = t_ev._sorder;
+ stack.splice(j, 1);
+ ev._inner = true;
+ break;
+ }
+ }
+
+ if (stack.length)
+ stack[stack.length - 1]._inner = true;
+
+ if (!sorderSet) {
+ if (stack.length) {
+ if (stack.length <= stack[stack.length - 1]._sorder) {
+ if (!stack[stack.length - 1]._sorder)
+ ev._sorder = 0;
+ else
+ for (j = 0; j < stack.length; j++) {
+ var _is_sorder = false;
+ for (var k = 0; k < stack.length; k++) {
+ if (stack[k]._sorder == j) {
+ _is_sorder = true;
+ break;
+ }
+ }
+ if (!_is_sorder) {
+ ev._sorder = j;
+ break;
+ }
+ }
+ ev._inner = true;
+ } else {
+ var _max_sorder = stack[0]._sorder;
+ for (j = 1; j < stack.length; j++) {
+ if (stack[j]._sorder > _max_sorder)
+ _max_sorder = stack[j]._sorder;
+ }
+ ev._sorder = _max_sorder + 1;
+ ev._inner = false;
+ }
+
+ } else
+ ev._sorder = 0;
+ }
+
+ stack.push(ev);
+
+ if (stack.length > (stack.max_count || 0)) {
+ stack.max_count = stack.length;
+ ev._count = stack.length;
+ } else {
+ ev._count = (ev._count) ? ev._count : 1;
+ }
+ }
+
+ if (sh < this.config.first_hour || eh >= this.config.last_hour) {
+ // Need to create copy of event as we will be changing it's start/end date
+ // e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info
+ evs_originals.push(ev);
+ evs[i] = ev = this._copy_event(ev);
+
+ if (sh < this.config.first_hour) {
+ ev.start_date.setHours(this.config.first_hour);
+ ev.start_date.setMinutes(0);
+ }
+ if (eh >= this.config.last_hour) {
+ ev.end_date.setMinutes(0);
+ ev.end_date.setHours(this.config.last_hour);
+ }
+
+ if (ev.start_date > ev.end_date || sh == this.config.last_hour) {
+ evs.splice(i, 1);
+ i--;
+ continue;
+ }
+ }
+ }
+ if (!hold) {
+ for (var i = 0; i < evs.length; i++) {
+ evs[i]._count = days[evs[i]._sday].max_count;
+ }
+ for (var i = 0; i < evs_originals.length; i++)
+ evs_originals[i]._count = days[evs_originals[i]._sday].max_count;
+ }
+
+ return evs;
+};
+scheduler._time_order = function(evs) {
+ evs.sort(function(a, b) {
+ if (a.start_date.valueOf() == b.start_date.valueOf()) {
+ if (a._timed && !b._timed) return 1;
+ if (!a._timed && b._timed) return -1;
+ return a.id > b.id ? 1 : -1;
+ }
+ return a.start_date > b.start_date ? 1 : -1;
+ });
+};
+scheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot
+ this._time_order(evs);
+ var out = [];
+ var weeks = [
+ [],
+ [],
+ [],
+ [],
+ [],
+ [],
+ []
+ ]; //events by weeks
+ var max = this._colsS.heights;
+ var start_date;
+ var cols = this._cols.length;
+ var chunks_info = {};
+
+ for (var i = 0; i < evs.length; i++) {
+ var ev = evs[i];
+ var id = ev.id;
+ if (!chunks_info[id]) {
+ chunks_info[id] = {
+ first_chunk: true,
+ last_chunk: true
+ };
+ }
+ var chunk_info = chunks_info[id];
+ var sd = (start_date || ev.start_date);
+ var ed = ev.end_date;
+ //trim events which are crossing through current view
+ if (sd < this._min_date) {
+ chunk_info.first_chunk = false;
+ sd = this._min_date;
+ }
+ if (ed > this._max_date) {
+ chunk_info.last_chunk = false;
+ ed = this._max_date;
+ }
+
+ var locate_s = this.locate_holder_day(sd, false, ev);
+ ev._sday = locate_s % cols;
+
+ //skip single day events for ignored dates
+ if (this._ignores[ev._sday] && ev._timed) continue;
+
+ var locate_e = this.locate_holder_day(ed, true, ev) || cols;
+ ev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday
+ ev._length = locate_e - locate_s;
+
+ //3600000 - compensate 1 hour during winter|summer time shift
+ ev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));
+
+ //current slot
+ var stack = weeks[ev._sweek];
+ //check order position
+ var stack_line;
+
+ for (stack_line = 0; stack_line < stack.length; stack_line++)
+ if (stack[stack_line]._eday <= ev._sday)
+ break;
+
+ if (!ev._sorder || !hold) {
+ ev._sorder = stack_line;
+ }
+
+ if (ev._sday + ev._length <= cols) {
+ start_date = null;
+ out.push(ev);
+ stack[stack_line] = ev;
+ //get max height of slot
+ max[ev._sweek] = stack.length - 1;
+ ev._first_chunk = chunk_info.first_chunk;
+ ev._last_chunk = chunk_info.last_chunk;
+ } else { // split long event in chunks
+ var copy = this._copy_event(ev);
+ copy.id = ev.id;
+ copy._length = cols - ev._sday;
+ copy._eday = cols;
+ copy._sday = ev._sday;
+ copy._sweek = ev._sweek;
+ copy._sorder = ev._sorder;
+ copy.end_date = this.date.add(sd, copy._length, "day");
+ copy._first_chunk = chunk_info.first_chunk;
+ if (chunk_info.first_chunk) {
+ chunk_info.first_chunk = false;
+ }
+
+ out.push(copy);
+ stack[stack_line] = copy;
+ start_date = copy.end_date;
+ //get max height of slot
+ max[ev._sweek] = stack.length - 1;
+ i--;
+ continue; //repeat same step
+ }
+ }
+ return out;
+};
+scheduler._copy_dummy = function() {
+ var a = new Date(this.start_date);
+ var b = new Date(this.end_date);
+ this.start_date = a;
+ this.end_date = b;
+};
+scheduler._copy_event = function(ev) {
+ this._copy_dummy.prototype = ev;
+ return new this._copy_dummy();
+ //return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}
+};
+scheduler._rendered = [];
+scheduler.clear_view = function() {
+ for (var i = 0; i < this._rendered.length; i++) {
+ var obj = this._rendered[i];
+ if (obj.parentNode) obj.parentNode.removeChild(obj);
+ }
+ this._rendered = [];
+};
+scheduler.updateEvent = function(id) {
+ var ev = this.getEvent(id);
+ this.clear_event(id);
+
+ if (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {
+ if (this.config.update_render)
+ this.render_view_data();
+ else
+ this.render_view_data([ev], true);
+ }
+};
+scheduler.clear_event = function(id) {
+ this.for_rendered(id, function(node, i) {
+ if (node.parentNode)
+ node.parentNode.removeChild(node);
+ scheduler._rendered.splice(i, 1);
+ });
+};
+scheduler.render_event = function(ev) {
+ var menu = scheduler.xy.menu_width;
+ var menu_offset = (this.config.use_select_menu_space) ? 0 : menu;
+ if (ev._sday < 0) return; //can occur in case of recurring event during time shift
+
+ var parent = scheduler.locate_holder(ev._sday);
+ if (!parent) return; //attempt to render non-visible event
+
+ var sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();
+ var em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);
+ var ev_count = ev._count || 1;
+ var ev_sorder = ev._sorder || 0;
+ var top = (Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24); //42px/hour
+ var height = Math.max(scheduler.xy.min_event_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour
+ var width = Math.floor((parent.clientWidth - menu_offset) / ev_count);
+ var left = ev_sorder * width + 1;
+ if (!ev._inner) width = width * (ev_count - ev_sorder);
+ if (this.config.cascade_event_display) {
+ var limit = this.config.cascade_event_count;
+ var margin = this.config.cascade_event_margin;
+ left = ev_sorder % limit * margin;
+ var right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;
+ width = Math.floor(parent.clientWidth - menu_offset - left - right);
+ }
+
+ var d = this._render_v_bar(ev.id, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));
+
+ this._rendered.push(d);
+ parent.appendChild(d);
+
+ left = left + parseInt(parent.style.left, 10) + menu_offset;
+
+ if (this._edit_id == ev.id) {
+
+ d.style.zIndex = 1; //fix overlapping issue
+ width = Math.max(width - 4, scheduler.xy.editor_width);
+ d = document.createElement("DIV");
+ d.setAttribute("event_id", ev.id);
+ this.set_xy(d, width, height - 20, left, top + 14);
+ d.className = "dhx_cal_editor";
+
+ var d2 = document.createElement("DIV");
+ this.set_xy(d2, width - 6, height - 26);
+ d2.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;";
+
+ d.appendChild(d2);
+ this._els["dhx_cal_data"][0].appendChild(d);
+ this._rendered.push(d);
+
+ d2.innerHTML = "<textarea class='dhx_cal_editor'>" + ev.text + "</textarea>";
+ if (this._quirks7) d2.firstChild.style.height = height - 12 + "px"; //IEFIX
+ this._editor = d2.firstChild;
+ this._editor.onkeydown = function(e) {
+ if ((e || event).shiftKey) return true;
+ var code = (e || event).keyCode;
+ if (code == scheduler.keys.edit_save) scheduler.editStop(true);
+ if (code == scheduler.keys.edit_cancel) scheduler.editStop(false);
+ };
+ this._editor.onselectstart = function (e) {
+ return (e || event).cancelBubble = true;
+ };
+ scheduler._focus(d2.firstChild, true);
+ //IE and opera can add x-scroll during focusing
+ this._els["dhx_cal_data"][0].scrollLeft = 0;
+ }
+ if (this.xy.menu_width !== 0 && this._select_id == ev.id) {
+ if (this.config.cascade_event_display && this._drag_mode)
+ d.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event
+ var icons = this.config["icons_" + ((this._edit_id == ev.id) ? "edit" : "select")];
+ var icons_str = "";
+ var bg_color = (ev.color ? ("background-color: " + ev.color + ";") : "");
+ var color = (ev.textColor ? ("color: " + ev.textColor + ";") : "");
+ for (var i = 0; i < icons.length; i++)
+ icons_str += "<div class='dhx_menu_icon " + icons[i] + "' style='" + bg_color + "" + color + "' title='" + this.locale.labels[icons[i]] + "'></div>";
+ var obj = this._render_v_bar(ev.id, left - menu + 1, top, menu, icons.length * 20 + 26 - 2, "", "<div style='" + bg_color + "" + color + "' class='dhx_menu_head'></div>", icons_str, true);
+ obj.style.left = left - menu + 1;
+ this._els["dhx_cal_data"][0].appendChild(obj);
+ this._rendered.push(obj);
+ }
+};
+scheduler._render_v_bar = function (id, x, y, w, h, style, contentA, contentB, bottom) {
+ var d = document.createElement("DIV");
+ var ev = this.getEvent(id);
+
+ var cs = (bottom) ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event";
+
+ var cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);
+ if (cse) cs = cs + " " + cse;
+
+ var bg_color = (ev.color ? ("background:" + ev.color + ";") : "");
+ var color = (ev.textColor ? ("color:" + ev.textColor + ";") : "");
+
+ var html = '<div event_id="' + id + '" class="' + cs + '" style="position:absolute; top:' + y + 'px; left:' + x + 'px; width:' + (w - 4) + 'px; height:' + h + 'px;' + (style || "") + '"></div>';
+ d.innerHTML = html;
+
+ var container = d.cloneNode(true).firstChild;
+
+ if (!bottom && scheduler.renderEvent(container, ev)) {
+ return container;
+ } else {
+ container = d.firstChild;
+
+ var inner_html = '<div class="dhx_event_move dhx_header" style=" width:' + (w - 6) + 'px;' + bg_color + '" >&nbsp;</div>';
+ inner_html += '<div class="dhx_event_move dhx_title" style="' + bg_color + '' + color + '">' + contentA + '</div>';
+ inner_html += '<div class="dhx_body" style=" width:' + (w - (this._quirks ? 4 : 14)) + 'px; height:' + (h - (this._quirks ? 20 : 30) + 1) + 'px;' + bg_color + '' + color + '">' + contentB + '</div>'; // +2 css specific, moved from render_event
+
+ var footer_class = "dhx_event_resize dhx_footer";
+ if (bottom)
+ footer_class = "dhx_resize_denied " + footer_class;
+
+ inner_html += '<div class="' + footer_class + '" style=" width:' + (w - 8) + 'px;' + (bottom ? ' margin-top:-1px;' : '') + '' + bg_color + '' + color + '" ></div>';
+
+ container.innerHTML = inner_html;
+ }
+
+ return container;
+};
+scheduler.renderEvent = function(){
+ return false;
+},
+scheduler.locate_holder = function(day) {
+ if (this._mode == "day") return this._els["dhx_cal_data"][0].firstChild; //dirty
+ return this._els["dhx_cal_data"][0].childNodes[day];
+};
+scheduler.locate_holder_day = function(date, past) {
+ var day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));
+ //when locating end data of event , we need to use next day if time part was defined
+ if (past && this.date.time_part(date)) day++;
+ return day;
+};
+
+
+
+scheduler._get_dnd_order = function(order, ev_height, max_height){
+ if(!this._drag_event)
+ return order;
+ if(!this._drag_event._orig_sorder)
+ this._drag_event._orig_sorder = order;
+ else
+ order = this._drag_event._orig_sorder;
+
+ var evTop = ev_height * order;
+ while((evTop + ev_height) > max_height){
+ order--;
+ evTop -= ev_height;
+ }
+ return order;
+};
+//scheduler._get_event_bar_pos = function(sday, eday, week, drag){
+scheduler._get_event_bar_pos = function(ev){
+ var x = this._colsS[ev._sday];
+ var x2 = this._colsS[ev._eday];
+ if (x2 == x) x2 = this._colsS[ev._eday + 1];
+ var hb = this.xy.bar_height;
+
+ var order = ev._sorder;
+ if(ev.id == this._drag_id){
+ var cellHeight = this._colsS.heights[ev._sweek + 1] - this._colsS.heights[ev._sweek]- 22;//22 for month head height
+ order = scheduler._get_dnd_order(order, hb, cellHeight);
+ }
+ var y_event_offset = order * hb;
+ var y = this._colsS.heights[ev._sweek] + (this._colsS.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;
+ return {x:x, x2:x2, y:y};
+};
+
+scheduler.render_event_bar = function (ev) {
+ var parent = this._rendered_location;
+ var pos = this._get_event_bar_pos(ev);
+
+ var y = pos.y;
+ var x = pos.x;
+ var x2 = pos.x2;
+
+ //events in ignored dates
+
+ if (!x2) return;
+
+
+ var d = document.createElement("DIV");
+ var cs = "dhx_cal_event_clear";
+ if (!ev._timed) {
+ cs = "dhx_cal_event_line";
+ if (ev.hasOwnProperty("_first_chunk") && ev._first_chunk)
+ cs += " dhx_cal_event_line_start";
+ if (ev.hasOwnProperty("_last_chunk") && ev._last_chunk)
+ cs += " dhx_cal_event_line_end";
+ }
+
+ var cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);
+ if (cse) cs = cs + " " + cse;
+
+ var bg_color = (ev.color ? ("background:" + ev.color + ";") : "");
+ var color = (ev.textColor ? ("color:" + ev.textColor + ";") : "");
+
+ var html = '<div event_id="' + ev.id + '" class="' + cs + '" style="position:absolute; top:' + y + 'px; left:' + x + 'px; width:' + (x2 - x - 15) + 'px;' + color + '' + bg_color + '' + (ev._text_style || "") + '">';
+
+ ev = scheduler.getEvent(ev.id); // ev at this point could be a part of a larged event
+ if (ev._timed)
+ html += scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev);
+ html += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '</div>';
+ html += '</div>';
+
+ d.innerHTML = html;
+
+ this._rendered.push(d.firstChild);
+ parent.appendChild(d.firstChild);
+};
+
+scheduler._locate_event = function(node) {
+ var id = null;
+ while (node && !id && node.getAttribute) {
+ id = node.getAttribute("event_id");
+ node = node.parentNode;
+ }
+ return id;
+};
+
+scheduler.edit = function(id) {
+ if (this._edit_id == id) return;
+ this.editStop(false, id);
+ this._edit_id = id;
+ this.updateEvent(id);
+};
+scheduler.editStop = function(mode, id) {
+ if (id && this._edit_id == id) return;
+ var ev = this.getEvent(this._edit_id);
+ if (ev) {
+ if (mode) ev.text = this._editor.value;
+ this._edit_id = null;
+ this._editor = null;
+ this.updateEvent(ev.id);
+ this._edit_stop_event(ev, mode);
+ }
+};
+scheduler._edit_stop_event = function(ev, mode) {
+ if (this._new_event) {
+ if (!mode) {
+ if (ev) // in case of custom lightbox user can already delete event
+ this.deleteEvent(ev.id, true);
+ } else {
+ this.callEvent("onEventAdded", [ev.id, ev]);
+ }
+ this._new_event = null;
+ } else {
+ if (mode){
+ this.callEvent("onEventChanged", [ev.id, ev]);
+ }
+ }
+};
+
+scheduler.getEvents = function(from, to) {
+ var result = [];
+ for (var a in this._events) {
+ var ev = this._events[a];
+ if (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))
+ result.push(ev);
+ }
+ return result;
+};
+scheduler.getRenderedEvent = function(id) {
+ if (!id)
+ return;
+ var rendered_events = scheduler._rendered;
+ for (var i=0; i<rendered_events.length; i++) {
+ var rendered_event = rendered_events[i];
+ if (rendered_event.getAttribute("event_id") == id) {
+ return rendered_event;
+ }
+ }
+ return null;
+};
+scheduler.showEvent = function(id, mode) {
+ var ev = (typeof id == "number" || typeof id == "string") ? scheduler.getEvent(id) : id;
+ mode = mode||scheduler._mode;
+
+ if (!ev || (this.checkEvent("onBeforeEventDisplay") && !this.callEvent("onBeforeEventDisplay", [ev, mode])))
+ return;
+
+ var scroll_hour = scheduler.config.scroll_hour;
+ scheduler.config.scroll_hour = ev.start_date.getHours();
+ var preserve_scroll = scheduler.config.preserve_scroll;
+ scheduler.config.preserve_scroll = false;
+
+ var original_color = ev.color;
+ var original_text_color = ev.textColor;
+ if (scheduler.config.highlight_displayed_event) {
+ ev.color = scheduler.config.displayed_event_color;
+ ev.textColor = scheduler.config.displayed_event_text_color;
+ }
+
+ scheduler.setCurrentView(new Date(ev.start_date), mode);
+
+ ev.color = original_color;
+ ev.textColor = original_text_color;
+ scheduler.config.scroll_hour = scroll_hour;
+ scheduler.config.preserve_scroll = preserve_scroll;
+
+ if (scheduler.matrix && scheduler.matrix[mode]) {
+ scheduler._els.dhx_cal_data[0].scrollTop = getAbsoluteTop(scheduler.getRenderedEvent(ev.id)) - getAbsoluteTop(scheduler._els.dhx_cal_data[0]) - 20;
+ }
+
+ scheduler.callEvent("onAfterEventDisplay", [ev, mode]);
+};
+
+scheduler._loaded = {};
+scheduler._load = function(url, from) {
+ url = url || this._load_url;
+
+ if(!url){
+ //if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined
+ return;
+ }
+
+ url += (url.indexOf("?") == -1 ? "?" : "&") + "timeshift=" + (new Date()).getTimezoneOffset();
+ if (this.config.prevent_cache) url += "&uid=" + this.uid();
+ var to;
+ from = from || this._date;
+
+ if (this._load_mode) {
+ var lf = this.templates.load_format;
+
+ from = this.date[this._load_mode + "_start"](new Date(from.valueOf()));
+ while (from > this._min_date) from = this.date.add(from, -1, this._load_mode);
+ to = from;
+
+ var cache_line = true;
+ while (to < this._max_date) {
+ to = this.date.add(to, 1, this._load_mode);
+ if (this._loaded[lf(from)] && cache_line)
+ from = this.date.add(from, 1, this._load_mode); else cache_line = false;
+ }
+
+ var temp_to = to;
+ do {
+ to = temp_to;
+ temp_to = this.date.add(to, -1, this._load_mode);
+ } while (temp_to > from && this._loaded[lf(temp_to)]);
+
+ if (to <= from)
+ return false; //already loaded
+ dhtmlxAjax.get(url + "&from=" + lf(from) + "&to=" + lf(to), function(l) {scheduler.on_load(l);});
+ while (from < to) {
+ this._loaded[lf(from)] = true;
+ from = this.date.add(from, 1, this._load_mode);
+ }
+ } else
+ dhtmlxAjax.get(url, function(l) {scheduler.on_load(l);});
+ this.callEvent("onXLS", []);
+ return true;
+};
+scheduler.on_load = function(loader) {
+ var evs;
+ if (this._process && this._process != "xml") {
+ evs = this[this._process].parse(loader.xmlDoc.responseText);
+ } else {
+ evs = this._magic_parser(loader);
+ }
+
+ scheduler._process_loading(evs);
+
+ this.callEvent("onXLE", []);
+};
+scheduler._process_loading = function(evs) {
+ this._loading = true;
+ this._not_render = true;
+ for (var i = 0; i < evs.length; i++) {
+ if (!this.callEvent("onEventLoading", [evs[i]])) continue;
+ this.addEvent(evs[i]);
+ }
+ this._not_render = false;
+ if (this._render_wait) this.render_view_data();
+
+ this._loading = false;
+ if (this._after_call) this._after_call();
+ this._after_call = null;
+};
+scheduler._init_event = function(event) {
+ event.text = (event.text || event._tagvalue) || "";
+ event.start_date = scheduler._init_date(event.start_date);
+ event.end_date = scheduler._init_date(event.end_date);
+};
+
+scheduler._init_date = function(date){
+ if(!date)
+ return null;
+ if(typeof date == "string")
+ return scheduler.templates.xml_date(date);
+ else return new Date(date);
+};
+
+scheduler.json = {};
+scheduler.json.parse = function(data) {
+ if (typeof data == "string") {
+ scheduler._temp = eval("(" + data + ")");
+ data = (scheduler._temp) ? scheduler._temp.data || scheduler._temp.d || scheduler._temp : [];
+ }
+
+ if (data.dhx_security)
+ dhtmlx.security_key = data.dhx_security;
+
+ var collections = (scheduler._temp && scheduler._temp.collections) ? scheduler._temp.collections : {};
+ var collections_loaded = false;
+ for (var key in collections) {
+ if (collections.hasOwnProperty(key)) {
+ collections_loaded = true;
+ var collection = collections[key];
+ var arr = scheduler.serverList[key];
+ if (!arr) continue;
+ arr.splice(0, arr.length); //clear old options
+ for (var j = 0; j < collection.length; j++) {
+ var option = collection[j];
+ var obj = { key: option.value, label: option.label }; // resulting option object
+ for (var option_key in option) {
+ if (option.hasOwnProperty(option_key)) {
+ if (option_key == "value" || option_key == "label")
+ continue;
+ obj[option_key] = option[option_key]; // obj['value'] = option['value']
+ }
+ }
+ arr.push(obj);
+ }
+ }
+ }
+ if (collections_loaded)
+ scheduler.callEvent("onOptionsLoad", []);
+
+ var evs = [];
+ for (var i = 0; i < data.length; i++) {
+ var event = data[i];
+ scheduler._init_event(event);
+ evs.push(event);
+ }
+ return evs;
+};
+scheduler.parse = function(data, type) {
+ this._process = type;
+ this.on_load({xmlDoc: {responseText: data}});
+};
+scheduler.load = function(url, call) {
+ if (typeof call == "string") {
+ this._process = call;
+ call = arguments[2];
+ }
+
+ this._load_url = url;
+ this._after_call = call;
+ this._load(url, this._date);
+};
+//possible values - day,week,month,year,all
+scheduler.setLoadMode = function(mode) {
+ if (mode == "all") mode = "";
+ this._load_mode = mode;
+};
+
+scheduler.serverList = function(name, array) {
+ if (array) {
+ return this.serverList[name] = array.slice(0);
+ }
+ return this.serverList[name] = (this.serverList[name] || []);
+};
+scheduler._userdata = {};
+scheduler._magic_parser = function(loader) {
+ var xml;
+ if (!loader.getXMLTopNode) { //from a string
+ var xml_string = loader.xmlDoc.responseText;
+ loader = new dtmlXMLLoaderObject(function() {});
+ loader.loadXMLString(xml_string);
+ }
+
+ xml = loader.getXMLTopNode("data");
+ if (xml.tagName != "data") return [];//not an xml
+ var skey = xml.getAttribute("dhx_security");
+ if (skey)
+ dhtmlx.security_key = skey;
+
+ var opts = loader.doXPath("//coll_options");
+ for (var i = 0; i < opts.length; i++) {
+ var bind = opts[i].getAttribute("for");
+ var arr = this.serverList[bind];
+ if (!arr) continue;
+ arr.splice(0, arr.length); //clear old options
+ var itms = loader.doXPath(".//item", opts[i]);
+ for (var j = 0; j < itms.length; j++) {
+ var itm = itms[j];
+ var attrs = itm.attributes;
+ var obj = { key: itms[j].getAttribute("value"), label: itms[j].getAttribute("label")};
+ for (var k = 0; k < attrs.length; k++) {
+ var attr = attrs[k];
+ if (attr.nodeName == "value" || attr.nodeName == "label")
+ continue;
+ obj[attr.nodeName] = attr.nodeValue;
+ }
+ arr.push(obj);
+ }
+ }
+ if (opts.length)
+ scheduler.callEvent("onOptionsLoad", []);
+
+ var ud = loader.doXPath("//userdata");
+ for (var i = 0; i < ud.length; i++) {
+ var udx = this._xmlNodeToJSON(ud[i]);
+ this._userdata[udx.name] = udx.text;
+ }
+
+ var evs = [];
+ xml = loader.doXPath("//event");
+
+ for (var i = 0; i < xml.length; i++) {
+ var ev = evs[i] = this._xmlNodeToJSON(xml[i]);
+ scheduler._init_event(ev);
+ }
+ return evs;
+};
+scheduler._xmlNodeToJSON = function(node) {
+ var t = {};
+ for (var i = 0; i < node.attributes.length; i++)
+ t[node.attributes[i].name] = node.attributes[i].value;
+
+ for (var i = 0; i < node.childNodes.length; i++) {
+ var child = node.childNodes[i];
+ if (child.nodeType == 1)
+ t[child.tagName] = child.firstChild ? child.firstChild.nodeValue : "";
+ }
+
+ if (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : "";
+
+ return t;
+};
+scheduler.attachEvent("onXLS", function() {
+ if (this.config.show_loading === true) {
+ var t;
+ t = this.config.show_loading = document.createElement("DIV");
+ t.className = 'dhx_loading';
+ t.style.left = Math.round((this._x - 128) / 2) + "px";
+ t.style.top = Math.round((this._y - 15) / 2) + "px";
+ this._obj.appendChild(t);
+ }
+});
+scheduler.attachEvent("onXLE", function() {
+ var t = this.config.show_loading;
+ if (t && typeof t == "object") {
+ this._obj.removeChild(t);
+ this.config.show_loading = true;
+ }
+});
+
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in not GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.ical={
+ parse:function(str){
+ var data = str.match(RegExp(this.c_start+"[^\f]*"+this.c_end,""));
+ if (!data.length) return;
+
+ //unfolding
+ data[0]=data[0].replace(/[\r\n]+(?=[a-z \t])/g," ");
+ //drop property
+ data[0]=data[0].replace(/\;[^:\r\n]*:/g,":");
+
+
+ var incoming=[];
+ var match;
+ var event_r = RegExp("(?:"+this.e_start+")([^\f]*?)(?:"+this.e_end+")","g");
+ while (match=event_r.exec(data)){
+ var e={};
+ var param;
+ var param_r = /[^\r\n]+[\r\n]+/g;
+ while (param=param_r.exec(match[1]))
+ this.parse_param(param.toString(),e);
+ if (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined
+ incoming.push(e);
+ }
+ return incoming;
+ },
+ parse_param:function(str,obj){
+ var d = str.indexOf(":");
+ if (d==-1) return;
+
+ var name = str.substr(0,d).toLowerCase();
+ var value = str.substr(d+1).replace(/\\\,/g,",").replace(/[\r\n]+$/,"");
+ if (name=="summary")
+ name="text";
+ else if (name=="dtstart"){
+ name = "start_date";
+ value = this.parse_date(value,0,0);
+ }
+ else if (name=="dtend"){
+ name = "end_date";
+ value = this.parse_date(value,0,0);
+ }
+ obj[name]=value;
+ },
+ parse_date:function(value,dh,dm){
+ var t = value.split("T");
+ if (t[1]){
+ dh=t[1].substr(0,2);
+ dm=t[1].substr(2,2);
+ }
+ var dy = t[0].substr(0,4);
+ var dn = parseInt(t[0].substr(4,2),10)-1;
+ var dd = t[0].substr(6,2);
+ if (scheduler.config.server_utc && !t[1]) { // if no hours/minutes were specified == full day event
+ return new Date(Date.UTC(dy,dn,dd,dh,dm)) ;
+ }
+ return new Date(dy,dn,dd,dh,dm);
+ },
+ c_start:"BEGIN:VCALENDAR",
+ e_start:"BEGIN:VEVENT",
+ e_end:"END:VEVENT",
+ c_end:"END:VCALENDAR"
+};
+scheduler._lightbox_controls = {};
+scheduler.formSection = function(name){
+ var config = this.config.lightbox.sections;
+ var i =0;
+ for (i; i < config.length; i++)
+ if (config[i].name == name)
+ break;
+ var section = config[i];
+ if (!scheduler._lightbox)
+ scheduler.getLightbox();
+ var header = document.getElementById(section.id);
+ var node = header.nextSibling;
+
+ var result = {
+ section: section,
+ header: header,
+ node: node,
+ getValue:function(ev){
+ return scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);
+ },
+ setValue:function(value, ev){
+ return scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);
+ }
+ };
+
+ var handler = scheduler._lightbox_controls["get_"+section.type+"_control"];
+ return handler?handler(result):result;
+};
+scheduler._lightbox_controls.get_template_control = function(result) {
+ result.control = result.node;
+ return result;
+};
+scheduler._lightbox_controls.get_select_control = function(result) {
+ result.control = result.node.getElementsByTagName('select')[0];
+ return result;
+};
+scheduler._lightbox_controls.get_textarea_control = function(result) {
+ result.control = result.node.getElementsByTagName('textarea')[0];
+ return result;
+};
+scheduler._lightbox_controls.get_time_control = function(result) {
+ result.control = result.node.getElementsByTagName('select'); // array
+ return result;
+};
+scheduler.form_blocks={
+ template:{
+ render: function(sns){
+ var height=(sns.height||"30")+"px";
+ return "<div class='dhx_cal_ltext dhx_cal_template' style='height:"+height+";'></div>";
+ },
+ set_value:function(node,value,ev,config){
+ node.innerHTML = value||"";
+ },
+ get_value:function(node,ev,config){
+ return node.innerHTML||"";
+ },
+ focus: function(node){
+ }
+ },
+ textarea:{
+ render:function(sns){
+ var height=(sns.height||"130")+"px";
+ return "<div class='dhx_cal_ltext' style='height:"+height+";'><textarea></textarea></div>";
+ },
+ set_value:function(node,value,ev){
+ node.firstChild.value=value||"";
+ },
+ get_value:function(node,ev){
+ return node.firstChild.value;
+ },
+ focus:function(node){
+ var a=node.firstChild; scheduler._focus(a, true)
+ }
+ },
+ select:{
+ render:function(sns){
+ var height=(sns.height||"23")+"px";
+ var html="<div class='dhx_cal_ltext' style='height:"+height+";'><select style='width:100%;'>";
+ for (var i=0; i < sns.options.length; i++)
+ html+="<option value='"+sns.options[i].key+"'>"+sns.options[i].label+"</option>";
+ html+="</select></div>";
+ return html;
+ },
+ set_value:function(node,value,ev,sns){
+ var select = node.firstChild;
+ if (!select._dhx_onchange && sns.onchange) {
+ select.onchange = sns.onchange;
+ select._dhx_onchange = true;
+ }
+ if (typeof value == "undefined")
+ value = (select.options[0]||{}).value;
+ select.value=value||"";
+ },
+ get_value:function(node,ev){
+ return node.firstChild.value;
+ },
+ focus:function(node){
+ var a=node.firstChild; scheduler._focus(a, true);
+ }
+ },
+ time:{
+ render:function(sns) {
+ if (!sns.time_format) {
+ // default order
+ sns.time_format = ["%H:%i", "%d", "%m", "%Y"];
+ }
+ // map: default order => real one
+ sns._time_format_order = {};
+ var time_format = sns.time_format;
+
+ var cfg = scheduler.config;
+ var dt = this.date.date_part(scheduler._currentDate());
+ var last = 24*60, first = 0;
+ if(scheduler.config.limit_time_select){
+ last = 60*cfg.last_hour+1;
+ first = 60*cfg.first_hour;
+ dt.setHours(cfg.first_hour);
+ }
+ var html = "";
+
+ for (var p = 0; p < time_format.length; p++) {
+ var time_option = time_format[p];
+
+ // adding spaces between selects
+ if (p > 0) {
+ html += " ";
+ }
+
+ switch (time_option) {
+ case "%Y":
+ sns._time_format_order[3] = p;
+ //year
+ html+="<select>";
+ var year = dt.getFullYear()-5; //maybe take from config?
+ for (var i=0; i < 10; i++)
+ html+="<option value='"+(year+i)+"'>"+(year+i)+"</option>";
+ html+="</select> ";
+ break;
+ case "%m":
+ sns._time_format_order[2] = p;
+ //month
+ html+="<select>";
+ for (var i=0; i < 12; i++)
+ html+="<option value='"+i+"'>"+this.locale.date.month_full[i]+"</option>";
+ html += "</select>";
+ break;
+ case "%d":
+ sns._time_format_order[1] = p;
+ //days
+ html+="<select>";
+ for (var i=1; i < 32; i++)
+ html+="<option value='"+i+"'>"+i+"</option>";
+ html += "</select>";
+ break;
+ case "%H:%i":
+ sns._time_format_order[0] = p;
+ //hours
+ html += "<select>";
+ var i = first;
+ var tdate = dt.getDate();
+ sns._time_values = [];
+
+ while(i<last){
+ var time=this.templates.time_picker(dt);
+ html+="<option value='"+i+"'>"+time+"</option>";
+ sns._time_values.push(i);
+ dt.setTime(dt.valueOf()+this.config.time_step*60*1000);
+ var diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day
+ i=diff*24*60+dt.getHours()*60+dt.getMinutes();
+ }
+ html += "</select>";
+ break;
+ }
+ }
+
+ return "<div style='height:30px;padding-top:0px;font-size:inherit;' class='dhx_section_time'>"+html+"<span style='font-weight:normal; font-size:10pt;'> &nbsp;&ndash;&nbsp; </span>"+html+"</div>";
+ },
+ set_value:function(node,value,ev,config){
+ var cfg = scheduler.config;
+ var s=node.getElementsByTagName("select");
+ var map = config._time_format_order;
+
+ if(cfg.full_day) {
+ if (!node._full_day){
+ var html = "<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> "+scheduler.locale.labels.full_day+"&nbsp;</label></input>";
+ if (!scheduler.config.wide_form)
+ html = node.previousSibling.innerHTML+html;
+ node.previousSibling.innerHTML=html;
+ node._full_day=true;
+ }
+ var input=node.previousSibling.getElementsByTagName("input")[0];
+ input.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);
+
+ s[map[0]].disabled=input.checked;
+ s[ map[0] + s.length/2 ].disabled=input.checked;
+
+ input.onclick = function(){
+ if(input.checked) {
+ var obj = {};
+ scheduler.form_blocks.time.get_value(node,obj,config);
+
+ var start_date = scheduler.date.date_part(obj.start_date);
+ var end_date = scheduler.date.date_part(obj.end_date);
+
+ if (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() != 0 || ev.end_date.getMinutes() != 0)))
+ end_date = scheduler.date.add(end_date, 1, "day");
+ }
+
+ s[map[0]].disabled=input.checked;
+ s[ map[0] + s.length/2 ].disabled=input.checked;
+
+ _fill_lightbox_select(s,0,start_date||ev.start_date);
+ _fill_lightbox_select(s,4,end_date||ev.end_date);
+ };
+ }
+
+ if(cfg.auto_end_date && cfg.event_duration) {
+ function _update_lightbox_select() {
+ var start_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);
+ var end_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));
+ _fill_lightbox_select(s, 4, end_date);
+ }
+ for(var i=0; i<4; i++) {
+ s[i].onchange = _update_lightbox_select;
+ }
+ }
+
+ function _fill_lightbox_select(s,i,d) {
+ var time_values = config._time_values;
+ var direct_value = d.getHours()*60+d.getMinutes();
+ var fixed_value = direct_value;
+ var value_found = false;
+ for (var k=0; k<time_values.length; k++) {
+ var t_v = time_values[k];
+ if (t_v === direct_value) {
+ value_found = true;
+ break;
+ }
+ if (t_v < direct_value)
+ fixed_value = t_v;
+ }
+
+ s[i+map[0]].value=(value_found)?direct_value:fixed_value;
+ if(!(value_found || fixed_value)){
+ s[i+map[0]].selectedIndex = -1;//show empty select in FF
+ }
+ s[i+map[1]].value=d.getDate();
+ s[i+map[2]].value=d.getMonth();
+ s[i+map[3]].value=d.getFullYear();
+ }
+
+ _fill_lightbox_select(s,0,ev.start_date);
+ _fill_lightbox_select(s,4,ev.end_date);
+ },
+ get_value:function(node, ev, config) {
+ s=node.getElementsByTagName("select");
+ var map = config._time_format_order;
+
+ ev.start_date=new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);
+ ev.end_date=new Date(s[map[3]+4].value,s[map[2]+4].value,s[map[1]+4].value,0,s[map[0]+4].value);
+
+ if (ev.end_date<=ev.start_date)
+ ev.end_date=scheduler.date.add(ev.start_date,scheduler.config.time_step,"minute");
+ return {
+ start_date: new Date(ev.start_date),
+ end_date: new Date(ev.end_date)
+ };
+ },
+ focus:function(node){
+ scheduler._focus(node.getElementsByTagName("select")[0]);
+ }
+ }
+};
+scheduler.showCover=function(box){
+ if (box){
+ box.style.display="block";
+
+ var scroll_top = window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;
+ var scroll_left = window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft;
+
+ var view_height = window.innerHeight||document.documentElement.clientHeight;
+
+ if(scroll_top) // if vertical scroll on window
+ box.style.top=Math.round(scroll_top+Math.max((view_height-box.offsetHeight)/2, 0))+"px";
+ else // vertical scroll on body
+ box.style.top=Math.round(Math.max(((view_height-box.offsetHeight)/2), 0) + 9)+"px"; // +9 for compatibility with auto tests
+
+ // not quite accurate but used for compatibility reasons
+ if(document.documentElement.scrollWidth > document.body.offsetWidth) // if horizontal scroll on the window
+ box.style.left=Math.round(scroll_left+(document.body.offsetWidth-box.offsetWidth)/2)+"px";
+ else // horizontal scroll on the body
+ box.style.left=Math.round((document.body.offsetWidth-box.offsetWidth)/2)+"px";
+ }
+ this.show_cover();
+};
+scheduler.showLightbox=function(id){
+ if (!id) return;
+ if (!this.callEvent("onBeforeLightbox",[id])) {
+ if (this._new_event)
+ this._new_event = null;
+ return;
+ }
+ var box = this.getLightbox();
+ this.showCover(box);
+ this._fill_lightbox(id,box);
+ this.callEvent("onLightbox",[id]);
+};
+scheduler._fill_lightbox = function(id, box) {
+ var ev = this.getEvent(id);
+ var s = box.getElementsByTagName("span");
+ if (scheduler.templates.lightbox_header) {
+ s[1].innerHTML = "";
+ s[2].innerHTML = scheduler.templates.lightbox_header(ev.start_date, ev.end_date, ev);
+ } else {
+ s[1].innerHTML = this.templates.event_header(ev.start_date, ev.end_date, ev);
+ s[2].innerHTML = (this.templates.event_bar_text(ev.start_date, ev.end_date, ev) || "").substr(0, 70); //IE6 fix
+ }
+
+ var sns = this.config.lightbox.sections;
+ for (var i = 0; i < sns.length; i++) {
+ var current_sns = sns[i];
+ var node = document.getElementById(current_sns.id).nextSibling;
+ var block = this.form_blocks[current_sns.type];
+ var value = (ev[current_sns.map_to] !== undefined) ? ev[current_sns.map_to] : current_sns.default_value;
+ block.set_value.call(this, node, value, ev, current_sns);
+ if (sns[i].focus)
+ block.focus.call(this, node);
+ }
+
+ scheduler._lightbox_id = id;
+};
+scheduler._lightbox_out=function(ev){
+ var sns = this.config.lightbox.sections;
+ for (var i=0; i < sns.length; i++) {
+ var node = document.getElementById(sns[i].id);
+ node=(node?node.nextSibling:node);
+ var block=this.form_blocks[sns[i].type];
+ var res=block.get_value.call(this,node,ev, sns[i]);
+ if (sns[i].map_to!="auto")
+ ev[sns[i].map_to]=res;
+ }
+ return ev;
+};
+scheduler._empty_lightbox=function(data){
+ var id=scheduler._lightbox_id;
+ var ev=this.getEvent(id);
+ var box=this.getLightbox();
+
+ this._lame_copy(ev, data);
+
+ this.setEvent(ev.id,ev);
+ this._edit_stop_event(ev,true);
+ this.render_view_data();
+};
+scheduler.hide_lightbox=function(id){
+ this.hideCover(this.getLightbox());
+ this._lightbox_id=null;
+ this.callEvent("onAfterLightbox",[]);
+};
+scheduler.hideCover=function(box){
+ if (box) box.style.display="none";
+ this.hide_cover();
+};
+scheduler.hide_cover=function(){
+ if (this._cover)
+ this._cover.parentNode.removeChild(this._cover);
+ this._cover=null;
+};
+scheduler.show_cover=function(){
+ this._cover=document.createElement("DIV");
+ this._cover.className="dhx_cal_cover";
+ var _document_height = ((document.height !== undefined) ? document.height : document.body.offsetHeight);
+ var _scroll_height = ((document.documentElement) ? document.documentElement.scrollHeight : 0);
+ this._cover.style.height = Math.max(_document_height, _scroll_height) + 'px';
+ document.body.appendChild(this._cover);
+};
+scheduler.save_lightbox=function(){
+ var data = this._lightbox_out({}, this._lame_copy(this.getEvent(this._lightbox_id)));
+ if (this.checkEvent("onEventSave") && !this.callEvent("onEventSave",[this._lightbox_id, data, this._new_event]))
+ return;
+ this._empty_lightbox(data);
+ this.hide_lightbox();
+};
+scheduler.startLightbox = function(id, box){
+ this._lightbox_id = id;
+ this._custom_lightbox = true;
+
+ this._temp_lightbox = this._lightbox;
+ this._lightbox = box;
+ this.showCover(box);
+};
+scheduler.endLightbox = function(mode, box){
+ this._edit_stop_event(scheduler.getEvent(this._lightbox_id),mode);
+ if (mode)
+ scheduler.render_view_data();
+ this.hideCover(box);
+
+ if (this._custom_lightbox){
+ this._lightbox = this._temp_lightbox;
+ this._custom_lightbox = false;
+ }
+ this._temp_lightbox = this._lightbox_id = null; // in case of custom lightbox user only calls endLightbox so we need to reset _lightbox_id
+};
+scheduler.resetLightbox = function(){
+ if (scheduler._lightbox && !scheduler._custom_lightbox)
+ scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);
+ scheduler._lightbox = null;
+};
+scheduler.cancel_lightbox=function(){
+ this.callEvent("onEventCancel",[this._lightbox_id, this._new_event]);
+ this.endLightbox(false);
+ this.hide_lightbox();
+};
+scheduler._init_lightbox_events=function(){
+ this.getLightbox().onclick=function(e){
+ var src=e?e.target:event.srcElement;
+ if (!src.className) src=src.previousSibling;
+ if (src && src.className)
+ switch(src.className){
+ case "dhx_save_btn":
+ scheduler.save_lightbox();
+ break;
+ case "dhx_delete_btn":
+ var c=scheduler.locale.labels.confirm_deleting;
+
+ scheduler._dhtmlx_confirm(c, scheduler.locale.labels.title_confirm_deleting, function(){
+ scheduler.deleteEvent(scheduler._lightbox_id);
+ scheduler._new_event = null; //clear flag, if it was unsaved event
+ scheduler.hide_lightbox();
+ });
+
+ break;
+ case "dhx_cancel_btn":
+ scheduler.cancel_lightbox();
+ break;
+
+ default:
+ if (src.getAttribute("dhx_button")) {
+ scheduler.callEvent("onLightboxButton", [src.className, src, e]);
+ } else {
+ var index, block, sec;
+ if (src.className.indexOf("dhx_custom_button") != -1) {
+ if (src.className.indexOf("dhx_custom_button_") != -1) {
+ index = src.parentNode.getAttribute("index");
+ sec = src.parentNode.parentNode;
+ } else {
+ index = src.getAttribute("index");
+ sec = src.parentNode;
+ src = src.firstChild;
+ }
+ }
+ if (index) {
+ block = scheduler.form_blocks[scheduler.config.lightbox.sections[index].type];
+ block.button_click(index, src, sec, sec.nextSibling);
+ }
+ }
+ break;
+ }
+ };
+ this.getLightbox().onkeydown=function(e){
+ switch((e||event).keyCode){
+ case scheduler.keys.edit_save:
+ if ((e||event).shiftKey) return;
+ scheduler.save_lightbox();
+ break;
+ case scheduler.keys.edit_cancel:
+ scheduler.cancel_lightbox();
+ break;
+ default:
+ break;
+ }
+ };
+};
+scheduler.setLightboxSize=function(){
+ var d = this._lightbox;
+ if (!d) return;
+
+ var con = d.childNodes[1];
+ con.style.height="0px";
+ con.style.height=con.scrollHeight+"px";
+ d.style.height=con.scrollHeight+scheduler.xy.lightbox_additional_height+"px";
+ con.style.height=con.scrollHeight+"px"; //it is incredible , how ugly IE can be
+};
+
+scheduler._init_dnd_events = function(){
+ dhtmlxEvent(document.body, "mousemove", scheduler._move_while_dnd);
+ dhtmlxEvent(document.body, "mouseup", scheduler._finish_dnd);
+ scheduler._init_dnd_events = function(){};
+};
+scheduler._move_while_dnd = function(e){
+ if (scheduler._dnd_start_lb){
+ if (!document.dhx_unselectable){
+ document.body.className += " dhx_unselectable";
+ document.dhx_unselectable = true;
+ }
+ var lb = scheduler.getLightbox();
+ var now = (e&&e.target)?[e.pageX, e.pageY]:[event.clientX, event.clientY];
+ lb.style.top = scheduler._lb_start[1]+now[1]-scheduler._dnd_start_lb[1]+"px";
+ lb.style.left = scheduler._lb_start[0]+now[0]-scheduler._dnd_start_lb[0]+"px";
+ }
+};
+scheduler._ready_to_dnd = function(e){
+ var lb = scheduler.getLightbox();
+ scheduler._lb_start = [parseInt(lb.style.left,10), parseInt(lb.style.top,10)];
+ scheduler._dnd_start_lb = (e&&e.target)?[e.pageX, e.pageY]:[event.clientX, event.clientY];
+};
+scheduler._finish_dnd = function(){
+ if (scheduler._lb_start){
+ scheduler._lb_start = scheduler._dnd_start_lb = false;
+ document.body.className = document.body.className.replace(" dhx_unselectable","");
+ document.dhx_unselectable = false;
+ }
+};
+scheduler.getLightbox=function(){ //scheduler.config.wide_form=true;
+ if (!this._lightbox){
+ var d=document.createElement("DIV");
+ d.className="dhx_cal_light";
+ if (scheduler.config.wide_form)
+ d.className+=" dhx_cal_light_wide";
+ if (scheduler.form_blocks.recurring)
+ d.className+=" dhx_cal_light_rec";
+
+ if (/msie|MSIE 6/.test(navigator.userAgent))
+ d.className+=" dhx_ie6";
+ d.style.visibility="hidden";
+ var html = this._lightbox_template;
+
+ var buttons = this.config.buttons_left;
+ for (var i = 0; i < buttons.length; i++)
+ html+="<div class='dhx_btn_set dhx_left_btn_set "+buttons[i]+"_set'><div dhx_button='1' class='"+buttons[i]+"'></div><div>"+scheduler.locale.labels[buttons[i]]+"</div></div>";
+
+ buttons = this.config.buttons_right;
+ for (var i = 0; i < buttons.length; i++)
+ html+="<div class='dhx_btn_set dhx_right_btn_set "+buttons[i]+"_set' style='float:right;'><div dhx_button='1' class='"+buttons[i]+"'></div><div>"+scheduler.locale.labels[buttons[i]]+"</div></div>";
+
+ html+="</div>";
+ d.innerHTML=html;
+ if (scheduler.config.drag_lightbox){
+ d.firstChild.onmousedown = scheduler._ready_to_dnd;
+ d.firstChild.onselectstart = function(){ return false; };
+ d.firstChild.style.cursor = "pointer";
+ scheduler._init_dnd_events();
+
+ }
+ document.body.insertBefore(d,document.body.firstChild);
+ this._lightbox=d;
+
+ var sns=this.config.lightbox.sections;
+ html="";
+ for (var i=0; i < sns.length; i++) {
+ var block=this.form_blocks[sns[i].type];
+ if (!block) continue; //ignore incorrect blocks
+ sns[i].id="area_"+this.uid();
+ var button = "";
+ if (sns[i].button){
+ button = "<div class='dhx_custom_button' index='"+i+"'><div class='dhx_custom_button_"+sns[i].button+"'></div><div>"+this.locale.labels["button_"+sns[i].button]+"</div></div>";
+ }
+
+ if (this.config.wide_form){
+ html+="<div class='dhx_wrap_section'>";
+ }
+ html+="<div id='"+sns[i].id+"' class='dhx_cal_lsection'>"+button+this.locale.labels["section_"+sns[i].name]+"</div>"+block.render.call(this,sns[i]);
+ html+="</div>"
+ }
+
+ var ds=d.getElementsByTagName("div");
+ for (var i=0; i<ds.length; i++) {
+ var t_ds = ds[i];
+ if (t_ds.className == "dhx_cal_larea") {
+ t_ds.innerHTML = html;
+ break;
+ }
+ }
+
+ //sizes
+ this.setLightboxSize();
+
+ this._init_lightbox_events(this);
+ d.style.display="none";
+ d.style.visibility="visible";
+ }
+ return this._lightbox;
+};
+scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'>&nbsp;</span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div>";
+
+scheduler._init_touch_events = function(){
+ if (this.config.touch != "force")
+ this.config.touch = this.config.touch
+ && ( (navigator.userAgent.indexOf("Mobile")!=-1)
+ || (navigator.userAgent.indexOf("iPad")!=-1)
+ || (navigator.userAgent.indexOf("Android")!=-1)
+ || (navigator.userAgent.indexOf("Touch")!=-1));
+
+ if (this.config.touch){
+ this.xy.scroll_width = 0;
+ if (window.navigator.msPointerEnabled){
+ this._touch_events(["MSPointerMove", "MSPointerDown", "MSPointerUp"], function(ev){
+ if (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE ) return null;
+ return ev;
+ }, function(ev){
+ return (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);
+ });
+ } else
+ this._touch_events(["touchmove", "touchstart", "touchend"], function(ev){
+ if (ev.touches && ev.touches.length > 1) return null;
+ if (ev.touches[0])
+ return { target:ev.target, pageX:ev.touches[0].pageX, pageY:ev.touches[0].pageY };
+ else
+ return ev;
+ }, function(){ return false; });
+ }
+};
+
+scheduler._touch_events = function(names, accessor, ignore){
+ //webkit on android need to be handled separately
+ var a_webkit = (navigator.userAgent.indexOf("Android")!=-1) && (navigator.userAgent.indexOf("WebKit")!=-1);
+ var source, tracker, timer, drag_mode, scroll_mode, action_mode;
+ var dblclicktime = 0;
+
+ function check_direction_swipe(s_ev, e_ev, step){
+ if (!s_ev || !e_ev) return;
+
+ var dy = Math.abs(s_ev.pageY - e_ev.pageY);
+ var dx = Math.abs(s_ev.pageX - e_ev.pageX);
+ if (dx>step && (!dy || (dx/dy > 3))){
+ if (s_ev.pageX > e_ev.pageX)
+ scheduler._click.dhx_cal_next_button();
+ else
+ scheduler._click.dhx_cal_prev_button();
+ }
+ };
+ dhtmlxEvent(document.body, names[0], function(e){
+ if (ignore(e)) return;
+
+ if (drag_mode){
+ scheduler._on_mouse_move(accessor(e));
+ scheduler._update_global_tip();
+ if (e.preventDefault)
+ e.preventDefault();
+ e.cancelBubble = true;
+ return false;
+ }
+
+ if (tracker && a_webkit){
+ check_direction_swipe(tracker, accessor(e), 0);
+ }
+
+ tracker = accessor(e);
+ //ignore common and scrolling moves
+ if (!action_mode) return;
+
+ //multitouch
+ if (!tracker){
+ scroll_mode = true;
+ return;
+ }
+
+ //target changed - probably in scroll mode
+
+ if (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){
+ scroll_mode = true;
+ clearTimeout(timer);
+ }
+
+ });
+
+ dhtmlxEvent(this._els["dhx_cal_data"][0], "scroll", drag_cancel);
+ dhtmlxEvent(this._els["dhx_cal_data"][0], "touchcancel", drag_cancel);
+ dhtmlxEvent(this._els["dhx_cal_data"][0], "contextmenu", function(e){
+ if (action_mode){
+ if (e && e.preventDefault)
+ e.preventDefault();
+ (e||event).cancelBubble = true;
+ return false;
+ }
+ });
+ dhtmlxEvent(this._els["dhx_cal_data"][0], names[1], function(e){
+ if (ignore(e)) return;
+
+ drag_mode = scroll_mode = tracker = false;
+ action_mode = true;
+ scheduler._temp_touch_block = true;
+
+ var fake_event = tracker = accessor(e);
+ if (!fake_event){
+ scroll_mode = true;
+ return;
+ }
+
+ //dbl click
+ var now = new Date();
+
+ if (!scroll_mode && !drag_mode && now - dblclicktime < 250){
+ scheduler._click.dhx_cal_data(fake_event);
+ window.setTimeout(function(){
+ scheduler._on_dbl_click(fake_event);
+ }, 50);
+
+ if (e.preventDefault)
+ e.preventDefault();
+ e.cancelBubble = true;
+ scheduler._block_next_stop = true;
+ return false;
+ }
+ dblclicktime = now;
+
+ //drag
+
+ if (scroll_mode || drag_mode || !scheduler.config.touch_drag)
+ return;
+
+ //there is no target
+ timer = setTimeout(function(){
+
+ drag_mode = true;
+ var target = source.target;
+ if (target && target.className && target.className.indexOf("dhx_body") != -1)
+ target = target.previousSibling;
+
+ scheduler._on_mouse_down(source, target);
+ if (scheduler._drag_mode && scheduler._drag_mode != "create"){
+ var pos = -1;
+ scheduler.for_rendered(scheduler._drag_id, function(node, i) {
+ pos = node.getBoundingClientRect().top;
+ node.style.display='none';
+ scheduler._rendered.splice(i, 1);
+ });
+ if (pos>=0){
+ var step = scheduler.config.time_step;
+ scheduler._move_pos_shift = step* Math.round((fake_event.pageY - pos)*60/(scheduler.config.hour_size_px*step));
+ }
+ }
+
+ if (scheduler.config.touch_tip)
+ scheduler._show_global_tip();
+ scheduler._on_mouse_move(source);
+ },scheduler.config.touch_drag);
+
+ source = fake_event;
+ });
+ function drag_cancel(e){
+ scheduler._hide_global_tip();
+ if (drag_mode){
+ scheduler._on_mouse_up( accessor(e||event) );
+ scheduler._temp_touch_block = false;
+ }
+ scheduler._drag_id = null;
+ scheduler._drag_mode=null;
+ scheduler._drag_pos=null;
+
+ clearTimeout(timer);
+ drag_mode = action_mode = false;
+ scroll_mode = true;
+ }
+ dhtmlxEvent(this._els["dhx_cal_data"][0], names[2], function(e){
+ if (ignore(e)) return;
+
+ if (!drag_mode)
+ check_direction_swipe(source, tracker, 200);
+
+ if (drag_mode)
+ scheduler._ignore_next_click = true;
+
+ drag_cancel(e);
+ if (scheduler._block_next_stop){
+ scheduler._block_next_stop = false;
+ if (e.preventDefault)
+ e.preventDefault();
+ e.cancelBubble = true;
+ return false;
+ }
+ });
+
+ dhtmlxEvent(document.body, names[2], drag_cancel);
+};
+
+scheduler._show_global_tip = function(){
+ scheduler._hide_global_tip();
+
+ var toptip = scheduler._global_tip = document.createElement("DIV");
+ toptip.className='dhx_global_tip';
+
+ scheduler._update_global_tip(1);
+
+ document.body.appendChild(toptip);
+};
+scheduler._update_global_tip = function(init){
+ var toptip = scheduler._global_tip;
+ if (toptip){
+ var time = "";
+ if (scheduler._drag_id && !init){
+ var ev = scheduler.getEvent(scheduler._drag_id);
+ if (ev)
+ time = "<div>" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + "</div>";
+ }
+
+ if (scheduler._drag_mode == "create" || scheduler._drag_mode == "new-size")
+ toptip.innerHTML = (scheduler.locale.drag_to_create || "Drag to create")+time;
+ else
+ toptip.innerHTML = (scheduler.locale.drag_to_move || "Drag to move")+time;
+ }
+};
+scheduler._hide_global_tip = function(){
+ var toptip = scheduler._global_tip;
+ if (toptip && toptip.parentNode){
+ toptip.parentNode.removeChild(toptip);
+ scheduler._global_tip = 0;
+ }
+};
+
+scheduler._dp_init=function(dp){
+ dp._methods=["_set_event_text_style","","changeEventId","deleteEvent"];
+
+ this.attachEvent("onEventAdded",function(id){
+ if (!this._loading && this._validId(id))
+ dp.setUpdated(id,true,"inserted");
+ });
+ this.attachEvent("onConfirmedBeforeEventDelete", function(id){
+ if (!this._validId(id)) return;
+ var z=dp.getState(id);
+
+ if (z=="inserted" || this._new_event) { dp.setUpdated(id,false); return true; }
+ if (z=="deleted") return false;
+ if (z=="true_deleted") return true;
+
+ dp.setUpdated(id,true,"deleted");
+ return false;
+ });
+ this.attachEvent("onEventChanged",function(id){
+ if (!this._loading && this._validId(id))
+ dp.setUpdated(id,true,"updated");
+ });
+
+ dp._getRowData=function(id,pref){
+ var ev=this.obj.getEvent(id);
+ var data = {};
+
+ for (var a in ev){
+ if (a.indexOf("_")==0) continue;
+ if (ev[a] && ev[a].getUTCFullYear) //not very good, but will work
+ data[a] = this.obj.templates.xml_format(ev[a]);
+ else
+ data[a] = ev[a];
+ }
+
+ return data;
+ };
+ dp._clearUpdateFlag=function(){};
+
+ dp.attachEvent("insertCallback", scheduler._update_callback);
+ dp.attachEvent("updateCallback", scheduler._update_callback);
+ dp.attachEvent("deleteCallback", function(upd, id) {
+ this.obj.setUserData(id, this.action_param, "true_deleted");
+ this.obj.deleteEvent(id);
+ });
+
+};
+
+scheduler._validId=function(id){
+ return true;
+};
+
+scheduler.setUserData=function(id,name,value){
+ if (id)
+ this.getEvent(id)[name]=value;
+ else
+ this._userdata[name]=value;
+};
+scheduler.getUserData=function(id,name){
+ return id?this.getEvent(id)[name]:this._userdata[name];
+};
+scheduler._set_event_text_style=function(id,style){
+ this.for_rendered(id,function(r){
+ r.style.cssText+=";"+style;
+ });
+ var ev = this.getEvent(id);
+ ev["_text_style"]=style;
+ this.event_updated(ev);
+};
+
+scheduler._update_callback = function(upd,id){
+ var data = scheduler._xmlNodeToJSON(upd.firstChild);
+ data.text = data.text||data._tagvalue;
+ data.start_date = scheduler.templates.xml_date(data.start_date);
+ data.end_date = scheduler.templates.xml_date(data.end_date);
+
+ scheduler.addEvent(data);
+};
+scheduler._skin_settings = {
+ fix_tab_position: [1,0],
+ use_select_menu_space: [1,0],
+ wide_form: [1,0],
+
+ hour_size_px: [44,42],
+ displayed_event_color: ["#ff4a4a", "ffc5ab"],
+ displayed_event_text_color: ["#ffef80", "7e2727"]
+};
+
+scheduler._skin_xy = {
+ lightbox_additional_height: [90,50],
+ nav_height: [59,22],
+ bar_height: [24,20]
+};
+
+scheduler._configure = function(col, data, skin){
+ for (var key in data)
+ if (typeof col[key] == "undefined")
+ col[key] = data[key][skin];
+};
+scheduler._skin_init = function(){
+ if (!scheduler.skin){
+ var links = document.getElementsByTagName("link");
+ for (var i = 0; i < links.length; i++) {
+ var res = links[i].href.match("dhtmlxscheduler_([a-z]+).css");
+ if (res){
+ scheduler.skin = res[1];
+ break;
+ }
+ }
+ }
+
+
+
+ var set = 0;
+ if (scheduler.skin && scheduler.skin != "terrace") set = 1;
+
+ //apply skin related settings
+ this._configure(scheduler.config, scheduler._skin_settings, set);
+ this._configure(scheduler.xy, scheduler._skin_xy, set);
+
+ //classic skin need not any further customization
+ if (set) return;
+
+
+ var minic = scheduler.config.minicalendar;
+ if (minic) minic.padding = 14;
+
+ scheduler.templates.event_bar_date = function(start,end,ev) {
+ return "• <b>"+scheduler.templates.event_date(start)+"</b> ";
+ };
+
+ //scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'>&nbsp;</span><span class='dhx_time'></span><span class='dhx_title'></span><div class='dhx_close_icon'></div></div><div class='dhx_cal_larea'></div>";
+ scheduler.attachEvent("onTemplatesReady", function() {
+
+ var date_to_str = scheduler.date.date_to_str("%d");
+ var old_month_day = scheduler.templates.month_day;
+ scheduler.templates.month_day = function(date) {
+ if (this._mode == "month") {
+ var label = date_to_str(date);
+ if (date.getDate() == 1) {
+ label = scheduler.locale.date.month_full[date.getMonth()] + " " + label;
+ }
+ if (+date == +scheduler.date.date_part(new Date)) {
+ label = scheduler.locale.labels.dhx_cal_today_button + " " + label;
+ }
+ return label;
+ } else {
+ return old_month_day.call(this, date);
+ }
+ };
+
+ if (scheduler.config.fix_tab_position){
+ var navline_divs = scheduler._els["dhx_cal_navline"][0].getElementsByTagName('div');
+ var tabs = [];
+ var last = 211;
+ for (var i=0; i<navline_divs.length; i++) {
+ var div = navline_divs[i];
+ var name = div.getAttribute("name");
+ if (name) { // mode tab
+ div.style.right = "auto";
+ switch (name) {
+ case "day_tab":
+ div.style.left = "14px";
+ div.className += " dhx_cal_tab_first";
+ break;
+ case "week_tab":
+ div.style.left = "75px";
+ break;
+ case "month_tab":
+ div.style.left = "136px";
+ div.className += " dhx_cal_tab_last";
+ break;
+ default:
+ div.style.left = last+"px";
+ div.className += " dhx_cal_tab_standalone";
+ last = last + 14 + div.offsetWidth;
+ break;
+ }
+ }
+
+ }
+ }
+ });
+ scheduler._skin_init = function(){};
+};
+
+
+if (window.jQuery){
+
+(function( $ ){
+
+ var methods = [];
+ $.fn.dhx_scheduler = function(config){
+ if (typeof(config) === 'string') {
+ if (methods[config] ) {
+ return methods[config].apply(this, []);
+ }else {
+ $.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');
+ }
+ } else {
+ var views = [];
+ this.each(function() {
+ if (this && this.getAttribute){
+ if (!this.getAttribute("dhxscheduler")){
+ for (var key in config)
+ if (key!="data")
+ scheduler.config[key] = config[key];
+
+ if (!this.getElementsByTagName("div").length){
+ this.innerHTML = '<div class="dhx_cal_navline"><div class="dhx_cal_prev_button">&nbsp;</div><div class="dhx_cal_next_button">&nbsp;</div><div class="dhx_cal_today_button"></div><div class="dhx_cal_date"></div><div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div><div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div><div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div></div><div class="dhx_cal_header"></div><div class="dhx_cal_data"></div>';
+ this.className += " dhx_cal_container";
+ }
+ scheduler.init(this, scheduler.config.date, scheduler.config.mode);
+ if (config.data)
+ scheduler.parse(config.data);
+
+ views.push(scheduler);
+ }
+ }
+ });
+
+ if (views.length === 1) return views[0];
+ return views;
+ }
+ };
+
+
+
+
+})(jQuery);
+
+} \ No newline at end of file
diff --git a/sources/dhtmlxscheduler_classic.css b/sources/dhtmlxscheduler_classic.css
new file mode 100644
index 0000000..1ad4fc5
--- /dev/null
+++ b/sources/dhtmlxscheduler_classic.css
@@ -0,0 +1,1578 @@
+@charset "UTF-8";
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+
+.dhtmlx_message_area{
+ position:fixed;
+ right:5px;
+ width:250px;
+ z-index:1000;
+}
+
+.dhtmlx-info{
+ min-width: 120px;
+ padding:4px 4px 4px 20px;
+ font-family:Tahoma;
+ z-index: 10000;
+
+ margin:5px;
+ margin-bottom:10px;
+
+ -webkit-transition: all .5s ease;
+ -moz-transition: all .5s ease;
+ -o-transition: all .5s ease;
+ transition: all .5s ease;
+}
+.dhtmlx-info.hidden{
+ height:0px;
+ padding:0px;
+ border-width:0px;
+ margin:0px;
+ overflow:hidden;
+}
+
+.dhtmlx_modal_box{
+ overflow:hidden;
+ display: inline-block;
+ min-width: 300px;
+ width: 300px;
+ text-align: center;
+ position:fixed;
+
+ background-color: #fff;
+ background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%);
+ background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%);
+ box-shadow: 0px 0px 14px #888;
+
+ font-family: Tahoma;
+
+ z-index:20000;
+
+ border-radius:6px;
+ border: 1px solid #ffffff;
+}
+
+.dhtmlx_popup_title{
+ border-top-left-radius:5px;
+ border-top-right-radius:5px;
+
+ border-width:0px;
+
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%);
+}
+
+.dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{
+ user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select:-moz-none;
+
+ cursor:pointer;
+}
+
+.dhtmlx_popup_text{
+ overflow:hidden;
+}
+
+.dhtmlx_popup_controls{
+ border-radius:6px;
+ padding:5px;
+}
+
+.dhtmlx_popup_button, .dhtmlx_button{
+ height: 30px;
+ line-height:30px;
+
+ display: inline-block;
+ margin: 0 5px;
+ border-radius: 6px;
+
+ color:#FFF;
+}
+.dhtmlx_popup_button{
+ min-width: 120px;
+}
+
+div.dhx_modal_cover {
+ background-color:#000;
+ cursor:default;
+
+ filter:alpha(opacity = 20);
+ opacity: 0.2;
+
+ position: fixed;
+ z-index:19999;
+ left: 0px; top: 0px;
+ width: 100%; height: 100%;
+
+ border: none;
+ zoom: 1;
+}
+
+.dhtmlx-info img, .dhtmlx_modal_box img{
+ float:left;
+ margin-right:20px;
+}
+
+.dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC);
+}
+.dhtmlx-alert-error, .dhtmlx-confirm-error {
+ border: 1px solid #ff0000;
+}
+
+/*Skin section*/
+.dhtmlx_button, .dhtmlx_popup_button{
+ box-shadow: 0px 0px 4px #888;
+ border:1px solid #838383;
+}
+.dhtmlx_button input, .dhtmlx_popup_button div{
+ border:1px solid #FFF;
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%);
+
+ border-radius:6px;
+ font-size:15px;
+ font-weight:normal;
+ -moz-box-sizing:content-box;
+ box-sizing:content-box;
+
+ color:#fff; padding:0px; margin:0px;
+ vertical-align:top;
+
+ height:28px;
+ line-height:28px;
+}
+
+.dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{
+
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%);
+}
+.dhtmlx_popup_title{
+ color:#fff;
+ text-shadow: 1px 1px #000;
+ height:40px; line-height:40px;
+ font-size:20px;
+}
+.dhtmlx_popup_text{
+ margin:15px 15px 5px 15px;
+ font-size:14px;
+ color:#000;
+ min-height:30px;
+ border-radius:6px;
+}
+
+
+.dhtmlx-info, .dhtmlx-error{
+ font-size:14px;
+ color:#000;
+ box-shadow: 0px 0px 10px #888;
+
+ padding:0px;
+
+ background-color:#FFF;
+ border-radius:3px;
+ border:1px solid #ffffff;
+}
+.dhtmlx-info div{
+ padding:5px 10px 5px 10px;
+ background-color: #fff;
+
+ border-radius:3px;
+ border:1px solid #B8B8B8;
+}
+.dhtmlx-error{
+ background-color: #d81b1b;
+ border:1px solid #ff3c3c;
+ box-shadow: 0px 0px 10px #000;
+}
+.dhtmlx-error div{
+ background-color: #d81b1b;
+ border:1px solid #940000;
+ color:#FFF;
+}
+
+
+.dhx_cal_container{
+ background-color:#C2D5FC;
+ font-family:Tahoma;
+ font-size:8pt;
+ position:relative;
+ overflow:hidden;
+}
+.dhx_cal_container div{
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_navline{
+ height:20px;
+ position:absolute;
+ z-index:3;
+ width:750px;
+ color:#2F3A48;
+}
+.dhx_cal_navline div{
+ position:absolute;
+ top:2px;
+ white-space:nowrap;
+}
+.dhx_cal_navline .dhx_cal_date {
+ font-weight:600;
+ left:210px;
+ padding-top: 1px;
+}
+.dhx_cal_button .dhx_left_bg{
+ width:1px; overflow:hidden;
+ height:17px;
+ z-index:20;
+ top:0px;
+}
+.dhx_cal_prev_button{
+ background-image:url(imgs/buttons.png);
+ background-position:0px 0px;
+ width:29px; height:17px;
+ left:50px; cursor:pointer;
+}
+.dhx_cal_next_button{
+ background-image:url(imgs/buttons.png);
+ background-position: -30px 0px;
+ width:29px; height:17px;
+ left:80px; cursor:pointer;
+}
+.dhx_cal_today_button{
+ background-image:url(imgs/buttons.png);
+ background-position: -60px 0px;
+ width:75px; height:17px;
+ left:112px; cursor:pointer;
+ text-align:center;
+ text-decoration:underline;
+}
+.dhx_cal_tab{
+ width:59px; height:19px;
+ text-align:center;
+ text-decoration:underline;
+ padding-top:2px;
+ cursor:pointer;
+ background-color: #D8E1EA;
+
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.dhx_cal_tab.active{
+ text-decoration:none;
+
+ cursor:default;
+ font-weight:bold;
+ border: 1px dotted #586A7E;
+ border-bottom: 0;
+ background-color: #C2D5FC;
+}
+.dhx_cal_header{
+ position:absolute;
+ left:10px; top:23px;
+ width:750px;
+ border-top:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+ z-index:2;
+ overflow:hidden;
+ color:#2F3A48;
+}
+.dhx_cal_data{
+ -webkit-tap-highlight-color:transparent;
+ border-top:1px dotted #8894A3;
+ position:absolute;
+ top:44px;
+ width:600px;
+ overflow-y:auto;
+ overflow-x:hidden;
+ -webkit-overflow-scrolling: touch;
+}
+.dhx_cal_data{
+ -ms-touch-action: pan-y;
+}
+.dhx_cal_event, .dhx_cal_event_line, .dhx_cal_event_clear {
+ -ms-touch-action: none;
+}
+
+.dhx_scale_bar{
+ position:absolute;
+ text-align:center;
+ background-color:#C2D5FC;
+ padding-top:3px;
+ border-left:1px dotted #586A7E;
+}
+.dhx_scale_holder{
+ position:absolute;
+ border-right:1px dotted #586A7E;
+ background-image:url(imgs/databg.png);
+}
+.dhx_scale_holder_now{
+ position:absolute;
+ border-right:1px dotted #586A7E;
+ background-image:url(imgs/databg_now.png);
+}
+.dhx_scale_hour{
+ height:41px;
+ width:50px;
+ border-bottom:1px dotted #8894A3;
+ background-color:#C2D5FC;
+ text-align:center;
+ line-height:40px;
+ color:#586A7E;
+ overflow:hidden;
+}
+.dhx_month_head{
+ background-color:#EBEFF4;
+ color:#2F3A48;
+ height:18px;
+ padding-right:5px;
+ padding-top:3px;
+ text-align:right;
+ border-right:1px dotted #586A7E;
+}
+.dhx_month_body{
+ border-right:1px dotted #586A7E;
+ border-bottom:1px dotted #586A7E;
+ background-color:#FFFFFF;
+}
+.dhx_now .dhx_month_body{
+ background-color:#E2EDFF;
+}
+.dhx_after .dhx_month_body, .dhx_before .dhx_month_body{
+ background-color:#ECECEC;
+}
+.dhx_after .dhx_month_head, .dhx_before .dhx_month_head{
+ background-color:#E2E3E6;
+ color:#94A6BB;
+}
+.dhx_now .dhx_month_head{
+ background-color:#D1DEF4;
+ font-weight:bold;
+}
+.dhx_cal_drag{
+ position:absolute;
+ z-index:9999;
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ opacity:0.5;
+ filter:alpha(opacity=50);
+}
+.dhx_loading{
+ position:absolute;
+ width:128px;
+ height:15px;
+ background-image:url(imgs/loading.gif);
+ z-index:9999;
+}
+.dhx_multi_day_icon, .dhx_multi_day{
+ background-color:#E1E6FF;
+ background-repeat:no-repeat;
+ border-right:1px dotted #8894A3;
+}
+.dhx_multi_day{
+ position: absolute;
+ border-top:1px dotted #8894A3;
+}
+.dhx_multi_day_icon, .dhx_multi_day_icon_small{
+ background-position: center center;
+ background-color:#E1E6FF;
+ background-repeat:no-repeat;
+ border-bottom:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+}
+.dhx_multi_day_icon{
+ background-image:url(imgs/clock_big.gif);
+}
+.dhx_multi_day_icon_small{
+ background-image:url(imgs/clock_small.gif);
+
+}
+.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container {
+ background-color: #d0e5ff;
+}
+
+/* left border config option support */
+.dhx_scale_hour_border, .dhx_month_body_border, .dhx_scale_bar_border, .dhx_month_head_border {
+ border-left: 1px dotted #8894A3;
+}
+
+/* export to PDF and iCal buttons start */
+.dhx_cal_navline .dhx_cal_export{
+ width:18px;
+ height:18px;
+ margin:2px;
+ cursor:pointer;
+ top: 0px;
+}
+.dhx_cal_navline .dhx_cal_export.pdf{
+ left: 2px;
+ background-image:url('imgs/export_pdf.png');
+}
+.dhx_cal_navline .dhx_cal_export.ical{
+ left: 24px;
+ background-image:url('imgs/export_ical.png');
+}
+/* export to PDF and iCal buttons end */
+.dhx_cal_event .dhx_header, .dhx_cal_event .dhx_title, .dhx_cal_event .dhx_body, .dhx_cal_event .dhx_footer {
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ color:#887A2E;
+ overflow:hidden;
+ width:100%;
+
+ font-family:Tahoma;
+ font-size:8pt;
+}
+.dhx_move_denied .dhx_cal_event .dhx_header, .dhx_move_denied .dhx_cal_event .dhx_title{
+ cursor:default;
+}
+.dhx_cal_event .dhx_header{
+ height:1px;
+ margin-left:1px;
+ border-width:1px 1px 0px 1px;
+ cursor:pointer;
+}
+.dhx_cal_event .dhx_title {
+ height:12px;
+ border-width:0px 1px 1px 1px;
+ border-bottom-style:dotted;
+
+ font-size:7pt;
+ font-weight:bold;
+ text-align:center;
+
+ background-position:right;
+ background-repeat:no-repeat;
+ cursor:pointer;
+}
+.dhx_cal_event .dhx_body, .dhx_cal_event.dhx_cal_select_menu .dhx_body{
+ border-width:0 1px 1px 1px;
+ padding:5px;
+}
+.dhx_resize_denied, .dhx_resize_denied .dhx_event_resize {
+ cursor:default !important;
+}
+
+
+.dhx_cal_event .dhx_event_resize {
+ cursor:s-resize;
+}
+.dhx_cal_event .dhx_footer, .dhx_cal_event .dhx_select_menu_footer{
+ height:1px;
+ margin-left:2px;
+ border-width:0px 1px 1px 1px;
+ position: relative;
+}
+.dhx_cal_event_line{
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ border-radius:3px;
+ font-family:Tahoma;
+ font-size:8pt;
+ height:13px;
+ padding-left:10px;
+ color:#887A2E;
+ cursor:pointer;
+ overflow:hidden;
+}
+.dhx_cal_event_clear{
+ font-family:Tahoma;
+ font-size:8pt;
+ height:13px;
+ padding-left:2px;
+ color:#887A2E;
+ white-space:nowrap;
+ overflow:hidden;
+ cursor:pointer;
+}
+.dhx_in_move{
+ background-color:#FFFF80;
+}
+div.dhx_cal_editor{
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ border-top-style:dotted;
+ z-index:999;
+ position:absolute;
+ overflow:hidden;
+}
+textarea.dhx_cal_editor {
+ width: 100%;
+ height: 100%;
+ border: 0 solid black;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+}
+div.dhx_menu_head{
+ background-image:url(imgs/controls.gif);
+ background-position: 0px -43px;
+ width:10px; height:10px;
+ margin-left:5px; margin-top:1px;
+ border:none;
+ cursor:default;
+}
+div.dhx_menu_icon{
+ background-image:url(imgs/controls.gif);
+ width:20px; height:20px;
+ margin-left:-5px; margin-top:0px;
+ border:none;
+ cursor:pointer;
+}
+div.icon_details{
+ background-position: 0px 0px;
+}
+div.icon_edit{
+ background-position: -22px 0px;
+}
+div.icon_save{
+ background-position: -84px -1px;
+}
+div.icon_cancel{
+ background-position: -62px 0px;
+}
+div.icon_delete{
+ background-position: -42px 0px;
+}
+
+/*view more link in month view*/
+.dhx_month_link{
+ position: absolute;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ text-align: right;
+
+ cursor: pointer;
+ padding-right: 10px;
+}
+.dhx_month_link a{
+ color: blue;
+}
+.dhx_month_link a:hover{
+ text-decoration: underline;
+}
+.dhx_global_tip{
+ font-family:Tahoma, Helvetica;
+ text-align:center;
+ font-size:20px;
+ position:fixed;
+ top:60px; right:20px;
+ background-color: rgba(255,255,255,0.7);
+ color:#000;
+ z-index:10000;
+ padding:20px 30px; width:190px;
+}
+.dhx_global_tip div{
+ font-size:30px;
+}
+
+@media (-moz-touch-enabled) {
+ .dhx_cal_container{
+ user-select:none;
+ -moz-user-select:none;
+ }
+}
+.dhx_unselectable, .dhx_unselectable div{
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_light{
+ -webkit-tap-highlight-color:transparent;
+ background-color:#FFE763;
+ border-radius:5px;
+ font-family:Tahoma;
+ font-size:8pt;
+ border:1px solid #B7A64B;
+ color:#887A2E;
+
+ position:absolute;
+ z-index:10001;
+
+ width:580px;
+ height:300px;
+
+ box-shadow:5px 5px 5px #888;
+}
+.dhx_cal_light_wide{
+ width:650px;
+}
+.dhx_mark{
+ position:relative; top:3px;
+ background-image:url('./imgs/controls.gif');
+ background-position: 0px -43px;
+ padding-left:10px;
+}
+.dhx_ie6 .dhx_mark{
+ background-position: 6px -41px;
+}
+
+.dhx_cal_light select{
+ font-family:Tahoma;
+ font-size:8pt;
+ color:#887A2E;
+ padding:2px;
+ margin:0px;
+}
+.dhx_cal_ltitle{
+ padding:2px 0px 2px 5px;
+ overflow:hidden;
+ white-space:nowrap;
+}
+.dhx_cal_ltitle span{
+ white-space:nowrap;
+}
+.dhx_cal_lsection{
+ background-color:#DBCF8C;
+ color:#FFF4B5;
+ font-weight:bold;
+ padding:5px 0px 3px 10px;
+}
+.dhx_section_time{
+ background-color:#DBCF8C;
+ white-space:nowrap;
+}
+.dhx_cal_lsection .dhx_fullday{
+ float:right;
+ margin-right:5px;
+ color:#887A2E;
+ font-size:12px;
+ font-weight:normal;
+ line-height:20px;
+ vertical-align:top;
+ cursor:pointer;
+}
+.dhx_cal_lsection{
+ font-size:18px;
+ font-family:Arial;
+}
+.dhx_cal_ltext{
+ padding:2px 0px 2px 10px;
+ overflow:hidden;
+}
+.dhx_cal_ltext textarea{
+ background-color: #FFF4B5; /* #FFF4B5; should be the same for dhx_cal_larea, was transperent */
+ overflow:auto;
+ border:none;
+ color:#887A2E;
+ height:100%;
+ width:100%;
+ outline:none !important;
+ resize: none;
+}
+.dhx_time{
+ font-weight:bold;
+}
+.dhx_cal_light .dhx_title{
+ padding-left:10px;
+}
+.dhx_cal_larea{
+ border:1px solid #DCC43E;
+ background-color:#FFF4B5;
+ overflow:hidden;
+
+ margin-left:3px;
+
+ width:572px;
+ height:1px;
+}
+.dhx_btn_set{
+ padding:5px 10px 0px 10px;
+ float:left;
+}
+.dhx_btn_set div{
+ float:left;
+ height:21px;
+ line-height:21px;
+ vertical-align:middle;
+ cursor:pointer;
+}
+.dhx_save_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-84px 0px;
+ width:21px;
+
+}
+.dhx_cancel_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-63px 0px;
+ width:20px;
+}
+.dhx_delete_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-42px 0px;
+ width:20px;
+}
+.dhx_cal_cover{
+ width:100%;
+ height:100%;
+ position:absolute;
+ z-index:10000;
+ top:0px;
+ left:0px;
+ background-color:black;
+
+ opacity:0.1;
+ filter:alpha(opacity=10);
+}
+.dhx_custom_button{
+ padding:0px 3px 0px 3px;
+ color:#887A2E;
+ font-family:Tahoma;
+ font-size:8pt;
+ background-color:#FFE763;
+ font-weight:normal;
+ margin-right:5px;
+ margin-top:0px;
+ cursor:pointer;
+}
+.dhx_custom_button div{
+ cursor:pointer;
+ float:left;
+ height:21px;
+ line-height:21px;
+ vertical-align:middle;
+}
+
+
+.dhx_cal_light_wide .dhx_cal_larea{
+ border-top-width:0px;
+}
+.dhx_cal_light_wide .dhx_cal_lsection{
+ border:0px;
+ float:left;
+ text-align:right;
+ width:100px;
+ height:20px;
+ font-size:16px;
+ padding: 5px 0px 0px 10px;
+}
+.dhx_cal_light_wide .dhx_wrap_section{
+ border-top:1px solid #DBCF8C;
+ position:relative;
+ background-color:#DBCF8C;
+ overflow:hidden;
+}
+.dhx_cal_light_wide .dhx_section_time{
+ padding-top:2px !important;
+ height:20px !important;
+}
+.dhx_section_time{
+ text-align: center;
+}
+.dhx_cal_light_wide .dhx_cal_larea{
+ width:730px;
+}
+.dhx_cal_light_wide{
+ width:738px;
+}
+
+.dhx_cal_light_wide .dhx_section_time{
+ background:transparent;
+}
+.dhx_cal_light_wide .dhx_cal_checkbox label{
+ padding-left:0px;
+}
+.dhx_cal_wide_checkbox input{
+ margin-top:8px;
+ margin-left:14px;
+}
+.dhx_cal_light input{
+ font-family:Tahoma;
+ font-size:8pt;
+ color:#887A2E;
+}
+.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{
+ float:none;
+ margin-right:0px;
+ color:#FFF4B5;
+ font-weight:bold;
+ font-size:16px;
+ font-family:Arial;
+ cursor:pointer;
+}
+.dhx_custom_button{
+ float: right;
+ height: 21px;
+ width:90px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+.dhx_cal_light_wide .dhx_custom_button {
+ position:absolute;
+ top:0;
+ right:0;
+ margin-top: 2px;
+}
+.dhx_cal_light_wide .dhx_repeat_right {
+ margin-right: 55px;
+}
+.dhx_minical_popup{
+ position:absolute;z-index:10100;
+ width:251px; height:175px;
+}
+.dhx_scale_bar_header {
+ position: absolute;
+ border-bottom: 1px dotted #8894A3;
+ width: 100%;
+}
+.dhx_expand_icon {
+ position:absolute; top:0px; right:0px;
+ background-image:url(./imgs/collapse_expand_icon.gif);
+ width:18px; height:18px;
+ cursor:pointer;
+ background-position:0px 18px;
+ z-index:16;
+}
+.dhx_scheduler_agenda .dhx_cal_data {
+ background-image:url(./imgs/databg.png);
+}
+.dhx_agenda_area{
+ width:100%;
+ overflow-y:auto;
+ background-image:url(./imgs/databg.png);
+}
+.dhx_agenda_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_agenda_line div{
+ float:left;
+ width:188px;
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_agenda_area .dhx_agenda_line div{
+ border-right:0px dotted #8894A3;
+}
+.dhx_v_border{
+ position:absolute;
+ left:187px;
+ top:0;
+ border-right:1px dotted #8894A3;
+ width:1px;
+ height:100%;
+}
+.dhx_agenda_line .dhx_event_icon{
+ width:20px;
+ border-width:0px;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+.dhx_agenda_line span{
+ padding-left:5px;
+ line-height:21px;
+}
+
+
+.dhx_year_body{
+ border-left:1px dotted #586A7E;
+}
+.dhx_year_week{
+ position:relative;
+}
+.dhx_scale_bar_last{
+ border-right:1px dotted #586A7E;
+}
+.dhx_year_month{
+ height:18px;
+ padding-top:3px;
+ border:1px dotted #586A7E;
+ text-align:center;
+ vertical-align:middle;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head, .dhx_year_body .dhx_before .dhx_month_head a, .dhx_year_body .dhx_after .dhx_month_head a{
+ color:#E2E3E6 !important;
+}
+.dhx_year_body .dhx_month_body{
+ height:0px;
+ overflow:hidden;
+}
+.dhx_month_head.dhx_year_event{
+ background-color:#FFE763;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head{
+ cursor: default;
+}
+.dhx_year_tooltip{
+ border:1px solid #BBBBBB;
+ background-image:url(./imgs/databg.png);
+ position:absolute;
+ z-index:9998;
+ width:300px;
+ height:auto;
+ font-family:Tahoma;
+ font-size:8pt;
+ overflow:hidden;
+}
+
+.dhx_tooltip_line{
+ line-height:20px;
+ height:20px;
+ overflow:hidden;
+}
+
+.dhx_tooltip_line .dhx_event_icon{
+ width:20px; height:20px;
+ padding-right:10px;
+ float:left;
+ border-width:0px;
+ position:relative;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+
+.dhx_tooltip_date{
+ float:left;
+ width:auto;
+ padding-left:5px;
+ text-align:center;
+}
+
+.dhx_text_disabled{
+ color:#887A2E;
+ font-family:Tahoma;
+ font-size:8pt;
+}
+
+.dhx_mini_calendar{
+ -moz-box-shadow:5px 5px 5px #888; /*Doesn't work in IE*/
+ -khtml-box-shadow: 5px 5px 5px #888;
+
+ -moz-user-select:-moz-none;
+ -webkit-user-select:none;
+ -user-select:none;
+}
+
+.dhx_mini_calendar .dhx_month_head{
+ cursor:pointer;
+}
+.dhx_mini_calendar .dhx_calendar_click{
+ background-color: #C2D5FC;
+}
+.dhx_cal_navline div.dhx_minical_icon{
+ width:18px;
+ height:18px;
+ left:190px;
+ top:1px;
+ cursor:pointer;
+ background-image:url(./imgs/calendar.gif);
+}
+
+.dhx_matrix_scell {
+ height: 100%;
+}
+
+.dhx_matrix_cell, .dhx_matrix_scell{
+ overflow:hidden;
+ text-align:center;
+ vertical-align:middle;
+ border-bottom:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+}
+.dhx_matrix_cell{
+ background-color:white;
+}
+.dhx_matrix_line{
+ overflow: hidden;
+}
+.dhx_matrix_cell div, .dhx_matrix_scell div{
+ overflow:hidden;
+ text-align:center;
+ height:auto;
+}
+
+.dhx_cal_lsection .dhx_readonly{
+ font-size:9pt;
+ font-size:8pt;
+ padding:2px;
+ color:#887A2E;
+}
+.dhx_cal_event_line .dhx_event_resize {
+ cursor: w-resize;
+ background: url(./imgs/resize_dots.png) repeat-y;
+ position: absolute;
+ top: 0;
+ width: 4px;
+}
+.dhx_event_resize_start {
+ left: 0;
+}
+.dhx_event_resize_end {
+ right: 0;
+}
+
+/* Tree view */
+.dhx_matrix_scell.folder, .dhx_data_table.folder .dhx_matrix_cell{
+ background-color: #969394;
+ cursor: pointer;
+}
+.dhx_matrix_scell .dhx_scell_level0{
+ padding-left: 5px;
+}
+.dhx_matrix_scell .dhx_scell_level1{
+ padding-left: 20px;
+}
+.dhx_matrix_scell .dhx_scell_level2{
+ padding-left: 35px;
+}
+.dhx_matrix_scell .dhx_scell_level3{
+ padding-left: 50px;
+}
+.dhx_matrix_scell .dhx_scell_level4{
+ padding-left: 65px;
+}
+
+.dhx_matrix_scell.folder{
+ font-weight: bold;
+ text-align: left;
+}
+.dhx_matrix_scell.folder .dhx_scell_expand{
+ float: left;
+ width: 10px;
+ padding-right:3px;
+}
+.dhx_matrix_scell.folder .dhx_scell_name{
+ float: left;
+ width: auto;
+}
+.dhx_matrix_scell.item .dhx_scell_name{
+ padding-left:15px;
+ text-align: left;
+}
+.dhx_data_table.folder .dhx_matrix_cell{
+ border-right: 0;
+}
+.dhx_section_timeline {
+ overflow: hidden;
+ padding: 4px 0 2px 10px;
+}
+.dhx_section_timeline select{
+ width: 552px;
+}
+
+/* Tree view end*/
+
+/* Map view */
+.dhx_map_area{
+ width:100%;
+ height:100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-image:url(./imgs/databg.png);
+}
+.dhx_map_line .dhx_event_icon{
+ width:20px;
+ border-width:0px;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+.dhx_map_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_map {
+ position:absolute;
+}
+.dhx_map_line div{
+ float:left;
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .headline_description{
+ float:left;
+
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .dhx_map_description{
+ float:left;
+ border-right: 0 dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .headline_date, .dhx_map_line .headline_description {
+ border-left: 0;
+}
+.dhx_map_line .line_description {
+ float:left;
+ border-right:1px dotted #8894A3;
+ text-align:left;
+ padding-left:5px;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line.highlight{
+ background-color: #C4C5CC;
+}
+.dhx_map_area .dhx_map_line div{
+ border-right:0px dotted #8894A3;
+}
+/* Map view end */
+
+/* dhtmlXTooltip start */
+.dhtmlXTooltip.tooltip{
+ -moz-box-shadow:3px 3px 3px #888888;
+ -webkit-box-shadow:3px 3px 3px #888888;
+ -o-box-shadow:3px 3px 3px #888888;
+ box-shadow:3px 3px 3px #888888;
+ filter:
+ progid:DXImageTransform.Microsoft.Shadow(color='#888888', Direction=135, Strength=5)
+ ;
+ background-color:white;
+ border-left:1px dotted #887A2E;
+ border-top:1px dotted #887A2E;
+ color:#887A2E;
+ cursor:default;
+ padding:10px;
+ position:absolute;
+ z-index:500;
+ font-family: Tahoma;
+ font-size: 8pt;
+}
+/* dhtmlXTooltip end */
+
+/* Lightbox checkbox section */
+.dhx_cal_checkbox label {
+ padding-left: 5px;
+}
+/* Lightbox checkbox section end */
+
+
+/* Lightbox radiobuttons section */
+.dhx_cal_light .radio {
+ padding: 2px 0px 2px 10px;
+}
+.dhx_cal_light .radio input, .dhx_cal_light .radio label{
+ line-height: 15px;
+}
+.dhx_cal_light .radio input {
+ vertical-align: middle;
+ margin: 0px;
+ padding: 0px;
+}
+.dhx_cal_light .radio label {
+ vertical-align: middle;
+ padding-right: 10px;
+}
+/* Lightbox radiobuttons section end */
+
+
+/* Lightbox dhtmlx combo section */
+.dhx_cal_light .combo {
+ padding: 4px;
+}
+.dhx_cal_light_wide .dhx_combo_box/*, .dhx_cal_light_wide .combo*/ {
+ width: 608px !important;
+ left: 10px;
+}
+/* Lightbox dhtmlx combo section end */
+
+/* Agenda week start */
+.dhx_wa_column {
+ float: left;
+}
+.dhx_wa_column_last .dhx_wa_day_cont{
+ border-left: 1px dotted #8894A3;
+}
+.dhx_wa_scale_bar {
+ font-family: Tahoma;
+ padding-left: 10px;
+ font-size: 11px;
+ border-top: 1px dotted #8894A3;
+ border-bottom: 1px dotted #8894A3;
+}
+.dhx_wa_day_data {
+ background-color: #FCFEFC;
+ overflow-y: auto;
+}
+.dhx_wa_ev_body {
+ border-bottom: 1px dotted #778899;
+ font-size: 12px;
+ padding: 5px 0 5px 7px;
+}
+.dhx_wa_dnd {
+ font-family: Tahoma;
+ position: absolute;
+ padding-right: 7px;
+ color: #887AE2 !important;
+ background-color: #FFE763 !important;
+ border: 1px solid #B7A543;
+}
+.dhx_cal_event_selected{
+ background-color: #9cc1db;
+ color: white;
+}
+/* Agenda week end */
+
+/* timeline second scale start */
+.dhx_second_scale_bar {
+ border-bottom: 1px dotted #586A7E;
+ padding-top: 2px;
+}
+/* timeline second scale end */
+
+
+/* grid view */
+
+.dhx_cal_header div div{
+ border-left: 1px dotted #8894A3;
+}
+
+.dhx_grid_area{
+ width:100%;
+ height:100%;
+ overflow-y:auto;
+ background-color:#FCFEFC;
+}
+.dhx_grid_area table{
+ border-collapse: collapse;
+ border-spacing: 0;
+ width:100%;
+ table-layout:fixed;
+}
+.dhx_grid_area td{
+ table-layout:fixed;
+ text-align:center;
+}
+
+.dhx_grid_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_grid_line div{
+ float:left;
+ cursor:default;
+ padding-top: 0;
+ padding-bottom: 0;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+
+.dhx_grid_area td, .dhx_grid_line div{
+ padding-left:8px;
+ padding-right:8px;
+}
+
+
+.dhx_grid_area tr.dhx_grid_event{
+ height:21px;
+ overflow:hidden;
+ margin:0 0 1px 0;
+}
+.dhx_grid_area tr.dhx_grid_event td{
+ /*borders for old ies*/
+ border-bottom:1px solid #ECEEF4;
+}
+.dhx_grid_area tr.dhx_grid_event:nth-child(2n+1) td, .dhx_grid_area tr.dhx_grid_event:nth-child(2n) td{
+ border-bottom-width:0px;
+ border-bottom-style:none;
+}
+.dhx_grid_area tr.dhx_grid_event:nth-child(2n){
+ background-color:#ECEEF4;;
+}
+.dhx_grid_area .dhx_grid_dummy{
+ table-layout:auto;
+ margin:0 !important;
+ padding:0 !important;
+}
+
+.dhx_grid_v_border{
+ position:absolute;
+ border-right:1px solid #A4BED4;
+ width:1px;
+ height:100%;
+}
+
+.dhx_grid_event_selected{
+ background-color: #9cc1db !important;
+ color: white !important;
+}
+
+.dhx_grid_sort_desc .dhx_grid_view_sort{
+ background-position: 0 -55px;
+}
+.dhx_grid_sort_asc .dhx_grid_view_sort{
+ background-position: 0 -66px;
+}
+.dhx_grid_view_sort{
+ width:10px;
+ height:10px;
+ position: absolute;
+ border:none !important;
+ top: 5px;
+ background-repeat:no-repeat;
+ background-image: url(./imgs/images.png);
+}
+/* end grid */
+
+/* marked timespans */
+.dhx_marked_timespan {
+ position: absolute;
+ width: 100%;
+}
+.dhx_time_block {
+ position:absolute;
+ width:100%;
+ background:silver;
+ opacity:0.4;
+ filter:alpha(opacity=40);
+ z-index:1;
+}
+.dhx_time_block_reset {
+ opacity: 1;
+ filter:alpha(opacity=100);
+}
+.dhx_scheduler_month .dhx_marked_timespan {
+ display: none;
+}
+.dhx_mini_calendar .dhx_marked_timespan {
+ display: none;
+}
+/* now time */
+.dhx_now_time {
+ width:100%;
+ border-bottom:2px dotted red;
+ z-index: 1;
+}
+.dhx_scheduler_month .dhx_now_time {
+ border-bottom: 0;
+ border-left: 2px dotted red;
+}
+.dhx_matrix_now_time {
+ border-left:2px dotted red;
+ z-index: 1;
+}
+
+
+
+/* Quick info */
+.dhx_cal_quick_info{
+ border: 2px solid #888;
+ border-radius: 5px;
+ position: absolute;
+ z-index: 300;
+
+ background-color: rgb(142, 153, 174);
+ background-color: rgba(98,107,127,0.5);
+ padding-left: 7px;
+ width:300px;
+
+ transition: left 0.5s ease, right 0.5s;
+ -moz-transition: left 0.5s ease, right 0.5s;
+ -webkit-transition: left 0.5s ease, right 0.5s;
+ -o-transition: left 0.5s ease, right 0.5s;
+}
+.dhx_no_animate{
+ transition: none;
+ -moz-transition: none;
+ -webkit-transition: none;
+ -o-transition: none;
+}
+.dhx_cal_quick_info.dhx_qi_left .dhx_qi_big_icon{
+ float:right;
+}
+.dhx_cal_qi_title{
+ padding: 5px 0px 10px 5px;
+ color: #FFF;
+ letter-spacing:1px;
+}
+.dhx_cal_qi_tdate{
+ font-size:14px;
+}
+.dhx_cal_qi_tcontent{
+ font-size:18px;
+ font-weight:bold;
+}
+.dhx_cal_qi_content{
+ border: 1px solid #888;
+ background-color: #fefefe;
+ padding: 16px 8px;
+
+ font-size:14px;
+
+ color:#444;
+ width:275px;
+ overflow: hidden;
+}
+
+.dhx_qi_big_icon{
+ border-radius: 3px;
+ color:#444;
+
+ margin:5px 9px 5px 0px;
+ min-width:60px;
+ line-height:20px;
+ vertical-align:middle;
+ padding: 5px 10px 5px 5px;
+ cursor:pointer;
+ background-color:#fefefe;
+
+ border-bottom:1px solid #666;
+ border-right:1px solid #666;
+
+ float:left;
+}
+
+.dhx_cal_qi_controls div{
+ float: left;
+ height: 20px;
+ text-align: center;
+ line-height:20px;
+}
+.dhx_qi_big_icon .dhx_menu_icon{
+ margin: 0 8px 0 0px;
+}
+/*IE*/
+div.dhx_form_repeat input.radio { margin:-4px 0 0 -4px !ie; }
+div.dhx_form_repeat input.checkbox { margin:0 0 0 -4px !ie; }
+
+/*All*/
+.dhx_form_repeat, .dhx_form_repeat input {
+ padding:0;
+ margin:0;
+ padding-left:5px;
+ font-family:Tahoma, Verdana;
+ font-size:11px;
+ line-height:24px;
+}
+
+.dhx_form_repeat {
+ overflow:hidden;
+ /*height:115px;*/
+ height:0px;
+ background-color: #FFF4B5;
+ /*border: 1px solid #DCC43E;*/
+}
+
+.dhx_cal_light_wide .dhx_form_repeat {
+ background-color: transparent;
+}
+
+
+.dhx_repeat_center, .dhx_repeat_left{
+ height:115px;
+ padding:10px 0 10px 10px;
+ float:left;
+}
+
+.dhx_repeat_left{
+ width:95px;
+}
+
+.dhx_repeat_center{
+ width:335px;
+ margin-top:12px;
+}
+
+.dhx_repeat_divider{
+ float:left;
+ height:115px;
+ border-left:1px dotted #DCC43E;
+ /*background-color: #DCC43E;*/
+ width:1px;
+}
+
+.dhx_repeat_right {
+ float:right;
+ height:115px;
+ width:160px;
+ padding:10px 3px 10px 10px;
+ margin-top:7px;
+}
+
+input.dhx_repeat_text {
+ height:16px;
+ width: 27px;
+ margin: 0 4px 0 4px;
+ line-height:18px;
+ padding: 0 0 0 2px;
+}
+
+.dhx_form_repeat select {
+ height: 20px;
+ width: 87px;
+ padding:0 0 0 2px;
+ margin: 0 4px 0 4px;
+}
+
+input.dhx_repeat_date{
+ height: 18px;
+ width: 80px;
+ padding:0 0 0 2px;
+ margin: 0 4px 0 4px;
+ background-repeat:no-repeat;
+ background-position:64px 0;
+ border:1px #7f9db9 solid;
+ line-height:18px;
+}
+
+input.dhx_repeat_radio {
+ margin-right:4px;
+}
+
+input.dhx_repeat_checkbox {
+ margin:4px 4px 0 0;
+}
+
+.dhx_repeat_days td {
+ padding-right:5px;
+}
+.dhx_repeat_days label {
+ font-size:10px;
+}
+.dhx_custom_button{
+ width:90px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+.dhx_custom_button_recurring{
+ background-image:url(./imgs/but_repeat.gif);
+ background-position:-5px 20px;
+ width:20px;
+ margin-right:10px;
+}
+
+/* increase width of lightbox */
+.dhx_cal_light_rec{
+ width:640px;
+}
+.dhx_cal_light_rec .dhx_cal_larea{
+ width:632px;
+}
+.dhx_cal_light_rec.dhx_cal_light_wide{
+ width:816px;
+}
+.dhx_cal_light_rec.dhx_cal_light_wide .dhx_cal_larea{
+ width:808px;
+} \ No newline at end of file
diff --git a/sources/dhtmlxscheduler_glossy.css b/sources/dhtmlxscheduler_glossy.css
new file mode 100644
index 0000000..6e25302
--- /dev/null
+++ b/sources/dhtmlxscheduler_glossy.css
@@ -0,0 +1,1902 @@
+@charset "UTF-8";
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+
+.dhtmlx_message_area{
+ position:fixed;
+ right:5px;
+ width:250px;
+ z-index:1000;
+}
+
+.dhtmlx-info{
+ min-width: 120px;
+ padding:4px 4px 4px 20px;
+ font-family:Tahoma;
+ z-index: 10000;
+
+ margin:5px;
+ margin-bottom:10px;
+
+ -webkit-transition: all .5s ease;
+ -moz-transition: all .5s ease;
+ -o-transition: all .5s ease;
+ transition: all .5s ease;
+}
+.dhtmlx-info.hidden{
+ height:0px;
+ padding:0px;
+ border-width:0px;
+ margin:0px;
+ overflow:hidden;
+}
+
+.dhtmlx_modal_box{
+ overflow:hidden;
+ display: inline-block;
+ min-width: 300px;
+ width: 300px;
+ text-align: center;
+ position:fixed;
+
+ background-color: #fff;
+ background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%);
+ background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%);
+ box-shadow: 0px 0px 14px #888;
+
+ font-family: Tahoma;
+
+ z-index:20000;
+
+ border-radius:6px;
+ border: 1px solid #ffffff;
+}
+
+.dhtmlx_popup_title{
+ border-top-left-radius:5px;
+ border-top-right-radius:5px;
+
+ border-width:0px;
+
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%);
+}
+
+.dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{
+ user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select:-moz-none;
+
+ cursor:pointer;
+}
+
+.dhtmlx_popup_text{
+ overflow:hidden;
+}
+
+.dhtmlx_popup_controls{
+ border-radius:6px;
+ padding:5px;
+}
+
+.dhtmlx_popup_button, .dhtmlx_button{
+ height: 30px;
+ line-height:30px;
+
+ display: inline-block;
+ margin: 0 5px;
+ border-radius: 6px;
+
+ color:#FFF;
+}
+.dhtmlx_popup_button{
+ min-width: 120px;
+}
+
+div.dhx_modal_cover {
+ background-color:#000;
+ cursor:default;
+
+ filter:alpha(opacity = 20);
+ opacity: 0.2;
+
+ position: fixed;
+ z-index:19999;
+ left: 0px; top: 0px;
+ width: 100%; height: 100%;
+
+ border: none;
+ zoom: 1;
+}
+
+.dhtmlx-info img, .dhtmlx_modal_box img{
+ float:left;
+ margin-right:20px;
+}
+
+.dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC);
+}
+.dhtmlx-alert-error, .dhtmlx-confirm-error {
+ border: 1px solid #ff0000;
+}
+
+/*Skin section*/
+.dhtmlx_button, .dhtmlx_popup_button{
+ box-shadow: 0px 0px 4px #888;
+ border:1px solid #838383;
+}
+.dhtmlx_button input, .dhtmlx_popup_button div{
+ border:1px solid #FFF;
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%);
+
+ border-radius:6px;
+ font-size:15px;
+ font-weight:normal;
+ -moz-box-sizing:content-box;
+ box-sizing:content-box;
+
+ color:#fff; padding:0px; margin:0px;
+ vertical-align:top;
+
+ height:28px;
+ line-height:28px;
+}
+
+.dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{
+
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==);
+ background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%);
+ background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%);
+}
+.dhtmlx_popup_title{
+ color:#fff;
+ text-shadow: 1px 1px #000;
+ height:40px; line-height:40px;
+ font-size:20px;
+}
+.dhtmlx_popup_text{
+ margin:15px 15px 5px 15px;
+ font-size:14px;
+ color:#000;
+ min-height:30px;
+ border-radius:6px;
+}
+
+
+.dhtmlx-info, .dhtmlx-error{
+ font-size:14px;
+ color:#000;
+ box-shadow: 0px 0px 10px #888;
+
+ padding:0px;
+
+ background-color:#FFF;
+ border-radius:3px;
+ border:1px solid #ffffff;
+}
+.dhtmlx-info div{
+ padding:5px 10px 5px 10px;
+ background-color: #fff;
+
+ border-radius:3px;
+ border:1px solid #B8B8B8;
+}
+.dhtmlx-error{
+ background-color: #d81b1b;
+ border:1px solid #ff3c3c;
+ box-shadow: 0px 0px 10px #000;
+}
+.dhtmlx-error div{
+ background-color: #d81b1b;
+ border:1px solid #940000;
+ color:#FFF;
+}
+
+
+.dhx_cal_container{
+ background-color:#C2D5FC;
+ font-family:Tahoma;
+ font-size:8pt;
+ position:relative;
+ overflow:hidden;
+}
+.dhx_cal_container div{
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_navline{
+ height:20px;
+ position:absolute;
+ z-index:3;
+ width:750px;
+ color:#2F3A48;
+}
+.dhx_cal_navline div{
+ position:absolute;
+ top:2px;
+ white-space:nowrap;
+}
+.dhx_cal_navline .dhx_cal_date {
+ font-weight:600;
+ left:210px;
+ padding-top: 1px;
+}
+.dhx_cal_button .dhx_left_bg{
+ width:1px; overflow:hidden;
+ height:17px;
+ z-index:20;
+ top:0px;
+}
+.dhx_cal_prev_button{
+ background-image:url(imgs/buttons.png);
+ background-position:0px 0px;
+ width:29px; height:17px;
+ left:50px; cursor:pointer;
+}
+.dhx_cal_next_button{
+ background-image:url(imgs/buttons.png);
+ background-position: -30px 0px;
+ width:29px; height:17px;
+ left:80px; cursor:pointer;
+}
+.dhx_cal_today_button{
+ background-image:url(imgs/buttons.png);
+ background-position: -60px 0px;
+ width:75px; height:17px;
+ left:112px; cursor:pointer;
+ text-align:center;
+ text-decoration:underline;
+}
+.dhx_cal_tab{
+ width:59px; height:19px;
+ text-align:center;
+ text-decoration:underline;
+ padding-top:2px;
+ cursor:pointer;
+ background-color: #D8E1EA;
+
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.dhx_cal_tab.active{
+ text-decoration:none;
+
+ cursor:default;
+ font-weight:bold;
+ border: 1px dotted #586A7E;
+ border-bottom: 0;
+ background-color: #C2D5FC;
+}
+.dhx_cal_header{
+ position:absolute;
+ left:10px; top:23px;
+ width:750px;
+ border-top:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+ z-index:2;
+ overflow:hidden;
+ color:#2F3A48;
+}
+.dhx_cal_data{
+ -webkit-tap-highlight-color:transparent;
+ border-top:1px dotted #8894A3;
+ position:absolute;
+ top:44px;
+ width:600px;
+ overflow-y:auto;
+ overflow-x:hidden;
+ -webkit-overflow-scrolling: touch;
+}
+.dhx_cal_data{
+ -ms-touch-action: pan-y;
+}
+.dhx_cal_event, .dhx_cal_event_line, .dhx_cal_event_clear {
+ -ms-touch-action: none;
+}
+
+.dhx_scale_bar{
+ position:absolute;
+ text-align:center;
+ background-color:#C2D5FC;
+ padding-top:3px;
+ border-left:1px dotted #586A7E;
+}
+.dhx_scale_holder{
+ position:absolute;
+ border-right:1px dotted #586A7E;
+ background-image:url(imgs/databg.png);
+}
+.dhx_scale_holder_now{
+ position:absolute;
+ border-right:1px dotted #586A7E;
+ background-image:url(imgs/databg_now.png);
+}
+.dhx_scale_hour{
+ height:41px;
+ width:50px;
+ border-bottom:1px dotted #8894A3;
+ background-color:#C2D5FC;
+ text-align:center;
+ line-height:40px;
+ color:#586A7E;
+ overflow:hidden;
+}
+.dhx_month_head{
+ background-color:#EBEFF4;
+ color:#2F3A48;
+ height:18px;
+ padding-right:5px;
+ padding-top:3px;
+ text-align:right;
+ border-right:1px dotted #586A7E;
+}
+.dhx_month_body{
+ border-right:1px dotted #586A7E;
+ border-bottom:1px dotted #586A7E;
+ background-color:#FFFFFF;
+}
+.dhx_now .dhx_month_body{
+ background-color:#E2EDFF;
+}
+.dhx_after .dhx_month_body, .dhx_before .dhx_month_body{
+ background-color:#ECECEC;
+}
+.dhx_after .dhx_month_head, .dhx_before .dhx_month_head{
+ background-color:#E2E3E6;
+ color:#94A6BB;
+}
+.dhx_now .dhx_month_head{
+ background-color:#D1DEF4;
+ font-weight:bold;
+}
+.dhx_cal_drag{
+ position:absolute;
+ z-index:9999;
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ opacity:0.5;
+ filter:alpha(opacity=50);
+}
+.dhx_loading{
+ position:absolute;
+ width:128px;
+ height:15px;
+ background-image:url(imgs/loading.gif);
+ z-index:9999;
+}
+.dhx_multi_day_icon, .dhx_multi_day{
+ background-color:#E1E6FF;
+ background-repeat:no-repeat;
+ border-right:1px dotted #8894A3;
+}
+.dhx_multi_day{
+ position: absolute;
+ border-top:1px dotted #8894A3;
+}
+.dhx_multi_day_icon, .dhx_multi_day_icon_small{
+ background-position: center center;
+ background-color:#E1E6FF;
+ background-repeat:no-repeat;
+ border-bottom:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+}
+.dhx_multi_day_icon{
+ background-image:url(imgs/clock_big.gif);
+}
+.dhx_multi_day_icon_small{
+ background-image:url(imgs/clock_small.gif);
+
+}
+.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container {
+ background-color: #d0e5ff;
+}
+
+/* left border config option support */
+.dhx_scale_hour_border, .dhx_month_body_border, .dhx_scale_bar_border, .dhx_month_head_border {
+ border-left: 1px dotted #8894A3;
+}
+
+/* export to PDF and iCal buttons start */
+.dhx_cal_navline .dhx_cal_export{
+ width:18px;
+ height:18px;
+ margin:2px;
+ cursor:pointer;
+ top: 0px;
+}
+.dhx_cal_navline .dhx_cal_export.pdf{
+ left: 2px;
+ background-image:url('imgs/export_pdf.png');
+}
+.dhx_cal_navline .dhx_cal_export.ical{
+ left: 24px;
+ background-image:url('imgs/export_ical.png');
+}
+/* export to PDF and iCal buttons end */
+.dhx_cal_event .dhx_header, .dhx_cal_event .dhx_title, .dhx_cal_event .dhx_body, .dhx_cal_event .dhx_footer {
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ color:#887A2E;
+ overflow:hidden;
+ width:100%;
+
+ font-family:Tahoma;
+ font-size:8pt;
+}
+.dhx_move_denied .dhx_cal_event .dhx_header, .dhx_move_denied .dhx_cal_event .dhx_title{
+ cursor:default;
+}
+.dhx_cal_event .dhx_header{
+ height:1px;
+ margin-left:1px;
+ border-width:1px 1px 0px 1px;
+ cursor:pointer;
+}
+.dhx_cal_event .dhx_title {
+ height:12px;
+ border-width:0px 1px 1px 1px;
+ border-bottom-style:dotted;
+
+ font-size:7pt;
+ font-weight:bold;
+ text-align:center;
+
+ background-position:right;
+ background-repeat:no-repeat;
+ cursor:pointer;
+}
+.dhx_cal_event .dhx_body, .dhx_cal_event.dhx_cal_select_menu .dhx_body{
+ border-width:0 1px 1px 1px;
+ padding:5px;
+}
+.dhx_resize_denied, .dhx_resize_denied .dhx_event_resize {
+ cursor:default !important;
+}
+
+
+.dhx_cal_event .dhx_event_resize {
+ cursor:s-resize;
+}
+.dhx_cal_event .dhx_footer, .dhx_cal_event .dhx_select_menu_footer{
+ height:1px;
+ margin-left:2px;
+ border-width:0px 1px 1px 1px;
+ position: relative;
+}
+.dhx_cal_event_line{
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ border-radius:3px;
+ font-family:Tahoma;
+ font-size:8pt;
+ height:13px;
+ padding-left:10px;
+ color:#887A2E;
+ cursor:pointer;
+ overflow:hidden;
+}
+.dhx_cal_event_clear{
+ font-family:Tahoma;
+ font-size:8pt;
+ height:13px;
+ padding-left:2px;
+ color:#887A2E;
+ white-space:nowrap;
+ overflow:hidden;
+ cursor:pointer;
+}
+.dhx_in_move{
+ background-color:#FFFF80;
+}
+div.dhx_cal_editor{
+ background-color:#FFE763;
+ border:1px solid #B7A543;
+ border-top-style:dotted;
+ z-index:999;
+ position:absolute;
+ overflow:hidden;
+}
+textarea.dhx_cal_editor {
+ width: 100%;
+ height: 100%;
+ border: 0 solid black;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+}
+div.dhx_menu_head{
+ background-image:url(imgs/controls.gif);
+ background-position: 0px -43px;
+ width:10px; height:10px;
+ margin-left:5px; margin-top:1px;
+ border:none;
+ cursor:default;
+}
+div.dhx_menu_icon{
+ background-image:url(imgs/controls.gif);
+ width:20px; height:20px;
+ margin-left:-5px; margin-top:0px;
+ border:none;
+ cursor:pointer;
+}
+div.icon_details{
+ background-position: 0px 0px;
+}
+div.icon_edit{
+ background-position: -22px 0px;
+}
+div.icon_save{
+ background-position: -84px -1px;
+}
+div.icon_cancel{
+ background-position: -62px 0px;
+}
+div.icon_delete{
+ background-position: -42px 0px;
+}
+
+/*view more link in month view*/
+.dhx_month_link{
+ position: absolute;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ text-align: right;
+
+ cursor: pointer;
+ padding-right: 10px;
+}
+.dhx_month_link a{
+ color: blue;
+}
+.dhx_month_link a:hover{
+ text-decoration: underline;
+}
+.dhx_global_tip{
+ font-family:Tahoma, Helvetica;
+ text-align:center;
+ font-size:20px;
+ position:fixed;
+ top:60px; right:20px;
+ background-color: rgba(255,255,255,0.7);
+ color:#000;
+ z-index:10000;
+ padding:20px 30px; width:190px;
+}
+.dhx_global_tip div{
+ font-size:30px;
+}
+
+@media (-moz-touch-enabled) {
+ .dhx_cal_container{
+ user-select:none;
+ -moz-user-select:none;
+ }
+}
+.dhx_unselectable, .dhx_unselectable div{
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_light{
+ -webkit-tap-highlight-color:transparent;
+ background-color:#FFE763;
+ border-radius:5px;
+ font-family:Tahoma;
+ font-size:8pt;
+ border:1px solid #B7A64B;
+ color:#887A2E;
+
+ position:absolute;
+ z-index:10001;
+
+ width:580px;
+ height:300px;
+
+ box-shadow:5px 5px 5px #888;
+}
+.dhx_cal_light_wide{
+ width:650px;
+}
+.dhx_mark{
+ position:relative; top:3px;
+ background-image:url('./imgs/controls.gif');
+ background-position: 0px -43px;
+ padding-left:10px;
+}
+.dhx_ie6 .dhx_mark{
+ background-position: 6px -41px;
+}
+
+.dhx_cal_light select{
+ font-family:Tahoma;
+ font-size:8pt;
+ color:#887A2E;
+ padding:2px;
+ margin:0px;
+}
+.dhx_cal_ltitle{
+ padding:2px 0px 2px 5px;
+ overflow:hidden;
+ white-space:nowrap;
+}
+.dhx_cal_ltitle span{
+ white-space:nowrap;
+}
+.dhx_cal_lsection{
+ background-color:#DBCF8C;
+ color:#FFF4B5;
+ font-weight:bold;
+ padding:5px 0px 3px 10px;
+}
+.dhx_section_time{
+ background-color:#DBCF8C;
+ white-space:nowrap;
+}
+.dhx_cal_lsection .dhx_fullday{
+ float:right;
+ margin-right:5px;
+ color:#887A2E;
+ font-size:12px;
+ font-weight:normal;
+ line-height:20px;
+ vertical-align:top;
+ cursor:pointer;
+}
+.dhx_cal_lsection{
+ font-size:18px;
+ font-family:Arial;
+}
+.dhx_cal_ltext{
+ padding:2px 0px 2px 10px;
+ overflow:hidden;
+}
+.dhx_cal_ltext textarea{
+ background-color: #FFF4B5; /* #FFF4B5; should be the same for dhx_cal_larea, was transperent */
+ overflow:auto;
+ border:none;
+ color:#887A2E;
+ height:100%;
+ width:100%;
+ outline:none !important;
+ resize: none;
+}
+.dhx_time{
+ font-weight:bold;
+}
+.dhx_cal_light .dhx_title{
+ padding-left:10px;
+}
+.dhx_cal_larea{
+ border:1px solid #DCC43E;
+ background-color:#FFF4B5;
+ overflow:hidden;
+
+ margin-left:3px;
+
+ width:572px;
+ height:1px;
+}
+.dhx_btn_set{
+ padding:5px 10px 0px 10px;
+ float:left;
+}
+.dhx_btn_set div{
+ float:left;
+ height:21px;
+ line-height:21px;
+ vertical-align:middle;
+ cursor:pointer;
+}
+.dhx_save_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-84px 0px;
+ width:21px;
+
+}
+.dhx_cancel_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-63px 0px;
+ width:20px;
+}
+.dhx_delete_btn{
+ background-image:url('./imgs/controls.gif');
+ background-position:-42px 0px;
+ width:20px;
+}
+.dhx_cal_cover{
+ width:100%;
+ height:100%;
+ position:absolute;
+ z-index:10000;
+ top:0px;
+ left:0px;
+ background-color:black;
+
+ opacity:0.1;
+ filter:alpha(opacity=10);
+}
+.dhx_custom_button{
+ padding:0px 3px 0px 3px;
+ color:#887A2E;
+ font-family:Tahoma;
+ font-size:8pt;
+ background-color:#FFE763;
+ font-weight:normal;
+ margin-right:5px;
+ margin-top:0px;
+ cursor:pointer;
+}
+.dhx_custom_button div{
+ cursor:pointer;
+ float:left;
+ height:21px;
+ line-height:21px;
+ vertical-align:middle;
+}
+
+
+.dhx_cal_light_wide .dhx_cal_larea{
+ border-top-width:0px;
+}
+.dhx_cal_light_wide .dhx_cal_lsection{
+ border:0px;
+ float:left;
+ text-align:right;
+ width:100px;
+ height:20px;
+ font-size:16px;
+ padding: 5px 0px 0px 10px;
+}
+.dhx_cal_light_wide .dhx_wrap_section{
+ border-top:1px solid #DBCF8C;
+ position:relative;
+ background-color:#DBCF8C;
+ overflow:hidden;
+}
+.dhx_cal_light_wide .dhx_section_time{
+ padding-top:2px !important;
+ height:20px !important;
+}
+.dhx_section_time{
+ text-align: center;
+}
+.dhx_cal_light_wide .dhx_cal_larea{
+ width:730px;
+}
+.dhx_cal_light_wide{
+ width:738px;
+}
+
+.dhx_cal_light_wide .dhx_section_time{
+ background:transparent;
+}
+.dhx_cal_light_wide .dhx_cal_checkbox label{
+ padding-left:0px;
+}
+.dhx_cal_wide_checkbox input{
+ margin-top:8px;
+ margin-left:14px;
+}
+.dhx_cal_light input{
+ font-family:Tahoma;
+ font-size:8pt;
+ color:#887A2E;
+}
+.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday{
+ float:none;
+ margin-right:0px;
+ color:#FFF4B5;
+ font-weight:bold;
+ font-size:16px;
+ font-family:Arial;
+ cursor:pointer;
+}
+.dhx_custom_button{
+ float: right;
+ height: 21px;
+ width:90px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+.dhx_cal_light_wide .dhx_custom_button {
+ position:absolute;
+ top:0;
+ right:0;
+ margin-top: 2px;
+}
+.dhx_cal_light_wide .dhx_repeat_right {
+ margin-right: 55px;
+}
+.dhx_minical_popup{
+ position:absolute;z-index:10100;
+ width:251px; height:175px;
+}
+.dhx_scale_bar_header {
+ position: absolute;
+ border-bottom: 1px dotted #8894A3;
+ width: 100%;
+}
+.dhx_expand_icon {
+ position:absolute; top:0px; right:0px;
+ background-image:url(./imgs/collapse_expand_icon.gif);
+ width:18px; height:18px;
+ cursor:pointer;
+ background-position:0px 18px;
+ z-index:16;
+}
+.dhx_scheduler_agenda .dhx_cal_data {
+ background-image:url(./imgs/databg.png);
+}
+.dhx_agenda_area{
+ width:100%;
+ overflow-y:auto;
+ background-image:url(./imgs/databg.png);
+}
+.dhx_agenda_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_agenda_line div{
+ float:left;
+ width:188px;
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_agenda_area .dhx_agenda_line div{
+ border-right:0px dotted #8894A3;
+}
+.dhx_v_border{
+ position:absolute;
+ left:187px;
+ top:0;
+ border-right:1px dotted #8894A3;
+ width:1px;
+ height:100%;
+}
+.dhx_agenda_line .dhx_event_icon{
+ width:20px;
+ border-width:0px;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+.dhx_agenda_line span{
+ padding-left:5px;
+ line-height:21px;
+}
+
+
+.dhx_year_body{
+ border-left:1px dotted #586A7E;
+}
+.dhx_year_week{
+ position:relative;
+}
+.dhx_scale_bar_last{
+ border-right:1px dotted #586A7E;
+}
+.dhx_year_month{
+ height:18px;
+ padding-top:3px;
+ border:1px dotted #586A7E;
+ text-align:center;
+ vertical-align:middle;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head, .dhx_year_body .dhx_before .dhx_month_head a, .dhx_year_body .dhx_after .dhx_month_head a{
+ color:#E2E3E6 !important;
+}
+.dhx_year_body .dhx_month_body{
+ height:0px;
+ overflow:hidden;
+}
+.dhx_month_head.dhx_year_event{
+ background-color:#FFE763;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head{
+ cursor: default;
+}
+.dhx_year_tooltip{
+ border:1px solid #BBBBBB;
+ background-image:url(./imgs/databg.png);
+ position:absolute;
+ z-index:9998;
+ width:300px;
+ height:auto;
+ font-family:Tahoma;
+ font-size:8pt;
+ overflow:hidden;
+}
+
+.dhx_tooltip_line{
+ line-height:20px;
+ height:20px;
+ overflow:hidden;
+}
+
+.dhx_tooltip_line .dhx_event_icon{
+ width:20px; height:20px;
+ padding-right:10px;
+ float:left;
+ border-width:0px;
+ position:relative;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+
+.dhx_tooltip_date{
+ float:left;
+ width:auto;
+ padding-left:5px;
+ text-align:center;
+}
+
+.dhx_text_disabled{
+ color:#887A2E;
+ font-family:Tahoma;
+ font-size:8pt;
+}
+
+.dhx_mini_calendar{
+ -moz-box-shadow:5px 5px 5px #888; /*Doesn't work in IE*/
+ -khtml-box-shadow: 5px 5px 5px #888;
+
+ -moz-user-select:-moz-none;
+ -webkit-user-select:none;
+ -user-select:none;
+}
+
+.dhx_mini_calendar .dhx_month_head{
+ cursor:pointer;
+}
+.dhx_mini_calendar .dhx_calendar_click{
+ background-color: #C2D5FC;
+}
+.dhx_cal_navline div.dhx_minical_icon{
+ width:18px;
+ height:18px;
+ left:190px;
+ top:1px;
+ cursor:pointer;
+ background-image:url(./imgs/calendar.gif);
+}
+
+.dhx_matrix_scell {
+ height: 100%;
+}
+
+.dhx_matrix_cell, .dhx_matrix_scell{
+ overflow:hidden;
+ text-align:center;
+ vertical-align:middle;
+ border-bottom:1px dotted #8894A3;
+ border-right:1px dotted #8894A3;
+}
+.dhx_matrix_cell{
+ background-color:white;
+}
+.dhx_matrix_line{
+ overflow: hidden;
+}
+.dhx_matrix_cell div, .dhx_matrix_scell div{
+ overflow:hidden;
+ text-align:center;
+ height:auto;
+}
+
+.dhx_cal_lsection .dhx_readonly{
+ font-size:9pt;
+ font-size:8pt;
+ padding:2px;
+ color:#887A2E;
+}
+.dhx_cal_event_line .dhx_event_resize {
+ cursor: w-resize;
+ background: url(./imgs/resize_dots.png) repeat-y;
+ position: absolute;
+ top: 0;
+ width: 4px;
+}
+.dhx_event_resize_start {
+ left: 0;
+}
+.dhx_event_resize_end {
+ right: 0;
+}
+
+/* Tree view */
+.dhx_matrix_scell.folder, .dhx_data_table.folder .dhx_matrix_cell{
+ background-color: #969394;
+ cursor: pointer;
+}
+.dhx_matrix_scell .dhx_scell_level0{
+ padding-left: 5px;
+}
+.dhx_matrix_scell .dhx_scell_level1{
+ padding-left: 20px;
+}
+.dhx_matrix_scell .dhx_scell_level2{
+ padding-left: 35px;
+}
+.dhx_matrix_scell .dhx_scell_level3{
+ padding-left: 50px;
+}
+.dhx_matrix_scell .dhx_scell_level4{
+ padding-left: 65px;
+}
+
+.dhx_matrix_scell.folder{
+ font-weight: bold;
+ text-align: left;
+}
+.dhx_matrix_scell.folder .dhx_scell_expand{
+ float: left;
+ width: 10px;
+ padding-right:3px;
+}
+.dhx_matrix_scell.folder .dhx_scell_name{
+ float: left;
+ width: auto;
+}
+.dhx_matrix_scell.item .dhx_scell_name{
+ padding-left:15px;
+ text-align: left;
+}
+.dhx_data_table.folder .dhx_matrix_cell{
+ border-right: 0;
+}
+.dhx_section_timeline {
+ overflow: hidden;
+ padding: 4px 0 2px 10px;
+}
+.dhx_section_timeline select{
+ width: 552px;
+}
+
+/* Tree view end*/
+
+/* Map view */
+.dhx_map_area{
+ width:100%;
+ height:100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-image:url(./imgs/databg.png);
+}
+.dhx_map_line .dhx_event_icon{
+ width:20px;
+ border-width:0px;
+ background:url(./imgs/icon.png) no-repeat;
+ background-position: 5px 4px;
+ cursor:pointer;
+}
+.dhx_map_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_map {
+ position:absolute;
+}
+.dhx_map_line div{
+ float:left;
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .headline_description{
+ float:left;
+
+ border-right:1px dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .dhx_map_description{
+ float:left;
+ border-right: 0 dotted #8894A3;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line .headline_date, .dhx_map_line .headline_description {
+ border-left: 0;
+}
+.dhx_map_line .line_description {
+ float:left;
+ border-right:1px dotted #8894A3;
+ text-align:left;
+ padding-left:5px;
+ line-height:21px;
+ overflow:hidden;
+}
+.dhx_map_line.highlight{
+ background-color: #C4C5CC;
+}
+.dhx_map_area .dhx_map_line div{
+ border-right:0px dotted #8894A3;
+}
+/* Map view end */
+
+/* dhtmlXTooltip start */
+.dhtmlXTooltip.tooltip{
+ -moz-box-shadow:3px 3px 3px #888888;
+ -webkit-box-shadow:3px 3px 3px #888888;
+ -o-box-shadow:3px 3px 3px #888888;
+ box-shadow:3px 3px 3px #888888;
+ filter:
+ progid:DXImageTransform.Microsoft.Shadow(color='#888888', Direction=135, Strength=5)
+ ;
+ background-color:white;
+ border-left:1px dotted #887A2E;
+ border-top:1px dotted #887A2E;
+ color:#887A2E;
+ cursor:default;
+ padding:10px;
+ position:absolute;
+ z-index:500;
+ font-family: Tahoma;
+ font-size: 8pt;
+}
+/* dhtmlXTooltip end */
+
+/* Lightbox checkbox section */
+.dhx_cal_checkbox label {
+ padding-left: 5px;
+}
+/* Lightbox checkbox section end */
+
+
+/* Lightbox radiobuttons section */
+.dhx_cal_light .radio {
+ padding: 2px 0px 2px 10px;
+}
+.dhx_cal_light .radio input, .dhx_cal_light .radio label{
+ line-height: 15px;
+}
+.dhx_cal_light .radio input {
+ vertical-align: middle;
+ margin: 0px;
+ padding: 0px;
+}
+.dhx_cal_light .radio label {
+ vertical-align: middle;
+ padding-right: 10px;
+}
+/* Lightbox radiobuttons section end */
+
+
+/* Lightbox dhtmlx combo section */
+.dhx_cal_light .combo {
+ padding: 4px;
+}
+.dhx_cal_light_wide .dhx_combo_box/*, .dhx_cal_light_wide .combo*/ {
+ width: 608px !important;
+ left: 10px;
+}
+/* Lightbox dhtmlx combo section end */
+
+/* Agenda week start */
+.dhx_wa_column {
+ float: left;
+}
+.dhx_wa_column_last .dhx_wa_day_cont{
+ border-left: 1px dotted #8894A3;
+}
+.dhx_wa_scale_bar {
+ font-family: Tahoma;
+ padding-left: 10px;
+ font-size: 11px;
+ border-top: 1px dotted #8894A3;
+ border-bottom: 1px dotted #8894A3;
+}
+.dhx_wa_day_data {
+ background-color: #FCFEFC;
+ overflow-y: auto;
+}
+.dhx_wa_ev_body {
+ border-bottom: 1px dotted #778899;
+ font-size: 12px;
+ padding: 5px 0 5px 7px;
+}
+.dhx_wa_dnd {
+ font-family: Tahoma;
+ position: absolute;
+ padding-right: 7px;
+ color: #887AE2 !important;
+ background-color: #FFE763 !important;
+ border: 1px solid #B7A543;
+}
+.dhx_cal_event_selected{
+ background-color: #9cc1db;
+ color: white;
+}
+/* Agenda week end */
+
+/* timeline second scale start */
+.dhx_second_scale_bar {
+ border-bottom: 1px dotted #586A7E;
+ padding-top: 2px;
+}
+/* timeline second scale end */
+
+
+/* grid view */
+
+.dhx_cal_header div div{
+ border-left: 1px dotted #8894A3;
+}
+
+.dhx_grid_area{
+ width:100%;
+ height:100%;
+ overflow-y:auto;
+ background-color:#FCFEFC;
+}
+.dhx_grid_area table{
+ border-collapse: collapse;
+ border-spacing: 0;
+ width:100%;
+ table-layout:fixed;
+}
+.dhx_grid_area td{
+ table-layout:fixed;
+ text-align:center;
+}
+
+.dhx_grid_line{
+ height:21px;
+ clear:both;
+ overflow:hidden;
+}
+.dhx_grid_line div{
+ float:left;
+ cursor:default;
+ padding-top: 0;
+ padding-bottom: 0;
+ text-align:center;
+ line-height:21px;
+ overflow:hidden;
+}
+
+.dhx_grid_area td, .dhx_grid_line div{
+ padding-left:8px;
+ padding-right:8px;
+}
+
+
+.dhx_grid_area tr.dhx_grid_event{
+ height:21px;
+ overflow:hidden;
+ margin:0 0 1px 0;
+}
+.dhx_grid_area tr.dhx_grid_event td{
+ /*borders for old ies*/
+ border-bottom:1px solid #ECEEF4;
+}
+.dhx_grid_area tr.dhx_grid_event:nth-child(2n+1) td, .dhx_grid_area tr.dhx_grid_event:nth-child(2n) td{
+ border-bottom-width:0px;
+ border-bottom-style:none;
+}
+.dhx_grid_area tr.dhx_grid_event:nth-child(2n){
+ background-color:#ECEEF4;;
+}
+.dhx_grid_area .dhx_grid_dummy{
+ table-layout:auto;
+ margin:0 !important;
+ padding:0 !important;
+}
+
+.dhx_grid_v_border{
+ position:absolute;
+ border-right:1px solid #A4BED4;
+ width:1px;
+ height:100%;
+}
+
+.dhx_grid_event_selected{
+ background-color: #9cc1db !important;
+ color: white !important;
+}
+
+.dhx_grid_sort_desc .dhx_grid_view_sort{
+ background-position: 0 -55px;
+}
+.dhx_grid_sort_asc .dhx_grid_view_sort{
+ background-position: 0 -66px;
+}
+.dhx_grid_view_sort{
+ width:10px;
+ height:10px;
+ position: absolute;
+ border:none !important;
+ top: 5px;
+ background-repeat:no-repeat;
+ background-image: url(./imgs/images.png);
+}
+/* end grid */
+
+/* marked timespans */
+.dhx_marked_timespan {
+ position: absolute;
+ width: 100%;
+}
+.dhx_time_block {
+ position:absolute;
+ width:100%;
+ background:silver;
+ opacity:0.4;
+ filter:alpha(opacity=40);
+ z-index:1;
+}
+.dhx_time_block_reset {
+ opacity: 1;
+ filter:alpha(opacity=100);
+}
+.dhx_scheduler_month .dhx_marked_timespan {
+ display: none;
+}
+.dhx_mini_calendar .dhx_marked_timespan {
+ display: none;
+}
+/* now time */
+.dhx_now_time {
+ width:100%;
+ border-bottom:2px dotted red;
+ z-index: 1;
+}
+.dhx_scheduler_month .dhx_now_time {
+ border-bottom: 0;
+ border-left: 2px dotted red;
+}
+.dhx_matrix_now_time {
+ border-left:2px dotted red;
+ z-index: 1;
+}
+
+
+
+/* Quick info */
+.dhx_cal_quick_info{
+ border: 2px solid #888;
+ border-radius: 5px;
+ position: absolute;
+ z-index: 300;
+
+ background-color: rgb(142, 153, 174);
+ background-color: rgba(98,107,127,0.5);
+ padding-left: 7px;
+ width:300px;
+
+ transition: left 0.5s ease, right 0.5s;
+ -moz-transition: left 0.5s ease, right 0.5s;
+ -webkit-transition: left 0.5s ease, right 0.5s;
+ -o-transition: left 0.5s ease, right 0.5s;
+}
+.dhx_no_animate{
+ transition: none;
+ -moz-transition: none;
+ -webkit-transition: none;
+ -o-transition: none;
+}
+.dhx_cal_quick_info.dhx_qi_left .dhx_qi_big_icon{
+ float:right;
+}
+.dhx_cal_qi_title{
+ padding: 5px 0px 10px 5px;
+ color: #FFF;
+ letter-spacing:1px;
+}
+.dhx_cal_qi_tdate{
+ font-size:14px;
+}
+.dhx_cal_qi_tcontent{
+ font-size:18px;
+ font-weight:bold;
+}
+.dhx_cal_qi_content{
+ border: 1px solid #888;
+ background-color: #fefefe;
+ padding: 16px 8px;
+
+ font-size:14px;
+
+ color:#444;
+ width:275px;
+ overflow: hidden;
+}
+
+.dhx_qi_big_icon{
+ border-radius: 3px;
+ color:#444;
+
+ margin:5px 9px 5px 0px;
+ min-width:60px;
+ line-height:20px;
+ vertical-align:middle;
+ padding: 5px 10px 5px 5px;
+ cursor:pointer;
+ background-color:#fefefe;
+
+ border-bottom:1px solid #666;
+ border-right:1px solid #666;
+
+ float:left;
+}
+
+.dhx_cal_qi_controls div{
+ float: left;
+ height: 20px;
+ text-align: center;
+ line-height:20px;
+}
+.dhx_qi_big_icon .dhx_menu_icon{
+ margin: 0 8px 0 0px;
+}
+/*IE*/
+div.dhx_form_repeat input.radio { margin:-4px 0 0 -4px !ie; }
+div.dhx_form_repeat input.checkbox { margin:0 0 0 -4px !ie; }
+
+/*All*/
+.dhx_form_repeat, .dhx_form_repeat input {
+ padding:0;
+ margin:0;
+ padding-left:5px;
+ font-family:Tahoma, Verdana;
+ font-size:11px;
+ line-height:24px;
+}
+
+.dhx_form_repeat {
+ overflow:hidden;
+ /*height:115px;*/
+ height:0px;
+ background-color: #FFF4B5;
+ /*border: 1px solid #DCC43E;*/
+}
+
+.dhx_cal_light_wide .dhx_form_repeat {
+ background-color: transparent;
+}
+
+
+.dhx_repeat_center, .dhx_repeat_left{
+ height:115px;
+ padding:10px 0 10px 10px;
+ float:left;
+}
+
+.dhx_repeat_left{
+ width:95px;
+}
+
+.dhx_repeat_center{
+ width:335px;
+ margin-top:12px;
+}
+
+.dhx_repeat_divider{
+ float:left;
+ height:115px;
+ border-left:1px dotted #DCC43E;
+ /*background-color: #DCC43E;*/
+ width:1px;
+}
+
+.dhx_repeat_right {
+ float:right;
+ height:115px;
+ width:160px;
+ padding:10px 3px 10px 10px;
+ margin-top:7px;
+}
+
+input.dhx_repeat_text {
+ height:16px;
+ width: 27px;
+ margin: 0 4px 0 4px;
+ line-height:18px;
+ padding: 0 0 0 2px;
+}
+
+.dhx_form_repeat select {
+ height: 20px;
+ width: 87px;
+ padding:0 0 0 2px;
+ margin: 0 4px 0 4px;
+}
+
+input.dhx_repeat_date{
+ height: 18px;
+ width: 80px;
+ padding:0 0 0 2px;
+ margin: 0 4px 0 4px;
+ background-repeat:no-repeat;
+ background-position:64px 0;
+ border:1px #7f9db9 solid;
+ line-height:18px;
+}
+
+input.dhx_repeat_radio {
+ margin-right:4px;
+}
+
+input.dhx_repeat_checkbox {
+ margin:4px 4px 0 0;
+}
+
+.dhx_repeat_days td {
+ padding-right:5px;
+}
+.dhx_repeat_days label {
+ font-size:10px;
+}
+.dhx_custom_button{
+ width:90px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+.dhx_custom_button_recurring{
+ background-image:url(./imgs/but_repeat.gif);
+ background-position:-5px 20px;
+ width:20px;
+ margin-right:10px;
+}
+
+/* increase width of lightbox */
+.dhx_cal_light_rec{
+ width:640px;
+}
+.dhx_cal_light_rec .dhx_cal_larea{
+ width:632px;
+}
+.dhx_cal_light_rec.dhx_cal_light_wide{
+ width:816px;
+}
+.dhx_cal_light_rec.dhx_cal_light_wide .dhx_cal_larea{
+ width:808px;
+}
+.dhx_cal_tab.active{
+ border:none;
+}
+.dhx_multi_day{
+ border:none;
+ border-top:1px solid #A4BED4;
+}
+.dhx_multi_day_icon, .dhx_multi_day_icon_small{
+ border-right:none;
+}
+.dhx_cal_container {
+ background-image:url(imgs_glossy/top-days-bg.png);
+ background-position:0 24px;
+ background-repeat:repeat-x;
+ background-color:#EBEBEB;
+}
+.dhx_cal_navline{
+ background-color:#EBEBEB;
+ height:23px !important;
+}
+.dhx_cal_prev_button{
+ background-image:url(imgs_glossy/buttons.gif);
+ width:30px;
+ height:20px;
+}
+.dhx_cal_next_button{
+ background-image:url(imgs_glossy/buttons.gif);
+ width:30px;
+ height:20px;
+}
+.dhx_cal_today_button{
+ padding-top:3px;
+ background-image:url(imgs_glossy/buttons.gif);
+ width:67px;
+ left:110px;
+ text-decoration:none;
+}
+.dhx_cal_navline .dhx_cal_date{
+ padding-top:4px;
+ left:230px;
+}
+.dhx_cal_tab{
+ background-image:url(imgs_glossy/white_tab.png);
+ width:60px;
+ height:15px;
+ text-decoration:none;
+ padding-top:4px;
+ margin-top: 4px;
+}
+.dhx_cal_tab.active{
+ background-image:url(imgs_glossy/blue_tab.png);
+ height:18px;
+ width:60px;
+ padding-top:4px;
+ margin-top: 2px;
+}
+.dhx_cal_data{
+ border-top: 1px solid #A4BED4;
+}
+.dhx_cal_header{
+ background-image:url(imgs_glossy/top-days-bg.png);
+ background-repeat:repeat-x;
+ border-top: 0px;
+ border-right: 0px;
+}
+.dhx_scale_bar{
+ background-image:url(imgs_glossy/top-separator.gif);
+ background-position: 0px 0px;
+ background-repeat:no-repeat;
+ background-color: transparent;
+ padding-top:3px;
+ border-left:0px;
+}
+
+.dhx_scale_holder {
+ border-right:1px solid #A4BED4;
+}
+.dhx_scale_holder_now{
+ border-right:1px solid #A4BED4;
+}
+.dhx_scale_hour{
+ background-image:url(imgs_glossy/left-time-bg.png);
+ border-bottom:1px solid #A4BED4;
+ color:#2F3A48;
+}
+.dhx_multi_day{
+ background-image:url(imgs_glossy/multi-days-bg.png);
+ background-repeat:repeat;
+ border-bottom:1px solid #A4BED4;
+ border-left:0px;
+}
+.dhx_multi_day_icon,.dhx_multi_day_icon_small{
+ background-image: url(imgs_glossy/clock_big.png);
+ border-bottom: 1px solid #A4BED4;
+ border-left: 1px solid #ffffff;
+ background-color: transparent;
+ background-repeat: no-repeat;
+}
+.dhx_multi_day_icon_small{
+ background-image:url(imgs_glossy/clock_small.png);
+}
+.dhx_month_head{
+ background-color:#FFFFFF;
+}
+.dhx_after .dhx_month_head,.dhx_before .dhx_month_head{
+ background-color:#EFEDE2;
+}
+.dhx_now .dhx_month_head{
+ background-color:#E4EFFF;
+}
+.dhx_after .dhx_month_body,.dhx_before .dhx_month_body{
+ background-color:#EFEDE2;
+}
+.dhx_cal_event div{
+ border:1px solid #FFBD51;
+ background-color:#FFE4AB;
+ color:#000000;
+}
+.dhx_cal_event_clear{
+ color:#000000;
+}
+.dhx_cal_event_line{
+ background-image:url(imgs_glossy/event-bg.png);
+ border:1px solid #FFBD51;
+ color:#000000;
+}
+.dhx_in_move{
+ background-image:url(imgs_glossy/move.png);
+}
+.dhx_cal_event .dhx_body{
+ background-color:#FFE4AB;
+}
+.dhx_cal_event .dhx_title{
+ background-color:#FFE4AB;
+}
+.dhx_cal_light{
+ -moz-box-shadow:5px 5px 5px #888888;
+ -khtml-box-shadow: 5px 5px 5px #888;
+ background-color:#EBEBEB;
+ border:2px solid #A4BED4;
+ color:#000000;
+}
+.dhx_cal_larea{
+ border:1px solid #A4BED4;
+ border-width:0 1px 1px;
+ background-color:#FFFFFF;
+}
+
+.dhx_cal_lsection{
+ background-image:url(imgs_glossy/lightbox.png);
+ font-size:14px;
+ padding:5px 0 5px 10px;
+ color:#000000;
+}
+.dhx_cal_light_wide .dhx_cal_lsection{
+ background-image:url(imgs_glossy/multi-days-bg.png);
+}
+
+
+.dhx_cal_ltext textarea{
+ background-color:#ffffff;
+ color:#000000;
+}
+
+.dhx_cal_light select, .dhx_cal_light input{
+ color:#000000;
+}
+.dhx_save_btn{
+ background-image:url(imgs_glossy/controlls5.png);
+}
+.dhx_cancel_btn{
+ background-image:url(imgs_glossy/controlls5.png);
+}
+.dhx_delete_btn{
+ background-image:url(imgs_glossy/controlls5.png);
+}
+div.dhx_menu_head{
+ background-image:url(imgs_glossy/controlls5.png);
+ border:1px solid #FFE4AB;
+}
+div.dhx_menu_icon{
+ background-image:url(imgs_glossy/controlls5.png);
+ border:medium none;
+}
+.dhx_section_time{
+ height:20px !important;
+ padding:7px 0 !important;
+ text-align:center;
+ background:white;
+}
+
+div.dhx_cal_editor{
+ background-color:#FFE4AB;
+}
+.dhx_year_month{
+ background-image:url(imgs_glossy/top-days-bg.png);
+ border: 0px;
+}
+.dhx_year_week{
+ background-image:url(imgs_glossy/top-days-bg.png);
+}
+.dhx_month_head{
+ border-right:1px solid #A4BED4;
+}
+.dhx_month_body, .dhx_matrix_cell, .dhx_matrix_scell{
+ border-right:1px solid #A4BED4;
+ border-bottom:1px solid #A4BED4;
+}
+.dhx_year_body{
+ border-left:1px solid #A4BED4;
+}
+.dhx_scale_bar_last{
+ border-right: none;
+}
+.dhx_month_head.dhx_year_event{
+ background-color:#FFE4AB;
+}
+.dhx_year_body .dhx_before .dhx_month_head, .dhx_year_body .dhx_after .dhx_month_head, .dhx_year_body .dhx_before .dhx_month_head a, .dhx_year_body .dhx_after .dhx_month_head a{
+ color:#EFEDE2 !important;
+}
+.dhx_cal_lsection .dhx_readonly{
+ color:#000000;
+}
+.dhx_year_tooltip{
+ -moz-box-shadow:2px 2px 2px #888; /*Doesn't work in IE*/
+ -khtml-box-shadow: 2px 2px 2px #888;
+}
+.dhx_custom_button {
+ margin-top: -2px;
+}
+/*2.3*/
+.dhx_cal_lsection .dhx_fullday{
+ color:#000000;
+}
+
+.dhx_cal_lsection.dhx_cal_checkbox{
+ height:16px;
+ line-height:18px;
+}
+.dhx_cal_light_wide .dhx_cal_lsection.dhx_cal_checkbox{
+ height:20px;
+}
+
+.dhx_cal_light_wide .dhx_combo_box {
+ width: 602px !important;
+ left: 0px;
+}
+.dhx_cal_checkbox label{
+ vertical-align:top;
+}
+
+.dhx_cal_light_wide .dhx_cal_lsection{
+ color:black;
+}
+
+.dhx_cal_light_wide .dhx_wrap_section{
+ border-top:1px solid #A4BED4;
+ background-image:url(imgs_glossy/multi-days-bg.png);
+}
+.dhx_cal_light_wide .dhx_cal_ltext{
+ border-left:1px solid #A4BED4;
+}
+.dhx_cal_light_wide .dhx_cal_ltext {
+ background-color:white;
+}
+.dhx_custom_button{
+ background:white;
+ color:black;
+}
+.dhx_form_repeat{
+ background:white;
+}
+.dhx_repeat_divider{
+ border-left:1px solid #A4BED4;
+}
+
+/* timeline second scale start */
+.dhx_cal_header.dhx_second_cal_header {
+ background-image: url("imgs_glossy/second-top-days-bg.png");
+ padding-right: 20px;
+}
+.dhx_cal_header div div {
+ border-left: 0;
+}
+.dhx_scale_bar {
+ padding-top: 4px;
+}
+.dhx_second_scale_bar {
+ border-bottom: 0;
+ padding-top: 4px;
+}
+
+/* timeline second scale end */
+.dhx_cal_light_wide .dhx_cal_lsection .dhx_fullday, .dhx_cal_lsection .dhx_fullday{
+ color:#000000;
+ font-size: 14px;
+}
+.dhx_cal_light_wide .dhx_cal_lsection {
+ font-size: 14px;
+ padding-right:10px;
+}
+
+/* left border config option support */
+.dhx_scale_hour_border, .dhx_month_body_border, .dhx_scale_bar_border, .dhx_month_head_border {
+ border-left: 1px solid #A4BED4;
+}
+
+/* export to PDF and iCal buttons start */
+.dhx_cal_navline .dhx_cal_export{
+ width:18px;
+ height:18px;
+ margin:2px;
+ cursor:pointer;
+ top: 1px;
+}
+.dhx_cal_navline .dhx_cal_export.pdf{
+ left: 2px;
+ background-image:url('imgs_glossy/export_pdf.png');
+}
+.dhx_cal_navline .dhx_cal_export.ical{
+ left: 24px;
+ background-image:url('imgs_glossy/export_ical.png');
+}
+/* export to PDF and iCal buttons end */ \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_active_links.js b/sources/ext/dhtmlxscheduler_active_links.js
new file mode 100644
index 0000000..68786d8
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_active_links.js
@@ -0,0 +1,28 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.active_link_view = "day";
+scheduler.attachEvent("onTemplatesReady", function() {
+ var s_d = scheduler.date.str_to_date(scheduler.config.api_date);
+ var d_s = scheduler.date.date_to_str(scheduler.config.api_date);
+
+ var month_x = scheduler.templates.month_day;
+ scheduler.templates.month_day = function(date) {
+ return "<a jump_to='" + d_s(date) + "' href='#'>" + month_x(date) + "</a>";
+ };
+ var week_x = scheduler.templates.week_scale_date;
+ scheduler.templates.week_scale_date = function(date) {
+ return "<a jump_to='" + d_s(date) + "' href='#'>" + week_x(date) + "</a>";
+ };
+ dhtmlxEvent(this._obj, "click", function(e) {
+ var start = e.target || event.srcElement;
+ var to = start.getAttribute("jump_to");
+ if (to) {
+ scheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);
+ if (e && e.preventDefault)
+ e.preventDefault();
+ return false;
+ }
+ })
+}); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_agenda_view.js b/sources/ext/dhtmlxscheduler_agenda_view.js
new file mode 100644
index 0000000..d3845c8
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_agenda_view.js
@@ -0,0 +1,120 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.date.add_agenda = function(date){
+ return scheduler.date.add(date, 1, "year");
+};
+
+scheduler.templates.agenda_time = function(start,end,ev){
+ if (ev._timed)
+ return this.day_date(ev.start_date, ev.end_date, ev)+" "+this.event_date(start);
+ else
+ return scheduler.templates.day_date(start)+" &ndash; "+scheduler.templates.day_date(end);
+};
+scheduler.templates.agenda_text = function(start,end,event){
+ return event.text;
+};
+scheduler.templates.agenda_date = function(){ return ""; };
+
+scheduler.date.agenda_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };
+
+scheduler.attachEvent("onTemplatesReady",function() {
+ var old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;
+ scheduler.dblclick_dhx_cal_data = function() {
+ if (this._mode == "agenda") {
+ if (!this.config.readonly && this.config.dblclick_create)
+ this.addEventNow();
+ } else {
+ if (old_dblclick_dhx_cal_data)
+ return old_dblclick_dhx_cal_data.apply(this, arguments);
+ }
+ };
+ scheduler.attachEvent("onSchedulerResize",function(){
+ if (this._mode == "agenda"){
+ this.agenda_view(true);
+ return false;
+ }
+ return true;
+ });
+
+
+ var old = scheduler.render_data;
+ scheduler.render_data=function(evs){
+ if (this._mode == "agenda")
+ fill_agenda_tab();
+ else
+ return old.apply(this,arguments);
+ };
+
+ var old_render_view_data = scheduler.render_view_data;
+ scheduler.render_view_data = function(){
+ if(this._mode == "agenda") {
+ scheduler._agendaScrollTop = scheduler._els["dhx_cal_data"][0].childNodes[0].scrollTop;
+ scheduler._els["dhx_cal_data"][0].childNodes[0].scrollTop = 0;
+ }
+ return old_render_view_data.apply(this,arguments);
+ };
+
+
+ function set_full_view(mode){
+ if (mode){
+ var l = scheduler.locale.labels;
+ scheduler._els["dhx_cal_header"][0].innerHTML="<div class='dhx_agenda_line'><div>"+l.date+"</div><span style='padding-left:25px'>"+l.description+"</span></div>";
+ scheduler._table_view=true;
+ scheduler.set_sizes();
+ }
+ }
+
+ function fill_agenda_tab(){
+ //get current date
+ var date = scheduler._date;
+ //select events for which data need to be printed
+
+ var events = scheduler.get_visible_events();
+ events.sort(function(a,b){ return a.start_date>b.start_date?1:-1});
+
+ //generate html for the view
+ var html="<div class='dhx_agenda_area'>";
+ for (var i=0; i<events.length; i++){
+ var ev = events[i];
+ var bg_color = (ev.color?("background:"+ev.color+";"):"");
+ var color = (ev.textColor?("color:"+ev.textColor+";"):"");
+ var ev_class = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);
+ html+="<div class='dhx_agenda_line"+(ev_class?' '+ev_class:'')+"' event_id='"+ev.id+"' style='"+color+""+bg_color+""+(ev._text_style||"")+"'><div class='dhx_agenda_event_time'>"+scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev)+"</div>";
+ html+="<div class='dhx_event_icon icon_details'>&nbsp</div>";
+ html+="<span>"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+"</span></div>";
+ }
+ html+="<div class='dhx_v_border'></div></div>";
+
+ //render html
+ scheduler._els["dhx_cal_data"][0].innerHTML = html;
+ scheduler._els["dhx_cal_data"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;
+
+ // setting up dhx_v_border size
+ var agenda_area = scheduler._els["dhx_cal_data"][0].childNodes[0];
+ var v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];
+ v_border.style.height = (agenda_area.offsetHeight < scheduler._els["dhx_cal_data"][0].offsetHeight) ? "100%" : (agenda_area.offsetHeight+"px");
+
+ var t=scheduler._els["dhx_cal_data"][0].firstChild.childNodes;
+ scheduler._els["dhx_cal_date"][0].innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);
+
+ scheduler._rendered=[];
+ for (var i=0; i < t.length-1; i++)
+ scheduler._rendered[i]=t[i]
+
+ }
+
+ scheduler.agenda_view=function(mode){
+ scheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_start(scheduler._date);
+ scheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda(scheduler._min_date, 1);
+ scheduler._table_view = true;
+ set_full_view(mode);
+ if (mode){
+ //agenda tab activated
+ fill_agenda_tab();
+ } else {
+ //agenda tab de-activated
+ }
+ }
+});
diff --git a/sources/ext/dhtmlxscheduler_all_timed.js b/sources/ext/dhtmlxscheduler_all_timed.js
new file mode 100644
index 0000000..cb33477
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_all_timed.js
@@ -0,0 +1,123 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){
+
+ scheduler.config.all_timed = "short";
+
+ var is_event_short = function (ev) {
+ return !((ev.end_date - ev.start_date)/(1000*60*60) >= 24);
+ };
+
+ var old_prerender_events_line = scheduler._pre_render_events_line;
+ scheduler._pre_render_events_line = function(evs, hold){
+ if (!this.config.all_timed)
+ return old_prerender_events_line.call(this, evs, hold);
+
+ for (var i=0; i < evs.length; i++) {
+ var ev=evs[i];
+
+ if (ev._timed)
+ continue;
+
+ if (this.config.all_timed == "short") {
+ if (!is_event_short(ev)) {
+ evs.splice(i--,1);
+ continue;
+ }
+ }
+
+ var ce = this._lame_copy({}, ev); // current event (event for one specific day) is copy of original with modified dates
+
+ ce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects
+
+ if (!isOvernightEvent(ev)) {
+ ce.end_date = new Date(ev.end_date);
+ }
+ else {
+ ce.end_date = getNextDay(ce.start_date);
+ if (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)
+ ce.end_date = setDateTime(ce.start_date, this.config.last_hour);
+ }
+ }
+
+ var event_changed = false;
+ if (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {
+ evs[i] = ce; // adding another event in collection
+ event_changed = true;
+ }
+ // if (ce.start_date > ce.end_date) {
+ // evs.splice(i--,1);
+ // }
+
+ var re = this._lame_copy({}, ev); // remaining event, copy of original with modified start_date (making range more narrow)
+ re.end_date = new Date(re.end_date);
+ if (re.start_date < this._min_date)
+ re.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours
+ else
+ re.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);
+
+ if (re.start_date < this._max_date && re.start_date < re.end_date) {
+ if (event_changed)
+ evs.splice(i+1,0,re);//insert part
+ else {
+ evs[i--] = re;
+ continue;
+ }
+ }
+
+ }
+ // in case of all_timed pre_render is not applied to the original event
+ // so we need to force redraw in case of dnd
+ var redraw = (this._drag_mode == 'move')?false:hold;
+ return old_prerender_events_line.call(this, evs, redraw);
+
+
+ function isOvernightEvent(ev){
+ var next_day = getNextDay(ev.start_date);
+ return (+ev.end_date > +next_day);
+ }
+ function getNextDay(date){
+ var next_day = scheduler.date.add(date, 1, "day");
+ next_day = scheduler.date.date_part(next_day);
+ return next_day;
+ }
+ function setDateTime(date, hours){
+ var val = scheduler.date.date_part(new Date(date));
+ val.setHours(hours);
+ return val;
+ }
+ };
+ var old_get_visible_events = scheduler.get_visible_events;
+ scheduler.get_visible_events = function(only_timed){
+ if (!(this.config.all_timed && this.config.multi_day))
+ return old_get_visible_events.call(this, only_timed);
+ return old_get_visible_events.call(this, false); // only timed = false
+ };
+ scheduler.attachEvent("onBeforeViewChange", function (old_mode, old_date, mode, date) {
+ scheduler._allow_dnd = (mode == "day" || mode == "week");
+ return true;
+ });
+
+ scheduler._is_main_area_event = function(ev){
+ return !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == "short" && is_event_short(ev)) );
+ };
+
+ var oldUpdate = scheduler.updateEvent;
+ scheduler.updateEvent = function(id){
+ // full redraw(update_render=true) messes events order while dnd.
+ // individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.
+ // so for now full redraw is always enabled for not-dnd updates
+ var fullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));
+ if(fullRedrawNeeded){
+ var initial = scheduler.config.update_render;
+ scheduler.config.update_render = true;
+ }
+ oldUpdate.apply(scheduler, arguments);
+
+ if(fullRedrawNeeded){
+ scheduler.config.update_render = initial;
+ }
+ };
+})(); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_collision.js b/sources/ext/dhtmlxscheduler_collision.js
new file mode 100644
index 0000000..13bd178
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_collision.js
@@ -0,0 +1,131 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){
+
+var temp_section;
+var before;
+
+scheduler.config.collision_limit = 1;
+
+function _setTempSection(event_id) { // for custom views (matrix, timeline, units)
+ var pr = scheduler._props?scheduler._props[scheduler._mode]:null;
+ var matrix = scheduler.matrix?scheduler.matrix[scheduler._mode]:null;
+ var checked_mode = pr||matrix; // units or matrix mode
+ if(pr)
+ var map_to = checked_mode.map_to;
+ if(matrix)
+ var map_to = checked_mode.y_property;
+ if ((checked_mode) && event_id){
+ temp_section = scheduler.getEvent(event_id)[map_to];
+ }
+}
+
+scheduler.attachEvent("onBeforeDrag",function(id){
+ _setTempSection(id);
+ return true;
+});
+scheduler.attachEvent("onBeforeLightbox",function(id){
+ var ev = scheduler.getEvent(id);
+ before = [ev.start_date, ev.end_date];
+ _setTempSection(id);
+ return true;
+});
+scheduler.attachEvent("onEventChanged",function(id){
+ if (!id) return true;
+ var ev = scheduler.getEvent(id);
+ if (!scheduler.checkCollision(ev)){
+ if (!before) return false;
+ ev.start_date = before[0];
+ ev.end_date = before[1];
+ ev._timed=this.isOneDayEvent(ev);
+ }
+ return true;
+});
+scheduler.attachEvent("onBeforeEventChanged",function(ev,e,is_new){
+ return scheduler.checkCollision(ev);
+});
+scheduler.attachEvent("onEventAdded",function(id,ev) {
+ var result = scheduler.checkCollision(ev);
+ if (!result)
+ scheduler.deleteEvent(id);
+});
+scheduler.attachEvent("onEventSave",function(id, edited_ev, is_new){
+ edited_ev = scheduler._lame_clone(edited_ev);
+ edited_ev.id = id;
+
+ //lightbox may not have 'time' section
+ if(!(edited_ev.start_date && edited_ev.end_date)){
+ var ev = scheduler.getEvent(id);
+ edited_ev.start_date = new Date(ev.start_date);
+ edited_ev.end_date = new Date(ev.end_date);
+ }
+
+ if(edited_ev.rec_type){
+ scheduler._roll_back_dates(edited_ev);
+ }
+ return scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another
+});
+
+scheduler.checkCollision = function(ev) {
+ var evs = [];
+ var collision_limit = scheduler.config.collision_limit;
+ if (ev.rec_type) {
+ var evs_dates = scheduler.getRecDates(ev);
+ for(var k=0; k<evs_dates.length; k++) {
+ var tevs = scheduler.getEvents(evs_dates[k].start_date, evs_dates[k].end_date);
+ for(var j=0; j<tevs.length; j++) {
+ if ((tevs[j].event_pid || tevs[j].id) != ev.id )
+ evs.push(tevs[j]);
+ }
+ }
+ } else {
+ evs = scheduler.getEvents(ev.start_date, ev.end_date);
+ for (var i=0; i<evs.length; i++) {
+ if (evs[i].id == ev.id) {
+ evs.splice(i,1);
+ break;
+ }
+ }
+ }
+
+ var pr = scheduler._props?scheduler._props[scheduler._mode]:null;
+ var matrix = scheduler.matrix?scheduler.matrix[scheduler._mode]:null;
+
+ var checked_mode = pr||matrix;
+ if(pr)
+ var map_to = checked_mode.map_to;
+ if(matrix)
+ var map_to = checked_mode.y_property;
+
+ var single = true;
+ if (checked_mode) { // custom view
+ var count = 0;
+
+ for (var i = 0; i < evs.length; i++)
+
+ if (evs[i][map_to] == ev[map_to] && evs[i].id != ev.id)
+ count++;
+
+ if (count >= collision_limit) {
+
+ single = false;
+ }
+ }
+ else {
+ if ( evs.length >= collision_limit )
+ single = false;
+ }
+ if (!single) {
+ var res = !scheduler.callEvent("onEventCollision",[ev,evs]);
+ if (!res) {
+ ev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views
+ }
+ return res;
+ }
+ return single;
+
+}
+
+})();
diff --git a/sources/ext/dhtmlxscheduler_container_autoresize.js b/sources/ext/dhtmlxscheduler_container_autoresize.js
new file mode 100644
index 0000000..8cb15d2
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_container_autoresize.js
@@ -0,0 +1,161 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function() {
+
+ scheduler.config.container_autoresize = true;
+ scheduler.config.month_day_min_height = 90;
+
+ var old_pre_render_event = scheduler._pre_render_events;
+
+ scheduler._pre_render_events = function(evs, hold) {
+ if (!scheduler.config.container_autoresize) {
+ return old_pre_render_event.apply(this, arguments);
+ }
+
+ var hb = this.xy.bar_height;
+ var h_old = this._colsS.heights;
+ var h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];
+ var data = this._els["dhx_cal_data"][0];
+
+ if (!this._table_view)
+ evs = this._pre_render_events_line(evs, hold); //ignore long events for now
+ else
+ evs = this._pre_render_events_table(evs, hold);
+
+ if (this._table_view) {
+ if (hold){
+ this._colsS.heights = h_old;
+ } else {
+ var evl = data.firstChild;
+ if (evl.rows) {
+ for (var i = 0; i < evl.rows.length; i++) {
+ h[i]++;
+ if ((h[i]) * hb > this._colsS.height - 22) { // 22 - height of cell's header
+ //we have overflow, update heights
+ var cells = evl.rows[i].cells;
+
+ var cHeight = this._colsS.height - 22;
+ if(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){
+ cHeight = h[i] * hb;
+ }else if( (this.config.max_month_events + 1) * hb > this._colsS.height - 22){
+ cHeight = (this.config.max_month_events + 1) * hb;
+ }
+
+ for (var j = 0; j < cells.length; j++) {
+ cells[j].childNodes[1].style.height = cHeight + "px";
+ }
+ h[i] = (h[i - 1] || 0) + cells[0].offsetHeight;
+ }
+ h[i] = (h[i - 1] || 0) + evl.rows[i].cells[0].offsetHeight;
+ }
+ h.unshift(0);
+ if (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {
+ //we have v-scroll, decrease last day cell
+
+ // NO CHECK SHOULD BE MADE ON VERTICAL SCROLL
+ }
+ } else {
+ if (!evs.length && this._els["dhx_multi_day"][0].style.visibility == "visible")
+ h[0] = -1;
+ if (evs.length || h[0] == -1) {
+ //shift days to have space for multiday events
+ var childs = evl.parentNode.childNodes;
+ var dh = ((h[0] + 1) * hb + 1) + "px"; // +1 so multiday events would have 2px from top and 2px from bottom by default
+ data.style.top = (this._els["dhx_cal_navline"][0].offsetHeight + this._els["dhx_cal_header"][0].offsetHeight + parseInt(dh, 10)) + 'px';
+ data.style.height = (this._obj.offsetHeight - parseInt(data.style.top, 10) - (this.xy.margin_top || 0)) + 'px';
+ var last = this._els["dhx_multi_day"][0];
+ last.style.height = dh;
+ last.style.visibility = (h[0] == -1 ? "hidden" : "visible");
+ last = this._els["dhx_multi_day"][1];
+ last.style.height = dh;
+ last.style.visibility = (h[0] == -1 ? "hidden" : "visible");
+ last.className = h[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small";
+ this._dy_shift = (h[0] + 1) * hb;
+ h[0] = 0;
+ }
+ }
+ }
+ }
+
+ return evs;
+ };
+
+ var checked_divs = ["dhx_cal_navline", "dhx_cal_header", "dhx_multi_day", "dhx_cal_data"];
+ var updateContainterHeight = function(is_repaint) {
+ var total_height = 0;
+ for (var i = 0; i < checked_divs.length; i++) {
+
+ var className = checked_divs[i];
+ var checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;
+ var height = 0;
+ switch (className) {
+ case "dhx_cal_navline":
+ case "dhx_cal_header":
+ height = parseInt(checked_div.style.height, 10);
+ break;
+ case "dhx_multi_day":
+ height = (checked_div) ? checked_div.offsetHeight : 0;
+ if (height == 1)
+ height = 0;
+ break;
+ case "dhx_cal_data":
+ height = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);
+ var mode = scheduler.getState().mode;
+ if (mode == "month") {
+ if (scheduler.config.month_day_min_height && !is_repaint) {
+ var rows_length = checked_div.getElementsByTagName("tr").length;
+ height = rows_length * scheduler.config.month_day_min_height;
+ }
+ if (is_repaint) {
+ checked_div.style.height = height + "px";
+ }
+ }
+ if (scheduler.matrix && scheduler.matrix[mode]) {
+ if (is_repaint) {
+ height += 2;
+ checked_div.style.height = height + "px";
+ } else {
+ height = 2;
+ var cfg = scheduler.matrix[mode];
+ var rows = cfg.y_unit;
+ for(var r=0; r < rows.length; r++){
+ height += !rows[r].children ? cfg.dy : (cfg.folder_dy||cfg.dy);
+ }
+ }
+ }
+ if (mode == "day" || mode == "week") {
+ height += 2;
+ }
+ break;
+ }
+ total_height += height;
+ }
+ scheduler._obj.style.height = (total_height) + "px";
+
+ if (!is_repaint)
+ scheduler.updateView();
+ };
+
+ var conditionalUpdateContainerHeight = function() {
+ var mode = scheduler.getState().mode;
+
+ updateContainterHeight();
+ if ( (scheduler.matrix && scheduler.matrix[mode]) || mode == "month" ) {
+ window.setTimeout(function() {
+ updateContainterHeight(true);
+ }, 1);
+ }
+ };
+
+ scheduler.attachEvent("onViewChange", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onXLE", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onEventChanged", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onEventCreated", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onEventAdded", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onEventDeleted", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onAfterSchedulerResize", conditionalUpdateContainerHeight);
+ scheduler.attachEvent("onClearAll", conditionalUpdateContainerHeight);
+
+})(); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_cookie.js b/sources/ext/dhtmlxscheduler_cookie.js
new file mode 100644
index 0000000..faf99b6
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_cookie.js
@@ -0,0 +1,70 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){
+ function setCookie(name,cookie_param,value) {
+ var str = name + "=" + value + (cookie_param?("; "+cookie_param):"");
+ document.cookie = str;
+ }
+ function getCookie(name) {
+ var search = name + "=";
+ if (document.cookie.length > 0) {
+ var offset = document.cookie.indexOf(search);
+ if (offset != -1) {
+ offset += search.length;
+ var end = document.cookie.indexOf(";", offset);
+ if (end == -1)
+ end = document.cookie.length;
+ return document.cookie.substring(offset, end);
+ }
+ }
+ return "";
+ }
+ var first = true;
+ scheduler.attachEvent("onBeforeViewChange",function(om,od,m,d){
+ if (first){
+ first = false;
+
+
+
+ var data=getCookie("scheduler_settings");
+ if (data){
+
+ if(!scheduler._min_date){
+ //otherwise scheduler will have incorrect date until timeout
+ //it can cause js error with 'onMouseMove' handler of key_nav.js
+ scheduler._min_date = d;
+ }
+
+ data = unescape(data).split("@");
+ data[0] = this.templates.xml_date(data[0]);
+ var view = this.isViewExists(data[1]) ? data[1] : m,
+ date = !isNaN(+data[0]) ? data[0] : d;
+
+ window.setTimeout(function(){
+ scheduler.setCurrentView(date,view);
+ },1);
+ return false;
+ }
+ }
+ var text = escape(this.templates.xml_format(d||od)+"@"+(m||om));
+ setCookie("scheduler_settings","expires=Sun, 31 Jan 9999 22:00:00 GMT",text);
+ return true;
+ });
+
+
+ // As we are blocking first render above there could be a problem in case of dynamic loading ('from' won't be defined)
+ var old_load = scheduler._load;
+ scheduler._load = function() {
+ var args = arguments;
+ if (!scheduler._date && scheduler._load_mode) {
+ var that = this;
+ window.setTimeout(function() {
+ old_load.apply(that, args);
+ },1);
+ } else {
+ old_load.apply(this, args);
+ }
+ }
+})(); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_editors.js b/sources/ext/dhtmlxscheduler_editors.js
new file mode 100644
index 0000000..f68f2c1
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_editors.js
@@ -0,0 +1,158 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.form_blocks['combo']={
+ render:function(sns) {
+ if (!sns.cached_options)
+ sns.cached_options = {};
+ var res = '';
+ res += "<div class='"+sns.type+"' style='height:"+(sns.height||20)+"px;' ></div>";
+ return res;
+ },
+ set_value:function(node,value,ev,config){
+ (function(){
+ resetCombo();
+ var id = scheduler.attachEvent("onAfterLightbox",function(){
+ // otherwise destructor will never be called after form reset(e.g. in readonly event mode)
+ resetCombo();
+ scheduler.detachEvent(id);
+ });
+ function resetCombo(){
+ if(node._combo && node._combo.DOMParent) {
+ node._combo.destructor();
+ }
+ }
+ })();
+ window.dhx_globalImgPath = config.image_path||'/';
+ node._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);
+ if (config.onchange)
+ node._combo.attachEvent("onChange", config.onchange);
+
+ if (config.options_height)
+ node._combo.setOptionHeight(config.options_height);
+ var combo = node._combo;
+ combo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);
+
+ if (!config.script_path) { // script-side filtration is used
+ var all_options = [];
+ for (var i = 0; i < config.options.length; i++) {
+ var option = config.options[i];
+ var single_option = [
+ option.key,
+ option.label,
+ option.css
+ ];
+ all_options.push(single_option);
+ }
+ combo.addOption(all_options);
+ if (ev[config.map_to]) {
+ var index = combo.getIndexByValue(ev[config.map_to]);
+ combo.selectOption(index);
+ }
+ } else { // server-side filtration is used
+ var selected_id = ev[config.map_to];
+ if (selected_id) {
+ if (config.cached_options[selected_id]) {
+ combo.addOption(selected_id, config.cached_options[selected_id]);
+ combo.disable(1);
+ combo.selectOption(0);
+ combo.disable(0);
+ } else {
+ dhtmlxAjax.get(config.script_path+"?id="+selected_id+"&uid="+scheduler.uid(), function(result){
+ var option = result.doXPath("//option")[0];
+ var label = option.childNodes[0].nodeValue;
+ config.cached_options[selected_id] = label;
+ combo.addOption(selected_id, label);
+ combo.disable(1);
+ combo.selectOption(0);
+ combo.disable(0);
+ });
+ }
+ } else {
+ combo.setComboValue("");
+ }
+ }
+ },
+ get_value:function(node,ev,config) {
+ var selected_id = node._combo.getSelectedValue(); // value = key
+ if (config.script_path) {
+ config.cached_options[selected_id] = node._combo.getSelectedText();
+ }
+ return selected_id;
+ },
+ focus:function(node){
+ }
+};
+
+scheduler.form_blocks['radio']={
+ render:function(sns) {
+ var res = '';
+ res += "<div class='dhx_cal_ltext dhx_cal_radio' style='height:"+sns.height+"px;' >";
+ for (var i=0; i<sns.options.length; i++) {
+ var id = scheduler.uid();
+ res += "<input id='"+id+"' type='radio' name='"+sns.name+"' value='"+sns.options[i].key+"'><label for='"+id+"'>"+" "+sns.options[i].label+"</label>";
+ if(sns.vertical)
+ res += "<br/>";
+ }
+ res += "</div>";
+
+ return res;
+ },
+ set_value:function(node,value,ev,config){
+ var radiobuttons = node.getElementsByTagName('input');
+ for (var i = 0; i < radiobuttons.length; i++) {
+ radiobuttons[i].checked = false;
+ var checked_value = ev[config.map_to]||value;
+ if (radiobuttons[i].value == checked_value) {
+ radiobuttons[i].checked = true;
+ }
+ }
+ },
+ get_value:function(node,ev,config){
+ var radiobuttons = node.getElementsByTagName('input');
+ for(var i=0; i<radiobuttons.length; i++) {
+ if(radiobuttons[i].checked) {
+ return radiobuttons[i].value;
+ }
+ }
+ },
+ focus:function(node){
+ }
+};
+
+scheduler.form_blocks['checkbox']={
+ render:function(sns) {
+ if (scheduler.config.wide_form)
+ return '<div class="dhx_cal_wide_checkbox" '+(sns.height?("style='height:"+sns.height+"px;'"):"")+'></div>';
+ else
+ return '';
+ },
+ set_value:function(node,value,ev,config){
+ node=document.getElementById(config.id);
+ var id = scheduler.uid();
+ var isChecked = (typeof config.checked_value != "undefined") ? ev[config.map_to] == config.checked_value : !!value;
+ node.className += " dhx_cal_checkbox";
+ var check_html = "<input id='"+id+"' type='checkbox' value='true' name='"+config.name+"'"+((isChecked)?"checked='true'":'')+"'>";
+ var label_html = "<label for='"+id+"'>"+(scheduler.locale.labels["section_"+config.name]||config.name)+"</label>";
+ if (scheduler.config.wide_form){
+ node.innerHTML = label_html;
+ node.nextSibling.innerHTML=check_html;
+ } else
+ node.innerHTML=check_html+label_html;
+
+ if (config.handler) {
+ var checkbox = node.getElementsByTagName('input')[0];
+ checkbox.onclick = config.handler;
+ }
+ },
+ get_value:function(node,ev,config){
+ node=document.getElementById(config.id);
+ var checkbox = node.getElementsByTagName('input')[0]; // moved to the header
+ if (!checkbox)
+ checkbox = node.nextSibling.getElementsByTagName('input')[0];
+ return (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);
+ },
+ focus:function(node){
+ }
+};
diff --git a/sources/ext/dhtmlxscheduler_expand.js b/sources/ext/dhtmlxscheduler_expand.js
new file mode 100644
index 0000000..2dd9361
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_expand.js
@@ -0,0 +1,73 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.expand = function() {
+ var t = scheduler._obj;
+ do {
+ t._position = t.style.position || "";
+ t.style.position = "static";
+ } while ((t = t.parentNode) && t.style);
+ t = scheduler._obj;
+ t.style.position = "absolute";
+ t._width = t.style.width;
+ t._height = t.style.height;
+ t.style.width = t.style.height = "100%";
+ t.style.top = t.style.left = "0px";
+
+ var top = document.body;
+ top.scrollTop = 0;
+
+ top = top.parentNode;
+ if (top)
+ top.scrollTop = 0;
+ document.body._overflow = document.body.style.overflow || "";
+ document.body.style.overflow = "hidden";
+ scheduler._maximize();
+};
+scheduler.collapse = function() {
+ var t = scheduler._obj;
+ do {
+ t.style.position = t._position;
+ } while ((t = t.parentNode) && t.style);
+ t = scheduler._obj;
+ t.style.width = t._width;
+ t.style.height = t._height;
+ document.body.style.overflow = document.body._overflow;
+ scheduler._maximize();
+};
+scheduler.attachEvent("onTemplatesReady", function() {
+ var t = document.createElement("DIV");
+ t.className = "dhx_expand_icon";
+ scheduler.toggleIcon = t;
+ scheduler._obj.appendChild(t);
+ t.onclick = function() {
+ if (!scheduler.expanded)
+ scheduler.expand(); else
+ scheduler.collapse();
+ }
+});
+scheduler._maximize = function() {
+ this.expanded = !this.expanded;
+ this.toggleIcon.style.backgroundPosition = "0 " + (this.expanded ? "0" : "18") + "px";
+
+ var directions = ['left', 'top'];
+ for (var i = 0; i < directions.length; i++) {
+ var margin = scheduler.xy['margin_' + directions[i]];
+ var prev_margin = scheduler['_prev_margin_' + directions[i]];
+ if (scheduler.xy['margin_' + directions[i]]) {
+ scheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];
+ scheduler.xy['margin_' + directions[i]] = 0;
+ } else {
+ if (prev_margin) {
+ scheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];
+ delete scheduler['_prev_margin_' + directions[i]];
+ }
+ }
+ }
+
+ if (scheduler.callEvent("onSchedulerResize", [])) {
+ scheduler.update_view();
+ scheduler.callEvent("onAfterSchedulerResize");
+ }
+};
diff --git a/sources/ext/dhtmlxscheduler_grid_view.js b/sources/ext/dhtmlxscheduler_grid_view.js
new file mode 100644
index 0000000..4ce1f5d
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_grid_view.js
@@ -0,0 +1,466 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){
+ scheduler._grid = {
+ sort_rules:{
+ "int":function(a,b, getVal){ return getVal(a)*1 < getVal(b)*1?1:-1},
+ "str":function(a,b, getVal){ return getVal(a) < getVal(b)?1:-1},
+ "date":function(a,b, getVal){ return new Date(getVal(a))< new Date(getVal(b))?1:-1}
+ },
+ _getObjName:function(name){
+ return "grid_"+name;
+ },
+ _getViewName:function(objName){
+ return objName.replace(/^grid_/,'');
+ }
+ };
+}
+)();
+/*
+obj={
+ name:'grid_name'
+ fields:[
+ { id:"id", label:"Id", width:80, sort:"int/date/str", template:function(start_date, end_date, ev){ return ""}, align:"right/left/center" },
+ { id:"text", label:"Text", width:'*', css:"class_name", sort:function(a,b){ return 1 or -1}, valign:'top/bottom/middle' }
+ ...
+ ],
+ from:new Date(0),
+ to:Date:new Date(9999,1,1),
+ rowHeight:int,
+ paging:true/false,
+ select:true/false
+}
+*/
+
+
+scheduler.createGridView=function(obj){
+
+ var name = obj.name || 'grid';
+ var objName = scheduler._grid._getObjName(name);
+
+ scheduler.config[name + '_start'] = obj.from ||(new Date(0));
+ scheduler.config[name + '_end'] = obj.to || (new Date(9999,1,1));
+
+ scheduler[objName] = obj;
+ scheduler[objName].defPadding = 8;
+ scheduler[objName].columns = scheduler[objName].fields;
+ delete scheduler[objName].fields;
+ function isValidSize(size){
+ return !(size !== undefined && (size*1 != size || size < 0));
+ }
+
+ var cols = scheduler[objName].columns;
+ for(var i=0; i < cols.length; i++){
+ if(isValidSize(cols[i].width))
+ cols[i].initialWidth = cols[i].width;
+ if(!isValidSize(cols[i].paddingLeft))
+ delete cols[i].paddingLeft;
+ if(!isValidSize(cols[i].paddingRight))
+ delete cols[i].paddingRight;
+ }
+
+ scheduler[objName].select = obj.select === undefined ? true : obj.select;
+ if(scheduler.locale.labels[name +'_tab'] === undefined)
+ scheduler.locale.labels[name +'_tab'] = scheduler[objName].label || scheduler.locale.labels.grid_tab;
+
+ scheduler[objName]._selected_divs = [];
+
+ scheduler.date[name+'_start']=function(d){ return d; };
+ scheduler.date['add_' + name] = function(date, inc){
+ var ndate = new Date(date);
+ ndate.setMonth(ndate.getMonth()+inc);
+ return ndate;
+ };
+
+ scheduler.templates[name+"_date"] = function(start, end){
+ return scheduler.templates.day_date(start)+" - "+scheduler.templates.day_date(end)
+ };
+ scheduler.templates[name + '_full_date'] = function(start,end,ev){
+ if (scheduler.isOneDayEvent(ev))
+ return this[name + '_single_date'](start);
+ else
+ return scheduler.templates.day_date(start)+" &ndash; "+scheduler.templates.day_date(end);
+ };
+ scheduler.templates[name + '_single_date'] = function(date){
+ return scheduler.templates.day_date(date)+" "+this.event_date(date);
+ };
+ scheduler.templates[name + '_field'] = function(field_name, event){
+ return event[field_name];
+ };
+
+ scheduler.attachEvent("onTemplatesReady",function(){
+
+ scheduler.attachEvent("onDblClick",function(event_id, native_event_object){
+ if(this._mode == name){
+ scheduler._click.buttons['details'](event_id)
+ return false;
+ }
+ return true;
+ });
+
+ scheduler.attachEvent("onClick",function(event_id, native_event_object){
+ if(this._mode == name && scheduler[objName].select ){
+ scheduler._grid.unselectEvent('', name);
+ scheduler._grid.selectEvent(event_id, name, native_event_object);
+ return false;
+ }
+ return true;
+ });
+
+ scheduler.attachEvent("onSchedulerResize", function() {
+ if (this._mode == name) {
+ this[name + '_view'](true);
+ // timeout used to run code after all onSchedulerResize handlers are finished
+ window.setTimeout(function(){
+ // we need to call event manually because handler return false, and blocks default logic
+ scheduler.callEvent("onAfterSchedulerResize", []);
+ },1);
+ return false;
+ }
+ return true;
+ });
+
+
+ var old = scheduler.render_data;
+ scheduler.render_data=function(evs){
+ if (this._mode == name)
+ scheduler._grid._fill_grid_tab(objName);
+ else
+ return old.apply(this,arguments);
+ };
+
+ var old_render_view_data = scheduler.render_view_data;
+ scheduler.render_view_data=function(){
+ if(this._mode == name) {
+ scheduler._grid._gridScrollTop = scheduler._els["dhx_cal_data"][0].childNodes[0].scrollTop;
+ scheduler._els["dhx_cal_data"][0].childNodes[0].scrollTop = 0;
+ scheduler._els["dhx_cal_data"][0].style.overflowY = 'auto';
+ }
+ else {
+ scheduler._els["dhx_cal_data"][0].style.overflowY = 'auto';
+ }
+ return old_render_view_data.apply(this,arguments);
+ }
+});
+
+
+ scheduler[name+'_view']=function(mode){
+ if (mode){
+ scheduler._min_date = scheduler[objName].paging ? scheduler.date[name+'_start'](new Date(scheduler._date)) : scheduler.config[name + '_start'];
+ scheduler._max_date = scheduler[objName].paging ? scheduler.date.add(scheduler._min_date, 1, name) : scheduler.config[name + '_end'];
+
+ scheduler._grid.set_full_view(objName);
+ if(scheduler._min_date > new Date(0) && scheduler._max_date < (new Date(9999,1,1)))
+ scheduler._els["dhx_cal_date"][0].innerHTML=scheduler.templates[name+"_date"](scheduler._min_date,scheduler._max_date);
+ else
+ scheduler._els["dhx_cal_date"][0].innerHTML="";
+
+ //grid tab activated
+ scheduler._grid._fill_grid_tab(objName);
+ scheduler._gridView = objName;
+ } else {
+ scheduler._grid._sort_marker = null;
+ delete scheduler._gridView;
+ scheduler._rendered=[];
+ scheduler[objName]._selected_divs = [];
+ //grid tab de-activated
+ }
+ };
+
+
+}
+
+
+scheduler.dblclick_dhx_grid_area=function(){
+ if (!this.config.readonly && this.config.dblclick_create)
+ this.addEventNow();
+};
+
+if(scheduler._click.dhx_cal_header){
+ scheduler._old_header_click = scheduler._click.dhx_cal_header;
+}
+scheduler._click.dhx_cal_header=function(e){
+ if(scheduler._gridView){
+ var event = e||window.event;
+ var params = scheduler._grid.get_sort_params(event, scheduler._gridView);
+
+ scheduler._grid.draw_sort_marker(event.originalTarget || event.srcElement, params.dir);
+
+ scheduler.clear_view();
+ scheduler._grid._fill_grid_tab(scheduler._gridView, params);
+ }
+ else if(scheduler._old_header_click)
+ return scheduler._old_header_click.apply(this,arguments);
+};
+
+scheduler._grid.selectEvent = function(id, view_name, native_event_object){
+ if(scheduler.callEvent("onBeforeRowSelect",[id,native_event_object])){
+ var objName = scheduler._grid._getObjName(view_name);
+
+ scheduler.for_rendered(id, function(event_div){
+ event_div.className += " dhx_grid_event_selected";
+ scheduler[objName]._selected_divs.push(event_div);
+ });
+ scheduler._select_id = id;
+ }
+};
+
+scheduler._grid._unselectDiv= function(div){
+ div.className = div.className.replace(/ dhx_grid_event_selected/,'');
+}
+scheduler._grid.unselectEvent = function(id, view_name){
+ var objName = scheduler._grid._getObjName(view_name);
+ if(!objName || !scheduler[objName]._selected_divs)
+ return;
+
+ if(!id){
+ for(var i=0; i<scheduler[objName]._selected_divs.length; i++)
+ scheduler._grid._unselectDiv(scheduler[objName]._selected_divs[i]);
+
+ scheduler[objName]._selected_divs = [];
+
+ }else{
+ for(var i=0; i<scheduler[objName]._selected_divs.length; i++)
+ if(scheduler[objName]._selected_divs[i].getAttribute('event_id') == id){
+ scheduler._grid._unselectDiv(scheduler[objName]._selected_divs[i]);
+ scheduler[objName]._selected_divs.slice(i,1);
+ break;
+ }
+
+ }
+};
+
+scheduler._grid.get_sort_params = function(event, objName){
+ var targ = event.originalTarget || event.srcElement;
+ if(targ.className == 'dhx_grid_view_sort')
+ targ = targ.parentNode;
+ if(!targ.className || targ.className.indexOf("dhx_grid_sort_asc") == -1)
+ var direction = 'asc';
+ else
+ var direction = 'desc';
+
+ var index = 0;
+ for(var i =0; i < targ.parentNode.childNodes.length; i++){
+ if(targ.parentNode.childNodes[i] == targ){
+ index = i;
+ break;
+ }
+ }
+
+
+
+ var value = null;
+ if(scheduler[objName].columns[index].template){
+ var template = scheduler[objName].columns[index].template
+ value = function(ev){
+ return template(ev.start_date, ev.end_date, ev);
+ };
+ }else{
+ var field = scheduler[objName].columns[index].id;
+ if(field == "date")
+ field = "start_date";
+ value = function(ev){ return ev[field];}
+ }
+
+ var rule = scheduler[objName].columns[index].sort;
+
+ if(typeof rule != 'function'){
+ rule = scheduler._grid.sort_rules[rule] || scheduler._grid.sort_rules['str'];
+ }
+
+ return {dir:direction, value:value, rule:rule};
+};
+
+scheduler._grid.draw_sort_marker = function(node, direction){
+ if(node.className == 'dhx_grid_view_sort')
+ node = node.parentNode;
+
+ if(scheduler._grid._sort_marker){
+ scheduler._grid._sort_marker.className = scheduler._grid._sort_marker.className.replace(/( )?dhx_grid_sort_(asc|desc)/, '');
+ scheduler._grid._sort_marker.removeChild(scheduler._grid._sort_marker.lastChild);
+ }
+
+ node.className += " dhx_grid_sort_"+direction;
+ scheduler._grid._sort_marker = node;
+ var html = "<div class='dhx_grid_view_sort' style='left:"+(+node.style.width.replace('px','') -15+node.offsetLeft)+"px'>&nbsp;</div>";
+ node.innerHTML += html;
+
+};
+
+scheduler._grid.sort_grid=function(sort){
+
+ var sort = sort || {dir:'desc', value:function(ev){return ev.start_date;}, rule:scheduler._grid.sort_rules['date']};
+
+ var events = scheduler.get_visible_events();
+
+ if(sort.dir == 'desc')
+ events.sort(function(a,b){return sort.rule(a,b,sort.value)});
+ else
+ events.sort(function(a,b){return -sort.rule(a,b, sort.value)});
+ return events;
+};
+
+
+
+scheduler._grid.set_full_view = function(mode){
+ if (mode){
+ var l = scheduler.locale.labels;
+ var html =scheduler._grid._print_grid_header(mode);
+
+ scheduler._els["dhx_cal_header"][0].innerHTML= html;
+ scheduler._table_view=true;
+ scheduler.set_sizes();
+ }
+};
+scheduler._grid._calcPadding = function(column, parent){
+ var padding = (column.paddingLeft !== undefined ? 1*column.paddingLeft : scheduler[parent].defPadding)
+ + (column.paddingRight !== undefined ? 1*column.paddingRight : scheduler[parent].defPadding);
+ return padding;
+};
+
+scheduler._grid._getStyles = function(column, items){
+ var cell_style = [], style = "";
+ for(var i=0; items[i]; i++ ){
+ style = items[i] + ":";
+ switch (items[i]){
+ case "text-align":
+ if(column.align)
+ cell_style.push(style+column.align);
+ break;
+ case "vertical-align":
+ if(column.valign)
+ cell_style.push(style+column.valign);
+ break;
+ case "padding-left":
+ if(column.paddingLeft != undefined)
+ cell_style.push(style+(column.paddingLeft||'0') + "px");
+ break;
+ case "padding-right":
+ if(column.paddingRight != undefined)
+ cell_style.push(style+(column.paddingRight||'0') + "px");
+ break;
+ }
+ }
+ return cell_style;
+};
+
+scheduler._grid._fill_grid_tab = function(objName, sort){
+ //get current date
+ var date = scheduler._date;
+ //select events for which data need to be printed
+ var events = scheduler._grid.sort_grid(sort)
+
+ //generate html for the view
+ var columns = scheduler[objName].columns;
+
+ var html = "<div>";
+ var left = -2;//column borders at the same pos as header borders...
+ for(var i=0; i < columns.length; i++){
+ var padding = scheduler._grid._calcPadding(columns[i], objName);
+ left +=columns[i].width + padding ;//
+ if(i < columns.length - 1)
+ html += "<div class='dhx_grid_v_border' style='left:"+(left)+"px'></div>";
+ }
+ html += "</div>"
+ html +="<div class='dhx_grid_area'><table>";
+
+ for (var i=0; i<events.length; i++){
+ html += scheduler._grid._print_event_row(events[i], objName);
+ }
+
+ html +="</table></div>";
+ //render html
+ scheduler._els["dhx_cal_data"][0].innerHTML = html;
+ scheduler._els["dhx_cal_data"][0].scrollTop = scheduler._grid._gridScrollTop||0;
+
+ var t=scheduler._els["dhx_cal_data"][0].getElementsByTagName("tr");
+
+ scheduler._rendered=[];
+ for (var i=0; i < t.length; i++){
+ scheduler._rendered[i]=t[i]
+ }
+
+};
+scheduler._grid._print_event_row = function(ev, objName){
+
+ var styles = [];
+ if(ev.color)
+ styles.push("background:"+ev.color);
+ if(ev.textColor)
+ styles.push("color:"+ev.textColor);
+ if(ev._text_style)
+ styles.push(ev._text_style);
+ if(scheduler[objName]['rowHeight'])
+ styles.push('height:'+scheduler[objName]['rowHeight'] + 'px');
+
+ var style = "";
+ if(styles.length){
+ style = "style='"+styles.join(";")+"'";
+ }
+
+ var columns = scheduler[objName].columns;
+ var ev_class = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);
+
+ var html ="<tr class='dhx_grid_event"+(ev_class? ' '+ev_class:'')+"' event_id='"+ev.id+"' " + style + ">";
+
+ var name = scheduler._grid._getViewName(objName);
+ var availStyles = ["text-align", "vertical-align", "padding-left","padding-right"];
+ for(var i =0; i < columns.length; i++){
+ var value;
+ if(columns[i].template){
+ value = columns[i].template(ev.start_date, ev.end_date, ev);
+ }else if(columns[i].id == 'date') {
+ value = scheduler.templates[name + '_full_date'](ev.start_date, ev.end_date, ev);
+ }else if(columns[i].id == 'start_date' || columns[i].id == 'end_date' ){
+ value = scheduler.templates[name + '_single_date'](ev[columns[i].id]);
+ }else{
+ value = scheduler.templates[name + '_field'](columns[i].id, ev);
+ }
+
+ var cell_style = scheduler._grid._getStyles(columns[i], availStyles);
+
+ var className = columns[i].css ? (" class=\""+columns[i].css+"\"") : "";
+
+ html+= "<td style='width:"+ (columns[i].width )+"px;"+cell_style.join(";")+"' "+className+">"+value+"</td>";
+
+ }
+ html+="<td class='dhx_grid_dummy'></td></tr>";
+
+ return html;
+};
+
+scheduler._grid._print_grid_header = function(objName){
+ var head = "<div class='dhx_grid_line'>";
+
+ var columns = scheduler[objName].columns;
+ var widths = [];
+
+ var unsized_columns = columns.length;
+ var avail_width = scheduler._obj.clientWidth - 2*columns.length -20;//-20 for possible scrollbar, -length for borders
+ for(var ind=0; ind < columns.length; ind++){
+
+ var val = columns[ind].initialWidth*1;
+ if(!isNaN(val) && columns[ind].initialWidth != '' && columns[ind].initialWidth != null && typeof columns[ind].initialWidth != 'boolean'){
+
+ unsized_columns--;
+ avail_width -= val;
+ widths[ind] = val;
+ }else {
+ widths[ind] = null;
+ }
+ }
+
+ var unsized_width = Math.floor(avail_width / unsized_columns);
+ var availStyles = ["text-align", "padding-left","padding-right"];
+ for(var i=0; i < columns.length; i++){
+ var column_width = !widths[i] ? unsized_width : widths[i];
+ columns[i].width = column_width - scheduler._grid._calcPadding(columns[i], objName);
+ var cell_style = scheduler._grid._getStyles(columns[i], availStyles);
+ head += "<div style='width:"+(columns[i].width -1)+"px;"+cell_style.join(";")+"'>" + (columns[i].label === undefined ? columns[i].id : columns[i].label) + "</div>";
+ }
+ head +="</div>";
+
+ return head;
+};
diff --git a/sources/ext/dhtmlxscheduler_html_templates.js b/sources/ext/dhtmlxscheduler_html_templates.js
new file mode 100644
index 0000000..a7df078
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_html_templates.js
@@ -0,0 +1,19 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){
+ var els = document.body.getElementsByTagName("DIV");
+ for (var i=0; i < els.length; i++) {
+ var cs = els[i].className||"";
+ cs = cs.split(":");
+ if (cs.length == 2 && cs[0] == "template"){
+ var code = "return \""+(els[i].innerHTML||"").replace(/\"/g,"\\\"").replace(/[\n\r]+/g,"")+"\";";
+ code = unescape(code).replace(/\{event\.([a-z]+)\}/g,function(all,mask){
+ return '"+ev.'+mask+'+"';
+ });
+ scheduler.templates[cs[1]]=Function("start","end","ev",code);
+ els[i].style.display='none';
+ }
+ };
+}) \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_key_nav.js b/sources/ext/dhtmlxscheduler_key_nav.js
new file mode 100644
index 0000000..253d0ae
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_key_nav.js
@@ -0,0 +1,91 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+//Initial idea and implementation by Steve MC
+(scheduler._temp_key_scope = function (){
+
+var isLightboxOpen = false;
+var date; // used for copy and paste operations
+var isCopy = null;
+
+scheduler.attachEvent("onBeforeLightbox",function(){ isLightboxOpen = true; return true; });
+scheduler.attachEvent("onAfterLightbox",function(){ isLightboxOpen = false; return true; });
+
+scheduler.attachEvent("onMouseMove", function(id,e){
+ date = scheduler.getActionData(e).date;
+});
+
+function clear_event_after(ev){
+ delete ev.rec_type; delete ev.rec_pattern;
+ delete ev.event_pid; delete ev.event_length;
+}
+
+dhtmlxEvent(document,(_isOpera?"keypress":"keydown"),function(e){
+ e=e||event;
+ if (!isLightboxOpen){
+
+ var scheduler = window.scheduler;
+
+ if (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows
+ e.cancelBubble = true;
+
+ var next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);
+ scheduler.setCurrentView(next);
+ return true;
+ }
+
+ var select_id = scheduler._select_id;
+ if (e.ctrlKey && e.keyCode == 67) { // CTRL+C
+ if (select_id) {
+ scheduler._buffer_id = select_id;
+ isCopy = true;
+ scheduler.callEvent("onEventCopied", [scheduler.getEvent(select_id)]);
+ }
+ return true;
+ }
+ if (e.ctrlKey && e.keyCode == 88) { // CTRL+X
+ if (select_id) {
+ isCopy = false;
+ scheduler._buffer_id = select_id;
+ var ev = scheduler.getEvent(select_id);
+ scheduler.updateEvent(ev.id);
+ scheduler.callEvent("onEventCut", [ev]);
+ }
+ }
+
+ if (e.ctrlKey && e.keyCode == 86) { // CTRL+V
+ var ev = scheduler.getEvent(scheduler._buffer_id);
+ if (ev) {
+ var event_duration = ev.end_date-ev.start_date;
+ if (isCopy) {
+ var new_ev = scheduler._lame_clone(ev);
+ clear_event_after(new_ev);
+ new_ev.id = scheduler.uid();
+ new_ev.start_date = new Date(date);
+ new_ev.end_date = new Date(new_ev.start_date.valueOf() + event_duration);
+ scheduler.addEvent(new_ev);
+ scheduler.callEvent("onEventPasted", [isCopy, new_ev, ev]);
+ }
+ else { // cut operation
+ var copy = scheduler._lame_copy({}, ev);
+ clear_event_after(copy);
+ copy.start_date = new Date(date);
+ copy.end_date = new Date(copy.start_date.valueOf() + event_duration);
+ var res = scheduler.callEvent("onBeforeEventChanged",[copy, e, false]);
+ if (res) {
+ ev.start_date = new Date(copy.start_date);
+ ev.end_date = new Date(copy.end_date);
+ scheduler.render_view_data(); // need to redraw all events
+
+ scheduler.callEvent("onEventPasted", [isCopy, ev, copy]);
+ isCopy = true; // switch to copy after first paste operation
+ }
+ }
+ }
+ return true;
+ }
+ }
+});
+
+})(); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_limit.js b/sources/ext/dhtmlxscheduler_limit.js
new file mode 100644
index 0000000..304c344
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_limit.js
@@ -0,0 +1,941 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.limit_start = null;
+scheduler.config.limit_end = null;
+scheduler.config.limit_view = false;
+scheduler.config.check_limits = true;
+scheduler.config.mark_now = true;
+scheduler.config.display_marked_timespans = true;
+
+(scheduler._temp_limit_scope = function(){
+ var before = null;
+ var dhx_time_block = "dhx_time_block";
+ var default_timespan_type = "default";
+ var fix_options = function(options, days, zones) {
+ if (days instanceof Date && zones instanceof Date) {
+ options.start_date = days;
+ options.end_date = zones
+ } else {
+ options.days = days;
+ options.zones = zones;
+ }
+ return options;
+ };
+ var get_resulting_options = function(days, zones, sections) {
+ var options = (typeof days == "object") ? days : { days: days };
+ options.type = dhx_time_block;
+ options.css = "";
+ if (zones) {
+ if (sections)
+ options.sections = sections;
+ options = fix_options(options, days, zones);
+ }
+ return options;
+ };
+ scheduler.blockTime = function(days, zones, sections){
+ var options = get_resulting_options(days, zones, sections);
+ return scheduler.addMarkedTimespan(options);
+ };
+ scheduler.unblockTime = function(days, zones, sections) {
+ zones = zones || "fullday";
+ var options = get_resulting_options(days, zones, sections);
+ return scheduler.deleteMarkedTimespan(options);
+ };
+ scheduler.attachEvent("onBeforeViewChange",function(om,od,nm,nd){
+ nd = nd||od; nm = nm||om;
+ if (scheduler.config.limit_view){
+ if (nd.valueOf()>scheduler.config.limit_end.valueOf() || this.date.add(nd,1,nm)<=scheduler.config.limit_start.valueOf()){
+ setTimeout(function(){
+ scheduler.setCurrentView(scheduler._date, nm);
+ },1);
+ return false;
+ }
+ }
+ return true;
+ });
+ scheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){
+ timespan_type = timespan_type || default_timespan_type;
+
+ var res = true;
+ var temp_start_date = new Date(ev.start_date.valueOf());
+ var temp_end_date = scheduler.date.add(temp_start_date, 1, "day");
+ var timespans = scheduler._marked_timespans;
+ for (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, "day") ) {
+ var day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part
+ var day_index = temp_start_date.getDay();
+
+ var zones = getZones(ev, timespans, day_index, day_value, timespan_type);
+ if (zones){
+ for (var i = 0; i < zones.length; i+=2) {
+
+ // they may change for new event if it passes limit zone
+ var sm = scheduler._get_zone_minutes(temp_start_date);
+ var em = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);
+
+ var sz = zones[i];
+ var ez = zones[i+1];
+ if (sz<em && ez>sm) {
+ if(on_overlap == "function"){
+ //handler allows to cancel overlapping
+ //actually needed only to keep default behavior of limits
+ res = on_overlap(ev, sm, em, sz, ez);//event object, event start/end minutes in 'zones' format, zone start/end minutes
+ }else{
+ res = false;
+ }
+ if(!res)
+ break;
+ }
+ }
+ }
+ }
+ return !res;
+ };
+ var blocker = scheduler.checkLimitViolation = function(event){
+ if(!event)
+ return true;
+ if (!scheduler.config.check_limits)
+ return true;
+ var s = scheduler;
+ var c = s.config;
+ var evs = [];
+ if (event.rec_type) {
+ evs = scheduler.getRecDates(event);
+ } else {
+ evs = [event];
+ }
+
+ var complete_res = true;
+ for (var p=0; p<evs.length; p++) {
+ var res = true;
+ var ev = evs[p];
+ // Event could have old _timed property (e.g. we are creating event with DND on timeline view and crossed day)
+ ev._timed = scheduler.isOneDayEvent(ev);
+
+ res = (c.limit_start && c.limit_end) ? (ev.start_date.valueOf() >= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;
+ if (res){
+ res = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(ev, sm, em, sz, ez){
+ //try crop event to allow placing
+ var allow = true;
+ if (sm<=ez && sm >=sz){
+ if (ez == 24*60 || em<ez){
+ allow = false;
+ }
+ if(ev._timed && s._drag_id && s._drag_mode == "new-size"){
+ ev.start_date.setHours(0);
+ ev.start_date.setMinutes(ez);
+ }
+ else {
+ allow = false;
+ }
+ }
+ if ((em>=sz && em<ez) || (sm < sz && em > ez)){
+ if(ev._timed && s._drag_id && s._drag_mode == "new-size"){
+ ev.end_date.setHours(0);
+ ev.end_date.setMinutes(sz);
+ }
+ else {
+ allow = false;
+ }
+ }
+ return allow;
+ });
+ }
+ if (!res) {
+ s._drag_id = null;
+ s._drag_mode = null;
+ res = (s.checkEvent("onLimitViolation")) ? s.callEvent("onLimitViolation",[ev.id, ev]) : res;
+ }
+ complete_res = complete_res && res;
+ }
+ return complete_res;
+
+
+ };
+
+ function getZones(ev, timespans, day_index, day_value, timespan_type){
+ var s = scheduler;
+ //containers for 'unit' and 'timeline' views, and related 'section_id' properties
+ var zones = [];
+ var containers = {
+ '_props':'map_to',
+ 'matrix':'y_property'};
+ //check blocked sections in all units and timelines
+ for(var container in containers){
+ var property = containers[container];
+ if(s[container]){
+ for(var view in s[container]){
+ var view_config = s[container][view];
+ var linker = view_config[property];
+ if(!ev[linker]) continue;
+ zones = s._add_timespan_zones(zones,
+ getBlockedZones(timespans[view], ev[linker], day_index, day_value));
+ }
+ }
+ }
+ // now need to add day blocks
+ zones = s._add_timespan_zones(zones, getBlockedZones(timespans, 'global', day_index, day_value));
+ return zones;
+
+ function getBlockedZones(timespans, property, day_index, day_value){
+ var zones =[];
+ if (timespans && timespans[property]) {
+ var timeline_zones = timespans[property];
+ var blocked_timeline_zones = get_relevant_blocked_zones(day_index, day_value, timeline_zones);
+ for (var i=0; i<blocked_timeline_zones.length; i++) {
+ zones = s._add_timespan_zones(zones, blocked_timeline_zones[i].zones);
+ }
+ }
+ return zones;
+ }
+ function get_relevant_blocked_zones(day_index, day_value, zones) {
+ var relevant_zones = (zones[day_value] && zones[day_value][timespan_type]) ? zones[day_value][timespan_type] :
+ (zones[day_index] && zones[day_index][timespan_type]) ? zones[day_index][timespan_type] : [];
+ return relevant_zones;
+ };
+ }
+
+ scheduler.attachEvent("onMouseDown", function(classname) {
+ return !(classname = dhx_time_block);
+ });
+ scheduler.attachEvent("onBeforeDrag",function(id){
+ if (!id) return true;
+ return blocker(scheduler.getEvent(id));
+ });
+ scheduler.attachEvent("onClick", function (event_id, native_event_object){
+ return blocker(scheduler.getEvent(event_id));
+ });
+ scheduler.attachEvent("onBeforeLightbox",function(id){
+
+ var ev = scheduler.getEvent(id);
+ before = [ev.start_date, ev.end_date];
+ return blocker(ev);
+ });
+ scheduler.attachEvent("onEventSave", function(id, data, is_new_event) {
+
+ //lightbox may not have 'time' section
+ if(!(data.start_date && data.end_date)){
+ var ev = scheduler.getEvent(id);
+ data.start_date = new Date(ev.start_date);
+ data.end_date = new Date(ev.end_date);
+ }
+
+ if(data.rec_type){
+ //_roll_back_dates modifies start_date of recurring event, need to check limits after modification
+ // use a copy to keep original event unchanged
+ var data_copy = scheduler._lame_clone(data);
+ scheduler._roll_back_dates(data_copy);
+ return blocker(data_copy);
+ }
+ return blocker(data);
+ });
+ scheduler.attachEvent("onEventAdded",function(id){
+ if (!id) return true;
+ var ev = scheduler.getEvent(id);
+ if (!blocker(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {
+ //if newly created event is outside of limited time - crop it, leaving only allowed time
+ if (ev.start_date < scheduler.config.limit_start) {
+ ev.start_date = new Date(scheduler.config.limit_start);
+ }
+ if (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {
+ ev.start_date = this.date.add(scheduler.config.limit_end, -1, "day");
+ }
+ if (ev.end_date < scheduler.config.limit_start) {
+ ev.end_date = new Date(scheduler.config.limit_start);
+ }
+ if (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {
+ ev.end_date = this.date.add(scheduler.config.limit_end, -1, "day");
+ }
+ if (ev.start_date.valueOf() >= ev.end_date.valueOf()) {
+ ev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), "minute");
+ }
+ ev._timed=this.isOneDayEvent(ev);
+ }
+ return true;
+ });
+ scheduler.attachEvent("onEventChanged",function(id){
+ if (!id) return true;
+ var ev = scheduler.getEvent(id);
+ if (!blocker(ev)){
+ if (!before) return false;
+ ev.start_date = before[0];
+ ev.end_date = before[1];
+ ev._timed=this.isOneDayEvent(ev);
+ }
+ return true;
+ });
+ scheduler.attachEvent("onBeforeEventChanged",function(ev, native_object, is_new){
+ return blocker(ev);
+ });
+ scheduler.attachEvent("onBeforeEventCreated", function(ev) { // native event
+ var start_date = scheduler.getActionData(ev).date;
+ var event = {
+ _timed: true,
+ start_date: start_date,
+ end_date: scheduler.date.add(start_date, scheduler.config.time_step, "minute")
+ };
+ return blocker(event);
+ });
+
+ scheduler.attachEvent("onViewChange", function(){
+ scheduler._mark_now();
+ });
+ scheduler.attachEvent("onSchedulerResize", function(){
+ window.setTimeout(function(){ scheduler._mark_now(); }, 1);
+ return true;
+ });
+ scheduler.attachEvent("onTemplatesReady", function() {
+ scheduler._mark_now_timer = window.setInterval(function() {
+ scheduler._mark_now();
+ }, 60000);
+ });
+ scheduler._mark_now = function(hide) {
+ // day, week, units views
+ var dhx_now_time = 'dhx_now_time';
+ if (!this._els[dhx_now_time]) {
+ this._els[dhx_now_time] = [];
+ }
+ var now = scheduler._currentDate();
+ var cfg = this.config;
+ scheduler._remove_mark_now(); // delete previous marks if they exist
+ if (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours()<cfg.last_hour) {
+ var day_index = this.locate_holder_day(now);
+ this._els[dhx_now_time] = scheduler._append_mark_now(day_index, now);
+ }
+ };
+ scheduler._append_mark_now = function(day_index, now) {
+ var dhx_now_time = 'dhx_now_time';
+ var zone_start= scheduler._get_zone_minutes(now);
+ var options = {
+ zones: [zone_start, zone_start+1],
+ css: dhx_now_time,
+ type: dhx_now_time
+ };
+ if (!this._table_view) {
+ if (this._props && this._props[this._mode]) { // units view
+ var day_divs = this._els["dhx_cal_data"][0].childNodes;
+ var r_divs = [];
+
+ for (var i=0; i<day_divs.length-1; i++) {
+ var t_day = day_index+i; // as each unit is actually considered +1 day
+ options.days = t_day;
+ var t_div = scheduler._render_marked_timespan(options, null, t_day)[0];
+ r_divs.push(t_div)
+ }
+ return r_divs;
+ } else { // day/week views
+ options.days = day_index;
+ return scheduler._render_marked_timespan(options, null, day_index);
+ }
+ } else {
+ if (this._mode == "month") {
+ options.days = +scheduler.date.date_part(now);
+ return scheduler._render_marked_timespan(options, null, null);
+ }
+ }
+ };
+ scheduler._remove_mark_now = function() {
+ var dhx_now_time = 'dhx_now_time';
+ var els = this._els[dhx_now_time];
+ for (var i=0; i<els.length; i++) {
+ var div = els[i];
+ var parent = div.parentNode;
+ if (parent) {
+ parent.removeChild(div);
+ }
+ }
+ this._els[dhx_now_time] = [];
+ };
+
+ /*
+ scheduler._marked_timespans = {
+ "global": {
+ "0": {
+ "default": [
+ { // sunday
+ zones: [0, 100, 500, 600],
+ css: "yellow_box",
+ type: "default",
+ view: "global",
+ day: 0
+ }
+ ]
+ }
+ "112121312": {
+ "my_special_type": [
+ {
+ zones: [600, 900],
+ type: "block",
+ css: "some_class",
+ view: "global",
+ day: 112121312
+ },
+ {}
+ ]
+ }
+ },
+ "units": {
+ "5_id": {
+ "3": {
+ "special_type": [ {}, {}, {} ],
+ "another_type": [ {} ]
+ }
+ },
+ "6_id": {
+ "11212127": {
+ ...
+ }
+ }
+ }
+ }
+ */
+ scheduler._marked_timespans = { global: {} };
+
+ scheduler._get_zone_minutes = function(date) {
+ return date.getHours()*60 + date.getMinutes();
+ };
+ scheduler._prepare_timespan_options = function(config) { // receives 1 option, returns array of options
+ var r_configs = []; // resulting configs
+ var temp_configs = [];
+
+ if (config.days == "fullweek")
+ config.days = [0,1,2,3,4,5,6];
+
+ if (config.days instanceof Array) {
+ var t_days = config.days.slice();
+ for (var i=0; i<t_days.length; i++) {
+ var cloned_config = scheduler._lame_clone(config);
+ cloned_config.days = t_days[i];
+ r_configs.push.apply(r_configs, scheduler._prepare_timespan_options(cloned_config));
+ }
+ return r_configs;
+ }
+
+ if ( !config || !((config.start_date && config.end_date && config.end_date > config.start_date) || (config.days !== undefined && config.zones)) )
+ return r_configs; // incorrect config was provided
+
+ var min = 0;
+ var max = 24*60;
+ if (config.zones == "fullday")
+ config.zones = [min, max];
+ if (config.zones && config.invert_zones) {
+ config.zones = scheduler.invertZones(config.zones);
+ }
+
+ config.id = scheduler.uid();
+ config.css = config.css||"";
+ config.type = config.type||default_timespan_type;
+
+ var sections = config.sections;
+ if (sections) {
+ for (var view_key in sections) {
+ if (sections.hasOwnProperty(view_key)) {
+ var ids = sections[view_key];
+ if (!(ids instanceof Array))
+ ids = [ids];
+ for (var i=0; i<ids.length; i++) {
+ var t_config = scheduler._lame_copy({}, config);
+ t_config.sections = {};
+ t_config.sections[view_key] = ids[i];
+ temp_configs.push(t_config);
+ }
+ }
+ }
+ } else {
+ temp_configs.push(config);
+ }
+
+ for (var k=0; k<temp_configs.length; k++) {
+ var c_config = temp_configs[k]; // config to be checked
+
+ var start_date = c_config.start_date;
+ var end_date = c_config.end_date;
+
+ if (start_date && end_date) {
+ var t_sd = scheduler.date.date_part(new Date(start_date)); // e.g. 05 october
+ var t_ed= scheduler.date.add(t_sd, 1, "day"); // 06 october, will both be incremented in the loop
+
+ while (t_sd < end_date) {
+ var t_config = scheduler._lame_copy({}, c_config);
+ delete t_config.start_date;
+ delete t_config.end_date;
+ t_config.days = t_sd.valueOf();
+ var zone_start = (start_date > t_sd) ? scheduler._get_zone_minutes(start_date) : min;
+ var zone_end = ( end_date>t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);
+ t_config.zones = [zone_start, zone_end];
+ r_configs.push(t_config);
+
+ t_sd = t_ed;
+ t_ed = scheduler.date.add(t_ed, 1, "day");
+ }
+ } else {
+ if (c_config.days instanceof Date)
+ c_config.days = (scheduler.date.date_part(c_config.days)).valueOf();
+ c_config.zones = config.zones.slice();
+ r_configs.push(c_config);
+ }
+ }
+ return r_configs;
+ };
+ scheduler._get_dates_by_index = function(index, start, end) {
+ var dates = [];
+ start = scheduler.date.date_part(new Date(start||scheduler._min_date));
+ end = new Date(end||scheduler._max_date);
+ var start_day = start.getDay();
+ var delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);
+ var t_date = scheduler.date.add(start, delta, "day");
+ for (; t_date < end; t_date = scheduler.date.add(t_date, 1, "week")) {
+ dates.push(t_date);
+ }
+ return dates;
+ };
+ scheduler._get_css_classes_by_config = function(config) {
+ var css_classes = [];
+ if (config.type == dhx_time_block) {
+ css_classes.push(dhx_time_block);
+ if (config.css)
+ css_classes.push(dhx_time_block+"_reset");
+ }
+ css_classes.push("dhx_marked_timespan", config.css);
+ return css_classes.join(" ");
+ };
+ scheduler._get_block_by_config = function(config) {
+ var block = document.createElement("DIV");
+ if (config.html) {
+ if (typeof config.html == "string")
+ block.innerHTML = config.html;
+ else
+ block.appendChild(config.html);
+ }
+ return block;
+ };
+ scheduler._render_marked_timespan = function(options, area, day) {
+ var blocks = []; // resulting block which will be rendered and returned
+ var c = scheduler.config;
+ var min_date = this._min_date;
+ var max_date = this._max_date;
+ var day_value = false; // if timespan for specific date should be displayed
+
+ if (!c.display_marked_timespans)
+ return blocks;
+
+ // in case of markTimespan
+ if (!day && day !== 0) {
+ if (options.days < 7)
+ day = options.days;
+ else {
+ var date_to_display = new Date(options.days);
+ day_value = +date_to_display;
+
+ // in case of markTimespan date could be not in the viewing range, need to return
+ if ( !(+max_date >= +date_to_display && +min_date <= +date_to_display) )
+ return blocks;
+
+ day = date_to_display.getDay();
+ }
+
+ // convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)
+ var min_day = min_date.getDay();
+ if (min_day > day) {
+ day = 7 - (min_day-day);
+ } else {
+ day = day - min_day;
+ }
+ }
+ var zones = options.zones;
+ var css_classes = scheduler._get_css_classes_by_config(options);
+
+ if (scheduler._table_view && scheduler._mode == "month") {
+ var areas = [];
+ var days = [];
+
+
+ if (!area) {
+ days = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);
+ for (var i=0; i < days.length; i++) {
+ areas.push( this._scales[days[i]] );
+ }
+ } else {
+ areas.push(area);
+ days.push(day);
+ }
+
+ for (var i=0; i < areas.length; i++) {
+ area = areas[i];
+ day = days[i];
+
+ for (var k=0; k < zones.length; k+=2) {
+ var start = zones[i];
+ var end = zones[i+1];
+ if (end <= start)
+ return [];
+
+ var block = scheduler._get_block_by_config(options);
+ block.className = css_classes;
+
+ var height = area.offsetHeight - 1; // 1 for bottom border
+ var width = area.offsetWidth - 1; // 1 for left border
+
+ var sweek = Math.floor((this._correct_shift(day,1)-min_date.valueOf())/(60*60*1000*24*this._cols.length));
+ var sday = this.locate_holder_day(day, false) % this._cols.length;
+
+ var left = this._colsS[sday];
+ var top = this._colsS.heights[sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)-1;
+
+ block.style.top = top + "px";
+ block.style.lineHeight = block.style.height = height + "px";
+
+ block.style.left = (left + Math.round( (start)/(24*60) * width)) + "px";
+ block.style.width = Math.round( (end-start)/(24*60) * width) + "px";
+
+ area.appendChild(block);
+ blocks.push(block);
+ }
+ }
+ } else {
+ var index = day;
+ if (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {
+ var view = this._props[this._mode];
+ index = view.order[options.sections[this._mode]];
+ if (view.size && (index > view.position+view.size)) {
+ index = 0;
+ }
+ }
+ area = area ? area : scheduler.locate_holder(index);
+
+ for (var i = 0; i < zones.length; i+=2){
+ var start = Math.max(zones[i], c.first_hour*60);
+ var end = Math.min(zones[i+1], c.last_hour*60);
+ if (end <= start) {
+ if (i+2 < zones.length)
+ continue;
+ else
+ return [];
+ }
+
+ var block = scheduler._get_block_by_config(options);
+ block.className = css_classes;
+
+ // +1 for working with section which really takes up whole height (as % would be == 0)
+ var all_hours_height = this.config.hour_size_px*24 + 1;
+ var hour_ms = 60*60*1000;
+ block.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + "px";
+ block.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+"px";
+
+ area.appendChild(block);
+ blocks.push(block);
+ }
+ }
+
+ return blocks;
+ };
+ // just marks timespan, will be cleaned after refresh
+ scheduler.markTimespan = function(configuration) {
+ var configs = scheduler._prepare_timespan_options(configuration);
+ if (!configs.length)
+ return;
+ var divs = [];
+ for (var i=0; i<configs.length; i++) {
+ var config = configs[i];
+ var blocks = scheduler._render_marked_timespan(config, null, null);
+ if(blocks.length)
+ divs.push.apply(divs, blocks);
+ }
+ return divs;
+ };
+ scheduler.unmarkTimespan = function(divs) {
+ if (!divs)
+ return;
+ for (var i=0; i<divs.length; i++) {
+ var div = divs[i];
+ // parent may no longer be present if we switched views, navigated
+ if (div.parentNode) {
+ div.parentNode.removeChild(div);
+ }
+ }
+ };
+
+ scheduler._marked_timespans_ids = {};
+ // adds marked timespan to collections, persistent
+ scheduler.addMarkedTimespan = function(configuration) {
+ var configs = scheduler._prepare_timespan_options(configuration);
+ var global = "global";
+
+ if (!configs.length)
+ return; // options are incorrect, nothing to mark
+
+ var id = configs[0].id;
+ var timespans = scheduler._marked_timespans;
+ var ids = scheduler._marked_timespans_ids;
+ if (!ids[id])
+ ids[id] = [];
+
+ for (var i=0; i<configs.length; i++) {
+ var config = configs[i];
+ var day = config.days;
+ var zones = config.zones;
+ var css = config.css;
+ var sections = config.sections;
+ var type = config.type; // default or specified
+ config.id = id;
+
+ if (sections) {
+ for (var view_key in sections) {
+ if (sections.hasOwnProperty(view_key)) {
+ if (!timespans[view_key])
+ timespans[view_key] = {};
+ var unit_id = sections[view_key];
+ var timespans_view = timespans[view_key];
+ if (!timespans_view[unit_id])
+ timespans_view[unit_id] = {};
+ if (!timespans_view[unit_id][day])
+ timespans_view[unit_id][day] = {};
+ if (!timespans_view[unit_id][day][type]){
+ timespans_view[unit_id][day][type] = [];
+ if(!scheduler._marked_timespans_types)
+ scheduler._marked_timespans_types = {}
+ if(!scheduler._marked_timespans_types[type])
+ scheduler._marked_timespans_types[type] = true;
+ }
+ var day_configs = timespans_view[unit_id][day][type];
+ config._array = day_configs;
+ day_configs.push(config);
+ ids[id].push(config);
+ }
+ }
+ } else {
+ if (!timespans[global][day])
+ timespans[global][day] = {};
+ if (!timespans[global][day][type])
+ timespans[global][day][type] = [];
+
+ if(!scheduler._marked_timespans_types)
+ scheduler._marked_timespans_types = {}
+ if(!scheduler._marked_timespans_types[type])
+ scheduler._marked_timespans_types[type] = true;
+
+
+ var day_configs = timespans[global][day][type];
+ config._array = day_configs;
+ day_configs.push(config);
+ ids[id].push(config);
+ }
+ }
+ return id;
+ };
+ // not used for now
+ scheduler._add_timespan_zones = function(current_zones, zones) {
+ var resulting_zones = current_zones.slice();
+ zones = zones.slice();
+
+ if (!resulting_zones.length)
+ return zones;
+
+ for (var i=0; i<resulting_zones.length; i+=2) {
+ var c_zone_start = resulting_zones[i];
+ var c_zone_end = resulting_zones[i+1];
+ var isLast = (i+2 == resulting_zones.length);
+
+ for (var k=0; k<zones.length; k+=2) {
+ var zone_start = zones[k];
+ var zone_end = zones[k+1];
+ if ((zone_end > c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {
+ resulting_zones[i] = Math.min(c_zone_start, zone_start);
+ resulting_zones[i+1] = Math.max(c_zone_end, zone_end);
+ i -= 2;
+ } else {
+ if (!isLast) // do nothing, maybe next current zone will match or will be last
+ continue;
+
+ var offset = (c_zone_start > zone_start)?0:2;
+ resulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another
+ }
+ zones.splice(k--,2); // zone was merged or added, need to exclude it
+ break;
+ }
+ }
+ return resulting_zones;
+ };
+ scheduler._subtract_timespan_zones = function(current_zones, zones) {
+ var resulting_zones = current_zones.slice();
+ for (var i=0; i<resulting_zones.length; i+=2 ) {
+ var c_zone_start = resulting_zones[i];// current_zone_start
+ var c_zone_end = resulting_zones[i+1];
+ for (var k=0; k<zones.length; k+=2) {
+ var zone_start = zones[k];
+ var zone_end = zones[k+1];
+ if (zone_end > c_zone_start && zone_start < c_zone_end) {
+ var is_modified = false;
+ if (c_zone_start >= zone_start && c_zone_end <= zone_end) {
+ resulting_zones.splice(i, 2);
+ }
+ if (c_zone_start < zone_start) {
+ resulting_zones.splice(i, 2, c_zone_start, zone_start);
+ is_modified = true;
+ }
+ if (c_zone_end > zone_end) {
+ resulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);
+ }
+ i -= 2;
+ break;
+ } else {
+ continue;
+ }
+ }
+ }
+ return resulting_zones;
+ };
+ scheduler.invertZones = function(zones) {
+ return scheduler._subtract_timespan_zones([0, 1440], zones.slice());
+ };
+ scheduler._delete_marked_timespan_by_id = function(id) {
+ var configs = scheduler._marked_timespans_ids[id];
+ if (configs) {
+ for (var i=0; i<configs.length; i++) {
+ var config = configs[i];
+ var parent_array = config._array;
+ for (var k=0; k<parent_array.length; k++) {
+ if (parent_array[k] == config) {
+ parent_array.splice(k, 1);
+ break;
+ }
+ }
+ }
+ }
+ };
+ scheduler._delete_marked_timespan_by_config = function(config) {
+ var timespans = scheduler._marked_timespans;
+ var sections = config.sections;
+ var day = config.days;
+ var type = config.type||default_timespan_type;
+ var day_timespans = []; // array of timespans to subtract our config
+ if (sections) {
+ for (var view_key in sections) {
+ if (sections.hasOwnProperty(view_key) && timespans[view_key]) {
+ var unit_id = sections[view_key];
+ if (timespans[view_key][unit_id] && timespans[view_key][unit_id][day] && timespans[view_key][unit_id][day][type])
+ day_timespans = timespans[view_key][unit_id][day][type];
+ }
+ }
+ } else {
+ if (timespans.global[day] && timespans.global[day][type])
+ day_timespans = timespans.global[day][type];
+ }
+ for (var i=0; i<day_timespans.length; i++) {
+ var d_t = day_timespans[i];
+ var zones = scheduler._subtract_timespan_zones(d_t.zones, config.zones);
+ if (zones.length)
+ d_t.zones = zones;
+ else {
+ day_timespans.splice(i,1);
+ i--;
+ // need to update ids collection
+ var related_zones = scheduler._marked_timespans_ids[d_t.id];
+ for (var k=0; k<related_zones.length; k++) {
+ if (related_zones[k] == d_t) {
+ related_zones.splice(k, 1);
+ break;
+ }
+ }
+ }
+ }
+ };
+ scheduler.deleteMarkedTimespan = function(configuration) {
+ // delete everything
+ if (!arguments.length) {
+ scheduler._marked_timespans = { global: {} };
+ scheduler._marked_timespans_ids = {};
+ scheduler._marked_timespans_types = {};
+ }
+
+ if (typeof configuration != "object") { // id was passed
+ scheduler._delete_marked_timespan_by_id(configuration);
+ } else { // normal configuration was passed
+
+ if(!(configuration.start_date && configuration.end_date)){
+ if(!configuration.days)
+ configuration.days = "fullweek";
+ if(!configuration.zones)
+ configuration.zones = "fullday";
+ }
+
+ var types = [];
+ if(!configuration.type){
+ //if type not specified - delete timespans of all types
+ for(var type in scheduler._marked_timespans_types){
+ types.push(type);
+ }
+ }else{
+ types.push(configuration.type);
+ }
+
+
+ var configs = scheduler._prepare_timespan_options(configuration);
+
+ for (var i=0; i<configs.length; i++) {
+
+ var config = configs[i];
+ for( var t=0; t < types.length; t++){
+ var typedConfig = scheduler._lame_clone(config);
+ typedConfig.type = types[t];
+ scheduler._delete_marked_timespan_by_config(typedConfig);
+ }
+ }
+
+ }
+ };
+ scheduler._get_types_to_render = function(common, specific) {
+ var types_to_render = (common) ? common : {};
+ for (var type in specific||{} ) {
+ if (specific.hasOwnProperty(type)) {
+ types_to_render[type] = specific[type];
+ }
+ }
+ return types_to_render;
+ };
+ scheduler._get_configs_to_render = function(types) {
+ var configs = [];
+ for (var type in types) {
+ if (types.hasOwnProperty(type)) {
+ configs.push.apply(configs, types[type]);
+ }
+ }
+ return configs;
+ };
+ scheduler.attachEvent("onScaleAdd", function(area, day) {
+ if (scheduler._table_view && scheduler._mode != "month")
+ return;
+
+ var day_index = day.getDay();
+ var day_value = day.valueOf();
+ var mode = this._mode;
+ var timespans = scheduler._marked_timespans;
+ var r_configs = [];
+
+ if (this._props && this._props[mode]) { // we are in the units view and need to draw it's sections as well
+ var view = this._props[mode]; // units view object
+ var units = view.options;
+ var index = scheduler._get_unit_index(view, day);
+ var unit = units[index]; // key, label
+ day = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls
+ day_index = day.getDay();
+ day_value = day.valueOf();
+
+ if (timespans[mode] && timespans[mode][unit.key]) {
+ var unit_zones = timespans[mode][unit.key];
+ var unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);
+ r_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));
+ }
+ }
+
+ var global_data = timespans["global"];
+ var day_types = global_data[day_value]||global_data[day_index];
+ r_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));
+
+ for (var i=0; i<r_configs.length; i++) {
+ scheduler._render_marked_timespan(r_configs[i], area, day);
+ }
+ });
+
+})();
diff --git a/sources/ext/dhtmlxscheduler_map_view.js b/sources/ext/dhtmlxscheduler_map_view.js
new file mode 100644
index 0000000..bec49c7
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_map_view.js
@@ -0,0 +1,488 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.xy.map_date_width = 188; // date column width
+scheduler.xy.map_description_width = 400; // description column width
+
+scheduler.config.map_resolve_event_location = true; // if events in database doesn't have lat and lng values there will be an attempt to resolve them on event loading, useful for migration
+scheduler.config.map_resolve_user_location = true; // if user will be promted to share his location to display it on the map
+
+scheduler.config.map_initial_position = new google.maps.LatLng(48.724, 8.215); // inital position of the map
+scheduler.config.map_error_position = new google.maps.LatLng(15, 15); // this position will be displayed in case if event doesn't have corresponding coordinates
+
+scheduler.config.map_infowindow_max_width = 300;
+
+scheduler.config.map_type = google.maps.MapTypeId.ROADMAP;
+
+scheduler.config.map_zoom_after_resolve = 15;
+
+scheduler.locale.labels.marker_geo_success = "It seems you are here.";
+scheduler.locale.labels.marker_geo_fail = "Sorry, could not get your current position using geolocation.";
+
+scheduler.templates.marker_date = scheduler.date.date_to_str("%Y-%m-%d %H:%i"); // date for map's infowindow will be formated following way
+
+scheduler.templates.marker_text = function(start, end, ev) {
+ return "<div><b>" + ev.text + "</b><br/><br/>" + (ev.event_location || '') + "<br/><br/>" + scheduler.templates.marker_date(start) + " - " + scheduler.templates.marker_date(end) + "</div>";
+};
+scheduler.dblclick_dhx_map_area = function() {
+ if (!this.config.readonly && this.config.dblclick_create)
+ this.addEventNow({
+ start_date: scheduler._date,
+ end_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, "minute")
+ });
+};
+scheduler.templates.map_time = function(start, end, ev) {
+ if (ev._timed)
+ return this.day_date(ev.start_date, ev.end_date, ev) + " " + this.event_date(start);
+ else
+ return scheduler.templates.day_date(start) + " &ndash; " + scheduler.templates.day_date(end);
+};
+scheduler.templates.map_text = function(start, end, ev) {
+ return ev.text;
+};
+
+scheduler.date.map_start = function(d) {
+ return d;
+};
+scheduler.date.add_map = function(date, inc, mode) {
+ return (new Date(date.valueOf()));
+};
+
+scheduler.templates.map_date = function(dd, ed, mode) {
+ return '';
+};
+
+scheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update
+
+scheduler.attachEvent("onSchedulerReady", function() {
+ scheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map
+
+ var gmap = document.createElement('div');
+ gmap.className = 'dhx_map';
+ gmap.id = 'dhx_gmap';
+ gmap.style.dispay = "none";
+
+ var node = scheduler._obj;
+
+ node.appendChild(gmap);
+
+ scheduler._els.dhx_gmap = [];
+ scheduler._els.dhx_gmap.push(gmap);
+
+ _setMapSize('dhx_gmap');
+
+ var mapOptions = {
+ zoom: scheduler.config.map_inital_zoom || 10,
+ center: scheduler.config.map_initial_position,
+ mapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP
+ };
+ var map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);
+ map.disableDefaultUI = false;
+ map.disableDoubleClickZoom = !scheduler.config.readonly;
+
+ google.maps.event.addListener(map, "dblclick", function(event) {
+ if (!scheduler.config.readonly && scheduler.config.dblclick_create) {
+ var point = event.latLng;
+ geocoder.geocode(
+ { 'latLng': point },
+ function(results, status) {
+ if (status == google.maps.GeocoderStatus.OK) {
+ point = results[0].geometry.location;
+ scheduler.addEventNow({
+ lat: point.lat(),
+ lng: point.lng(),
+ event_location: results[0].formatted_address,
+ start_date: scheduler._date,
+ end_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, "minute")
+ });
+ }
+ }
+ );
+ }
+ });
+
+ var infoWindowOptions = {
+ content: ''
+ };
+
+ if (scheduler.config.map_infowindow_max_width) {
+ infoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;
+ }
+
+ scheduler.map = {
+ _points: [],
+ _markers: [],
+ _infowindow: new google.maps.InfoWindow(infoWindowOptions),
+ _infowindows_content: [],
+ _initialization_count: -1,
+ _obj: map
+ };
+
+ geocoder = new google.maps.Geocoder();
+
+ if (scheduler.config.map_resolve_user_location) {
+ if (navigator.geolocation) {
+ if (!scheduler._isMapPositionSet) {
+ navigator.geolocation.getCurrentPosition(function(position) {
+ var _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
+ map.setCenter(_userLocation);
+ map.setZoom(scheduler.config.map_zoom_after_resolve || 10);
+ scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);
+ scheduler.map._infowindow.position = map.getCenter();
+ scheduler.map._infowindow.open(map);
+
+ scheduler._isMapPositionSet = true;
+ },
+ function() {
+ scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);
+ scheduler.map._infowindow.setPosition(map.getCenter());
+ scheduler.map._infowindow.open(map);
+ scheduler._isMapPositionSet = true;
+ });
+ }
+ }
+ }
+ google.maps.event.addListener(map, "resize", function(event) {
+ gmap.style.zIndex = '5';
+ map.setZoom(map.getZoom());
+
+ });
+ google.maps.event.addListener(map, "tilesloaded", function(event) {
+ gmap.style.zIndex = '5';
+ });
+
+ gmap.style.display = 'none'; // property was changed after attaching map
+
+
+ scheduler.attachEvent("onSchedulerResize", function() {
+ if (this._mode == "map") {
+ this.map_view(true);
+ return false
+ }
+ return true;
+ });
+
+ var old = scheduler.render_data;
+ scheduler.render_data = function(evs, hold) {
+ if (this._mode == "map") {
+ fill_map_tab();
+ var events = scheduler.get_visible_events();
+ for (var i = 0; i < events.length; i++) {
+ if (!scheduler.map._markers[events[i].id]) {
+ showAddress(events[i], false, false);
+ }
+ }
+ } else
+ return old.apply(this, arguments);
+ };
+
+ function set_full_view(mode) {
+ if (mode) {
+ var l = scheduler.locale.labels;
+ scheduler._els["dhx_cal_header"][0].innerHTML = "<div class='dhx_map_line' style='width: " + (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 2) + "px;' ><div class='headline_date' style='width: " + scheduler.xy.map_date_width + "px;'>" + l.date + "</div><div class='headline_description' style='width: " + scheduler.xy.map_description_width + "px;'>" + l.description + "</div></div>";
+ scheduler._table_view = true;
+ scheduler.set_sizes();
+ }
+ }
+
+ function clear_map_tab() {
+ scheduler._selected_event_id = null;
+ scheduler.map._infowindow.close();
+ var markers = scheduler.map._markers;
+ for (var key in markers) {
+ if (markers.hasOwnProperty(key)) {
+ markers[key].setMap(null);
+ delete scheduler.map._markers[key];
+ if (scheduler.map._infowindows_content[key])
+ delete scheduler.map._infowindows_content[key];
+ }
+ }
+ }
+
+ function fill_map_tab() {
+ //select events for which data need to be printed
+ var events = scheduler.get_visible_events();
+ events.sort(function(a, b) {
+ if(a.start_date.valueOf()==b.start_date.valueOf())
+ return a.id>b.id?1:-1;
+ return a.start_date>b.start_date?1:-1;
+ });
+
+ //generate html for the view
+ var html = "<div class='dhx_map_area'>";
+ for (var i = 0; i < events.length; i++) {
+ var ev = events[i];
+ var event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';
+ var bg_color = (ev.color ? ("background:" + ev.color + ";") : "");
+ var color = (ev.textColor ? ("color:" + ev.textColor + ";") : "");
+ html += "<div class='" + event_class + "' event_id='" + ev.id + "' style='" + bg_color + "" + color + "" + (ev._text_style || "") + " width: " + (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 2) + "px;'><div style='width: " + scheduler.xy.map_date_width + "px;' >" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + "</div>";
+ html += "<div class='dhx_event_icon icon_details'>&nbsp</div>";
+ html += "<div class='line_description' style='width:" + (scheduler.xy.map_description_width - 25) + "px;'>" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + "</div></div>"; // -25 = icon size 20 and padding 5
+ }
+ html += "<div class='dhx_v_border' style='left: " + (scheduler.xy.map_date_width - 2) + "px;'></div><div class='dhx_v_border_description'></div></div>";
+
+ //render html
+ scheduler._els["dhx_cal_data"][0].scrollTop = 0; //fix flickering in FF
+ scheduler._els["dhx_cal_data"][0].innerHTML = html;
+ scheduler._els["dhx_cal_data"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';
+
+ var t = scheduler._els["dhx_cal_data"][0].firstChild.childNodes;
+ scheduler._els["dhx_cal_date"][0].innerHTML = scheduler.templates[scheduler._mode + "_date"](scheduler._min_date, scheduler._max_date, scheduler._mode);
+
+ scheduler._rendered = [];
+ for (var i = 0; i < t.length - 2; i++) {
+ scheduler._rendered[i] = t[i];
+ }
+ }
+
+ function _setMapSize(elem_id) { //input - map's div id
+ var map = document.getElementById(elem_id);
+ var height = scheduler._y - scheduler.xy.nav_height;
+ if (height < 0)
+ height = 0;
+ var width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;
+ if (width < 0)
+ width = 0;
+ map.style.height = height + 'px';
+ map.style.width = width + 'px';
+ map.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';
+ map.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';
+ }
+
+ scheduler.map_view = function(mode) {
+ scheduler.map._initialization_count++;
+ var gmap = scheduler._els.dhx_gmap[0];
+ scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';
+
+ scheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());
+ scheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, "year");
+
+ scheduler._table_view = true;
+ set_full_view(mode);
+
+ if (mode) { //map tab activated
+ clear_map_tab();
+ fill_map_tab();
+ gmap.style.display = 'block';
+
+ // need to resize block everytime window is resized
+ _setMapSize('dhx_gmap');
+ var temp_center = scheduler.map._obj.getCenter();
+
+ var events = scheduler.get_visible_events();
+ for (var i = 0; i < events.length; i++) {
+ if (!scheduler.map._markers[events[i].id]) {
+ showAddress(events[i]);
+ }
+ }
+
+ } else { //map tab de-activated
+ gmap.style.display = 'none';
+ }
+ google.maps.event.trigger(scheduler.map._obj, 'resize');
+
+ if (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position
+ scheduler.map._obj.setCenter(temp_center);
+ }
+
+ if (scheduler._selected_event_id) {
+ selectEvent(scheduler._selected_event_id);
+ }
+ };
+
+ var selectEvent = function(event_id) {
+ scheduler.map._obj.setCenter(scheduler.map._points[event_id]);
+ scheduler.callEvent("onClick", [event_id]);
+ };
+
+ var showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?
+ var point = scheduler.config.map_error_position;
+ if (event.lat && event.lng) {
+ point = new google.maps.LatLng(event.lat, event.lng);
+ }
+ var message = scheduler.templates.marker_text(event.start_date, event.end_date, event);
+ if (!scheduler._new_event) {
+
+ scheduler.map._infowindows_content[event.id] = message;
+
+ if (scheduler.map._markers[event.id])
+ scheduler.map._markers[event.id].setMap(null);
+
+ scheduler.map._markers[event.id] = new google.maps.Marker({
+ position: point,
+ map: scheduler.map._obj
+ });
+
+ google.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {
+ scheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);
+ scheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);
+ scheduler._selected_event_id = event.id;
+ scheduler.render_data();
+ });
+ scheduler.map._points[event.id] = point;
+
+ if (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);
+ if (performClick) scheduler.callEvent("onClick", [event.id]);
+ }
+ };
+
+ scheduler.attachEvent("onClick", function(event_id, native_event_object) {
+ if (this._mode == "map") {
+ scheduler._selected_event_id = event_id;
+ for (var i = 0; i < scheduler._rendered.length; i++) {
+ scheduler._rendered[i].className = 'dhx_map_line';
+ if (scheduler._rendered[i].getAttribute("event_id") == event_id) {
+ scheduler._rendered[i].className += " highlight";
+ }
+ }
+ if (scheduler.map._points[event_id] && scheduler.map._markers[event_id]) {
+ scheduler.map._obj.setCenter(scheduler.map._points[event_id]); // was panTo
+ google.maps.event.trigger(scheduler.map._markers[event_id], 'click');
+ }
+ }
+ return true;
+ });
+
+ var _displayEventOnMap = function(event) {
+ if (event.event_location && geocoder) {
+ geocoder.geocode(
+ {
+ 'address': event.event_location,
+ 'language': scheduler.uid().toString()
+ },
+ function(results, status) {
+ var point = {};
+ if (status != google.maps.GeocoderStatus.OK) {
+ point = scheduler.callEvent("onLocationError", [event.id]);
+ if (!point || point === true)
+ point = scheduler.config.map_error_position;
+ } else {
+ point = results[0].geometry.location;
+ }
+ event.lat = point.lat();
+ event.lng = point.lng();
+
+ scheduler._selected_event_id = event.id;
+
+ scheduler._latLngUpdate = true;
+ scheduler.callEvent("onEventChanged", [event.id, event]);
+ showAddress(event, true, true);
+ }
+ );
+ } else {
+ showAddress(event, true, true);
+ }
+ };
+
+ var _updateEventLocation = function(event) { // update lat and lng in database
+ if (event.event_location && geocoder) {
+ geocoder.geocode(
+ {
+ 'address': event.event_location,
+ 'language': scheduler.uid().toString()
+ },
+ function(results, status) {
+ var point = {};
+ if (status != google.maps.GeocoderStatus.OK) {
+ point = scheduler.callEvent("onLocationError", [event.id]);
+ if (!point || point === true)
+ point = scheduler.config.map_error_position;
+ } else {
+ point = results[0].geometry.location;
+ }
+ event.lat = point.lat();
+ event.lng = point.lng();
+ scheduler._latLngUpdate = true;
+ scheduler.callEvent("onEventChanged", [event.id, event]);
+ }
+ );
+ }
+ };
+
+ var _delay = function(method, object, params, delay) {
+ setTimeout(function() {
+ var ret = method.apply(object, params);
+ method = object = params = null;
+ return ret;
+ }, delay || 1);
+ };
+
+ scheduler.attachEvent("onEventChanged", function(event_id, event_object) {
+ if (!this._latLngUpdate) {
+ var event = scheduler.getEvent(event_id);
+ if ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {
+ if (scheduler.map._markers[event_id])
+ scheduler.map._markers[event_id].setMap(null);
+ _displayEventOnMap(event);
+ } else { // event no longer should be displayed on the map view
+ scheduler._selected_event_id = null;
+ scheduler.map._infowindow.close();
+ if (scheduler.map._markers[event_id])
+ scheduler.map._markers[event_id].setMap(null);
+ }
+ }
+ else
+ this._latLngUpdate = false;
+ return true;
+ });
+
+
+ scheduler.attachEvent("onEventIdChange", function(old_event_id, new_event_id) {
+ var event = scheduler.getEvent(new_event_id);
+ if ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {
+ if (scheduler.map._markers[old_event_id]) {
+ scheduler.map._markers[old_event_id].setMap(null);
+ delete scheduler.map._markers[old_event_id];
+ }
+ if (scheduler.map._infowindows_content[old_event_id])
+ delete scheduler.map._infowindows_content[old_event_id];
+ _displayEventOnMap(event);
+ }
+ return true;
+ });
+
+ scheduler.attachEvent("onEventAdded", function(event_id, event_object) {
+ if (!scheduler._dataprocessor) {
+ if ((event_object.start_date < scheduler._min_date && event_object.end_date > scheduler._min_date) || (event_object.start_date < scheduler._max_date && event_object.end_date > scheduler._max_date) || (event_object.start_date.valueOf() >= scheduler._min_date && event_object.end_date.valueOf() <= scheduler._max_date)) {
+ if (scheduler.map._markers[event_id])
+ scheduler.map._markers[event_id].setMap(null);
+ _displayEventOnMap(event_object);
+ }
+ }
+ return true;
+ });
+
+ /* Test/example
+ scheduler.attachEvent("onLocationError", function(event_id,event_object){
+ return new google.maps.LatLng(8, 8);
+ });
+ */
+
+ scheduler.attachEvent("onBeforeEventDelete", function(event_id, event_object) {
+ if (scheduler.map._markers[event_id]) {
+ scheduler.map._markers[event_id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet
+ }
+ scheduler._selected_event_id = null;
+ scheduler.map._infowindow.close();
+ return true;
+ });
+
+ scheduler._event_resolve_delay = 1500;
+ scheduler.attachEvent("onEventLoading", function(event) {
+ if (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change
+ scheduler._event_resolve_delay += 1500;
+ _delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);
+ }
+ return true;
+ });
+
+ scheduler.attachEvent("onEventCancel", function(event_id, is_new) {
+ if (is_new) {
+ if (scheduler.map._markers[event_id])
+ scheduler.map._markers[event_id].setMap(null);
+ scheduler.map._infowindow.close();
+ }
+ return true;
+ });
+});
diff --git a/sources/ext/dhtmlxscheduler_minical.js b/sources/ext/dhtmlxscheduler_minical.js
new file mode 100644
index 0000000..1fd41b3
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_minical.js
@@ -0,0 +1,455 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.templates.calendar_month = scheduler.date.date_to_str("%F %Y");
+scheduler.templates.calendar_scale_date = scheduler.date.date_to_str("%D");
+scheduler.templates.calendar_date = scheduler.date.date_to_str("%d");
+scheduler.config.minicalendar = {
+ mark_events: true
+};
+scheduler._synced_minicalendars = [];
+scheduler.renderCalendar = function(obj, _prev, is_refresh) {
+ var cal = null;
+ var date = obj.date || (scheduler._currentDate());
+ if (typeof date == "string")
+ date = this.templates.api_date(date);
+
+ if (!_prev) {
+ var cont = obj.container;
+ var pos = obj.position;
+
+ if (typeof cont == "string")
+ cont = document.getElementById(cont);
+
+ if (typeof pos == "string")
+ pos = document.getElementById(pos);
+ if (pos && (typeof pos.left == "undefined")) {
+ var tpos = getOffset(pos);
+ pos = {
+ top: tpos.top + pos.offsetHeight,
+ left: tpos.left
+ };
+ }
+ if (!cont)
+ cont = scheduler._get_def_cont(pos);
+
+ cal = this._render_calendar(cont, date, obj);
+ cal.onclick = function(e) {
+ e = e || event;
+ var src = e.target || e.srcElement;
+
+ if (src.className.indexOf("dhx_month_head") != -1) {
+ var pname = src.parentNode.className;
+ if (pname.indexOf("dhx_after") == -1 && pname.indexOf("dhx_before") == -1) {
+ var newdate = scheduler.templates.xml_date(this.getAttribute("date"));
+ newdate.setDate(parseInt(src.innerHTML, 10));
+ scheduler.unmarkCalendar(this);
+ scheduler.markCalendar(this, newdate, "dhx_calendar_click");
+ this._last_date = newdate;
+ if (this.conf.handler) this.conf.handler.call(scheduler, newdate, this);
+ }
+ }
+ };
+ } else {
+ cal = this._render_calendar(_prev.parentNode, date, obj, _prev);
+ scheduler.unmarkCalendar(cal);
+ }
+
+ if (scheduler.config.minicalendar.mark_events) {
+ var start = scheduler.date.month_start(date);
+ var end = scheduler.date.add(start, 1, "month");
+ var evs = this.getEvents(start, end);
+ var filter = this["filter_" + this._mode];
+ for (var i = 0; i < evs.length; i++) {
+ var ev = evs[i];
+ if (filter && !filter(ev.id, ev))
+ continue;
+ var d = ev.start_date;
+ if (d.valueOf() < start.valueOf())
+ d = start;
+ d = scheduler.date.date_part(new Date(d.valueOf()));
+ while (d < ev.end_date) {
+ this.markCalendar(cal, d, "dhx_year_event");
+ d = this.date.add(d, 1, "day");
+ if (d.valueOf() >= end.valueOf())
+ break;
+ }
+ }
+ }
+
+ this._markCalendarCurrentDate(cal);
+
+ cal.conf = obj;
+ if (obj.sync && !is_refresh)
+ this._synced_minicalendars.push(cal);
+
+ return cal;
+};
+scheduler._get_def_cont = function(pos) {
+ if (!this._def_count) {
+ this._def_count = document.createElement("DIV");
+ this._def_count.className = "dhx_minical_popup";
+ this._def_count.onclick = function(e) { (e || event).cancelBubble = true; };
+ document.body.appendChild(this._def_count);
+ }
+
+ this._def_count.style.left = pos.left + "px";
+ this._def_count.style.top = pos.top + "px";
+ this._def_count._created = new Date();
+
+ return this._def_count;
+};
+scheduler._locateCalendar = function(cal, date) {
+ if (typeof date == "string")
+ date = scheduler.templates.api_date(date);
+
+ if(+date > +cal._max_date || +date < +cal._min_date)
+ return null;
+
+ var table = cal.childNodes[2].childNodes[0];
+
+ var weekNum = 0;
+ var dat = new Date(cal._min_date);
+ while(+this.date.add(dat, 1, "week") <= +date){
+ dat = this.date.add(dat, 1, "week");
+ weekNum++;
+ }
+
+ var sm = scheduler.config.start_on_monday;
+ var day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);
+ return table.rows[weekNum].cells[day].firstChild;
+};
+scheduler.markCalendar = function(cal, date, css) {
+ var div = this._locateCalendar(cal, date);
+ if(!div)
+ return;
+
+ div.className += " " + css;
+};
+scheduler.unmarkCalendar = function(cal, date, css) {
+ date = date || cal._last_date;
+ css = css || "dhx_calendar_click";
+ if (!date) return;
+ var el = this._locateCalendar(cal, date);
+ if(!el)
+ return;
+ el.className = (el.className || "").replace(RegExp(css, "g"));
+};
+scheduler._week_template = function(width) {
+ var summ = (width || 250);
+ var left = 0;
+
+ var week_template = document.createElement("div");
+ var dummy_date = this.date.week_start(scheduler._currentDate());
+ for (var i = 0; i < 7; i++) {
+ this._cols[i] = Math.floor(summ / (7 - i));
+ this._render_x_header(i, left, dummy_date, week_template);
+ dummy_date = this.date.add(dummy_date, 1, "day");
+ summ -= this._cols[i];
+ left += this._cols[i];
+ }
+ week_template.lastChild.className += " dhx_scale_bar_last";
+ return week_template;
+};
+scheduler.updateCalendar = function(obj, sd) {
+ obj.conf.date = sd;
+ this.renderCalendar(obj.conf, obj, true);
+};
+scheduler._mini_cal_arrows = ["&nbsp", "&nbsp"];
+scheduler._render_calendar = function(obj, sd, conf, previous) {
+ /*store*/
+ var ts = scheduler.templates;
+ var temp = this._cols;
+ this._cols = [];
+ var temp2 = this._mode;
+ this._mode = "calendar";
+ var temp3 = this._colsS;
+ this._colsS = {height: 0};
+ var temp4 = new Date(this._min_date);
+ var temp5 = new Date(this._max_date);
+ var temp6 = new Date(scheduler._date);
+ var temp7 = ts.month_day;
+ ts.month_day = ts.calendar_date;
+
+ sd = this.date.month_start(sd);
+ var week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );
+
+ var d;
+ if (previous)
+ d = previous; else {
+ d = document.createElement("DIV");
+ d.className = "dhx_cal_container dhx_mini_calendar";
+ }
+ d.setAttribute("date", this.templates.xml_format(sd));
+ d.innerHTML = "<div class='dhx_year_month'></div><div class='dhx_year_week'>" + week_template.innerHTML + "</div><div class='dhx_year_body'></div>";
+
+ d.childNodes[0].innerHTML = this.templates.calendar_month(sd);
+ if (conf.navigation) {
+ var move_minicalendar_date = function(calendar, diff) {
+ var date = scheduler.date.add(calendar._date, diff, "month");
+ scheduler.updateCalendar(calendar, date);
+ if (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {
+ scheduler._markCalendarCurrentDate(calendar);
+ }
+ };
+
+ var css_classnames = ["dhx_cal_prev_button", "dhx_cal_next_button"];
+ var css_texts = ["left:1px;top:2px;position:absolute;", "left:auto; right:1px;top:2px;position:absolute;"];
+ var diffs = [-1, 1];
+ var handler = function(diff) {
+ return function() {
+ if (conf.sync) {
+ var calendars = scheduler._synced_minicalendars;
+ for (var k = 0; k < calendars.length; k++) {
+ move_minicalendar_date(calendars[k], diff);
+ }
+ } else {
+ move_minicalendar_date(d, diff);
+ }
+ }
+ };
+ for (var j = 0; j < 2; j++) {
+ var arrow = document.createElement("DIV");
+ //var diff = diffs[j];
+ arrow.className = css_classnames[j];
+ arrow.style.cssText = css_texts[j];
+ arrow.innerHTML = this._mini_cal_arrows[j];
+ d.firstChild.appendChild(arrow);
+ arrow.onclick = handler(diffs[j])
+ }
+ }
+ d._date = new Date(sd);
+
+ d.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;
+
+ var dd = d._min_date = this.date.week_start(sd);
+ d._max_date = this.date.add(d._min_date, 6, "week");
+
+ this._reset_month_scale(d.childNodes[2], sd, dd);
+
+ var r = d.childNodes[2].firstChild.rows;
+ for (var k = r.length; k < 6; k++) {
+ var last_row = r[r.length - 1];
+ r[0].parentNode.appendChild(last_row.cloneNode(true));
+ var last_day_number = parseInt(last_row.childNodes[last_row.childNodes.length - 1].childNodes[0].innerHTML);
+ last_day_number = (last_day_number < 10) ? last_day_number : 0; // previous week could end on 28-31, so we should start with 0
+ for (var ri = 0; ri < r[k].childNodes.length; ri++) {
+ r[k].childNodes[ri].className = "dhx_after";
+ r[k].childNodes[ri].childNodes[0].innerHTML = scheduler.date.to_fixed(++last_day_number);
+ }
+ }
+
+ if (!previous)
+ obj.appendChild(d);
+
+ d.childNodes[1].style.height = (d.childNodes[1].childNodes[0].offsetHeight - 1) + "px"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)
+
+ /*restore*/
+ this._cols = temp;
+ this._mode = temp2;
+ this._colsS = temp3;
+ this._min_date = temp4;
+ this._max_date = temp5;
+ scheduler._date = temp6;
+ ts.month_day = temp7;
+ return d;
+};
+scheduler.destroyCalendar = function(cal, force) {
+ if (!cal && this._def_count && this._def_count.firstChild) {
+ if (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)
+ cal = this._def_count.firstChild;
+ }
+ if (!cal) return;
+ cal.onclick = null;
+ cal.innerHTML = "";
+ if (cal.parentNode)
+ cal.parentNode.removeChild(cal);
+ if (this._def_count)
+ this._def_count.style.top = "-1000px";
+};
+scheduler.isCalendarVisible = function() {
+ if (this._def_count && parseInt(this._def_count.style.top, 10) > 0)
+ return this._def_count;
+ return false;
+};
+scheduler.attachEvent("onTemplatesReady", function() {
+ dhtmlxEvent(document.body, "click", function() { scheduler.destroyCalendar(); });
+});
+
+scheduler.templates.calendar_time = scheduler.date.date_to_str("%d-%m-%Y");
+
+scheduler.form_blocks.calendar_time = {
+ render: function() {
+ var html = "<input class='dhx_readonly' type='text' readonly='true'>";
+
+ var cfg = scheduler.config;
+ var dt = this.date.date_part(scheduler._currentDate());
+
+ var last = 24 * 60, first = 0;
+ if (cfg.limit_time_select) {
+ first = 60 * cfg.first_hour;
+ last = 60 * cfg.last_hour + 1; // to include "17:00" option if time select is limited
+ }
+ dt.setHours(first / 60);
+
+ html += " <select>";
+ for (var i = first; i < last; i += this.config.time_step * 1) { // `<` to exclude last "00:00" option
+ var time = this.templates.time_picker(dt);
+ html += "<option value='" + i + "'>" + time + "</option>";
+ dt = this.date.add(dt, this.config.time_step, "minute");
+ }
+ html += "</select>";
+
+ var full_day = scheduler.config.full_day;
+
+ return "<div style='height:30px;padding-top:0; font-size:inherit;' class='dhx_section_time'>" + html + "<span style='font-weight:normal; font-size:10pt;'> &nbsp;&ndash;&nbsp; </span>" + html + "</div>";
+ },
+ set_value: function(node, value, ev) {
+
+ var inputs = node.getElementsByTagName("input");
+ var selects = node.getElementsByTagName("select");
+
+ var _init_once = function(inp, date, number) {
+ inp.onclick = function() {
+ scheduler.destroyCalendar(null, true);
+ scheduler.renderCalendar({
+ position: inp,
+ date: new Date(this._date),
+ navigation: true,
+ handler: function(new_date) {
+ inp.value = scheduler.templates.calendar_time(new_date);
+ inp._date = new Date(new_date);
+ scheduler.destroyCalendar();
+ if (scheduler.config.event_duration && scheduler.config.auto_end_date && number == 0) { //first element = start date
+ _update_minical_select();
+ }
+ }
+ });
+ };
+ };
+
+ if (scheduler.config.full_day) {
+ if (!node._full_day) {
+ var html = "<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> " + scheduler.locale.labels.full_day + "&nbsp;</label></input>";
+ if (!scheduler.config.wide_form)
+ html = node.previousSibling.innerHTML + html;
+ node.previousSibling.innerHTML = html;
+ node._full_day = true;
+ }
+ var input = node.previousSibling.getElementsByTagName("input")[0];
+
+ var isFulldayEvent = (scheduler.date.time_part(ev.start_date) == 0 && scheduler.date.time_part(ev.end_date) == 0);
+ input.checked = isFulldayEvent;
+
+ selects[0].disabled = input.checked;
+ selects[1].disabled = input.checked;
+
+ input.onclick = function() {
+ if (input.checked == true) {
+ var obj = {};
+ scheduler.form_blocks.calendar_time.get_value(node, obj);
+
+ var start_date = scheduler.date.date_part(obj.start_date);
+ var end_date = scheduler.date.date_part(obj.end_date);
+
+ if (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() != 0 || ev.end_date.getMinutes() != 0)))
+ end_date = scheduler.date.add(end_date, 1, "day");
+ }
+
+ var start = start_date || ev.start_date;
+ var end = end_date || ev.end_date;
+ _attach_action(inputs[0], start);
+ _attach_action(inputs[1], end);
+ selects[0].value = start.getHours() * 60 + start.getMinutes();
+ selects[1].value = end.getHours() * 60 + end.getMinutes();
+
+ selects[0].disabled = input.checked;
+ selects[1].disabled = input.checked;
+
+ };
+ }
+
+ if (scheduler.config.event_duration && scheduler.config.auto_end_date) {
+
+ function _update_minical_select() {
+ start_date = scheduler.date.add(inputs[0]._date, selects[0].value, "minute");
+ end_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));
+
+ inputs[1].value = scheduler.templates.calendar_time(end_date);
+ inputs[1]._date = scheduler.date.date_part(new Date(end_date));
+
+ selects[1].value = end_date.getHours() * 60 + end_date.getMinutes();
+ }
+
+ selects[0].onchange = _update_minical_select; // only update on first select should trigger update so user could define other end date if he wishes too
+ }
+
+ function _attach_action(inp, date, number) {
+ _init_once(inp, date, number);
+ inp.value = scheduler.templates.calendar_time(date);
+ inp._date = scheduler.date.date_part(new Date(date));
+ }
+
+ _attach_action(inputs[0], ev.start_date, 0);
+ _attach_action(inputs[1], ev.end_date, 1);
+ _init_once = function() {};
+
+ selects[0].value = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();
+ selects[1].value = ev.end_date.getHours() * 60 + ev.end_date.getMinutes();
+
+ },
+ get_value: function(node, ev) {
+ var inputs = node.getElementsByTagName("input");
+ var selects = node.getElementsByTagName("select");
+
+ ev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, "minute");
+ ev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, "minute");
+
+ if (ev.end_date <= ev.start_date)
+ ev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, "minute");
+ },
+ focus: function(node) {
+ }
+};
+scheduler.linkCalendar = function(calendar, datediff) {
+ var action = function() {
+ var date = scheduler._date;
+ var dateNew = new Date(date.valueOf());
+ if (datediff) dateNew = datediff(dateNew);
+ dateNew.setDate(1);
+ scheduler.updateCalendar(calendar, dateNew);
+ return true;
+ };
+
+ scheduler.attachEvent("onViewChange", action);
+ scheduler.attachEvent("onXLE", action);
+ scheduler.attachEvent("onEventAdded", action);
+ scheduler.attachEvent("onEventChanged", action);
+ scheduler.attachEvent("onAfterEventDelete", action);
+ action();
+};
+
+scheduler._markCalendarCurrentDate = function(calendar) {
+ var date = scheduler._date;
+ var mode = scheduler._mode;
+ var month_start = scheduler.date.month_start(new Date(calendar._date));
+ var month_end = scheduler.date.add(month_start, 1, "month");
+
+ if (mode == 'day' || (this._props && !!this._props[mode])) { // if day or units view
+ if (month_start.valueOf() <= date.valueOf() && month_end > date) {
+ scheduler.markCalendar(calendar, date, "dhx_calendar_click");
+ }
+ } else if (mode == 'week') {
+ var dateNew = scheduler.date.week_start(new Date(date.valueOf()));
+ for (var i = 0; i < 7; i++) {
+ if (month_start.valueOf() <= dateNew.valueOf() && month_end > dateNew) // >= would mean mark first day of the next month
+ scheduler.markCalendar(calendar, dateNew, "dhx_calendar_click");
+ dateNew = scheduler.date.add(dateNew, 1, "day");
+ }
+ }
+};
+
+scheduler.attachEvent("onEventCancel", function(){
+ scheduler.destroyCalendar(null, true);
+}); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_multiselect.js b/sources/ext/dhtmlxscheduler_multiselect.js
new file mode 100644
index 0000000..4e39450
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_multiselect.js
@@ -0,0 +1,66 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.form_blocks["multiselect"]={
+ render:function(sns) {
+ var _result = "<div class='dhx_multi_select_"+sns.name+"' style='overflow: auto; height: "+sns.height+"px; position: relative;' >";
+ for (var i=0; i<sns.options.length; i++) {
+ _result += "<label><input type='checkbox' value='"+sns.options[i].key+"'/>"+sns.options[i].label+"</label>";
+ if(convertStringToBoolean(sns.vertical)) _result += '<br/>';
+ }
+ _result += "</div>";
+ return _result;
+ },
+ set_value:function(node,value,ev,config){
+
+ var _children = node.getElementsByTagName('input');
+ for(var i=0;i<_children.length;i++) {
+ _children[i].checked = false; //unchecking all inputs on the form
+ }
+
+ function _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true ... ]
+ var _children = node.getElementsByTagName('input');
+ for(var i=0;i<_children.length; i++) {
+ _children[i].checked = !! ids[_children[i].value];
+ }
+ }
+
+ var _ids = [];
+ if (ev[config.map_to]) {
+ var results = ev[config.map_to].split(',');
+ for (var i = 0; i < results.length; i++) {
+ _ids[results[i]] = true;
+ }
+ _mark_inputs(_ids);
+ } else {
+ if (scheduler._new_event || !config.script_url)
+ return;
+ var divLoading = document.createElement('div');
+ divLoading.className = 'dhx_loading';
+ divLoading.style.cssText = "position: absolute; top: 40%; left: 40%;";
+ node.appendChild(divLoading);
+ dhtmlxAjax.get(config.script_url + '?dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid(), function(loader) {
+ var _result = loader.doXPath("//data/item");
+ var _ids = [];
+ for (var i = 0; i < _result.length; i++) {
+ _ids[_result[i].getAttribute(config.map_to)] = true;
+ }
+ _mark_inputs(_ids);
+ node.removeChild(divLoading);
+ });
+ }
+ },
+ get_value:function(node,ev,config){
+ var _result = [];
+ var _children = node.getElementsByTagName("input");
+ for(var i=0;i<_children.length;i++) {
+ if(_children[i].checked)
+ _result.push(_children[i].value);
+ }
+ return _result.join(',');
+ },
+
+ focus:function(node){
+ }
+}; \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_multisource.js b/sources/ext/dhtmlxscheduler_multisource.js
new file mode 100644
index 0000000..30829bc
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_multisource.js
@@ -0,0 +1,26 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){
+
+ function backup(obj){
+ var t = function(){};
+ t.prototype = obj;
+ return t;
+ }
+
+ var old = scheduler._load;
+ scheduler._load=function(url,from){
+ url=url||this._load_url;
+ if (typeof url == "object"){
+ var t = backup(this._loaded);
+ for (var i=0; i < url.length; i++) {
+ this._loaded=new t();
+ old.call(this,url[i],from);
+ }
+ } else
+ old.apply(this,arguments);
+ }
+
+})(); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_mvc.js b/sources/ext/dhtmlxscheduler_mvc.js
new file mode 100644
index 0000000..91eb269
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_mvc.js
@@ -0,0 +1,82 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function(){
+
+ //remove private properties
+ function sanitize(ev){
+ var obj = {};
+ for (var key in ev)
+ if (key.indexOf("_") !== 0)
+ obj[key] = ev[key];
+
+ return obj;
+ }
+
+ var update_timer;
+ function update_view(){
+ clearTimeout(update_timer);
+ update_timer = setTimeout(function(){
+ scheduler.updateView();
+ },1);
+ };
+
+
+scheduler.backbone = function(collection){
+ events.bind("reset", function(){
+ scheduler.clearAll();
+ scheduler.parse(events.toJSON(), "json");
+ });
+ events.bind("change", function(model, info){
+ //special handling for id change
+ if (info.changes && info.changes.id){
+ var old_id = model.previous("id");
+ scheduler.changeEventId(old_id, model.id);
+ }
+
+ var id = model.id;
+ scheduler._init_event( scheduler._events[id] = model.toJSON() );
+ update_view();
+ });
+ events.bind("remove", function(model, changes){
+ if (scheduler._events[model.id])
+ scheduler.deleteEvent(model.id);
+ });
+ events.bind("add", function(model, changes){
+ if (!scheduler._events[model.id]){
+ var ev = model.toJSON();
+ scheduler._init_event(ev);
+ scheduler.addEvent(ev);
+ }
+ });
+
+
+ scheduler.attachEvent("onEventCreated", function(id){
+ var ev = new events.model(scheduler.getEvent(id));
+ scheduler._events[id] = ev.toJSON();
+
+ return true;
+ });
+
+ scheduler.attachEvent("onEventAdded", function(id){
+ if (!events.get(id))
+ events.add( new events.model(sanitize(scheduler.getEvent(id))) );
+
+ return true;
+ });
+ scheduler.attachEvent("onEventChanged", function(id){
+ var ev = events.get(id);
+ var upd = sanitize(scheduler.getEvent(id));
+ ev.set(upd);
+
+ return true;
+ });
+ scheduler.attachEvent("onEventDeleted", function(id){
+ if (events.get(id))
+ events.remove(id);
+ return true;
+ });
+}
+
+})(); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_offline.js b/sources/ext/dhtmlxscheduler_offline.js
new file mode 100644
index 0000000..18d82fd
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_offline.js
@@ -0,0 +1,79 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.load=function(url,call){
+ if (typeof call == "string"){
+ this._process=call;
+ var type = call;
+ call = arguments[2];
+ }
+
+ this._load_url=url;
+ this._after_call=call;
+ if (url.$proxy) {
+ url.load(this, typeof type == "string" ? type : null);
+ return;
+ }
+
+ this._load(url,this._date);
+};
+
+scheduler._dp_init_backup = scheduler._dp_init;
+scheduler._dp_init = function(dp) {
+ dp._sendData = function(a1,rowId){
+ if (!a1) return; //nothing to send
+ if (!this.callEvent("onBeforeDataSending",rowId?[rowId,this.getState(rowId),a1]:[null, null, a1])) return false;
+ if (rowId)
+ this._in_progress[rowId]=(new Date()).valueOf();
+ if (this.serverProcessor.$proxy) {
+ var mode = this._tMode!="POST" ? 'get' : 'post';
+ var to_send = [];
+ for (var i in a1)
+ to_send.push({ id: i, data: a1[i], operation: this.getState(i)});
+ this.serverProcessor._send(to_send, mode, this);
+ return;
+ }
+
+ var a2=new dtmlXMLLoaderObject(this.afterUpdate,this,true);
+ var a3 = this.serverProcessor+(this._user?(getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+this.obj.getUserData(0,"version")].join("&")):"");
+ if (this._tMode!="POST")
+ a2.loadXML(a3+((a3.indexOf("?")!=-1)?"&":"?")+this.serialize(a1,rowId));
+ else
+ a2.loadXML(a3,true,this.serialize(a1,rowId));
+ this._waitMode++;
+ };
+
+ dp._updatesToParams = function(items) {
+ var stack = {};
+ for (var i = 0; i < items.length; i++)
+ stack[items[i].id] = items[i].data;
+ return this.serialize(stack);
+ };
+
+ dp._processResult = function(text, xml, loader) {
+ if (loader.status != 200) {
+ for (var i in this._in_progress) {
+ var state = this.getState(i);
+ this.afterUpdateCallback(i, i, state, null);
+ }
+ return;
+ }
+ xml = new dtmlXMLLoaderObject(function() {},this,true);
+ xml.loadXMLString(text);
+ xml.xmlDoc = loader;
+
+ this.afterUpdate(this, null, null, null, xml);
+ };
+ this._dp_init_backup(dp);
+}
+
+if (window.dataProcessor)
+ dataProcessor.prototype.init=function(obj){
+ this.init_original(obj);
+ obj._dataprocessor=this;
+
+ this.setTransactionMode("POST",true);
+ if (!this.serverProcessor.$proxy)
+ this.serverProcessor+=(this.serverProcessor.indexOf("?")!=-1?"&":"?")+"editing=true";
+ }; \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_outerdrag.js b/sources/ext/dhtmlxscheduler_outerdrag.js
new file mode 100644
index 0000000..177e0fa
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_outerdrag.js
@@ -0,0 +1,57 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+// lame old code doesn't provide raw event object
+scheduler.attachEvent("onTemplatesReady", function() {
+ var dragger = (new dhtmlDragAndDropObject());
+ var old = dragger.stopDrag;
+ var last_event;
+ dragger.stopDrag = function(e) {
+ last_event = e || event;
+ return old.apply(this, arguments);
+ };
+ dragger.addDragLanding(scheduler._els["dhx_cal_data"][0], {
+ _drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {
+
+ if (scheduler.checkEvent("onBeforeExternalDragIn") && !scheduler.callEvent("onBeforeExternalDragIn", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))
+ return;
+
+ var temp = scheduler.attachEvent("onEventCreated", function(id) {
+ if (!scheduler.callEvent("onExternalDragIn", [id, sourceHtmlObject, last_event])) {
+ this._drag_mode = this._drag_id = null;
+ this.deleteEvent(id);
+ }
+ });
+
+ var action_data = scheduler.getActionData(last_event);
+ var event_data = {
+ start_date: new Date(action_data.date)
+ };
+
+ // custom views, need to assign section id, fix dates
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ var view_options = scheduler.matrix[scheduler._mode];
+ event_data[view_options.y_property] = action_data.section;
+
+ var pos = scheduler._locate_cell_timeline(last_event);
+ event_data.start_date = view_options._trace_x[pos.x];
+ event_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);
+ }
+ if (scheduler._props && scheduler._props[scheduler._mode]) {
+ event_data[scheduler._props[scheduler._mode].map_to] = action_data.section
+ }
+
+ scheduler.addEventNow(event_data);
+
+ scheduler.detachEvent(temp);
+
+ },
+ _dragIn: function(htmlObject, shtmlObject) {
+ return htmlObject;
+ },
+ _dragOut: function(htmlObject) {
+ return this;
+ }
+ });
+});
diff --git a/sources/ext/dhtmlxscheduler_pdf.js b/sources/ext/dhtmlxscheduler_pdf.js
new file mode 100644
index 0000000..b7fdb93
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_pdf.js
@@ -0,0 +1,354 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(function() {
+ var dx, dy;
+ function clean_html(val) {
+ return val.replace(newline_regexp, "\n").replace(html_regexp, "");
+ }
+
+ function x_norm(x, offset) {
+ x = parseFloat(x);
+ offset = parseFloat(offset);
+ if (!isNaN(offset)) x -= offset;
+
+ var w = colsWidth(x);
+ x = x - w.width + w.cols*dx;
+ return isNaN(x)?"auto":(100*x/(dx));
+ }
+
+ function x_norm_event(x, offset, is_left) {
+ x = parseFloat(x);
+ offset = parseFloat(offset);
+ if (!isNaN(offset) && is_left) x -= offset;
+
+ var w = colsWidth(x);
+ x = x - w.width + w.cols*dx;
+ return isNaN(x)?"auto":(100*x/(dx-(!isNaN(offset)?offset:0)));
+ }
+ function colsWidth(width) {
+ var r = 0;
+ var header = scheduler._els.dhx_cal_header[0].childNodes;
+ var els = header[1] ? header[1].childNodes : header[0].childNodes;
+ for (var i = 0; i < els.length; i++) {
+ var el = els[i].style ? els[i] : els[i].parentNode;
+ var w = parseFloat(el.style.width);
+ if (width > w)
+ width -= (w+1),r+=(w+1);
+ else
+ break;
+ }
+ return { width: r, cols: i };
+ }
+
+ function y_norm(y) {
+ y = parseFloat(y);
+ if (isNaN(y)) return "auto";
+ return 100 * y / dy;
+ }
+
+ function get_style(node, style){
+ return (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||"";
+ }
+
+ function de_day(node, n) {
+ var x = parseInt(node.style.left, 10);
+
+ for (var dx = 0; dx < scheduler._cols.length; dx++) {
+ x -= scheduler._cols[dx];
+ if (x < 0) return dx;
+ }
+ return n;
+ }
+
+ function de_week(node, n) {
+ var y = parseInt(node.style.top, 10);
+ for (var dy = 0; dy < scheduler._colsS.heights.length; dy++)
+ if (scheduler._colsS.heights[dy] > y) return dy;
+ return n;
+ }
+
+ function xml_start(tag) {
+ return tag ? "<"+tag+">" : "";
+ }
+ function xml_end(tag) {
+ return tag ? "</"+tag+">" : "";
+ }
+
+ function xml_top(tag, profile, header, footer) {
+ var xml = "<"+tag+" profile='" + profile + "'";
+ if (header)
+ xml += " header='" + header + "'";
+ if (footer)
+ xml += " footer='" + footer + "'";
+ xml += ">";
+ return xml;
+ }
+
+ function xml_body_header() {
+ var xml = "";
+ // detects if current mode is timeline
+ var mode = scheduler._mode;
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode])
+ mode = (scheduler.matrix[scheduler._mode].render == "cell") ? "matrix" : "timeline";
+ xml += "<scale mode='" + mode + "' today='" + scheduler._els.dhx_cal_date[0].innerHTML + "'>";
+
+ if (scheduler._mode == "week_agenda") {
+ var xh = scheduler._els.dhx_cal_data[0].getElementsByTagName("DIV");
+ for (var i = 0; i < xh.length; i++)
+ if (xh[i].className == "dhx_wa_scale_bar")
+ xml += "<column>" + clean_html(xh[i].innerHTML) + "</column>";
+ } else if (scheduler._mode == "agenda" || scheduler._mode == "map") {
+ var xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;
+
+ xml += "<column>" + clean_html(xh[0].innerHTML) + "</column><column>" + clean_html(xh[1].innerHTML) + "</column>";
+ } else if (scheduler._mode == "year") {
+ var xh = scheduler._els.dhx_cal_data[0].childNodes;
+ for (var i = 0; i < xh.length; i++) {
+ xml += "<month label='" + clean_html(xh[i].childNodes[0].innerHTML) + "'>";
+ xml += xml_month_scale(xh[i].childNodes[1].childNodes);
+ xml += xml_month(xh[i].childNodes[2]);
+ xml += "</month>";
+ }
+ } else {
+ xml += "<x>";
+ var xh = scheduler._els.dhx_cal_header[0].childNodes;
+ xml += xml_month_scale(xh);
+ xml += "</x>";
+
+ var yh = scheduler._els.dhx_cal_data[0];
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ xml += "<y>";
+ for (var i = 0; i < yh.firstChild.rows.length; i++) {
+ var el = yh.firstChild.rows[i];
+ xml += "<row><![CDATA[" + clean_html(el.cells[0].innerHTML) + "]]></row>";
+ }
+ xml += "</y>";
+ dy = yh.firstChild.rows[0].cells[0].offsetHeight;
+ } else if (yh.firstChild.tagName == "TABLE") {
+ xml += xml_month(yh);
+ } else {
+ yh = yh.childNodes[yh.childNodes.length - 1];
+ while (yh.className.indexOf("dhx_scale_holder") == -1)
+ yh = yh.previousSibling;
+ yh = yh.childNodes;
+
+ xml += "<y>";
+ for (var i = 0; i < yh.length; i++)
+ xml += "\n<row><![CDATA[" + clean_html(yh[i].innerHTML) + "]]></row>";
+ xml += "</y>";
+ dy = yh[0].offsetHeight;
+ }
+ }
+ xml += "</scale>";
+ return xml;
+ }
+
+ function xml_month(yh) {
+ var xml = "";
+ var r = yh.firstChild.rows;
+ for (var i = 0; i < r.length; i++) {
+ var days = [];
+ for (var j = 0; j < r[i].cells.length; j++)
+ days.push(r[i].cells[j].firstChild.innerHTML);
+
+ xml += "\n<row height='" + yh.firstChild.rows[i].cells[0].offsetHeight + "'><![CDATA[" + clean_html(days.join("|")) + "]]></row>";
+ dy = yh.firstChild.rows[0].cells[0].offsetHeight;
+ }
+ return xml;
+ }
+
+ function xml_month_scale(xh) {
+ var xml = "";
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ if (scheduler.matrix[scheduler._mode].second_scale)
+ var xhs = xh[1].childNodes;
+
+ xh = xh[0].childNodes;
+ }
+
+ for (var i = 0; i < xh.length; i++)
+ xml += "\n<column><![CDATA[" + clean_html(xh[i].innerHTML) + "]]></column>";
+ dx = xh[0].offsetWidth;
+
+ if (xhs) {
+ var width = 0;
+ var top_width = xh[0].offsetWidth;
+ var top_col = 1;
+ for (var i = 0; i < xhs.length; i++) {
+ xml += "\n<column second_scale='" + top_col + "'><![CDATA[" + clean_html(xhs[i].innerHTML) + "]]></column>";
+ width += xhs[i].offsetWidth;
+ if (width >= top_width) {
+ top_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);
+ top_col++;
+ }
+ dx = xhs[0].offsetWidth;
+ }
+ }
+ return xml;
+ }
+
+ function xml_body(colors) {
+ var xml = "";
+ var evs = scheduler._rendered;
+ var matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];
+
+ if (scheduler._mode == "agenda" || scheduler._mode == "map") {
+
+ for (var i = 0; i < evs.length; i++)
+ xml += "<event><head><![CDATA[" + clean_html(evs[i].childNodes[0].innerHTML) + "]]></head><body><![CDATA[" + clean_html(evs[i].childNodes[2].innerHTML) + "]]></body></event>";
+
+ } else if (scheduler._mode == "week_agenda") {
+
+ for (var i = 0; i < evs.length; i++)
+ xml += "<event day='" + evs[i].parentNode.getAttribute("day") + "'><body>" + clean_html(evs[i].innerHTML) + "</body></event>";
+
+ } else if (scheduler._mode == "year") {
+
+ var evs = scheduler.get_visible_events();
+ for (var i = 0; i < evs.length; i++) {
+ var d = evs[i].start_date;
+ if (d.valueOf() < scheduler._min_date.valueOf())
+ d = scheduler._min_date;
+
+ while (d < evs[i].end_date) {
+ var m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;
+ var day = scheduler.week_starts[m] + d.getDate() - 1;
+ var text_color = colors ? get_style(scheduler._get_year_cell(d), "color") : "";
+ var bg_color = colors ? get_style(scheduler._get_year_cell(d), "backgroundColor") : "";
+
+ xml += "<event day='" + (day % 7) + "' week='" + Math.floor(day / 7) + "' month='" + m + "' backgroundColor='" + bg_color + "' color='" + text_color + "'></event>";
+ d = scheduler.date.add(d, 1, "day");
+ if (d.valueOf() >= scheduler._max_date.valueOf())
+ break;
+ }
+ }
+ } else if (matrix && matrix.render == "cell") {
+ var evs = scheduler._els.dhx_cal_data[0].getElementsByTagName("TD");
+ for (var i = 0; i < evs.length; i++) {
+ var text_color = colors ? get_style(evs[i], "color") : "";
+ var bg_color = colors ? get_style(evs[i], "backgroundColor") : "";
+ xml += "\n<event><body backgroundColor='" + bg_color + "' color='" + text_color + "'><![CDATA[" + clean_html(evs[i].innerHTML) + "]]></body></event>";
+ }
+ } else {
+ for (var i = 0; i < evs.length; i++) {
+ var zx, zdx;
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ // logic for timeline view
+ zx = x_norm(evs[i].style.left);
+ zdx = x_norm(evs[i].offsetWidth)-1;
+ } else {
+ // we should use specific logic for day/week/units view
+ var left_norm = scheduler.config.use_select_menu_space ? 0 : 26;
+ zx = x_norm_event(evs[i].style.left, left_norm, true);
+ zdx = x_norm_event(evs[i].style.width, left_norm)-1;
+ }
+ if (isNaN(zdx * 1)) continue;
+ var zy = y_norm(evs[i].style.top);
+ var zdy = y_norm(evs[i].style.height);
+
+ var e_type = evs[i].className.split(" ")[0].replace("dhx_cal_", "");
+ if (e_type === 'dhx_tooltip_line') continue;
+
+ var dets = scheduler.getEvent(evs[i].getAttribute("event_id"));
+ if (!dets) continue;
+ var day = dets._sday;
+ var week = dets._sweek;
+ var length = dets._length || 0;
+
+ if (scheduler._mode == "month") {
+ zdy = parseInt(evs[i].offsetHeight, 10);
+ zy = parseInt(evs[i].style.top, 10) - 22;
+
+ day = de_day(evs[i], day);
+ week = de_week(evs[i], week);
+ } else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ day = 0;
+ var el = evs[i].parentNode.parentNode.parentNode;
+ week = el.rowIndex;
+ var dy_copy = dy;
+ dy = evs[i].parentNode.offsetHeight;
+ zy = y_norm(evs[i].style.top);
+ zy -= zy * 0.2;
+ dy = dy_copy;
+ } else {
+ if (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;
+ var parent = scheduler._els["dhx_cal_data"][0].childNodes[0];
+ var offset = parseFloat(parent.className.indexOf("dhx_scale_holder") != -1 ? parent.style.left : 0);
+ zx += x_norm(evs[i].parentNode.style.left, offset);
+ }
+
+ xml += "\n<event week='" + week + "' day='" + day + "' type='" + e_type + "' x='" + zx + "' y='" + zy + "' width='" + zdx + "' height='" + zdy + "' len='" + length + "'>";
+
+ if (e_type == "event") {
+ xml += "<header><![CDATA[" + clean_html(evs[i].childNodes[1].innerHTML) + "]]></header>";
+ var text_color = colors ? get_style(evs[i].childNodes[2], "color") : "";
+ var bg_color = colors ? get_style(evs[i].childNodes[2], "backgroundColor") : "";
+ xml += "<body backgroundColor='" + bg_color + "' color='" + text_color + "'><![CDATA[" + clean_html(evs[i].childNodes[2].innerHTML) + "]]></body>";
+ } else {
+ var text_color = colors ? get_style(evs[i], "color") : "";
+ var bg_color = colors ? get_style(evs[i], "backgroundColor") : "";
+ xml += "<body backgroundColor='" + bg_color + "' color='" + text_color + "'><![CDATA[" + clean_html(evs[i].innerHTML) + "]]></body>";
+ }
+ xml += "</event>";
+ }
+ }
+
+ return xml;
+ }
+
+ function to_pdf(start, end, view, url, mode, header, footer) {
+ var colors = false;
+ if (mode == "fullcolor") {
+ colors = true;
+ mode = "color";
+ }
+
+ mode = mode || "color";
+ html_regexp = new RegExp("<[^>]*>", "g");
+ newline_regexp = new RegExp("<br[^>]*>", "g");
+
+ var uid = scheduler.uid();
+ var d = document.createElement("div");
+ d.style.display = "none";
+ document.body.appendChild(d);
+
+ d.innerHTML = '<form id="' + uid + '" method="post" target="_blank" action="' + url + '" accept-charset="utf-8" enctype="application/x-www-form-urlencoded"><input type="hidden" name="mycoolxmlbody"/> </form>';
+
+
+ var xml = "";
+ if (start) {
+ var original_date = scheduler._date;
+ var original_mode = scheduler._mode;
+
+ xml = xml_top("pages", mode, header, footer);
+ for (var temp_date = new Date(start); +temp_date < +end; temp_date = scheduler.date.add(temp_date, 1, view)) {
+ scheduler.setCurrentView(temp_date, view);
+ xml += xml_start("page") + xml_body_header().replace("\u2013", "-") + xml_body(colors) + xml_end("page");
+ }
+ xml += xml_end("pages");
+
+ scheduler.setCurrentView(original_date, original_mode);
+ } else {
+ xml = xml_top("data", mode, header, footer) + xml_body_header().replace("\u2013", "-") + xml_body(colors) + xml_end("data");
+ }
+
+
+ document.getElementById(uid).firstChild.value = encodeURIComponent(xml);
+ document.getElementById(uid).submit();
+ d.parentNode.removeChild(d);
+ }
+
+ scheduler.toPDF = function(url, mode, header, footer) {
+ return to_pdf.apply(this, [null, null, null, url, mode, header, footer]);
+ };
+ scheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {
+ if (typeof start == "string") {
+ start = scheduler.templates.api_date(start);
+ end = scheduler.templates.api_date(end);
+ }
+
+ return to_pdf.apply(this, arguments);
+ };
+})();
diff --git a/sources/ext/dhtmlxscheduler_quick_info.js b/sources/ext/dhtmlxscheduler_quick_info.js
new file mode 100644
index 0000000..425cee3
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_quick_info.js
@@ -0,0 +1,181 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.icons_select = ["icon_details", "icon_delete"];
+scheduler.config.details_on_create = true;
+scheduler.xy.menu_width = 0;
+
+scheduler.attachEvent("onClick", function(id){
+ scheduler.showQuickInfo(id);
+ return true;
+});
+
+(function(){
+ var events = ["onEmptyClick", "onViewChange", "onLightbox", "onBeforeEventDelete", "onBeforeDrag"];
+ var hiding_function = function(){
+ scheduler._hideQuickInfo();
+ return true;
+ };
+ for (var i=0; i<events.length; i++)
+ scheduler.attachEvent(events[i], hiding_function);
+})();
+
+scheduler.templates.quick_info_title = function(start, end, ev){ return ev.text.substr(0,50); };
+scheduler.templates.quick_info_content = function(start, end, ev){ return ev.details || ev.text; };
+scheduler.templates.quick_info_date = function(start, end, ev){
+ if (scheduler.isOneDayEvent(ev))
+ return scheduler.templates.day_date(start, end, ev) + " " +scheduler.templates.event_header(start, end, ev);
+ else
+ return scheduler.templates.week_date(start, end, ev);
+};
+
+scheduler.showQuickInfo = function(id){
+ if (id == this._quick_info_box_id) return;
+ this.hideQuickInfo(true);
+
+ var pos = this._get_event_counter_part(id);
+
+ if (pos){
+ this._quick_info_box = this._init_quick_info(pos);
+ this._fill_quick_data(id);
+ this._show_quick_info(pos);
+ }
+};
+scheduler._hideQuickInfo = function(){
+ scheduler.hideQuickInfo();
+};
+scheduler.hideQuickInfo = function(forced){
+ var qi = this._quick_info_box;
+ this._quick_info_box_id = 0;
+
+ if (qi && qi.parentNode){
+ if (scheduler.config.quick_info_detached)
+ return qi.parentNode.removeChild(qi);
+
+ if (qi.style.right == "auto")
+ qi.style.left = "-350px";
+ else
+ qi.style.right = "-350px";
+
+ if (forced)
+ qi.parentNode.removeChild(qi);
+ }
+};
+dhtmlxEvent(window, "keydown", function(e){
+ if (e.keyCode == 27)
+ scheduler.hideQuickInfo();
+});
+
+scheduler._show_quick_info = function(pos){
+ var qi = scheduler._quick_info_box;
+
+ if (scheduler.config.quick_info_detached){
+ scheduler._obj.appendChild(qi);
+ var width = qi.offsetWidth;
+ var height = qi.offsetHeight;
+
+ qi.style.left = pos.left - pos.dx*(width - pos.width) + "px";
+ qi.style.top = pos.top - (pos.dy?height:-pos.height) + "px";
+ } else {
+ qi.style.top = this.xy.scale_height+this.xy.nav_height + 20 + "px";
+ if (pos.dx == 1){
+ qi.style.right = "auto";
+ qi.style.left = "-300px";
+
+ setTimeout(function(){
+ qi.style.left = "-10px";
+ },1);
+ } else {
+ qi.style.left = "auto";
+ qi.style.right = "-300px";
+
+ setTimeout(function(){
+ qi.style.right = "-10px";
+ },1);
+ }
+ qi.className = qi.className.replace("dhx_qi_left","").replace("dhx_qi_left","")+" dhx_qi_"+(pos==1?"left":"right");
+ scheduler._obj.appendChild(qi);
+ }
+};
+scheduler._init_quick_info = function(){
+ if (!this._quick_info_box){
+ var sizes = scheduler.xy;
+
+ var qi = this._quick_info_box = document.createElement("div");
+ qi.className = "dhx_cal_quick_info";
+ if (scheduler.$testmode)
+ qi.className += " dhx_no_animate";
+ //title
+ var html = "<div class=\"dhx_cal_qi_title\" style=\"height:"+sizes.quick_info_title+"px\">"
+ + "<div class=\"dhx_cal_qi_tcontent\"></div><div class=\"dhx_cal_qi_tdate\"></div>"
+ +"</div>"
+ +"<div class=\"dhx_cal_qi_content\"></div>";
+
+ //buttons
+ html += "<div class=\"dhx_cal_qi_controls\" style=\"height:"+sizes.quick_info_buttons+"px\">";
+ var buttons = scheduler.config.icons_select;
+ for (var i = 0; i < buttons.length; i++)
+ html += "<div class=\"dhx_qi_big_icon "+buttons[i]+"\" title=\""+scheduler.locale.labels[buttons[i]]+"\"><div class='dhx_menu_icon " + buttons[i] + "'></div><div>"+scheduler.locale.labels[buttons[i]]+"</div></div>";
+ html += "</div>";
+
+ qi.innerHTML = html;
+ dhtmlxEvent(qi, "click", function(ev){
+ ev = ev || event;
+ scheduler._qi_button_click(ev.target || ev.srcElement);
+ });
+ if (scheduler.config.quick_info_detached)
+ dhtmlxEvent(scheduler._els["dhx_cal_data"][0], "scroll", function(){ scheduler.hideQuickInfo(); });
+ }
+
+ return this._quick_info_box;
+};
+
+scheduler._qi_button_click = function(node){
+ var box = scheduler._quick_info_box;
+ if (!node || node == box) return;
+
+ var mask = node.className;
+ if (mask.indexOf("_icon")!=-1){
+ var id = scheduler._quick_info_box_id;
+ scheduler._click.buttons[mask.split(" ")[1].replace("icon_","")](id);
+ } else
+ scheduler._qi_button_click(node.parentNode);
+};
+scheduler._get_event_counter_part = function(id){
+ var domEv = scheduler.getRenderedEvent(id);
+ var left = 0;
+ var top = 0;
+
+ var node = domEv;
+ while (node && node != scheduler._obj){
+ left += node.offsetLeft;
+ top += node.offsetTop-node.scrollTop;
+ node = node.offsetParent;
+ }
+ if(node){
+ var dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;
+ var dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;
+
+ return { left:left, top:top, dx:dx, dy:dy,
+ width:domEv.offsetWidth, height:domEv.offsetHeight };
+ }
+ return 0;
+};
+
+scheduler._fill_quick_data = function(id){
+ var ev = scheduler.getEvent(id);
+ var qi = scheduler._quick_info_box;
+
+ scheduler._quick_info_box_id = id;
+
+//title content
+ var titleContent = qi.firstChild.firstChild;
+ titleContent.innerHTML = scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev);
+ var titleDate = titleContent.nextSibling;
+ titleDate.innerHTML = scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev);
+
+//main content
+ var main = qi.firstChild.nextSibling;
+ main.innerHTML = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);
+};
diff --git a/sources/ext/dhtmlxscheduler_readonly.js b/sources/ext/dhtmlxscheduler_readonly.js
new file mode 100644
index 0000000..0ead182
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_readonly.js
@@ -0,0 +1,163 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady", function() {
+ var original_sns = scheduler.config.lightbox.sections;
+ var recurring_section = null;
+ var original_left_buttons = scheduler.config.buttons_left.slice();
+ var original_right_buttons = scheduler.config.buttons_right.slice();
+
+
+ scheduler.attachEvent("onBeforeLightbox", function(id) {
+ if (this.config.readonly_form || this.getEvent(id).readonly) {
+ this.config.readonly_active = true;
+
+ for (var i = 0; i < this.config.lightbox.sections.length; i++) {
+ this.config.lightbox.sections[i].focus = false;
+ }
+ }
+ else {
+ this.config.readonly_active = false;
+ scheduler.config.buttons_left = original_left_buttons.slice();
+ scheduler.config.buttons_right = original_right_buttons.slice();
+ }
+
+ var sns = this.config.lightbox.sections;
+ if (this.config.readonly_active) {
+ var is_rec_found = false;
+ for (var i = 0; i < sns.length; i++) {
+ if (sns[i].type == 'recurring') {
+ recurring_section = sns[i];
+ if (this.config.readonly_active) {
+ sns.splice(i, 1);
+ }
+ break;
+ }
+ }
+ if (!is_rec_found && !this.config.readonly_active && recurring_section) {
+ // need to restore restore section
+ sns.splice(sns.length-2,0,recurring_section);
+ }
+
+ var forbidden_buttons = ["dhx_delete_btn", "dhx_save_btn"];
+ var button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];
+ for (var i = 0; i < forbidden_buttons.length; i++) {
+ var forbidden_button = forbidden_buttons[i];
+ for (var k = 0; k < button_arrays.length; k++) {
+ var button_array = button_arrays[k];
+ var index = -1;
+ for (var p = 0; p < button_array.length; p++) {
+ if (button_array[p] == forbidden_button) {
+ index = p;
+ break;
+ }
+ }
+ if (index != -1) {
+ button_array.splice(index, 1);
+ }
+ }
+ }
+
+
+ }
+
+ this.resetLightbox();
+
+ return true;
+ });
+
+ function txt_replace(tag, d, n, text) {
+ var txts = d.getElementsByTagName(tag);
+ var txtt = n.getElementsByTagName(tag);
+ for (var i = txtt.length - 1; i >= 0; i--) {
+ var n = txtt[i];
+ if (!text){
+ n.disabled = true;
+ //radio and checkboxes loses state after .cloneNode in IE
+ if(d.checked)
+ n.checked = true;
+ }else {
+ var t = document.createElement("SPAN");
+ t.className = "dhx_text_disabled";
+ t.innerHTML = text(txts[i]);
+ n.parentNode.insertBefore(t, n);
+ n.parentNode.removeChild(n);
+ }
+ }
+ }
+
+ var old = scheduler._fill_lightbox;
+ scheduler._fill_lightbox = function() {
+
+ var lb = this.getLightbox();
+ if (this.config.readonly_active) {
+ lb.style.visibility = 'hidden';
+ // lightbox should have actual sizes before rendering controls
+ // currently only matters for dhtmlxCombo
+ lb.style.display = 'block';
+ }
+ var res = old.apply(this, arguments);
+ if (this.config.readonly_active) {
+ //reset visibility and display
+ lb.style.visibility = '';
+ lb.style.display = 'none';
+ }
+
+ if (this.config.readonly_active) {
+
+ var d = this.getLightbox();
+ var n = this._lightbox_r = d.cloneNode(true);
+ n.id = scheduler.uid();
+
+ txt_replace("textarea", d, n, function(a) {
+ return a.value;
+ });
+ txt_replace("input", d, n, false);
+ txt_replace("select", d, n, function(a) {
+ if(!a.options.length) return "";
+ return a.options[Math.max((a.selectedIndex || 0), 0)].text;
+ });
+
+ d.parentNode.insertBefore(n, d);
+
+ olds.call(this, n);
+ if (scheduler._lightbox)
+ scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);
+ this._lightbox = n;
+
+ if (scheduler.config.drag_lightbox)
+ n.firstChild.onmousedown = scheduler._ready_to_dnd;
+ this.setLightboxSize();
+ n.onclick = function(e) {
+ var src = e ? e.target : event.srcElement;
+ if (!src.className) src = src.previousSibling;
+ if (src && src.className)
+ switch (src.className) {
+ case "dhx_cancel_btn":
+ scheduler.callEvent("onEventCancel", [scheduler._lightbox_id]);
+ scheduler._edit_stop_event(scheduler.getEvent(scheduler._lightbox_id), false);
+ scheduler.hide_lightbox();
+ break;
+ }
+ };
+ }
+ return res;
+ };
+
+ var olds = scheduler.showCover;
+ scheduler.showCover = function() {
+ if (!this.config.readonly_active)
+ olds.apply(this, arguments);
+ };
+
+ var hold = scheduler.hide_lightbox;
+ scheduler.hide_lightbox = function() {
+ if (this._lightbox_r) {
+ this._lightbox_r.parentNode.removeChild(this._lightbox_r);
+ this._lightbox_r = this._lightbox = null;
+ }
+
+ return hold.apply(this, arguments);
+ };
+});
diff --git a/sources/ext/dhtmlxscheduler_recurring.js b/sources/ext/dhtmlxscheduler_recurring.js
new file mode 100644
index 0000000..56eb265
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_recurring.js
@@ -0,0 +1,786 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+
+scheduler.config.occurrence_timestamp_in_utc = false;
+scheduler.form_blocks["recurring"] = {
+ render:function(sns) {
+ return scheduler.__recurring_template;
+ },
+ _ds: {},
+ _init_set_value:function(node, value, ev) {
+ scheduler.form_blocks["recurring"]._ds = {start:ev.start_date, end:ev._end_date};
+
+ var str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date);
+ var str_date = function(str_date) {
+ var date = str_date_format(str_date);
+ if (scheduler.config.include_end_by)
+ date = scheduler.date.add(date, 1, 'day');
+ return date;
+ };
+
+ var date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);
+
+ var top = node.getElementsByTagName("FORM")[0];
+ var els = [];
+
+ function register_els(inps) {
+ for (var i = 0; i < inps.length; i++) {
+ var inp = inps[i];
+ if (inp.type == "checkbox" || inp.type == "radio") {
+ if (!els[inp.name])
+ els[inp.name] = [];
+ els[inp.name].push(inp);
+ } else
+ els[inp.name] = inp;
+ }
+ }
+
+ register_els(top.getElementsByTagName("INPUT"));
+ register_els(top.getElementsByTagName("SELECT"));
+
+ if (!scheduler.config.repeat_date_of_end) {
+ var formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);
+ scheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, "day"));
+ }
+ els["date_of_end"].value = scheduler.config.repeat_date_of_end;
+
+ var $ = function(a) {
+ return document.getElementById(a);
+ };
+
+ function get_radio_value(name) {
+ var col = els[name];
+ for (var i = 0; i < col.length; i++)
+ if (col[i].checked) return col[i].value;
+ }
+
+ function change_current_view() {
+ $("dhx_repeat_day").style.display = "none";
+ $("dhx_repeat_week").style.display = "none";
+ $("dhx_repeat_month").style.display = "none";
+ $("dhx_repeat_year").style.display = "none";
+ $("dhx_repeat_" + this.value).style.display = "block";
+ }
+
+ function get_repeat_code(dates) {
+ var code = [get_radio_value("repeat")];
+ get_rcode[code[0]](code, dates);
+
+ while (code.length < 5) code.push("");
+ var repeat = "";
+ if (els["end"][0].checked) {
+ dates.end = new Date(9999, 1, 1);
+ repeat = "no";
+ }
+ else if (els["end"][2].checked) {
+ dates.end = str_date(els["date_of_end"].value);
+ }
+ else {
+ scheduler.transpose_type(code.join("_"));
+ repeat = Math.max(1, els["occurences_count"].value);
+ var transp = ((code[0] == "week" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);
+ dates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join("_"));
+ }
+
+ return code.join("_") + "#" + repeat;
+ }
+
+ scheduler.form_blocks["recurring"]._get_repeat_code = get_repeat_code;
+ var get_rcode = {
+ month:function(code, dates) {
+ if (get_radio_value("month_type") == "d") {
+ code.push(Math.max(1, els["month_count"].value));
+ dates.start.setDate(els["month_day"].value);
+ } else {
+ code.push(Math.max(1, els["month_count2"].value));
+ code.push(els["month_day2"].value);
+ code.push(Math.max(1, els["month_week2"].value));
+ dates.start.setDate(1);
+ }
+ dates._start = true;
+ },
+ week:function(code, dates) {
+ code.push(Math.max(1, els["week_count"].value));
+ code.push("");
+ code.push("");
+ var t = [];
+ var col = els["week_day"];
+ var day = dates.start.getDay();
+ var start_exists = false;
+
+ for (var i = 0; i < col.length; i++){
+ if (col[i].checked) {
+ t.push(col[i].value);
+ start_exists = start_exists || col[i].value == day;
+ }
+ }
+ if (!t.length){
+ t.push(day);
+ start_exists = true;
+ }
+ t.sort();
+
+
+ if (!scheduler.config.repeat_precise){
+ dates.start = scheduler.date.week_start(dates.start);
+ dates._start = true;
+ } else if (!start_exists){
+ scheduler.transpose_day_week(dates.start, t, 1, 7);
+ dates._start = true;
+ }
+
+ code.push(t.join(","));
+ },
+ day:function(code) {
+ if (get_radio_value("day_type") == "d") {
+ code.push(Math.max(1, els["day_count"].value));
+ }
+ else {
+ code.push("week");
+ code.push(1);
+ code.push("");
+ code.push("");
+ code.push("1,2,3,4,5");
+ code.splice(0, 1);
+ }
+ },
+ year:function(code, dates) {
+ if (get_radio_value("year_type") == "d") {
+ code.push("1");
+ dates.start.setMonth(0);
+ dates.start.setDate(els["year_day"].value);
+ dates.start.setMonth(els["year_month"].value);
+
+ } else {
+ code.push("1");
+ code.push(els["year_day2"].value);
+ code.push(els["year_week2"].value);
+ dates.start.setDate(1);
+ dates.start.setMonth(els["year_month2"].value);
+ }
+ dates._start = true;
+ }
+ };
+ var set_rcode = {
+ week:function(code, dates) {
+ els["week_count"].value = code[1];
+ var col = els["week_day"];
+ var t = code[4].split(",");
+ var d = {};
+ for (var i = 0; i < t.length; i++) d[t[i]] = true;
+ for (var i = 0; i < col.length; i++)
+ col[i].checked = (!!d[col[i].value]);
+ },
+ month:function(code, dates) {
+ if (code[2] == "") {
+ els["month_type"][0].checked = true;
+ els["month_count"].value = code[1];
+ els["month_day"].value = dates.start.getDate();
+ } else {
+ els["month_type"][1].checked = true;
+ els["month_count2"].value = code[1];
+ els["month_week2"].value = code[3];
+ els["month_day2"].value = code[2];
+ }
+ },
+ day:function(code, dates) {
+ els["day_type"][0].checked = true;
+ els["day_count"].value = code[1];
+ },
+ year:function(code, dates) {
+ if (code[2] == "") {
+ els["year_type"][0].checked = true;
+ els["year_day"].value = dates.start.getDate();
+ els["year_month"].value = dates.start.getMonth();
+ } else {
+ els["year_type"][1].checked = true;
+ els["year_week2"].value = code[3];
+ els["year_day2"].value = code[2];
+ els["year_month2"].value = dates.start.getMonth();
+ }
+ }
+ };
+
+ function set_repeat_code(code, dates) {
+ var data = code.split("#");
+ code = data[0].split("_");
+ set_rcode[code[0]](code, dates);
+ var e = els["repeat"][({day:0, week:1, month:2, year:3})[code[0]]];
+ switch (data[1]) {
+ case "no":
+ els["end"][0].checked = true;
+ break;
+ case "":
+ els["end"][2].checked = true;
+ els["date_of_end"].value = date_str(dates.end);
+ break;
+ default:
+ els["end"][1].checked = true;
+ els["occurences_count"].value = data[1];
+ break;
+ }
+
+ e.checked = true;
+ e.onclick();
+ }
+
+ scheduler.form_blocks["recurring"]._set_repeat_code = set_repeat_code;
+
+ for (var i = 0; i < top.elements.length; i++) {
+ var el = top.elements[i];
+ switch (el.name) {
+ case "repeat":
+ el.onclick = change_current_view;
+ break;
+ }
+ }
+ scheduler._lightbox._rec_init_done = true;
+ },
+ set_value:function(node, value, ev) {
+ var rf = scheduler.form_blocks["recurring"];
+ if (!scheduler._lightbox._rec_init_done)
+ rf._init_set_value(node, value, ev);
+ node.open = !ev.rec_type;
+ if (ev.event_pid && ev.event_pid != "0")
+ node.blocked = true;
+ else node.blocked = false;
+
+ var ds = rf._ds;
+ ds.start = ev.start_date;
+ ds.end = ev._end_date;
+
+ rf.button_click(0, node.previousSibling.firstChild.firstChild, node, node);
+ if (value)
+ rf._set_repeat_code(value, ds);
+ },
+ get_value:function(node, ev) {
+ if (node.open) {
+ var ds = scheduler.form_blocks["recurring"]._ds;
+ var actual_dates = {};
+ this.formSection('time').getValue(actual_dates);
+ ds.start = actual_dates.start_date;
+ ev.rec_type = scheduler.form_blocks["recurring"]._get_repeat_code(ds);
+ if (ds._start) {
+ ev.start_date = new Date(ds.start);
+ ev._start_date = new Date(ds.start);
+ ds._start = false;
+ } else
+ ev._start_date = null;
+
+ ev._end_date = ds.end;
+ ev.rec_pattern = ev.rec_type.split("#")[0];
+ } else {
+ ev.rec_type = ev.rec_pattern = "";
+ ev._end_date = ev.end_date;
+ }
+ return ev.rec_type;
+ },
+ focus:function(node) {
+ },
+ button_click:function(index, el, section, cont) {
+ if (!cont.open && !cont.blocked) {
+ cont.style.height = "115px";
+ el.style.backgroundPosition = "-5px 0px";
+ el.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;
+ } else {
+ cont.style.height = "0px";
+ el.style.backgroundPosition = "-5px 20px";
+ el.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;
+ }
+ cont.open = !cont.open;
+
+ scheduler.setLightboxSize();
+ }
+};
+
+
+//problem may occur if we will have two repeating events in the same moment of time
+scheduler._rec_markers = {};
+scheduler._rec_markers_pull = {};
+scheduler._add_rec_marker = function(ev, time) {
+ ev._pid_time = time;
+ this._rec_markers[ev.id] = ev;
+ if (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};
+ this._rec_markers_pull[ev.event_pid][time] = ev;
+};
+scheduler._get_rec_marker = function(time, id) {
+ var ch = this._rec_markers_pull[id];
+ if (ch) return ch[time];
+ return null;
+};
+scheduler._get_rec_markers = function(id) {
+ return (this._rec_markers_pull[id] || []);
+};
+scheduler._rec_temp = [];
+(function() {
+ var old_add_event = scheduler.addEvent;
+ scheduler.addEvent = function(start_date, end_date, text, id, extra_data) {
+ var ev_id = old_add_event.apply(this, arguments);
+
+ if (ev_id) {
+ var ev = scheduler.getEvent(ev_id);
+ if (ev.event_pid != 0)
+ scheduler._add_rec_marker(ev, ev.event_length * 1000);
+ if (ev.rec_type)
+ ev.rec_pattern = ev.rec_type.split("#")[0];
+ }
+ return ev_id;
+ };
+})();
+scheduler.attachEvent("onEventIdChange", function(id, new_id) {
+ if (this._ignore_call) return;
+ this._ignore_call = true;
+
+ for (var i = 0; i < this._rec_temp.length; i++) {
+ var tev = this._rec_temp[i];
+ if (tev.event_pid == id) {
+ tev.event_pid = new_id;
+ this.changeEventId(tev.id, new_id + "#" + tev.id.split("#")[1]);
+ }
+ }
+
+ delete this._ignore_call;
+});
+scheduler.attachEvent("onConfirmedBeforeEventDelete", function(id) {
+ var ev = this.getEvent(id);
+ if (id.toString().indexOf("#") != -1 || (ev.event_pid && ev.event_pid != "0" && ev.rec_type && ev.rec_type != 'none')) {
+ id = id.split("#");
+ var nid = this.uid();
+ var tid = (id[1]) ? id[1] : (ev._pid_time / 1000);
+
+ var nev = this._copy_event(ev);
+ nev.id = nid;
+ nev.event_pid = ev.event_pid || id[0];
+ var timestamp = tid;
+ nev.event_length = timestamp;
+ nev.rec_type = nev.rec_pattern = "none";
+ this.addEvent(nev);
+
+ this._add_rec_marker(nev, timestamp * 1000);
+ } else {
+ if (ev.rec_type && this._lightbox_id)
+ this._roll_back_dates(ev);
+ var sub = this._get_rec_markers(id);
+ for (var i in sub) {
+ if (sub.hasOwnProperty(i)) {
+ id = sub[i].id;
+ if (this.getEvent(id))
+ this.deleteEvent(id, true);
+ }
+ }
+ }
+ return true;
+});
+
+scheduler.attachEvent("onEventChanged", function(id) {
+ if (this._loading) return true;
+
+ var ev = this.getEvent(id);
+
+ if (id.toString().indexOf("#") != -1) {
+ var id = id.split("#");
+ var nid = this.uid();
+ this._not_render = true;
+
+ var nev = this._copy_event(ev);
+ nev.id = nid;
+ nev.event_pid = id[0];
+ var timestamp = id[1];
+ nev.event_length = timestamp;
+ nev.rec_type = nev.rec_pattern = "";
+
+ this._add_rec_marker(nev, timestamp * 1000);
+ this.addEvent(nev);
+
+ this._not_render = false;
+
+ } else {
+ if (ev.rec_type && this._lightbox_id)
+ this._roll_back_dates(ev);
+ var sub = this._get_rec_markers(id);
+ for (var i in sub) {
+ if (sub.hasOwnProperty(i)) {
+ delete this._rec_markers[sub[i].id];
+ this.deleteEvent(sub[i].id, true);
+ }
+ }
+ delete this._rec_markers_pull[id];
+
+ // it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag
+ var isEventFound = false;
+ for (var k = 0; k < this._rendered.length; k++) {
+ if (this._rendered[k].getAttribute('event_id') == id)
+ isEventFound = true;
+ }
+ if (!isEventFound)
+ this._select_id = null;
+ }
+ return true;
+});
+scheduler.attachEvent("onEventAdded", function(id) {
+ if (!this._loading) {
+ var ev = this.getEvent(id);
+ if (ev.rec_type && !ev.event_length)
+ this._roll_back_dates(ev);
+ }
+ return true;
+});
+scheduler.attachEvent("onEventSave", function(id, data, is_new_event) {
+ var ev = this.getEvent(id);
+ if (!ev.rec_type && data.rec_type && (id + '').indexOf('#') == -1)
+ this._select_id = null;
+ return true;
+});
+scheduler.attachEvent("onEventCreated", function(id) {
+ var ev = this.getEvent(id);
+ if (!ev.rec_type)
+ ev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = "";
+ return true;
+});
+scheduler.attachEvent("onEventCancel", function(id) {
+ var ev = this.getEvent(id);
+ if (ev.rec_type) {
+ this._roll_back_dates(ev);
+ // a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process
+ this.render_view_data();
+ }
+});
+scheduler._roll_back_dates = function(ev) {
+ ev.event_length = (ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000;
+ ev.end_date = ev._end_date;
+ if (ev._start_date) {
+ ev.start_date.setMonth(0);
+ ev.start_date.setDate(ev._start_date.getDate());
+ ev.start_date.setMonth(ev._start_date.getMonth());
+ ev.start_date.setFullYear(ev._start_date.getFullYear());
+
+ }
+};
+
+scheduler._validId = function(id) {
+ return id.toString().indexOf("#") == -1;
+};
+
+scheduler.showLightbox_rec = scheduler.showLightbox;
+scheduler.showLightbox = function(id) {
+ var locale = this.locale;
+ var c = scheduler.config.lightbox_recurring;
+ var ev = this.getEvent(id);
+ var pid = ev.event_pid;
+ var isVirtual = (id.toString().indexOf("#") != -1);
+ if (isVirtual)
+ pid = id.split("#")[0];
+
+ // show series
+ var showSeries = function(id) {
+ var event = scheduler.getEvent(id);
+ event._end_date = event.end_date;
+ event.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);
+ return scheduler.showLightbox_rec(id); // editing series
+ };
+
+ if ( (pid || pid == 0) && ev.rec_type) {
+ // direct API call on series id
+ return showSeries(id);
+ }
+ if ( !pid || pid == 0 || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {
+ // editing instance or non recurring event
+ return this.showLightbox_rec(id);
+ }
+ if (c == 'ask') {
+ var that = this;
+ dhtmlx.modalbox({
+ text: locale.labels.confirm_recurring,
+ title: locale.labels.title_confirm_recurring,
+ width: "500px",
+ position: "middle",
+ buttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],
+ callback: function(index) {
+ switch(+index) {
+ case 0:
+ return showSeries(pid);
+ case 1:
+ return that.showLightbox_rec(id);
+ case 2:
+ return;
+ }
+ }
+ });
+ } else {
+ showSeries(pid);
+ }
+};
+
+
+scheduler.get_visible_events_rec = scheduler.get_visible_events;
+scheduler.get_visible_events = function(only_timed) {
+ for (var i = 0; i < this._rec_temp.length; i++)
+ delete this._events[this._rec_temp[i].id];
+ this._rec_temp = [];
+
+ var stack = this.get_visible_events_rec(only_timed);
+ var out = [];
+ for (var i = 0; i < stack.length; i++) {
+ if (stack[i].rec_type) {
+ //deleted element of serie
+ if (stack[i].rec_pattern != "none")
+ this.repeat_date(stack[i], out);
+ }
+ else out.push(stack[i]);
+ }
+ return out;
+};
+
+
+(function() {
+ var old = scheduler.isOneDayEvent;
+ scheduler.isOneDayEvent = function(ev) {
+ if (ev.rec_type) return true;
+ return old.call(this, ev);
+ };
+ var old_update_event = scheduler.updateEvent;
+ scheduler.updateEvent = function(id) {
+ var ev = scheduler.getEvent(id);
+ if(ev.rec_type){
+ //rec_type can be changed without the lightbox,
+ // make sure rec_pattern updated as well
+ ev.rec_pattern = (ev.rec_type || "").split("#")[0];
+ }
+ if (ev && ev.rec_type && id.toString().indexOf('#') === -1) {
+ scheduler.update_view();
+ } else {
+ old_update_event.call(this, id);
+ }
+ };
+})();
+
+scheduler.transponse_size = {
+ day:1, week:7, month:1, year:12
+};
+scheduler.date.day_week = function(sd, day, week) {
+ sd.setDate(1);
+ week = (week - 1) * 7;
+ var cday = sd.getDay();
+ var nday = day * 1 + week - cday + 1;
+ sd.setDate(nday <= week ? (nday + 7) : nday);
+};
+scheduler.transpose_day_week = function(sd, list, cor, size, cor2) {
+ var cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;
+ for (var i = 0; i < list.length; i++) {
+ if (list[i] > cday)
+ return sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));
+ }
+ this.transpose_day_week(sd, list, cor + size, null, cor);
+};
+scheduler.transpose_type = function(type) {
+ var f = "transpose_" + type;
+ if (!this.date[f]) {
+ var str = type.split("_");
+ var day = 60 * 60 * 24 * 1000;
+ var gf = "add_" + type;
+ var step = this.transponse_size[str[0]] * str[1];
+
+ if (str[0] == "day" || str[0] == "week") {
+ var days = null;
+ if (str[4]) {
+ days = str[4].split(",");
+ if (scheduler.config.start_on_monday) {
+ for (var i = 0; i < days.length; i++)
+ days[i] = (days[i] * 1) || 7;
+ days.sort();
+ }
+ }
+
+ this.date[f] = function(nd, td) {
+ var delta = Math.floor((td.valueOf() - nd.valueOf()) / (day * step));
+ if (delta > 0)
+ nd.setDate(nd.getDate() + delta * step);
+ if (days)
+ scheduler.transpose_day_week(nd, days, 1, step);
+ };
+ this.date[gf] = function(sd, inc) {
+ var nd = new Date(sd.valueOf());
+ if (days) {
+ for (var count = 0; count < inc; count++)
+ scheduler.transpose_day_week(nd, days, 0, step);
+ } else
+ nd.setDate(nd.getDate() + inc * step);
+
+ return nd;
+ };
+ }
+ else if (str[0] == "month" || str[0] == "year") {
+ this.date[f] = function(nd, td) {
+ var delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1)) / (step));
+ if (delta >= 0)
+ nd.setMonth(nd.getMonth() + delta * step);
+ if (str[3])
+ scheduler.date.day_week(nd, str[2], str[3]);
+ };
+ this.date[gf] = function(sd, inc) {
+ var nd = new Date(sd.valueOf());
+ nd.setMonth(nd.getMonth() + inc * step);
+ if (str[3])
+ scheduler.date.day_week(nd, str[2], str[3]);
+ return nd;
+ };
+ }
+ }
+};
+scheduler.repeat_date = function(ev, stack, non_render, from, to) {
+
+ from = from || this._min_date;
+ to = to || this._max_date;
+
+ var td = new Date(ev.start_date.valueOf());
+
+ if (!ev.rec_pattern && ev.rec_type)
+ ev.rec_pattern = ev.rec_type.split("#")[0];
+
+ this.transpose_type(ev.rec_pattern);
+ scheduler.date["transpose_" + ev.rec_pattern](td, from);
+ while (td < ev.start_date || scheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() || td.valueOf() + ev.event_length * 1000 <= from.valueOf())
+ td = this.date.add(td, 1, ev.rec_pattern);
+ while (td < to && td < ev.end_date) {
+ var timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();
+ var ch = this._get_rec_marker(timestamp, ev.id);
+ if (!ch) { // unmodified element of series
+ var ted = new Date(td.valueOf() + ev.event_length * 1000);
+ var copy = this._copy_event(ev);
+ //copy._timed = ev._timed;
+ copy.text = ev.text;
+ copy.start_date = td;
+ copy.event_pid = ev.id;
+ copy.id = ev.id + "#" + Math.ceil(timestamp / 1000);
+ copy.end_date = ted;
+
+ copy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);
+
+ copy._timed = this.isOneDayEvent(copy);
+
+ if (!copy._timed && !this._table_view && !this.config.multi_day) return;
+ stack.push(copy);
+
+ if (!non_render) {
+ this._events[copy.id] = copy;
+ this._rec_temp.push(copy);
+ }
+
+ } else
+ if (non_render) stack.push(ch);
+
+ td = this.date.add(td, 1, ev.rec_pattern);
+ }
+};
+scheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {
+ var shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();
+ if (shift) {
+ if (shift > 0) {
+ // e.g. 24h -> 23h
+ return new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);
+ }
+ else {
+ // e.g. 24h -> 25h
+ return new Date(end_date.valueOf() - shift * 60 * 1000);
+ }
+ }
+ return new Date(default_date.valueOf());
+};
+scheduler.getRecDates = function(id, max) {
+ var ev = typeof id == "object" ? id : scheduler.getEvent(id);
+ var count = 0;
+ var result = [];
+ max = max || 100;
+
+ var td = new Date(ev.start_date.valueOf());
+ var from = new Date(td.valueOf());
+
+ if (!ev.rec_type) {
+ return [
+ { start_date: ev.start_date, end_date: ev.end_date }
+ ];
+ }
+ if (ev.rec_type == "none") {
+ return [];
+ }
+ this.transpose_type(ev.rec_pattern);
+ scheduler.date["transpose_" + ev.rec_pattern](td, from);
+
+ while (td < ev.start_date || (td.valueOf() + ev.event_length * 1000) <= from.valueOf())
+ td = this.date.add(td, 1, ev.rec_pattern);
+ while (td < ev.end_date) {
+ var ch = this._get_rec_marker(td.valueOf(), ev.id);
+ var res = true;
+ if (!ch) { // unmodified element of series
+ var sed = new Date(td);
+ var ted = new Date(td.valueOf() + ev.event_length * 1000);
+
+ ted = scheduler._fix_daylight_saving_date(sed, ted, ev, td, ted);
+
+ result.push({start_date:sed, end_date:ted});
+ } else {
+ (ch.rec_type == "none") ?
+ (res = false) :
+ result.push({ start_date: ch.start_date, end_date: ch.end_date });
+ }
+ td = this.date.add(td, 1, ev.rec_pattern);
+ if (res) {
+ count++;
+ if (count == max)
+ break;
+ }
+ }
+ return result;
+};
+scheduler.getEvents = function(from, to) {
+ var result = [];
+ for (var a in this._events) {
+ var ev = this._events[a];
+ if (ev && ev.start_date < to && ev.end_date > from) {
+ if (ev.rec_pattern) {
+ if (ev.rec_pattern == "none") continue;
+ var sev = [];
+ this.repeat_date(ev, sev, true, from, to);
+ for (var i = 0; i < sev.length; i++) {
+ // if event is in rec_markers then it will be checked by himself, here need to skip it
+ if (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {
+ result.push(sev[i]);
+ }
+ }
+ } else if (ev.id.toString().indexOf("#") == -1) { // if it's virtual event we can skip it
+ result.push(ev);
+ }
+ }
+ }
+ return result;
+};
+
+scheduler.config.repeat_date = "%m.%d.%Y";
+scheduler.config.lightbox.sections = [
+ {name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
+ {name:"recurring", type:"recurring", map_to:"rec_type", button:"recurring"},
+ {name:"time", height:72, type:"time", map_to:"auto"}
+];
+
+
+//drop secondary attributes
+scheduler._copy_dummy = function(ev) {
+ var start_date = new Date(this.start_date);
+ var end_date = new Date(this.end_date);
+ this.start_date = start_date;
+ this.end_date = end_date;
+ this.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;
+};
+
+scheduler.config.include_end_by = false;
+scheduler.config.lightbox_recurring = 'ask'; // series, instance
+
+scheduler.attachEvent("onClearAll", function(){
+ scheduler._rec_markers = {}; //clear recurring events data
+ scheduler._rec_markers_pull = {};
+ scheduler._rec_temp = [];
+});
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Daily</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Weekly</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Monthly</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Yearly</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />day<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Every workday</label> </div> <div style="display:none;" id="dhx_repeat_week"> Repeat every<input class="dhx_repeat_text" type="text" name="week_count" value="1" />week next days:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Monday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Thursday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tuesday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Friday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Wednesday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Saturday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sunday</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repeat</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />day every<input class="dhx_repeat_text" type="text" name="month_count" value="1" />month<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="0">Sunday</select>every<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />month<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />day<select name="year_month"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select>month<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="7">Sunday</select>of<select name="year_month2"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>No end date</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />After</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurrences<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />End by</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/ext/dhtmlxscheduler_serialize.js b/sources/ext/dhtmlxscheduler_serialize.js
new file mode 100644
index 0000000..5a89e9d
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_serialize.js
@@ -0,0 +1,77 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+//redefine this method, if you want to provide a custom set of attributes for serialization
+scheduler.data_attributes=function(){
+ var attrs = [];
+ var format = scheduler.templates.xml_format;
+ for (var a in this._events){
+ var ev = this._events[a];
+ for (var name in ev)
+ if (name.substr(0,1) !="_")
+ attrs.push([name,((name == "start_date" || name == "end_date")?format:null)]);
+ break;
+ }
+ return attrs;
+}
+
+scheduler.toXML = function(header){
+ var xml = [];
+ var attrs = this.data_attributes();
+
+
+ for (var a in this._events){
+ var ev = this._events[a];
+ if (ev.id.toString().indexOf("#")!=-1) continue;
+ xml.push("<event>");
+ for (var i=0; i < attrs.length; i++)
+ xml.push("<"+attrs[i][0]+"><![CDATA["+(attrs[i][1]?attrs[i][1](ev[attrs[i][0]]):ev[attrs[i][0]])+"]]></"+attrs[i][0]+">");
+
+ xml.push("</event>");
+ }
+ return (header||"")+"<data>"+xml.join("\n")+"</data>";
+};
+
+scheduler.toJSON = function(){
+ var json = [];
+ var attrs = this.data_attributes();
+ for (var a in this._events){
+ var ev = this._events[a];
+ if (ev.id.toString().indexOf("#")!=-1) continue;
+ var ev = this._events[a];
+ var line =[];
+ for (var i=0; i < attrs.length; i++)
+ line.push(' "'+attrs[i][0]+'": "'+((attrs[i][1]?attrs[i][1](ev[attrs[i][0]]):ev[attrs[i][0]])||"").toString().replace(/\n/g,"")+'" ');
+ json.push("{"+line.join(",")+"}");
+ }
+ return "["+json.join(",\n")+"]";
+};
+
+
+scheduler.toICal = function(header){
+ var start = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\nDESCRIPTION:";
+ var end = "END:VCALENDAR";
+ var format = scheduler.date.date_to_str("%Y%m%dT%H%i%s");
+ var full_day_format = scheduler.date.date_to_str("%Y%m%d");
+
+ var ical = [];
+ for (var a in this._events){
+ var ev = this._events[a];
+ if (ev.id.toString().indexOf("#")!=-1) continue;
+
+
+ ical.push("BEGIN:VEVENT");
+ if (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))
+ ical.push("DTSTART:"+full_day_format(ev.start_date));
+ else
+ ical.push("DTSTART:"+format(ev.start_date));
+ if (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))
+ ical.push("DTEND:"+full_day_format(ev.end_date));
+ else
+ ical.push("DTEND:"+format(ev.end_date));
+ ical.push("SUMMARY:"+ev.text);
+ ical.push("END:VEVENT");
+ }
+ return start+(header||"")+"\n"+ical.join("\n")+"\n"+end;
+}; \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_timeline.js b/sources/ext/dhtmlxscheduler_timeline.js
new file mode 100644
index 0000000..f27868a
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_timeline.js
@@ -0,0 +1,1195 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+(scheduler._temp_matrix_scope = function(){
+
+
+
+scheduler.matrix = {};
+scheduler._merge=function(a,b){
+ for (var c in b)
+ if (typeof a[c] == "undefined")
+ a[c]=b[c];
+};
+scheduler.createTimelineView=function(obj){
+ scheduler._skin_init();
+
+ scheduler._merge(obj,{
+ section_autoheight: true,
+ name:"matrix",
+ x:"time",
+ y:"time",
+ x_step:1,
+ x_unit:"hour",
+ y_unit:"day",
+ y_step:1,
+ x_start:0,
+ x_size:24,
+ y_start:0,
+ y_size: 7,
+ render:"cell",
+ dx:200,
+ dy:50,
+ event_dy: scheduler.xy.bar_height-5,
+ event_min_dy: scheduler.xy.bar_height-5,
+ resize_events: true,
+ fit_events: true,
+ show_unassigned: false,
+ second_scale: false,
+ round_position: false,
+ _logic: function(render_name, y_unit, timeline) {
+ var res = {};
+ if(scheduler.checkEvent("onBeforeSectionRender")) {
+ res = scheduler.callEvent("onBeforeSectionRender", [render_name, y_unit, timeline]);
+ }
+ return res;
+ }
+ });
+ obj._original_x_start = obj.x_start;
+
+ //first and last hours are applied only to day based timeline
+ if (obj.x_unit != "day") obj.first_hour = obj.last_hour = 0;
+ //correction for first and last hour
+ obj._start_correction = obj.first_hour?obj.first_hour*60*60*1000:0;
+ obj._end_correction = obj.last_hour?(24-obj.last_hour)*60*60*1000:0;
+
+ if (scheduler.checkEvent("onTimelineCreated")) {
+ scheduler.callEvent("onTimelineCreated", [obj]);
+ }
+
+ var old = scheduler.render_data;
+ scheduler.render_data = function(evs, mode) {
+ if (this._mode == obj.name) {
+ //repaint single event, precision is not necessary
+ if (mode && !obj.show_unassigned && obj.render != "cell") {
+ for (var i = 0; i < evs.length; i++) {
+ this.clear_event(evs[i]);
+ this.render_timeline_event.call(this.matrix[this._mode], evs[i], true);
+ }
+ } else {
+ scheduler._renderMatrix.call(obj, true, true);
+ }
+ } else
+ return old.apply(this, arguments);
+ };
+
+ scheduler.matrix[obj.name]=obj;
+ scheduler.templates[obj.name+"_cell_value"] = function(ar){ return ar?ar.length:""; };
+ scheduler.templates[obj.name+"_cell_class"] = function(arr){ return ""; };
+ scheduler.templates[obj.name+"_scalex_class"] = function(date){ return ""; };
+ scheduler.templates[obj.name+"_second_scalex_class"] = function(date){ return ""; };
+
+ scheduler.templates[obj.name+"_scaley_class"] = function(section_id, section_label, section_options){ return ""; };
+ scheduler.templates[obj.name+"_scale_label"] = function(section_id, section_label, section_options){ return section_label; };
+
+ scheduler.templates[obj.name+"_tooltip"] = function(a,b,e){ return e.text; };
+ scheduler.templates[obj.name+"_date"] = function(datea, dateb){
+ if ( (datea.getDay()==dateb.getDay() && dateb-datea < (24*60*60*1000))
+ || +datea == +scheduler.date.date_part(new Date(dateb))
+ || (+scheduler.date.add(datea, 1, "day") == +dateb && dateb.getHours() == 0 && dateb.getMinutes() == 0) )
+ return scheduler.templates.day_date(datea);
+ if ( (datea.getDay() != dateb.getDay() && dateb-datea < (24*60*60*1000)) ) {
+ return scheduler.templates.day_date(datea)+" &ndash; "+scheduler.templates.day_date(dateb);
+ }
+ return scheduler.templates.week_date(datea, dateb);
+ };
+
+ scheduler.templates[obj.name+"_scale_date"] = scheduler.date.date_to_str(obj.x_date||scheduler.config.hour_date);
+ scheduler.templates[obj.name+"_second_scale_date"] = scheduler.date.date_to_str((obj.second_scale && obj.second_scale.x_date)?obj.second_scale.x_date:scheduler.config.hour_date);
+
+ scheduler.date["add_" + obj.name] = function(date, step, c) {
+ var resulting_date = scheduler.date.add(date, (obj.x_length || obj.x_size) * step * obj.x_step, obj.x_unit);
+ if (obj.x_unit == "minute" || obj.x_unit == "hour") {
+ var size = (obj.x_length || obj.x_size);
+ if ( +scheduler.date.date_part(new Date(date)) == +scheduler.date.date_part(new Date(resulting_date )) ) {
+ obj.x_start += step*size;
+ } else {
+ var converted_step = (obj.x_unit == "hour") ? obj.x_step*60 : obj.x_step;
+ // total steps starting from 0
+ var total_steps = ( (24 * 60) / (size * converted_step) ) - 1;
+ var steps_offset = Math.round(total_steps * size);
+
+ if (step > 0) {
+ obj.x_start = obj.x_start - steps_offset;
+ } else {
+ obj.x_start = steps_offset + obj.x_start;
+ }
+ }
+ }
+ return resulting_date;
+ };
+
+ scheduler.attachEvent("onBeforeTodayDisplayed", function() {
+ obj.x_start = obj._original_x_start;
+ return true;
+ });
+ scheduler.date[obj.name+"_start"] = function(date) {
+ var func = scheduler.date[obj.x_unit+"_start"] || scheduler.date.day_start;
+ var start_date = func.call(scheduler.date, date);
+ start_date = scheduler.date.add(start_date, obj.x_step*obj.x_start, obj.x_unit);
+ return start_date;
+ };
+
+ scheduler.attachEvent("onSchedulerResize",function(){
+ if (this._mode == obj.name){
+ scheduler._renderMatrix.call(obj, true, true);
+ return false;
+ }
+ return true;
+ });
+
+ scheduler.attachEvent("onOptionsLoad",function(){
+ obj.order = {};
+ scheduler.callEvent('onOptionsLoadStart', []);
+ for(var i=0; i<obj.y_unit.length;i++)
+ obj.order[obj.y_unit[i].key]=i;
+ scheduler.callEvent('onOptionsLoadFinal', []);
+ if (scheduler._date && obj.name == scheduler._mode)
+ scheduler.setCurrentView(scheduler._date, scheduler._mode);
+ });
+ scheduler.callEvent("onOptionsLoad",[obj]);
+
+ //init custom wrappers
+ scheduler[obj.name+"_view"]=function(){
+ scheduler._renderMatrix.apply(obj, arguments);
+ };
+
+ //enable drag for non-cell modes
+ var temp_date = new Date();
+ var step_diff = (scheduler.date.add(temp_date, obj.x_step, obj.x_unit).valueOf() - temp_date.valueOf()); // "minute" + step in ms
+ scheduler["mouse_"+obj.name]=function(pos){ //mouse_coord handler
+ //get event object
+ var ev = this._drag_event;
+ if (this._drag_id){
+ ev = this.getEvent(this._drag_id);
+ this._drag_event._dhx_changed = true;
+ }
+
+ pos.x-=obj.dx;
+ var summ = 0, xind = 0, yind = 0;
+ for (xind; xind <= this._cols.length-1; xind++) {
+
+ var column_width = this._cols[xind];
+ summ += column_width;
+ if (summ>pos.x){ //index of section
+ var ratio = (pos.x-(summ-column_width))/column_width;
+ ratio = (ratio < 0) ? 0 : ratio;
+ break;
+ }
+ }
+ //border cases
+ if (xind == 0 && this._ignores[0]) {
+ xind = 1; ratio = 0;
+ while (this._ignores[xind]) xind++;
+ } else if ( xind == this._cols.length && this._ignores[xind-1]) {
+ xind = this._cols.length-1; ratio = 0;
+ while (this._ignores[xind]) xind--;
+ xind++;
+ }
+
+ summ = 0;
+ for (yind; yind < this._colsS.heights.length; yind++) {
+ summ += this._colsS.heights[yind];
+ if (summ > pos.y)
+ break;
+ }
+
+ pos.fields={};
+ if(!obj.y_unit[yind]) {
+ yind=obj.y_unit.length-1;
+ }
+
+ if (yind >= 0 && obj.y_unit[yind]) {
+ pos.section = pos.fields[obj.y_property] = obj.y_unit[yind].key;
+ if (ev) {
+ if(ev[obj.y_property] != pos.section){
+ var line_height = scheduler._get_timeline_event_height(ev, obj);
+ ev._sorder = scheduler._get_dnd_order(ev._sorder, line_height, obj._section_height[pos.section]);
+ }
+ ev[obj.y_property] = pos.section;
+ }
+ }
+
+ pos.x = 0;
+ pos.force_redraw = true;
+ pos.custom = true;
+
+ var end_date;
+ // if our event is at the end of the view
+ if(xind >= obj._trace_x.length) {
+ end_date = scheduler.date.add(obj._trace_x[obj._trace_x.length-1], obj.x_step, obj.x_unit);
+ if (obj._end_correction)
+ end_date = new Date(end_date-obj._end_correction);
+ } else {
+ var timestamp_diff = ratio * column_width * obj._step + obj._start_correction;
+ end_date = new Date(+obj._trace_x[xind]+timestamp_diff);
+ }
+
+ // as we can simply be calling _locate_cell_timeline
+ if (this._drag_mode == "move" && this._drag_id && this._drag_event) {
+ var ev = this.getEvent(this._drag_id);
+ var drag_event = this._drag_event;
+
+ pos._ignores = (this._ignores_detected || obj._start_correction || obj._end_correction);
+ if (!drag_event._move_delta) {
+ drag_event._move_delta = (ev.start_date-end_date)/60000;
+ if (this.config.preserve_length && pos._ignores){
+ drag_event._move_delta = this._get_real_event_length(ev.start_date,end_date, obj);
+ drag_event._event_length = this._get_real_event_length(ev.start_date,ev.end_date, obj);
+ }
+ }
+
+
+
+
+ //preserve visible size of event
+ if (this.config.preserve_length && pos._ignores){
+ var ev_length = drag_event._event_length;//this._get_real_event_length(ev.start_date, ev.end_date, obj);
+ var current_back_shift = this._get_fictional_event_length(end_date, drag_event._move_delta, obj, true);
+ end_date = new Date(end_date - current_back_shift);
+ } else {
+ // converting basically to start_date
+ end_date = scheduler.date.add(end_date, drag_event._move_delta, "minute");
+ }
+ }
+
+ if (this._drag_mode == "resize" && ev){
+ var pos_check = !!(Math.abs(ev.start_date-end_date) < Math.abs(ev.end_date-end_date));
+ if (obj._start_correction || obj._end_correction){
+ var first_check = (!this._drag_event || this._drag_event._resize_from_start == undefined);
+ if (first_check || Math.abs(ev.end_date - ev.start_date) <= (1000*60*this.config.time_step))
+ this._drag_event._resize_from_start = pos.resize_from_start = pos_check;
+ else
+ pos.resize_from_start = this._drag_event._resize_from_start;
+ } else
+ pos.resize_from_start = pos_check;
+ }
+
+ if (obj.round_position) {
+ switch(this._drag_mode) {
+ case "move":
+ if (!this.config.preserve_length){
+ end_date = get_rounded_date.call(obj, end_date, false);
+ // to preserve original start and end dates
+ if(obj.x_unit == "day")//only make sense for whole-day cells
+ pos.custom = false;
+ }
+ break;
+ case "resize":
+ if(this._drag_event){
+ // will save and use resize position only once
+ if (this._drag_event._resize_from_start == null) {
+ this._drag_event._resize_from_start = pos.resize_from_start;
+ }
+ pos.resize_from_start = this._drag_event._resize_from_start;
+ end_date = get_rounded_date.call(obj, end_date, !this._drag_event._resize_from_start);
+ }
+ break;
+ }
+ }
+
+ pos.y = Math.round((end_date-this._min_date)/(1000*60*this.config.time_step));
+ pos.shift = this.config.time_step; //step_diff;
+
+ return pos;
+ }
+};
+
+scheduler._get_timeline_event_height = function(ev, config){
+ var section = ev[config.y_property]; // section id
+ var event_height = config.event_dy;
+ if (config.event_dy == "full") {
+ if (config.section_autoheight) {
+ event_height = config._section_height[section] - 6;
+ } else {
+ event_height = config.dy - 3;
+ }
+ }
+
+ if (config.resize_events) {
+ event_height = Math.max(Math.floor(event_height / ev._count), config.event_min_dy);
+ }
+ return event_height;
+};
+scheduler._get_timeline_event_y = function(order, event_height){
+ var sorder = order;
+ var y = 2+sorder*event_height+(sorder?(sorder*2):0); // original top + number_of_events * event_dy + default event top/bottom borders
+ if (scheduler.config.cascade_event_display) {
+ y =2+sorder*scheduler.config.cascade_event_margin+(sorder?(sorder*2):0);
+ }
+ return y;
+};
+
+scheduler.render_timeline_event = function(ev, attach){
+ var section = ev[this.y_property]; // section id
+ if (!section)
+ return ""; // as we may await html
+
+ var sorder = ev._sorder;
+
+ var x_start = _getX(ev, false, this);
+ var x_end = _getX(ev, true, this);
+
+ var event_height = scheduler._get_timeline_event_height(ev, this);
+
+ var hb = event_height - 2;// takes into account css sizes (border/padding)
+ if (!ev._inner && this.event_dy == "full") {
+ hb=(hb+2)*(ev._count-sorder)-2;
+ }
+
+ var y = scheduler._get_timeline_event_y(ev._sorder, event_height);
+
+ var section_height = event_height+y+2;
+ if(!this._events_height[section] || (this._events_height[section] < section_height)){
+ this._events_height[section] = section_height;
+ }
+
+ var cs = scheduler.templates.event_class(ev.start_date,ev.end_date,ev);
+ cs = "dhx_cal_event_line "+(cs||"");
+
+ var bg_color = (ev.color?("background:"+ev.color+";"):"");
+ var color = (ev.textColor?("color:"+ev.textColor+";"):"");
+ var text = scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev);
+
+ var html='<div event_id="'+ev.id+'" class="'+cs+'" style="'+bg_color+''+color+'position:absolute; top:'+y+'px; height: '+hb+'px; left:'+x_start+'px; width:'+Math.max(0,x_end-x_start)+'px;'+(ev._text_style||"")+'">';
+ if (scheduler.config.drag_resize && !scheduler.config.readonly) {
+ var dhx_event_resize = 'dhx_event_resize';
+ html += ("<div class='"+dhx_event_resize+" "+dhx_event_resize+"_start' style='height: "+hb+"px;'></div><div class='"+dhx_event_resize+" "+dhx_event_resize+"_end' style='height: "+hb+"px;'></div>");
+ }
+ html += (text+'</div>');
+
+ if (!attach)
+ return html;
+ else {
+ var d = document.createElement("DIV");
+ d.innerHTML = html;
+ var ind = this.order[section];
+ var parent = scheduler._els["dhx_cal_data"][0].firstChild.rows[ind].cells[1].firstChild;
+
+ scheduler._rendered.push(d.firstChild);
+ parent.appendChild(d.firstChild);
+ }
+};
+function trace_events(){
+ //minimize event set
+ var evs = scheduler.get_visible_events();
+ var matrix =[];
+ for (var i=0; i < this.y_unit.length; i++)
+ matrix[i]=[];
+
+ //next code defines row for undefined key
+ //most possible it is an artifact of incorrect configuration
+ if (!matrix[y])
+ matrix[y]=[];
+
+ for (var i=0; i < evs.length; i++) {
+ var y = this.order[evs[i][this.y_property]];
+ var x = 0;
+ while (this._trace_x[x+1] && evs[i].start_date>=this._trace_x[x+1]) x++;
+ while (this._trace_x[x] && evs[i].end_date>this._trace_x[x]) {
+ if (!matrix[y][x]) matrix[y][x]=[];
+ matrix[y][x].push(evs[i]);
+ x++;
+ }
+ }
+ return matrix;
+}
+// function used to get X (both start and end) coordinates for timeline bar view
+function _getX(ev, isEndPoint, config) {
+ var x = 0;
+ var step = config._step;
+ var round_position = config.round_position;
+
+ var column_offset = 0;
+ var date = (isEndPoint) ? ev.end_date : ev.start_date;
+
+ if(date.valueOf()>scheduler._max_date.valueOf())
+ date = scheduler._max_date;
+ var delta = date - scheduler._min_date_timeline;
+
+ if (delta > 0){
+ var index = scheduler._get_date_index(config, date);
+ if (scheduler._ignores[index])
+ round_position=true;
+
+ for (var i = 0; i < index; i++) {
+ x += scheduler._cols[i];
+ }
+
+ var column_date = scheduler.date.add(scheduler._min_date_timeline, scheduler.matrix[scheduler._mode].x_step*index, scheduler.matrix[scheduler._mode].x_unit);
+ if (!round_position) {
+ delta = date - column_date;
+ if (config.first_hour || config.last_hour){
+ delta = delta - config._start_correction;
+ if (delta < 0) delta = 0;
+ column_offset = Math.round(delta/step);
+ if (column_offset > scheduler._cols[index])
+ column_offset = scheduler._cols[index];
+ } else {
+ column_offset = Math.round(delta/step);
+ }
+ } else {
+ if (+date > +column_date && isEndPoint) {
+ column_offset = scheduler._cols[index];
+ }
+ }
+ }
+ if (isEndPoint) {
+ // special handling for "round" dates which match columns and usual ones
+ if (delta != 0 && !round_position) {
+ x += column_offset-12;
+ } else {
+ x += column_offset-14;
+ }
+ } else {
+ x += column_offset+1;
+ }
+ return x;
+}
+function get_rounded_date(date, isEndDate) {
+ var index = scheduler._get_date_index(this, date);
+ var rounded_date = this._trace_x[index];
+ if (isEndDate && (+date != +this._trace_x[index])) {
+ rounded_date = (this._trace_x[index+1]) ? this._trace_x[index+1] : scheduler.date.add(this._trace_x[index], this.x_step, this.x_unit);
+ }
+ return new Date(rounded_date);
+}
+function get_events_html(evs) {
+ var html = "";
+ if (evs && this.render != "cell"){
+ evs.sort(this.sort || function(a,b){
+ if(a.start_date.valueOf()==b.start_date.valueOf())
+ return a.id>b.id?1:-1;
+ return a.start_date>b.start_date?1:-1;
+ });
+ var stack=[];
+ var evs_length = evs.length;
+ // prepare events for render
+ for (var j=0; j<evs_length; j++){
+ var ev = evs[j];
+ ev._inner = false;
+
+ var ev_start_date = (this.round_position) ? get_rounded_date.apply(this, [ev.start_date, false]) : ev.start_date;
+ var ev_end_date = (this.round_position) ? get_rounded_date.apply(this, [ev.end_date, true]) : ev.end_date;
+
+ // cutting stack from the last -> first event side
+ while (stack.length) {
+ var stack_ev = stack[stack.length-1];
+ if (stack_ev.end_date.valueOf() <= ev_start_date.valueOf()) {
+ stack.splice(stack.length-1,1);
+ } else {
+ break;
+ }
+ }
+
+ // cutting stack from the first -> last event side
+ var sorderSet = false;
+ for(var p=0; p<stack.length; p++){
+ var t_ev = stack[p];
+ if(t_ev.end_date.valueOf() <= ev_start_date.valueOf()){
+ sorderSet = true;
+ ev._sorder=t_ev._sorder;
+ stack.splice(p,1);
+ ev._inner=true;
+ break;
+ }
+ }
+
+
+ if (stack.length)
+ stack[stack.length-1]._inner=true;
+
+
+ if (!sorderSet) {
+ if (stack.length) {
+ if (stack.length <= stack[stack.length - 1]._sorder) {
+ if (!stack[stack.length - 1]._sorder)
+ ev._sorder = 0;
+ else
+ for (var h = 0; h < stack.length; h++) {
+ var _is_sorder = false;
+ for (var t = 0; t < stack.length; t++) {
+ if (stack[t]._sorder == h) {
+ _is_sorder = true;
+ break;
+ }
+ }
+ if (!_is_sorder) {
+ ev._sorder = h;
+ break;
+ }
+ }
+ ev._inner = true;
+ }
+ else {
+ var _max_sorder = stack[0]._sorder;
+ for (var w = 1; w < stack.length; w++)
+ if (stack[w]._sorder > _max_sorder)
+ _max_sorder = stack[w]._sorder;
+ ev._sorder = _max_sorder + 1;
+ ev._inner = false;
+ }
+ }
+ else
+ ev._sorder = 0;
+ }
+
+ stack.push(ev);
+
+ if (stack.length>(stack.max_count||0)) {
+ stack.max_count=stack.length;
+ ev._count=stack.length;
+ }
+ else {
+ ev._count=(ev._count)?ev._count:1;
+ }
+ }
+ // fix _count for every event
+ for (var m=0; m < evs.length; m++) {
+ evs[m]._count = stack.max_count;
+ }
+ // render events
+ for (var v=0; v<evs_length; v++) {
+ html+=scheduler.render_timeline_event.call(this, evs[v], false);
+ }
+ }
+ return html;
+}
+
+
+function y_scale(d) {
+ var html = "<table style='table-layout:fixed;' cellspacing='0' cellpadding='0'>";
+ var evs=[];
+ if(scheduler._load_mode)
+ scheduler._load();
+ if (this.render == "cell")
+ evs = trace_events.call(this);
+ else {
+ var tevs = scheduler.get_visible_events();
+ var order = this.order;
+
+ for (var j = 0; j < tevs.length; j++) {
+ var tev = tevs[j];
+ var tev_section = tev[this.y_property];
+ var index = this.order[ tev_section ];
+
+ if (this.show_unassigned && !tev_section) {
+ for (var key in order) {
+ if (order.hasOwnProperty(key)) {
+ index = order[key];
+ if (!evs[index]) evs[index] = [];
+ var clone = scheduler._lame_copy({}, tev);
+ clone[this.y_property] = key;
+ evs[index].push(clone);
+ }
+ }
+ } else {
+ // required as we could have index of not displayed section or "undefined"
+ if (!evs[index]) evs[index] = [];
+ evs[index].push(tev);
+ }
+ }
+ }
+
+ var summ = 0;
+ for (var i=0; i < scheduler._cols.length; i++)
+ summ+=scheduler._cols[i];
+
+ var step = new Date();
+ var realcount = scheduler._cols.length-scheduler._ignores_detected;
+ step = ((scheduler.date.add(step, this.x_step*realcount, this.x_unit)-step)-(this._start_correction + this._end_correction)*realcount)/summ;
+ this._step = step;
+ this._summ = summ;
+
+ var heights = scheduler._colsS.heights=[];
+
+ this._events_height = {};
+ this._section_height = {};
+ for (var i=0; i<this.y_unit.length; i++){
+
+ var stats = this._logic(this.render, this.y_unit[i], this); // obj with custom style
+
+ scheduler._merge(stats, {
+ height: this.dy
+ });
+
+ //autosize height, if we have a free space
+ if(this.section_autoheight) {
+ if (this.y_unit.length * stats.height < d.offsetHeight) {
+ stats.height = Math.max(stats.height, Math.floor((d.offsetHeight - 1) / this.y_unit.length));
+ }
+ this._section_height[this.y_unit[i].key] = stats.height;
+ }
+
+ scheduler._merge(stats, {
+ //section 1
+ tr_className: "",
+ style_height: "height:"+stats.height+"px;",
+ style_width: "width:"+(this.dx-1)+"px;",
+ td_className: "dhx_matrix_scell"+((scheduler.templates[this.name+"_scaley_class"](this.y_unit[i].key, this.y_unit[i].label, this.y_unit[i]))?" "+scheduler.templates[this.name+"_scaley_class"](this.y_unit[i].key, this.y_unit[i].label, this.y_unit[i]):''),
+ td_content: scheduler.templates[this.name+'_scale_label'](this.y_unit[i].key, this.y_unit[i].label, this.y_unit[i]),
+ //section 2
+ summ_width: "width:"+summ+"px;",
+ //section 3
+ table_className: ''
+ });
+
+ // generating events html in a temporary file, calculating their height
+ var events_html = get_events_html.call(this, evs[i]);
+
+ if(this.fit_events){
+ var rendered_height = this._events_height[this.y_unit[i].key]||0;
+ stats.height = (rendered_height>stats.height)?rendered_height:stats.height;
+ stats.style_height = "height:"+stats.height+"px;";
+ this._section_height[this.y_unit[i].key] = stats.height;
+ }
+
+ // section 1
+ html+="<tr class='"+stats.tr_className+"' style='"+stats.style_height+"'><td class='"+stats.td_className+"' style='"+stats.style_width+" height:"+(stats.height-1)+"px;'>"+stats.td_content+"</td>";
+
+ if (this.render == "cell"){
+ for (var j=0; j < scheduler._cols.length; j++) {
+ if (scheduler._ignores[j])
+ html+="<td></td>";
+ else
+ html+="<td class='dhx_matrix_cell "+scheduler.templates[this.name+"_cell_class"](evs[i][j],this._trace_x[j],this.y_unit[i])+"' style='width:"+(scheduler._cols[j]-1)+"px'><div style='width:"+(scheduler._cols[j]-1)+"px'>"+scheduler.templates[this.name+"_cell_value"](evs[i][j])+"</div></td>";
+ }
+ } else {
+ //section 2
+ html+="<td><div style='"+stats.summ_width+" "+stats.style_height+" position:relative;' class='dhx_matrix_line'>";
+
+ // adding events
+ html += events_html;
+
+ //section 3
+ html+="<table class='"+stats.table_className+"' cellpadding='0' cellspacing='0' style='"+stats.summ_width+" "+stats.style_height+"' >";
+ for (var j=0; j < scheduler._cols.length; j++){
+ if (scheduler._ignores[j])
+ html+="<td></td>";
+ else
+ html+="<td class='dhx_matrix_cell "+scheduler.templates[this.name+"_cell_class"](evs[i],this._trace_x[j],this.y_unit[i])+"' style='width:"+(scheduler._cols[j]-1)+"px'><div style='width:"+(scheduler._cols[j]-1)+"px'></div></td>";
+ }
+ html+="</table>";
+ html+="</div></td>";
+ }
+ html+="</tr>";
+ }
+ html += "</table>";
+ this._matrix = evs;
+ //d.scrollTop = 0; //fix flickering in FF; disabled as it was impossible to create dnd event if scroll was used (window jumped to the top)
+ d.innerHTML = html;
+
+ scheduler._rendered = [];
+ var divs = scheduler._obj.getElementsByTagName("DIV");
+ for (var i=0; i < divs.length; i++)
+ if (divs[i].getAttribute("event_id"))
+ scheduler._rendered.push(divs[i]);
+
+ this._scales = {};
+ for (var i=0; i < d.firstChild.rows.length; i++) {
+ heights.push(d.firstChild.rows[i].offsetHeight);
+ var unit_key = this.y_unit[i].key;
+ var scale = this._scales[unit_key] = (scheduler._isRender('cell')) ? d.firstChild.rows[i] : d.firstChild.rows[i].childNodes[1].getElementsByTagName('div')[0];
+ scheduler.callEvent("onScaleAdd", [scale, unit_key]);
+ }
+}
+function x_scale(h){
+ var current_sh = scheduler.xy.scale_height;
+ var original_sh = this._header_resized||scheduler.xy.scale_height;
+ scheduler._cols=[]; //store for data section, each column width
+ scheduler._colsS={height:0}; // heights of the y sections
+ this._trace_x =[]; // list of dates per cells
+ var summ = scheduler._x - this.dx - scheduler.xy.scroll_width; //border delta, whole width
+ var left = [this.dx]; // left margins, initial left margin
+ var header = scheduler._els['dhx_cal_header'][0];
+ header.style.width = (left[0]+summ)+'px';
+
+ scheduler._min_date_timeline = scheduler._min_date;
+
+ var preserve = scheduler.config.preserve_scale_length;
+ var start = scheduler._min_date;
+ scheduler._process_ignores(start, this.x_size, this.x_unit, this.x_step, preserve);
+
+ var size = this.x_size + (preserve ? scheduler._ignores_detected : 0);
+ if (size != this.x_size)
+ scheduler._max_date = scheduler.date.add(scheduler._min_date, size*this.x_step, this.x_unit);
+
+ var realcount = size - scheduler._ignores_detected;
+ for (var k=0; k<size; k++){
+ // dates calculation
+ this._trace_x[k]=new Date(start);
+ start = scheduler.date.add(start, this.x_step, this.x_unit);
+
+ // position calculation
+ if (scheduler._ignores[k]){
+ scheduler._cols[k]=0;
+ realcount++;
+ } else {
+ scheduler._cols[k]=Math.floor(summ/(realcount-k));
+ }
+
+ summ -= scheduler._cols[k];
+ left[k+1] = left[k] + scheduler._cols[k];
+ }
+ h.innerHTML = "<div></div>";
+
+ if(this.second_scale){
+ // additional calculations
+ var mode = this.second_scale.x_unit;
+ var control_dates = [this._trace_x[0]]; // first control date
+ var second_cols = []; // each column width of the secondary row
+ var second_left = [this.dx, this.dx]; // left margins of the secondary row
+ var t_index = 0; // temp index
+ for (var l = 0; l < this._trace_x.length; l++) {
+ var date = this._trace_x[l];
+ var res = is_new_interval(mode, date, control_dates[t_index]);
+
+ if(res) { // new interval
+ ++t_index; // starting new interval
+ control_dates[t_index] = date; // updating control date as we moved to the new interval
+ second_left[t_index+1] = second_left[t_index];
+ }
+ var t = t_index+1;
+ second_cols[t_index] = scheduler._cols[l] + (second_cols[t_index]||0);
+ second_left[t] += scheduler._cols[l];
+ }
+
+ h.innerHTML = "<div></div><div></div>";
+ var top = h.firstChild;
+ top.style.height = (original_sh)+'px'; // actually bottom header takes 21px
+ var bottom = h.lastChild;
+ bottom.style.position = "relative";
+
+ for (var m = 0; m < control_dates.length; m++) {
+ var tdate = control_dates[m];
+ var scs = scheduler.templates[this.name+"_second_scalex_class"](tdate);
+ var head=document.createElement("DIV"); head.className="dhx_scale_bar dhx_second_scale_bar"+((scs)?(" "+scs):"");
+ scheduler.set_xy(head,second_cols[m]-1,original_sh-3,second_left[m],0); //-1 for border, -3 = -2 padding -1 border bottom
+ head.innerHTML = scheduler.templates[this.name+"_second_scale_date"](tdate);
+ top.appendChild(head);
+ }
+ }
+
+ scheduler.xy.scale_height = original_sh; // fix for _render_x_header which uses current scale_height value
+ h = h.lastChild; // h - original scale
+ for (var i=0; i<this._trace_x.length; i++){
+ if (scheduler._ignores[i])
+ continue;
+
+ start = this._trace_x[i];
+ scheduler._render_x_header(i, left[i], start, h);
+ var cs = scheduler.templates[this.name+"_scalex_class"](start);
+ if (cs)
+ h.lastChild.className += " "+cs;
+ }
+ scheduler.xy.scale_height = current_sh; // restoring current value
+
+ var trace = this._trace_x;
+ h.onclick = function(e){
+ var pos = locate_hcell(e);
+ if (pos)
+ scheduler.callEvent("onXScaleClick",[pos.x, trace[pos.x], e||event]);
+ };
+ h.ondblclick = function(e){
+ var pos = locate_hcell(e);
+ if (pos)
+ scheduler.callEvent("onXScaleDblClick",[pos.x, trace[pos.x], e||event]);
+ };
+}
+function is_new_interval(mode, date, control_date){ // mode, date to check, control_date for which period should be checked
+ switch(mode) {
+ case "hour":
+ return ((date.getHours() != control_date.getHours()) || is_new_interval("day", date, control_date));
+ case "day":
+ return !(date.getDate() == control_date.getDate() && date.getMonth() == control_date.getMonth() && date.getFullYear() == control_date.getFullYear());
+ case "week":
+ return !(scheduler.date.getISOWeek(date) == scheduler.date.getISOWeek(control_date) && date.getFullYear() == control_date.getFullYear());
+ case "month":
+ return !(date.getMonth() == control_date.getMonth() && date.getFullYear() == control_date.getFullYear());
+ case "year":
+ return !(date.getFullYear() == control_date.getFullYear());
+ default:
+ return false; // same interval
+ }
+}
+function set_full_view(mode){
+ if (mode){
+ scheduler.set_sizes();
+ _init_matrix_tooltip()
+
+ //we need to have day-rounded scales for navigation
+ //in same time, during rendering scales may be shifted
+ var temp = scheduler._min_date;
+ x_scale.call(this,scheduler._els["dhx_cal_header"][0]);
+ y_scale.call(this,scheduler._els["dhx_cal_data"][0]);
+ scheduler._min_date = temp;
+ scheduler._els["dhx_cal_date"][0].innerHTML=scheduler.templates[this.name+"_date"](scheduler._min_date, scheduler._max_date);
+ if (scheduler._mark_now) {
+ scheduler._mark_now();
+ }
+ }
+
+ // hide tooltip if it is displayed
+ hideToolTip();
+}
+
+
+function hideToolTip(){
+ if (scheduler._tooltip){
+ scheduler._tooltip.style.display = "none";
+ scheduler._tooltip.date = "";
+ }
+}
+function showToolTip(obj,pos,offset){
+ if (obj.render != "cell") return;
+ var mark = pos.x+"_"+pos.y;
+ var evs = obj._matrix[pos.y][pos.x];
+
+ if (!evs) return hideToolTip();
+
+ evs.sort(function(a,b){ return a.start_date>b.start_date?1:-1; });
+
+ if (scheduler._tooltip){
+ if (scheduler._tooltip.date == mark) return;
+ scheduler._tooltip.innerHTML="";
+ } else {
+ var t = scheduler._tooltip = document.createElement("DIV");
+ t.className = "dhx_year_tooltip";
+ document.body.appendChild(t);
+ t.onclick = scheduler._click.dhx_cal_data;
+ }
+
+ var html = "";
+
+ for (var i=0; i<evs.length; i++){
+ var bg_color = (evs[i].color?("background-color:"+evs[i].color+";"):"");
+ var color = (evs[i].textColor?("color:"+evs[i].textColor+";"):"");
+ html+="<div class='dhx_tooltip_line' event_id='"+evs[i].id+"' style='"+bg_color+""+color+"'>";
+ html+="<div class='dhx_tooltip_date'>"+(evs[i]._timed?scheduler.templates.event_date(evs[i].start_date):"")+"</div>";
+ html+="<div class='dhx_event_icon icon_details'>&nbsp;</div>";
+ html+=scheduler.templates[obj.name+"_tooltip"](evs[i].start_date, evs[i].end_date,evs[i])+"</div>";
+ }
+
+ scheduler._tooltip.style.display="";
+ scheduler._tooltip.style.top = "0px";
+
+ if (document.body.offsetWidth-offset.left-scheduler._tooltip.offsetWidth < 0)
+ scheduler._tooltip.style.left = offset.left-scheduler._tooltip.offsetWidth+"px";
+ else
+ scheduler._tooltip.style.left = offset.left+pos.src.offsetWidth+"px";
+
+ scheduler._tooltip.date = mark;
+ scheduler._tooltip.innerHTML = html;
+
+ if (document.body.offsetHeight-offset.top-scheduler._tooltip.offsetHeight < 0)
+ scheduler._tooltip.style.top= offset.top-scheduler._tooltip.offsetHeight+pos.src.offsetHeight+"px";
+ else
+ scheduler._tooltip.style.top= offset.top+"px";
+}
+
+function _init_matrix_tooltip() {
+ dhtmlxEvent(scheduler._els["dhx_cal_data"][0], "mouseover", function(e){
+ var obj = scheduler.matrix[scheduler._mode];
+ if (!obj || obj.render != "cell")
+ return;
+ if (obj){
+ var pos = scheduler._locate_cell_timeline(e);
+ var e = e || event;
+ var src = e.target||e.srcElement;
+ if (pos)
+ return showToolTip(obj,pos,getOffset(pos.src));
+ }
+ hideToolTip();
+ });
+ _init_matrix_tooltip=function(){};
+}
+
+scheduler._renderMatrix = function(mode, refresh) {
+ if (!refresh)
+ scheduler._els['dhx_cal_data'][0].scrollTop=0;
+
+ scheduler._min_date = scheduler.date[this.name+"_start"](scheduler._date);
+ scheduler._max_date = scheduler.date.add(scheduler._min_date, this.x_size*this.x_step, this.x_unit);
+ scheduler._table_view = true;
+ if (this.second_scale) {
+ if (mode && !this._header_resized) {
+ this._header_resized = scheduler.xy.scale_height;
+ scheduler.xy.scale_height *= 2;
+ scheduler._els['dhx_cal_header'][0].className += " dhx_second_cal_header";
+ }
+ if (!mode && this._header_resized) {
+ scheduler.xy.scale_height /= 2;
+ this._header_resized = false;
+ var header = scheduler._els['dhx_cal_header'][0];
+ header.className = header.className.replace(/ dhx_second_cal_header/gi,"");
+ }
+ }
+ set_full_view.call(this,mode);
+};
+
+function html_index(el) {
+ var p = el.parentNode.childNodes;
+ for (var i=0; i < p.length; i++)
+ if (p[i] == el) return i;
+ return -1;
+}
+function locate_hcell(e){
+ e = e||event;
+ var trg = e.target?e.target:e.srcElement;
+ while (trg && trg.tagName != "DIV")
+ trg=trg.parentNode;
+ if (trg && trg.tagName == "DIV"){
+ var cs = trg.className.split(" ")[0];
+ if (cs == "dhx_scale_bar")
+ return { x:html_index(trg), y:-1, src:trg, scale:true };
+ }
+}
+scheduler._locate_cell_timeline = function(e){
+ e = e||event;
+ var trg = e.target?e.target:e.srcElement;
+
+ var res = {};
+ var view = scheduler.matrix[scheduler._mode];
+ var pos = scheduler.getActionData(e);
+
+ for (var xind = 0; xind < view._trace_x.length-1; xind++) {
+ // | 8:00, 8:30 | 8:15 should be checked against 8:30
+ // clicking at the most left part of the cell, say 8:30 should create event in that cell, not previous one
+ if (+pos.date < view._trace_x[xind+1])
+ break;
+ }
+
+ res.x = xind;
+ res.y = view.order[pos.section];
+ var diff = scheduler._isRender('cell') ? 1 : 0;
+ res.src = view._scales[pos.section] ? view._scales[pos.section].getElementsByTagName('td')[xind+diff] : null;
+
+ var isScale = false;
+ while (res.x == 0 && trg.className != "dhx_cal_data" && trg.parentNode) {
+ if (trg.className.split(" ")[0] == "dhx_matrix_scell") {
+ isScale = true;
+ break;
+ } else {
+ trg = trg.parentNode;
+ }
+ }
+ if (isScale) { // Y scale
+ res.x = -1;
+ res.src = trg;
+ res.scale = true;
+ }
+
+ return res;
+};
+
+var old_click = scheduler._click.dhx_cal_data;
+scheduler._click.dhx_marked_timespan = scheduler._click.dhx_cal_data = function(e){
+ var ret = old_click.apply(this,arguments);
+ var obj = scheduler.matrix[scheduler._mode];
+ if (obj){
+ var pos = scheduler._locate_cell_timeline(e);
+ if (pos){
+ if (pos.scale)
+ scheduler.callEvent("onYScaleClick",[pos.y, obj.y_unit[pos.y], e||event]);
+ else
+ scheduler.callEvent("onCellClick",[pos.x, pos.y, obj._trace_x[pos.x], (((obj._matrix[pos.y]||{})[pos.x])||[]), e||event]);
+ }
+ }
+ return ret;
+};
+
+scheduler.dblclick_dhx_marked_timespan = scheduler.dblclick_dhx_matrix_cell = function(e){
+ var obj = scheduler.matrix[scheduler._mode];
+ if (obj){
+ var pos = scheduler._locate_cell_timeline(e);
+ if (pos){
+ if (pos.scale)
+ scheduler.callEvent("onYScaleDblClick",[pos.y, obj.y_unit[pos.y], e||event]);
+ else
+ scheduler.callEvent("onCellDblClick",[pos.x, pos.y, obj._trace_x[pos.x], (((obj._matrix[pos.y]||{})[pos.x])||[]), e||event]);
+ }
+ }
+};
+scheduler.dblclick_dhx_matrix_scell = function(e){
+ return scheduler.dblclick_dhx_matrix_cell(e);
+};
+
+scheduler._isRender = function(mode){
+ return (scheduler.matrix[scheduler._mode] && scheduler.matrix[scheduler._mode].render == mode);
+};
+
+scheduler.attachEvent("onCellDblClick", function (x, y, a, b, event){
+ if (this.config.readonly|| (event.type == "dblclick" && !this.config.dblclick_create)) return;
+
+ var obj = scheduler.matrix[scheduler._mode];
+ var event_options = {};
+ event_options.start_date = obj._trace_x[x];
+ event_options.end_date = (obj._trace_x[x+1]) ? obj._trace_x[x+1] : scheduler.date.add(obj._trace_x[x], obj.x_step, obj.x_unit);
+
+ if (obj._start_correction)
+ event_options.start_date = new Date(event_options.start_date*1 + obj._start_correction);
+ if (obj._end_correction)
+ event_options.end_date = new Date(event_options.end_date - obj._end_correction);
+
+ event_options[obj.y_property] = obj.y_unit[y].key;
+ scheduler.addEventNow(event_options, null, event);
+});
+
+scheduler.attachEvent("onBeforeDrag", function (event_id, mode, native_event_object){
+ return !scheduler._isRender("cell");
+});
+scheduler.attachEvent("onEventChanged", function(id, ev) {
+ ev._timed = this.isOneDayEvent(ev);
+});
+var old_render_marked_timespan = scheduler._render_marked_timespan;
+scheduler._render_marked_timespan = function(options, area, unit_id, min_date, max_date) {
+ if (!scheduler.config.display_marked_timespans)
+ return [];
+
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ if (scheduler._isRender('cell'))
+ return;
+
+ var view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);
+ //timespans must always use actual position, not rounded
+ view_opts.round_position = false;
+ var blocks = [];
+
+ var units = [];
+ var areas = [];
+ if (!unit_id) { // should draw for every unit
+ var order = view_opts.order;
+ for (var key in order) {
+ if (order.hasOwnProperty(key)) {
+ units.push(key);
+ areas.push(view_opts._scales[key]);
+ }
+ }
+ } else {
+ areas = [area];
+ units = [unit_id]
+ }
+
+ var min_date = min_date ? new Date(min_date) : scheduler._min_date;
+ var max_date = max_date ? new Date(max_date) : scheduler._max_date;
+ var dates = [];
+
+ if (options.days > 6) {
+ var specific_date = new Date(options.days);
+ if (scheduler.date.date_part(new Date(min_date)) <= +specific_date && +max_date >= +specific_date)
+ dates.push(specific_date);
+ } else {
+ dates.push.apply(dates, scheduler._get_dates_by_index(options.days));
+ }
+
+ var zones = options.zones;
+ var css_classes = scheduler._get_css_classes_by_config(options);
+
+ for (var j=0; j<units.length; j++) {
+ area = areas[j];
+ unit_id = units[j];
+
+ for (var i=0; i<dates.length; i++) {
+ var date = dates[i];
+ for (var k=0; k<zones.length; k += 2) {
+ var zone_start = zones[k];
+ var zone_end = zones[k+1];
+ var start_date = new Date(+date + zone_start*60*1000);
+ var end_date = new Date(+date + zone_end*60*1000);
+
+ if (!(min_date < end_date && max_date > start_date))
+ continue;
+
+ var block = scheduler._get_block_by_config(options);
+ block.className = css_classes;
+
+ var start_pos = _getX({start_date: start_date}, false, view_opts)-1;
+ var end_pos = _getX({start_date: end_date}, false, view_opts)-1;
+ var width = Math.max(1, end_pos - start_pos - 1);
+ var height = view_opts._section_height[unit_id]-1;
+
+ block.style.cssText = "height: "+height+"px; left: "+start_pos+"px; width: "+width+"px; top: 0;";
+
+ area.insertBefore(block, area.firstChild);
+ blocks.push(block);
+ }
+ }
+ }
+
+ return blocks;
+
+ } else {
+ return old_render_marked_timespan.apply(scheduler, [options, area, unit_id]);
+ }
+};
+
+var old_append_mark_now = scheduler._append_mark_now;
+scheduler._append_mark_now = function(day_index, now) {
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ var n_date = scheduler._currentDate();
+ var zone_start = scheduler._get_zone_minutes(n_date);
+ var options = {
+ days: +scheduler.date.date_part(n_date),
+ zones: [zone_start, zone_start+1],
+ css: "dhx_matrix_now_time",
+ type: "dhx_now_time"
+ };
+ return scheduler._render_marked_timespan(options);
+ } else {
+ return old_append_mark_now.apply(scheduler, [day_index, now]);
+ }
+};
+
+scheduler.attachEvent("onScaleAdd", function(scale, unit_key) {
+ var timespans = scheduler._marked_timespans;
+
+ if (timespans && scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ var mode = scheduler._mode;
+
+ var min_date = scheduler._min_date;
+ var max_date = scheduler._max_date;
+ var global_data = timespans["global"];
+
+ for (var t_date = scheduler.date.date_part(new Date(min_date)); t_date < max_date; t_date = scheduler.date.add(t_date, 1, "day")) {
+ var day_value = +t_date;
+ var day_index = t_date.getDay();
+ var r_configs = [];
+
+ var day_types = global_data[day_value]||global_data[day_index];
+ r_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));
+
+ if (timespans[mode] && timespans[mode][unit_key]) {
+ var z_config = [];
+ var unit_types = scheduler._get_types_to_render(timespans[mode][unit_key][day_index], timespans[mode][unit_key][day_value]);
+ z_config.push.apply(z_config, scheduler._get_configs_to_render(unit_types));
+ if(z_config.length)
+ r_configs = z_config;
+ }
+
+ for (var i=0; i<r_configs.length; i++) {
+ var config = r_configs[i];
+ var day = config.days;
+ if (day < 7) {
+ day = day_value;
+ //specify min/max timespan dates, otherwise it can be rendered multiple times in some configurations
+ scheduler._render_marked_timespan(config, scale, unit_key, t_date, scheduler.date.add(t_date, 1, "day"));
+ day = day_index;
+ } else {
+ scheduler._render_marked_timespan(config, scale, unit_key, t_date, scheduler.date.add(t_date, 1, "day"));
+ }
+ }
+ }
+ }
+});
+
+scheduler._get_date_index=function(config, date) {
+ var index = 0;
+ var trace_x = config._trace_x;
+ while (index < trace_x.length-1 && +date >= +trace_x[index+1]) {
+ index++;
+ }
+ return index;
+};
+
+})();
diff --git a/sources/ext/dhtmlxscheduler_tooltip.js b/sources/ext/dhtmlxscheduler_tooltip.js
new file mode 100644
index 0000000..318139c
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_tooltip.js
@@ -0,0 +1,193 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+window.dhtmlXTooltip = scheduler.dhtmlXTooltip = window.dhtmlxTooltip = {};
+
+dhtmlXTooltip.config = {
+ className: 'dhtmlXTooltip tooltip',
+ timeout_to_display: 50,
+ timeout_to_hide: 50,
+ delta_x: 15,
+ delta_y: -20
+};
+
+dhtmlXTooltip.tooltip = document.createElement('div');
+dhtmlXTooltip.tooltip.className = dhtmlXTooltip.config.className;
+
+dhtmlXTooltip.show = function(event, text) { //browser event, text to display
+ if (scheduler.config.touch && !scheduler.config.touch_tooltip) return;
+
+ var dhxTooltip = dhtmlXTooltip;
+ var tooltip_div = this.tooltip;
+ var tooltip_div_style = tooltip_div.style;
+ dhxTooltip.tooltip.className = dhxTooltip.config.className;
+ var pos = this.position(event);
+
+ var target = event.target || event.srcElement;
+ // if we are over tooltip -- do nothing, just return (so tooltip won't move)
+ if (this.isTooltip(target)) {
+ return;
+ }
+
+ var actual_x = pos.x + (dhxTooltip.config.delta_x || 0);
+ var actual_y = pos.y - (dhxTooltip.config.delta_y || 0);
+
+ tooltip_div_style.visibility = "hidden";
+
+ if (tooltip_div_style.removeAttribute) {
+ tooltip_div_style.removeAttribute("right");
+ tooltip_div_style.removeAttribute("bottom");
+ } else {
+ tooltip_div_style.removeProperty("right");
+ tooltip_div_style.removeProperty("bottom");
+ }
+
+ tooltip_div_style.left = "0";
+ tooltip_div_style.top = "0";
+
+ this.tooltip.innerHTML = text;
+ document.body.appendChild(this.tooltip);
+
+ var tooltip_width = this.tooltip.offsetWidth;
+ var tooltip_height = this.tooltip.offsetHeight;
+
+ if ((document.body.offsetWidth - actual_x - tooltip_width) < 0) { // tooltip is out of the right page bound
+ if(tooltip_div_style.removeAttribute)
+ tooltip_div_style.removeAttribute("left");
+ else
+ tooltip_div_style.removeProperty("left");
+ tooltip_div_style.right = (document.body.offsetWidth - actual_x + 2 * (dhxTooltip.config.delta_x||0)) + "px";
+ } else {
+ if (actual_x < 0) {
+ // tooltips is out of the left page bound
+ tooltip_div_style.left = (pos.x + Math.abs(dhxTooltip.config.delta_x||0)) + "px";
+ } else {
+ // normal situation
+ tooltip_div_style.left = actual_x + "px";
+ }
+ }
+
+ if ((document.body.offsetHeight - actual_y - tooltip_height) < 0) { // tooltip is below bottom of the page
+ if(tooltip_div_style.removeAttribute)
+ tooltip_div_style.removeAttribute("top");
+ else
+ tooltip_div_style.removeProperty("top");
+ tooltip_div_style.bottom = (document.body.offsetHeight - actual_y - 2 * (dhxTooltip.config.delta_y||0)) + "px";
+ } else {
+ if (actual_y < 0) {
+ // tooltip is higher then top of the page
+ tooltip_div_style.top = (pos.y + Math.abs(dhxTooltip.config.delta_y||0)) + "px";
+ } else {
+ // normal situation
+ tooltip_div_style.top = actual_y + "px";
+ }
+ }
+
+ tooltip_div_style.visibility = "visible";
+
+ scheduler.callEvent("onTooltipDisplayed", [this.tooltip, this.tooltip.event_id]);
+};
+dhtmlXTooltip._clearTimeout = function(){
+ if(this.tooltip._timeout_id) {
+ window.clearTimeout(this.tooltip._timeout_id);
+ }
+};
+
+dhtmlXTooltip.hide = function() {
+ if (this.tooltip.parentNode) {
+ var event_id = this.tooltip.event_id;
+ this.tooltip.event_id = null;
+ this.tooltip.parentNode.removeChild(this.tooltip);
+ scheduler.callEvent("onAfterTooltip", [event_id]);
+ }
+ this._clearTimeout();
+};
+dhtmlXTooltip.delay = function(method, object, params, delay) {
+ this._clearTimeout();
+ this.tooltip._timeout_id = setTimeout(function() {
+ var ret = method.apply(object, params);
+ method = object = params = null;
+ return ret;
+ }, delay || this.config.timeout_to_display);
+};
+
+dhtmlXTooltip.isTooltip = function(node) {
+ var res = false;
+ if (node.className.split(" ")[0] == "dhtmlXTooltip") {
+ //debugger;
+ }
+ while (node && !res) {
+ res = (node.className == this.tooltip.className);
+ node = node.parentNode;
+ }
+ return res;
+};
+
+dhtmlXTooltip.position = function(ev) {
+ ev = ev || window.event;
+ if (ev.pageX || ev.pageY) //FF, KHTML
+ return {x:ev.pageX, y:ev.pageY};
+ //IE
+ var d = ((window._isIE) && (document.compatMode != "BackCompat")) ? document.documentElement : document.body;
+ return {
+ x:ev.clientX + d.scrollLeft - d.clientLeft,
+ y:ev.clientY + d.scrollTop - d.clientTop
+ };
+};
+
+scheduler.attachEvent("onMouseMove", function(event_id, e) { // (scheduler event_id, browser event)
+ var ev = window.event || e;
+ var target = ev.target || ev.srcElement;
+ var dhxTooltip = dhtmlXTooltip;
+
+ var is_tooltip = dhxTooltip.isTooltip(target);
+ var is_tooltip_target = (dhxTooltip.isTooltipTarget && dhxTooltip.isTooltipTarget(target));
+
+ // if we are over event or tooltip or custom target for tooltip
+ if (event_id || is_tooltip || is_tooltip_target) {
+ var text;
+
+ if (event_id || dhxTooltip.tooltip.event_id) {
+ var event = scheduler.getEvent(event_id) || scheduler.getEvent(dhxTooltip.tooltip.event_id);
+ if (!event)
+ return;
+
+ dhxTooltip.tooltip.event_id = event.id;
+ text = scheduler.templates.tooltip_text(event.start_date, event.end_date, event);
+ if (!text)
+ return dhxTooltip.hide();
+ }
+ if (is_tooltip_target) {
+ text = "";
+ }
+
+ var evt = undefined;
+ if (_isIE) {
+ //make a copy of event, will be used in timed call
+ evt = document.createEventObject(ev);
+ }
+
+ if (!scheduler.callEvent("onBeforeTooltip", [event_id]) || !text)
+ return;
+
+ dhxTooltip.delay(dhxTooltip.show, dhxTooltip, [(evt || ev), text]); // showing tooltip
+ } else {
+ dhxTooltip.delay(dhxTooltip.hide, dhxTooltip, [], dhxTooltip.config.timeout_to_hide);
+ }
+});
+scheduler.attachEvent("onBeforeDrag", function() {
+ dhtmlXTooltip.hide();
+ return true;
+});
+scheduler.attachEvent("onEventDeleted", function() {
+ dhtmlXTooltip.hide();
+ return true;
+});
+
+/* Could be redifined */
+scheduler.templates.tooltip_date_format = scheduler.date.date_to_str("%Y-%m-%d %H:%i");
+
+scheduler.templates.tooltip_text = function(start, end, event) {
+ return "<b>Event:</b> " + event.text + "<br/><b>Start date:</b> " + scheduler.templates.tooltip_date_format(start) + "<br/><b>End date:</b> " + scheduler.templates.tooltip_date_format(end);
+};
diff --git a/sources/ext/dhtmlxscheduler_treetimeline.js b/sources/ext/dhtmlxscheduler_treetimeline.js
new file mode 100644
index 0000000..51970a3
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_treetimeline.js
@@ -0,0 +1,302 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTimelineCreated", function (obj){
+
+ if(obj.render == "tree") {
+ obj.y_unit_original = obj.y_unit;
+ obj.y_unit = scheduler._getArrayToDisplay(obj.y_unit_original);
+
+ scheduler.attachEvent('onOptionsLoadStart', function(){
+ obj.y_unit = scheduler._getArrayToDisplay(obj.y_unit_original);
+ });
+
+ scheduler.form_blocks[obj.name]={
+ render:function(sns) {
+ var _result = "<div class='dhx_section_timeline' style='overflow: hidden; height: "+sns.height+"px'></div>";
+ return _result;
+ },
+ set_value:function(node,value,ev,config){
+ var options = scheduler._getArrayForSelect(scheduler.matrix[config.type].y_unit_original, config.type);
+ node.innerHTML = '';
+ var temp_select = document.createElement('select');
+ node.appendChild(temp_select);
+
+ var select = node.getElementsByTagName('select')[0];
+
+ if (!select._dhx_onchange && config.onchange) {
+ select.onchange = config.onchange;
+ select._dhx_onchange = true;
+ }
+
+ for (var i = 0; i < options.length; i++) {
+ var temp_option = document.createElement('option');
+ temp_option.value = options[i].key;
+ if(temp_option.value == ev[scheduler.matrix[config.type].y_property])
+ temp_option.selected = true;
+ temp_option.innerHTML = options[i].label;
+ select.appendChild(temp_option);
+ }
+ },
+ get_value:function(node,ev,config){
+ return node.firstChild.value;
+ },
+ focus:function(node){
+ }
+ };
+
+
+ }
+});
+
+scheduler.attachEvent("onBeforeSectionRender", function (render_name, y_unit, timeline){
+ var res = {};
+ if(render_name == "tree"){
+ var height;
+ // section 1
+ var tr_className, style_height, td_className;
+ var div_expand;
+ // section 3
+ var table_className;
+ if(y_unit.children) {
+ height = timeline.folder_dy||timeline.dy;
+ if(timeline.folder_dy && !timeline.section_autoheight) {
+ style_height = "height:"+timeline.folder_dy+"px;";
+ }
+ tr_className = "dhx_row_folder";
+ td_className = "dhx_matrix_scell folder";
+ div_expand = "<div class='dhx_scell_expand'>"+((y_unit.open)?'-':'+')+"</div>";
+ table_className = (timeline.folder_events_available)?"dhx_data_table folder_events":"dhx_data_table folder";
+ } else {
+ height = timeline.dy;
+ tr_className = "dhx_row_item";
+ td_className = "dhx_matrix_scell item";
+ div_expand = '';
+ table_className = "dhx_data_table";
+ }
+ var td_content = "<div class='dhx_scell_level"+y_unit.level+"'>"+div_expand+"<div class='dhx_scell_name'>"+(scheduler.templates[timeline.name+'_scale_label'](y_unit.key, y_unit.label, y_unit)||y_unit.label)+"</div></div>";
+
+ res = {
+ height: height,
+ style_height: style_height,
+ //section 1
+ tr_className: tr_className,
+ td_className: td_className,
+ td_content: td_content,
+ //section 3
+ table_className: table_className
+ };
+ };
+ return res;
+});
+
+var section_id_before; // section id of the event before dragging (to bring it back if user drop's event on folder without folder_events_available)
+
+scheduler.attachEvent("onBeforeEventChanged", function(event_object, native_event, is_new) {
+ if (scheduler._isRender("tree")) { // if mode's render == tree
+ var section = scheduler.getSection(event_object[scheduler.matrix[scheduler._mode].y_property]);
+ if (section && typeof section.children != 'undefined' && !scheduler.matrix[scheduler._mode].folder_events_available) { // section itself could be not defined in case of new event (addEventNow)
+ if (!is_new) { //if old - move back
+ event_object[scheduler.matrix[scheduler._mode].y_property] = section_id_before;
+ }
+ return false;
+ }
+ }
+ return true;
+});
+
+scheduler.attachEvent("onBeforeDrag", function (event_id, mode, native_event_object){
+ if(scheduler._isRender("tree")) {
+ var cell = scheduler._locate_cell_timeline(native_event_object);
+ if(cell) {
+ var section_id = scheduler.matrix[scheduler._mode].y_unit[cell.y].key;
+ if(typeof scheduler.matrix[scheduler._mode].y_unit[cell.y].children != "undefined" && !scheduler.matrix[scheduler._mode].folder_events_available) {
+ return false;
+ }
+ }
+
+ var ev = scheduler.getEvent(event_id);
+ section_id_before = section_id||ev[scheduler.matrix[scheduler._mode].y_property]; // either event id or section_id will be available
+ }
+ return true;
+});
+
+scheduler._getArrayToDisplay = function(array){ // function to flatten out hierarhical array, used for tree view
+ var result = [];
+ var fillResultArray = function(array, lvl){
+ var level = lvl||0;
+ for(var i=0; i<array.length; i++) {
+ array[i].level = level;
+ if(typeof array[i].children != "undefined" && typeof array[i].key == "undefined")
+ array[i].key=scheduler.uid();
+ result.push(array[i]);
+ if(array[i].open && array[i].children) {
+ fillResultArray(array[i].children, level+1);
+ }
+ }
+ };
+ fillResultArray(array);
+ return result;
+};
+
+
+scheduler._getArrayForSelect = function(array, mode){ // function to flatten out hierarhical array, used for tree view
+ var result = [];
+ var fillResultArray = function(array){
+ for(var i=0; i<array.length; i++) {
+ if(scheduler.matrix[mode].folder_events_available) {
+ result.push(array[i]);
+ }
+ else {
+ if(typeof array[i].children == "undefined") {
+ result.push(array[i]);
+ }
+ }
+ if(array[i].children)
+ fillResultArray(array[i].children, mode);
+ }
+ };
+ fillResultArray(array);
+ return result;
+};
+
+
+/*
+scheduler._toggleFolderDisplay(4) -- toggle display of the section with key 4 (closed -> open)
+scheduler._toggleFolderDisplay(4, true) -- open section with the key 4 (doesn't matter what status was before). False - close.
+scheduler._toggleFolderDisplay(4, false, true) -- close ALL sections. Key is not used in such condition.
+*/
+scheduler._toggleFolderDisplay = function(key, status, all_sections){ // used for tree view
+ var marked;
+ var toggleElement = function(key, array, status, all_sections) {
+ for (var i=0; i<array.length; i++) {
+ if((array[i].key == key || all_sections) && array[i].children) {
+ array[i].open = (typeof status != "undefined") ? status : !array[i].open;
+ marked = true;
+ if(!all_sections && marked)
+ break;
+ }
+ if(array[i].children) {
+ toggleElement(key,array[i].children, status, all_sections);
+ }
+ }
+ };
+ var section = scheduler.getSection(key);
+ if (scheduler.callEvent("onBeforeFolderToggle", [section, status, all_sections])) {
+ toggleElement(key,scheduler.matrix[scheduler._mode].y_unit_original, status, all_sections);
+ scheduler.matrix[scheduler._mode].y_unit = scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);
+ scheduler.callEvent("onOptionsLoad",[]);
+ scheduler.callEvent("onAfterFolderToggle", [section, status, all_sections]);
+ }
+};
+
+scheduler.attachEvent("onCellClick", function (x, y, a, b, event){
+ if(scheduler._isRender("tree")) {
+ if(!scheduler.matrix[scheduler._mode].folder_events_available) {
+ if(typeof scheduler.matrix[scheduler._mode].y_unit[y].children != "undefined") {
+ scheduler._toggleFolderDisplay(scheduler.matrix[scheduler._mode].y_unit[y].key);
+ }
+ }
+ }
+});
+
+scheduler.attachEvent("onYScaleClick", function (index, value, event){
+ if(scheduler._isRender("tree")) {
+ if(typeof value.children != "undefined") {
+ scheduler._toggleFolderDisplay(value.key);
+ }
+ }
+});
+
+scheduler.getSection = function(id){
+ if(scheduler._isRender("tree")) {
+ var obj;
+ var findElement = function(key, array) {
+ for (var i=0; i<array.length; i++) {
+ if(array[i].key == key)
+ obj = array[i];
+ if(array[i].children)
+ findElement(key,array[i].children);
+ }
+ };
+ findElement(id, scheduler.matrix[scheduler._mode].y_unit_original);
+ return obj||null;
+ }
+};
+
+scheduler.deleteSection = function(id){
+ if(scheduler._isRender("tree")) {
+ var result = false;
+ var deleteElement = function(key, array) {
+ for (var i=0; i<array.length; i++) {
+ if(array[i].key == key) {
+ array.splice(i,1);
+ result = true;
+ }
+ if(result)
+ break;
+ if(array[i].children)
+ deleteElement(key,array[i].children);
+ }
+ };
+ deleteElement(id, scheduler.matrix[scheduler._mode].y_unit_original);
+ scheduler.matrix[scheduler._mode].y_unit = scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);
+ scheduler.callEvent("onOptionsLoad",[]);
+ return result;
+ }
+};
+
+scheduler.deleteAllSections = function(){
+ if(scheduler._isRender("tree")) {
+ scheduler.matrix[scheduler._mode].y_unit_original = [];
+ scheduler.matrix[scheduler._mode].y_unit = scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);
+ scheduler.callEvent("onOptionsLoad",[]);
+ }
+};
+
+scheduler.addSection = function(obj, parent_id){
+ if(scheduler._isRender("tree")) {
+ var result = false;
+ var addElement = function(obj, parent_key, array) {
+ if(!parent_id) {
+ array.push(obj);
+ result = true;
+ }
+ else {
+ for (var i=0; i<array.length; i++) {
+ if(array[i].key == parent_key && typeof array[i].children != "undefined") {
+ array[i].children.push(obj);
+ result = true;
+ }
+ if(result)
+ break;
+ if(array[i].children)
+ addElement(obj,parent_key,array[i].children);
+ }
+ }
+ };
+ addElement(obj, parent_id, scheduler.matrix[scheduler._mode].y_unit_original);
+ scheduler.matrix[scheduler._mode].y_unit = scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);
+ scheduler.callEvent("onOptionsLoad",[]);
+ return result;
+ }
+};
+
+
+scheduler.openAllSections = function() {
+ if(scheduler._isRender("tree"))
+ scheduler._toggleFolderDisplay(1, true, true);
+};
+scheduler.closeAllSections = function() {
+ if(scheduler._isRender("tree"))
+ scheduler._toggleFolderDisplay(1, false, true);
+};
+scheduler.openSection = function(section_id){
+ if(scheduler._isRender("tree"))
+ scheduler._toggleFolderDisplay(section_id, true);
+};
+scheduler.closeSection = function(section_id){
+ if(scheduler._isRender("tree"))
+ scheduler._toggleFolderDisplay(section_id, false);
+};
diff --git a/sources/ext/dhtmlxscheduler_units.js b/sources/ext/dhtmlxscheduler_units.js
new file mode 100644
index 0000000..bdd31cc
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_units.js
@@ -0,0 +1,238 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler._props = {};
+scheduler.createUnitsView=function(name,property,list,size,step,skip_incorrect){
+ if (typeof name == "object"){
+ list = name.list;
+ property = name.property;
+ size = name.size||0;
+ step = name.step||1;
+ skip_incorrect = name.skip_incorrect;
+ name = name.name;
+ }
+
+ scheduler._props[name]={map_to:property, options:list, step:step, position:0 };
+ if(size>scheduler._props[name].options.length){
+ scheduler._props[name]._original_size = size;
+ size = 0;
+ }
+ scheduler._props[name].size = size;
+ scheduler._props[name].skip_incorrect = skip_incorrect||false;
+
+ scheduler.date[name+"_start"]= scheduler.date.day_start;
+ scheduler.templates[name+"_date"] = function(date){
+ return scheduler.templates.day_date(date);
+ };
+
+ scheduler._get_unit_index = function(unit_view, date) {
+ var original_position = unit_view.position || 0;
+ var date_position = Math.floor((scheduler._correct_shift(+date, 1) - +scheduler._min_date) / (60 * 60 * 24 * 1000));
+ return original_position + date_position;
+ };
+ scheduler.templates[name + "_scale_text"] = function(id, label, option) {
+ if (option.css) {
+ return "<span class='" + option.css + "'>" + label + "</span>";
+ } else {
+ return label;
+ }
+ };
+ scheduler.templates[name+"_scale_date"] = function(date) {
+ var unit_view = scheduler._props[name];
+ var list = unit_view.options;
+ if (!list.length) return "";
+ var index = scheduler._get_unit_index(unit_view, date);
+ var option = list[index];
+ return scheduler.templates[name + "_scale_text"](option.key, option.label, option);
+ };
+
+ scheduler.date["add_"+name]=function(date,inc){ return scheduler.date.add(date,inc,"day"); };
+ scheduler.date["get_"+name+"_end"]=function(date){
+ return scheduler.date.add(date,scheduler._props[name].size||scheduler._props[name].options.length,"day");
+ };
+
+ scheduler.attachEvent("onOptionsLoad",function(){
+ var pr = scheduler._props[name];
+ var order = pr.order = {};
+ var list = pr.options;
+ for(var i=0; i<list.length;i++)
+ order[list[i].key]=i;
+ if(pr._original_size && pr.size==0){
+ pr.size = pr._original_size;
+ delete pr.original_size;
+ }
+ if(pr.size > list.length) {
+ pr._original_size = pr.size;
+ pr.size = 0;
+ }
+ else
+ pr.size = pr._original_size||pr.size;
+ if (scheduler._date && scheduler._mode == name)
+ scheduler.setCurrentView(scheduler._date, scheduler._mode);
+ });
+ scheduler.callEvent("onOptionsLoad",[]);
+};
+scheduler.scrollUnit=function(step){
+ var pr = scheduler._props[this._mode];
+ if (pr){
+ pr.position=Math.min(Math.max(0,pr.position+step),pr.options.length-pr.size);
+ this.update_view();
+ }
+};
+(function(){
+ var _removeIncorrectEvents = function(evs) {
+ var pr = scheduler._props[scheduler._mode];
+ if(pr && pr.order && pr.skip_incorrect) {
+ var correct_events = [];
+ for(var i=0; i<evs.length; i++) {
+ if(typeof pr.order[evs[i][pr.map_to]] != "undefined") {
+ correct_events.push(evs[i]);
+ }
+ }
+ evs.splice(0,evs.length);
+ evs.push.apply(evs,correct_events);
+ }
+ return evs;
+ };
+ var old_pre_render_events_table = scheduler._pre_render_events_table;
+ scheduler._pre_render_events_table=function(evs,hold) {
+ evs = _removeIncorrectEvents(evs);
+ return old_pre_render_events_table.apply(this, [evs, hold]);
+ };
+ var old_pre_render_events_line = scheduler._pre_render_events_line;
+ scheduler._pre_render_events_line = function(evs,hold){
+ evs = _removeIncorrectEvents(evs);
+ return old_pre_render_events_line.apply(this, [evs, hold]);
+ };
+ var fix_und=function(pr,ev){
+ if (pr && typeof pr.order[ev[pr.map_to]] == "undefined"){
+ var s = scheduler;
+ var dx = 24*60*60*1000;
+ var ind = Math.floor((ev.end_date - s._min_date)/dx);
+ //ev.end_date = new Date(s.date.time_part(ev.end_date)*1000+s._min_date.valueOf());
+ //ev.start_date = new Date(s.date.time_part(ev.start_date)*1000+s._min_date.valueOf());
+ ev[pr.map_to] = pr.options[Math.min(ind+pr.position,pr.options.length-1)].key;
+ return true;
+ }
+ };
+ var t = scheduler._reset_scale;
+
+ var oldive = scheduler.is_visible_events;
+ scheduler.is_visible_events = function(e){
+ var res = oldive.apply(this,arguments);
+ if (res){
+ var pr = scheduler._props[this._mode];
+ if (pr && pr.size){
+ var val = pr.order[e[pr.map_to]];
+ if (val < pr.position || val >= pr.size+pr.position )
+ return false;
+ }
+ }
+ return res;
+ };
+ scheduler._reset_scale = function(){
+ var pr = scheduler._props[this._mode];
+ var ret = t.apply(this,arguments);
+ if (pr){
+ this._max_date=this.date.add(this._min_date,1,"day");
+
+ var d = this._els["dhx_cal_data"][0].childNodes;
+ for (var i=0; i < d.length; i++)
+ d[i].className = d[i].className.replace("_now",""); //clear now class
+
+ if (pr.size && pr.size < pr.options.length){
+
+ var h = this._els["dhx_cal_header"][0];
+ var arrow = document.createElement("DIV");
+ if (pr.position){
+ arrow.className = "dhx_cal_prev_button";
+ arrow.style.cssText="left:1px;top:2px;position:absolute;"
+ arrow.innerHTML = "&nbsp;"
+ h.firstChild.appendChild(arrow);
+ arrow.onclick=function(){
+ scheduler.scrollUnit(pr.step*-1);
+ }
+ }
+ if (pr.position+pr.size<pr.options.length){
+ arrow = document.createElement("DIV");
+ arrow.className = "dhx_cal_next_button";
+ arrow.style.cssText="left:auto; right:0px;top:2px;position:absolute;"
+ arrow.innerHTML = "&nbsp;"
+ h.lastChild.appendChild(arrow);
+ arrow.onclick=function(){
+ scheduler.scrollUnit(pr.step);
+ }
+ }
+ }
+ }
+ return ret;
+
+ };
+ var r = scheduler._get_event_sday;
+ scheduler._get_event_sday=function(ev){
+ var pr = scheduler._props[this._mode];
+ if (pr){
+ fix_und(pr,ev);
+ return pr.order[ev[pr.map_to]]-pr.position;
+ }
+ return r.call(this,ev);
+ };
+ var l = scheduler.locate_holder_day;
+ scheduler.locate_holder_day=function(a,b,ev){
+ var pr = scheduler._props[this._mode];
+ if (pr && ev) {
+ fix_und(pr,ev);
+ return pr.order[ev[pr.map_to]]*1+(b?1:0)-pr.position;
+ }
+ return l.apply(this,arguments);
+ };
+ var p = scheduler._mouse_coords;
+ scheduler._mouse_coords=function(){
+ var pr = scheduler._props[this._mode];
+ var pos=p.apply(this,arguments);
+ if (pr){
+ if(!this._drag_event) this._drag_event = {};
+ var ev = this._drag_event;
+ if (this._drag_id && this._drag_mode){
+ ev = this.getEvent(this._drag_id);
+ this._drag_event._dhx_changed = true;
+ }
+ var unit_ind = Math.min(pos.x+pr.position,pr.options.length-1);
+ var key = pr.map_to;
+ pos.section = ev[key]=(pr.options[unit_ind]||{}).key;
+ pos.x = 0;
+ }
+ pos.force_redraw = true;
+ return pos;
+ };
+ var o = scheduler._time_order;
+ scheduler._time_order = function(evs){
+ var pr = scheduler._props[this._mode];
+ if (pr){
+ evs.sort(function(a,b){
+ return pr.order[a[pr.map_to]]>pr.order[b[pr.map_to]]?1:-1;
+ });
+ } else
+ o.apply(this,arguments);
+ };
+ scheduler.attachEvent("onEventAdded",function(id,ev){
+ if (this._loading) return true;
+ for (var a in scheduler._props){
+ var pr = scheduler._props[a];
+ if (typeof ev[pr.map_to] == "undefined")
+ ev[pr.map_to] = pr.options[0].key;
+ }
+ return true;
+ });
+ scheduler.attachEvent("onEventCreated",function(id,n_ev){
+ var pr = scheduler._props[this._mode];
+ if (pr && n_ev){
+ var ev = this.getEvent(id);
+ this._mouse_coords(n_ev);
+ fix_und(pr,ev);
+ this.event_updated(ev);
+ }
+ return true;
+ })
+})();
diff --git a/sources/ext/dhtmlxscheduler_url.js b/sources/ext/dhtmlxscheduler_url.js
new file mode 100644
index 0000000..2835341
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_url.js
@@ -0,0 +1,34 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){
+ var first = true;
+ var s2d = scheduler.date.str_to_date("%Y-%m-%d");
+ var d2s = scheduler.date.date_to_str("%Y-%m-%d");
+ scheduler.attachEvent("onBeforeViewChange",function(om,od,m,d){
+ if (first){
+ first = false;
+ var p={};
+ var data=(document.location.hash||"").replace("#","").split(",");
+ for (var i=0; i < data.length; i++) {
+ var s = data[i].split("=");
+ if (s.length==2)
+ p[s[0]]=s[1];
+ }
+
+ if (p.date || p.mode){
+ try{
+ this.setCurrentView((p.date?s2d(p.date):null),(p.mode||null));
+ } catch(e){
+ //assuming that mode is not available anymore
+ this.setCurrentView((p.date?s2d(p.date):null),m);
+ }
+ return false;
+ }
+ }
+ var text = "#date="+d2s(d||od)+",mode="+(m||om);
+ document.location.hash = text;
+ return true;
+ });
+}); \ No newline at end of file
diff --git a/sources/ext/dhtmlxscheduler_week_agenda.js b/sources/ext/dhtmlxscheduler_week_agenda.js
new file mode 100644
index 0000000..cee9d7c
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_week_agenda.js
@@ -0,0 +1,256 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler._wa = {};
+scheduler.xy.week_agenda_scale_height = 20;
+scheduler.templates.week_agenda_event_text = function(start_date, end_date, event, date) {
+ return scheduler.templates.event_date(start_date) + " " + event.text;
+};
+scheduler.date.week_agenda_start = scheduler.date.week_start;
+scheduler.date.week_agenda_end = function(date) {
+ return scheduler.date.add(date, 7, "day");
+};
+scheduler.date.add_week_agenda = function(date, inc) {
+ return scheduler.date.add(date, inc * 7, "day");
+};
+
+scheduler.attachEvent("onSchedulerReady", function() {
+ var t = scheduler.templates;
+ if (!t.week_agenda_date)
+ t.week_agenda_date = t.week_date;
+});
+
+(function() {
+ var scale_date_format = scheduler.date.date_to_str("%l, %F %d");
+ scheduler.templates.week_agenda_scale_date = function(date) {
+ return scale_date_format(date);
+ };
+})();
+
+scheduler.attachEvent("onTemplatesReady", function() {
+
+ scheduler.attachEvent("onSchedulerResize", function() {
+ if (this._mode == "week_agenda") {
+ this.week_agenda_view(true);
+ return false;
+ }
+ return true;
+ });
+
+ var old = scheduler.render_data;
+ scheduler.render_data = function(evs) {
+ if (this._mode == "week_agenda") {
+ scheduler.week_agenda_view(true);
+ } else
+ return old.apply(this, arguments);
+ };
+
+ var getColumnSizes = function() {
+ // widths
+ scheduler._cols = [];
+ var twidth = parseInt(scheduler._els['dhx_cal_data'][0].style.width);
+ scheduler._cols.push(Math.floor(twidth / 2));
+ scheduler._cols.push(twidth - scheduler._cols[0] - 1); // To add border between columns
+
+ // heights
+ scheduler._colsS = {
+ 0: [],
+ 1: []
+ };
+ var theight = parseInt(scheduler._els['dhx_cal_data'][0].style.height);
+ for (var i = 0; i < 3; i++) {
+ scheduler._colsS[0].push(Math.floor(theight / (3 - scheduler._colsS[0].length)));
+ theight -= scheduler._colsS[0][i];
+ }
+ scheduler._colsS[1].push(scheduler._colsS[0][0]);
+ scheduler._colsS[1].push(scheduler._colsS[0][1]);
+ // last two days
+ theight = scheduler._colsS[0][scheduler._colsS[0].length - 1];
+ scheduler._colsS[1].push(Math.floor(theight / 2));
+ scheduler._colsS[1].push(theight - scheduler._colsS[1][scheduler._colsS[1].length - 1]);
+ };
+ var fillWeekAgendaTab = function() {
+ getColumnSizes();
+ scheduler._els["dhx_cal_data"][0].innerHTML = '';
+ scheduler._rendered = [];
+ var html = '';
+ for (var i = 0; i < 2; i++) {
+ var width = scheduler._cols[i];
+ var column_css = 'dhx_wa_column';
+ if (i == 1)
+ column_css += ' dhx_wa_column_last';
+ html += "<div class='" + column_css + "' style='width: " + width + "px;'>";
+ for (var k = 0; k < scheduler._colsS[i].length; k++) {
+ var scale_height = scheduler.xy.week_agenda_scale_height - 2;
+ var height = scheduler._colsS[i][k] - scale_height - 2;
+ var day = Math.min(6, k * 2 + i);
+ html += "<div class='dhx_wa_day_cont'><div style='height:" + scale_height + "px; line-height:" + scale_height + "px;' class='dhx_wa_scale_bar'></div><div style='height:" + height + "px;' class='dhx_wa_day_data' day='" + day + "'></div></div>";
+ }
+ html += "</div>";
+ }
+ scheduler._els["dhx_cal_date"][0].innerHTML = scheduler.templates[scheduler._mode + "_date"](scheduler._min_date, scheduler._max_date, scheduler._mode);
+ scheduler._els["dhx_cal_data"][0].innerHTML = html;
+ var all_divs = scheduler._els["dhx_cal_data"][0].getElementsByTagName('div');
+ var day_divs = [];
+ for (var i = 0; i < all_divs.length; i++) {
+ if (all_divs[i].className == 'dhx_wa_day_cont')
+ day_divs.push(all_divs[i]);
+ }
+ scheduler._wa._selected_divs = [];
+ var events = scheduler.get_visible_events(); // list of events to be displayed in current week
+ var tstart = scheduler.date.week_start(scheduler._date);
+ var tend = scheduler.date.add(tstart, 1, "day");
+ for (var i = 0; i < 7; i++) {
+ day_divs[i]._date = tstart;
+ var scale_bar = day_divs[i].childNodes[0];
+ var events_div = day_divs[i].childNodes[1];
+ scale_bar.innerHTML = scheduler.templates.week_agenda_scale_date(tstart);
+ var evs = []; // events which will be displayed in the current day
+ for (var j = 0; j < events.length; j++) {
+ var tev = events[j];
+ if (tev.start_date < tend && tev.end_date > tstart)
+ evs.push(tev);
+ }
+ evs.sort(function(a, b) {
+ if (a.start_date.valueOf() == b.start_date.valueOf())
+ return a.id > b.id ? 1 : -1;
+ return a.start_date > b.start_date ? 1 : -1;
+ });
+ for (var k = 0; k < evs.length; k++) {
+ var ev = evs[k];
+ var ev_div = document.createElement('div');
+ scheduler._rendered.push(ev_div);
+ var ev_class = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);
+ ev_div.className = 'dhx_wa_ev_body' + (ev_class ? (' ' + ev_class) : '');
+ if (ev._text_style)
+ ev_div.style.cssText = ev._text_style;
+ if (ev.color)
+ ev_div.style.background = ev.color;
+ if (ev.textColor)
+ ev_div.style.color = ev.textColor;
+ if (scheduler._select_id && ev.id == scheduler._select_id && !(!scheduler.config.week_agenda_select && scheduler.config.week_agenda_select !== undefined)) {
+ ev_div.className += " dhx_cal_event_selected";
+ scheduler._wa._selected_divs.push(ev_div);
+ }
+ var position = "";
+ if (!ev._timed) {
+ position = "middle";
+ if (ev.start_date.valueOf() >= tstart.valueOf() && ev.start_date.valueOf() <= tend.valueOf())
+ position = "start";
+ if (ev.end_date.valueOf() >= tstart.valueOf() && ev.end_date.valueOf() <= tend.valueOf())
+ position = "end";
+ }
+ ev_div.innerHTML = scheduler.templates.week_agenda_event_text(ev.start_date, ev.end_date, ev, tstart, position);
+ ev_div.setAttribute('event_id', ev.id);
+ events_div.appendChild(ev_div);
+ }
+ tstart = scheduler.date.add(tstart, 1, "day");
+ tend = scheduler.date.add(tend, 1, "day");
+ }
+ };
+ scheduler.week_agenda_view = function(mode) {
+ scheduler._min_date = scheduler.date.week_start(scheduler._date);
+ scheduler._max_date = scheduler.date.add(scheduler._min_date, 1, "week");
+ scheduler.set_sizes();
+ if (mode) { // mode enabled
+ scheduler._table_view = scheduler._allow_dnd = true;
+
+ // hiding default top border from dhx_cal_data
+ scheduler._wa._prev_data_border = scheduler._els['dhx_cal_data'][0].style.borderTop;
+ scheduler._els['dhx_cal_data'][0].style.borderTop = 0;
+ scheduler._els['dhx_cal_data'][0].style.overflowY = 'hidden';
+
+ // cleaning dhx_cal_date from the previous date
+ scheduler._els['dhx_cal_date'][0].innerHTML = "";
+
+ // 1 to make navline to be over data
+ scheduler._els['dhx_cal_data'][0].style.top = (parseInt(scheduler._els['dhx_cal_data'][0].style.top) - 20 - 1) + 'px';
+ scheduler._els['dhx_cal_data'][0].style.height = (parseInt(scheduler._els['dhx_cal_data'][0].style.height) + 20 + 1) + 'px';
+
+ scheduler._els['dhx_cal_header'][0].style.display = 'none';
+ fillWeekAgendaTab();
+ } else { // leaving week_agenda mode
+ scheduler._table_view = scheduler._allow_dnd = false;
+
+ // restoring default top border to dhx_cal_data
+ if (scheduler._wa._prev_data_border)
+ scheduler._els['dhx_cal_data'][0].style.borderTop = scheduler._wa._prev_data_border;
+
+ scheduler._els['dhx_cal_data'][0].style.overflowY = 'auto';
+ scheduler._els['dhx_cal_data'][0].style.top = (parseInt(scheduler._els['dhx_cal_data'][0].style.top) + 20) + 'px';
+ scheduler._els['dhx_cal_data'][0].style.height = (parseInt(scheduler._els['dhx_cal_data'][0].style.height) - 20) + 'px';
+ scheduler._els['dhx_cal_header'][0].style.display = 'block';
+ }
+ };
+ scheduler.mouse_week_agenda = function(pos) {
+ var native_event = pos.ev;
+ var src = native_event.srcElement || native_event.target;
+ while (src.parentNode) {
+ if (src._date)
+ var date = src._date;
+ src = src.parentNode;
+ }
+ if (!date)
+ return pos;
+ pos.x = 0;
+ var diff = date.valueOf() - scheduler._min_date.valueOf();
+ pos.y = Math.ceil(( diff / (1000 * 60) ) / this.config.time_step);
+ if (this._drag_mode == 'move') {
+ this._drag_event._dhx_changed = true;
+ this._select_id = this._drag_id;
+ for (var i = 0; i < scheduler._rendered.length; i++) {
+ if (scheduler._drag_id == this._rendered[i].getAttribute('event_id'))
+ var event_div = this._rendered[i];
+ }
+ if (!scheduler._wa._dnd) {
+ var div = event_div.cloneNode(true);
+ this._wa._dnd = div;
+ div.className = event_div.className;
+ div.id = 'dhx_wa_dnd';
+ div.className += ' dhx_wa_dnd';
+ document.body.appendChild(div);
+ }
+ var dnd_div = document.getElementById('dhx_wa_dnd');
+ dnd_div.style.top = ((native_event.pageY || native_event.clientY) + 20) + "px";
+ dnd_div.style.left = ((native_event.pageX || native_event.clientX) + 20) + "px";
+ }
+ return pos;
+ };
+ scheduler.attachEvent('onBeforeEventChanged', function(event_object, native_event, is_new) {
+ if (this._mode == 'week_agenda') {
+ if (this._drag_mode == 'move') {
+ var dnd = document.getElementById('dhx_wa_dnd');
+ dnd.parentNode.removeChild(dnd);
+ scheduler._wa._dnd = false;
+ }
+ }
+ return true;
+ });
+
+ scheduler.attachEvent("onEventSave", function(id, data, is_new_event) {
+ if (is_new_event && this._mode == 'week_agenda')
+ this._select_id = id;
+ return true;
+ });
+
+ scheduler._wa._selected_divs = [];
+
+ scheduler.attachEvent("onClick", function(event_id, native_event_object) {
+ if (this._mode == 'week_agenda' && !(!scheduler.config.week_agenda_select && scheduler.config.week_agenda_select !== undefined)) {
+ if (scheduler._wa._selected_divs) {
+ for (var i = 0; i < this._wa._selected_divs.length; i++) {
+ var div = this._wa._selected_divs[i];
+ div.className = div.className.replace(/ dhx_cal_event_selected/, '');
+ }
+ }
+ this.for_rendered(event_id, function(event_div) {
+ event_div.className += " dhx_cal_event_selected";
+ scheduler._wa._selected_divs.push(event_div);
+ });
+ scheduler.select(event_id);
+ return false;
+ }
+ return true;
+ });
+});
diff --git a/sources/ext/dhtmlxscheduler_year_view.js b/sources/ext/dhtmlxscheduler_year_view.js
new file mode 100644
index 0000000..c0ffe74
--- /dev/null
+++ b/sources/ext/dhtmlxscheduler_year_view.js
@@ -0,0 +1,373 @@
+/*
+This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
+to use it in non-GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.config.year_x = 4;
+scheduler.config.year_y = 3;
+scheduler.xy.year_top = 0;
+
+scheduler.templates.year_date = function(date) {
+ return scheduler.date.date_to_str(scheduler.locale.labels.year_tab + " %Y")(date);
+};
+scheduler.templates.year_month = scheduler.date.date_to_str("%F");
+scheduler.templates.year_scale_date = scheduler.date.date_to_str("%D");
+scheduler.templates.year_tooltip = function(s, e, ev) {
+ return ev.text
+};
+
+(function() {
+ var is_year_mode = function() {
+ return scheduler._mode == "year";
+ };
+
+ scheduler.dblclick_dhx_month_head = function(e) {
+ if (is_year_mode()) {
+ var t = (e.target || e.srcElement);
+ if (t.parentNode.className.indexOf("dhx_before") != -1 || t.parentNode.className.indexOf("dhx_after") != -1) return false;
+ var start = this.templates.xml_date(t.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getAttribute("date"));
+ start.setDate(parseInt(t.innerHTML, 10));
+ var end = this.date.add(start, 1, "day")
+ if (!this.config.readonly && this.config.dblclick_create)
+ this.addEventNow(start.valueOf(), end.valueOf(), e);
+ }
+ };
+
+ var chid = scheduler.changeEventId;
+ scheduler.changeEventId = function() {
+ chid.apply(this, arguments);
+ if (is_year_mode())
+ this.year_view(true);
+ };
+
+
+ var old = scheduler.render_data;
+ var to_attr = scheduler.date.date_to_str("%Y/%m/%d");
+ var from_attr = scheduler.date.str_to_date("%Y/%m/%d");
+ scheduler.render_data = function(evs) {
+ if (!is_year_mode()) return old.apply(this, arguments);
+ for (var i = 0; i < evs.length; i++)
+ this._year_render_event(evs[i]);
+ };
+
+ var clear = scheduler.clear_view;
+ scheduler.clear_view = function() {
+ if (!is_year_mode()) return clear.apply(this, arguments);
+ for (var date in marked) {
+ if (marked.hasOwnProperty(date)) {
+ var div = marked[date];
+ div.className = "dhx_month_head";
+ div.setAttribute("date", "")
+ }
+ }
+ marked = {};
+ };
+
+ scheduler._hideToolTip = function() {
+ if (this._tooltip) {
+ this._tooltip.style.display = "none";
+ this._tooltip.date = new Date(9999, 1, 1);
+ }
+ };
+
+ scheduler._showToolTip = function(date, pos, e, src) {
+ if (this._tooltip) {
+ if (this._tooltip.date.valueOf() == date.valueOf()) return;
+ this._tooltip.innerHTML = "";
+ } else {
+ var t = this._tooltip = document.createElement("DIV");
+ t.className = "dhx_year_tooltip";
+ document.body.appendChild(t);
+ t.onclick = scheduler._click.dhx_cal_data;
+ }
+ var evs = this.getEvents(date, this.date.add(date, 1, "day"));
+ var html = "";
+
+ for (var i = 0; i < evs.length; i++) {
+ var ev = evs[i];
+ var bg_color = (ev.color ? ("background:" + ev.color + ";") : "");
+ var color = (ev.textColor ? ("color:" + ev.textColor + ";") : "");
+
+ html += "<div class='dhx_tooltip_line' style='" + bg_color + "" + color + "' event_id='" + evs[i].id + "'>";
+ html += "<div class='dhx_tooltip_date' style='" + bg_color + "" + color + "'>" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : "") + "</div>";
+ html += "<div class='dhx_event_icon icon_details'>&nbsp;</div>";
+ html += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + "</div>";
+ }
+
+ this._tooltip.style.display = "";
+ this._tooltip.style.top = "0px";
+
+
+ if (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)
+ this._tooltip.style.left = pos.left - this._tooltip.offsetWidth + "px";
+ else
+ this._tooltip.style.left = pos.left + src.offsetWidth + "px";
+
+ this._tooltip.date = date;
+ this._tooltip.innerHTML = html;
+
+ if (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)
+ this._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + "px";
+ else
+ this._tooltip.style.top = pos.top + "px";
+ };
+
+ scheduler._init_year_tooltip = function() {
+ dhtmlxEvent(scheduler._els["dhx_cal_data"][0], "mouseover", function(e) {
+ if (!is_year_mode()) return;
+
+ var e = e || event;
+ var src = e.target || e.srcElement;
+ if (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)
+ src = src.parentNode;
+ if ((src.className || "").indexOf("dhx_year_event") != -1)
+ scheduler._showToolTip(from_attr(src.getAttribute("date")), getOffset(src), e, src);
+ else
+ scheduler._hideToolTip();
+ });
+ this._init_year_tooltip = function() {
+ };
+ };
+
+ scheduler.attachEvent("onSchedulerResize", function() {
+ if (is_year_mode()) {
+ this.year_view(true);
+ return false;
+ }
+ return true;
+ });
+ scheduler._get_year_cell = function(d) {
+ //there can be more than 1 year in view
+ //year can start not from January
+ var m = d.getMonth() + 12 * (d.getFullYear() - this._min_date.getFullYear()) - this.week_starts._month;
+ var t = this._els["dhx_cal_data"][0].childNodes[m];
+ var d = this.week_starts[m] + d.getDate() - 1;
+
+
+ return t.childNodes[2].firstChild.rows[Math.floor(d / 7)].cells[d % 7].firstChild;
+ };
+
+ var marked = {};
+ scheduler._mark_year_date = function(d, ev) {
+ var date = to_attr(d);
+ var c = this._get_year_cell(d);
+ var ev_class = this.templates.event_class(ev.start_date, ev.end_date, ev);
+ if (!marked[date]) {
+ c.className = "dhx_month_head dhx_year_event";
+ c.setAttribute("date", date);
+ marked[date] = c;
+ }
+ c.className += (ev_class) ? (" "+ev_class) : "";
+ };
+ scheduler._unmark_year_date = function(d) {
+ this._get_year_cell(d).className = "dhx_month_head";
+ };
+ scheduler._year_render_event = function(ev) {
+ var d = ev.start_date;
+ if (d.valueOf() < this._min_date.valueOf())
+ d = this._min_date;
+ else d = this.date.date_part(new Date(d));
+
+ while (d < ev.end_date) {
+ this._mark_year_date(d, ev);
+ d = this.date.add(d, 1, "day");
+ if (d.valueOf() >= this._max_date.valueOf())
+ return;
+ }
+ };
+
+ scheduler.year_view = function(mode) {
+ if (mode) {
+ var temp = scheduler.xy.scale_height;
+ scheduler.xy.scale_height = -1;
+ }
+
+ scheduler._els["dhx_cal_header"][0].style.display = mode ? "none" : "";
+ scheduler.set_sizes();
+
+ if (mode)
+ scheduler.xy.scale_height = temp;
+
+
+ scheduler._table_view = mode;
+ if (this._load_mode && this._load()) return;
+
+ if (mode) {
+ scheduler._init_year_tooltip();
+ scheduler._reset_year_scale();
+ if (scheduler._load_mode && scheduler._load()) return scheduler._render_wait = true;
+ scheduler.render_view_data();
+ } else {
+ scheduler._hideToolTip();
+ }
+ };
+ scheduler._reset_year_scale = function() {
+ this._cols = [];
+ this._colsS = {};
+ var week_starts = []; //start day of first week in each month
+ var b = this._els["dhx_cal_data"][0];
+
+ var c = this.config;
+ b.scrollTop = 0; //fix flickering in FF
+ b.innerHTML = "";
+
+ var dx = Math.floor(parseInt(b.style.width) / c.year_x);
+ var dy = Math.floor((parseInt(b.style.height) - scheduler.xy.year_top) / c.year_y);
+ if (dy < 190) {
+ dy = 190;
+ dx = Math.floor((parseInt(b.style.width) - scheduler.xy.scroll_width) / c.year_x);
+ }
+
+ var summ = dx - 11;
+ var left = 0;
+ var week_template = document.createElement("div");
+ var dummy_date = this.date.week_start(scheduler._currentDate());
+ for (var i = 0; i < 7; i++) {
+ this._cols[i] = Math.floor(summ / (7 - i));
+ this._render_x_header(i, left, dummy_date, week_template);
+ dummy_date = this.date.add(dummy_date, 1, "day");
+ summ -= this._cols[i];
+ left += this._cols[i];
+ }
+ week_template.lastChild.className += " dhx_scale_bar_last";
+
+ var sd = this.date[this._mode + "_start"](this.date.copy(this._date));
+ var ssd = sd;
+
+ for (var i = 0; i < c.year_y; i++)
+ for (var j = 0; j < c.year_x; j++) {
+ var d = document.createElement("DIV");
+ d.style.cssText = "position:absolute;";
+ d.setAttribute("date", this.templates.xml_format(sd));
+ d.innerHTML = "<div class='dhx_year_month'></div><div class='dhx_year_week'>" + week_template.innerHTML + "</div><div class='dhx_year_body'></div>";
+ d.childNodes[0].innerHTML = this.templates.year_month(sd);
+
+ var dd = this.date.week_start(sd);
+ var ed = this._reset_month_scale(d.childNodes[2], sd, dd);
+
+ var r = d.childNodes[2].firstChild.rows;
+ for (var k=r.length; k<6; k++) {
+ r[0].parentNode.appendChild(r[0].cloneNode(true));
+ for (var ri=0; ri < r[k].childNodes.length; ri++) {
+ r[k].childNodes[ri].className = "dhx_after";
+ r[k].childNodes[ri].firstChild.innerHTML = scheduler.templates.month_day(ed);
+ ed = scheduler.date.add(ed,1,"day");
+ }
+ }
+ b.appendChild(d);
+
+ d.childNodes[1].style.height = d.childNodes[1].childNodes[0].offsetHeight + "px"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)
+ var dt = Math.round((dy - 190) / 2);
+ d.style.marginTop = dt + "px";
+ this.set_xy(d, dx - 10, dy - dt - 10, dx * j + 5, dy * i + 5 + scheduler.xy.year_top);
+
+ week_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;
+ sd = this.date.add(sd, 1, "month");
+
+ }
+ this._els["dhx_cal_date"][0].innerHTML = this.templates[this._mode + "_date"](ssd, sd, this._mode);
+ this.week_starts = week_starts;
+ week_starts._month = ssd.getMonth();
+ this._min_date = ssd;
+ this._max_date = sd;
+ };
+
+ var getActionData = scheduler.getActionData;
+ scheduler.getActionData = function(n_ev) {
+ if(!is_year_mode())
+ return getActionData.apply(scheduler, arguments);
+
+ var trg = n_ev?n_ev.target:event.srcElement;
+ var date = getMonthDate(trg);
+
+ var day = getMonthCell(trg);
+ var pos = getDayIndexes(day);
+
+ if(pos && date){
+ date = scheduler.date.add(date, pos.week, "week");
+ date = scheduler.date.add(date, pos.day, "day");
+ }else{
+ date = null;
+ }
+
+ return {
+ date:date,
+ section:null
+ };
+
+
+
+
+ function getMonthDate(node){
+ var node = getMonthRoot(node);
+ if(!node)
+ return null;
+
+ var date = node.getAttribute("date");
+ if(!date)
+ return null;
+
+ return scheduler.date.week_start(scheduler.templates.xml_date(date));
+ }
+ function getDayIndexes(targetCell){
+ var month = getMonthTable(targetCell);
+ if(!month)
+ return null;
+
+ var week = 0, day = 0;
+ for(var week = 0, weeks = month.rows.length; week < weeks;week ++){
+ var w = month.rows[week].getElementsByTagName("td");
+ for(var day = 0, days = w.length; day < days; day++){
+ if(w[day] == targetCell)
+ break;
+ }
+ if(day < days)
+ break;
+ }
+
+ if(week < weeks)
+ return {day:day, week:week};
+ else
+ return null;
+ }
+
+ };
+
+ var locateEvent = scheduler._locate_event;
+ scheduler._locate_event = function(node) {
+ if(!is_year_mode())
+ return locateEvent.apply(scheduler, arguments);
+
+ var day = getNode(node, function(n){
+ return n.className && n.className.indexOf("dhx_year_event") != -1 && n.hasAttribute && n.hasAttribute("date")
+ });
+
+ if(!day || !day.hasAttribute("date")) return null;
+
+ var dat = scheduler.templates.xml_date(day.getAttribute("date"));
+ var evs = scheduler.getEvents(dat, scheduler.date.add(dat, 1, "day"));
+ if(!evs.length) return null;
+
+ //can be multiple events in the cell, return any single one
+ return evs[0].id;
+ };
+
+
+ function getMonthCell(node){
+ return getNode(node, function(n){ return n.nodeName.toLowerCase() == "td" });
+ }
+
+ function getMonthTable(node){
+ return getNode(node, function(n){ return n.nodeName.toLowerCase() == "table" });
+ }
+ function getMonthRoot(node){
+ var node = getMonthTable(node);
+ return getNode(node, function(n){ return n.hasAttribute && n.hasAttribute("date")});
+ }
+ function getNode(node, condition){
+ while(node && !condition(node)){
+ node = node.parentNode;
+ }
+ return node;
+ }
+
+})();
diff --git a/sources/locale/locale.js b/sources/locale/locale.js
new file mode 100644
index 0000000..18d4177
--- /dev/null
+++ b/sources/locale/locale.js
@@ -0,0 +1,50 @@
+scheduler.locale = {
+ date:{
+ month_full:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ month_short:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ day_full:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ day_short:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+ },
+ labels:{
+ dhx_cal_today_button:"Today",
+ day_tab:"Day",
+ week_tab:"Week",
+ month_tab:"Month",
+ new_event:"New event",
+ icon_save:"Save",
+ icon_cancel:"Cancel",
+ icon_details:"Details",
+ icon_edit:"Edit",
+ icon_delete:"Delete",
+ confirm_closing:"",//Your changes will be lost, are your sure ?
+ confirm_deleting:"Event will be deleted permanently, are you sure?",
+ section_description:"Description",
+ section_time:"Time period",
+ full_day:"Full day",
+
+ /*recurring events*/
+ confirm_recurring:"Do you want to edit the whole set of repeated events?",
+ section_recurring:"Repeat event",
+ button_recurring:"Disabled",
+ button_recurring_open:"Enabled",
+ button_edit_series: "Edit series",
+ button_edit_occurrence: "Edit occurrence",
+
+ /*agenda view extension*/
+ agenda_tab:"Agenda",
+ date:"Date",
+ description:"Description",
+
+ /*year view extension*/
+ year_tab:"Year",
+
+ /* week agenda extension */
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Grid",
+ drag_to_create:"Drag to create",
+ drag_to_move:"Drag to move"
+ }
+};
+
diff --git a/sources/locale/locale_ar.js b/sources/locale/locale_ar.js
new file mode 100644
index 0000000..576634e
--- /dev/null
+++ b/sources/locale/locale_ar.js
@@ -0,0 +1,43 @@
+//v.2.0 build 90722
+/*
+ Copyright DHTMLX LTD. http://www.dhtmlx.com
+ You allowed to use this component or parts of it under GPL terms
+ To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
+ */
+scheduler.locale = {
+ date: {
+ month_full: ["كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"],
+ month_short: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
+ day_full: ["الأحد", "الأثنين", "ألثلاثاء", "الأربعاء", "ألحميس", "ألجمعة", "السبت"],
+ day_short: ["احد", "اثنين", "ثلاثاء", "اربعاء", "خميس", "جمعة", "سبت"]
+ },
+ labels: {
+ dhx_cal_today_button: "اليوم",
+ day_tab: "يوم",
+ week_tab: "أسبوع",
+ month_tab: "شهر",
+ new_event: "حدث جديد",
+ icon_save: "اخزن",
+ icon_cancel: "الغاء",
+ icon_details: "تفاصيل",
+ icon_edit: "تحرير",
+ icon_delete: "حذف",
+ confirm_closing: "التغييرات سوف تضيع, هل انت متأكد؟", //Your changes will be lost, are your sure ?
+ confirm_deleting: "الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟",
+ section_description: "الوصف",
+ section_time: "الفترة الزمنية",
+ full_day: "طوال اليوم",
+
+ confirm_recurring: "هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟",
+ section_recurring: "تكرار الحدث",
+ button_recurring: "تعطيل",
+ button_recurring_open: "تمكين",
+ button_edit_series: "تحرير سلسلة",
+ button_edit_occurrence: "تعديل نسخة",
+
+ /*grid view extension*/
+ grid_tab: "جدول"
+ }
+}
+
+
diff --git a/sources/locale/locale_be.js b/sources/locale/locale_be.js
new file mode 100644
index 0000000..f8c8834
--- /dev/null
+++ b/sources/locale/locale_be.js
@@ -0,0 +1,49 @@
+/*
+ Translation by Sofya Morozova
+ */
+scheduler.locale = {
+ date: {
+ month_full: ["Студзень", "Люты", "Сакавік", "Красавік", "Maй", "Чэрвень", "Ліпень", "Жнівень", "Верасень", "Кастрычнік", "Лістапад", "Снежань"],
+ month_short: ["Студз", "Лют", "Сак", "Крас", "Maй", "Чэр", "Ліп", "Жнів", "Вер", "Каст", "Ліст", "Снеж"],
+ day_full: [ "Нядзеля", "Панядзелак", "Аўторак", "Серада", "Чацвер", "Пятніца", "Субота"],
+ day_short: ["Нд", "Пн", "Аўт", "Ср", "Чцв", "Пт", "Сб"]
+ },
+ labels: {
+ dhx_cal_today_button: "Сёння",
+ day_tab: "Дзень",
+ week_tab: "Тыдзень",
+ month_tab: "Месяц",
+ new_event: "Новая падзея",
+ icon_save: "Захаваць",
+ icon_cancel: "Адмяніць",
+ icon_details: "Дэталі",
+ icon_edit: "Змяніць",
+ icon_delete: "Выдаліць",
+ confirm_closing: "", //Унесеныя змены будуць страчаны, працягнуць?
+ confirm_deleting: "Падзея будзе выдалена незваротна, працягнуць?",
+ section_description: "Апісанне",
+ section_time: "Перыяд часу",
+ full_day: "Увесь дзень",
+
+ confirm_recurring: "Вы хочаце змяніць усю серыю паўтаральных падзей?",
+ section_recurring: "Паўтарэнне",
+ button_recurring: "Адключана",
+ button_recurring_open: "Уключана",
+ button_edit_series: "Рэдагаваць серыю",
+ button_edit_occurrence: "Рэдагаваць асобнік",
+
+ /*agenda view extension*/
+ agenda_tab: "Спіс",
+ date: "Дата",
+ description: "Апісанне",
+
+ /*year view extension*/
+ year_tab: "Год",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Спіс",
+
+ /*grid view extension*/
+ grid_tab: "Спic"
+ }
+}
diff --git a/sources/locale/locale_ca.js b/sources/locale/locale_ca.js
new file mode 100644
index 0000000..9f6295d
--- /dev/null
+++ b/sources/locale/locale_ca.js
@@ -0,0 +1,49 @@
+/*
+ @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com
+ */
+scheduler.locale = {
+ date: {
+ month_full: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"],
+ month_short: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"],
+ day_full: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"],
+ day_short: ["Dg", "Dl", "Dm", "Dc", "Dj", "Dv", "Ds"]
+ },
+ labels: {
+ dhx_cal_today_button: "Hui",
+ day_tab: "Dia",
+ week_tab: "Setmana",
+ month_tab: "Mes",
+ new_event: "Nou esdeveniment",
+ icon_save: "Guardar",
+ icon_cancel: "Cancel·lar",
+ icon_details: "Detalls",
+ icon_edit: "Editar",
+ icon_delete: "Esborrar",
+ confirm_closing: "", //"Els seus canvis es perdràn, continuar ?"
+ confirm_deleting: "L'esdeveniment s'esborrarà definitivament, continuar ?",
+ section_description: "Descripció",
+ section_time: "Periode de temps",
+ full_day: "Tot el dia",
+
+ confirm_recurring: "¿Desitja modificar el conjunt d'esdeveniments repetits?",
+ section_recurring: "Repeteixca l'esdeveniment",
+ button_recurring: "Impedit",
+ button_recurring_open: "Permés",
+ button_edit_series: "Edit sèrie",
+ button_edit_occurrence: "Edita Instància",
+
+ /*agenda view extension*/
+ agenda_tab: "Agenda",
+ date: "Data",
+ description: "Descripció",
+
+ /*year view extension*/
+ year_tab: "Any",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Taula"
+ }
+}; \ No newline at end of file
diff --git a/sources/locale/locale_cn.js b/sources/locale/locale_cn.js
new file mode 100644
index 0000000..3cb9900
--- /dev/null
+++ b/sources/locale/locale_cn.js
@@ -0,0 +1,54 @@
+/*
+Translation by FreezeSoul
+*/
+scheduler.config.day_date="%M %d日 %D";
+scheduler.config.default_date="%Y年 %M %d日";
+scheduler.config.month_date="%Y年 %M";
+
+scheduler.locale={
+ date: {
+ month_full: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+ month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
+ day_short: ["日", "一", "二", "三", "四", "五", "六"]
+ },
+ labels: {
+ dhx_cal_today_button: "今天",
+ day_tab: "日",
+ week_tab: "周",
+ month_tab: "月",
+ new_event: "新建日程",
+ icon_save: "保存",
+ icon_cancel: "关闭",
+ icon_details: "详细",
+ icon_edit: "编辑",
+ icon_delete: "删除",
+ confirm_closing: "请确认是否撤销修改!", //Your changes will be lost, are your sure?
+ confirm_deleting: "是否删除日程?",
+ section_description: "描述",
+ section_time: "时间范围",
+ full_day: "整天",
+
+ confirm_recurring:"请确认是否将日程设为重复模式?",
+ section_recurring:"重复周期",
+ button_recurring:"禁用",
+ button_recurring_open:"启用",
+ button_edit_series: "编辑系列",
+ button_edit_occurrence: "编辑实例",
+
+ /*agenda view extension*/
+ agenda_tab:"议程",
+ date:"日期",
+ description:"说明",
+
+ /*year view extension*/
+ year_tab:"今年",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "议程",
+
+ /*grid view extension*/
+ grid_tab:"电网"
+ }
+};
+
diff --git a/sources/locale/locale_cs.js b/sources/locale/locale_cs.js
new file mode 100644
index 0000000..5c2b8c5
--- /dev/null
+++ b/sources/locale/locale_cs.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"],
+ month_short: ["Led", "Ún", "Bře", "Dub", "Kvě", "Čer", "Čec", "Srp", "Září", "Říj", "List", "Pro"],
+ day_full: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"],
+ day_short: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"]
+ },
+ labels: {
+ dhx_cal_today_button: "Dnes",
+ day_tab: "Den",
+ week_tab: "Týden",
+ month_tab: "Měsíc",
+ new_event: "Nová událost",
+ icon_save: "Uložit",
+ icon_cancel: "Zpět",
+ icon_details: "Detail",
+ icon_edit: "Edituj",
+ icon_delete: "Smazat",
+ confirm_closing: "", //Vaše změny budou ztraceny, opravdu ?
+ confirm_deleting: "Událost bude trvale smazána, opravdu?",
+ section_description: "Poznámky",
+ section_time: "Doba platnosti",
+
+ /*recurring events*/
+ confirm_recurring: "Přejete si upravit celou řadu opakovaných událostí?",
+ section_recurring: "Opakování události",
+ button_recurring: "Vypnuto",
+ button_recurring_open: "Zapnuto",
+ button_edit_series: "Edit series",
+ button_edit_occurrence: "Upravit instance",
+
+ /*agenda view extension*/
+ agenda_tab: "Program",
+ date: "Datum",
+ description: "Poznámka",
+
+ /*year view extension*/
+ year_tab: "Rok",
+ full_day: "Full day",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Program",
+
+ /*grid view extension*/
+ grid_tab: "Mřížka"
+ }
+};
+
diff --git a/sources/locale/locale_da.js b/sources/locale/locale_da.js
new file mode 100644
index 0000000..4745625
--- /dev/null
+++ b/sources/locale/locale_da.js
@@ -0,0 +1,47 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"],
+ month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"],
+ day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"]
+ },
+ labels: {
+ dhx_cal_today_button: "Idag",
+ day_tab: "Dag",
+ week_tab: "Uge",
+ month_tab: "Måned",
+ new_event: "Ny begivenhed",
+ icon_save: "Gem",
+ icon_cancel: "Fortryd",
+ icon_details: "Detaljer",
+ icon_edit: "Tilret",
+ icon_delete: "Slet",
+ confirm_closing: "Dine rettelser vil gå tabt.. Er dy sikker?", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Bigivenheden vil blive slettet permanent. Er du sikker?",
+ section_description: "Beskrivelse",
+ section_time: "Tidsperiode",
+
+ /*recurring events*/
+ confirm_recurring: "Vil du tilrette hele serien af gentagne begivenheder?",
+ section_recurring: "Gentag begivenhed",
+ button_recurring: "Frakoblet",
+ button_recurring_open: "Tilkoblet",
+ button_edit_series: "Rediger serien",
+ button_edit_occurrence: "Rediger en kopi",
+
+ /*agenda view extension*/
+ agenda_tab: "Dagsorden",
+ date: "Dato",
+ description: "Beskrivelse",
+
+ /*year view extension*/
+ year_tab: "År",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Dagsorden",
+
+ /*grid view extension*/
+ grid_tab: "Grid"
+ }
+};
+
diff --git a/sources/locale/locale_de.js b/sources/locale/locale_de.js
new file mode 100644
index 0000000..d59b4d8
--- /dev/null
+++ b/sources/locale/locale_de.js
@@ -0,0 +1,47 @@
+scheduler.locale = {
+ date: {
+ month_full: [" Januar", " Februar", " März ", " April", " Mai", " Juni", " Juli", " August", " September ", " Oktober", " November ", " Dezember"],
+ month_short: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ day_full: [ "Sonntag", "Montag", "Dienstag", " Mittwoch", " Donnerstag", "Freitag", "Samstag"],
+ day_short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]
+ },
+ labels: {
+ dhx_cal_today_button: "Heute",
+ day_tab: "Tag",
+ week_tab: "Woche",
+ month_tab: "Monat",
+ new_event: "neuer Eintrag",
+ icon_save: "Speichern",
+ icon_cancel: "Abbrechen",
+ icon_details: "Details",
+ icon_edit: "Ändern",
+ icon_delete: "Löschen",
+ confirm_closing: "", //"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? "
+ confirm_deleting: "Der Eintrag wird gelöscht",
+ section_description: "Beschreibung",
+ section_time: "Zeitspanne",
+ full_day: "Ganzer Tag",
+
+ confirm_recurring: "Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?",
+ section_recurring: "Wiederholung",
+ button_recurring: "Aus",
+ button_recurring_open: "An",
+ button_edit_series: "Bearbeiten Sie die Serie",
+ button_edit_occurrence: "Bearbeiten Sie eine Kopie",
+
+ /*agenda view extension*/
+ agenda_tab: "Agenda",
+ date: "Datum",
+ description: "Beschreibung",
+
+ /*year view extension*/
+ year_tab: "Jahre",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Grid"
+ }
+};
+
diff --git a/sources/locale/locale_el.js b/sources/locale/locale_el.js
new file mode 100644
index 0000000..3bcf825
--- /dev/null
+++ b/sources/locale/locale_el.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάϊος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"],
+ month_short: ["ΙΑΝ", "ΦΕΒ", "ΜΑΡ", "ΑΠΡ", "ΜΑΙ", "ΙΟΥΝ", "ΙΟΥΛ", "ΑΥΓ", "ΣΕΠ", "ΟΚΤ", "ΝΟΕ", "ΔΕΚ"],
+ day_full: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Κυριακή"],
+ day_short: ["ΚΥ", "ΔΕ", "ΤΡ", "ΤΕ", "ΠΕ", "ΠΑ", "ΣΑ"]
+ },
+ labels: {
+ dhx_cal_today_button: "Σήμερα",
+ day_tab: "Ημέρα",
+ week_tab: "Εβδομάδα",
+ month_tab: "Μήνας",
+ new_event: "Νέο έργο",
+ icon_save: "Αποθήκευση",
+ icon_cancel: "Άκυρο",
+ icon_details: "Λεπτομέρειες",
+ icon_edit: "Επεξεργασία",
+ icon_delete: "Διαγραφή",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;",
+ section_description: "Περιγραφή",
+ section_time: "Χρονική περίοδος",
+ full_day: "Πλήρης Ημέρα",
+
+ /*recurring events*/
+ confirm_recurring: "Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;",
+ section_recurring: "Επαναλαμβανόμενο έργο",
+ button_recurring: "Ανενεργό",
+ button_recurring_open: "Ενεργό",
+ button_edit_series: "Επεξεργαστείτε τη σειρά",
+ button_edit_occurrence: "Επεξεργασία ένα αντίγραφο",
+
+ /*agenda view extension*/
+ agenda_tab: "Ημερήσια Διάταξη",
+ date: "Ημερομηνία",
+ description: "Περιγραφή",
+
+ /*year view extension*/
+ year_tab: "Έτος",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Ημερήσια Διάταξη",
+
+ /*grid view extension*/
+ grid_tab: "Πλέγμα"
+ }
+};
+
diff --git a/sources/locale/locale_es.js b/sources/locale/locale_es.js
new file mode 100644
index 0000000..7189aa9
--- /dev/null
+++ b/sources/locale/locale_es.js
@@ -0,0 +1,49 @@
+/*
+ @Autor Manuel Fernandez Panzuela - www.mfernandez.es
+ */
+scheduler.locale = {
+ date: {
+ month_full: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
+ month_short: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
+ day_full: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
+ day_short: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"]
+ },
+ labels: {
+ dhx_cal_today_button: "Hoy",
+ day_tab: "Día",
+ week_tab: "Semana",
+ month_tab: "Mes",
+ new_event: "Nuevo evento",
+ icon_save: "Guardar",
+ icon_cancel: "Cancelar",
+ icon_details: "Detalles",
+ icon_edit: "Editar",
+ icon_delete: "Eliminar",
+ confirm_closing: "", //"Sus cambios se perderán, continuar ?"
+ confirm_deleting: "El evento se borrará definitivamente, ¿continuar?",
+ section_description: "Descripción",
+ section_time: "Período",
+ full_day: "Todo el día",
+
+ confirm_recurring: "¿Desea modificar el conjunto de eventos repetidos?",
+ section_recurring: "Repita el evento",
+ button_recurring: "Impedido",
+ button_recurring_open: "Permitido",
+ button_edit_series: "Editar la serie",
+ button_edit_occurrence: "Editar una copia",
+
+ /*agenda view extension*/
+ agenda_tab: "Día",
+ date: "Fecha",
+ description: "Descripción",
+
+ /*year view extension*/
+ year_tab: "Año",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Día",
+
+ /*grid view extension*/
+ grid_tab: "Reja"
+ }
+}; \ No newline at end of file
diff --git a/sources/locale/locale_fi.js b/sources/locale/locale_fi.js
new file mode 100644
index 0000000..ffb9754
--- /dev/null
+++ b/sources/locale/locale_fi.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kes&auml;kuu", "Hein&auml;kuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"],
+ month_short: ["Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou"],
+ day_full: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"],
+ day_short: ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"]
+ },
+ labels: {
+ dhx_cal_today_button: "Tänään",
+ day_tab: "Päivä",
+ week_tab: "Viikko",
+ month_tab: "Kuukausi",
+ new_event: "Uusi tapahtuma",
+ icon_save: "Tallenna",
+ icon_cancel: "Peru",
+ icon_details: "Tiedot",
+ icon_edit: "Muokkaa",
+ icon_delete: "Poista",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Haluatko varmasti poistaa tapahtuman?",
+ section_description: "Kuvaus",
+ section_time: "Aikajakso",
+ full_day: "Koko päivä",
+
+ confirm_recurring: "Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?",
+ section_recurring: "Toista tapahtuma",
+ button_recurring: "Ei k&auml;yt&ouml;ss&auml;",
+ button_recurring_open: "K&auml;yt&ouml;ss&auml;",
+ button_edit_series: "Muokkaa sarja",
+ button_edit_occurrence: "Muokkaa kopio",
+
+ /*agenda view extension*/
+ agenda_tab: "Esityslista",
+ date: "Päivämäärä",
+ description: "Kuvaus",
+
+ /*year view extension*/
+ year_tab: "Vuoden",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Esityslista",
+
+ /*grid view extension*/
+ grid_tab: "Ritilä"
+ }
+};
+
+
diff --git a/sources/locale/locale_fr.js b/sources/locale/locale_fr.js
new file mode 100644
index 0000000..e92feff
--- /dev/null
+++ b/sources/locale/locale_fr.js
@@ -0,0 +1,46 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
+ month_short: ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Aôu", "Sep", "Oct", "Nov", "Déc"],
+ day_full: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
+ day_short: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"]
+ },
+ labels: {
+ dhx_cal_today_button: "Aujourd'hui",
+ day_tab: "Jour",
+ week_tab: "Semaine",
+ month_tab: "Mois",
+ new_event: "Nouvel événement",
+ icon_save: "Enregistrer",
+ icon_cancel: "Annuler",
+ icon_details: "Détails",
+ icon_edit: "Modifier",
+ icon_delete: "Effacer",
+ confirm_closing: "", //Vos modifications seront perdus, êtes-vous sûr ?
+ confirm_deleting: "L'événement sera effacé sans appel, êtes-vous sûr ?",
+ section_description: "Description",
+ section_time: "Période",
+ full_day: "Journée complète",
+
+ confirm_recurring: "Voulez-vous éditer toute une série d'évènements répétés?",
+ section_recurring: "Périodicité",
+ button_recurring: "Désactivé",
+ button_recurring_open: "Activé",
+ button_edit_series: "Modifier la série",
+ button_edit_occurrence: "Modifier une copie",
+
+ /*agenda view extension*/
+ agenda_tab: "Jour",
+ date: "Date",
+ description: "Description",
+
+ /*year view extension*/
+ year_tab: "Année",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Jour",
+
+ /*grid view extension*/
+ grid_tab: "Grille"
+ }
+};
diff --git a/sources/locale/locale_he.js b/sources/locale/locale_he.js
new file mode 100644
index 0000000..4187251
--- /dev/null
+++ b/sources/locale/locale_he.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"],
+ month_short: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"],
+ day_full: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"],
+ day_short: ["א", "ב", "ג", "ד", "ה", "ו", "ש"]
+ },
+ labels: {
+ dhx_cal_today_button: "היום",
+ day_tab: "יום",
+ week_tab: "שבוע",
+ month_tab: "חודש",
+ new_event: "ארוע חדש",
+ icon_save: "שמור",
+ icon_cancel: "בטל",
+ icon_details: "פרטים",
+ icon_edit: "ערוך",
+ icon_delete: "מחק",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "ארוע ימחק סופית.להמשיך?",
+ section_description: "הסבר",
+ section_time: "תקופה",
+
+ confirm_recurring: "האם ברצונך לשנות כל סדרת ארועים מתמשכים?",
+ section_recurring: "להעתיק ארוע",
+ button_recurring: "לא פעיל",
+ button_recurring_open: "פעיל",
+ full_day: "יום שלם",
+ button_edit_series: "ערוך את הסדרה",
+ button_edit_occurrence: "עריכת עותק",
+
+ /*agenda view extension*/
+ agenda_tab: "סדר יום",
+ date: "תאריך",
+ description: "תיאור",
+
+ /*year view extension*/
+ year_tab: "לשנה",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "סדר יום",
+
+ /*grid view extension*/
+ grid_tab: "סורג"
+ }
+};
+
+
diff --git a/sources/locale/locale_hu.js b/sources/locale/locale_hu.js
new file mode 100644
index 0000000..63fb671
--- /dev/null
+++ b/sources/locale/locale_hu.js
@@ -0,0 +1,42 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"],
+ month_short: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ day_full: ["Vasárnap", "Hétfõ", "Kedd", "Szerda", "Csütörtök", "Péntek", "szombat"],
+ day_short: ["Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo"]
+ },
+ labels: {
+ dhx_cal_today_button: "Ma",
+ day_tab: "Nap",
+ week_tab: "Hét",
+ month_tab: "Hónap",
+ new_event: "Új esemény",
+ icon_save: "Mentés",
+ icon_cancel: "Mégse",
+ icon_details: "Részletek",
+ icon_edit: "Szerkesztés",
+ icon_delete: "Törlés",
+ confirm_closing: "", //A változások elvesznek, biztosan folytatja? "
+ confirm_deleting: "Az esemény törölve lesz, biztosan folytatja?",
+ section_description: "Leírás",
+ section_time: "Idõszak",
+ full_day: "Egesz napos",
+
+ /*ismétlõdõ események*/
+ confirm_recurring: "Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?",
+ section_recurring: "Esemény ismétlése",
+ button_recurring: "Tiltás",
+ button_recurring_open: "Engedélyezés",
+ button_edit_series: "Edit series",
+ button_edit_occurrence: "Szerkesztés bíróság",
+
+ /*napirendi nézet*/
+ agenda_tab: "Napirend",
+ date: "Dátum",
+ description: "Leírás",
+
+ /*éves nézet*/
+ year_tab: "Év"
+ }
+};
+
diff --git a/sources/locale/locale_id.js b/sources/locale/locale_id.js
new file mode 100644
index 0000000..4e71c53
--- /dev/null
+++ b/sources/locale/locale_id.js
@@ -0,0 +1 @@
+scheduler.locale = { date: { month_full: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], day_full: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], day_short: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"] }, labels: { dhx_cal_today_button: "Hari Ini", day_tab: "Hari", week_tab: "Minggu", month_tab: "Bulan", new_event: "Acara Baru", icon_save: "Simpan", icon_cancel: "Batal", icon_details: "Detail", icon_edit: "Edit", icon_delete: "Hapus", confirm_closing: "", //Perubahan tidak akan disimpan ? confirm_deleting: "Acara akan dihapus", section_description: "Keterangan", section_time: "Periode", full_day: "Hari penuh", /*recurring events*/ confirm_recurring: "Apakah acara ini akan berulang?", section_recurring: "Acara Rutin", button_recurring: "Tidak Difungsikan", button_recurring_open: "Difungsikan", button_edit_series: "Mengedit seri", button_edit_occurrence: "Mengedit salinan", /*agenda view extension*/ agenda_tab: "Agenda", date: "Tanggal", description: "Keterangan", /*year view extension*/ year_tab: "Tahun", /*week agenda view extension*/ week_agenda_tab: "Agenda", /*grid view extension*/ grid_tab: "Tabel" } }; \ No newline at end of file
diff --git a/sources/locale/locale_it.js b/sources/locale/locale_it.js
new file mode 100644
index 0000000..8b52f27
--- /dev/null
+++ b/sources/locale/locale_it.js
@@ -0,0 +1,46 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
+ month_short: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
+ day_full: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"],
+ day_short: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"]
+ },
+ labels: {
+ dhx_cal_today_button: "Oggi",
+ day_tab: "Giorno",
+ week_tab: "Settimana",
+ month_tab: "Mese",
+ new_event: "Nuovo evento",
+ icon_save: "Salva",
+ icon_cancel: "Chiudi",
+ icon_details: "Dettagli",
+ icon_edit: "Modifica",
+ icon_delete: "Elimina",
+ confirm_closing: "", //Le modifiche apportate saranno perse, siete sicuri?
+ confirm_deleting: "L'evento sarà eliminato, siete sicuri?",
+ section_description: "Descrizione",
+ section_time: "Periodo di tempo",
+ full_day: "Intera giornata",
+
+ confirm_recurring: "Vuoi modificare l'intera serie di eventi?",
+ section_recurring: "Ripetere l'evento",
+ button_recurring: "Disattivato",
+ button_recurring_open: "Attivato",
+ button_edit_series: "Modificare la serie",
+ button_edit_occurrence: "Modificare una copia",
+
+ /*agenda view extension*/
+ agenda_tab: "Giorno",
+ date: "Data",
+ description: "Descrizione",
+
+ /*year view extension*/
+ year_tab: "Anni",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Giorno",
+
+ /*grid view extension*/
+ grid_tab: "Griglia"
+ }
+};
diff --git a/sources/locale/locale_jp.js b/sources/locale/locale_jp.js
new file mode 100644
index 0000000..9b41096
--- /dev/null
+++ b/sources/locale/locale_jp.js
@@ -0,0 +1,50 @@
+/*
+ Translation by Genexus Japan Inc.
+ */
+scheduler.locale = {
+ date: {
+ month_full: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ month_short: [ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ day_full: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"],
+ day_short: ["日", "月", "火", "水", "木", "金", "土"]
+ },
+ labels: {
+ dhx_cal_today_button: "今日",
+ day_tab: "日",
+ week_tab: "週",
+ month_tab: "月",
+ new_event: "新イベント",
+ icon_save: "保存",
+ icon_cancel: "キャンセル",
+ icon_details: "詳細",
+ icon_edit: "編集",
+ icon_delete: "削除",
+ confirm_closing: "", //変更が取り消されます、宜しいですか?
+ confirm_deleting: "イベント完全に削除されます、宜しいですか?",
+ section_description: "デスクリプション",
+ section_time: "期間",
+ confirm_recurring: "繰り返されているイベントを全て編集しますか?",
+ section_recurring: "イベントを繰り返す",
+ button_recurring: "無効",
+ button_recurring_open: "有効",
+ full_day: "終日",
+ button_edit_series: "シリーズを編集します",
+ button_edit_occurrence: "コピーを編集",
+
+ /*agenda view extension*/
+ agenda_tab: "議題は",
+ date: "日付",
+ description: "説明",
+
+ /*year view extension*/
+ year_tab: "今年",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "議題は",
+
+ /*grid view extension*/
+ grid_tab: "グリッド"
+ }
+};
+
+
diff --git a/sources/locale/locale_nb.js b/sources/locale/locale_nb.js
new file mode 100644
index 0000000..44a4493
--- /dev/null
+++ b/sources/locale/locale_nb.js
@@ -0,0 +1,46 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"],
+ month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"],
+ day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"],
+ day_short: ["Søn", "Mon", "Tir", "Ons", "Tor", "Fre", "Lør"]
+ },
+ labels: {
+ dhx_cal_today_button: "I dag",
+ day_tab: "Dag",
+ week_tab: "Uke",
+ month_tab: "Måned",
+ new_event: "Ny hendelse",
+ icon_save: "Lagre",
+ icon_cancel: "Avbryt",
+ icon_details: "Detaljer",
+ icon_edit: "Rediger",
+ icon_delete: "Slett",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Hendelsen vil bli slettet permanent. Er du sikker?",
+ section_description: "Beskrivelse",
+ section_time: "Tidsperiode",
+
+ /*recurring events*/
+ confirm_recurring: "Vil du forandre hele dette settet av repeterende hendelser?",
+ section_recurring: "Repeter hendelsen",
+ button_recurring: "Av",
+ button_recurring_open: "På",
+ button_edit_series: "Rediger serien",
+ button_edit_occurrence: "Redigere en kopi",
+
+ /*agenda view extension*/
+ agenda_tab: "Agenda",
+ date: "Dato",
+ description: "Beskrivelse",
+
+ /*year view extension*/
+ year_tab: "År",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Grid"
+ }
+}; \ No newline at end of file
diff --git a/sources/locale/locale_nl.js b/sources/locale/locale_nl.js
new file mode 100644
index 0000000..9ec0a2f
--- /dev/null
+++ b/sources/locale/locale_nl.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"],
+ month_short: ["Jan", "Feb", "mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ day_full: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"],
+ day_short: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"]
+ },
+ labels: {
+ dhx_cal_today_button: "Vandaag",
+ day_tab: "Dag",
+ week_tab: "Week",
+ month_tab: "Maand",
+ new_event: "Nieuw item",
+ icon_save: "Opslaan",
+ icon_cancel: "Annuleren",
+ icon_details: "Details",
+ icon_edit: "Edit",
+ icon_delete: "Verwijderen",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Item zal permanent worden verwijderd, doorgaan?",
+ section_description: "Beschrijving",
+ section_time: "Tijd periode",
+ full_day: "Hele dag",
+
+ confirm_recurring: "Wilt u alle terugkerende items bijwerken?",
+ section_recurring: "Item herhalen",
+ button_recurring: "Uit",
+ button_recurring_open: "Aan",
+ button_edit_series: "Bewerk de serie",
+ button_edit_occurrence: "Bewerk een kopie",
+
+ /*agenda view extension*/
+ agenda_tab: "Agenda",
+ date: "Datum",
+ description: "Omschrijving",
+
+ /*year view extension*/
+ year_tab: "Jaar",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Tabel"
+ }
+};
+
+
diff --git a/sources/locale/locale_no.js b/sources/locale/locale_no.js
new file mode 100644
index 0000000..deb5da2
--- /dev/null
+++ b/sources/locale/locale_no.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"],
+ month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"],
+ day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"],
+ day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"]
+ },
+ labels: {
+ dhx_cal_today_button: "Idag",
+ day_tab: "Dag",
+ week_tab: "Uke",
+ month_tab: "Måned",
+ new_event: "Ny",
+ icon_save: "Lagre",
+ icon_cancel: "Avbryt",
+ icon_details: "Detaljer",
+ icon_edit: "Endre",
+ icon_delete: "Slett",
+ confirm_closing: "Endringer blir ikke lagret, er du sikker?", //Endringer blir ikke lagret, er du sikker?
+ confirm_deleting: "Oppføringen vil bli slettet, er du sikker?",
+ section_description: "Beskrivelse",
+ section_time: "Tidsperiode",
+ full_day: "Full dag",
+
+ /*recurring events*/
+ confirm_recurring: "Vil du endre hele settet med repeterende oppføringer?",
+ section_recurring: "Repeterende oppføring",
+ button_recurring: "Ikke aktiv",
+ button_recurring_open: "Aktiv",
+ button_edit_series: "Rediger serien",
+ button_edit_occurrence: "Redigere en kopi",
+
+ /*agenda view extension*/
+ agenda_tab: "Agenda",
+ date: "Dato",
+ description: "Beskrivelse",
+
+ /*year view extension*/
+ year_tab: "År",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Grid"
+ }
+};
+
diff --git a/sources/locale/locale_pl.js b/sources/locale/locale_pl.js
new file mode 100644
index 0000000..bec7d34
--- /dev/null
+++ b/sources/locale/locale_pl.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"],
+ month_short: ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"],
+ day_full: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"],
+ day_short: ["Nie", "Pon", "Wto", "Śro", "Czw", "Pią", "Sob"]
+ },
+ labels: {
+ dhx_cal_today_button: "Dziś",
+ day_tab: "Dzień",
+ week_tab: "Tydzień",
+ month_tab: "Miesiąc",
+ new_event: "Nowe zdarzenie",
+ icon_save: "Zapisz",
+ icon_cancel: "Anuluj",
+ icon_details: "Szczegóły",
+ icon_edit: "Edytuj",
+ icon_delete: "Usuń",
+ confirm_closing: "", //Zmiany zostaną usunięte, jesteś pewien?
+ confirm_deleting: "Zdarzenie zostanie usunięte na zawsze, kontynuować?",
+ section_description: "Opis",
+ section_time: "Okres czasu",
+ full_day: "Cały dzień",
+
+ /*recurring events*/
+ confirm_recurring: "Czy chcesz edytować cały zbiór powtarzających się zdarzeń?",
+ section_recurring: "Powtórz zdarzenie",
+ button_recurring: "Nieaktywne",
+ button_recurring_open: "Aktywne",
+ button_edit_series: "Edytuj serię",
+ button_edit_occurrence: "Edytuj kopię",
+
+ /*agenda view extension*/
+ agenda_tab: "Agenda",
+ date: "Data",
+ description: "Opis",
+
+ /*year view extension*/
+ year_tab: "Rok",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Tabela"
+ }
+};
+
diff --git a/sources/locale/locale_pt.js b/sources/locale/locale_pt.js
new file mode 100644
index 0000000..323edd5
--- /dev/null
+++ b/sources/locale/locale_pt.js
@@ -0,0 +1,58 @@
+/*
+
+ TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES
+
+ mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /
+
+ www.atrixian.com.br
+
+ */
+
+scheduler.locale = {
+ date: {
+ month_full: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
+ month_short: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
+ day_full: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
+ day_short: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"]
+ },
+ labels: {
+ dhx_cal_today_button: "Hoje",
+ day_tab: "Dia",
+ week_tab: "Semana",
+ month_tab: "Mês",
+ new_event: "Novo evento",
+ icon_save: "Salvar",
+ icon_cancel: "Cancelar",
+ icon_details: "Detalhes",
+ icon_edit: "Editar",
+ icon_delete: "Deletar",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Tem certeza que deseja excluir?",
+ section_description: "Descrição",
+ section_time: "Período de tempo",
+ full_day: "Dia inteiro",
+
+ confirm_recurring: "Deseja editar todos esses eventos repetidos?",
+ section_recurring: "Repetir evento",
+ button_recurring: "Desabilitar",
+ button_recurring_open: "Habilitar",
+ button_edit_series: "Editar a série",
+ button_edit_occurrence: "Editar uma cópia",
+
+ /*agenda view extension*/
+ agenda_tab: "Dia",
+ date: "Data",
+ description: "Descrição",
+
+ /*year view extension*/
+ year_tab: "Ano",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Dia",
+
+ /*grid view extension*/
+ grid_tab: "Grade"
+ }
+};
+
+
diff --git a/sources/locale/locale_ro.js b/sources/locale/locale_ro.js
new file mode 100644
index 0000000..9de4271
--- /dev/null
+++ b/sources/locale/locale_ro.js
@@ -0,0 +1,52 @@
+/*
+ Traducere de Ovidiu Lixandru: http://www.madball.ro
+ */
+
+scheduler.locale = {
+ date:{
+ month_full:["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "November", "December"],
+ month_short:["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ day_full:["Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata"],
+ day_short:["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sa"]
+ },
+ labels:{
+ dhx_cal_today_button:"Astazi",
+ day_tab:"Zi",
+ week_tab:"Saptamana",
+ month_tab:"Luna",
+ new_event:"Eveniment nou",
+ icon_save:"Salveaza",
+ icon_cancel:"Anuleaza",
+ icon_details:"Detalii",
+ icon_edit:"Editeaza",
+ icon_delete:"Sterge",
+ confirm_closing:"Schimbarile nu vor fi salvate, esti sigur?",//Your changes will be lost, are your sure ?
+ confirm_deleting:"Evenimentul va fi sters permanent, esti sigur?",
+ section_description:"Descriere",
+ section_time:"Interval",
+ full_day:"Toata ziua",
+
+ /*recurring events*/
+ confirm_recurring:"Vrei sa editezi toata seria de evenimente repetate?",
+ section_recurring:"Repetare",
+ button_recurring:"Dezactivata",
+ button_recurring_open:"Activata",
+ button_edit_series: "Editeaza serie",
+ button_edit_occurrence: "Editeaza doar intrare",
+
+ /*agenda view extension*/
+ agenda_tab:"Agenda",
+ date:"Data",
+ description:"Descriere",
+
+ /*year view extension*/
+ year_tab:"An",
+
+ /* week agenda extension */
+ week_agenda_tab: "Agenda",
+
+ /*grid view extension*/
+ grid_tab: "Lista"
+ }
+};
+
diff --git a/sources/locale/locale_ru.js b/sources/locale/locale_ru.js
new file mode 100644
index 0000000..5234415
--- /dev/null
+++ b/sources/locale/locale_ru.js
@@ -0,0 +1,46 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Январь", "Февраль", "Март", "Апрель", "Maй", "Июнь", "Июль", "Август", "Сентябрь", "Oктябрь", "Ноябрь", "Декабрь"],
+ month_short: ["Янв", "Фев", "Maр", "Aпр", "Maй", "Июн", "Июл", "Aвг", "Сен", "Окт", "Ноя", "Дек"],
+ day_full: [ "Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
+ day_short: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"]
+ },
+ labels: {
+ dhx_cal_today_button: "Сегодня",
+ day_tab: "День",
+ week_tab: "Неделя",
+ month_tab: "Месяц",
+ new_event: "Новое событие",
+ icon_save: "Сохранить",
+ icon_cancel: "Отменить",
+ icon_details: "Детали",
+ icon_edit: "Изменить",
+ icon_delete: "Удалить",
+ confirm_closing: "", //Ваши изменения будут потеряны, продолжить?
+ confirm_deleting: "Событие будет удалено безвозвратно, продолжить?",
+ section_description: "Описание",
+ section_time: "Период времени",
+ full_day: "Весь день",
+
+ confirm_recurring: "Вы хотите изменить всю серию повторяющихся событий?",
+ section_recurring: "Повторение",
+ button_recurring: "Отключено",
+ button_recurring_open: "Включено",
+ button_edit_series: "Редактировать серию",
+ button_edit_occurrence: "Редактировать экземпляр",
+
+ /*agenda view extension*/
+ agenda_tab: "Список",
+ date: "Дата",
+ description: "Описание",
+
+ /*year view extension*/
+ year_tab: "Год",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Список",
+
+ /*grid view extension*/
+ grid_tab: "Таблица"
+ }
+}
diff --git a/sources/locale/locale_si.js b/sources/locale/locale_si.js
new file mode 100644
index 0000000..34b42ca
--- /dev/null
+++ b/sources/locale/locale_si.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"],
+ month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ day_full: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"],
+ day_short: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"]
+ },
+ labels: {
+ dhx_cal_today_button: "Danes",
+ day_tab: "Dan",
+ week_tab: "Teden",
+ month_tab: "Mesec",
+ new_event: "Nov dogodek",
+ icon_save: "Shrani",
+ icon_cancel: "Prekliči",
+ icon_details: "Podrobnosti",
+ icon_edit: "Uredi",
+ icon_delete: "Izbriši",
+ confirm_closing: "", //Spremembe ne bodo shranjene. Želite nadaljevati ?
+ confirm_deleting: "Dogodek bo izbrisan. Želite nadaljevati?",
+ section_description: "Opis",
+ section_time: "Časovni okvir",
+ full_day: "Ves dan",
+
+ /*recurring events*/
+ confirm_recurring: "Želite urediti celoten set ponavljajočih dogodkov?",
+ section_recurring: "Ponovi dogodek",
+ button_recurring: "Onemogočeno",
+ button_recurring_open: "Omogočeno",
+ button_edit_series: "Edit series",
+ button_edit_occurrence: "Edit occurrence",
+
+ /*agenda view extension*/
+ agenda_tab: "Zadeva",
+ date: "Datum",
+ description: "Opis",
+
+ /*year view extension*/
+ year_tab: "Leto",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Zadeva",
+
+ /*grid view extension*/
+ grid_tab: "Miza"
+ }
+};
+
diff --git a/sources/locale/locale_sk.js b/sources/locale/locale_sk.js
new file mode 100644
index 0000000..51ec587
--- /dev/null
+++ b/sources/locale/locale_sk.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"],
+ month_short: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sept", "Okt", "Nov", "Dec"],
+ day_full: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"],
+ day_short: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"]
+ },
+ labels: {
+ dhx_cal_today_button: "Dnes",
+ day_tab: "Deň",
+ week_tab: "Týždeň",
+ month_tab: "Mesiac",
+ new_event: "Nová udalosť",
+ icon_save: "Uložiť",
+ icon_cancel: "Späť",
+ icon_details: "Detail",
+ icon_edit: "Edituj",
+ icon_delete: "Zmazať",
+ confirm_closing: "Vaše zmeny nebudú uložené. Skutočne?", //Vaše změny budou ztraceny, opravdu ?
+ confirm_deleting: "Udalosť bude natrvalo vymazaná. Skutočne?",
+ section_description: "Poznámky",
+ section_time: "Doba platnosti",
+
+ /*recurring events*/
+ confirm_recurring: "Prajete si upraviť celú radu opakovaných udalostí?",
+ section_recurring: "Opakovanie udalosti",
+ button_recurring: "Vypnuté",
+ button_recurring_open: "Zapnuté",
+ button_edit_series: "Upraviť opakovania",
+ button_edit_occurrence: "Upraviť inštancie",
+
+ /*agenda view extension*/
+ agenda_tab: "Program",
+ date: "Dátum",
+ description: "Poznámka",
+
+ /*year view extension*/
+ year_tab: "Rok",
+ full_day: "Celý deň", // Full day
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Program",
+
+ /*grid view extension*/
+ grid_tab: "Mriežka"
+ }
+};
+
diff --git a/sources/locale/locale_sv.js b/sources/locale/locale_sv.js
new file mode 100644
index 0000000..5500182
--- /dev/null
+++ b/sources/locale/locale_sv.js
@@ -0,0 +1,53 @@
+/*
+ Copyright DHTMLX LTD. http://www.dhtmlx.com
+ You allowed to use this component or parts of it under GPL terms
+ To use it on other terms please contact us at sales@dhtmlx.com
+ */
+
+scheduler.locale = {
+ date: {
+ month_full: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"],
+ month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
+ day_full: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"],
+ day_short: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"]
+ },
+ labels: {
+ dhx_cal_today_button: "Idag",
+ day_tab: "Dag",
+ week_tab: "Vecka",
+ month_tab: "Månad",
+ new_event: "Ny händelse",
+ icon_save: "Spara",
+ icon_cancel: "Ångra",
+ icon_details: "Detajer",
+ icon_edit: "Ändra",
+ icon_delete: "Ta bort",
+ confirm_closing: "", //Dina förändingar kommer gå förlorade, är du säker?
+ confirm_deleting: "Är du säker på att du vill ta bort händelsen permanent?",
+ section_description: "Beskrivning",
+ section_time: "Tid",
+ full_day: "Hela dagen",
+
+ /*recurring events*/
+ confirm_recurring: "Vill du redigera hela serien med repeterande händelser?",
+ section_recurring: "Upprepa händelse",
+ button_recurring: "Inaktiverat",
+ button_recurring_open: "Aktiverat",
+ button_edit_series: "Redigera serien",
+ button_edit_occurrence: "Redigera en kopia",
+
+ /*agenda view extension*/
+ agenda_tab: "Dagordning",
+ date: "Datum",
+ description: "Beskrivning",
+
+ /*year view extension*/
+ year_tab: "År",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Dagordning",
+
+ /*grid view extension*/
+ grid_tab: "Galler"
+ }
+}; \ No newline at end of file
diff --git a/sources/locale/locale_tr.js b/sources/locale/locale_tr.js
new file mode 100644
index 0000000..d24a7dd
--- /dev/null
+++ b/sources/locale/locale_tr.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Ocak", "Þubat", "Mart", "Nisan", "Mayýs", "Haziran", "Temmuz", "Aðustos", "Eylül", "Ekim", "Kasým", "Aralýk"],
+ month_short: ["Oca", "Þub", "Mar", "Nis", "May", "Haz", "Tem", "Aðu", "Eyl", "Eki", "Kas", "Ara"],
+ day_full: ["Pazar", "Pazartes,", "Salý", "Çarþamba", "Perþembe", "Cuma", "Cumartesi"],
+ day_short: ["Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"]
+ },
+ labels: {
+ dhx_cal_today_button: "Bugün",
+ day_tab: "Gün",
+ week_tab: "Hafta",
+ month_tab: "Ay",
+ new_event: "Uygun",
+ icon_save: "Kaydet",
+ icon_cancel: "Ýptal",
+ icon_details: "Detaylar",
+ icon_edit: "Düzenle",
+ icon_delete: "Sil",
+ confirm_closing: "", //Your changes will be lost, are your sure ?
+ confirm_deleting: "Etkinlik silinecek, devam?",
+ section_description: "Açýklama",
+ section_time: "Zaman aralýðý",
+ full_day: "Tam gün",
+
+ /*recurring events*/
+ confirm_recurring: "Tüm tekrar eden etkinlikler silinecek, devam?",
+ section_recurring: "Etkinliði tekrarla",
+ button_recurring: "Pasif",
+ button_recurring_open: "Aktif",
+ button_edit_series: "Dizi düzenleme",
+ button_edit_occurrence: "Bir kopyasını düzenleyin",
+
+ /*agenda view extension*/
+ agenda_tab: "Ajanda",
+ date: "Tarih",
+ description: "Açýklama",
+
+ /*year view extension*/
+ year_tab: "Yýl",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Ajanda",
+
+ /*grid view extension*/
+ grid_tab: "Izgara"
+ }
+}
+
diff --git a/sources/locale/locale_ua.js b/sources/locale/locale_ua.js
new file mode 100644
index 0000000..c9ca40a
--- /dev/null
+++ b/sources/locale/locale_ua.js
@@ -0,0 +1,48 @@
+scheduler.locale = {
+ date: {
+ month_full: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"],
+ month_short: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"],
+ day_full: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"],
+ day_short: ["Нед", "Пон", "Вів", "Сер", "Чет", "Птн", "Суб"]
+ },
+ labels: {
+ dhx_cal_today_button: "Сьогодні",
+ day_tab: "День",
+ week_tab: "Тиждень",
+ month_tab: "Місяць",
+ new_event: "Нова подія",
+ icon_save: "Зберегти",
+ icon_cancel: "Відміна",
+ icon_details: "Деталі",
+ icon_edit: "Редагувати",
+ icon_delete: "Вилучити",
+ confirm_closing: "", //Ваші зміни втратяться. Ви впевнені ?
+ confirm_deleting: "Подія вилучиться назавжди. Ви впевнені?",
+ section_description: "Опис",
+ section_time: "Часовий проміжок",
+ full_day: "Весь день",
+
+ /*recurring events*/
+ confirm_recurring: "Хочете редагувати весь перелік повторюваних подій?",
+ section_recurring: "Повторювана подія",
+ button_recurring: "Відключено",
+ button_recurring_open: "Включено",
+ button_edit_series: "Редагувати серію",
+ button_edit_occurrence: "Редагувати примірник",
+
+ /*agenda view extension*/
+ agenda_tab: "Перелік",
+ date: "Дата",
+ description: "Опис",
+
+ /*year view extension*/
+ year_tab: "Рік",
+
+ /*week agenda view extension*/
+ week_agenda_tab: "Перелік",
+
+ /*grid view extension*/
+ grid_tab: "Таблиця"
+ }
+}
+
diff --git a/sources/locale/recurring/locale_recurring_be.js b/sources/locale/recurring/locale_recurring_be.js
new file mode 100644
index 0000000..7731ccf
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_be.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Дзень</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Тыдзень</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Месяц</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Год</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Кожны</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />дзень<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Кожны працоўны дзень</label> </div> <div style="display:none;" id="dhx_repeat_week"> Паўтараць кожны<input class="dhx_repeat_text" type="text" name="week_count" value="1" />тыдзень<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Панядзелак</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Чацвер</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Аўторак</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Пятніцу</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Сераду&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Суботу</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Нядзелю</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Паўтараць</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" /> чысла кожнага<input class="dhx_repeat_text" type="text" name="month_count" value="1" />месяцу<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Панядзелак<option value="2">Аўторак<option value="3">Серада<option value="4">Чацвер<option value="5">Пятніца<option value="6">Субота<option value="0">Нядзеля</select>кожны <input class="dhx_repeat_text" type="text" name="month_count2" value="1" />месяц<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/></label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />день<select name="year_month"><option value="0" selected >Студзеня<option value="1">Лютага<option value="2">Сакавіка<option value="3">Красавіка<option value="4">Мая<option value="5">Чэрвеня<option value="6">Ліпeня<option value="7">Жніўня<option value="8">Верасня<option value="9">Кастрычніка<option value="10">Лістапада<option value="11">Снежня</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Панядзелак<option value="2">Аўторак<option value="3">Серада<option value="4">Чацвер<option value="5">Пятніца<option value="6">Субота<option value="0">Нядзеля</select><select name="year_month2"><option value="0" selected >Студзеня<option value="1">Лютага<option value="2">Сакавіка<option value="3">Красавіка<option value="4">Мая<option value="5">Чэрвеня<option value="6">Лiпeня<option value="7">Жніўня<option value="8">Верасня<option value="9">Кастрычніка<option value="10">Лістапада<option value="11">Снежня</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Без даты заканчэння</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" /></label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />паўтораў<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Да </label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_cn.js b/sources/locale/recurring/locale_recurring_cn.js
new file mode 100644
index 0000000..72064e2
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_cn.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />按天</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>按周</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />按月</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />按年</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>每</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />天<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>每个工作日</label> </div> <div style="display:none;" id="dhx_repeat_week"> 重复 每<input class="dhx_repeat_text" type="text" name="week_count" value="1" />星期的:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />星期一</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />星期四</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />星期二</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />星期五</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />星期三</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />星期六</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />星期日</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>重复</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />日 每<input class="dhx_repeat_text" type="text" name="month_count" value="1" />月<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>在</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >星期一<option value="2">星期二<option value="3">星期三<option value="4">星期四<option value="5">星期五<option value="6">星期六<option value="0">星期日</select>每<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />月<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>每</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />日<select name="year_month"><option value="0" selected >一月<option value="1">二月<option value="2">三月<option value="3">四月<option value="4">五月<option value="5">六月<option value="6">七月<option value="7">八月<option value="8">九月<option value="9">十月<option value="10">十一月<option value="11">十二月</select>月<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>在</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >星期一<option value="2">星期二<option value="3">星期三<option value="4">星期四<option value="5">星期五<option value="6">星期六<option value="7">星期日</select>的<select name="year_month2"><option value="0" selected >一月<option value="1">二月<option value="2">三月<option value="3">四月<option value="4">五月<option value="5">六月<option value="6">七月<option value="7">八月<option value="8">九月<option value="9">十月<option value="10">十一月<option value="11">十二月</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>无结束日期</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />重复</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />次结束<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />结束于</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_cs.js b/sources/locale/recurring/locale_recurring_cs.js
new file mode 100644
index 0000000..c207046
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_cs.js
@@ -0,0 +1 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"><form><div class="dhx_repeat_left"><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Denně</label><br /><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Týdně</label><br /><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Měsíčně</label><br /><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Ročně</label></div><div class="dhx_repeat_divider"></div><div class="dhx_repeat_center"><div style="display:none;" id="dhx_repeat_day"><label>Opakované:<br/></label><label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>každý</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />Den<br /><label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>pracovní dny</label></div><div style="display:none;" id="dhx_repeat_week"> Opakuje každých<input class="dhx_repeat_text" type="text" name="week_count" value="1" />Týdnů na:<br /><table class="dhx_repeat_days"><tr> <td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Pondělí</label><br /><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Čtvrtek</label> </td> <td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Úterý</label><br /><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Pátek</label> </td> <td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Středa</label><br /><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sobota</label> </td> <td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Neděle </label><br /><br /> </td></tr></table></div><div id="dhx_repeat_month"><label>Opakované:<br/></label><label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>u každého</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />Den každého<input class="dhx_repeat_text" type="text" name="month_count" value="1" />Měsíc<br /><label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>na</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Pondělí<option value="2">Úterý<option value="3">Středa<option value="4">Čtvrtek<option value="5">Pátek<option value="6">Sobota<option value="0">Neděle</select>každý<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />Měsíc<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label>Opakované:</label> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>u každého</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />Den v<select name="year_month"><option value="0" selected >Leden<option value="1">Únor<option value="2">Březen<option value="3">Duben<option value="4">Květen<option value="5">Červen<option value="6">Červenec<option value="7">Srpen<option value="8">Září<option value="9">Říjen<option value="10">Listopad<option value="11">Prosinec</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>na</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Pondělí<option value="2">Úterý<option value="3">Středa<option value="4">Čtvrtek<option value="5">Pátek<option value="6">Sobota<option value="0">Neděle</select>v<select name="year_month2"><option value="0" selected >Leden<option value="1">Únor<option value="2">Březen<option value="3">Duben<option value="4">Květen<option value="5">Červen<option value="6">Červenec<option value="7">Srpen<option value="8">Září<option value="9">Říjen<option value="10">Listopad<option value="11">Prosinec</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>bez data ukončení</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />po</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />Události<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Konec</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /></div> </form> </div> <div style="clear:both"> </div>';
diff --git a/sources/locale/recurring/locale_recurring_da.js b/sources/locale/recurring/locale_recurring_da.js
new file mode 100644
index 0000000..9acc2f3
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_da.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Daglig</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Ugenlig</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Månedlig</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Årlig</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label>Gentager sig:<br/></label> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Hver</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dag<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>På hver arbejdsdag</label> </div> <div style="display:none;" id="dhx_repeat_week"> Gentager sig hver<input class="dhx_repeat_text" type="text" name="week_count" value="1" />uge på følgende dage:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Mandag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Torsdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tirsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Fredag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Onsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Lørdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Søndag</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label>Gentager sig:<br/></label> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Hver den</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" /> i hver<input class="dhx_repeat_text" type="text" name="month_count" value="1" />måned<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Den</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Mandag<option value="2">Tirsdag<option value="3">Onsdag<option value="4">Torsdag<option value="5">Fredag<option value="6">Lørdag<option value="0">Søndag</select>hver<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />måned<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label>Gentager sig:</label> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>På hver</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dag i<select name="year_month"><option value="0" selected >Januar<option value="1">Februar<option value="2">März<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Dezember</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Den</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Mandag<option value="2">Tirsdag<option value="3">Onsdag<option value="4">Torsdag<option value="5">Fredag<option value="6">Lørdag<option value="0">Søndag</select>i<select name="year_month2"><option value="0" selected >Januar<option value="1">Februar<option value="2">März<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Dezember</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Ingen slutdato</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Efter</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />gentagelse<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Slut</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_de.js b/sources/locale/recurring/locale_recurring_de.js
new file mode 100644
index 0000000..eb1cc3e
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_de.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Täglich</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Wöchentlich</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Monatlich</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Jährlich</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label>Wiederholt sich:<br/></label> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>jeden</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />Tag<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>an jedem Arbeitstag</label> </div> <div style="display:none;" id="dhx_repeat_week"> Wiederholt sich jede<input class="dhx_repeat_text" type="text" name="week_count" value="1" />Woche am:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Montag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Donnerstag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Dienstag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Freitag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Mittwoch</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Samstag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sonntag</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label>Wiederholt sich:<br/></label> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>an jedem</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />Tag eines jeden<input class="dhx_repeat_text" type="text" name="month_count" value="1" />Monats<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>am</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Montag<option value="2">Dienstag<option value="3">Mittwoch<option value="4">Donnerstag<option value="5">Freitag<option value="6">Samstag<option value="0">Sonntag</select>jeden<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />Monats<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label>Wiederholt sich:</label> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>an jedem</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />Tag im<select name="year_month"><option value="0" selected >Januar<option value="1">Februar<option value="2">März<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Dezember</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>am</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Montag<option value="2">Dienstag<option value="3">Mittwoch<option value="4">Donnerstag<option value="5">Freitag<option value="6">Samstag<option value="0">Sonntag</select>im<select name="year_month2"><option value="0" selected >Januar<option value="1">Februar<option value="2">März<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Dezember</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>kein Enddatum</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />nach</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />Ereignissen<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Schluß</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_el.js b/sources/locale/recurring/locale_recurring_el.js
new file mode 100644
index 0000000..e655a37
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_el.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Ημερησίως</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Εβδομαδιαίως</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Μηνιαίως</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Ετησίως</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Κάθε</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />ημέρα<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Κάθε εργάσιμη</label> </div> <div style="display:none;" id="dhx_repeat_week"> Επανάληψη κάθε<input class="dhx_repeat_text" type="text" name="week_count" value="1" />εβδομάδα τις επόμενες ημέρες:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Δευτέρα</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Πέμπτη</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Τρίτη</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Παρασκευή</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Τετάρτη</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Σάββατο</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Κυριακή</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Επανάληψη</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />ημέρα κάθε<input class="dhx_repeat_text" type="text" name="month_count" value="1" />μήνα<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Την</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Δευτέρα<option value="2">Τρίτη<option value="3">Τετάρτη<option value="4">Πέμπτη<option value="5">Παρασκευή<option value="6">Σάββατο<option value="0">Κυριακή</select>κάθε<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />μήνα<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Κάθε</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />ημέρα<select name="year_month"><option value="0" selected >Ιανουάριος<option value="1">Φεβρουάριος<option value="2">Μάρτιος<option value="3">Απρίλιος<option value="4">Μάϊος<option value="5">Ιούνιος<option value="6">Ιούλιος<option value="7">Αύγουστος<option value="8">Σεπτέμβριος<option value="9">Οκτώβριος<option value="10">Νοέμβριος<option value="11">Δεκέμβριος</select>μήνα<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Την</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Δευτέρα<option value="2">Τρίτη<option value="3">Τετάρτη<option value="4">Πέμπτη<option value="5">Παρασκευή<option value="6">Σάββατο<option value="7">Κυριακή</select>του<select name="year_month2"><option value="0" selected >Ιανουάριος<option value="1">Φεβρουάριος<option value="2">Μάρτιος<option value="3">Απρίλιος<option value="4">Μάϊος<option value="5">Ιούνιος<option value="6">Ιούλιος<option value="7">Αύγουστος<option value="8">Σεπτέμβριος<option value="9">Οκτώβριος<option value="10">Νοέμβριος<option value="11">Δεκέμβριος</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Χωρίς ημερομηνία λήξεως</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Μετά από</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />επαναλήψεις<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Λήγει την</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_es.js b/sources/locale/recurring/locale_recurring_es.js
new file mode 100644
index 0000000..cbf66cd
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_es.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Diariamente</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Semanalment</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensualmente</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Anualmente</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Cada</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dia<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Cada jornada de trabajo</label> </div> <div style="display:none;" id="dhx_repeat_week"> Repetir cada<input class="dhx_repeat_text" type="text" name="week_count" value="1" />semana:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Lunes</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Jeuves</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Martes</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Viernes</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Miércoles</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sabado</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Domingo</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repita</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dia cada <input class="dhx_repeat_text" type="text" name="month_count" value="1" />mes<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>El</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Lunes<option value="2">Martes<option value="3">Miércoles<option value="4">Jeuves<option value="5">Viernes<option value="6">Sabado<option value="0">Domingo</select>cada<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mes<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Cada</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dia<select name="year_month"><option value="0" selected >Enero<option value="1">Febrero<option value="2">Маrzo<option value="3">Аbril<option value="4">Mayo<option value="5">Junio<option value="6">Julio<option value="7">Аgosto<option value="8">Setiembre<option value="9">Octubre<option value="10">Noviembre<option value="11">Diciembre</select>mes<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>El</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Lunes<option value="2">Martes<option value="3">Miércoles<option value="4">Jeuves<option value="5">Viernes<option value="6">Sabado<option value="0">Domingo</select>del<select name="year_month2"><option value="0" selected >Enero<option value="1">Febrero<option value="2">Маrzo<option value="3">Аbril<option value="4">Mayo<option value="5">Junio<option value="6">Julio<option value="7">Аgosto<option value="8">Setiembre<option value="9">Octubre<option value="10">Noviembre<option value="11">Diciembre</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Sin fecha de finalización</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Después de</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurencias<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Fin</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_fi.js b/sources/locale/recurring/locale_recurring_fi.js
new file mode 100644
index 0000000..bcb45ad
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_fi.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />P&auml;ivitt&auml;in</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Viikoittain</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Kuukausittain</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Vuosittain</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Joka</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />p&auml;iv&auml;<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Joka arkip&auml;iv&auml;</label> </div> <div style="display:none;" id="dhx_repeat_week">Toista joka<input class="dhx_repeat_text" type="text" name="week_count" value="1" />viikko n&auml;in&auml; p&auml;ivin&auml;:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Maanantai</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Torstai</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tiistai</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Perjantai</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Keskiviikko</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Lauantai</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sunnuntai</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Toista</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />p&auml;iv&auml;n&auml; joka<input class="dhx_repeat_text" type="text" name="month_count" value="1" />kuukausi<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Maanantai<option value="2">Tiistai<option value="3">Keskiviikko<option value="4">Torstai<option value="5">Perjantai<option value="6">Lauantai<option value="0">Sunnuntai</select>joka<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />kuukausi<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Joka</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />p&auml;iv&auml;<select name="year_month"><option value="0" selected >Tammikuu<option value="1">Helmikuu<option value="2">Maaliskuu<option value="3">Huhtikuu<option value="4">Toukokuu<option value="5">Kes&auml;kuu<option value="6">Hein&auml;kuu<option value="7">Elokuu<option value="8">Syyskuu<option value="9">Lokakuu<option value="10">Marraskuu<option value="11">Joulukuu</select>kuukausi<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Maanantai<option value="2">Tiistai<option value="3">Keskiviikko<option value="4">Torstai<option value="5">Perjantai<option value="6">Lauantai<option value="0">Sunnuntai</select><select name="year_month2"><option value="0" selected >Tammikuu<option value="1">Helmikuu<option value="2">Maaliskuu<option value="3">Huhtikuu<option value="4">Toukokuu<option value="5">Kes&auml;kuu<option value="6">Hein&auml;kuu<option value="7">Elokuu<option value="8">Syyskuu<option value="9">Lokakuu<option value="10">Marraskuu<option value="11">Joulukuu</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Ei loppumisaikaa</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" /></label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />Toiston j&auml;lkeen<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Loppuu</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_fr.js b/sources/locale/recurring/locale_recurring_fr.js
new file mode 100644
index 0000000..478e26e
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_fr.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Quotidienne</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Hebdomadaire</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensuelle</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Annuelle</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Chaque</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />jour<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Chaque journée de travail</label> </div> <div style="display:none;" id="dhx_repeat_week"> Répéter toutes les<input class="dhx_repeat_text" type="text" name="week_count" value="1" />semaine:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Lundi</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Jeudi</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Mardi</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Vendredi</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Mercredi</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Samedi</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Dimanche</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Répéter</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />jour chaque<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mois<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Le</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Lundi<option value="2">Mardi<option value="3">Mercredi<option value="4">Jeudi<option value="5">Vendredi<option value="6">Samedi<option value="0">Dimanche</select>chaque<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mois<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Chaque</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />jour<select name="year_month"><option value="0" selected >Janvier<option value="1">Février<option value="2">Mars<option value="3">Avril<option value="4">Mai<option value="5">Juin<option value="6">Juillet<option value="7">Août<option value="8">Septembre<option value="9">Octobre<option value="10">Novembre<option value="11">Décembre</select>mois<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Le</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Lundi<option value="2">Mardi<option value="3">Mercredi<option value="4">Jeudi<option value="5">Vendredi<option value="6">Samedi<option value="0">Dimanche</select>du<select name="year_month2"><option value="0" selected >Janvier<option value="1">Février<option value="2">Mars<option value="3">Avril<option value="4">Mai<option value="5">Juin<option value="6">Juillet<option value="7">Août<option value="8">Septembre<option value="9">Octobre<option value="10">Novembre<option value="11">Décembre</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Pas de date d&quot;achèvement</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Après</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurrences<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Fin</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_it.js b/sources/locale/recurring/locale_recurring_it.js
new file mode 100644
index 0000000..afeb16a
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_it.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Quotidiano</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Settimanale</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensile</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Annuale</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Ogni</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />giorno<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Ogni giornata lavorativa</label> </div> <div style="display:none;" id="dhx_repeat_week"> Ripetere ogni<input class="dhx_repeat_text" type="text" name="week_count" value="1" />settimana:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Lunedì</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Jovedì</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Martedì</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Venerdì</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Mercoledì</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sabato</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Domenica</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Ripetere</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />giorno ogni<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mese<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Il</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Lunedì<option value="2">Martedì<option value="3">Mercoledì<option value="4">Jovedì<option value="5">Venerdì<option value="6">Sabato<option value="0">Domenica</select>ogni<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mese<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Ogni</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />giorno<select name="year_month"><option value="0" selected >Gennaio<option value="1">Febbraio<option value="2">Marzo<option value="3">Aprile<option value="4">Maggio<option value="5">Jiugno<option value="6">Luglio<option value="7">Agosto<option value="8">Settembre<option value="9">Ottobre<option value="10">Novembre<option value="11">Dicembre</select>mese<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Il</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Lunedì<option value="2">Martedì<option value="3">Mercoledì<option value="4">Jovedì<option value="5">Venerdì<option value="6">Sabato<option value="0">Domenica</select>del<select name="year_month2"><option value="0" selected >Gennaio<option value="1">Febbraio<option value="2">Marzo<option value="3">Aprile<option value="4">Maggio<option value="5">Jiugno<option value="6">Luglio<option value="7">Agosto<option value="8">Settembre<option value="9">Ottobre<option value="10">Novembre<option value="11">Dicembre</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Senza data finale</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Dopo</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occorenze<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Fine</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_nb.js b/sources/locale/recurring/locale_recurring_nb.js
new file mode 100644
index 0000000..26e93bb
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_nb.js
@@ -0,0 +1 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Daglig</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Ukentlig</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Månedlig</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Årlig</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label>Gjenta:<br/></label> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Hver</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dag<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Alle hverdager</label> </div> <div style="display:none;" id="dhx_repeat_week"> Gjentas hver<input class="dhx_repeat_text" type="text" name="week_count" value="1" />uke på:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Mandag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Torsdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tirsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Fredag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Onsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Lørdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sondag</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label>Gjenta:<br/></label> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>På hver</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dag hver<input class="dhx_repeat_text" type="text" name="month_count" value="1" />måned<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>På</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Mandag<option value="2">Tirsdag<option value="3">Onsdag<option value="4">Torsdag<option value="5">Fredag<option value="6">Lørdag<option value="0">Søndag</select>hver<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />måned<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label>Gjenta:</label> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>på hver</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dag i<select name="year_month"><option value="0" selected >Januar<option value="1">Februar<option value="2">Mars<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Desember</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>på</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Mandag<option value="2">Tirsdag<option value="3">Onsdag<option value="4">Torsdag<option value="5">Fredag<option value="6">Lørdag<option value="0">Søndag</select>i<select name="year_month2"><option value="0" selected >Januar<option value="1">Februar<option value="2">Mars<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Desember</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Ingen sluttdato</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Etter</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />forekomst<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Stop den</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>'; \ No newline at end of file
diff --git a/sources/locale/recurring/locale_recurring_nl.js b/sources/locale/recurring/locale_recurring_nl.js
new file mode 100644
index 0000000..e9562f2
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_nl.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Dagelijks</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Wekelijks</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Maandelijks</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Jaarlijks</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Elke</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dag(en)<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Elke werkdag</label> </div> <div style="display:none;" id="dhx_repeat_week"> Herhaal elke<input class="dhx_repeat_text" type="text" name="week_count" value="1" />week op de volgende dagen:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Maandag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Donderdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Dinsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Vrijdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Woensdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Zaterdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Zondag</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Herhaal</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dag iedere<input class="dhx_repeat_text" type="text" name="month_count" value="1" />maanden<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Op</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"> <option value="1">Maandag <option value="2">Dinsdag <option value="3">Woensdag <option value="4">Donderdag <option value="5">Vrijdag <option value="6">Zaterdag <option value="0">Zondag </select>iedere<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />maanden<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Iedere</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dag<select name="year_month"><option value="0" selected >Januari<option value="1">Februari<option value="2">Maart<option value="3">April<option value="4">Mei<option value="5">Juni<option value="6">Juli<option value="7">Augustus<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">December</select>maand<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Op</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Maandag<option value="2">Dinsdag<option value="3">Woensdag<option value="4">Donderdag<option value="5">Vrijdag<option value="6">Zaterdag<option value="7">Zondag</select>van<select name="year_month2"><option value="0" selected >Januari<option value="1">Februari<option value="2">Maart<option value="3">April<option value="4">Mei<option value="5">Juni<option value="6">Juli<option value="7">Augustus<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">December</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Geen eind datum</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Na</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />keren<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Eindigd per</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_pl.js b/sources/locale/recurring/locale_recurring_pl.js
new file mode 100644
index 0000000..390e6a7
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_pl.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Codziennie</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Co tydzie�</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Co miesi�c</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Co rok</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Ka�dego</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dnia<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Ka�dego dnia roboczego</label> </div> <div style="display:none;" id="dhx_repeat_week"> Powtarzaj ka�dego<input class="dhx_repeat_text" type="text" name="week_count" value="1" />tygodnia w dni:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Poniedzia�ek</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Czwartek</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Wtorek</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Pi�tek</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />�roda</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sobota</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Niedziela</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Powt�rz</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dnia ka�dego<input class="dhx_repeat_text" type="text" name="month_count" value="1" />miesi�ca<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>W</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Poniedzia�ek<option value="2">Wtorek<option value="3">�roda<option value="4">Czwartek<option value="5">Pi�tek<option value="6">Sobota<option value="0">Niedziela</select>ka�dego<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />miesi�ca<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Ka�dego</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dnia miesi�ca<select name="year_month"><option value="0" selected >Stycznia<option value="1">Lutego<option value="2">Marca<option value="3">Kwietnia<option value="4">Maja<option value="5">Czerwca<option value="6">Lipca<option value="7">Sierpnia<option value="8">Wrze�nia<option value="9">Pa�dziernka<option value="10">Listopada<option value="11">Grudnia</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>W</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Poniedzia�ek<option value="2">Wtorek<option value="3">�rod�<option value="4">Czwartek<option value="5">Pi�tek<option value="6">Sobot�<option value="7">Niedziel�</select>miesi�ca<select name="year_month2"><option value="0" selected >Stycznia<option value="1">Lutego<option value="2">Marca<option value="3">Kwietnia<option value="4">Maja<option value="5">Czerwca<option value="6">Lipca<option value="7">Sierpnia<option value="8">Wrze�nia<option value="9">Pa�dziernka<option value="10">Listopada<option value="11">Grudnia</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Bez daty ko�cowej</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Po</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />wyst�pieniu/ach<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Zako�cz w</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_pt.js b/sources/locale/recurring/locale_recurring_pt.js
new file mode 100644
index 0000000..2367b11
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_pt.js
@@ -0,0 +1 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Diário</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Semanal</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensal</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Anual</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Cada</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dia(s)<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Cada trabalho diário</label> </div> <div style="display:none;" id="dhx_repeat_week"> Repita cada<input class="dhx_repeat_text" type="text" name="week_count" value="1" />semana:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Segunda</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Quinta</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Terça</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Sexta</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Quarta</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sábado</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Domingo</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repetir</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />todo dia<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mês<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Em</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Segunda<option value="2">Terça<option value="3">Quarta<option value="4">Quinta<option value="5">Sexta<option value="6">Sábado<option value="0">Domingo</select>todo<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mês<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Todo</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dia<select name="year_month"><option value="0" selected >Janeiro<option value="1">Fevereiro<option value="2">Março<option value="3">Abril<option value="4">Maio<option value="5">Junho<option value="6">Julho<option value="7">Agosto<option value="8">Setembro<option value="9">Outubro<option value="10">Novembro<option value="11">Dezembro</select>mês<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Em</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Segunda<option value="2">Terça<option value="3">Quarta<option value="4">Quinta<option value="5">Sexta<option value="6">Sábado<option value="7">Domingo</select>of<select name="year_month2"><option value="0" selected >Janeiro<option value="1">Fevereiro<option value="2">Março<option value="3">Abril<option value="4">Maio<option value="5">Junho<option value="6">Julho<option value="7">Agosto<option value="8">Setembro<option value="9">Outubro<option value="10">Novembro<option value="11">Dezembro</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Sem data final</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Depois</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />ocorrências<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Fim</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>'; \ No newline at end of file
diff --git a/sources/locale/recurring/locale_recurring_ro.js b/sources/locale/recurring/locale_recurring_ro.js
new file mode 100644
index 0000000..8dbfe2a
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_ro.js
@@ -0,0 +1,6 @@
+/*
+ Traducere de Ovidiu Lixandru: http://www.madball.ro
+ */
+
+ scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Zilnic</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Saptamanal</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Lunar</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Anual</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>La fiecare</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />zi(le)<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Fiecare zi lucratoare</label> </div> <div style="display:none;" id="dhx_repeat_week"> Repeta la fiecare<input class="dhx_repeat_text" type="text" name="week_count" value="1" />saptamana in urmatoarele zile:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Luni</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Joi</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Marti</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Vineri</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Miercuri</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sambata</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Duminica</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repeta in</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />zi la fiecare<input class="dhx_repeat_text" type="text" name="month_count" value="1" />luni<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>In a</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" />zi de<select name="month_day2"><option value="1" selected >Luni<option value="2">Marti<option value="3">Miercuri<option value="4">Joi<option value="5">Vineri<option value="6">Sambata<option value="0">Duminica</select>la fiecare<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />luni<br /> </div> <div id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>In</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />zi a lunii<select name="year_month"><option value="0" selected >Ianuarie<option value="1">Februarie<option value="2">Martie<option value="3">Aprilie<option value="4">Mai<option value="5">Iunie<option value="6">Iulie<option value="7">August<option value="8">Septembrie<option value="9">Octombrie<option value="10">Noiembrie<option value="11">Decembrie</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>In</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" />zi de<select name="year_day2"><option value="1" selected >Luni<option value="2">Marti<option value="3">Miercuri<option value="4">Joi<option value="5">Vineri<option value="6">Sambata<option value="7">Duminica</select>a lunii<select name="year_month2"><option value="0" selected >Ianuarie<option value="1">Februarie<option value="2">Martie<option value="3">Aprilie<option value="4">Mai<option value="5">Iunie<option value="6">Iulie<option value="7">August<option value="8">Septembrie<option value="9">Octombrie<option value="10">Noiembrie<option value="11">Decembrie</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Fara data de sfarsit</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Dupa</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />evenimente<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />La data</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"></div>';
+
diff --git a/sources/locale/recurring/locale_recurring_ru.js b/sources/locale/recurring/locale_recurring_ru.js
new file mode 100644
index 0000000..67c198a
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_ru.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />День</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Неделя</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Месяц</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Год</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Каждый</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />день<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Каждый рабочий день</label> </div> <div style="display:none;" id="dhx_repeat_week"> Повторять каждую<input class="dhx_repeat_text" type="text" name="week_count" value="1" />неделю , в:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Понедельник</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Четверг</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Вторник</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Пятницу</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Среду&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Субботу</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Воскресенье</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Повторять</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" /> числа каждый <input class="dhx_repeat_text" type="text" name="month_count" value="1" />месяц<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Понедельник<option value="2">Вторник<option value="3">Среда<option value="4">Четверг<option value="5">Пятница<option value="6">Суббота<option value="0">Воскресенье</select>каждый <input class="dhx_repeat_text" type="text" name="month_count2" value="1" />месяц<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/></label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />день<select name="year_month"><option value="0" selected >Января<option value="1">Февраля<option value="2">Марта<option value="3">Апреля<option value="4">Мая<option value="5">Июня<option value="6">Июля<option value="7">Августа<option value="8">Сентября<option value="9">Октября<option value="10">Ноября<option value="11">Декабря</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Понедельник<option value="2">Вторник<option value="3">Среда<option value="4">Четверг<option value="5">Пятница<option value="6">Суббота<option value="0">Воскресенье</select><select name="year_month2"><option value="0" selected >Января<option value="1">Февраля<option value="2">Марта<option value="3">Апреля<option value="4">Мая<option value="5">Июня<option value="6">Июля<option value="7">Августа<option value="8">Сентября<option value="9">Октября<option value="10">Ноября<option value="11">Декабря</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Без даты окончания</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" /></label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />повторений<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />До </label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/locale_recurring_sk.js b/sources/locale/recurring/locale_recurring_sk.js
new file mode 100644
index 0000000..abbb1f1
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_sk.js
@@ -0,0 +1 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"><form><div class="dhx_repeat_left"><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Denne</label><br /><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Týždenne</label><br /><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mesaène</label><br /><label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Roène</label></div><div class="dhx_repeat_divider"></div><div class="dhx_repeat_center"><div style="display:none;" id="dhx_repeat_day"><label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Každý</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />deò<br /><label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Každý prac. deò</label></div><div style="display:none;" id="dhx_repeat_week">Opakova každý<input class="dhx_repeat_text" type="text" name="week_count" value="1" />týždeò v dòoch:<br /><table class="dhx_repeat_days"><tr><td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Pondelok</label><br /><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Štvrtok</label></td><td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Utorok</label><br /><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Piatok</label></td><td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Streda</label><br /><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sobota</label></td><td><label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Nede¾a</label><br /><br /></td></tr></table></div><div id="dhx_repeat_month"><label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Opakova</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />deò každý<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mesiac<br /><label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Pondelok<option value="2">Utorok<option value="3">Streda<option value="4">Štvrtok<option value="5">Piatok<option value="6">Sobota<option value="0">Nede¾a</select>každý<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mesiac<br /></div><div style="display:none;" id="dhx_repeat_year"><label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Každý</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />deò<select name="year_month"><option value="0" selected >Január<option value="1">Február<option value="2">Marec<option value="3">Apríl<option value="4">Máj<option value="5">Jún<option value="6">Júl<option value="7">August<option value="8">September<option value="9">Október<option value="10">November<option value="11">December</select>mesiac<br /><label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Pondelok<option value="2">Utorok<option value="3">Streda<option value="4">Štvrtok<option value="5">Piatok<option value="6">Sobota<option value="7">Nede¾a</select>poèas<select name="year_month2"><option value="0" selected >Január<option value="1">Február<option value="2">Marec<option value="3">Apríl<option value="4">Máj<option value="5">Jún<option value="6">Júl<option value="7">August<option value="8">September<option value="9">Október<option value="10">November<option value="11">December</select><br /></div></div><div class="dhx_repeat_divider"></div><div class="dhx_repeat_right"><label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Bez dátumu ukonèenia</label><br /><label><input class="dhx_repeat_radio" type="radio" name="end" />Po</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />udalostiach<br /><label><input class="dhx_repeat_radio" type="radio" name="end" />Ukonèi</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /></div></form></div><div style="clear:both"></div>';
diff --git a/sources/locale/recurring/locale_recurring_sv.js b/sources/locale/recurring/locale_recurring_sv.js
new file mode 100644
index 0000000..965abb6
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_sv.js
@@ -0,0 +1 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Dagligen</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Veckovis</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Månadsvis</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Årligen</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Var</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dag<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Varje arbetsdag</label> </div> <div style="display:none;" id="dhx_repeat_week"> Upprepa var<input class="dhx_repeat_text" type="text" name="week_count" value="1" />vecka dessa dagar:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Måndag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Tisdag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Torsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Fredag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Onsdag</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Lördag</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Söndag</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Upprepa</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dagen var<input class="dhx_repeat_text" type="text" name="month_count" value="1" />månad<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Den</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >måndagen<option value="2">tisdagen<option value="3">onsdagen<option value="4">torsdagen<option value="5">fredagen<option value="6">lördagen<option value="0">söndagen</select>var<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />månad<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Varje</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dag i<select name="year_month"><option value="0" selected >Januari<option value="1">Februari<option value="2">Mars<option value="3">April<option value="4">Maj<option value="5">Juni<option value="6">Juli<option value="7">Augusti<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">December</select>månad<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Den</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >måndagen<option value="2">tisdagen<option value="3">onsdagen<option value="4">torsdagen<option value="5">fredagen<option value="6">lördagen<option value="7">söndagen</select>i<select name="year_month2"><option value="0" selected >Januari<option value="1">Februari<option value="2">Mars<option value="3">April<option value="4">Maj<option value="5">Juni<option value="6">Juli<option value="7">Augusti<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">December</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Inget slutdatum</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Efter</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />upprepningar<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />Sluta efter</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>'; \ No newline at end of file
diff --git a/sources/locale/recurring/locale_recurring_ua.js b/sources/locale/recurring/locale_recurring_ua.js
new file mode 100644
index 0000000..1f56a83
--- /dev/null
+++ b/sources/locale/recurring/locale_recurring_ua.js
@@ -0,0 +1,2 @@
+scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />День</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Тиждень</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Місяць</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Рік</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Кожний</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />день<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Кожний робочий день</label> </div> <div style="display:none;" id="dhx_repeat_week"> Повторювати кожен<input class="dhx_repeat_text" type="text" name="week_count" value="1" />тиждень , по:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Понеділкам</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Четвергам</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Вівторкам</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />П\'ятницям</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Середам&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Суботам</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Неділям</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Повторювати</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" /> числа кожний <input class="dhx_repeat_text" type="text" name="month_count" value="1" />місяць<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Понеділок<option value="2">Вівторок<option value="3">Середа<option value="4">Четвер<option value="5">П\'ятниця<option value="6">Субота<option value="0">Неділя</select>кожен <input class="dhx_repeat_text" type="text" name="month_count2" value="1" />місяць<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/></label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />день<select name="year_month"><option value="0" selected >січня<option value="1">лютого<option value="2">березня<option value="3">квітня<option value="4">травня<option value="5">червня<option value="6">липня<option value="7">серпня<option value="8">вересня<option value="9">жовтня<option value="10">листопада<option value="11">грудня</select><br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >понеділок<option value="2">вівторок<option value="3">середа<option value="4">четвер<option value="5">п\'ятниця<option value="6">субота<option value="0">неділя</select><select name="year_month2"><option value="0" selected >січня<option value="1">лютого<option value="2">березня<option value="3">квітня<option value="4">березня<option value="5">червня<option value="6">липня<option value="7">серпня<option value="8">вересня<option value="9">жовтня<option value="10">листопада<option value="11">грудня</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Без дати закінчення</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" /></label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />повторень<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />До </label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
+
diff --git a/sources/locale/recurring/repeat_template.html b/sources/locale/recurring/repeat_template.html
new file mode 100644
index 0000000..a78451a
--- /dev/null
+++ b/sources/locale/recurring/repeat_template.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Daily</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Weekly</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Monthly</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Yearly</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />day<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Every workday</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Repeat every<input class="dhx_repeat_text" type="text" name="week_count" value="1" />week next days:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Monday</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Thursday</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tuesday</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Friday</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Wednesday</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Saturday</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sunday</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repeat</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />day every<input class="dhx_repeat_text" type="text" name="month_count" value="1" />month<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="0">Sunday</select>every<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />month<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />day<select name="year_month"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select>month<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="7">Sunday</select>of<select name="year_month2"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>No end date</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />After</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurrences<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />End by</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_be.html b/sources/locale/recurring/repeat_template_be.html
new file mode 100644
index 0000000..91bdd70
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_be.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Дзень</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Тыдзень</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Месяц</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Год</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Кожны</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />дзень<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Кожны працоўны дзень</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Паўтараць кожны<input class="dhx_repeat_text" type="text" name="week_count" value="1" />тыдзень<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Панядзелак</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Чацвер</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Аўторак</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Пятніцу</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Сераду&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Суботу</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Нядзелю</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Паўтараць</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" /> чысла кожнага<input class="dhx_repeat_text" type="text" name="month_count" value="1" />месяцу<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Панядзелак<option value="2">Аўторак<option value="3">Серада<option value="4">Чацвер<option value="5">Пятніца<option value="6">Субота<option value="0">Нядзеля</select>кожны <input class="dhx_repeat_text" type="text" name="month_count2" value="1" />месяц<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/></label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />день<select name="year_month"><option value="0" selected >Студзеня<option value="1">Лютага<option value="2">Сакавіка<option value="3">Красавіка<option value="4">Мая<option value="5">Чэрвеня<option value="6">Ліпeня<option value="7">Жніўня<option value="8">Верасня<option value="9">Кастрычніка<option value="10">Лістапада<option value="11">Снежня</select><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Панядзелак<option value="2">Аўторак<option value="3">Серада<option value="4">Чацвер<option value="5">Пятніца<option value="6">Субота<option value="0">Нядзеля</select><select name="year_month2"><option value="0" selected >Студзеня<option value="1">Лютага<option value="2">Сакавіка<option value="3">Красавіка<option value="4">Мая<option value="5">Чэрвеня<option value="6">Лiпeня<option value="7">Жніўня<option value="8">Верасня<option value="9">Кастрычніка<option value="10">Лістапада<option value="11">Снежня</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Без даты заканчэння</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" /></label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />паўтораў<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Да </label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_cn.html b/sources/locale/recurring/repeat_template_cn.html
new file mode 100644
index 0000000..b555997
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_cn.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />按天</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>按周</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />按月</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />按年</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>每</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />天<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>每个工作日</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ 重复 每<input class="dhx_repeat_text" type="text" name="week_count" value="1" />星期的:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />星期一</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />星期四</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />星期二</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />星期五</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />星期三</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />星期六</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />星期日</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>重复</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />日 每<input class="dhx_repeat_text" type="text" name="month_count" value="1" />月<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>在</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >星期一<option value="2">星期二<option value="3">星期三<option value="4">星期四<option value="5">星期五<option value="6">星期六<option value="0">星期日</select>每<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />月<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>每</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />日<select name="year_month"><option value="0" selected >一月<option value="1">二月<option value="2">三月<option value="3">四月<option value="4">五月<option value="5">六月<option value="6">七月<option value="7">八月<option value="8">九月<option value="9">十月<option value="10">十一月<option value="11">十二月</select>月<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>在</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >星期一<option value="2">星期二<option value="3">星期三<option value="4">星期四<option value="5">星期五<option value="6">星期六<option value="7">星期日</select>的<select name="year_month2"><option value="0" selected >一月<option value="1">二月<option value="2">三月<option value="3">四月<option value="4">五月<option value="5">六月<option value="6">七月<option value="7">八月<option value="8">九月<option value="9">十月<option value="10">十一月<option value="11">十二月</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>无结束日期</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />重复</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />次结束<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />结束于</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_de.html b/sources/locale/recurring/repeat_template_de.html
new file mode 100644
index 0000000..79e7adc
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_de.html
@@ -0,0 +1,60 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Täglich</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Wöchentlich</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Monatlich</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Jährlich</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label>Wiederholt sich:<br/></label>
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>jeden</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />Tag<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>an jedem Arbeitstag</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Wiederholt sich jede<input class="dhx_repeat_text" type="text" name="week_count" value="1" />Woche am:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Montag</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Donnerstag</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Dienstag</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Freitag</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Mittwoch</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Samstag</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sonntag</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label>Wiederholt sich:<br/></label>
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>an jedem</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />Tag eines jeden<input class="dhx_repeat_text" type="text" name="month_count" value="1" />Monats<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>am</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Montag<option value="2">Dienstag<option value="3">Mittwoch<option value="4">Donnerstag<option value="5">Freitag<option value="6">Samstag<option value="0">Sonntag</select>jeden<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />Monats<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label>Wiederholt sich:</label>
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>an jedem</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />Tag im<select name="year_month"><option value="0" selected >Januar<option value="1">Februar<option value="2">März<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Dezember</select><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>am</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Montag<option value="2">Dienstag<option value="3">Mittwoch<option value="4">Donnerstag<option value="5">Freitag<option value="6">Samstag<option value="0">Sonntag</select>im<select name="year_month2"><option value="0" selected >Januar<option value="1">Februar<option value="2">März<option value="3">April<option value="4">Mai<option value="5">Juni<option value="6">Juli<option value="7">August<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">Dezember</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>kein Enddatum</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />nach</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />Ereignissen<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Schluß</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_el.html b/sources/locale/recurring/repeat_template_el.html
new file mode 100644
index 0000000..32740ae
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_el.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Ημερησίως</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Εβδομαδιαίως</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Μηνιαίως</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Ετησίως</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Κάθε</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />ημέρα<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Κάθε εργάσιμη</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Επανάληψη κάθε<input class="dhx_repeat_text" type="text" name="week_count" value="1" />εβδομάδα τις επόμενες ημέρες:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Δευτέρα</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Πέμπτη</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Τρίτη</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Παρασκευή</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Τετάρτη</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Σάββατο</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Κυριακή</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Επανάληψη</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />ημέρα κάθε<input class="dhx_repeat_text" type="text" name="month_count" value="1" />μήνα<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Την</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Δευτέρα<option value="2">Τρίτη<option value="3">Τετάρτη<option value="4">Πέμπτη<option value="5">Παρασκευή<option value="6">Σάββατο<option value="0">Κυριακή</select>κάθε<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />μήνα<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Κάθε</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />ημέρα<select name="year_month"><option value="0" selected >Ιανουάριος<option value="1">Φεβρουάριος<option value="2">Μάρτιος<option value="3">Απρίλιος<option value="4">Μάϊος<option value="5">Ιούνιος<option value="6">Ιούλιος<option value="7">Αύγουστος<option value="8">Σεπτέμβριος<option value="9">Οκτώβριος<option value="10">Νοέμβριος<option value="11">Δεκέμβριος</select>μήνα<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Την</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Δευτέρα<option value="2">Τρίτη<option value="3">Τετάρτη<option value="4">Πέμπτη<option value="5">Παρασκευή<option value="6">Σάββατο<option value="7">Κυριακή</select>του<select name="year_month2"><option value="0" selected >Ιανουάριος<option value="1">Φεβρουάριος<option value="2">Μάρτιος<option value="3">Απρίλιος<option value="4">Μάϊος<option value="5">Ιούνιος<option value="6">Ιούλιος<option value="7">Αύγουστος<option value="8">Σεπτέμβριος<option value="9">Οκτώβριος<option value="10">Νοέμβριος<option value="11">Δεκέμβριος</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Χωρίς ημερομηνία λήξεως</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Μετά από</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />επαναλήψεις<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Λήγει την</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_es.html b/sources/locale/recurring/repeat_template_es.html
new file mode 100644
index 0000000..c4d0b6b
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_es.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Diariamente</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Semanalment</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensualmente</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Anualmente</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Cada</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dia<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Cada jornada de trabajo</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Repetir cada<input class="dhx_repeat_text" type="text" name="week_count" value="1" />semana:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Lunes</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Jeuves</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Martes</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Viernes</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Miércoles</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sabado</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Domingo</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repita</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dia cada <input class="dhx_repeat_text" type="text" name="month_count" value="1" />mes<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>El</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Lunes<option value="2">Martes<option value="3">Miércoles<option value="4">Jeuves<option value="5">Viernes<option value="6">Sabado<option value="0">Domingo</select>cada<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mes<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Cada</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dia<select name="year_month"><option value="0" selected >Enero<option value="1">Febrero<option value="2">Маrzo<option value="3">Аbril<option value="4">Mayo<option value="5">Junio<option value="6">Julio<option value="7">Аgosto<option value="8">Setiembre<option value="9">Octubre<option value="10">Noviembre<option value="11">Diciembre</select>mes<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>El</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Lunes<option value="2">Martes<option value="3">Miércoles<option value="4">Jeuves<option value="5">Viernes<option value="6">Sabado<option value="0">Domingo</select>del<select name="year_month2"><option value="0" selected >Enero<option value="1">Febrero<option value="2">Маrzo<option value="3">Аbril<option value="4">Mayo<option value="5">Junio<option value="6">Julio<option value="7">Аgosto<option value="8">Setiembre<option value="9">Octubre<option value="10">Noviembre<option value="11">Diciembre</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Sin fecha de finalización</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Después de</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurencias<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Fin</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_fr.html b/sources/locale/recurring/repeat_template_fr.html
new file mode 100644
index 0000000..5651390
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_fr.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Quotidienne</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Hebdomadaire</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensuelle</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Annuelle</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Chaque</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />jour<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Chaque journée de travail</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Répéter toutes les<input class="dhx_repeat_text" type="text" name="week_count" value="1" />semaine:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Lundi</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Jeudi</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Mardi</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Vendredi</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Mercredi</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Samedi</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Dimanche</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Répéter</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />jour chaque<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mois<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Le</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Lundi<option value="2">Mardi<option value="3">Mercredi<option value="4">Jeudi<option value="5">Vendredi<option value="6">Samedi<option value="0">Dimanche</select>chaque<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mois<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Chaque</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />jour<select name="year_month"><option value="0" selected >Janvier<option value="1">Février<option value="2">Mars<option value="3">Avril<option value="4">Mai<option value="5">Juin<option value="6">Juillet<option value="7">Août<option value="8">Septembre<option value="9">Octobre<option value="10">Novembre<option value="11">Décembre</select>mois<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Le</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Lundi<option value="2">Mardi<option value="3">Mercredi<option value="4">Jeudi<option value="5">Vendredi<option value="6">Samedi<option value="0">Dimanche</select>du<select name="year_month2"><option value="0" selected >Janvier<option value="1">Février<option value="2">Mars<option value="3">Avril<option value="4">Mai<option value="5">Juin<option value="6">Juillet<option value="7">Août<option value="8">Septembre<option value="9">Octobre<option value="10">Novembre<option value="11">Décembre</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Pas de date d&quot;achèvement</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Après</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurrences<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Fin</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_it.html b/sources/locale/recurring/repeat_template_it.html
new file mode 100644
index 0000000..26013a8
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_it.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Quotidiano</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Settimanale</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mensile</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Annuale</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Ogni</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />giorno<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Ogni giornata lavorativa</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Ripetere ogni<input class="dhx_repeat_text" type="text" name="week_count" value="1" />settimana:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Lunedì</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Jovedì</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Martedì</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Venerdì</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Mercoledì</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sabato</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Domenica</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Ripetere</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />giorno ogni<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mese<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Il</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Lunedì<option value="2">Martedì<option value="3">Mercoledì<option value="4">Jovedì<option value="5">Venerdì<option value="6">Sabato<option value="0">Domenica</select>ogni<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mese<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Ogni</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />giorno<select name="year_month"><option value="0" selected >Gennaio<option value="1">Febbraio<option value="2">Marzo<option value="3">Aprile<option value="4">Maggio<option value="5">Jiugno<option value="6">Luglio<option value="7">Agosto<option value="8">Settembre<option value="9">Ottobre<option value="10">Novembre<option value="11">Dicembre</select>mese<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Il</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Lunedì<option value="2">Martedì<option value="3">Mercoledì<option value="4">Jovedì<option value="5">Venerdì<option value="6">Sabato<option value="0">Domenica</select>del<select name="year_month2"><option value="0" selected >Gennaio<option value="1">Febbraio<option value="2">Marzo<option value="3">Aprile<option value="4">Maggio<option value="5">Jiugno<option value="6">Luglio<option value="7">Agosto<option value="8">Settembre<option value="9">Ottobre<option value="10">Novembre<option value="11">Dicembre</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Senza data finale</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Dopo</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occorenze<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Fine</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_nl.html b/sources/locale/recurring/repeat_template_nl.html
new file mode 100644
index 0000000..bb444a7
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_nl.html
@@ -0,0 +1,65 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Dagelijks</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Wekelijks</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Maandelijks</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Jaarlijks</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Elke</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />dag(en)<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Elke werkdag</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Herhaal elke<input class="dhx_repeat_text" type="text" name="week_count" value="1" />week op de volgende dagen:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Maandag</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Donderdag</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Dinsdag</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Vrijdag</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Woensdag</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Zaterdag</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Zondag</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Herhaal</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />dag iedere<input class="dhx_repeat_text" type="text" name="month_count" value="1" />maanden<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>Op</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2">
+ <option value="1">Maandag
+ <option value="2">Dinsdag
+ <option value="3">Woensdag
+ <option value="4">Donderdag
+ <option value="5">Vrijdag
+ <option value="6">Zaterdag
+ <option value="0">Zondag
+ </select>iedere<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />maanden<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Iedere</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />dag<select name="year_month"><option value="0" selected >Januari<option value="1">Februari<option value="2">Maart<option value="3">April<option value="4">Mei<option value="5">Juni<option value="6">Juli<option value="7">Augustus<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">December</select>maand<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>Op</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Maandag<option value="2">Dinsdag<option value="3">Woensdag<option value="4">Donderdag<option value="5">Vrijdag<option value="6">Zaterdag<option value="7">Zondag</select>van<select name="year_month2"><option value="0" selected >Januari<option value="1">Februari<option value="2">Maart<option value="3">April<option value="4">Mei<option value="5">Juni<option value="6">Juli<option value="7">Augustus<option value="8">September<option value="9">Oktober<option value="10">November<option value="11">December</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Geen eind datum</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Na</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />keren<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Eindigd per</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div>
diff --git a/sources/locale/recurring/repeat_template_ro.html b/sources/locale/recurring/repeat_template_ro.html
new file mode 100644
index 0000000..409270b
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_ro.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Zilnic</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Saptamanal</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Lunar</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Anual</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>La fiecare</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />zi(le)<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Fiecare zi lucratoare</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Repeta la fiecare<input class="dhx_repeat_text" type="text" name="week_count" value="1" />saptamana in urmatoarele zile:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Luni</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Joi</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Marti</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Vineri</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Miercuri</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sambata</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Duminica</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repeta in</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />zi la fiecare<input class="dhx_repeat_text" type="text" name="month_count" value="1" />luni<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>In a</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" />zi de<select name="month_day2"><option value="1" selected >Luni<option value="2">Marti<option value="3">Miercuri<option value="4">Joi<option value="5">Vineri<option value="6">Sambata<option value="0">Duminica</select>la fiecare<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />luni<br />
+ </div>
+ <div id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>In</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />zi a lunii<select name="year_month"><option value="0" selected >Ianuarie<option value="1">Februarie<option value="2">Martie<option value="3">Aprilie<option value="4">Mai<option value="5">Iunie<option value="6">Iulie<option value="7">August<option value="8">Septembrie<option value="9">Octombrie<option value="10">Noiembrie<option value="11">Decembrie</select><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>In</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" />zi de<select name="year_day2"><option value="1" selected >Luni<option value="2">Marti<option value="3">Miercuri<option value="4">Joi<option value="5">Vineri<option value="6">Sambata<option value="7">Duminica</select>a lunii<select name="year_month2"><option value="0" selected >Ianuarie<option value="1">Februarie<option value="2">Martie<option value="3">Aprilie<option value="4">Mai<option value="5">Iunie<option value="6">Iulie<option value="7">August<option value="8">Septembrie<option value="9">Octombrie<option value="10">Noiembrie<option value="11">Decembrie</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Fara data de sfarsit</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Dupa</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />evenimente<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />La data</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+</div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_ru.html b/sources/locale/recurring/repeat_template_ru.html
new file mode 100644
index 0000000..9de068e
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_ru.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />День</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Неделя</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Месяц</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Год</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Каждый</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />день<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Каждый рабочий день</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Повторять каждую<input class="dhx_repeat_text" type="text" name="week_count" value="1" />неделю , в:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Понедельник</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Четверг</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Вторник</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Пятницу</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Среду&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Субботу</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Воскресенье</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Повторять</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" /> числа каждый <input class="dhx_repeat_text" type="text" name="month_count" value="1" />месяц<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Понедельник<option value="2">Вторник<option value="3">Среда<option value="4">Четверг<option value="5">Пятница<option value="6">Суббота<option value="0">Воскресенье</select>каждый <input class="dhx_repeat_text" type="text" name="month_count2" value="1" />месяц<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/></label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />день<select name="year_month"><option value="0" selected >Января<option value="1">Февраля<option value="2">Марта<option value="3">Апреля<option value="4">Мая<option value="5">Июня<option value="6">Июля<option value="7">Августа<option value="8">Сентября<option value="9">Октября<option value="10">Ноября<option value="11">Декабря</select><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/></label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Понедельник<option value="2">Вторник<option value="3">Среда<option value="4">Четверг<option value="5">Пятница<option value="6">Суббота<option value="0">Воскресенье</select><select name="year_month2"><option value="0" selected >Января<option value="1">Февраля<option value="2">Марта<option value="3">Апреля<option value="4">Мая<option value="5">Июня<option value="6">Июля<option value="7">Августа<option value="8">Сентября<option value="9">Октября<option value="10">Ноября<option value="11">Декабря</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Без даты окончания</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" /></label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />повторений<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />До </label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/sources/locale/recurring/repeat_template_sk.html b/sources/locale/recurring/repeat_template_sk.html
new file mode 100644
index 0000000..80ab828
--- /dev/null
+++ b/sources/locale/recurring/repeat_template_sk.html
@@ -0,0 +1,57 @@
+<div class="dhx_form_repeat">
+ <form>
+ <div class="dhx_repeat_left">
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Denne</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Tdenne</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Mesane</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Rone</label>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_center">
+ <div style="display:none;" id="dhx_repeat_day">
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Kad</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />de<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Kad prac. de</label>
+ </div>
+ <div style="display:none;" id="dhx_repeat_week">
+ Opakova kad<input class="dhx_repeat_text" type="text" name="week_count" value="1" />tde v doch:<br />
+
+ <table class="dhx_repeat_days">
+ <tr>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Pondelok</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />tvrtok</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Utorok</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Piatok</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Streda</label><br />
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Sobota</label>
+ </td>
+ <td>
+ <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Nedea</label><br /><br />
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="dhx_repeat_month">
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Opakova</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />de kad<input class="dhx_repeat_text" type="text" name="month_count" value="1" />mesiac<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Pondelok<option value="2">Utorok<option value="3">Streda<option value="4">tvrtok<option value="5">Piatok<option value="6">Sobota<option value="0">Nedea</select>kad<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />mesiac<br />
+ </div>
+ <div style="display:none;" id="dhx_repeat_year">
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Kad</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />de<select name="year_month"><option value="0" selected >Janur<option value="1">Februr<option value="2">Marec<option value="3">Aprl<option value="4">Mj<option value="5">Jn<option value="6">Jl<option value="7">August<option value="8">September<option value="9">Oktber<option value="10">November<option value="11">December</select>mesiac<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Pondelok<option value="2">Utorok<option value="3">Streda<option value="4">tvrtok<option value="5">Piatok<option value="6">Sobota<option value="7">Nedea</select>poas<select name="year_month2"><option value="0" selected >Janur<option value="1">Februr<option value="2">Marec<option value="3">Aprl<option value="4">Mj<option value="5">Jn<option value="6">Jl<option value="7">August<option value="8">September<option value="9">Oktber<option value="10">November<option value="11">December</select><br />
+ </div>
+ </div>
+ <div class="dhx_repeat_divider"></div>
+ <div class="dhx_repeat_right">
+ <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>Bez dtumu ukonenia</label><br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Po</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />udalostiach<br />
+ <label><input class="dhx_repeat_radio" type="radio" name="end" />Ukoni</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+'" /><br />
+ </div>
+ </form>
+ </div>
+ <div style="clear:both">
+ </div> \ No newline at end of file
diff --git a/whatsnew.txt b/whatsnew.txt
new file mode 100644
index 0000000..ae4eda7
--- /dev/null
+++ b/whatsnew.txt
@@ -0,0 +1,67 @@
+4.0.1
+ Minor regression, which was introduced in 4.0, are fixed
+
+4.0
+ Flexible time scales - some days, hours can be removed from time scale
+ Ability to show "more events" links in month view
+ jQuery integration
+ Backbone Integration
+ Default skin changed to "terrace", multi-day events are visible by default
+ Alternative start-date logic for recurring events
+ Documentation greatly improved
+
+3.7
+ Touch support ( tablets and touch monitors )
+ Romanian locale added
+
+3.6
+ Windows8 edition added
+ Extended date format configuration for lightbox form
+ Sub-day navigation in timeline view
+ Ability to define custom sorting in timeline view
+ Multi-page export to PDF
+
+3.5
+ Ability to show multiple scheduler's per page (PRO version only)
+ Supports loading JSON directly from Connectors
+ Custom events rendering
+ Timeline view improved (support for drag, resize, event height control)
+ New 'dhx_terrace' skin
+ New options for blocking dates
+ Marking time intervals
+ Highlighting time intervals
+ New API methods: updateView, showEvent, getRenderedEvent, getActionData
+ JSMessage included
+ Grid view
+ New configuration options
+ Simplified access to lightbox section objects
+
+
+
+3.0
+ Version of scheduler for touch phones
+ WeekAgenda view
+ Netbook friendly lightbox form
+ Cascade event display
+ Simple way to define a color for event
+ Drag and drop of the details form
+ Custom buttons for the details form
+ Current time marker in day and week view
+ Multiline header for timeline view
+ Configurable work-time bounds
+ API to access lightbox values
+
+
+
+2.3
+ Map view was added
+ Cell mode for Timeline view was added
+ Tree mode for Timeline view was added
+ Tooltips for all views were added
+ Abbility to create new events by double click or by drag-and-drop in Timeline mode
+ Abbility to move events by drop-and-drag in Timeline mode
+ Abbility to create new events by external drag and drop
+ Multiselect section for details form
+ Checkbox, combo, radio - sections for details form
+ Api of mini-calendar extension extended
+ Custom form implementation simplified