text: /*
  dhtmlxScheduler v.4.3.0 Stardard
  
  This software is covered by GPL license. You also can obtain Commercial or Enterprise license to use it in non-GPL project - please contact sales@dhtmlx.com. Usage without proper license is prohibited.
  
  (c) Dinamenta, UAB.
  */
  scheduler.attachEvent("onTemplatesReady",function(){function e(e,t,r,s){for(var a=t.getElementsByTagName(e),n=r.getElementsByTagName(e),i=n.length-1;i>=0;i--){var r=n[i];if(s){var d=document.createElement("SPAN");d.className="dhx_text_disabled",d.innerHTML=s(a[i]),r.parentNode.insertBefore(d,r),r.parentNode.removeChild(r)}else r.disabled=!0,t.checked&&(r.checked=!0)}}var t=scheduler.config.lightbox.sections.slice(),r=scheduler.config.buttons_left.slice(),s=scheduler.config.buttons_right.slice();scheduler.attachEvent("onBeforeLightbox",function(e){if(this.config.readonly_form||this.getEvent(e).readonly){this.config.readonly_active=!0;
  for(var a=0;a<this.config.lightbox.sections.length;a++)this.config.lightbox.sections[a].focus=!1}else this.config.readonly_active=!1,scheduler.config.lightbox.sections=t.slice(),scheduler.config.buttons_left=r.slice(),scheduler.config.buttons_right=s.slice();var n=this.config.lightbox.sections;if(this.config.readonly_active){for(var a=0;a<n.length;a++)if("recurring"==n[a].type){this.config.readonly_active&&n.splice(a,1);break}for(var i=["dhx_delete_btn","dhx_save_btn"],d=[scheduler.config.buttons_left,scheduler.config.buttons_right],a=0;a<i.length;a++)for(var l=i[a],o=0;o<d.length;o++){for(var _=d[o],h=-1,c=0;c<_.length;c++)if(_[c]==l){h=c;
  break}-1!=h&&_.splice(h,1)}}return this.resetLightbox(),!0});var a=scheduler._fill_lightbox;scheduler._fill_lightbox=function(){var t=this.getLightbox();this.config.readonly_active&&(t.style.visibility="hidden",t.style.display="block");var r=a.apply(this,arguments);if(this.config.readonly_active&&(t.style.visibility="",t.style.display="none"),this.config.readonly_active){var s=this.getLightbox(),i=this._lightbox_r=s.cloneNode(!0);i.id=scheduler.uid(),e("textarea",s,i,function(e){return e.value}),e("input",s,i,!1),e("select",s,i,function(e){return e.options.length?e.options[Math.max(e.selectedIndex||0,0)].text:""
  }),s.parentNode.insertBefore(i,s),n.call(this,i),scheduler._lightbox&&scheduler._lightbox.parentNode.removeChild(scheduler._lightbox),this._lightbox=i,scheduler.config.drag_lightbox&&(i.firstChild.onmousedown=scheduler._ready_to_dnd),this.setLightboxSize(),i.onclick=function(e){var t=e?e.target:event.srcElement;if(t.className||(t=t.previousSibling),t&&t.className)switch(t.className){case"dhx_cancel_btn":scheduler.callEvent("onEventCancel",[scheduler._lightbox_id]),scheduler._edit_stop_event(scheduler.getEvent(scheduler._lightbox_id),!1),scheduler.hide_lightbox()
  }}}return r};var n=scheduler.showCover;scheduler.showCover=function(){this.config.readonly_active||n.apply(this,arguments)};var i=scheduler.hide_lightbox;scheduler.hide_lightbox=function(){return this._lightbox_r&&(this._lightbox_r.parentNode.removeChild(this._lightbox_r),this._lightbox_r=this._lightbox=null),i.apply(this,arguments)}});
  //# sourceMappingURL=../sources/ext/dhtmlxscheduler_readonly.js.map