/* 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.xy.map_date_width=188;scheduler.xy.map_description_width=400;scheduler.config.map_resolve_event_location=true;scheduler.config.map_resolve_user_location=true;scheduler.config.map_initial_position=new google.maps.LatLng(48.724,8.215);scheduler.config.map_error_position=new google.maps.LatLng(15,15);scheduler.config.map_infowindow_max_width=300;scheduler.config.map_type=google.maps.MapTypeId.ROADMAP;scheduler.config.map_zoom_after_resolve=15;scheduler.locale.labels.marker_geo_success="It seems you are here.";scheduler.locale.labels.marker_geo_fail="Sorry, could not get your current position using geolocation.";scheduler.templates.marker_date=scheduler.date.date_to_str("%Y-%m-%d %H:%i");scheduler.templates.marker_text=function(C,A,B){return"
"+B.text+"

"+(B.event_location||"")+"

"+scheduler.templates.marker_date(C)+" - "+scheduler.templates.marker_date(A)+"
"};scheduler.dblclick_dhx_map_area=function(){if(!this.config.readonly&&this.config.dblclick_create){this.addEventNow()}};scheduler.templates.map_time=function(C,A,B){if(B._timed){return this.day_date(B.start_date,B.end_date,B)+" "+this.event_date(C)}else{return scheduler.templates.day_date(C)+" – "+scheduler.templates.day_date(A)}};scheduler.templates.map_text=function(A){return A.text};scheduler.date.map_start=function(A){return A};scheduler.attachEvent("onTemplatesReady",function(){function D(){_isPositionSet=false;var H=document.createElement("div");H.className="dhx_map";H.id="dhx_gmap";H.style.dispay="none";node=document.getElementById("scheduler_here");node.appendChild(H);scheduler._els.dhx_gmap=[];scheduler._els.dhx_gmap.push(H);C("dhx_gmap");var G={zoom:scheduler.config.map_inital_zoom||10,center:scheduler.config.map_initial_position,mapTypeId:scheduler.config.map_type||google.maps.MapTypeId.ROADMAP};map=new google.maps.Map(document.getElementById("dhx_gmap"),G);map.disableDefaultUI=false;map.disableDoubleClickZoom=true;google.maps.event.addListener(map,"dblclick",function(J){if(!scheduler.config.readonly&&scheduler.config.dblclick_create){point=J.latLng;geocoder.geocode({latLng:point},function(L,K){if(K==google.maps.GeocoderStatus.OK){point=L[0].geometry.location;scheduler.addEventNow({lat:point.lat(),lng:point.lng(),event_location:L[0].formatted_address})}})}});var I={content:""};if(scheduler.config.map_infowindow_max_width){I.maxWidth=scheduler.config.map_infowindow_max_width}scheduler.map={_points:[],_markers:[],_infowindow:new google.maps.InfoWindow(I),_infowindows_content:[],_initialization_count:-1};geocoder=new google.maps.Geocoder();if(scheduler.config.map_resolve_user_location){if(navigator.geolocation){if(!_isPositionSet){navigator.geolocation.getCurrentPosition(function(J){var K=new google.maps.LatLng(J.coords.latitude,J.coords.longitude);map.setCenter(K);map.setZoom(scheduler.config.map_zoom_after_resolve||10);scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);scheduler.map._infowindow.position=map.getCenter();scheduler.map._infowindow.open(map);_isPositionSet=true},function(){scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);scheduler.map._infowindow.setPosition(map.getCenter());scheduler.map._infowindow.open(map);_isPositionSet=true})}}}google.maps.event.addListener(map,"resize",function(J){H.style.zIndex="5";map.setZoom(map.getZoom())});google.maps.event.addListener(map,"tilesloaded",function(J){H.style.zIndex="5"})}D();scheduler.attachEvent("onSchedulerResize",function(){if(this._mode=="map"){this.map_view(true)}});var A=scheduler.render_data;scheduler.render_data=function(G,J){if(this._mode=="map"){E();var I=scheduler.get_visible_events();for(var H=0;H
"+G.date+"
"+G.description+"
";scheduler._table_view=true;scheduler.set_sizes()}}function E(){var H=scheduler._date;var L=scheduler.get_visible_events();L.sort(function(N,M){return N.start_date>M.start_date?1:-1});var K="
";for(var J=0;J
"+scheduler.templates.map_time(L[J].start_date,L[J].end_date,L[J])+"
";K+="
 
";K+="
"+scheduler.templates.map_text(L[J])+"
"}K+="
";scheduler._els.dhx_cal_data[0].scrollTop=0;scheduler._els.dhx_cal_data[0].innerHTML=K;scheduler._els.dhx_cal_data[0].style.width=(scheduler.xy.map_date_width+scheduler.xy.map_description_width+1)+"px";var I=scheduler._els.dhx_cal_data[0].firstChild.childNodes;scheduler._els.dhx_cal_date[0].innerHTML="";scheduler._rendered=[];for(var J=0;J