diff options
| author | Christophe Simonis <chs@openerp.com> | 2012-11-06 17:41:49 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2012-11-06 17:41:49 +0100 |
| commit | c09a6600a582f1e032e34215b9c3e14e576af8a0 (patch) | |
| tree | 0ba9e87b51b168132a5bc553febad56a1ae4ebed /addons/web_calendar/static/lib/dhtmlxScheduler/sources | |
| parent | 595a2b3bb160351bca19c40414ede990f45376ea (diff) | |
| parent | 660443885c68b1e86536bafe7e7b01400f04f1e2 (diff) | |
merge upstream
bzr revid: chs@openerp.com-20121106164149-hgj1250avzf12u68
Diffstat (limited to 'addons/web_calendar/static/lib/dhtmlxScheduler/sources')
119 files changed, 14642 insertions, 12152 deletions
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/base.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/base.js deleted file mode 100644 index 45a6dc0c820..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/base.js +++ /dev/null @@ -1,161 +0,0 @@ -/* -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.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);
- 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 "day":
- ndate.setDate(ndate.getDate()+inc);
- if(date.getDate()==ndate.getDate() && !!inc) {
- do {
- ndate.setTime(ndate.getTime()+60*60*1000);
- } while (date.getDate() == ndate.getDate())
- }
- break;
- case "week": ndate.setDate(ndate.getDate()+7*inc); 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.split(/[^0-9a-zA-Z]+/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(ndate);
- }
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/clear.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/clear.css deleted file mode 100644 index 3a3217e940a..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/clear.css +++ /dev/null @@ -1,110 +0,0 @@ -/* -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 -*/ -.dhx_cal_ltext{
- text-align:left;
-}
-.dhx_agenda_line {
- overflow:hidden;
- white-space:nowrap;
-}
-.dhx_cal_light select{
- width:auto;
-}
-
-.dhx_custom_button {
- width:120px !important;
-}
-
-.dhx_cal_ltext{
- text-align:left;
-}
-.dhx_form_repeat{
- text-align:left;
- width:100%;
-}
-
-.dhx_cal_lsection {
- text-align:left;
-}
-.dhx_month_head{
- font-size:8pt;
-}
-.dhx_expand_icon {
- position:absolute; top:0px; right:2px;
- background-image:url(./imgs/colapce-expand-icon.gif);
- width:18px; height:18px;
- cursor:pointer;
- background-position:0px 18px;
- z-index:16;
-}
-
-div.dhx_cal_container table tr td {
- border-width:0 !important;
- padding:0 !important;
-}
-
-.dhx_cal_container table {
- border-collapse:separate !important;
- margin:0 0 !important;
-}
-
-.dhx_cal_container{
- z-index:999;
-}
-
-div.dhx_cal_event_clear, div.dhx_cal_event{
- line-height:100%;
-}
-
-.dhx_cal_ltext textarea {
- -moz-box-shadow:none;
- border-width:0;
- padding:0;
- background:transparent none repeat scroll 0 0;
- -webkit-box-shadow:none;
-}
-
-.dhx_cal_light{
- text-align:left;
-}
-.dhx_cal_light div, .dhx_cal_container div{
- line-height:normal;
-}
-
-.dhx_cal_light .dhx_form_repeat div,.dhx_cal_light .dhx_form_repeat{
- line-height:24px;
-}
-
-
-/* anti-joomla */
-div.dhx_cal_navline div, .dhx_scale_bar, .dhx_scale_hour, .dhx_title{
- text-align:center !important;
-}
-#whitebox div .dhx_month_head {
- text-align:right;
-}
-#whitebox div .dhx_cal_event_line, #whitebox div .dhx_body{
- text-align:left;
-}
-div.dhx_cal_container, div.dhx_cal_lsection{
- line-height:1em;
-}
-div.dhx_cal_container, div.dhx_cal_lsection{
- line-height:normal;
-}
-.dhx_cal_header .dhx_agenda_line div, .dhx_year_month{
- text-align:center !important;
-}
-.dhx_tooltip{
- text-align:left;
-}
-
-
-.dhx_cal_data table{
- border-width:0px !important;
-}
-.dhx_cal_data table tr td{
- border-top-width:0px !important;
-}
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/config.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/config.js deleted file mode 100644 index 460b6771c00..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/config.js +++ /dev/null @@ -1,117 +0,0 @@ -/* -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 -*/ -/*
-%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",
-
- hour_size_px:42,
- 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,
- click_form_details:0,
- cascade_event_display: false,
- cascade_event_count:4,
- cascade_event_margin: 30,
- drag_lightbox:true,
- preserve_scroll:true,
-
- server_utc:false,
-
- 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"} ]
- },
-
- repeat_date_of_end: "01.01.2010"
-};
-scheduler.templates={};
-scheduler.init_templates=function(){
- 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)+" – "+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;
- }
- });
- this.callEvent("onTemplatesReady",[]);
-};
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/connector.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/connector.js deleted file mode 100644 index 72462172908..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/connector.js +++ /dev/null @@ -1,139 +0,0 @@ -/* -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 -*/ -/*
- 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);
- }
-});
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dataprocessor_hook.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dataprocessor_hook.js deleted file mode 100644 index 27741b6d147..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dataprocessor_hook.js +++ /dev/null @@ -1,82 +0,0 @@ -/* -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._dp_init=function(dp){
- dp._methods=["setEventTextStyle","","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.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.setEventTextStyle=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.validId=function(id){
- return true;
-};
-
-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);
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dayevents.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dayevents.js deleted file mode 100644 index 4717fe2858b..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dayevents.js +++ /dev/null @@ -1,200 +0,0 @@ -/* -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 -*/ -dhx.protoUI({
- name:"dayevents",
- defaults:{
- hourFormat:"%H",
- hourClock:12,
- firstHour:0,
- lastHour:24,
- timeScaleWidth:45,
- timeScaleHeight: 30,
- scroll:true,
- scaleBorder:1,
- eventOffset:5,
- width:"auto",
- date: new Date()
- },
- $init:function(config){
- this.name = "DayEvents";
-
- this._dataobj.style.position = "relative";
- this.data.provideApi(this,true);
- this.data.attachEvent("onStoreUpdated",dhx.bind(this.render,this));
-
- this.attachEvent("onBeforeRender", function(){
- this._renderScale();
- this.type.color = this.config.color;
- this.type.textColor = this.config.textColor;
- this._renderobj = this._dataobj.firstChild;
- this._prepareEvents();
- if(window.scheduler)
- this.type.template = scheduler.templates.day_event;
- });
- if(window.scheduler){
- config.hourFormat = scheduler.config.scale_hour;
- config.timeScaleWidth = scheduler.xy.scale_width;
- config.timeScaleHeight = scheduler.xy.scale_height*2;
- }
- },
- _renderScale:function(){
- var html = "<div></div>";
- for(var h = this.config.firstHour; h<this.config.lastHour; h++){
- html += this.hourScaleItem(h);
- }
- this._dataobj.innerHTML = html;
- },
- _id:"dhx_l_id",
- on_click:{
- },
- hourScaleItem: function(hour){
- var isAM = (scheduler.config.hour_date.toLowerCase().indexOf("a")!=-1);
- var top = '00';
- var bottom = '30';
- if(isAM){
- if(hour===0)
- top = 'AM';
- if(hour==12)
- top = 'PM';
- hour = (hour+11)%12+1;
- }
- if(this.config.hourFormat.indexOf("H")!=-1)
- hour = dhx.math.toFixed(hour);
- var html = "";
- var timeScaleWidth = this.config.timeScaleWidth;
- var hourHeight = this.config.timeScaleHeight;
- var sectionWidth = Math.floor(this.config.timeScaleWidth/2);
- var heightTop = Math.floor(hourHeight/2);
- var heightBottom = heightTop-this.config.scaleBorder;
- var eventZoneWidth = this._content_width-this.config.scaleBorder-this.config.timeScaleWidth;
- html += "<div style='width: 100%; height:"+hourHeight+"px;' class='dhx_dayevents_scale_item'>";
- html += "<div class='dhx_dayevents_scale_hour' style='width:"+sectionWidth+"px; height:"+hourHeight+"px;line-height:"+hourHeight+"px;'>"+hour+"</div>";
- html += "<div class='dhx_dayevents_scale_minute' style='width:"+sectionWidth+"px'>";
- html += "<div class='dhx_dayevents_scale_top' style='width:"+sectionWidth+"px;line-height:"+heightTop+"px'>"+top+"</div>";
- html += "<div class='dhx_dayevents_scale_bottom' style='width:"+sectionWidth+"px;line-height:"+heightBottom+"px'>"+bottom+"</div>";
- html += "</div>";
- html += "<div class='dhx_dayevents_scale_event' style='width:"+eventZoneWidth+"px'>";
- html += "<div class='dhx_dayevents_scale_top' style='height:"+heightTop+"px;width:"+eventZoneWidth+"px'></div>";
- html += "<div class='dhx_dayevents_scale_bottom' style='width: "+eventZoneWidth+"px;height:"+heightBottom+"px; '></div>";
- html += "</div>";
- html += "</div>";
- return html;
- },
- type:{
- templateStart:dhx.Template("<div dhx_l_id='#id#' class='dhx_dayevents_event_item {common.templateCss()}' style='left:#$left#px;top:#$top#px;width:#$width#px;height:#$height#px;padding:{common.padding}px;overflow:hidden; background-color:{common.templateColor()} ;color:{common.templateTextColor()};'>"),
- template:scheduler.templates.day_event,
- templateEnd:dhx.Template("</div>"),
- templateCss:dhx.Template(""),
- templateColor:dhx.Template("#color#"),
- templateTextColor:dhx.Template("#textColor#"),
- padding:2
- },
- _prepareEvents:function(){
- var evs = this.data.getRange();
- var stack = [];
- var ev,i,j,k,_is_sorder,_max_sorder,_sorder_set;
- for(i=0; i< evs.length;i++){
- ev=evs[i];
- ev.$inner=false;
- while (stack.length && stack[stack.length-1].end_date.valueOf()<=ev.start_date.valueOf()){
- stack.splice(stack.length-1,1);
- }
- _sorder_set = false;
-
- for(j=0;j< stack.length;j++){
- if(stack[j].end_date.valueOf()<=ev.start_date.valueOf()){
- _sorder_set = true;
- ev.$sorder=stack[j].$sorder;
- stack.splice(j,1);
- ev.$inner=true;
- break;
- }
- }
-
- if (stack.length) stack[stack.length-1].$inner=true;
-
- if(!_sorder_set){
- 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++){
- _is_sorder = false;
- for(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;
- }
-
- for (var i=0; i < evs.length; i++){
- evs[i].$count=stack.max_count;
- this._setPosition(evs[i]);
- }
- },
- _setPosition:function(ev){
-
- var date = this.config.date.getValue?this.config.date.getValue():this.config.date;
-
- var start = dhx.Date.copy(ev.start_date);
- var end = dhx.Date.copy(ev.end_date);
- var sh = start.getHours();
- var eh = end.getHours();
- if(dhx.Date.datePart(start).valueOf()>dhx.Date.datePart(end).valueOf()){
- end = start;
- }
-
- if(dhx.Date.datePart(start).valueOf()<dhx.Date.datePart(date).valueOf()){
- start = dhx.Date.datePart(date);
- }
- if(dhx.Date.datePart(end).valueOf()>dhx.Date.datePart(date).valueOf()){
- end = dhx.Date.datePart(date);
- end.setMinutes(0);
- end.setHours(this.config.lastHour);
- }
- if (sh < this.config.firstHour || eh >= this.config.lastHour){
- if (sh < this.config.firstHour){
- end.setHours(this.config.firstHour);
- ev.start_date.setMinutes(0);
- }
- if (eh >= this.config.lastHour){
- end.setMinutes(0);
- end.setHours(this.config.lastHour);
- }
- }
- var temp_width = Math.floor((this._content_width-this.config.timeScaleWidth-this.config.eventOffset-8)/ev.$count);
- ev.$left=ev.$sorder*(temp_width)+this.config.timeScaleWidth+this.config.eventOffset;
- if (!ev.$inner) temp_width=temp_width*(ev.$count-ev.$sorder);
- ev.$width = temp_width-this.config.eventOffset-this.type.padding*2;
-
- var sm = start.getHours()*60+start.getMinutes();
- var em = (end.getHours()*60+end.getMinutes())||(this.config.lastHour*60);
- ev.$top = Math.round((sm-this.config.firstHour/60)*(this.config.timeScaleHeight+1)/60); //42px/hour
- ev.$height = Math.max(10,(em-sm)*(this.config.timeScaleHeight+1)/60-2)-this.type.padding*2;
- }
-}, dhx.MouseEvents, dhx.SelectionModel, dhx.Scrollable, dhx.RenderStack, dhx.DataLoader, dhx.ui.view, dhx.EventSystem, dhx.Settings);
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxcommon.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxcommon.js deleted file mode 100644 index ce3c3891f0f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxcommon.js +++ /dev/null @@ -1,914 +0,0 @@ -/* -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 -*/ -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 && !(obj instanceof Array)){
- 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;
-};
-/**
- * @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
- 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 ((_isIE)&&(!this._retry)){
- //fall back to MS.XMLDOM
- var xmlString = this.xmlDoc.responseText;
- var oldObj = this.xmlDoc;
- this._retry=true;
- this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
- this.xmlDoc.async=false;
- this.xmlDoc["loadXM"+"L"](xmlString);
-
- 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){
- {
- try{
- var parser = new DOMParser();
- this.xmlDoc=parser.parseFromString(xmlString, "text/xml");
- }
- catch (e){
- this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
- this.xmlDoc.async=this.async;
- this.xmlDoc["loadXM"+"L"](xmlString);
- }
- }
-
- 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.onloadAction=null;
- this.mainObject=null;
- this.xmlDoc=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 && !_isChrome) {
- 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||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;
- }
-
- 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&&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();
- }
-
- if (dragger.dragNode.parentNode != window.document.body){
- 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;
-
- // 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;
-_KHTMLrv = false;
-_OperaRv = false;
-_FFrv = 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)){
- var _KHTMLrv = parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Safari')+7, 5));
-
- if (_KHTMLrv > 525){ //mimic FF behavior for Safari 3.1+
- _isFF=true;
- var _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 && document.compatMode != "BackCompat") _isIE=8;
-} else {
- _isFF=true;
- var _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.dhx_SeverCatcherPath="";
- 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];
- }
- }
-}
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor.js deleted file mode 100644 index 4a4143f947f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor.js +++ /dev/null @@ -1,587 +0,0 @@ -/* -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 -*/ -/**
- * @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(",")));
- 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
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor_debug.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor_debug.js deleted file mode 100644 index e26776e533a..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor_debug.js +++ /dev/null @@ -1,168 +0,0 @@ -/* -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 -*/ -dataProcessor.prototype._o_init = dataProcessor.prototype.init;
-dataProcessor.prototype.init=function(obj){
- this._console=this._console||this._createConsole();
- this.attachEvent("onValidatationError",function(rowId){
- this._log("Validation error for ID="+(rowId||"[multiple]"));
- return true;
- });
- return this._o_init(obj);
-}
-
-dataProcessor.prototype._createConsole=function(){
- var c=document.createElement("DIV");
- c.style.cssText='width:450px; height:420px; overflow:auto; position:absolute; z-index:99999; background-color:white; top:0px; right:0px; border:1px dashed black; font-family:Tahoma; Font-size:10pt;';
- c.innerHTML="<div style='width:100%; background-color:gray; font-weight:bold; color:white;'><span style='cursor:pointer;float:right;' onclick='this.parentNode.parentNode.style.display=\"none\"'><sup>[close] </sup></span><span style='cursor:pointer;float:right;' onclick='this.parentNode.parentNode.childNodes[2].innerHTML=\"\"'><sup>[clear] </sup></span> DataProcessor</div><div style='width:100%; height:200px; overflow-Y:scroll;'> Current state</div><div style='width:100%; height:200px; overflow-Y:scroll;'> Log:</div>";
- if (document.body) document.body.insertBefore(c,document.body.firstChild);
- else dhtmlxEvent(window,"load",function(){
- document.body.insertBefore(c,document.body.firstChild);
- })
- dhtmlxEvent(window,"dblclick",function(){
- c.style.display='';
- })
- return c;
-}
-
-dataProcessor.prototype._error=function(data){
- this._log("<span style='color:red'>"+data+"</span>");
-}
-dataProcessor.prototype._log=function(data){
- var div=document.createElement("DIV");
- div.innerHTML = data;
- var parent=this._console.childNodes[2];
- parent.appendChild(div);
- parent.scrollTop=parent.scrollHeight;
-
- if (window.console && window.console.log)
- window.console.log("DataProcessor :: "+data.replace(" "," ").replace("<b>","").replace("</b>",""));
-
-}
-dataProcessor.prototype._updateStat=function(data){
- var data=[" Current state"];
- for(var i=0;i<this.updatedRows.length;i++)
- data.push(" ID:"+this.updatedRows[i]+" Status: "+(this.obj.getUserData(this.updatedRows[i],"!nativeeditor_status")||"updated")+", "+(this.is_invalid(this.updatedRows[i])||"valid"))
- this._console.childNodes[1].innerHTML=data.join("<br/>")+"<hr/>Current mode: "+this.updateMode;
-}
-dataProcessor.prototype.xml_analize=function(xml){
- if (_isFF){
- if (!xml.xmlDoc.responseXML)
- this._error("Not an XML, probably incorrect content type specified ( must be text/xml ), or some text output was started before XML data");
- else if (xml.xmlDoc.responseXML.firstChild.tagName=="parsererror")
- this._error(xml.xmlDoc.responseXML.firstChild.textContent);
- else return true;
- } else if (_isIE){
- if (xml.xmlDoc.responseXML.parseError.errorCode)
- this._error("XML error : "+xml.xmlDoc.responseXML.parseError.reason);
- else if (!xml.xmlDoc.responseXML.documentElement)
- this._error("Not an XML, probably incorrect content type specified ( must be text/xml ), or some text output was started before XML data");
- else return true;
- }
- return false;
-}
-
-dataProcessor.wrap=function(name,before,after){
- var d=dataProcessor.prototype;
- if (!d._wrap) d._wrap={};
- d._wrap[name]=d[name];
- d[name]=function(){
- if (before) before.apply(this,arguments);
- var res=d._wrap[name].apply(this,arguments);
- if (after) after.apply(this,[arguments,res]);
- return res;
- }
-};
-
-dataProcessor.wrap("setUpdated",function(rowId,state,mode){
- this._log(" row <b>"+rowId+"</b> "+(state?"marked":"unmarked")+" ["+(mode||"updated")+","+(this.is_invalid(rowId)||"valid")+"]");
-},function(){
- this._updateStat();
-});
-
-
-
-dataProcessor.wrap("sendData",function(rowId){
- if (rowId){
- this._log(" Initiating data sending for <b>"+rowId+"</b>");
- if (this.obj.mytype=="tree"){
- if (!this.obj._idpull[rowId])
- this._log(" Error! item with such ID not exists <b>"+rowId+"</b>");
- } else {
- if (this.rowsAr && !this.obj.rowsAr[rowId])
- this._log(" Error! row with such ID not exists <b>"+rowId+"</b>");
- }
- }
-},function(){
-
-});
-
-dataProcessor.wrap("sendAllData",function(){
- this._log(" Initiating data sending for <b>all</b> rows ");
-},function(){
-
-});
-dataProcessor.logSingle=function(data,id){
- var tdata = {};
- if (id)
- tdata[id] = data;
- else
- tdata = data;
-
- var url = [];
- for (var key in tdata) {
- url.push("<fieldset><legend>"+key+"</legend>");
- var suburl = [];
-
- for (var ikey in tdata[key])
- suburl.push(ikey+" = "+tdata[key][ikey]);
-
- url.push(suburl.join("<br>"));
- url.push("</fieldset>");
- }
- return url.join("");
-}
-dataProcessor.wrap("_sendData",function(data,rowId){
- if (rowId)
- this._log(" Sending in one-by-one mode, current ID = "+rowId);
- else
- this._log(" Sending all data at once");
- this._log(" Server url: "+this.serverProcessor+" <a onclick='this.parentNode.nextSibling.firstChild.style.display=\"block\"' href='#'>parameters</a>");
- var url = [];
- this._log("<blockquote style='display:none;'>"+dataProcessor.logSingle(data,rowId)+"<blockquote>");
-},function(){
-
-});
-
-
-dataProcessor.wrap("afterUpdate",function(that,b,c,d,xml){
- that._log(" Server response received <a onclick='this.nextSibling.style.display=\"block\"' href='#'>details</a><blockquote style='display:none'><code>"+(xml.xmlDoc.responseText||"").replace(/\&/g,"&").replace(/</g,"<").replace(/>/g,">")+"</code></blockquote>");
- if (!that.xml_analize(xml)) return;
- var atag=xml.doXPath("//data/action");
- if (!atag){
- that._log(" No actions found");
- var atag=xml.getXMLTopNode("data");
- if (!atag) that._log(" XML not valid");
- else that._log(" Incorrect content type - need to be text/xml");
- }
-},function(){
-
-});
-
-dataProcessor.wrap("afterUpdateCallback",function(sid,tid,action){
- if (this.obj.mytype=="tree"){
- if (!this.obj._idpull[sid]) this._log("Incorrect SID, item with such ID not exists in grid");
- } else {
- if (this.obj.rowsAr && !this.obj.rowsAr[sid]) this._log("Incorrect SID, row with such ID not exists in grid");
- }
- this._log(" Action: "+action+" SID:"+sid+" TID:"+tid);
-},function(){
-
-});
-
-
-
-
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor_jsonp.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor_jsonp.js deleted file mode 100644 index 19779666494..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxdataprocessor_jsonp.js +++ /dev/null @@ -1,57 +0,0 @@ -/* -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 -*/ -if(dataProcessor) {
- dataProcessor.prototype.enableJSONP = function(mode) {
- if(mode) {
- this._jsonp_attach_id = this.attachEvent("onBeforeDataSending", function(rowId,rowIdState,a1){
- if (rowId)
- this._in_progress[rowId]=(new Date()).valueOf();
-
- var url = this.serverProcessor+(this._user?(getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+this.obj.getUserData(0,"version")].join("&")):"");
- url += ((url.indexOf("?")!=-1)?"&":"?")+this.serialize(a1,rowId);
-
- this._jsonp(url, [], function(data){
- var xml = new dtmlXMLLoaderObject(this.afterUpdate,this,true);
- xml.loadXMLString(data);
- this.afterUpdate(this, null, null, null, xml);
- }, this);
-
- this._waitMode++;
- return false;
- });
- }
- else {
- if(this._jsonp_attach_id)
- this.detachEvent(this._jsonp_attach_id);
- }
- };
- dataProcessor.prototype._jsonp = function(url, params, callback, master){
- var global_obj = "dataProcessor";
- var id = "dp_jsonp_"+new Date().valueOf();
- var script = document.createElement('script');
- script.id = id;
- script.type = 'text/javascript';
-
- var head = document.getElementsByTagName("head")[0];
-
- if (!params)
- params = {};
- params.jsonp = global_obj+"."+id; // would be called as dataProcessor.dp_jsonp_1938948394
- dataProcessor[id]=function(){
- callback.apply(master||window, arguments);
- script.parentNode.removeChild(script);
- callback = head = master = script = null;
- delete dataProcessor[id];
- };
-
- var vals = [];
- for (var key in params) vals.push(key+"="+encodeURIComponent(params[key]));
-
- url += (url.indexOf("?") == -1 ? "?" : "&")+vals.join("&");
-
- script.src = url ;
- head.appendChild(script);
- };
-}
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.css new file mode 100644 index 00000000000..e2b512bc030 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.css @@ -0,0 +1,1419 @@ +/* +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{
+ border-top:1px dotted #8894A3;
+ position:absolute;
+ top:44px;
+ width:600px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+.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;
+ border-right:1px dotted #586A7E;
+ height:18px;
+ padding-right:5px;
+ padding-top:3px;
+ text-align:right;
+}
+.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;
+} +.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 {
+ 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;
+}
+.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:0px solid black;
+ margin:none;
+ padding:none;
+ 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;
+} +.dhx_unselectable, .dhx_unselectable div{
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_light{
+ 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_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;
+}
+
+.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;
+}
+/* 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;
+}
+
+ +/*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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.js new file mode 100644 index 00000000000..3dc9dc4e46f --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.js @@ -0,0 +1,4806 @@ +/* +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: "3.5.0" };
+dhtmlxEventable(scheduler);
+
+scheduler.init=function(id,date,mode){
+ date=date||(new Date());
+ mode=mode||"week";
+
+ 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();
+ dhtmlxEvent(window,"resize",function(){
+ window.clearTimeout(scheduler._resize_timer);
+ scheduler._resize_timer=window.setTimeout(function(){
+ if (scheduler.callEvent("onSchedulerResize",[])) {
+ scheduler.update_view();
+ scheduler.callEvent("onAfterSchedulerResize", []);
+ }
+ }, 100);
+ });
+ this.set_sizes();
+ scheduler.callEvent('onSchedulerReady', []);
+ this.setCurrentView(date,mode);
+};
+scheduler.xy={
+ nav_height:22,
+ min_event_height:40,
+ scale_width:50,
+ bar_height:20,
+ scroll_width:18,
+ scale_height:20,
+ month_scale_height:20,
+ menu_width:25,
+ margin_top:0,
+ margin_left:0,
+ editor_width:140,
+ lightbox_additional_height:50
+};
+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){
+ scheduler._on_mouse_move(e||event);
+ };
+ this._obj.onmousedown=function(e){
+ scheduler._on_mouse_down(e||event);
+ };
+ this._obj.onmouseup=function(e){
+ 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){
+ 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(){
+ scheduler.setCurrentView(new Date());
+ },
+ 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 = Math.round((new Date()).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) 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(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);
+
+ //transform to date
+ if (!this._table_view) {
+ pos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(pos.x/this._cols[0])-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, pos.x/this._cols[0])+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(pos.x/this._cols[0])-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;
+
+ 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.custom || 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();
+
+ var res = this.callEvent("onBeforeEventCreated", [e]);
+ if (!res)
+ return;
+
+ if (!this._drag_start){
+ this._drag_start=start; return;
+ }
+ end = start;
+ if (end==this._drag_start) return;
+
+ this._drag_id=this.uid();
+ this.addEvent(new Date(this._drag_start), new Date(end),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)*60000;
+ if (!pos.custom && this._table_view) start+=this.date.time_part(ev.start_date)*1000;
+ start = this._correct_shift(start);
+ 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){
+ 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 (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.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"];
+ 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, 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";
+ this.set_xy(head,this._cols[i]-1,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(new Date());
+
+ //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);
+
+ for (var i=0; i<count; i++){
+ this._cols[i]=Math.floor(summ/(count-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";
+ cc.style.width=this.xy.scale_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._reset_month_scale=function(b,dd,sd){
+ var ed=scheduler.date.add(dd,1,"month");
+
+ //trim time part for comparation reasons
+ var cd=new Date();
+ 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++)
+ tdcss[i]=" style='height:"+height+"px; width:"+((this._cols[i]||0)-1)+"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)+"' ";
+ html+="><div class='dhx_month_head'>"+this.templates.month_day(sd)+"</div><div class='dhx_month_body' "+tdcss[j]+"></div></td>";
+ 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.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":
+ var new_month = ndate.getMonth()+inc;
+ var t_ndate = new Date(ndate);
+ ndate.setMonth(new_month);
+ if (ndate.getMonth() != new_month && ndate.getMonth() != (new_month % 12)) { // 31 March +1 Month = 1 May, need to make 30 April
+ t_ndate.setDate(1);
+ t_ndate.setMonth(new_month);
+ t_ndate.setDate(new Date(t_ndate.getFullYear(),new_month+1,0).getDate());
+ ndate = t_ndate;
+ }
+ 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(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"
+ }
+};
+
+ +/*
+%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",
+
+ hour_size_px: 42,
+ 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,
+ click_form_details: 0,
+ cascade_event_display: false,
+ cascade_event_count: 4,
+ cascade_event_margin: 30,
+ drag_lightbox: true,
+ preserve_scroll: true,
+ select: true,
+
+ server_utc: false,
+
+ 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,
+ displayed_event_color: "#ffc5ab",
+ displayed_event_text_color: "#7e2727"
+};
+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)+" – "+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;
+ }
+ });
+ 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();
+};
+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.is_one_day_event(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) {
+ 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.is_one_day_event(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.is_one_day_event = 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.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));
+ }
+
+ if (this.config.multi_day && !this._table_view) {
+
+ var tvs = [];
+ var tvd = [];
+ for (var i = 0; i < evs.length; i++) {
+ if (evs[i]._timed)
+ 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.render_data = function(evs, hold) {
+ evs = this._pre_render_events(evs, hold);
+ for (var i = 0; i < evs.length; i++)
+ if (this._table_view)
+ this.render_event_bar(evs[i]);
+ 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;
+ for (var j = 0; j < cells.length; j++) {
+ cells[j].childNodes[1].style.height = h[i] * hb + "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
+ for (var i = 0; i < evl.rows.length; i++) {
+ var cell = evl.rows[i].cells[6].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;
+ 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;
+};
+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 (!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;
+ 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;
+ 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) / 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 - left - right);
+ }
+
+ var d = this._render_v_bar(ev.id, menu + 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;
+
+ 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;
+ };
+ d2.firstChild.focus();
+ //IE and opera can add x-scroll during focusing
+ this._els["dhx_cal_data"][0].scrollLeft = 0;
+ d2.firstChild.select();
+
+ }
+ 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 (scheduler.renderEvent && !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 + '" > </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.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.render_event_bar = function (ev) {
+ var parent = this._rendered_location;
+
+ 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 y = this._colsS.heights[ev._sweek] + (this._colsS.height ? (this.xy.month_scale_height + 2) : 2 ) + (ev._sorder * hb);
+
+ 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));
+ }
+
+ scheduler.callEvent("onAfterEventDisplay", [ev, mode]);
+}; +scheduler._loaded={};
+scheduler._load=function(url,from){
+ url=url||this._load_url;
+ 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)
+ 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.json={};
+scheduler.json.parse = function(data){
+ if (typeof data == "string") {
+ scheduler._temp = eval( "("+data+")" );
+ data = (scheduler._temp) ? scheduler._temp.data||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++){
+ data[i].start_date = scheduler.templates.xml_date(data[i].start_date);
+ data[i].end_date = scheduler.templates.xml_date(data[i].end_date);
+ evs.push(data[i]);
+ }
+ 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;
+};
+
+//current view by default, or all data if "true" as parameter provided
+scheduler.refresh=function(refresh_all){
+ alert("not implemented");
+ /*
+ this._loaded={};
+ this._load();
+ */
+};
+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++) {
+ evs[i]=this.xmlNodeToJSON(xml[i]);
+
+ evs[i].text=evs[i].text||evs[i]._tagvalue;
+ evs[i].start_date=this.templates.xml_date(evs[i].start_date);
+ evs[i].end_date=this.templates.xml_date(evs[i].end_date);
+ }
+ 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;
+ if (t=this.config.show_loading)
+ if (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 = {};
+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["get_"+section.type+"_control"];
+ return handler?handler(result):result;
+};
+scheduler.lightbox.get_template_control = function(result) {
+ result.control = result.node;
+ return result;
+};
+scheduler.lightbox.get_select_control = function(result) {
+ result.control = result.node.getElementsByTagName('select')[0];
+ return result;
+};
+scheduler.lightbox.get_textarea_control = function(result) {
+ result.control = result.node.getElementsByTagName('textarea')[0];
+ return result;
+};
+scheduler.lightbox.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; a.select(); a.focus();
+ }
+ },
+ 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; if (a.select) a.select(); a.focus();
+ }
+ },
+ time:{
+ render:function(sns){
+ //hours
+ var cfg = scheduler.config;
+ var dt = this.date.date_part(new Date());
+ 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="<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();
+ }
+
+ //days
+ html+="</select> <select>";
+ for (var i=1; i < 32; i++)
+ html+="<option value='"+i+"'>"+i+"</option>";
+
+ //month
+ html+="</select> <select>";
+ for (var i=0; i < 12; i++)
+ html+="<option value='"+i+"'>"+this.locale.date.month_full[i]+"</option>";
+
+ //year
+ html+="</select> <select>";
+ dt = dt.getFullYear()-5; //maybe take from config?
+ for (var i=0; i < 10; i++)
+ html+="<option value='"+(dt+i)+"'>"+(dt+i)+"</option>";
+ html+="</select> ";
+
+ return "<div style='height:30px;padding-top:0px;font-size:inherit;' class='dhx_section_time'>"+html+"<span style='font-weight:normal; font-size:10pt;'> – </span>"+html+"</div>";
+
+ },
+ set_value:function(node,value,ev,config){
+ var cfg = scheduler.config;
+ var s=node.getElementsByTagName("select");
+
+ 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+" </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[0].disabled=input.checked;
+ s[ s.length/2 ].disabled=input.checked;
+
+ input.onclick = function(){
+ if(input.checked) {
+ var obj = {};
+ scheduler.form_blocks.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");
+ }
+
+ s[0].disabled=input.checked;
+ s[ 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[3].value,s[2].value,s[1].value,0,s[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+0].value=(value_found)?direct_value:fixed_value;
+ s[i+1].value=d.getDate();
+ s[i+2].value=d.getMonth();
+ s[i+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){
+ s=node.getElementsByTagName("select");
+ ev.start_date=new Date(s[3].value,s[2].value,s[1].value,0,s[0].value);
+ ev.end_date=new Date(s[7].value,s[6].value,s[5].value,0,s[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){
+ node.getElementsByTagName("select")[0].focus();
+ }
+ }
+};
+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);
+
+ ev._timed=this.is_one_day_event(ev);
+ 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._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);
+ 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._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'> </span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div>";
+ +scheduler._dp_init=function(dp){
+ dp._methods=["setEventTextStyle","","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.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.setEventTextStyle=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.validId=function(id){
+ return true;
+};
+
+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);
+};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler_dhx_terrace.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler_dhx_terrace.css new file mode 100644 index 00000000000..67b57d481d2 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler_dhx_terrace.css @@ -0,0 +1,2018 @@ +/* +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{
+ border-top:1px dotted #8894A3;
+ position:absolute;
+ top:44px;
+ width:600px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+.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;
+ border-right:1px dotted #586A7E;
+ height:18px;
+ padding-right:5px;
+ padding-top:3px;
+ text-align:right;
+}
+.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;
+} +.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 {
+ 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;
+}
+.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:0px solid black;
+ margin:none;
+ padding:none;
+ 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;
+} +.dhx_unselectable, .dhx_unselectable div{
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_light{
+ 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_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;
+}
+
+.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;
+}
+/* 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;
+}
+
+ +/*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 #1796b0;
+ 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 {
+ 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_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_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 #888;
+}
+.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*/
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler_glossy.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler_glossy.css new file mode 100644 index 00000000000..0bbb47053ed --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/dhtmlxscheduler_glossy.css @@ -0,0 +1,1715 @@ +/* +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{
+ border-top:1px dotted #8894A3;
+ position:absolute;
+ top:44px;
+ width:600px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+.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;
+ border-right:1px dotted #586A7E;
+ height:18px;
+ padding-right:5px;
+ padding-top:3px;
+ text-align:right;
+}
+.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;
+} +.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 {
+ 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;
+}
+.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:0px solid black;
+ margin:none;
+ padding:none;
+ 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;
+} +.dhx_unselectable, .dhx_unselectable div{
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -moz-user-select:-moz-none;
+}
+.dhx_cal_light{
+ 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_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;
+}
+
+.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;
+}
+/* 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;
+}
+
+ +/*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_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_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;
+}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/event.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/event.js deleted file mode 100644 index 18542ecbe3b..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/event.js +++ /dev/null @@ -1,647 +0,0 @@ -/* -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.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();
-};
-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.is_one_day_event(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]);
-};
-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]);
-};
-scheduler.getEvent=function(id){
- return this._events[id];
-};
-scheduler.setEvent=function(id,hash){
- 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.is_one_day_event(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.is_one_day_event=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(){
- //not the best strategy for sure
- var stack=[];
- var filter = this["filter_"+this._mode];
-
- for( var id in this._events)
- if (this.is_visible_events(this._events[id]))
- if (this._table_view || this.config.multi_day || this._events[id]._timed)
- if (!filter || filter(id,this._events[id]))
- stack.push(this._events[id]);
-
- return stack;
-};
-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();
- }
-
- if (this.config.multi_day && !this._table_view){
-
- var tvs = [];
- var tvd = [];
- for (var i=0; i < evs.length; i++){
- if (evs[i]._timed)
- 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.render_data=function(evs,hold){
- evs=this._pre_render_events(evs,hold);
- for (var i=0; i<evs.length; i++)
- if (this._table_view)
- this.render_event_bar(evs[i]);
- 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;
- for (var j=0; j < cells.length; j++) {
- cells[j].childNodes[1].style.height = h[i]*hb+"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
- for (var i=0; i<evl.rows.length; i++){
- var cell = evl.rows[i].cells[6].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;
- 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)) + 'px';
- data.style.height = (this._obj.offsetHeight - parseInt(data.style.top) - (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;
-};
-scheduler._get_event_sday=function(ev){
- return Math.floor((ev.start_date.valueOf()-this._min_date.valueOf())/(24*60*60*1000));
-};
-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 = [];
- for (var i=0; i < evs.length; i++) {
- var ev=evs[i];
-
- //check scale overflow
- var sh = ev.start_date.getHours();
- var eh = ev.end_date.getHours();
-
- ev._sday=this._get_event_sday(ev);
- if (!days[ev._sday]) days[ev._sday]=[];
-
- if (!hold){
- ev._inner=false;
-
- var stack=days[ev._sday];
- while (stack.length && stack[stack.length-1].end_date<=ev.start_date)
- stack.splice(stack.length-1,1);
-
- var sorderSet = false;
- for(var j=0; j<stack.length; j++){
- if(stack[j].end_date.valueOf()<ev.start_date.valueOf()){
- sorderSet = true;
- ev._sorder=stack[j]._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 (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){
- 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;
-
- for (var i=0; i < evs.length; i++) {
- var ev=evs[i];
- 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) sd=this._min_date;
- if (ed>this._max_date) ed=this._max_date;
-
- var locate_s = this.locate_holder_day(sd,false,ev);
- ev._sday=locate_s%cols;
- 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;
- } else{ // split long event in chunks
- var copy=this._copy_event(ev);
- 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");
-
- 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(){
- this.start_date=new Date(this.start_date);
- this.end_date=new Date(this.end_date);
-};
-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.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;
- 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 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)+1; //42px/hour
- var height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour
- //var height = Math.max(25,Math.round((ev.end_date.valueOf()-ev.start_date.valueOf())*(this.config.hour_size_px+(this._quirks?1:0))/(60*60*1000))); //42px/hour
- var width=Math.floor((parent.clientWidth-menu)/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-left-right);
- }
-
- var d=this._render_v_bar(ev.id,menu+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;
-
- 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.onkeypress=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; };
- d2.firstChild.focus();
- //IE and opera can add x-scroll during focusing
- this._els["dhx_cal_data"][0].scrollLeft=0;
- d2.firstChild.select();
-
- }
- if (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,"","<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 = "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-color:"+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||"")+'">';
- html+='<div class="dhx_header" style=" width:'+(w-6)+'px;'+bg_color+'" > </div>';
- html+='<div class="dhx_title" style="'+bg_color+''+color+'">'+contentA+'</div>';
- html+='<div class="dhx_body" style=" width:'+(w-(this._quirks?4:14))+'px; height:'+(h-(this._quirks?20:30))+'px;'+bg_color+''+color+'">'+contentB+'</div>';
- html+='<div class="dhx_footer" style=" width:'+(w-8)+'px;'+(bottom?' margin-top:-1px;':'')+''+bg_color+''+color+'" ></div></div>';
-
- d.innerHTML=html;
- return d.firstChild;
-};
-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.render_event_bar=function(ev){
- var parent=this._rendered_location;
-
- 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 y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+(ev._sorder*hb);
-
- var d=document.createElement("DIV");
- var cs = ev._timed?"dhx_cal_event_clear":"dhx_cal_event_line";
- var cse = scheduler.templates.event_class(ev.start_date,ev.end_date,ev);
- if (cse) cs=cs+" "+cse;
-
- var bg_color = (ev.color?("background-color:"+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||"")+'">';
-
- 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) 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 && ev.start_date<to && ev.end_date>from)
- result.push(ev);
- }
- return result;
-};
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext.css deleted file mode 100644 index de19bca63ed..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext.css +++ /dev/null @@ -1,386 +0,0 @@ -/* -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 -*/ -.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/colapce-expand-icon.gif);
- width:18px; height:18px;
- cursor:pointer;
- background-position:0px 18px;
- z-index:16;
-}
-.dhx_agenda_area{
- width:100%;
- height: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:186px; top:0px;
- 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_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;
-}
-
-.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;
-}
-
-/* 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 .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;
-}
-/* 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;
-}
-/* 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 */
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_active_links.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_active_links.js new file mode 100644 index 00000000000..3a2af4ecb93 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_agenda_view.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_agenda_view.js index 08d06e0e644..ff93a8876fe 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_agenda_view.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_agenda_view.js @@ -1,15 +1,11 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.date.add_agenda = function(date){
- return (new Date(date.valueOf()));
+ return scheduler.date.add(date, 1, "year");
};
-scheduler.dblclick_dhx_agenda_area=function(){
- if (!this.config.readonly && this.config.dblclick_create)
- this.addEventNow();
-};
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);
@@ -19,41 +15,46 @@ scheduler.templates.agenda_time = function(start,end,ev){ scheduler.templates.agenda_text = function(start,end,event){
return event.text;
};
-scheduler.date.agenda_start=function(d){ return d; };
-
-scheduler.attachEvent("onTemplatesReady",function(){
-
+scheduler.templates.agenda_date = function(){ return ""; };
+scheduler.date.agenda_start=function(){ return scheduler.date.date_part(new Date()); };
+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;
+ 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);
- }
+ fill_agenda_tab();
+ else
+ return old.apply(this,arguments);
+ };
var old_render_view_data = scheduler.render_view_data;
- scheduler.render_view_data=function(){
+ 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;
- scheduler._els["dhx_cal_data"][0].style.overflowY = 'hidden';
- }
- else {
- scheduler._els["dhx_cal_data"][0].style.overflowY = 'auto';
}
return old_render_view_data.apply(this,arguments);
- }
+ };
function set_full_view(mode){
@@ -77,9 +78,10 @@ scheduler.attachEvent("onTemplatesReady",function(){ 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-color:"+ev.color+";"):"");
- var color = (ev.textColor?("color:"+ev.textColor+";"):"");
- html+="<div class='dhx_agenda_line' event_id='"+ev.id+"' style='"+color+""+bg_color+""+(ev._text_style||"")+"'><div>"+scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev)+"</div>";
+ 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'> </div>";
html+="<span>"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+"</span></div>";
}
@@ -88,9 +90,14 @@ scheduler.attachEvent("onTemplatesReady",function(){ //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._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++)
@@ -99,8 +106,8 @@ scheduler.attachEvent("onTemplatesReady",function(){ }
scheduler.agenda_view=function(mode){
- scheduler._min_date = scheduler.config.agenda_start||(new Date());
- scheduler._max_date = scheduler.config.agenda_end||(new Date(9999,1,1));
+ 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){
@@ -110,4 +117,4 @@ scheduler.attachEvent("onTemplatesReady",function(){ //agenda tab de-activated
}
}
-})
+});
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_all_timed.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_all_timed.js new file mode 100644 index 00000000000..30d1d7066ef --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_all_timed.js @@ -0,0 +1,133 @@ +/* +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";
+ scheduler.config.update_render = true;
+
+ 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) {
+
+ 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
+
+ var next_day = scheduler.date.add(ev.start_date, 1, "day");
+ next_day = scheduler.date.date_part(next_day);
+
+ if (ev.end_date < next_day) {
+ ce.end_date = new Date(ev.end_date);
+ }
+ else {
+ ce.end_date = next_day;
+ if (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)
+ ce.end_date = scheduler.date.date_part(new Date(ce.start_date));
+ ce.end_date.setHours(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 = new Date(this._min_date);
+ else
+ re.start_date = this.date.add(ev.start_date, 1, "day");
+
+ re.start_date.setHours(this.config.first_hour);
+ re.start_date.setMinutes(0); // as we are starting only with whole hours
+ if (re.start_date < this._max_date && re.start_date < re.end_date) {
+ if (event_changed)
+ evs.splice(i+1,0,re);
+ 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);
+ };
+ var old_get_visible_events = scheduler.get_visible_events;
+ scheduler.get_visible_events = function(only_timed){
+ if (!this.config.all_timed)
+ 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.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) );
+ }
+
+ if (this.config.multi_day && !this._table_view){
+
+ var tvs = [];
+ var tvd = [];
+ for (var i=0; i < evs.length; i++){
+ if (evs[i]._timed || this.config.all_timed === true || (this.config.all_timed == "short" && is_event_short(evs[i])) )
+ tvs.push(evs[i]);
+ else
+ tvd.push(evs[i]);
+ }
+
+ // normal events
+ this._rendered_location = this._els['dhx_cal_data'][0];
+ this._table_view=false;
+ this.render_data(tvs, hold);
+
+ // multiday events
+ this._rendered_location = this._els['dhx_multi_day'][0];
+ this._table_view = true;
+ this.render_data(tvd, hold);
+ this._table_view=false;
+
+ } else {
+ this._rendered_location = this._els['dhx_cal_data'][0];
+ this.render_data(evs, hold);
+ }
+ };
+
+})();
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_collision.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_collision.js index e1e5d0fb52f..700b8de19ed 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_collision.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_collision.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ (function(){
@@ -40,23 +40,25 @@ scheduler.attachEvent("onEventChanged",function(id){ ev.start_date = before[0];
ev.end_date = before[1];
ev._timed=this.is_one_day_event(ev);
- };
+ }
return true;
});
scheduler.attachEvent("onBeforeEventChanged",function(ev,e,is_new){
return collision_check(ev);
});
-scheduler.attachEvent("onEventSave",function(id, edited_ev){
+scheduler.attachEvent("onEventSave",function(id, edited_ev, is_new){
+ edited_ev = scheduler._lame_clone(edited_ev);
+ edited_ev.id = id;
+
if(edited_ev.rec_type){
- scheduler._roll_back_dates(edited_ev);
- return collision_check(edited_ev);
+ scheduler._roll_back_dates(data_copy);
}
- return true;
- //return collision_check(edited_ev);
+ return collision_check(edited_ev); // in case user creates event on one date but then edited it another
});
function collision_check(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++) {
@@ -66,9 +68,14 @@ function collision_check(ev){ evs.push(tevs[j]);
}
}
- evs.push(ev);
} 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;
@@ -89,16 +96,22 @@ function collision_check(ev){ if (evs[i][map_to] == ev[map_to] && evs[i].id != ev.id)
count++;
- if (count >= scheduler.config.collision_limit) {
- ev[map_to] = temp_section; // from _setTempSection for custom views
+ if (count >= collision_limit) {
+
single = false;
}
}
else {
- if (evs.length > scheduler.config.collision_limit)
+ if ( evs.length >= collision_limit )
single = false;
}
- if (!single) return !scheduler.callEvent("onEventCollision",[ev,evs]);
+ 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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_cookie.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_cookie.js index 71f1d5e6794..f989ee8ddc5 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_cookie.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_cookie.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ (function(){
function setCookie(name,cookie_param,value) {
@@ -27,13 +27,15 @@ to use it in not GPL project. Please contact sales@dhtmlx.com for details first = false;
var data=getCookie("scheduler_settings");
if (data){
- data = data.split("@");
+ data = unescape(data).split("@");
data[0] = this.templates.xml_date(data[0]);
- this.setCurrentView(data[0],data[1]);
+ window.setTimeout(function(){
+ scheduler.setCurrentView(data[0],data[1]);
+ },1);
return false;
}
}
- var text = this.templates.xml_format(d||od)+"@"+(m||om);
+ 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;
});
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_dhx_terrace.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_dhx_terrace.js new file mode 100644 index 00000000000..613741bac43 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_dhx_terrace.js @@ -0,0 +1,90 @@ +/* +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.fix_tab_position = true;
+ scheduler.config.use_select_menu_space = true;
+ scheduler.config.hour_size_px = 44;
+ scheduler.xy.nav_height = 59;
+ scheduler.xy.bar_height = 24;
+ scheduler.config.wide_form = true;
+ scheduler.xy.lightbox_additional_height = 90;
+
+ scheduler.config.displayed_event_color = "#ff4a4a";
+ scheduler.config.displayed_event_text_color = "#ffef80";
+
+ scheduler.templates.event_bar_date = function(start,end,ev) {
+ return "• <b>"+scheduler.templates.event_date(start)+"</b> ";
+ };
+
+ scheduler.attachEvent("onLightbox", function(){
+ var lightbox = scheduler.getLightbox();
+ var divs = lightbox.getElementsByTagName('div');
+ for (var i=0; i<divs.length; i++) {
+ var div = divs[i];
+ if (div.className == "dhx_close_icon") {
+ div.onclick = function() {
+ scheduler.endLightbox(false, lightbox);
+ };
+ break;
+ }
+ }
+ });
+
+ scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'> </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;
+ }
+ }
+
+ }
+ }
+ });
+
+})();
+
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_editors.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_editors.js index e76eff631f4..5fe44741ec7 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_editors.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_editors.js @@ -1,11 +1,13 @@ /* 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 +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>";
+ res += "<div class='"+sns.type+"' style='height:"+(sns.height||20)+"px;' ></div>";
return res;
},
set_value:function(node,value,ev,config){
@@ -13,8 +15,11 @@ scheduler.form_blocks['combo']={ node._combo.destructor();
}
window.dhx_globalImgPath = config.image_path||'/';
- node._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);
- node._combo.enableFilteringMode(!!config.filtering, config.script_path||null, !!config.cache);
+ node._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);
+ 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 = [];
@@ -24,17 +29,40 @@ scheduler.form_blocks['combo']={ single_option.push(config.options[i].label);
all_options.push(single_option);
}
- node._combo.addOption(all_options);
+ combo.addOption(all_options);
if (ev[config.map_to]) {
- var index = node._combo.getIndexByValue(ev[config.map_to]);
- node._combo.selectOption(index);
+ var index = combo.getIndexByValue(ev[config.map_to]);
+ combo.selectOption(index);
}
} else { // server-side filtration is used
- node._combo.setComboValue(ev[config.map_to]||null);
+ 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(null);
+ }
}
},
- get_value:function(node,ev,config){
+ 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){
@@ -59,7 +87,8 @@ scheduler.form_blocks['radio']={ var radiobuttons = node.getElementsByTagName('input');
for (var i = 0; i < radiobuttons.length; i++) {
radiobuttons[i].checked = false;
- if (radiobuttons[i].value == ev[config.map_to]) {
+ var checked_value = ev[config.map_to]||value;
+ if (radiobuttons[i].value == checked_value) {
radiobuttons[i].checked = true;
}
}
@@ -84,12 +113,9 @@ scheduler.form_blocks['checkbox']={ return '';
},
set_value:function(node,value,ev,config){
- node=document.getElementById(config.id);
+ node=document.getElementById(config.id);
var id = scheduler.uid();
- var isChecked = false;
- if (typeof config.checked_value != 'undefined' && ev[config.map_to] == config.checked_value) {
- isChecked = true;
- }
+ 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>";
@@ -98,9 +124,14 @@ scheduler.form_blocks['checkbox']={ 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);
+ node=document.getElementById(config.id);
var checkbox = node.getElementsByTagName('input')[0]; // moved to the header
if (!checkbox)
checkbox = node.nextSibling.getElementsByTagName('input')[0];
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_expand.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_expand.js index 5e916128cf9..1f00aa4e5ab 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_expand.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_expand.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.expand = function(){
var t = scheduler._obj;
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_grid_view.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_grid_view.js new file mode 100644 index 00000000000..a25199a7c4f --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_grid_view.js @@ -0,0 +1,470 @@ +/* +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.attachEvent("onTemplatesReady",function(){
+
+ scheduler.templates[name + '_full_date'] = 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)+" – "+scheduler.templates.day_date(end);
+ };
+ scheduler.templates[name + '_single_date'] = function(date){
+ return scheduler.templates.day_date(date)+" "+this.event_date(date);
+ }
+
+
+ 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.templates[name + '_field'] = function(field_name, event){
+ return event[field_name];
+ };
+
+ 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'> </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-left":
+ 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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_html_templates.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_html_templates.js index a5123677c38..89f6a0ca984 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_html_templates.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_html_templates.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.attachEvent("onTemplatesReady",function(){
var els = document.body.getElementsByTagName("DIV");
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_key_nav.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_key_nav.js new file mode 100644 index 00000000000..087a71cdaec --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_key_nav.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 +*/ +//Initial idea and implementation by Steve MC
+(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;
+});
+
+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);
+ 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);
+ ev.start_date = new Date(date);
+ ev.end_date = new Date(ev.start_date.valueOf() + event_duration);
+ 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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_limit.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_limit.js new file mode 100644 index 00000000000..0892024eb46 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_limit.js @@ -0,0 +1,831 @@ +/* +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;
+
+(function(){
+ var before = null;
+ var dhx_time_block = "dhx_time_block";
+
+ 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;
+ });
+ var get_relevant_blocked_zones = function(day_index, day_value, zones) {
+ var relevant_zones = (zones[day_value] && zones[day_value][dhx_time_block]) ? zones[day_value][dhx_time_block] :
+ (zones[day_index] && zones[day_index][dhx_time_block]) ? zones[day_index][dhx_time_block] : [];
+ return relevant_zones;
+ };
+ var blocker = function(event){
+ if(!event)
+ return true;
+ if (!scheduler.config.check_limits)
+ return true;
+ var s = scheduler;
+ var mode = s._mode;
+ var timespans = scheduler._marked_timespans;
+ var c = s.config;
+ var evs = [];
+ if (event.rec_type) {
+ evs = scheduler.getRecDates(event);
+ } else {
+ evs = [event];
+ }
+
+ var res = true;
+ for (var p=0; p<evs.length; p++) {
+ var ev = evs[p];
+
+ 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){
+ var temp_start_date = new Date(ev.start_date.valueOf());
+ var temp_end_date = scheduler.date.add(temp_start_date, 1, "day");
+
+ for (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = s.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 = [];
+ if(s._props && s._props[mode]){
+ var view = s._props[mode];
+ var block_units = timespans[mode];
+ if(block_units && block_units[ev[view.map_to]]) {
+ var unit_zones = block_units[ev[view.map_to]];
+ var blocked_unit_zones = get_relevant_blocked_zones(day_index, day_value, unit_zones);
+ for (var i=0; i<blocked_unit_zones.length; i++) {
+ zones = scheduler._add_timespan_zones(zones, blocked_unit_zones[i].zones);
+ }
+ }
+ }
+ if (s.matrix && s.matrix[mode]) {
+ var timeline_options = s.matrix[mode];
+ var timeline_units = timespans[mode];
+ if (timeline_units && timeline_units[ev[timeline_options.y_property]]) {
+ var timeline_zones = timeline_units[ev[timeline_options.y_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 = scheduler._add_timespan_zones(zones, blocked_timeline_zones[i].zones);
+ }
+ }
+ }
+ // now need to add day blocks
+ var block_days = timespans.global;
+ var blocked_day_zones = get_relevant_blocked_zones(day_index, day_value, block_days)
+ for (var i=0; i<blocked_day_zones.length; i++) {
+ zones = scheduler._add_timespan_zones(zones, blocked_day_zones[i].zones);
+ }
+
+ 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);
+
+ if (zones){
+ for (var i = 0; i < zones.length; i+=2){
+ var sz = zones[i];
+ var ez = zones[i+1];
+ if (sz<em && ez>sm) {
+ if (sm<=ez && sm >=sz){
+ if (ez == 24*60 || em<ez){
+ res = false;
+ break;
+ }
+ if(ev._timed && s._drag_id && s._drag_mode == "new-size"){
+ ev.start_date.setHours(0);
+ ev.start_date.setMinutes(ez);
+ }
+ else {
+ res = false;
+ break;
+ }
+ }
+ 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 {
+ res = false;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (!res) {
+ s._drag_id = null;
+ s._drag_mode = null;
+ res = (s.checkEvent("onLimitViolation")) ? s.callEvent("onLimitViolation",[ev.id, ev]) : res;
+ }
+ }
+ return res;
+ };
+ 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) {
+ if(data.rec_type){
+ var data_copy = scheduler._lame_clone(data);
+ scheduler._roll_back_dates(data_copy);
+ return blocker(data);
+ }
+ 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 (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.is_one_day_event(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.is_one_day_event(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.markNow();
+ });
+ scheduler.attachEvent("onSchedulerResize", function(){
+ window.setTimeout(function(){ scheduler.markNow(); }, 1);
+ return true;
+ });
+ scheduler.attachEvent("onTemplatesReady", function() {
+ scheduler._mark_now_timer = window.setInterval(function() {
+ scheduler.markNow();
+ }, 60000);
+ });
+ scheduler.markNow = 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.config.now_date || new Date();
+ 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";
+
+ 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 = start||scheduler._min_date;
+ end = 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;
+
+ if (!day && day !== 0) { // in case of markTimespan
+ 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;
+
+ var day_index = date_to_display.getDay();
+ if (scheduler.config.start_on_monday) {
+ day = (day_index == 0) ? 6 : day_index-1;
+ } else
+ day = day_index;
+ }
+ }
+ 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 {
+ area = area ? area : scheduler.locate_holder(day);
+
+ 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)
+ return [];
+
+ var block = scheduler._get_block_by_config(options);
+ block.className = css_classes;
+
+ block.style.top = (Math.round((start*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+"px";
+ block.style.lineHeight = block.style.height = Math.max((Math.round(((end-start-1)*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24), 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];
+ 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
+
+ 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] = [];
+ 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] = [];
+ 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";
+ 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) {
+ if (!arguments.length) // delete everything
+ scheduler._marked_timespans = { global: {} };
+ if (typeof configuration != "object") { // id was passed
+ scheduler._delete_marked_timespan_by_id(configuration);
+ } else { // normal configuration was passed
+ var configs = scheduler._prepare_timespan_options(configuration);
+ for (var i=0; i<configs.length; i++) {
+ var config = configs[i];
+ scheduler._delete_marked_timespan_by_config(configs[i]);
+ }
+ }
+ };
+ 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 = (view.position||0)+Math.floor((this._correct_shift(day.valueOf(),1)-this._min_date.valueOf())/(60*60*24*1000)); // user index
+ 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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_map_view.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_map_view.js index e2e17d14e03..2cda69384b3 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_map_view.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_map_view.js @@ -1,6 +1,6 @@ /* 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 +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
@@ -29,7 +29,7 @@ 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, 1, "hour")
+ end_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, "minute")
});
};
scheduler.templates.map_time = function(start, end, ev) {
@@ -87,20 +87,20 @@ scheduler.attachEvent("onSchedulerReady", function() { 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, 1, "hour")
- });
- }
+ { '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")
+ });
}
- );
+ }
+ );
}
});
@@ -182,7 +182,7 @@ scheduler.attachEvent("onSchedulerReady", function() { 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 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._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();
}
@@ -191,11 +191,14 @@ scheduler.attachEvent("onSchedulerReady", function() { function clear_map_tab() {
scheduler._selected_event_id = null;
scheduler.map._infowindow.close();
- for (var key in scheduler.map._markers) {
- scheduler.map._markers[key].setMap(null);
- delete scheduler.map._markers[key];
- if (scheduler.map._infowindows_content[key])
- delete scheduler.map._infowindows_content[key];
+ 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];
+ }
}
}
@@ -203,20 +206,9 @@ scheduler.attachEvent("onSchedulerReady", function() { //select events for which data need to be printed
var events = scheduler.get_visible_events();
events.sort(function(a, b) {
- if (a.start_date < b.start_date)
- return -1;
- if (a.start_date.valueOf() == b.start_date.valueOf()) {
- if (a.text < b.text)
- return -1
- else {
- if (a.text == b.text)
- return 0;
- else
- return 1;
- }
- }
- else
- return 1;
+ 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
@@ -224,7 +216,7 @@ scheduler.attachEvent("onSchedulerReady", function() { 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-color:" + ev.color + ";") : "");
+ 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'> </div>";
@@ -244,7 +236,6 @@ scheduler.attachEvent("onSchedulerReady", function() { for (var i = 0; i < t.length - 2; i++) {
scheduler._rendered[i] = t[i];
}
-
}
function _setMapSize(elem_id) { //input - map's div id
@@ -267,7 +258,7 @@ scheduler.attachEvent("onSchedulerReady", function() { 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 || (new Date());
- scheduler._max_date = scheduler.config.map_end || (new Date(9999, 1, 1));
+ scheduler._max_date = scheduler.config.map_end || scheduler.date.add(new Date(), 1, "year");
scheduler._table_view = true;
set_full_view(mode);
@@ -358,29 +349,29 @@ scheduler.attachEvent("onSchedulerReady", function() { 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();
+ {
+ '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._selected_event_id = event.id;
- scheduler._latLngUpdate = true;
- scheduler.callEvent("onEventChanged", [event.id, event]);
- showAddress(event, true, true);
- }
- );
+ scheduler._latLngUpdate = true;
+ scheduler.callEvent("onEventChanged", [event.id, event]);
+ showAddress(event, true, true);
+ }
+ );
} else {
showAddress(event, true, true);
}
@@ -389,32 +380,32 @@ scheduler.attachEvent("onSchedulerReady", function() { 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]);
+ {
+ '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 = obj = params = null;
+ method = object = params = null;
return ret;
}, delay || 1);
};
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_minical.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_minical.js new file mode 100644 index 00000000000..595af055fce --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_minical.js @@ -0,0 +1,435 @@ +/* +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 || (new Date());
+ 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) {
+ var table = cal.childNodes[2].childNodes[0];
+ if (typeof date == "string")
+ date = scheduler.templates.api_date(date);
+
+ var d = cal.week_start + date.getDate() - 1;
+ return table.rows[Math.floor(d / 7)].cells[d % 7].firstChild;
+};
+scheduler.markCalendar = function(cal, date, css) {
+ this._locateCalendar(cal, date).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);
+ 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(new Date());
+ 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 = [" ", " "];
+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);
+
+ 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 = this.date.week_start(sd);
+ 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(new Date());
+
+ 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;'> – </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 + " </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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_multiselect.js index 2890d0180a6..ccf9b911900 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multiselect.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_multiselect.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.form_blocks["multiselect"]={
render:function(sns) {
@@ -25,31 +25,30 @@ scheduler.form_blocks["multiselect"]={ _children[i].checked = !! ids[_children[i].value];
}
}
-
- if(!scheduler._new_event) { // if it is a new event - new to get saved options
- 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;
+
+ 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);
- }
- else {
- 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);
- });
- }
+ node.removeChild(divLoading);
+ });
}
},
get_value:function(node,ev,config){
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multisource.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_multisource.js index 2205f0553a0..eb8e193ca82 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_multisource.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_multisource.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ (function(){
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_offline.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_offline.js new file mode 100644 index 00000000000..0e8e2a21678 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_outerdrag.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_outerdrag.js index 406b1a02442..10cf72e6424 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_outerdrag.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_outerdrag.js @@ -1,6 +1,6 @@ /* 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 +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(){
@@ -13,7 +13,10 @@ scheduler.attachEvent("onTemplatesReady", function(){ return old.apply(this, arguments);
};
dragger.addDragLanding(scheduler._els["dhx_cal_data"][0],{
- _drag:function(sourceHtmlObject,dhtmlObject,targetHtmlObject){
+ _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,e){
if (!scheduler.callEvent("onExternalDragIn", [id, sourceHtmlObject, e])){
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_pdf.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_pdf.js new file mode 100644 index 00000000000..fad86c2e5d6 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_pdf.js @@ -0,0 +1,276 @@ +/* +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.toPDF=function(url,mode,header,footer){
+ var dx = 0;
+ var dy = 0;
+ var colors = false;
+ if (mode == "fullcolor"){
+ colors = true;
+ mode = "color";
+ }
+
+ mode = mode||"color";
+ html_regexp = new RegExp("<[^>]*>","g");
+ newline_regexp = new RegExp("<br[^>]*>","g");
+ function clean_html(val){
+ return val.replace(newline_regexp, "\n").replace(html_regexp,"");
+ }
+ function x_norm(x) {
+ x = parseFloat(x);
+ if (isNaN(x)) return "auto";
+ return 100 * x / (dx + 1);
+ }
+ function y_norm(y) {
+ y = parseFloat(y);
+ if (isNaN(y)) return "auto";
+ return 100 * y / dy;
+ }
+ 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 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_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++){
+ /* var dd = r[i].cells[j];
+ var css = dd.className;
+
+ if (css!=" " && css!="dhx_now ")
+ days.push("");
+ else*/
+ 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_top(profile) {
+ var xml = "<data profile='"+profile+"'";
+ if (header)
+ xml+=" header='"+header+"'";
+ if (footer)
+ xml+=" footer='"+footer+"'";
+ 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 get_style(node, style){
+ return (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||"";
+ }
+ function xml_body() {
+ var xml = "";
+ var evs = scheduler._rendered;
+ if (scheduler._mode == "agenda" || scheduler._mode == "map"){
+ for (var i=0; i < evs.length; i++)
+ xml+="<event><head>"+clean_html(evs[i].childNodes[0].innerHTML)+"</head><body>"+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 {
+ var matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];
+ 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 = x_norm(evs[i].style.left);
+ var zdx = x_norm(evs[i].style.width);
+ 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 (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;
+ var day = dets._sday;
+ var week = dets._sweek;
+ var length = dets._length || 0;
+ if (scheduler._mode != "month") {
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]){
+ day = 0;
+ var el = evs[i].parentNode.parentNode.parentNode;
+ week = el.rowIndex;
+ zdx += x_norm(10);
+ } else {
+
+ if (scheduler.xy.menu_width){
+ zdx+=x_norm(zdx*20/100);
+ zx-=x_norm(15-zx*20/100);
+ }
+
+ if (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;
+ zx += x_norm(evs[i].parentNode.style.left);
+ zx -= x_norm(51);
+ }
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ var dy_copy = dy;
+ dy = evs[i].parentNode.offsetHeight;
+ zy = y_norm(evs[i].style.top);
+ zy -= zy*0.2;
+ dy = dy_copy;
+ }
+ } else {
+ 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);
+ }
+
+ 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 xml_end(){
+ var xml = "</data>";
+ return xml;
+ }
+
+ var uid = (new Date()).valueOf();
+ 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>';
+ document.getElementById(uid).firstChild.value = encodeURIComponent(xml_top(mode).replace("\u2013", "-") + xml_body() + xml_end());
+ document.getElementById(uid).submit();
+ d.parentNode.removeChild(d);grid = null;
+};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_readonly.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_readonly.js index 9bd1df9d859..df888122424 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_readonly.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_readonly.js @@ -1,20 +1,69 @@ /* 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 +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)
+ 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;
- return true;
+ scheduler.config.buttons_left = original_left_buttons.slice();
+ scheduler.config.buttons_right = original_right_buttons.slice();
}
- for (var i = 0; i < this.config.lightbox.sections.length; i++) {
- this.config.lightbox.sections[i].focus = false;
+ 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;
});
@@ -37,26 +86,13 @@ scheduler.attachEvent("onTemplatesReady", function() { var old = scheduler._fill_lightbox;
scheduler._fill_lightbox = function() {
- var sns = this.config.lightbox.sections;
- if (this.config.readonly_active) {
- for (var i = 0; i < sns.length; i++) {
- if (sns[i].type == 'recurring') {
- var s = document.getElementById(sns[i].id);
- s.style.display = s.nextSibling.style.display = 'none';
- sns.splice(i, 1);
- i--;
- }
- }
- }
-
var res = old.apply(this, arguments);
if (this.config.readonly_active) {
- var d = this._get_lightbox();
+ var d = this.getLightbox();
var n = this._lightbox_r = d.cloneNode(true);
n.id = scheduler.uid();
- n.style.color = "red";
txt_replace("textarea", d, n, function(a) {
return a.value;
@@ -66,9 +102,6 @@ scheduler.attachEvent("onTemplatesReady", function() { return a.options[Math.max((a.selectedIndex || 0), 0)].text;
});
- n.removeChild(n.childNodes[2]);
- n.removeChild(n.childNodes[3]);
-
d.parentNode.insertBefore(n, d);
olds.call(this, n);
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_recurring.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_recurring.js new file mode 100644 index 00000000000..998fe8bedd2 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_recurring.js @@ -0,0 +1,750 @@ +/* +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(new Date(), 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"];
+ for (var i = 0; i < col.length; i++) {
+ if (col[i].checked) t.push(col[i].value);
+ }
+ if (!t.length)
+ t.push(dates.start.getDay());
+
+ dates.start = scheduler.date.week_start(dates.start);
+ dates._start = true;
+
+ code.push(t.sort().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 = 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];
+ }
+ };
+})();
+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("onBeforeEventDelete", 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.addEvent(nev);
+
+ this._not_render = false;
+ 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)) {
+ 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 pid = this.getEvent(id).event_pid;
+ var isVirtual = (id.toString().indexOf("#") != -1);
+ if (isVirtual)
+ pid = id.split("#")[0];
+ if ( !pid || pid == 0 || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {
+ return this.showLightbox_rec(id); // editing instance or non recurring event
+ }
+ // show series
+ var callback = function() {
+ pid = this.getEvent(pid);
+ pid._end_date = pid.end_date;
+ pid.end_date = new Date(pid.start_date.valueOf() + pid.event_length * 1000);
+ return this.showLightbox_rec(pid.id); // editing series
+ };
+ 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 callback.call(that);
+ case 1:
+ return that.showLightbox_rec(id);
+ case 2:
+ return;
+ }
+ }
+ });
+ } else {
+ callback();
+ }
+
+};
+
+
+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.is_one_day_event;
+ scheduler.is_one_day_event = 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 && 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.is_one_day_event(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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_serialize.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_serialize.js index 9d19f520861..92273c13b44 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_serialize.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_serialize.js @@ -1,6 +1,6 @@ /* 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 +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(){
@@ -42,7 +42,7 @@ scheduler.toJSON = function(){ 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,"")+'" ');
+ 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")+"]";
@@ -53,6 +53,7 @@ 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){
@@ -61,8 +62,14 @@ scheduler.toICal = function(header){ ical.push("BEGIN:VEVENT");
- ical.push("DTSTART:"+format(ev.start_date));
- ical.push("DTEND:"+format(ev.end_date));
+ 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");
}
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_timeline.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_timeline.js new file mode 100644 index 00000000000..35ac0826158 --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_timeline.js @@ -0,0 +1,963 @@ +/* +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.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._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,
+ second_scale: false,
+ _logic: function(render_name, y_unit, timeline) {
+ var res = {};
+ if(scheduler.checkEvent("onBeforeViewRender")) {
+ res = scheduler.callEvent("onBeforeViewRender", [render_name, y_unit, timeline]);
+ }
+ return res;
+ }
+ });
+
+ if (scheduler.checkEvent("onTimelineCreated")) {
+ scheduler.callEvent("onTimelineCreated", [obj]);
+ }
+
+ var old = scheduler.render_data;
+ scheduler.render_data=function(evs, mode){
+
+ if (this._mode == obj.name){
+ if (mode) //repaint single event, precision is not necessary
+ 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))
+ return scheduler.templates.day_date(datea);
+ 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(a, b, c){
+ return scheduler.date.add(a, (obj.x_length||obj.x_size)*b*obj.x_step, obj.x_unit);
+ };
+
+ 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;
+ }
+ }
+
+ 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) {
+ ev[obj.y_property] = pos.section;
+ }
+ }
+
+ pos.x = 0;
+
+ var end_date;
+ if(xind >= obj._trace_x.length) { // if our event is at the end of the view
+ end_date = scheduler.date.add(obj._trace_x[obj._trace_x.length-1], obj.x_step, obj.x_unit);
+ } else {
+ var max_date = (obj._trace_x[xind+1]) ? obj._trace_x[xind+1] : scheduler.date.add(obj._trace_x[obj._trace_x.length-1], obj.x_step, obj.x_unit);
+ var timestamp_diff = Math.ceil(ratio*(max_date-obj._trace_x[xind]));
+ end_date = new Date(+obj._trace_x[xind]+timestamp_diff);
+ }
+
+ if (this._drag_mode == "move" && this._drag_id && this._drag_event) { // as we can simply be calling _locate_cell_timeline
+ var ev = this.getEvent(this._drag_id);
+ var drag_event = this._drag_event;
+
+ if (!drag_event._move_delta) {
+ drag_event._move_delta = (ev.start_date-end_date)/60000;
+ }
+
+ end_date = scheduler.date.add(end_date, drag_event._move_delta, "minute");
+ }
+
+ if (this._drag_mode == "resize" && ev) {
+ pos.resize_from_start = !!(Math.abs(ev.start_date-end_date) < Math.abs(ev.end_date-end_date));
+ }
+
+ pos.y = Math.round((end_date-this._min_date)/(1000*60*this.config.time_step));
+ pos.custom = true;
+ pos.shift = this.config.time_step //step_diff;
+ return pos;
+ }
+};
+
+scheduler.render_timeline_event = function(ev, attach){
+ var section = ev[this.y_property]; // section id
+
+ var sorder = ev._sorder;
+
+ var x_start = _getX(ev, false, this._step);
+ var x_end = _getX(ev, true, this._step);
+
+ var event_height = this.event_dy;
+ if (this.event_dy == "full") {
+ if (this.section_autoheight) {
+ event_height = this._section_height[section] - 6;
+ } else {
+ event_height = this.dy - 3;
+ }
+ }
+
+ if (this.resize_events) {
+ event_height = Math.max(Math.floor(event_height / ev._count), this.event_min_dy);
+ }
+
+ 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 = 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);
+ }
+
+ 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){
+ 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, step) {
+ var x = 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) {
+ column_offset = 0;
+ } else {
+ var index = Math.round( delta/(step*scheduler._cols[0]) ); // results varies ~0.9 - ~24.17, e.g. that way we get 1 and 24
+ if(index>scheduler._cols.length) // if columns really small it's possible to get incorrect index
+ index = scheduler._cols.length;
+ for (var k=0; k<index; k++) {
+ x += scheduler._cols[k];
+ }
+ var column_date = scheduler.date.add(scheduler._min_date_timeline, scheduler.matrix[scheduler._mode].x_step*index, scheduler.matrix[scheduler._mode].x_unit);
+ delta = date - column_date;
+ var column_offset = Math.floor(delta/step);
+ }
+ x += (isEndPoint) ? column_offset-14 : column_offset+1;
+ return x;
+}
+function get_events_html(evs) {
+ var html = "";
+ if (evs && this.render != "cell"){
+ 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 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;
+
+ // cutting stack from the last -> first event side
+ while (stack.length) {
+ if (stack[stack.length-1].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();
+ for (var j=0; j<tevs.length; j++){
+ var ind = this.order[ tevs[j][this.y_property] ];
+ if (!evs[ind]) evs[ind] = [];
+ evs[ind].push(tevs[j]);
+ }
+ }
+
+ var summ = 0;
+ for (var i=0; i < scheduler._cols.length; i++)
+ summ+=scheduler._cols[i];
+
+ var step = new Date();
+ step = (scheduler.date.add(step, this.x_step*this.x_size, this.x_unit)-step)/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++) {
+ 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++)
+ 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-18; //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 start = scheduler._min_date;
+ for (var k=0; k<this.x_size; k++){
+ // dates calculation
+ this._trace_x[k]=new Date(start);
+ start = scheduler.date.add(start, this.x_step, this.x_unit);
+
+ // position calculation
+ scheduler._cols[k]=Math.floor(summ/(this.x_size-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++){
+ 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);
+ }
+}
+
+
+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_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'> </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++) {
+ if (+pos.date <= view._trace_x[xind+1]) // | 8:00, 8:30 | 8:15 should be checked against 8:30
+ break;
+ }
+
+ res.x = xind;
+ res.y = view.order[pos.section];
+ var diff = scheduler._isRender('cell') ? 1 : 0;
+ res.src = view._scales[pos.section].getElementsByTagName('td')[xind+diff];
+
+ if (trg.className.split(" ")[0] == "dhx_matrix_scell") { // 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);
+ event_options[scheduler.matrix[scheduler._mode].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.is_one_day_event(ev);
+});
+var old_render_marked_timespan = scheduler._render_marked_timespan;
+scheduler._render_marked_timespan = function(options, area, unit_id) {
+ if (!scheduler.config.display_marked_timespans)
+ return [];
+
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ if (scheduler._isRender('cell'))
+ return;
+
+ var view_opts = scheduler.matrix[scheduler._mode];
+ 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 = scheduler._min_date;
+ var 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 (!(scheduler._min_date < end_date && scheduler._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._step)-1;
+ var end_pos = _getX({start_date: end_date}, false, view_opts._step)-1;
+ var width = 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) {
+ if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {
+ var n_date = new Date();
+ 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]);
+ }
+};
+scheduler.attachEvent("onViewChange", function(date, mode) {
+ if (scheduler.matrix && scheduler.matrix[mode]) {
+ if (scheduler.markNow) {
+ scheduler.markNow();
+ }
+ }
+});
+
+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 unit_types = scheduler._get_types_to_render(timespans[mode][unit_key][day_index], timespans[mode][unit_key][day_value]);
+ r_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));
+ }
+
+ for (var i=0; i<r_configs.length; i++) {
+ var config = r_configs[i];
+ var day = config.days;
+ if (day < 7) {
+ day = day_value;
+ scheduler._render_marked_timespan(config, scale, unit_key);
+ day = day_index;
+ } else {
+ scheduler._render_marked_timespan(config, scale, unit_key);
+ }
+ }
+ }
+ }
+});
+
+})();
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_tooltip.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_tooltip.js new file mode 100644 index 00000000000..c6f13b7a28a --- /dev/null +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_tooltip.js @@ -0,0 +1,172 @@ +/* +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 = {};
+
+dhtmlXTooltip.config = {
+ className: 'dhtmlXTooltip tooltip',
+ timeout_to_display: 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
+ 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 (this.isTooltip(target)) {
+ return;
+ } // if we are over tooltip -- do nothing, just return (so tooltip won't move)
+
+ var offsetleft = 0;
+ var offsettop = 0;
+ var pobj = scheduler._obj;
+ if (pobj.offsetParent) {
+ do {
+ offsetleft += pobj.offsetLeft;
+ offsettop += pobj.offsetTop;
+ } while (pobj = pobj.offsetParent);
+ }
+
+ var actual_x = pos.x + (dhxTooltip.config.delta_x || 0) - offsetleft;
+ var actual_y = pos.y - (dhxTooltip.config.delta_y || 0) - offsettop;
+
+ 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;
+ scheduler._obj.appendChild(this.tooltip);
+
+ var tooltip_width = this.tooltip.offsetWidth;
+ var tooltip_height = this.tooltip.offsetHeight;
+ var parent_scrollLeft = scheduler._obj.parentNode.scrollLeft || 0;
+ var visible_width = Math.min(scheduler._obj.offsetWidth, scheduler._obj.parentNode.offsetWidth);
+
+ if ((visible_width - actual_x - (scheduler.xy.margin_left || 0) - 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 = (scheduler._obj.offsetWidth - parent_scrollLeft - 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 + parent_scrollLeft) + "px";
+ }
+ }
+
+ if ((scheduler._obj.offsetHeight - actual_y - (scheduler.xy.margin_top || 0) - 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 = (scheduler._obj.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";
+};
+
+dhtmlXTooltip.hide = function() {
+ if (this.tooltip.parentNode) {
+ this.tooltip.parentNode.removeChild(this.tooltip);
+ }
+};
+dhtmlXTooltip.delay = function(method, object, params, delay) {
+ if (this.tooltip._timeout_id) {
+ window.clearTimeout(this.tooltip._timeout_id);
+ }
+ 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;
+ 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;
+
+ if (event_id || dhxTooltip.isTooltip(target)) { // if we are over event or tooltip
+ var event = scheduler.getEvent(event_id) || scheduler.getEvent(dhxTooltip.tooltip.event_id);
+ if (!event)
+ return;
+ dhxTooltip.tooltip.event_id = event.id;
+ var text = scheduler.templates.tooltip_text(event.start_date, event.end_date, event);
+ if (!text) return dhxTooltip.hide();
+
+ 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, event]) || !text)
+ return;
+
+ dhxTooltip.delay(dhxTooltip.show, dhxTooltip, [(evt || ev), text]); // showing tooltip
+ } else {
+ dhxTooltip.delay(dhxTooltip.hide, dhxTooltip, []);
+ }
+});
+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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_treetimeline.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_treetimeline.js index d92a4be8428..001b8b0ae6d 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_treetimeline.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_treetimeline.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.attachEvent("onTimelineCreated", function (obj){
@@ -90,7 +90,7 @@ var section_id_before; // section id of the event before dragging (to bring it b 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 (typeof section.children != 'undefined' && !scheduler.matrix[scheduler._mode].folder_events_available) {
+ 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;
}
@@ -101,15 +101,16 @@ scheduler.attachEvent("onBeforeEventChanged", function(event_object, native_even });
scheduler.attachEvent("onBeforeDrag", function (event_id, mode, native_event_object){
- 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;
- }
- }
if(scheduler._isRender("tree")) {
- ev = scheduler.getEvent(event_id);
+ 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;
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/property.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_units.js index 96f11ec64a5..39bd056338b 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/property.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_units.js @@ -1,6 +1,6 @@ /* 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 +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){
@@ -170,7 +170,7 @@ scheduler.scrollUnit=function(step){ var l = scheduler.locate_holder_day;
scheduler.locate_holder_day=function(a,b,ev){
var pr = scheduler._props[this._mode];
- if (pr){
+ if (pr && ev) {
fix_und(pr,ev);
return pr.order[ev[pr.map_to]]*1+(b?1:0)-pr.position;
}
@@ -188,9 +188,9 @@ scheduler.scrollUnit=function(step){ this._drag_event._dhx_changed = true;
}
var unit_ind = Math.min(pos.x+pr.position,pr.options.length-1);
- ev[pr.map_to]=pr.options[unit_ind].key;
+ var key = pr.map_to;
+ pos.section = ev[key]=pr.options[unit_ind].key;
pos.x = 0;
- pos.custom = true;
}
return pos;
};
@@ -215,7 +215,7 @@ scheduler.scrollUnit=function(step){ });
scheduler.attachEvent("onEventCreated",function(id,n_ev){
var pr = scheduler._props[this._mode];
- if (pr){
+ if (pr && n_ev){
var ev = this.getEvent(id);
this._mouse_coords(n_ev);
fix_und(pr,ev);
@@ -224,18 +224,3 @@ scheduler.scrollUnit=function(step){ return true;
})
})();
-
-
-/* just in case, there shouldn't be any need for this
-
- scheduler.getUnitSection = function(event_id) {
- var ev = scheduler.getEvent(event_id);
- var options = scheduler._props['unit'].options;
- var section;
- for(var i=0; i<options.length; i++) {
- if(ev.section_id == options[i].key)
- section = options[i];
- }
- return section;
- };
-*/
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_url.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_url.js index 01d030ec83b..2d39d36d326 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_url.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_url.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.attachEvent("onTemplatesReady",function(){
var first = true;
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_week_agenda.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_week_agenda.js index 9aa8b46d4cc..78e275b9d58 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_week_agenda.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_week_agenda.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler._wa = {};
scheduler.xy.week_agenda_scale_height = 20;
@@ -8,20 +8,20 @@ scheduler.templates.week_agenda_event_text = function(start_date, end_date, even 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){
+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.date.add_week_agenda = function(date, inc) {
+ return scheduler.date.add(date, inc * 7, "day");
};
-scheduler.attachEvent("onSchedulerReady", function(){
+scheduler.attachEvent("onSchedulerReady", function() {
var t = scheduler.templates;
- if(!t.week_agenda_date)
+ if (!t.week_agenda_date)
t.week_agenda_date = t.week_date;
});
-(function(){
+(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);
@@ -41,9 +41,8 @@ scheduler.attachEvent("onTemplatesReady", function() { var old = scheduler.render_data;
scheduler.render_data = function(evs) {
if (this._mode == "week_agenda") {
- fillWeekAgendaTab();
- }
- else
+ scheduler.week_agenda_view(true);
+ } else
return old.apply(this, arguments);
};
@@ -72,7 +71,9 @@ scheduler.attachEvent("onTemplatesReady", function() { 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];
@@ -83,11 +84,12 @@ scheduler.attachEvent("onTemplatesReady", function() { 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;
- 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'></div></div>";
+ 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_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 = [];
@@ -96,7 +98,7 @@ scheduler.attachEvent("onTemplatesReady", function() { 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 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++) {
@@ -104,38 +106,39 @@ scheduler.attachEvent("onTemplatesReady", function() { 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;
+ 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);
- ev_div.className = 'dhx_wa_ev_body';
- if(ev._text_style)
- ev_div.style.cssText = ev._text_style;
- if(ev.color)
- ev_div.style.backgroundColor = ev.color;
- if(ev.textColor)
+ 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) {
+ 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){
+ if (!ev._timed) {
position = "middle";
- if(ev.start_date.valueOf() >= tstart.valueOf() && ev.start_date.valueOf() <= tend.valueOf())
+ 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())
+ 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);
@@ -151,34 +154,32 @@ scheduler.attachEvent("onTemplatesReady", function() { scheduler._max_date = scheduler.date.add(scheduler._min_date, 1, "week");
scheduler.set_sizes();
if (mode) { // mode enabled
- scheduler._table_view=true;
+ 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 = "";
+ // 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)-scheduler.xy.bar_height-1) + 'px';
- scheduler._els['dhx_cal_data'][0].style.height = (parseInt(scheduler._els['dhx_cal_data'][0].style.height)+scheduler.xy.bar_height+1) + 'px';
-
+ scheduler._els['dhx_cal_data'][0].style.top = (parseInt(scheduler._els['dhx_cal_data'][0].style.top) - scheduler.xy.bar_height - 1) + 'px';
+ scheduler._els['dhx_cal_data'][0].style.height = (parseInt(scheduler._els['dhx_cal_data'][0].style.height) + scheduler.xy.bar_height + 1) + 'px';
+
scheduler._els['dhx_cal_header'][0].style.display = 'none';
- getColumnSizes();
fillWeekAgendaTab();
- }
- else { // leaving week_agenda mode
- scheduler._table_view=false;
+ } 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)+scheduler.xy.bar_height) + 'px';
- scheduler._els['dhx_cal_data'][0].style.height = (parseInt(scheduler._els['dhx_cal_data'][0].style.height)-scheduler.xy.bar_height) + 'px';
+ scheduler._els['dhx_cal_data'][0].style.top = (parseInt(scheduler._els['dhx_cal_data'][0].style.top) + scheduler.xy.bar_height) + 'px';
+ scheduler._els['dhx_cal_data'][0].style.height = (parseInt(scheduler._els['dhx_cal_data'][0].style.height) - scheduler.xy.bar_height) + 'px';
scheduler._els['dhx_cal_header'][0].style.display = 'block';
}
};
@@ -190,7 +191,7 @@ scheduler.attachEvent("onTemplatesReady", function() { var date = src._date;
src = src.parentNode;
}
- if(!date)
+ if (!date)
return pos;
pos.x = 0;
var diff = date.valueOf() - scheduler._min_date.valueOf();
@@ -227,29 +228,29 @@ scheduler.attachEvent("onTemplatesReady", function() { return true;
});
- scheduler.attachEvent("onEventSave",function(id,data,is_new_event){
- if(is_new_event)
+ 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'){
- if(scheduler._wa._selected_divs) {
- for(var i=0; i<this._wa._selected_divs.length; i++) {
+ 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/,'');
+ div.className = div.className.replace(/ dhx_cal_event_selected/, '');
}
}
- this.for_rendered(event_id, function(event_div){
+ this.for_rendered(event_id, function(event_div) {
event_div.className += " dhx_cal_event_selected";
scheduler._wa._selected_divs.push(event_div);
});
- this._select_id = event_id;
+ scheduler.select(event_id);
return false;
- }
- return true;
- });
+ }
+ return true;
+ });
});
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_year_view.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_year_view.js index f89bec4a7b1..3b01f67552d 100644 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_year_view.js +++ b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_year_view.js @@ -1,6 +1,6 @@ /* 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 +to use it in non-GPL project. Please contact sales@dhtmlx.com for details */ scheduler.config.year_x = 4;
scheduler.config.year_y = 3;
@@ -53,11 +53,14 @@ scheduler.templates.year_tooltip = function(s, e, ev) { var clear = scheduler.clear_view;
scheduler.clear_view = function() {
if (!is_year_mode()) return clear.apply(this, arguments);
- for (var i = 0; i < marked.length; i++) {
- marked[i].className = "dhx_month_head";
- marked[i].setAttribute("date", "")
+ for (var date in marked) {
+ if (marked.hasOwnProperty(date)) {
+ var div = marked[date];
+ div.className = "dhx_month_head";
+ div.setAttribute("date", "")
+ }
}
- marked = [];
+ marked = {};
};
scheduler.hideToolTip = function() {
@@ -83,7 +86,7 @@ scheduler.templates.year_tooltip = function(s, e, ev) { for (var i = 0; i < evs.length; i++) {
var ev = evs[i];
- var bg_color = (ev.color ? ("background-color:" + ev.color + ";") : "");
+ 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 + "'>";
@@ -145,12 +148,17 @@ scheduler.templates.year_tooltip = function(s, e, ev) { return t.childNodes[2].firstChild.rows[Math.floor(d / 7)].cells[d % 7].firstChild;
};
- var marked = [];
+ var marked = {};
scheduler._mark_year_date = function(d, ev) {
+ var date = to_attr(d);
var c = this._get_year_cell(d);
- c.className = "dhx_month_head dhx_year_event " + this.templates.event_class(ev.start_date, ev.end_date, ev);
- c.setAttribute("date", to_attr(d))
- marked.push(c);
+ 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";
@@ -188,6 +196,7 @@ scheduler.templates.year_tooltip = function(s, e, ev) { 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();
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_active_links.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_active_links.js deleted file mode 100644 index 46bc624c1ea..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_active_links.js +++ /dev/null @@ -1,26 +0,0 @@ -/* -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.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),"day");
- if (e && e.preventDefault) e.preventDefault();
- return false;
- }
- })
-});
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_key_nav.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_key_nav.js deleted file mode 100644 index 242f735a41f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_key_nav.js +++ /dev/null @@ -1,36 +0,0 @@ -/* -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 -*/ -//Initial idea and implementation by Steve MC
-(function (){
-
-var lightboxopen = false;
-
-scheduler.attachEvent("onBeforeLightbox",function(){ lightboxopen = true; return true; });
-scheduler.attachEvent("onAfterLightbox",function(){ lightboxopen = false; return true; });
-
-dhtmlxEvent(document,(_isOpera?"keypress":"keydown"),function(e){
- e=e||event;
- if (!lightboxopen){
-
- if (e.keyCode == 37 || e.keyCode == 39) { // Left-Arrow
- e.cancelBubble = true;
-
- var next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);
- scheduler.setCurrentView(next);
- return true;
- } else if (e.ctrlKey && e.keyCode == 67){
- scheduler._copy_id = scheduler._select_id;
- } else if (e.ctrlKey && e.keyCode == 86){
- var ev = scheduler.getEvent(scheduler._copy_id);
- if (ev){
- var new_ev = scheduler._copy_event(ev);
- new_ev.id = scheduler.uid();
- scheduler.addEvent(new_ev);
- }
- }
- }
-});
-
-})();
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_layer.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_layer.js deleted file mode 100644 index 322f1668838..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_layer.js +++ /dev/null @@ -1,403 +0,0 @@ -/* -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.attachEvent("onTemplatesReady",function(){ - - this.layers.sort(function(a, b){ - return a.zIndex - b.zIndex; - }); - - scheduler._dp_init=function(dp){ - dp._methods=["setEventTextStyle","","changeEventId","deleteEvent"]; - - this.attachEvent("onEventAdded",function(id){ - if (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer) - dp.setUpdated(id,true,"inserted"); - }); - this.attachEvent("onBeforeEventDelete",function(id){ - if(this.getEvent(id) && this.getEvent(id).layer == dp.layer) { - 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; - } - else return true; - }); - this.attachEvent("onEventChanged",function(id){ - if (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer) - 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); - }); - }; - - (function() { - var _cloneObj = function(obj){ - if(obj == null || typeof(obj) != 'object') - return obj; - var temp = new obj.constructor(); - for(var key in obj) - temp[key] = _cloneObj(obj[key]); - return temp; - }; - - scheduler._dataprocessors = []; - scheduler._layers_zindex = {}; - for(var i=0; i<scheduler.layers.length; i++) { - scheduler.config['lightbox_'+scheduler.layers[i].name] = { }; - scheduler.config['lightbox_'+scheduler.layers[i].name].sections = _cloneObj(scheduler.config.lightbox.sections); - scheduler._layers_zindex[scheduler.layers[i].name] = scheduler.config.inital_layer_zindex||5 + i*3; - if(scheduler.layers[i].url) { - var dp = new dataProcessor(scheduler.layers[i].url); - dp.layer = scheduler.layers[i].name; - scheduler._dataprocessors.push(dp); - scheduler._dataprocessors[i].init(scheduler); - } - if(scheduler.layers[i].isDefault) - scheduler.defaultLayer = scheduler.layers[i].name; - } - })(); - - - scheduler.showLayer = function(tlayer) { - this.toggleLayer(tlayer, true); - }; - - scheduler.hideLayer = function(tlayer) { - this.toggleLayer(tlayer, false); - }; - - scheduler.toggleLayer = function(tlayer, visible) { // visible is optional - var layer = this.getLayer(tlayer); - - if(typeof visible != 'undefined') - layer.visible = !!visible; - else - layer.visible = !layer.visible; - - this.setCurrentView(this._date, this._mode); - }; - - scheduler.getLayer = function(tlayer) { // either string with layer name or event with layer property - if(typeof tlayer == 'string') - var layer_name = tlayer; - if(typeof tlayer == 'object') - var layer_name = tlayer.layer; - var layer; - for (var i=0; i<scheduler.layers.length; i++) { - if(scheduler.layers[i].name == layer_name) - layer = scheduler.layers[i]; - } - return layer; - }; - - scheduler.attachEvent("onBeforeLightbox", function (event_id){ - var ev = this.getEvent(event_id); - this.config.lightbox.sections = this.config['lightbox_'+ev.layer].sections; - scheduler.resetLightbox(); - return true; - }); - - scheduler.attachEvent("onClick", function (event_id, native_event_object){ - var ev = scheduler.getEvent(event_id); - return !scheduler.getLayer(ev.layer).noMenu; - }); - - scheduler.attachEvent('onEventCollision', function(ev, evs) { - var layer = this.getLayer(ev); - if(!layer.checkCollision) - return false; - var count = 0; - for(var i = 0; i<evs.length; i++) { - if(evs[i].layer == layer.name && evs[i].id != ev.id) - count++; - } - return (count >= scheduler.config.collision_limit); - }); - - scheduler.addEvent=function(start_date,end_date,text,id,extra_data){ - 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.layer = this.defaultLayer; - }; - 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); - ev._timed=this.is_one_day_event(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]); - }; - - this._evs_layer = {}; - for (var i = 0; i < this.layers.length; i++) { // array in object for each layer - this._evs_layer[this.layers[i].name] = []; - } - - scheduler.addEventNow=function(start,end,e){ - var base = {}; - if (typeof start == "object"){ - base = start; - start = null; - } - - var d = (this.config.event_duration||this.config.time_step)*60000; - if (!start) start = Math.round((new Date()).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+d; - } - - - base.start_date = base.start_date||start_date; - base.end_date = base.end_date||new Date(end); - base.text = base.text||this.locale.labels.new_event; - base.id = this._drag_id = this.uid(); - base.layer = this.defaultLayer; - 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._t_render_view_data = function(events) { // helper - if (this.config.multi_day && !this._table_view) { - var tvs = []; - var tvd = []; - for (var k = 0; k < events.length; k++) { - if (events[k]._timed) - tvs.push(events[k]); - else - tvd.push(events[k]); - } - this._table_view = true; - this.render_data(tvd); - this._table_view = false; - this.render_data(tvs); - } - else - this.render_data(events); - }; - - scheduler.render_view_data = function(){ - if (this._not_render) { - this._render_wait = true; - return; - } - this._render_wait = false; - - this.clear_view(); - - this._evs_layer = {}; - for (var i = 0; i < this.layers.length; i++) { // array in object for each layer - this._evs_layer[this.layers[i].name] = []; - } - - var evs = this.get_visible_events(); - for (var i = 0; i < evs.length; i++) { // filling layer arrays with events - if(this._evs_layer[evs[i].layer]) - this._evs_layer[evs[i].layer].push(evs[i]); - } - - if(this._mode == 'month') { // old logic is used - var tevs = []; - for (var i = 0; i < this.layers.length; i++) { - if (this.layers[i].visible) - tevs = tevs.concat(this._evs_layer[this.layers[i].name]); - } - this._t_render_view_data(tevs); - } - else { // week, day; should use new logic - for (var i = 0; i < this.layers.length; i++) { - if (this.layers[i].visible) { - var evs_layer = this._evs_layer[this.layers[i].name]; - this._t_render_view_data(evs_layer); - } - } - } - }; - - scheduler._render_v_bar=function(id,x,y,w,h,style,contentA,contentB,bottom){ - var ev = this.getEvent(id); - if(contentA.indexOf('<div class=') == -1) - contentA = (scheduler.templates['event_header_'+ev.layer])?scheduler.templates['event_header_'+ev.layer](ev.start_date,ev.end_date,ev):contentA; - if(contentB.indexOf('<div class=') == -1) - contentB = (scheduler.templates['event_text_'+ev.layer])?scheduler.templates['event_text_'+ev.layer](ev.start_date,ev.end_date,ev):contentB; - - var d=document.createElement("DIV"); - - - var cs = "dhx_cal_event"; - var cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev); - if (cse) cs=cs+" "+cse; - - 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||"")+'">'; - html+='<div class="dhx_header" style=" width:'+(w-6)+'px;" > </div>'; - html+='<div class="dhx_title">'+contentA+'</div>'; - html+='<div class="dhx_body" style=" width:'+(w-(this._quirks?4:14))+'px; height:'+(h-(this._quirks?20:30))+'px;">'+contentB+'</div>'; - html+='<div class="dhx_footer" style=" width:'+(w-8)+'px;'+(bottom?' margin-top:-1px;':'')+'" ></div></div>'; - - d.innerHTML=html; - d.style.zIndex = 100; - return d.firstChild; - }; - - scheduler.render_event_bar=function(ev){ - var parent=this._els["dhx_cal_data"][0]; - - 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 y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb; - - var d=document.createElement("DIV"); - var cs = ev._timed?"dhx_cal_event_clear":"dhx_cal_event_line"; - var cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev); - if (cse) cs=cs+" "+cse; - - var html='<div event_id="'+ev.id+'" class="'+cs+'" style="position:absolute; top:'+y+'px; left:'+x+'px; width:'+(x2-x-15)+'px;'+(ev._text_style||"")+'">'; - - if (ev._timed) - html+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev); - html+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):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.render_event=function(ev){ - var menu = scheduler.xy.menu_width; - if(scheduler.getLayer(ev.layer).noMenu) - menu = 0; - - 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 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)+1; //42px/hour - var height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour - //var height = Math.max(25,Math.round((ev.end_date.valueOf()-ev.start_date.valueOf())*(this.config.hour_size_px+(this._quirks?1:0))/(60*60*1000))); //42px/hour - var width=Math.floor((parent.clientWidth-menu)/ev._count); - var left=ev._sorder*width+1; - if (!ev._inner) width=width*(ev._count-ev._sorder); - - - - var d=this._render_v_bar(ev.id,menu+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; - - top+=this._dy_shift; //corrupt top, to include possible multi-day shift - d.style.zIndex = this._layers_zindex[ev.layer]; - - if (this._edit_id==ev.id){ - d.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue - var new_zIndex = d.style.zIndex; - width=Math.max(width-4,scheduler.xy.editor_width); - var 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"; - d.style.zIndex = new_zIndex; - var d2=document.createElement("DIV"); - this.set_xy(d2,width-6,height-26); - d2.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;"; - - - d2.style.zIndex = new_zIndex; - 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.onkeypress=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; }; - d2.firstChild.focus(); - //IE and opera can add x-scroll during focusing - this._els["dhx_cal_data"][0].scrollLeft=0; - d2.firstChild.select(); - } - if (this._select_id==ev.id){ - d.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue - var icons=this.config["icons_"+((this._edit_id==ev.id)?"edit":"select")]; - var icons_str=""; - for (var i=0; i<icons.length; i++) - icons_str+="<div class='dhx_menu_icon "+icons[i]+"' title='"+this.locale.labels[icons[i]]+"'></div>"; - var obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,"","<div class='dhx_menu_head'></div>",icons_str,true); - obj.style.left=left-menu+1; - obj.style.zIndex = d.style.zIndex; - this._els["dhx_cal_data"][0].appendChild(obj); - this._rendered.push(obj); - } - - }; - - scheduler.filter_agenda = function(id, event) { - var layer = scheduler.getLayer(event.layer); - return (layer && layer.visible); - }; -}); diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_limit.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_limit.js deleted file mode 100644 index ad790cf3ea9..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_limit.js +++ /dev/null @@ -1,166 +0,0 @@ -/* -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.config.limit_start = new Date(-3999,0,0);
-scheduler.config.limit_end = new Date( 3999,0,0);
-scheduler.config.limit_view = false;
-
-(function(){
- var before = null;
-
- var block_days = {};
- var block_weeks = {};
- var time_block_set = false;
- scheduler.blockTime = function(day, zones){
- var bottom = this.config.first_hour*60
- var top = this.config.last_hour*60
- if (zones == "fullday")
- zones = [bottom,top];
-
- if (typeof day == "object")
- block_days[this.date.date_part(day).valueOf()] = zones;
- else
- block_weeks[day] = zones;
-
- for (var i=0; i<zones.length; i+=2){
- if (zones[i]<bottom)
- zones[i] = bottom;
- if (zones[i+1]>top)
- zones[i+1] = top;
- }
-
- time_block_set = true;
- };
-
- scheduler.attachEvent("onScaleAdd", function(area, day){
- var zones = block_days[day.valueOf()] || block_weeks[day.getDay()];
- if (zones){
- for (var i = 0; i < zones.length; i+=2){
- var start = zones[i];
- var end = zones[i+1];
- var block = document.createElement("DIV");
- block.className = "dhx_time_block";
-
- var h_px // FIXME
- block.style.top = (Math.round((start*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+"px";
- block.style.height = (Math.round(((end-start-1)*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+"px";
-
- area.appendChild(block);
- }
- }
- });
-
- 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;
- });
- var blocker = function(ev){
- var c = scheduler.config;
- var res = (ev.start_date.valueOf() >= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf());
- if (res && time_block_set && ev._timed){
- var day = scheduler.date.date_part(new Date(ev.start_date.valueOf()));
- var zones = block_days[day.valueOf()] || block_weeks[day.getDay()];
- var sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();
- var em = ev.end_date.getHours()*60+ev.end_date.getMinutes();
- if (zones){
- for (var i = 0; i < zones.length; i+=2){
- var sz = zones[i];
- var ez = zones[i+1];
- if (sz<em && ez>sm) {
- if (sm<=ez && sm >=sz){
- if (ez == 24*60 || em<ez){
- res = false;
- break;
- }
- if(scheduler._drag_id && scheduler._drag_mode == "new-size"){
- ev.start_date.setHours(0);
- ev.start_date.setMinutes(ez);
- }
- else {
- res = false;
- break;
- }
- }
- if (em>=sz && em<ez){
- if(scheduler._drag_id && scheduler._drag_mode == "new-size"){
- ev.end_date.setHours(0);
- ev.end_date.setMinutes(sz);
- }
- else {
- res = false;
- break;
- }
- }
- }
- }
- }
- }
- if (!res) {
- scheduler._drag_id = null;
- scheduler._drag_mode = null;
- scheduler.callEvent("onLimitViolation",[ev.id, ev]);
- }
- return res;
- };
-
- 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("onEventAdded",function(id){
- if (!id) return true;
- var ev = scheduler.getEvent(id);
- if (!blocker(ev)){
- 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.is_one_day_event(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.is_one_day_event(ev);
- };
- return true;
- });
- scheduler.attachEvent("onBeforeEventChanged",function(ev, native_object, is_new){
- return blocker(ev);
- });
-
-})();
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_matrix.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_matrix.js deleted file mode 100644 index 07ea857c13f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_matrix.js +++ /dev/null @@ -1,677 +0,0 @@ -/* -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 -*/ -(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._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,
- fit_events: true,
- second_scale: false,
- _logic: function(render_name, y_unit, timeline) {
- var res = {};
- if(scheduler.checkEvent("onBeforeViewRender")) {
- res = scheduler.callEvent("onBeforeViewRender", [render_name, y_unit, timeline]);
- }
- return res;
- }
- });
-
- if (scheduler.checkEvent("onTimelineCreated")) {
- scheduler.callEvent("onTimelineCreated", [obj]);
- }
-
- var old = scheduler.render_data;
- scheduler.render_data=function(evs, mode){
-
- if (this._mode == obj.name){
- if (mode) //repaint single event, precision is not necessary
- for (var i=0; i < evs.length; i++) {
- this.clear_event(evs[i]);
- this.render_timeline_event.call(this.matrix[this._mode], evs[i], 0, true);
- }
- else
- set_full_view.call(obj,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))
- return scheduler.templates.day_date(datea);
- 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(a,b,c){
- return scheduler.date.add(a,(obj.x_length||obj.x_size)*b*obj.x_step,obj.x_unit);
- };
-
- // note this is not correct start_date as it doesn't take into account x_start value (though scheduler._min_date is correct)
- scheduler.date[obj.name+"_start"] = scheduler.date[obj.x_unit+"_start"] || scheduler.date.day_start;
-
- scheduler.attachEvent("onSchedulerResize",function(){
- if (this._mode == obj.name){
- set_full_view.call(obj,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
- if (obj.render != "cell"){
- 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++) {
- summ+=this._cols[xind];
- if (summ>pos.x){ //index of section
- break;
- }
- }
-
- 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;
- }
- pos.fields[obj.y_property] = ev[obj.y_property] = obj.y_unit[yind].key;
-
- pos.x = 0;
-
- if (this._drag_mode == "new-size" && ev.start_date*1==this._drag_start*1) {
- xind++;
- }
-
-
- if(xind >= obj._trace_x.length) { // if our event is at the end of the view
- var end_date = scheduler.date.add(obj._trace_x[obj._trace_x.length-1], obj.x_step, obj.x_unit);
- } else {
- var end_date = obj._trace_x[xind];
- }
-
- pos.y = Math.round((end_date-this._min_date)/(1000*60*this.config.time_step));
- pos.custom = true;
- pos.shift = step_diff;
- return pos;
- };
- }
-};
-
-scheduler.render_timeline_event = function(ev, stack, attach){
-
- var x_start = _getX(ev, false, this._step);
- var x_end = _getX(ev, true, this._step);
-
- var hb = scheduler.xy.bar_height;
- var y = 2+stack*hb;
-
- var height = hb+y-2;
- var section = ev[this.y_property];
- if(!this._events_height[section] || (this._events_height[section] < height)){
- this._events_height[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-color:"+ev.color+";"):"");
- var color = (ev.textColor?("color:"+ev.textColor+";"):"");
-
- var html='<div event_id="'+ev.id+'" class="'+cs+'" style="'+bg_color+''+color+'position:absolute; top:'+y+'px; left:'+x_start+'px; width:'+Math.max(0,x_end-x_start)+'px;'+(ev._text_style||"")+'">'+scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev)+'</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, step) {
- var x = 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) {
- column_offset = 0;
- } else {
- var index = Math.round( delta/(step*scheduler._cols[0]) ); // results varies ~0.9 - ~24.17, e.g. that way we get 1 and 24
- if(index>scheduler._cols.length) // if columns really small it's possible to get incorrect index
- index = scheduler._cols.length;
- for (var k=0; k<index; k++) {
- x += scheduler._cols[k];
- }
- var column_date = scheduler.date.add(scheduler._min_date_timeline, scheduler.matrix[scheduler._mode].x_step*index, scheduler.matrix[scheduler._mode].x_unit);
- delta = date - column_date;
- var column_offset = Math.floor(delta/step);
- }
- x += (isEndPoint) ? column_offset-14 : column_offset+1;
- return x;
-}
-
-
-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();
- for (var j=0; j<tevs.length; j++){
- var ind = this.order[ tevs[j][this.y_property] ];
- if (!evs[ind]) evs[ind] = [];
- evs[ind].push(tevs[j]);
- }
- }
-
- var summ = 0;
- for (var i=0; i < scheduler._cols.length; i++)
- summ+=scheduler._cols[i];
-
- var step = new Date();
- step = (scheduler.date.add(step, this.x_step*this.x_size, this.x_unit)-step)/summ;
-
- this._step = step;
- this._summ = summ;
-
- var heights = scheduler._colsS.heights=[];
-
- this._events_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));
- }
- }
-
- 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))?" "+scheduler.templates[this.name+"_scaley_class"](this.y_unit[i].key, this.y_unit[i].label, this):''),
- 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 = "";
- if (evs[i] && this.render != "cell"){
- evs[i].sort(function(a,b){ return a.start_date>b.start_date?1:-1; });
- var stack=[];
- for (var j=0; j<evs[i].length; j++){
- var ev = evs[i][j];
-
- //get line in stack
- var stack_pointer = 0;
-
- while (stack[stack_pointer] && stack[stack_pointer].end_date > ev.start_date)
- stack_pointer++;
- stack[stack_pointer]=ev;
- //render line
-
- events_html+=scheduler.render_timeline_event.call(this, ev, stack_pointer);
- }
- }
-
- 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;";
- }
-
- // 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++) {
- 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++)
- 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 = document.getElementsByTagName("DIV");
- for (var i=0; i < divs.length; i++)
- if (divs[i].getAttribute("event_id"))
- scheduler._rendered.push(divs[i]);
-
- for (var i=0; i < d.firstChild.rows.length; i++)
- heights.push(d.firstChild.rows[i].offsetHeight);
-
-}
-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-18; //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 start = scheduler._min_date;
- for (var k=0; k<this.x_size; k++){
- // dates calculation
- this._trace_x[k]=new Date(start);
- start = scheduler.date.add(start, this.x_step, this.x_unit);
-
- // position calculation
- scheduler._cols[k]=Math.floor(summ/(this.x_size-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++){
- 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 "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);
- scheduler._table_view=true;
- }
-}
-
-
-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_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'> </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){
- 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){
- scheduler._els['dhx_cal_data'][0].scrollTop=0;
- var start_date = scheduler.date[this.name+"_start"](scheduler._date);
- scheduler._min_date = scheduler.date.add(start_date, this.x_start*this.x_step, this.x_unit);
- 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;
- while (trg && trg.tagName != "TD")
- trg=trg.parentNode;
- if (trg && trg.tagName == "TD"){
- var cs = trg.className.split(" ")[0];
- if (cs == "dhx_matrix_cell") {
-
- if(scheduler._isRender("cell")) {
- return { x:trg.cellIndex-1, y:trg.parentNode.rowIndex, src:trg };
- } else { // probably desired path for all modes except cell
- var trscell = trg.parentNode; // moving out from current td
- while(trscell && trscell.tagName != "TD") {
- trscell=trscell.parentNode;
- }
- return { x:trg.cellIndex, y:trscell.parentNode.rowIndex, src:trg };
- }
- }
- else if (cs == "dhx_matrix_scell")
- return { x:-1, y:trg.parentNode.rowIndex, src:trg, scale:true };
- }
- return false;
-};
-
-var old_click = scheduler._click.dhx_cal_data;
-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_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);
- event_options[scheduler.matrix[scheduler._mode].y_property] = obj.y_unit[y].key;
- scheduler.addEventNow(event_options, null, event);
-});
-
-scheduler.attachEvent("onBeforeDrag", function (event_id, mode, native_event_object){
- if(scheduler._isRender("cell")) {
- return false;
- }
- return true;
-});
-
-})();
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_minical.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_minical.js deleted file mode 100644 index 0fa43fc3e0c..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_minical.js +++ /dev/null @@ -1,402 +0,0 @@ -/* -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.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.renderCalendar=function(obj, _prev){
- var cal = null;
- var date = obj.date||(new Date());
- 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);
- }
-
-
- var start = scheduler.date.month_start(date);
- var end = scheduler.date.add(start,1,"month");
- var evs = this.getEvents(start,end);
- for (var i=0; i < evs.length; i++){
- var ev = evs[i];
- 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;
- return cal;
-};
-scheduler._get_def_cont = function(pos){
- if (!this._def_count){
- this._def_count = document.createElement("DIV");
- this._def_count.style.cssText = "position:absolute;z-index:10100;width:251px; height:175px;";
- 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){
- var table=cal.childNodes[2].childNodes[0];
- if (typeof date == "string")
- date = scheduler.templates.api_date(date);
-
- var d = cal.week_start+date.getDate()-1;
- return table.rows[Math.floor(d/7)].cells[d%7].firstChild;
-};
-scheduler.markCalendar=function(cal,date,css){
- this._locateCalendar(cal,date).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);
- 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(new Date());
- 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);
-};
-scheduler._mini_cal_arrows = [" ", " "];
-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);
-
- 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 arrow = document.createElement("DIV");
- arrow.className = "dhx_cal_prev_button";
- arrow.style.cssText="left:1px;top:2px;position:absolute;";
- arrow.innerHTML = this._mini_cal_arrows[0];
- d.firstChild.appendChild(arrow);
- arrow.onclick=function(){
- scheduler.updateCalendar(d, scheduler.date.add(d._date, -1, "month"));
- if(scheduler._date.getMonth() == d._date.getMonth() && scheduler._date.getFullYear() == d._date.getFullYear()) {
- scheduler._markCalendarCurrentDate(d);
- }
- };
-
- arrow = document.createElement("DIV");
- arrow.className = "dhx_cal_next_button";
- arrow.style.cssText="left:auto; right:1px;top:2px;position:absolute;";
- arrow.innerHTML = this._mini_cal_arrows[1];
- d.firstChild.appendChild(arrow);
- arrow.onclick=function(){
- scheduler.updateCalendar(d, scheduler.date.add(d._date, 1, "month"));
- if(scheduler._date.getMonth() == d._date.getMonth() && scheduler._date.getFullYear() == d._date.getFullYear()) {
- scheduler._markCalendarCurrentDate(d);
- }
- };
-
- }
- d._date = new Date(sd);
-
- d.week_start = (sd.getDay()-(this.config.start_on_monday?1:0)+7)%7;
-
- var dd = this.date.week_start(sd);
- 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 <= 0 ? "0px" : (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(new Date());
- if (cfg.first_hour)
- dt.setHours(cfg.first_hour);
-
- html+=" <select>";
- for (var i=60*cfg.first_hour; i<60*cfg.last_hour; i+=this.config.time_step*1){
- 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;'> – </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+" </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 && ev.end_date.valueOf()-ev.start_date.valueOf() < 2*24*60*60*1000);
- input.checked = isFulldayEvent;
- for(var i in selects)
- selects[i].disabled=input.checked;
- for(var i=0; i<inputs.length; i++)
- inputs[i].disabled=input.checked;
-
- input.onclick = function(){
- if(input.checked == true) {
- var start_date = new Date(ev.start_date);
- var end_date = new Date(ev.end_date);
-
- scheduler.date.date_part(start_date);
- end_date = scheduler.date.add(start_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();
-
- for(var i in selects)
- selects[i].disabled=input.checked;
- for(var i=0; i<inputs.length; i++)
- inputs[i].disabled=input.checked;
-
- };
- }
-
- if(scheduler.config.event_duration && scheduler.config.auto_end_date) {
-
- function _update_minical_select() {
- ev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, "minute");
- ev.end_date.setTime(ev.start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));
-
- inputs[1].value = scheduler.templates.calendar_time(ev.end_date);
- inputs[1]._date = scheduler.date.date_part(new Date(ev.end_date));
-
- selects[1].value=ev.end_date.getHours()*60+ev.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;
-
- if(calendar._date.getMonth() == date.getMonth() && calendar._date.getFullYear() == date.getFullYear()) {
- if (mode == 'day' || (this._props && !!this._props[mode])) {
- 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++) {
- var diff = dateNew.getMonth() + dateNew.getYear()*12 - date.getMonth() - date.getYear()*12;
- if (!diff)
- scheduler.markCalendar(calendar, dateNew, "dhx_calendar_click");
- dateNew = scheduler.date.add(dateNew,1,"day");
- }
- }
- }
-};
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_monthheight.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_monthheight.js deleted file mode 100644 index 6b86b7524d2..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_monthheight.js +++ /dev/null @@ -1,31 +0,0 @@ -/* -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.attachEvent("onTemplatesReady",function(){
- scheduler.xy.scroll_width = 0;
-
- var old = scheduler.render_view_data;
- scheduler.render_view_data=function(){
- var data = this._els["dhx_cal_data"][0];
- data.firstChild._h_fix = true;
-
- old.apply(scheduler,arguments);
-
-
-
- var height = parseInt(data.style.height);
- data.style.height="1px";
- data.style.height=data.scrollHeight+"px";
-
- this._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + "px";
- }
-
- var old_s=scheduler._reset_month_scale;
- scheduler._reset_month_scale=function(a,b,c){
- var dummy = {clientHeight:100};
- old_s.apply(scheduler,[dummy,b,c]);
- a.innerHTML = dummy.innerHTML;
- }
-
-});
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_offline.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_offline.js deleted file mode 100644 index f9e5f946476..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_offline.js +++ /dev/null @@ -1,102 +0,0 @@ -/* -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._extra_xle = false; // flag if we are calling xle once again (we don't want to get into loop with scheduler.parse)
-scheduler.attachEvent("onXLE", function(){
- if(!scheduler._extra_xle){
- var isEventsLoaded = false;
- for(var key in scheduler._events){
- if(scheduler._events[key].text) {
- isEventsLoaded = true;
- break;
- }
- }
- if((localStorage._updated_events || !isEventsLoaded) && localStorage._events) {
- scheduler._extra_xle = true;
- scheduler.parse(localStorage._events, "json");
- scheduler._extra_xle = false;
- var dp = scheduler._dataprocessor;
- var updatedEvents = JSON.parse(localStorage._updated_events);
- dp.setUpdateMode("off");
- for(var id in updatedEvents)
- dp.setUpdated(id,true,updatedEvents[id]);
- dp.sendData();
- dp.setUpdateMode("cell");
- }
- }
-});
-scheduler.attachEvent("onBeforeEventDelete", function(id, object){
- var status = scheduler._dataprocessor.getState(id);
- if(status == 'inserted' && localStorage._updated_events) {
- var updated_events = JSON.parse(localStorage._updated_events);
- delete updated_events[id];
- for(var id in updated_events){
- localStorage._updated_events = JSON.stringify(updated_events);
- break;
- }
- }
- return true;
-});
-
-var old_delete_event = scheduler.deleteEvent;
-scheduler.deleteEvent = function(id, silent){
- old_delete_event.apply(this, arguments);
- localStorage._events = scheduler.toJSON();
-};
-
-scheduler._offline = {};
-scheduler._offline._after_update_events = [];
-
-var old_dp_init = scheduler._dp_init;
-scheduler._dp_init = function(dp){
- old_dp_init.apply(this, arguments);
-
- dp.attachEvent("onAfterUpdate",function(sid,action,tid,xml_node){
- scheduler._offline._after_update_events.push(sid);
- return true;
- });
- dp.attachEvent("onAfterUpdateFinish",function(sid,action,tid,xml_node){
- localStorage._events = scheduler.toJSON();
- var updated_events = JSON.parse(localStorage._updated_events);
- for(var i=0; i<scheduler._offline._after_update_events.length; i++){
- delete updated_events[scheduler._offline._after_update_events[i]];
- }
- var eventsLeft = false;
- for(var id in updated_events){
- eventsLeft = true;
- break;
- }
- if(eventsLeft) {
- localStorage._updated_events = JSON.stringify(updated_events);
- scheduler._offline._after_update_event = [];
- }
- else {
- delete localStorage._updated_events;
- }
- return true;
- });
- dp.attachEvent("onBeforeDataSending",function(id, b, rows){
- var updated_events = {};
- if(localStorage._updated_events)
- updated_events = JSON.parse(localStorage._updated_events);
-
- for(var ev_id in rows){
- var param = scheduler._dataprocessor.action_param;
- if((updated_events[ev_id] && (updated_events[ev_id][param] == 'inserted' || rows[ev_id][param] == 'deleted')) || !updated_events[ev_id])
- updated_events[ev_id] = rows[ev_id][param];
- }
-
- localStorage._events = scheduler.toJSON();
- localStorage._updated_events = JSON.stringify(updated_events);
-
- return true;
- });
- dhtmlxError.catchError("LoadXML",function(a,b,xml){
- for(var key in scheduler._dataprocessor._in_progress) {
- delete scheduler._dataprocessor._in_progress[key];
- }
- });
-
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_pdf.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_pdf.js deleted file mode 100644 index 86439ab7e3a..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_pdf.js +++ /dev/null @@ -1,222 +0,0 @@ -/* -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.toPDF=function(url,mode,header,footer){
- var dx = 0;
- var dy = 0;
- var colors = false;
- if (mode == "fullcolor"){
- colors = true;
- mode = "color";
- }
-
- mode = mode||"color";
- html_regexp = new RegExp("<[^>]*>","g");
- function clean_html(val){
- return val.replace(html_regexp,"");
- }
- function x_norm(x) {
- x = parseFloat(x);
- if (isNaN(x)) return "auto";
- return 100 * x / (dx + 1);
- }
- function y_norm(y) {
- y = parseFloat(y);
- if (isNaN(y)) return "auto";
- return 100 * y / dy;
- }
- function xml_month_scale(xh){
- var xml="";
- if (scheduler.matrix && scheduler.matrix[scheduler._mode])
- 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;
- return xml;
- }
- function de_day(node,n){
- var x = parseInt(node.style.left);
-
- 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);
- for (var dy=0; dy < scheduler._colsS.heights.length; dy++)
- if (scheduler._colsS.heights[dy]>y) return dy;
- return n;
- }
- 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++){
- /* var dd = r[i].cells[j];
- var css = dd.className;
-
- if (css!=" " && css!="dhx_now ")
- days.push("");
- else*/
- 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_top(profile) {
- var xml = "<data profile='"+profile+"'";
- if (header)
- xml+=" header='"+header+"'";
- if (footer)
- xml+=" footer='"+footer+"'";
- xml+=">";
- xml += "<scale mode='" + scheduler._mode + "' today='" + scheduler._els.dhx_cal_date[0].innerHTML + "'>";
-
- if (scheduler._mode == "agenda"){
- 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++) {
- xml+="<row><![CDATA["+yh.firstChild.rows[i].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 get_style(node, style){
- return (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||"";
- }
- function xml_body() {
- var xml = "";
- var evs = scheduler._rendered;
-
- if (scheduler._mode == "agenda"){
- for (var i=0; i < evs.length; i++)
- xml+="<event><head>"+clean_html(evs[i].childNodes[0].innerHTML)+"</head><body>"+clean_html(evs[i].childNodes[2].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;
-
- xml+="<event day='"+(day%7)+"' week='"+Math.floor(day/7)+"' month='"+m+"'></event>";
- d = scheduler.date.add(d,1,"day");
- if (d.valueOf()>=scheduler._max_date.valueOf())
- break;
- }
- }
- } else {
- for (var i = 0; i < evs.length; i++) {
- var zx = x_norm(evs[i].style.left);
- var zdx = x_norm(evs[i].style.width);
- 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_", "");
- var dets = scheduler.getEvent(evs[i].getAttribute("event_id"))
- var day = dets._sday;
- var week = dets._sweek;
- if (scheduler._mode != "month") {
- if (scheduler.matrix && scheduler.matrix[scheduler._mode]){
- day = 0;
- week = evs[i].parentNode.parentNode.parentNode.rowIndex;
- zdx += x_norm(10);
- } else {
- zdx+=x_norm(zdx*20/100);
- zx-=x_norm(20-zx*20/100);
-
- if (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;
- zx += x_norm(evs[i].parentNode.style.left);
- zx -= x_norm(51);
- }
- if (scheduler._mode == "timeline") {
- var dy_copy = dy;
- dy = 180;
- zy = y_norm(evs[i].style.top);
- dy = dy_copy;
- }
- } else {
- zdy = parseInt(evs[i].offsetHeight);
- zy = parseInt(evs[i].style.top) - 22;
-
- day = de_day(evs[i],day);
- week = de_week(evs[i],week);
- }
-
- xml += "\n<event week='"+week+"' day='"+day+"' type='" + e_type + "' x='" + zx + "' y='" + zy + "' width='" + zdx + "' height='" + zdy + "'>";
-
-
- 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 xml_end(){
- var xml = "</data>";
- return xml;
- }
-
- var uid = (new Date()).valueOf();
- 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>';
- document.getElementById(uid).firstChild.value = xml_top(mode).replace("\u2013", "-") + xml_body() + xml_end();
- document.getElementById(uid).submit();
- d.parentNode.removeChild(d);grid = null;
-}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_tooltip.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_tooltip.js deleted file mode 100644 index 512cafebd5f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_tooltip.js +++ /dev/null @@ -1,160 +0,0 @@ -/* -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 -*/ -window.dhtmlXTooltip={};
-
-dhtmlXTooltip.config = {
- className: 'dhtmlXTooltip tooltip',
- timeout_to_display: 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
- 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 (this.isTooltip(target)) {return;} // if we are over tooltip -- do nothing, just return (so tooltip won't move)
-
- var offsetleft = 0;
- var offsettop = 0;
- var pobj = scheduler._obj;
- if(pobj.offsetParent) {
- do {
- offsetleft += pobj.offsetLeft;
- offsettop += pobj.offsetTop;
- } while (pobj = pobj.offsetParent);
- }
-
- var actual_x = pos.x + (dhxTooltip.config.delta_x||0) - offsetleft;
- var actual_y = pos.y - (dhxTooltip.config.delta_y||0) - offsettop;
-
- 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;
- scheduler._obj.appendChild(this.tooltip);
-
- var tooltip_width = this.tooltip.offsetWidth;
- var tooltip_height = this.tooltip.offsetHeight;
-
- if ((scheduler._obj.offsetWidth - actual_x - (scheduler.xy.margin_left||0) - 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 = (scheduler._obj.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 ((scheduler._obj.offsetHeight - actual_y - (scheduler.xy.margin_top||0) - 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 = (scheduler._obj.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";
-};
-
-dhtmlXTooltip.hide = function() {
- if(this.tooltip.parentNode) {
- this.tooltip.parentNode.removeChild(this.tooltip);
- }
-};
-dhtmlXTooltip.delay = function(method, object, params, delay) {
- if(this.tooltip._timeout_id) {
- window.clearTimeout(this.tooltip._timeout_id);
- }
- 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;
- 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 = ((dhtmlx._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;
-
- if (event_id || dhxTooltip.isTooltip(target)) { // if we are over event or tooltip
- var event = scheduler.getEvent(event_id) || scheduler.getEvent(dhxTooltip.tooltip.event_id);
- if(!event)
- return;
- dhxTooltip.tooltip.event_id = event.id;
- var text = scheduler.templates.tooltip_text(event.start_date, event.end_date, event);
-
- var evt = undefined;
- if (_isIE) { //make a copy of event, will be used in timed call
- evt = document.createEventObject(ev);
- }
-
- dhxTooltip.delay(dhxTooltip.show, dhxTooltip, [(evt||ev), text]); // showing tooltip
- } else {
- dhxTooltip.delay(dhxTooltip.hide, dhxTooltip, []);
- }
-});
-scheduler.attachEvent("onBeforeDrag", 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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_wp.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_wp.js deleted file mode 100644 index 7f85903674d..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/ext_wp.js +++ /dev/null @@ -1,17 +0,0 @@ -/* -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.attachEvent("onLightBox",function(){
- if (this._cover){
- try{
- this._cover.style.height = this.expanded ? "100%" : ((document.body.parentNode||document.body).scrollHeight+"px");
- } catch(e) {};
- }
-});
-
-scheduler.form_blocks.select.set_value=function(node,value,ev){
- if (typeof value == "undefined" || value === "")
- value = (node.firstChild.options[0]||{}).value;
- node.firstChild.value=value||"";
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/glossy.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/glossy.css deleted file mode 100644 index 51c4e99d668..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/glossy.css +++ /dev/null @@ -1,294 +0,0 @@ -/* -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 -*/ -.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/multi-days-bg.png);
- border-bottom:1px solid #A4BED4;
- border-left:1px solid #ffffff;
- background-position:0 0;
- background-repeat:repeat;
-}
-.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{
- 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_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_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_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;
-}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ical.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ical.js deleted file mode 100644 index 60dbfef8626..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/ical.js +++ /dev/null @@ -1,69 +0,0 @@ -/* -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";
- if (obj.start_date && obj.start_date.getHours()==0)
- value = this.parse_date(value,24,00);
- else
- value = this.parse_date(value,23,59);
- }
- 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"
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/layout.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/layout.css deleted file mode 100644 index a888f4d0c79..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/layout.css +++ /dev/null @@ -1,194 +0,0 @@ -/* -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 -*/ -.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;
-}
-.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{
- border-top:1px dotted #8894A3;
- position:absolute;
- top:44px;
- width:600px;
- overflow-y:auto;
- overflow-x:hidden;
-}
-.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;
- border-right:1px dotted #586A7E;
- height:18px;
- padding-right:5px;
- padding-top:3px;
- text-align:right;
-}
-.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{
- background-image:url(imgs/clock_big.gif);
-}
-.dhx_multi_day_icon_small{
- background-image:url(imgs/clock_small.gif);
-}
-.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;
-}
-.dhtmlxLayoutPolyContainer_dhx_skyblue .dhx_cal_container {
- background-color: #d0e5ff;
-}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/lightbox.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/lightbox.css deleted file mode 100644 index afb83295be3..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/lightbox.css +++ /dev/null @@ -1,239 +0,0 @@ -/* -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 -*/ -.dhx_unselectable, .dhx_unselectable div{
- -webkit-user-select:none;
- -moz-user-select:none;
- -moz-user-select:-moz-none;
-}
-.dhx_cal_light{
- 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;
-}
-.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;
-}
-.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;
-}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/lightbox.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/lightbox.js deleted file mode 100644 index 7749ff6708c..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/lightbox.js +++ /dev/null @@ -1,466 +0,0 @@ -/* -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.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];
- var node = document.getElementById(section.id).nextSibling;
-
- return {
- 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);
- }
- };
-};
-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; a.select(); a.focus();
- }
- },
- 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){
- if (typeof value == "undefined")
- value = (node.firstChild.options[0]||{}).value;
- node.firstChild.value=value||"";
- },
- get_value:function(node,ev){
- return node.firstChild.value;
- },
- focus:function(node){
- var a=node.firstChild; if (a.select) a.select(); a.focus();
- }
- },
- time:{
- render:function(){
- //hours
- var cfg = scheduler.config;
- var dt = this.date.date_part(new Date());
- 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="<select>";
- var i = first;
- var tdate = dt.getDate();
-
- while(i<last){
- var time=this.templates.time_picker(dt);
- html+="<option value='"+i+"'>"+time+"</option>";
-
- 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();
- }
-
- //days
- html+="</select> <select>";
- for (var i=1; i < 32; i++)
- html+="<option value='"+i+"'>"+i+"</option>";
-
- //month
- html+="</select> <select>";
- for (var i=0; i < 12; i++)
- html+="<option value='"+i+"'>"+this.locale.date.month_full[i]+"</option>";
-
- //year
- html+="</select> <select>";
- dt = dt.getFullYear()-5; //maybe take from config?
- for (var i=0; i < 10; i++)
- html+="<option value='"+(dt+i)+"'>"+(dt+i)+"</option>";
- html+="</select> ";
-
- return "<div style='height:30px;padding-top:0px;font-size:inherit;' class='dhx_section_time'>"+html+"<span style='font-weight:normal; font-size:10pt;'> – </span>"+html+"</div>";
-
- },
- set_value:function(node,value,ev){
-
-
- var s=node.getElementsByTagName("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+" </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 && ev.end_date.valueOf()-ev.start_date.valueOf() < 2*24*60*60*1000);
- input.checked = isFulldayEvent;
-
- for(var k in s)
- s[k].disabled=input.checked;
-
- input.onclick = function(){
- if(input.checked) {
- var start_date = new Date(ev.start_date);
- var end_date = new Date(ev.end_date);
-
- scheduler.date.date_part(start_date);
- end_date = scheduler.date.add(start_date, 1, "day");
- }
- for(var i in s)
- s[i].disabled=input.checked;
-
- _fill_lightbox_select(s,0,start_date||ev.start_date);
- _fill_lightbox_select(s,4,end_date||ev.end_date);
- };
- }
-
- if(scheduler.config.auto_end_date && scheduler.config.event_duration) {
- function _update_lightbox_select() {
- ev.start_date=new Date(s[3].value,s[2].value,s[1].value,0,s[0].value);
- ev.end_date.setTime(ev.start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));
- _fill_lightbox_select(s,4,ev.end_date);
- }
- for(var i=0; i<4; i++) {
- s[i].onchange = _update_lightbox_select;
- }
- }
-
- function _fill_lightbox_select(s,i,d){
- s[i+0].value=Math.round((d.getHours()*60+d.getMinutes())/scheduler.config.time_step)*scheduler.config.time_step;
- s[i+1].value=d.getDate();
- s[i+2].value=d.getMonth();
- s[i+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){
- s=node.getElementsByTagName("select");
- ev.start_date=new Date(s[3].value,s[2].value,s[1].value,0,s[0].value);
- ev.end_date=new Date(s[7].value,s[6].value,s[5].value,0,s[4].value);
- if (ev.end_date<=ev.start_date)
- ev.end_date=scheduler.date.add(ev.start_date,scheduler.config.time_step,"minute");
- },
- focus:function(node){
- node.getElementsByTagName("select")[0].focus();
- }
- }
-};
-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])) return;
- var box = this._get_lightbox();
- 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 node=document.getElementById(sns[i].id).nextSibling;
- var block=this.form_blocks[sns[i].type];
- block.set_value.call(this,node,ev[sns[i].map_to],ev, sns[i]);
- 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(){
- var id=scheduler._lightbox_id;
- var ev=this.getEvent(id);
- var box=this._get_lightbox();
-
- this._lightbox_out(ev);
-
- ev._timed=this.is_one_day_event(ev);
- this.setEvent(ev.id,ev);
- this._edit_stop_event(ev,true);
- this.render_view_data();
-};
-scheduler.hide_lightbox=function(id){
- this.hideCover(this._get_lightbox());
- 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(){
- if (this.checkEvent("onEventSave") && !this.callEvent("onEventSave",[this._lightbox_id,this._lightbox_out({ id: this._lightbox_id}), this._new_event]))
- return;
- this._empty_lightbox();
- this.hide_lightbox();
-};
-scheduler.startLightbox = function(id, box){
- this._lightbox_id=id;
- 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);
-};
-scheduler.resetLightbox = function(){
- if (scheduler._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._get_lightbox().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;
- if (!c||confirm(c)) {
- 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 if (src.className.indexOf("dhx_custom_button_")!=-1){
- var index = src.parentNode.getAttribute("index");
- var block=scheduler.form_blocks[scheduler.config.lightbox.sections[index].type];
- var sec = src.parentNode.parentNode;
- block.button_click(index,src,sec,sec.nextSibling);
- }
- break;
- }
- };
- this._get_lightbox().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+50+"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._get_lightbox();
- 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._get_lightbox();
- 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._get_lightbox=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;
- scheduler.locale.labels["dhx_save_btn"] = scheduler.locale.labels.icon_save;
- scheduler.locale.labels["dhx_cancel_btn"] = scheduler.locale.labels.icon_cancel;
- scheduler.locale.labels["dhx_delete_btn"] = scheduler.locale.labels.icon_delete;
- for (var i = 0; i < buttons.length; i++)
- html+="<div class='dhx_btn_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' 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>"
- }
-
- //localization
- var ds=d.getElementsByTagName("div");
- //sections
- ds[1].innerHTML=html;
- //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'> </span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div>";
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/load.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/load.js deleted file mode 100644 index 6d1579862ff..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/load.js +++ /dev/null @@ -1,202 +0,0 @@ -/* -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._loaded={};
-scheduler._load=function(url,from){
- url=url||this._load_url;
- 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){
- this._loading=true;
- var evs;
- if (this._process)
- evs=this[this._process].parse(loader.xmlDoc.responseText);
- else
- evs=this._magic_parser(loader);
-
- 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;
-
- this.callEvent("onXLE",[]);
-};
-scheduler.json={};
-scheduler.json.parse = function(data){
- if (typeof data == "string"){
- eval("scheduler._temp = "+data+";");
- data = scheduler._temp;
- }
- var evs = [];
- for (var i=0; i < data.length; i++){
- data[i].start_date = scheduler.templates.xml_date(data[i].start_date);
- data[i].end_date = scheduler.templates.xml_date(data[i].end_date);
- evs.push(data[i]);
- }
- 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;
-};
-
-//current view by default, or all data if "true" as parameter provided
-scheduler.refresh=function(refresh_all){
- alert("not implemented");
- /*
- this._loaded={};
- this._load();
- */
-};
-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 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++) {
- evs[i]=this.xmlNodeToJSON(xml[i]);
-
- evs[i].text=evs[i].text||evs[i]._tagvalue;
- evs[i].start_date=this.templates.xml_date(evs[i].start_date);
- evs[i].end_date=this.templates.xml_date(evs[i].end_date);
- }
- 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;
- if (t=this.config.show_loading)
- if (typeof t == "object"){
- this._obj.removeChild(t);
- this.config.show_loading=true;
- }
-});
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale.js deleted file mode 100644 index dc9298713c3..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Date",
- description:"Description",
-
- /*year view extension*/
- year_tab:"Year",
-
- /* week agenda extension */
- week_agenda_tab: "Agenda"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ar.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ar.js deleted file mode 100644 index 396479bbf40..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ar.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -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 -*/ -//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:"تمكين"
- }
-}
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ca.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ca.js deleted file mode 100644 index 7d997fe3081..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ca.js +++ /dev/null @@ -1,48 +0,0 @@ -/* -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 -*/ -/*
- @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",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Data",
- description:"Descripció",
-
- /*year view extension*/
- year_tab:"Any",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_cn.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_cn.js deleted file mode 100644 index 3d3fd8fbede..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_cn.js +++ /dev/null @@ -1,53 +0,0 @@ -/* -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 -*/ -/*
-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:"启用",
-
- /*agenda view extension*/
- agenda_tab:"议程",
- date:"日期",
- description:"说明",
-
- /*year view extension*/
- year_tab:"今年",
-
- /*week agenda view extension*/
- week_agenda_tab: "议程"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_cs.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_cs.js deleted file mode 100644 index 388c1af7fa2..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_cs.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*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"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_da.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_da.js deleted file mode 100644 index 868ee19f6b4..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_da.js +++ /dev/null @@ -1,46 +0,0 @@ -/* -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.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",
-
- /*agenda view extension*/
- agenda_tab:"Dagsorden",
- date:"Dato",
- description:"Beskrivelse",
-
- /*year view extension*/
- year_tab:"År",
-
- /*week agenda view extension*/
- week_agenda_tab: "Dagsorden"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_de.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_de.js deleted file mode 100644 index 99ee29552a6..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_de.js +++ /dev/null @@ -1,46 +0,0 @@ -/* -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.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:"Annulieren",
- 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 (OK) oder nur diesen einzelnen Eintrag (Abbrechen)?",
- section_recurring:"Wiederholung",
- button_recurring:"Aus",
- button_recurring_open:"An",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Datum",
- description:"Beschreibung",
-
- /*year view extension*/
- year_tab:"Jahre",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_el.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_el.js deleted file mode 100644 index 86829d63808..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_el.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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:"Ενεργό",
-
- /*agenda view extension*/
- agenda_tab:"Ημερήσια Διάταξη",
- date:"Ημερομηνία",
- description:"Περιγραφή",
-
- /*year view extension*/
- year_tab:"Έτος",
-
- /*week agenda view extension*/
- week_agenda_tab: "Ημερήσια Διάταξη"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_es.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_es.js deleted file mode 100644 index 4f9826d546b..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_es.js +++ /dev/null @@ -1,48 +0,0 @@ -/* -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 -*/ -/*
- @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", "Mie", "Jue", "Vie", "Sab"]
- },
- 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:"Periodo de tiempo",
- 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",
-
- /*agenda view extension*/
- agenda_tab:"Dia",
- date:"Fecha",
- description:"Descripción",
-
- /*year view extension*/
- year_tab:"Año",
-
- /*week agenda view extension*/
- week_agenda_tab: "Dia"
- }
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_fi.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_fi.js deleted file mode 100644 index 3ea32dbe9ea..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_fi.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.locale={
- date:{
- month_full:["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinä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äytössä",
- button_recurring_open:"Käytössä",
-
- /*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"
- }
-};
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_fr.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_fr.js deleted file mode 100644 index 34639313e5e..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_fr.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -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.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 de temps",
- full_day:"Journée complète",
-
- confirm_recurring:"Voulez-vous éditer toute une série d'évènements répétés?",
- section_recurring:"Répéter l'évènement",
- button_recurring:"Désactivé",
- button_recurring_open:"Activé",
-
- /*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"
- }
-};
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_he.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_he.js deleted file mode 100644 index bc3dd9cd794..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_he.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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:"יום שלם",
-
- /*agenda view extension*/
- agenda_tab:"סדר יום",
- date:"תאריך",
- description:"תיאור",
-
- /*year view extension*/
- year_tab:"לשנה",
-
- /*week agenda view extension*/
- week_agenda_tab: "סדר יום"
- }
-};
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_hu.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_hu.js deleted file mode 100644 index 0c37a28fb9f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_hu.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*napirendi n�zet*/
- agenda_tab:"Napirend",
- date:"D�tum",
- description:"Le�r�s",
-
- /*�ves n�zet*/
- year_tab:"�v",
-
- /*week agenda view extension*/
- week_agenda_tab: "Napirend"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_id.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_id.js deleted file mode 100644 index 8f75fd0f617..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_id.js +++ /dev/null @@ -1,5 +0,0 @@ -/* -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.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",
/*agenda view extension*/
agenda_tab:"Agenda",
date:"Tanggal",
description:"Keterangan",
/*year view extension*/
year_tab:"Tahun",
/*week agenda view extension*/
week_agenda_tab: "Agenda"
}
};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_it.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_it.js deleted file mode 100644 index 2e1188ab4cc..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_it.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -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.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:"Cancella",
- icon_details:"Dettagli",
- icon_edit:"Modifica",
- icon_delete:"Elimina",
- confirm_closing:"",//Le modifiche apportate saranno perse, siete sicuri?
- confirm_deleting:"L'evento verrà 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",
-
- /*agenda view extension*/
- agenda_tab:"Giorno",
- date:"Data",
- description:"Descrizione",
-
- /*year view extension*/
- year_tab:"Anni",
-
- /*week agenda view extension*/
- week_agenda_tab: "Giorno"
- }
-};
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_jp.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_jp.js deleted file mode 100644 index 34274f7080f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_jp.js +++ /dev/null @@ -1,49 +0,0 @@ -/* -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 -*/ -/*
-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:"終日",
-
- /*agenda view extension*/
- agenda_tab:"議題は",
- date:"日付",
- description:"説明",
-
- /*year view extension*/
- year_tab:"今年",
-
- /*week agenda view extension*/
- week_agenda_tab: "議題は"
- }
-};
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_nb.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_nb.js deleted file mode 100644 index c431cf83f61..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_nb.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -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.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å",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Dato",
- description:"Beskrivelse",
-
- /*year view extension*/
- year_tab:"År",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-};
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_nl.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_nl.js deleted file mode 100644 index 045144c7509..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_nl.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Datum",
- description:"Omschrijving",
-
- /*year view extension*/
- year_tab:"Jaar",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-};
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_no.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_no.js deleted file mode 100644 index 03981ba5b01..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_no.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Dato",
- description:"Beskrivelse",
-
- /*year view extension*/
- year_tab:"År",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_pl.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_pl.js deleted file mode 100644 index 649bdcf2160..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_pl.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Data",
- description:"Opis",
-
- /*year view extension*/
- year_tab:"Rok",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-};
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_pt.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_pt.js deleted file mode 100644 index 1bf5da01b1c..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_pt.js +++ /dev/null @@ -1,58 +0,0 @@ -/* -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 -*/ -/*
-
- 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",
-
- /*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"
- }
-};
-
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_cn.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_cn.js deleted file mode 100644 index 21c08b0319b..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_cn.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_cs.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_cs.js deleted file mode 100644 index 310f5c508fb..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_cs.js +++ /dev/null @@ -1,157 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_da.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_da.js deleted file mode 100644 index 1d3e272a936..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_da.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_de.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_de.js deleted file mode 100644 index 71929e988ea..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_de.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_el.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_el.js deleted file mode 100644 index d3d18ab4358..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_el.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_es.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_es.js deleted file mode 100644 index 99bb3fdbfa5..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_es.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_fi.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_fi.js deleted file mode 100644 index 02184e9b601..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_fi.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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äivittä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äivä<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Joka arkipäivä</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äinä päivinä:<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äivänä 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äivä<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äkuu<option value="6">Heinä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äkuu<option value="6">Heinä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ä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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_fr.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_fr.js deleted file mode 100644 index d11418acba3..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_fr.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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"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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_it.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_it.js deleted file mode 100644 index a40b63939d3..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_it.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_nb.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_nb.js deleted file mode 100644 index 65078dbc0b7..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_nb.js +++ /dev/null @@ -1,5 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_nl.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_nl.js deleted file mode 100644 index 314e1b083ad..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_nl.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_pl.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_pl.js deleted file mode 100644 index f3f27bf4eb1..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_pl.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_pt.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_pt.js deleted file mode 100644 index c15c10cbea4..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_pt.js +++ /dev/null @@ -1,5 +0,0 @@ -/* -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.__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" />day<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">Sabado<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">Sabado<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_ru.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_ru.js deleted file mode 100644 index 0bff7bde13a..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_ru.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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="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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_sv.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_sv.js deleted file mode 100644 index bb16adafb12..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_sv.js +++ /dev/null @@ -1,5 +0,0 @@ -/* -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.__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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_ua.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_ua.js deleted file mode 100644 index fbe032f3e32..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_recurring_ua.js +++ /dev/null @@ -1,6 +0,0 @@ -/* -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.__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="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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ru.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ru.js deleted file mode 100644 index f199ae683e4..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ru.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -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.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:"Включено",
-
- /*agenda view extension*/
- agenda_tab:"Список",
- date:"Дата",
- description:"Описание",
-
- /*year view extension*/
- year_tab:"Год",
-
- /*week agenda view extension*/
- week_agenda_tab: "Список"
- }
-}
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_si.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_si.js deleted file mode 100644 index 1225b6ece32..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_si.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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", "Avg", "Sep", "Okt", "Nov", "Dec"],
- day_full:["Nedelja", "Ponedeljek", "Torek", "Sreda", "Èetrtek", "Petek", "Sobota"],
- day_short:["Ne", "Po", "To", "Sre", "Èe", "Pe", "So"]
- },
- 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:"Zbriši",
- confirm_closing:"",//Vaše spremembe bodo izgubljene, želite nadaljevati ?
- confirm_deleting:"Dogodek bo izbrisan trajno, želite nadaljevati?",
- section_description:"Opis",
- section_time:"Èasovno obdobje",
- full_day:"Ves dan",
-
- /*recurring events*/
- confirm_recurring:"Ali želite urediti celoten nabor ponavljajoèih dogodkov?",
- section_recurring:"Ponovi dogodek",
- button_recurring:"Onemogoèi",
- button_recurring_open:"Omogoèi",
-
- /*agenda view extension*/
- agenda_tab:"Agenda",
- date:"Datum",
- description:"Opis",
-
- /*year view extension*/
- year_tab:"Leto",
-
- /*week agenda view extension*/
- week_agenda_tab: "Agenda"
- }
-}
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_sv.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_sv.js deleted file mode 100644 index bcb120831e9..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_sv.js +++ /dev/null @@ -1,52 +0,0 @@ -/* -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 -*/ -/*
-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",
-
- /*agenda view extension*/
- agenda_tab:"Dagordning",
- date:"Datum",
- description:"Beskrivning",
-
- /*year view extension*/
- year_tab:"År",
-
- /*week agenda view extension*/
- week_agenda_tab: "Dagordning"
- }
-}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_tr.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_tr.js deleted file mode 100644 index 5548a6f0dfc..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_tr.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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",
-
- /*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"
- }
-}
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ua.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ua.js deleted file mode 100644 index 4009969d298..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/locale_ua.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -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.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:"Включено",
-
- /*agenda view extension*/
- agenda_tab:"Перелік",
- date:"Дата",
- description:"Опис",
-
- /*year view extension*/
- year_tab:"Рік",
-
- /*week agenda view extension*/
- week_agenda_tab: "Перелік"
- }
-}
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/mobile.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/mobile.css deleted file mode 100644 index 8f543f20fee..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/mobile.css +++ /dev/null @@ -1,380 +0,0 @@ -/* -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 -*/ -/**Toolbar**/
-
-.dhx_schedulerbar{
- background: -webkit-gradient(linear, left top, left bottom,from(#d7d7d7), to(#b7b7b7));
- background: -moz-linear-gradient(top, #d7d7d7, #b7b7b7);
-}
-.dhx_el_button input {
- border-radius:4px;
- -moz-border-radius:4px;
- -webkit-border-radius:4px;
- background: -webkit-gradient(linear, left top, left bottom, from(#9dbcc7),color-stop(0.4,#80a9b8),color-stop(0.6,#6799aa),to(#4f899d));
- background: -moz-linear-gradient(top, #9dbcc7, #518a9e);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
- font-size: 14px;
- color: #ffffff;
- padding: 0px 10px;
- border:1px solid #636363;
- -moz-box-shadow: 0px 1px #ffffff;
- -webkit-box-shadow:0px 1px #ffffff;
- box-shadow: 0px 1px #ffffff;
-}
-.add .dhx_el_button input{
- background-image: url(./imgs_mobile/add.png),-webkit-gradient(linear, left top, left bottom, from(#9dbcc7),color-stop(0.4,#80a9b8),color-stop(0.6,#6799aa),to(#4f899d));
- background-image: url(./imgs_mobile/add.png),-moz-linear-gradient(top, #9dbcc7, #518a9e);
- background-position: center center;
- background-repeat:no-repeat;
- width:34px;
-}
-.dhx_schedulerbar .dhx_el_segmented{
- border-radius:4px;
- -moz-border-radius:4px;
- -webkit-border-radius:4px;
- float:none !important;
- border:1px solid #636363;
- -moz-box-shadow: 0px 1px #ffffff;
- -webkit-box-shadow:0px 1px #ffffff;
- height:32px;
-}
-
-
-.dhx_schedulerbar .dhx_el_segmented .segment_0,.dhx_schedulerbar .dhx_el_segmented .segment_1, .dhx_schedulerbar .dhx_el_segmented .segment_N {
- background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8),color-stop(0.3,#eeeeee),color-stop(0.6,#dcdcdc),to(#d5d5d5));
- background: -moz-linear-gradient(top, #f8f8f8, #d5d5d5);
-
-}
-.dhx_schedulerbar .dhx_el_segmented .selected.segment_0 ,.dhx_schedulerbar .dhx_el_segmented .selected.segment_1, .dhx_schedulerbar .dhx_el_segmented .selected.segment_N {
- background: -webkit-gradient(linear, left top, left bottom, from(#9dbcc7),color-stop(0.4,#80a9b8),color-stop(0.6,#6799aa),to(#4f899d));
- background: -moz-linear-gradient(top, #9dbcc7, #518a9e);
-}
-.dhx_el_segmented .segment_N, .dhx_el_segmented .selected.segment_N {
- border-left: 0;
-}
-.dhx_schedulerbar .dhx_el_segmented div {
- text-shadow: 0 1px 0 #ffffff;
- font-size: 14px;
- color: #757575;
- border:0px;
- height:30px;
-}
-.dhx_schedulerbar .dhx_el_segmented div.selected {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
- color: #ffffff;
- height:30px;
-}
-
-
-.dhx_schedulerbar .dhx_el_segmented .segment_0{
- -webkit-border-top-left-radius: 4px;
- -webkit-border-bottom-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
- -moz-border-radius-bottomleft: 4px;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- padding:0 11px 0 14px;
-}
-.dhx_schedulerbar .dhx_el_segmented .segment_1{
- border-left:1px solid #ababab;
- border-right:1px solid #ababab;
- padding:0 11px;
-}
-.dhx_schedulerbar .dhx_el_segmented .segment_N{
- -webkit-border-top-right-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-bottomright: 4px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- padding:0 14px 0 11px;
-}
-
-
-/**Day Events**/
-
-/*scale:*/
-/*scale item container*/
-.dhx_dayevents_scale_item {
- -moz-user-select:-moz-none;
- border-bottom:1px solid #D4D4D4;
- color:#303030;
- font-family:"Helvetica World","HelveticaNeue","Helvetica Neue","HelveticaNeueRoman","Helvetica","Tahoma","Geneva","Arial",sans-serif;
- white-space:nowrap;
-}
-/*hour container*/
-.dhx_dayevents_scale_hour{
- float: left;
- text-align: center;
- font-size: 16px;
- vertical-align:middle;
- font-weight: bold;
- /*background-color:#E1E6FF;*/
- /*background-color: #EEE;*/
-}
-/*scale items*/
-.dhx_dayevents_scale_top, .dhx_dayevents_scale_bottom {
- font-size: 10px;
- float: left;
- text-align:center;
-}
-.dhx_dayevents_scale_top{
- border-bottom:1px dotted #D4D4D4;
-}
-/*minutes container*/
-.dhx_dayevents_scale_minute{
- /*background-color:#E1E6FF;*/
- background-color: #EEE;
- border-right:1px dotted #D4D4D4;
- float:left;
-}
-/*event container*/
-.dhx_dayevents_scale_event {
- float:left;
-}
-/*event:*/
-.dhx_dayevents_event_item{
- position:absolute;
- border-radius: 4px;
- -moz-border-radius: 4px;
- -webkit-border-radius:4px;
- font-size: 12px;
- background-color: #e6f8ff;
- border:1px solid #78a5b4;
- font-family:"Helvetica World","HelveticaNeue","Helvetica Neue","HelveticaNeueRoman","Helvetica","Tahoma","Geneva","Arial",sans-serif;
- /*-moz-box-shadow: 1px 1px 1px #888;
- -webkit-box-shadow: 1px 1px 1px #888;
- box-shadow: 1px 1px 1px #888;*/
-}
-/*toolbar*/
-.dhx_topbar{
- font-size:18px;
- background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd),color-stop(0.5, #ededed), to(#c8c8c8)) !important;
- background: -moz-linear-gradient(top, #fdfdfd, #c8c8c8) !important;
-}
-
-
-/**List view**/
-.dhx_list_events_item{
- position:relative;
- background-color:#ffffff;
-}
-.dhx_list_events_item .dhx_day_title{
- height:16px;
- line-height:16px;
- width:75px;
- position:absolute;
- left:1px;
- top:0px;
- /*background-color: #d23530;*/
- background: #518A9E;
- border-radius: 2px;
- text-align:center;
- -moz-border-radius: 2px;
- -moz-box-shadow: 1px 1px 1px #1c2329;
- -webkit-box-shadow: 1px 1px 1px #1c2329;
- box-shadow: 1px 1px 1px #1c2329;
- -webkit-border-radius:2px;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
- font-size: 14px;
- color: #ffffff;
-}
-.dhx_list_events_item .dhx_event_marker{
- display:inline-block;
- margin-left:5px;
- margin-top:5px;
- height:10px;
- /*line-height:22px;*/
- width:10px;
- border-radius: 6px;
- -moz-border-radius: 6px;
- -webkit-border-radius:6px;
- background-color: #e6f8ff;
- border:1px solid #78a5b4;
- vertical-align:top;
-}
-
-.dhx_list_events_item .dhx_event_time{
- display:inline-block;
- width:70px;
- font-size:16px;
- padding-top:8px;
-}
-
-.dhx_list_events_item .dhx_event_text{
- display:inline-block;
- padding-left:4px;
- overflow:hidden;
- height:22px;
- vertical-align:top;
- /*width:208px;*/
- white-space:nowrap;
-}
-
-
-/**Month events**/
-
-/*calendar*/
-.dhx_cal_day_num.dhx_cal_selected_day, .dhx_cal_day_num.dhx_cal_current_day.dhx_cal_selected_day{
- background: -webkit-gradient(linear, left top, left bottom, from(#a0bfc9), to(#4f899d)) !important;
- background: -moz-linear-gradient(top, #a0bfc9, #4f899d);
- text-shadow:0 1px 0 rgba(0, 0, 0, 0.6);
-}
-.dhx_cal_day_num.dhx_cal_current_day {
- background: -webkit-gradient(linear, left top, left bottom, from(#bababa), to(#eeeeee)) !important;
- background: -moz-linear-gradient(top, #bababa, #eeeeee);
- border-color:#636363;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
-}
-.dhx_cal_day_num.dhx_cal_selected_day span{
- color:#ffffff;
-}
-.dhx_cal_day_num{
- position:relative;
-}
-.dhx_cal_day_num .day_with_events{
- position:absolute;
- bottom:0px;
- right:0px;
- background-image:url(./imgs_mobile/event.png);
- background-repeat:no-repeat;
- width:12px;
- height:12px;
-}
-.dhx_cal_day_num.dhx_cal_selected_day .day_with_events{
- background-image:url(./imgs_mobile/event_focus.png);
-}
-.dhx_cal_prev_button div {
- background-image:url("./imgs_mobile/arrow_left.png");
- background-position:0;
- width:28px;
- height:29px;
- top:6px;
-}
-.dhx_cal_next_button div {
- background-image:url("./imgs_mobile/arrow_right.png");
- background-position:0;
- width:28px;
- height:29px;
- top:6px;
-}
-/*events list*/
-.dhx_list_day_events_item{
- background-color:#ffffff;
-}
-.dhx_list_day_events_item .dhx_event_marker{
- display:inline-block;
- margin-top:16px;
- margin-left:5px;
- height:10px;
- width:10px;
- border-radius: 6px;
- -moz-border-radius: 6px;
- -webkit-border-radius:6px;
- background-color: #e6f8ff;
- border:1px solid #78a5b4;
-}
-.dhx_list_day_events_item .dhx_event_time{
- display:inline-block;
- width:auto;
- height:42px;
- line-height:42px;
- padding-left:5px;
-}
-
-.dhx_list_day_events_item .dhx_event_text{
- display:inline-block;
- padding-left:10px;
- line-height:42px;
-}
-
-/*No events BG*/
-.no_events{
- background-image:url(./imgs_mobile/noevents.png);
- background-repeat:no-repeat;
-}
-
-
-/**Selected event view**/
-.selected_event{
- width: 290px;
- margin:5px;
- background-color: #e6f8ff;
- border:1px solid #78a5b4;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius:5px;
- padding:3px 6px;
-}
-.selected_event .event_title{
- font-weight:bold
-}
-.selected_event .event_text{
- font-size:12px;
-}
-/*toolbar*/
-/*
-.dhx_topbar.single_event{
- background: -webkit-gradient(linear, left top, left bottom,from(#d6d6d6), to(#b8b8b8)) !important;
- background: -moz-linear-gradient(top, #d6d6d6, #b8b8b8) !important;
-}
-*/
-
-
-/**Editing form**/
-.dhx_el_formbutton.delete .dhx_inp_form_button{
- background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#d4d4d4));
- background: -moz-linear-gradient(top, #f8f8f8, #d4d4d4);
- border-top:1px solid #888;
- font-size:18px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- border:1px solid #8f8f8f;
- color:#606060;
- text-shadow: 0 1px 0 #ffffff;
- height:40px;
-
-}
-.dhx_el_button.cancel input{
- background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8),color-stop(0.3,#eeeeee),color-stop(0.6,#dcdcdc),to(#d5d5d5));
- background: -moz-linear-gradient(top, #f8f8f8, #d5d5d5);
- color:#6E6E6E;
- text-shadow:0 1px 0 #FFFFFF
-}
-.invalid .dhx_inp_text_border{
- border-color:#cc0000;
-}
-.invalid .dhx_inp_list {
- color:#cc0000;
-}
-
-/*confirm*/
-
-
-
-
-.dhx_win_body{
- font-weight:bold;
- color:#3f2317;
- text-shadow: 0px 1px #e2d3b6;
- background:url(../images/confirm_main_bgr.png);
-}
-.dhx_win_body .dhx_view{
- background:transparent;
-}
-.dhx_el_bigbutton input, .dhx_el_bigroundbutton input{
- height:40px;
- line-height:40px;
-}
-.dhx_el_bigroundbutton input, .alert .dhx_el_bigbutton input{
- background: #83a41f;
- background: -webkit-gradient(linear, left top, left bottom, from(#9dbcc7),color-stop(0.4,#80a9b8),color-stop(0.6,#6799aa),to(#4f899d));
- background: -moz-linear-gradient(top, #9dbcc7, #518a9e);
-}
-.dhx_el_bigroundbutton{
- padding-top:0px;
-}
-
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/mobile.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/mobile.js deleted file mode 100644 index 4455ef939be..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/mobile.js +++ /dev/null @@ -1,626 +0,0 @@ -/* -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 -*/ -if (!window.scheduler){
- window.scheduler = {
- config:{
- },
- templates:{
- },
- xy:{
- },
- locale:{
- }
- };
-}
-/*Locale*/
-if(!scheduler.locale)
- scheduler.locale = {};
-scheduler.locale.labels = {
- list_tab : "List",
- day_tab : "Day",
- month_tab : "Month",
- icon_today : "Today",
- icon_save : "Save",
- icon_delete : "Delete event",
- icon_cancel : "Cancel",
- icon_edit : "Edit",
- icon_back : "Back",
- icon_close : "Close form",
- icon_yes : "Yes",
- icon_no : "No",
- confirm_closing : "Your changes will be lost, are your sure ?",
- confirm_deleting : "Event will be deleted permanently, are you sure?",
- label_event:"Event",
- label_start:"Start",
- label_end:"End",
- label_details:"Notes",
- label_from: "from",
- label_to: "to"
-};
-
-/*Config*/
-
-/*date*/
-
-scheduler.config = {
- init_date : new Date(),
- form_date : "%d-%m-%Y %H:%i",
- xml_date : "%Y-%m-%d %H:%i",
- item_date : "%d.%m.%Y",
- header_date : "%d.%m.%Y",
- hour_date : "%H:%i",
- scale_hour : "%H",
- calendar_date : "%F %Y"
-};
-
-scheduler.config.form_rules = {
- end_date:function(value,obj){
- return (obj.start_date.valueOf() < value.valueOf());
- }
-};
-
-/*Dimentions*/
-scheduler.xy = {
- confirm_height : 231,
- confirm_width : 250,
- scale_width : 45,
- scale_height : 15,
- list_tab:54,
- day_tab:54,
- month_tab:68,
- icon_today : 72,
- icon_save : 100,
- icon_cancel : 100,
- icon_edit : 100,
- icon_back : 100,
- list_height: 42,
- month_list_height: 42
-}
-
-/*Templates*/
-scheduler.templates = {
- selected_event : function(obj){
- var html = "";
- if(!obj.start_date) return html;
- html += "<div class='selected_event'>";
- html += "<div class='event_title'>"+obj.text+"</div>";
- if(dhx.Date.datePart(obj.start_date).valueOf()==dhx.Date.datePart(obj.end_date).valueOf()){
- var fd = dhx.i18n.dateFormatStr(obj.start_date);
- var fts = dhx.i18n.timeFormatStr(obj.start_date);
- var fte = dhx.i18n.timeFormatStr(obj.end_date);
- html += "<div class='event_text'>"+fd+"</div>";
- html += "<div class='event_text'>"+scheduler.locale.labels.label_from+" "+fts+" "+scheduler.locale.labels.label_to+" "+fte+"</div>";
- }
- else{
- var fds = dhx.i18n.longDateFormatStr(obj.start_date);
- var fde = dhx.i18n.longDateFormatStr(obj.end_date);
- var fts = dhx.i18n.timeFormatStr(obj.start_date);
- var fte = dhx.i18n.timeFormatStr(obj.end_date);
- html += "<div class='event_text'>"+scheduler.locale.labels.label_from+" "+fts+" "+fds+"</div>";
- html += "<div class='event_text'>"+scheduler.locale.labels.label_to+" "+fte+" "+fde+"</div>";
- }
- if(obj.details&&obj.details!==""){
- html += "<div class='event_title'>"+scheduler.locale.labels.label_details+"</div>";
- html += "<div class='event_text'>"+obj.details+"</div>";
- }
- html += "</div>";
- return html;
- },
- calendar_event : function(date){
- return date+"<div class='day_with_events'></div>";
- },
- event_date: function(date){
- return dhx.i18n.dateFormatStr(date);
- },
- event_long_date: function(date){
- return dhx.i18n.longDateFormatStr(date);
- },
- event_time : function(date){
- return dhx.i18n.timeFormatStr(date);
- },
- event_color : function(obj,type){
- return (obj.color?"background-color:"+obj.color:"");
- },
- event_marker : function(obj,type){
- return "<div class='dhx_event_marker' style='"+type.color(obj)+"'></div>";
- },
- event_title: function(obj,type){
- return "<div class='dhx_day_title'>"+type.dateStart(obj.start_date)+"</div><div style='margin:10px'><div class='dhx_event_time'>"+type.timeStart(obj.start_date)+"</div>"+type.marker(obj,type)+"<div class='dhx_event_text'>"+obj.text+"</div></div>";
- },
- month_event_title : function(obj,type){
- return type.marker(obj,type)+"<div class='dhx_event_time'>"+type.timeStart(obj.start_date)+"</div><div class='dhx_event_text'>"+obj.text+"</div>"
- },
- day_event: function(obj,type){
- return obj.text
- }
-};
-
-/*Views of scheduler multiview*/
-scheduler.config.views = [];
-
-
-dhx.ready(function(){
- if (scheduler.locale&&scheduler.locale.date)
- dhx.Date.Locale = scheduler.locale.date;
-
- if(!scheduler.config.form){
- scheduler.config.form = [
- {view:"text", label:scheduler.locale.labels.label_event, name:'text'},
- {view:"datepicker", label:scheduler.locale.labels.label_start, name:'start_date', timeSelect:1, dateFormat:scheduler.config.form_date},
- {view:"datepicker", label:scheduler.locale.labels.label_end, name:'end_date', timeSelect:1, dateFormat:scheduler.config.form_date},
- {view:"textarea", label:scheduler.locale.labels.label_details, name:'details', width:300, height:150},
- {view:"button", label:scheduler.locale.labels.icon_delete, id:'delete',type:"form" ,css:"delete"}
- ];
- }
- if(!scheduler.config.bottom_toolbar){
- scheduler.config.bottom_toolbar = [
- { view:"button",id:"today",label:scheduler.locale.labels.icon_today,inputWidth:scheduler.xy.icon_today, align:"left",width:scheduler.xy.icon_today+6},
- { view:"segmented", id:"buttons",selected:"list",align:"center",multiview:true, options:[
- {value:"list", label:scheduler.locale.labels.list_tab,width:scheduler.xy.list_tab},
- {value:"day", label:scheduler.locale.labels.day_tab,width:scheduler.xy.day_tab},
- {value:"month", label:scheduler.locale.labels.month_tab,width:scheduler.xy.month_tab}
- ]},
- { view:"button",css:"add",id:"add", align:"right",label:"",inputWidth:42,width:50},
- { view:"label", label:"",inputWidth:42,width:50, batch:"readonly"}
- ];
- }
- if(!scheduler.config.day_toolbar){
- scheduler.config.day_toolbar = [
- {view:'label',id:"prev",align:"left",label:"<div class='dhx_cal_prev_button'><div></div></div>"},
- {view:'label',id:"date",align:"center",width:200},
- {view:'label',id:"next",align:"right",label:"<div class='dhx_cal_next_button'><div></div></div>"}
- ];
- }
- if(!scheduler.config.selected_toolbar){
- scheduler.config.selected_toolbar = [
- {view:'button', inputWidth:scheduler.xy.icon_back, type:"prev", id:"back",align:"left",label:scheduler.locale.labels.icon_back},
- {view:'button', inputWidth:scheduler.xy.icon_edit, id:"edit",align:"right",label:scheduler.locale.labels.icon_edit}
- ];
- }
- if(!scheduler.config.form_toolbar){
- scheduler.config.form_toolbar = [
- {view:'button', inputWidth:scheduler.xy.icon_cancel, id:"cancel",css:"cancel",align:"left",label:scheduler.locale.labels.icon_cancel},
- {view:'button', inputWidth:scheduler.xy.icon_save, id:"save",align:"right",label:scheduler.locale.labels.icon_save}
- ];
- }
-
- /*List types*/
- scheduler.types = {
- event_list:{
- name:"EventsList",
- css:"events",
- cssNoEvents:"no_events",
- padding:0,
- height:scheduler.xy.list_height,
- width:"auto",
- dateStart:scheduler.templates.event_date,
- timeStart:scheduler.templates.event_time,
- color:scheduler.templates.event_color,
- marker:scheduler.templates.event_marker,
- template:scheduler.templates.event_title
- },
- day_event_list:{
- name:"DayEventsList",
- css:"day_events",
- cssNoEvents:"no_events",
- padding:0,
- height:scheduler.xy.month_list_height,
- width:"auto",
- timeStart:scheduler.templates.event_time,
- color:scheduler.templates.event_color,
- marker:scheduler.templates.event_marker,
- template:scheduler.templates.month_event_title
- }
- };
-
- dhx.Type(dhx.ui.list, scheduler.types.event_list);
- dhx.Type(dhx.ui.list, scheduler.types.day_event_list);
-
- dhx.DataDriver.scheduler = {
- records:"/*/event"
- };
- dhx.extend(dhx.DataDriver.scheduler,dhx.DataDriver.xml);
-
- /*the views of scheduler multiview*/
- var views = [
- {
- id:"list",
- view:"list",
- type:"EventsList",
- startDate:new Date()
- },
- {
- id:"day",
- rows:[
- {
- id:"dayBar",
- view:"toolbar",
- css:"dhx_topbar",
- elements: scheduler.config.day_toolbar
- },
- {
- id:"dayList",
- view:"dayevents"
- }
- ]
- },
- {
- id:"month",
- rows:[
- {
- id:"calendar",
- view:"calendar",
- dayWithEvents: scheduler.templates.calendar_event,
- calendarHeader:scheduler.config.calendar_date
- },
- {
- id:"calendarDayEvents",
- view:"list",
- type:"DayEventsList"
- }
- ]
-
- },
- {
- id:"event",
- animate:{
- type:"slide",
- subtype:"in",
- direction:"top"
- },
- rows:[
- {
- id:"eventBar",
- view:"toolbar",
- type:"TopBar",
- css:"single_event",
- elements: scheduler.config.selected_toolbar
- },
- {
- id:"eventTemplate",
- view:"template",
- template:scheduler.templates.selected_event
- }
-
- ]
- },
- {
- id:"form",
- rows:[
- {
- id:"editBar",
- view:"toolbar",
- type:"TopBar",
- elements:scheduler.config.form_toolbar
- },
- {
- id:"editForm",
- view:"form",
- elements: scheduler.config.form,
- rules: scheduler.config.form_rules
- }
- ]
- }
- ].concat(scheduler.config.views);
-
- dhx.protoUI({
- name:"scheduler",
- defaults:{
- rows:[
- {
- view:"multiview",
- id:"views",
- cells: views
- },
- {
- view:"toolbar",
- id:"bottomBar",
- type:"SchedulerBar",
- visibleBatch:"default",
- elements: scheduler.config.bottom_toolbar
- }
- ],
- color:"#color#",
- textColor:"#textColor#"
- },
- $init: function() {
- this.name = "Scheduler";
- this._viewobj.className += " dhx_scheduler";
- /*date format functions*/
- dhx.i18n.dateFormat = scheduler.config.item_date;
- dhx.i18n.timeFormat = scheduler.config.hour_date;
- dhx.i18n.fullDateFormat = scheduler.config.xml_date;
- dhx.i18n.headerFormatStr = dhx.Date.dateToStr( scheduler.config.header_date);
- dhx.i18n.setLocale();
- this.data.provideApi(this);
- this.data.extraParser = dhx.bind(function(data){
- data.start_date = dhx.i18n.fullDateFormatDate(data.start_date);
- data.end_date = dhx.i18n.fullDateFormatDate(data.end_date);
- },this);
- this.$ready.push(this._initStructure);
- this.data.attachEvent("onStoreUpdated", dhx.bind(this._sortDates,this));
- },
- _initStructure:function(){
- this._initToolbars();
- this._initmonth();
-
- //store current date
- this.coreData = new dhx.DataValue();
- this.coreData.setValue(scheduler.config.init_date);
-
- this.$$("dayList").define("date",this.coreData);
-
- this.selectedEvent = new dhx.DataRecord();
-
- if(this.config.readonly){
- this.define("readonly",this.config.readonly);
- }
- else if(scheduler.config.readonly)
- this.define("readonly",true);
- /*saving data*/
- if(this.config.save){
- var dp = new dhx.DataProcessor({
- master:this,
- url:this.config.save
- });
- dp.attachEvent("onBeforeDataSend",this._onSchedulerUpdate);
- }
-
- if(this.$$("date"))
- this.$$("date").bind(this.coreData, null, dhx.i18n.headerFormatStr);
-
-
- this.$$("list").sync(this);
- this.$$("list").bind(this.coreData, function(target, source){
- return source < target.end_date;
- });
-
- this.$$("dayList").sync(this, true);
- this.$$("dayList").bind(this.coreData, function(target, source){
- var d = dhx.Date.datePart(source);
- return d < target.end_date && dhx.Date.add(d,1,"day") > target.start_date;
- });
-
- this.$$("calendar").bind(this.coreData);
-
- this.$$("calendarDayEvents").sync(this, true);
- this.$$("calendarDayEvents").bind(this.coreData, function(target, source){
- var d = dhx.Date.datePart(source);
- return d < target.end_date && dhx.Date.add(d,1,"day") > target.start_date;
- });
-
- this.$$("eventTemplate").bind(this);
- this.$$("editForm").bind(this);
-
- this.$$("list").attachEvent("onItemClick", dhx.bind(this._on_event_clicked, this));
- this.$$("dayList").attachEvent("onItemClick", dhx.bind(this._on_event_clicked, this));
- this.$$("calendarDayEvents").attachEvent("onItemClick", dhx.bind(this._on_event_clicked, this));
- },
- _on_event_clicked:function(id){
- this.setCursor(id);
- this.$$('event').show();
- },
- /*Sorts dates asc, gets hash of dates with event*/
- _sortDates:function(){
- this.data.blockEvent();
- this.data.sort(function(a,b){
- return a.start_date < b.start_date?1:-1;
- });
- this.data.unblockEvent();
- this._eventsByDate = {};
- var evs = this.data.getRange();
- for(var i = 0; i < evs.length;i++)
- this._setDateEvents(evs[i]);
- },
- /*Month Events view: gets dates of a certain event*/
- _setDateEvents:function(ev){
- var start = dhx.Date.datePart(ev.start_date);
- var end = dhx.Date.datePart(ev.end_date);
- if(ev.end_date.valueOf()!=end.valueOf())
- end = dhx.Date.add(end,1,"day");
- while(start<end){
- this._eventsByDate[start.valueOf()]=true;
- start = dhx.Date.add(start,1,"day");
- }
- },
- /* Month Events view: sets event handlers */
- _initmonth:function(){
- this.$$("calendar").attachEvent("onDateSelect",dhx.bind(function(date){
- this.setDate(date);
- },this));
-
- this.$$("calendar").attachEvent("onAfterMonthChange",dhx.bind(function(date){
- var today = new Date();
- if(date.getMonth()===today.getMonth()&&date.getYear()===today.getYear())
- date = today;
- else
- date.setDate(1);
- this.setDate(date);
- },this));
-
- var dayFormat = this.$$("calendar").config.calendarDay;
- this.$$("calendar").config.calendarDay=dhx.bind(function(date){
- var html = dayFormat(date);
- if(this._eventsByDate&&this._eventsByDate[date.valueOf()])
- return this.$$("calendar").config.dayWithEvents(html);
- return html;
- },this);
- },
-
- /*applies selected date to all lists*/
- setDate:function(date, inc, mode){
- if (!date)
- date = this.coreData.getValue();
- if (inc)
- date = dhx.Date.add(date, inc, mode);
- this.coreData.setValue(date);
- },
- _initToolbars:function(){
- this.attachEvent("onItemClick", function(id){
- var view_id = this.innerId(id);
- switch(view_id){
- case "today":
- this.setDate(new Date());
- break;
- case "add":
- if(this.innerId(this.$$("views").getActive()) == "form"){
- var self = this;
- dhx.confirm({
- height:scheduler.xy.confirm_height,
- width:scheduler.xy.confirm_width,
- title: scheduler.locale.labels.icon_close,
- message: scheduler.locale.labels.confirm_closing,
- callback: function(result) {
- if (result){
- self._addEvent();
- }
- },
- labelOk:scheduler.locale.labels.icon_yes,
- labelCancel:scheduler.locale.labels.icon_no,
- css:"confirm"
-
- });
- }else{
- this._addEvent();
- }
- break;
- case "prev":
- this.setDate(null, -1, "day");
- break;
- case "next":
- this.setDate(null, 1, "day");
- break;
- case "edit":
- if(this.$$("delete"))
- this.$$("delete").show();
- this.define("editEvent",true);
- this.$$("form").show();
- break;
- case "back":
- this.$$("views").back();
- break;
- case "cancel":
- /*if(!this._settings.editEvent)
- this.remove(this.getCursor());*/
- this.callEvent("onAfterCursorChange",[this.getCursor()]);
- this.$$("views").back();
- break;
- case "save":
- if(this.$$("editForm").validate()){
- if(!this._settings.editEvent){
- var data = this.$$("editForm").getValues();
- data.id = dhx.uid();
- this.add(data);
- this.setCursor(data.id);
- } else {
- this.$$("editForm").save();
- }
- dhx.dp(this).save();
- this.setDate();
- this.$$("views").back();
- }
- break;
- case "delete":
- this._deleteEvent();
- break;
- default:
- //do nothing
- break;
- }
- });
- this.attachEvent("onAfterTabClick", function(id, button){
- this.$$(button).show();
- });
- this.attachEvent("onBeforeTabClick", function(id, button){
- return this._confirmViewChange(button);
- });
- },
- readonly_setter:function(val){
- if(this.$$("add")){
- if (val){
- this.$$("bottomBar").showBatch("readonly");
- this.$$("add").hide();
- this.$$("edit").hide();
- }
- else{
- this.$$("bottomBar").showBatch("default");
- this.$$("add").show();
- this.$$("edit").show();
- }
- }
- return val;
- },
- /*removes "No events" background*/
- _clearNoEventsStyle:function(){
- if(this.dataCount())
- this._viewobj.className = this._viewobj.className.replace(RegExp(this.type.cssNoEvents, "g"),"");
- else
- this._viewobj.className += " "+this.type.cssNoEvents;
- },
- /*deletes the cursored event*/
- _deleteEvent: function(){
- var self = this;
- dhx.confirm({
- height:scheduler.xy.confirm_height,
- width:scheduler.xy.confirm_width,
- title: scheduler.locale.labels.icon_delete,
- message: scheduler.locale.labels.confirm_deleting,
- callback: function(result) {
- if (result){
- self.remove(self.getCursor());
- self.$$("views").back(2);
- }
- },
- labelOk:scheduler.locale.labels.icon_yes,
- labelCancel:scheduler.locale.labels.icon_no,
- css:"confirm",
- header:false
- });
- },
- /*adds the new event*/
- _addEvent:function(){
- if(this.$$("delete"))
- this.$$("delete").hide();
- this.define("editEvent",false);
- this.$$("form").show();
-
- var d = dhx.Date.add(new Date(),1,"hour");
- var start = new Date(d.setMinutes(0));
- var end = dhx.Date.add(start,1,"hour");
- this.$$("editForm").clear();
- this.$$("editForm").setValues({start_date:start,end_date:end});
- },
- /*cofirm the view changing (necessary for edit form)*/
- _confirmViewChange:function(button){
- if(this.innerId(this.$$("views").getActive()) == "form"){
- var self = this;
- if(button!= "today")
- dhx.confirm({
- height:scheduler.xy.confirm_height,
- width:scheduler.xy.confirm_width,
- title: scheduler.locale.labels.icon_close,
- message: scheduler.locale.labels.confirm_closing,
- callback: function(result) {
- if (result){
- self.$$(button).show();
- self.$$("buttons").setValue(button);
- }
- },
- labelOk:scheduler.locale.labels.icon_yes,
- labelCancel:scheduler.locale.labels.icon_no,
- css:"confirm"
- });
- return false;
- }
- return true;
- },
- _onSchedulerUpdate:function(data){
- var obj = data[0].data = dhx.copy(data[0].data);
- obj.start_date = dhx.i18n.fullDateFormatStr(obj.start_date);
- obj.end_date = dhx.i18n.fullDateFormatStr(obj.end_date);
- }
- }, dhx.IdSpace, dhx.DataLoader, dhx.ui.layout, dhx.EventSystem, dhx.Settings);
-
-});
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/note.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/note.css deleted file mode 100644 index 83118ff5ab4..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/note.css +++ /dev/null @@ -1,134 +0,0 @@ -/* -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 -*/ -.dhx_cal_event div{
- 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{
- border-width:0px 1px 1px 1px;
- padding:5px;
-}
-.dhx_resize_denied .dhx_cal_event .dhx_footer{
- cursor:default;
-}
-.dhx_cal_event .dhx_footer{
- height:1px;
- margin-left:2px;
- border-width:0px 1px 1px 1px;
- cursor:s-resize;
-}
-.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:0px solid black;
- margin:none;
- padding:none;
- 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;
-}
-div.dhx_now_time{
- position:absolute;
- width:100%;
- border-bottom:2px dotted red;
- z-index:1;
-}
-div.dhx_time_block{
- position:absolute;
- width:100%;
- background:silver;
- opacity:0.4;
- filter:alpha(opacity=40);
- z-index:1;
-}
\ No newline at end of file diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/recurring.css b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/recurring.css deleted file mode 100644 index 6e4d4f98395..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/recurring.css +++ /dev/null @@ -1,130 +0,0 @@ -/* -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 -*/ -/*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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/recurring.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/recurring.js deleted file mode 100644 index e360d7d1d43..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/recurring.js +++ /dev/null @@ -1,639 +0,0 @@ -/* -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.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=scheduler.date.str_to_date(scheduler.config.repeat_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"));
-
- 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"];
- for (var i=0; i < col.length; i++) {
- if (col[i].checked) t.push(col[i].value);
- }
- if (!t.length)
- t.push(dates.start.getDay());
-
- dates.start=scheduler.date.week_start(dates.start);
- dates._start = true;
-
- code.push(t.sort().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;
- 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 = 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 = [];
-scheduler.attachEvent("onEventLoading",function(ev){
- 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 true;
-});
-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("onBeforeEventDelete",function(id){
- var ev = this.getEvent(id);
- if (id.toString().indexOf("#")!=-1 || (ev.event_pid && ev.event_pid != "0" && 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];
- nev.event_length = tid;
- nev.rec_type = nev.rec_pattern = "none";
- this.addEvent(nev);
-
- this._add_rec_marker(nev, tid*1000);
- } else {
- if (ev.rec_type)
- 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];
- nev.event_length = id[1];
- nev.rec_type = nev.rec_pattern = "";
- this.addEvent(nev);
-
- this._not_render=false;
- this._add_rec_marker(nev,id[1]*1000);
- } else{
- if (ev.rec_type)
- 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 pid=this.getEvent(id).event_pid;
- if (id.toString().indexOf("#")!=-1)
- pid = id.split("#")[0];
- if (!pid || pid == 0 || (!this.locale.labels.confirm_recurring || !confirm(this.locale.labels.confirm_recurring))) return this.showLightbox_rec(id);
- pid = this.getEvent(pid);
- pid._end_date = pid.end_date;
- pid.end_date = new Date(pid.start_date.valueOf()+pid.event_length*1000);
- return this.showLightbox_rec(pid.id);
-};
-scheduler.get_visible_events_rec = scheduler.get_visible_events;
-scheduler.get_visible_events=function(){
- 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();
- 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.is_one_day_event;
-scheduler.is_one_day_event=function(ev){
- if (ev.rec_type) return true;
- return old.call(this,ev);
-};
-})();
-
-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 || (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 ch = this._get_rec_marker(td.valueOf(),ev.id);
- if (!ch) { //not changed element of serie
- 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(td.valueOf()/1000);
- copy.end_date = ted;
-
- var shift = copy.start_date.getTimezoneOffset() - copy.end_date.getTimezoneOffset();
- if (shift){
- if (shift>0)
- copy.end_date = new Date(td.valueOf()+ev.event_length*1000-shift*60*1000);
- else {
- copy.end_date = new Date(copy.end_date.valueOf() + shift*60*1000);
- }
- }
-
- copy._timed=this.is_one_day_event(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.getRecDates = function(id, max){
- var ev = typeof id == "object" ? id : scheduler.getEvent(id);
- var count = 0;
- var result = [];
- max = max || 1000;
-
- 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 } ];
- }
- 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){ //not changed element of serie
- var ted = new Date(td.valueOf()+ev.event_length*1000);
- var sed = new Date(td);
- 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){
- this.start_date=new Date(this.start_date);
- this.end_date=new Date(this.end_date);
- this.event_length=this.event_pid=this.rec_pattern=this.rec_type=this._timed=null;
-};
diff --git a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template.html deleted file mode 100644 index 078f4415777..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template.html +++ /dev/null @@ -1,57 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_cn.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_cn.html deleted file mode 100644 index c47f485b80f..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_cn.html +++ /dev/null @@ -1,57 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_de.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_de.html deleted file mode 100644 index bb70c5aac79..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_de.html +++ /dev/null @@ -1,60 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_el.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_el.html deleted file mode 100644 index eddddee99aa..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_el.html +++ /dev/null @@ -1,57 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_es.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_es.html deleted file mode 100644 index 94549432bc8..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_es.html +++ /dev/null @@ -1,57 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_fr.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_fr.html deleted file mode 100644 index 281dbe7afc4..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_fr.html +++ /dev/null @@ -1,57 +0,0 @@ -<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"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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_it.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_it.html deleted file mode 100644 index 1d92cb4d420..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_it.html +++ /dev/null @@ -1,57 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_nl.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_nl.html deleted file mode 100644 index d9e563191f6..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_nl.html +++ /dev/null @@ -1,65 +0,0 @@ -<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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_ru.html b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_ru.html deleted file mode 100644 index becab2809c7..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/repeat_template_ru.html +++ /dev/null @@ -1,57 +0,0 @@ -<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="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/addons/web_calendar/static/lib/dhtmlxScheduler/sources/scheduler.js b/addons/web_calendar/static/lib/dhtmlxScheduler/sources/scheduler.js deleted file mode 100644 index 80018266f24..00000000000 --- a/addons/web_calendar/static/lib/dhtmlxScheduler/sources/scheduler.js +++ /dev/null @@ -1,714 +0,0 @@ -/* -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 -*/ -window.dhtmlXScheduler=window.scheduler={version:3.0};
-dhtmlxEventable(scheduler);
-scheduler.init=function(id,date,mode){
- date=date||(new Date());
- mode=mode||"week";
-
- 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();
- dhtmlxEvent(window,"resize",function(){
- window.clearTimeout(scheduler._resize_timer);
- scheduler._resize_timer=window.setTimeout(function(){
- if (scheduler.callEvent("onSchedulerResize",[]))
- scheduler.update_view();
- }, 100);
- });
- this.set_sizes();
- scheduler.callEvent('onSchedulerReady', []);
- this.setCurrentView(date,mode);
-};
-scheduler.xy={
- nav_height:22,
- min_event_height:40,
- scale_width:50,
- bar_height:20,
- 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 (!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){
- scheduler._on_mouse_move(e||event);
- };
- this._obj.onmousedown=function(e){
- scheduler._on_mouse_down(e||event);
- };
- this._obj.onmouseup=function(e){
- scheduler._on_mouse_up(e||event);
- };
- this._obj.ondblclick=function(e){
- scheduler._on_dbl_click(e||event);
- }
-};
-scheduler.select=function(id){
- if (this._table_view || !this.getEvent(id)._timed) return; //temporary block
- 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
- };
-};
-scheduler._click={
- dhx_cal_data:function(e){
- //debugger;
- var trg = e?e.target:event.srcElement;
- var id = scheduler._locate_event(trg);
-
- e = e || event;
- if ((id && !scheduler.callEvent("onClick",[id,e])) ||scheduler.config.readonly) return;
-
- if (id) {
- 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(){
- scheduler.setCurrentView(new Date());
- },
- 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; if (!c||confirm(c)) 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.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 = Math.round((new Date()).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+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) 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":
- if (!scheduler.config.dblclick_create) break;
- var pos=this._mouse_coords(e);
- var start=this._min_date.valueOf()+(pos.y*this.config.time_step+(this._table_view?0:pos.x)*24*60)*60000;
- start = this._correct_shift(start);
- this.addEventNow(start,null,e);
- break;
- case "dhx_body":
- case "dhx_wa_ev_body":
- 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.showLightbox(id);
- else
- this.edit(id);
- break;
- case "":
- if (src.parentNode)
- return scheduler._on_dbl_click(e,src.parentNode);
- default:
- var t = this["dblclick_"+name];
- if (t) t.call(this,e);
- break;
- }
-};
-
-scheduler._mouse_coords=function(ev){
- var pos;
- var b=document.body;
- var d = document.documentElement;
- if(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);
-
- //transform to date
- if (!this._table_view){
- pos.x=Math.max(0,Math.ceil(pos.x/this._cols[0])-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 {
- var dy=0;
- for (dy=1; dy < this._colsS.heights.length; dy++)
- if (this._colsS.heights[dy]>pos.y) break;
-
- pos.y=(Math.max(0,Math.ceil(pos.x/this._cols[0])-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;
- 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;
- if (!c || confirm(c))
- 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.custom || this._drag_pos.x!=pos.x || this._drag_pos.y!=pos.y){
-
- 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
-
- var start=this._min_date.valueOf()+(pos.y*this.config.time_step+(this._table_view?0:pos.x)*24*60)*60000;
- //if (this._mode != "week" && this._mode != "day")
- start = this._correct_shift(start);
-
- if (!this._drag_start){
- this._drag_start=start; return;
- }
- var end = start;
- if (end==this._drag_start) return;
-
- this._drag_id=this.uid();
- this.addEvent(new Date(this._drag_start), new Date(end),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);
- var start,end;
- if (this._drag_mode=="move"){
- start = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;
- if (!pos.custom && this._table_view) start+=this.date.time_part(ev.start_date)*1000;
- start = this._correct_shift(start);
- end = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);
- } else {
- start = ev.start_date.valueOf();
- if (this._table_view) {
- end = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);
- if (this._mode == "month")
- end = this._correct_shift(end, false);
- }
- 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._wa && scheduler._wa._dnd) ){
- ev.start_date=new_start;
- ev.end_date=new Date(end);
- if (this.config.update_render)
- this.update_view();
- 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_context=function(e,src){
- return this.callEvent("onContextMenu",[this._locate_event(src),e]);
-};
-scheduler._on_mouse_down=function(e,src){
- if (this.config.readonly || this._drag_mode) return;
- src = src||(e.target||e.srcElement);
- if (e.button==2||e.ctrlKey) return this._on_mouse_context(e,src);
- switch(src.className.split(" ")[0]){
- 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_header":
- case "dhx_title":
- case "dhx_wa_ev_body":
- this._drag_mode="move"; //item in table mode
- break;
- case "dhx_footer":
- this._drag_mode="resize"; //item in table mode
- break;
- case "dhx_scale_holder":
- case "dhx_scale_holder_now":
- case "dhx_month_body":
- case "dhx_matrix_cell":
- this._drag_mode="create";
- break;
- case "":
- if (src.parentNode)
- return scheduler._on_mouse_down(e,src.parentNode);
- default:
- this._drag_mode=null;
- this._drag_id=null;
- }
- 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_copy({},this._copy_event(this.getEvent(this._drag_id)||{}));
- }
- }
- this._drag_start=null;
-};
-scheduler._on_mouse_up=function(e){
- 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])){
- 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 {
- if (is_new && this.config.edit_on_create){
- this.unselect();
- this._new_event=new Date();//timestamp of creation
- if (this._table_view || this.config.details_on_create) {
- this._drag_mode=null;
- return this.showLightbox(this._drag_id);
- }
- this._drag_pos=true; //set flag to trigger full redraw
- this._select_id=this._edit_id=this._drag_id;
- } else if (!this._new_event)
- this.callEvent(is_new?"onEventAdded":"onEventChanged",[this._drag_id,this.getEvent(this._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_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.setCurrentView=function(date,mode){
- date = date || this._date;
- mode = mode || this._mode;
-
- if (!this.callEvent("onBeforeViewChange",[this._mode,this._date,mode,date])) return;
-
- var dhx_cal_data = 'dhx_cal_data';
- 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"];
- for (var i=0; i < tabs.length; i++) {
- tabs[i].className="dhx_cal_tab"+((tabs[i].getAttribute("name")==this._mode+"_tab")?" active":"");
- }
-
- //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
-
- 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";
- this.set_xy(head,this._cols[i]-1,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._cols=[]; //store for data section
- this._colsS={height:0};
- this._dy_shift=0;
-
- this.set_sizes();
- var summ=parseInt(h.style.width); //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(new Date());
-
- //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);
-
- for (var i=0; i<count; i++){
- this._cols[i]=Math.floor(summ/(count-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;
- }
-
- if (this.config.mark_now){
- var now = new Date();
- if (now < this._max_date && now > this._min_date && now.getHours() >= this.config.first_hour && now.getHours()<this.config.last_hour){
- var day = this.locate_holder_day(now);
- var sm = now.getHours()*60+now.getMinutes();
- var now_time = document.createElement("DIV");
- now_time.className = "dhx_now_time";
- now_time.style.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)+1+"px";
- b.childNodes[day].appendChild(now_time);
- }
- }
- }
-};
-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";
- cc.style.width=this.xy.scale_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._reset_month_scale=function(b,dd,sd){
- var ed=scheduler.date.add(dd,1,"month");
-
- //trim time part for comparation reasons
- var cd=new Date();
- 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++)
- tdcss[i]=" style='height:"+height+"px; width:"+((this._cols[i]||0)-1)+"px;' "
-
-
-
- var cellheight = 0;
- this._min_date=sd;
- var html="<table cellpadding='0' cellspacing='0'>";
- 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)+"' ";
- html+="><div class='dhx_month_head'>"+this.templates.month_day(sd)+"</div><div class='dhx_month_body' "+tdcss[j]+"></div></td>";
- 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;
- 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_copy=function(target, source){
- for(var key in source)
- target[key] = source[key];
- return target;
-};
|
