/*
dhtmlxScheduler v.2.3
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
(c) DHTMLX Ltd.
*/
scheduler._props={};scheduler.createUnitsView=function(A,E,D,B,C){if(typeof A=="object"){D=A.list;E=A.property;B=A.size||0;C=A.step||1;A=A.name}scheduler.date[A+"_start"]=scheduler.date.day_start;scheduler.templates[A+"_date"]=function(F){return scheduler.templates.day_date(F)};scheduler.templates[A+"_scale_date"]=function(G){if(!D.length){return""}var F=(scheduler._props[A].position||0)+Math.floor((scheduler._correct_shift(G.valueOf(),1)-scheduler._min_date.valueOf())/(60*60*24*1000));if(D[F].css){return""+D[F].label+""}else{return D[F].label}};scheduler.date["add_"+A]=function(F,G){return scheduler.date.add(F,G,"day")};scheduler.date["get_"+A+"_end"]=function(F){return scheduler.date.add(F,B||D.length,"day")};scheduler._props[A]={map_to:E,options:D,size:B,step:C,position:0};scheduler.attachEvent("onOptionsLoad",function(){var F=scheduler._props[A].order={};for(var G=0;G=K.size+K.position){return false}}}return H};scheduler._reset_scale=function(){var M=scheduler._props[this._mode];var H=B.apply(this,arguments);if(M){this._max_date=this.date.add(this._min_date,1,"day");var L=this._els.dhx_cal_data[0].childNodes;for(var I=0;II.order[J[I.map_to]]?1:-1})}else{G.apply(this,arguments)}};scheduler.attachEvent("onEventAdded",function(K,I){if(this._loading){return true}for(var H in scheduler._props){var J=scheduler._props[H];if(typeof I[J.map_to]=="undefined"){I[J.map_to]=J.options[0].key}}return true});scheduler.attachEvent("onEventCreated",function(K,H){var J=scheduler._props[this._mode];if(J){var I=this.getEvent(K);this._mouse_coords(H);D(J,I);this.event_updated(I)}return true})})();