summaryrefslogtreecommitdiff
path: root/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2011-08-03 16:09:14 +0200
committerFabien Meghazi <fme@openerp.com>2011-08-03 16:09:14 +0200
commitdd456159b4796b8d0b8db76ac988d56737e4bc2c (patch)
tree8273b729b220208b844c542b3fbad008e80b7e7d /addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js
parent01aba99be5ddf9d481ef89dc3abfd978f0a4cbb8 (diff)
[ADD] Updated dhtmlxSheduler to version 3.0. (Fixed dhtmlx core initialization)
bzr revid: fme@openerp.com-20110803140914-5qjtozi94i4ruica
Diffstat (limited to 'addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js')
-rw-r--r--addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js b/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js
index cc182b4b12a..066e5e5a57b 100644
--- a/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js
+++ b/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_readonly.js
@@ -1,9 +1,9 @@
-/*
-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.attachEvent("onTemplatesReady",function(){scheduler.attachEvent("onBeforeLightbox",function(F){if(this.config.readonly_form||this.getEvent(F).readonly){this.config.readonly_active=true}else{this.config.readonly_active=false;return true}for(var E=0;E<this.config.lightbox.sections.length;E++){this.config.lightbox.sections[E].focus=false}return true});function D(E,K,L,J){var G=K.getElementsByTagName(E);var F=L.getElementsByTagName(E);for(var I=F.length-1;I>=0;I--){var L=F[I];if(!J){L.disabled=true}else{var H=document.createElement("SPAN");H.className="dhx_text_disabled";H.innerHTML=J(G[I]);L.parentNode.insertBefore(H,L);L.parentNode.removeChild(L)}}}var B=scheduler._fill_lightbox;scheduler._fill_lightbox=function(){var H=this.config.lightbox.sections;if(this.config.readonly_active){for(var F=0;F<H.length;F++){if(H[F].type=="recurring"){var G=document.getElementById(H[F].id);G.style.display=G.nextSibling.style.display="none";H.splice(F,1);F--}}}var E=B.apply(this,arguments);if(this.config.readonly_active){var I=this._get_lightbox();var J=this._lightbox_r=I.cloneNode(true);D("textarea",I,J,function(K){return K.value});D("input",I,J,false);D("select",I,J,function(K){return K.options[Math.max((K.selectedIndex||0),0)].text});J.removeChild(J.childNodes[2]);J.removeChild(J.childNodes[3]);I.parentNode.insertBefore(J,I);A.call(this,J);this._lightbox=J;this.setLightboxSize();this._lightbox=null;J.onclick=function(K){var L=K?K.target:event.srcElement;if(!L.className){L=L.previousSibling}if(L&&L.className){switch(L.className){case"dhx_cancel_btn":scheduler.callEvent("onEventCancel",[scheduler._lightbox_id]);scheduler._edit_stop_event(scheduler.getEvent(scheduler._lightbox_id),false);scheduler.hide_lightbox();break}}}}return E};var A=scheduler.showCover;scheduler.showCover=function(){if(!this.config.readonly_active){A.apply(this,arguments)}};var C=scheduler.hide_lightbox;scheduler.hide_lightbox=function(){if(this._lightbox_r){this._lightbox_r.parentNode.removeChild(this._lightbox_r);this._lightbox_r=null}return C.apply(this,arguments)}}); \ No newline at end of file
+to use it in not GPL project. Please contact sales@dhtmlx.com for details
+*/
+scheduler.attachEvent("onTemplatesReady",function(){function h(d,b,c,f){for(var e=b.getElementsByTagName(d),a=c.getElementsByTagName(d),g=a.length-1;g>=0;g--)if(c=a[g],f){var i=document.createElement("SPAN");i.className="dhx_text_disabled";i.innerHTML=f(e[g]);c.parentNode.insertBefore(i,c);c.parentNode.removeChild(c)}else c.disabled=!0}scheduler.attachEvent("onBeforeLightbox",function(d){if(this.config.readonly_form||this.getEvent(d).readonly)this.config.readonly_active=!0;else return this.config.readonly_active=
+!1,!0;for(var b=0;b<this.config.lightbox.sections.length;b++)this.config.lightbox.sections[b].focus=!1;return!0});var k=scheduler._fill_lightbox;scheduler._fill_lightbox=function(){var d=this.config.lightbox.sections;if(this.config.readonly_active)for(var b=0;b<d.length;b++)if(d[b].type=="recurring"){var c=document.getElementById(d[b].id);c.style.display=c.nextSibling.style.display="none";d.splice(b,1);b--}var f=k.apply(this,arguments);if(this.config.readonly_active){var e=this._get_lightbox(),a=
+this._lightbox_r=e.cloneNode(!0);a.id=scheduler.uid();a.style.color="red";h("textarea",e,a,function(a){return a.value});h("input",e,a,!1);h("select",e,a,function(a){return a.options[Math.max(a.selectedIndex||0,0)].text});a.removeChild(a.childNodes[2]);a.removeChild(a.childNodes[3]);e.parentNode.insertBefore(a,e);j.call(this,a);scheduler._lightbox&&scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);this._lightbox=a;this.setLightboxSize();this._lightbox=null;a.onclick=function(a){var b=
+a?a.target:event.srcElement;if(!b.className)b=b.previousSibling;if(b&&b.className)switch(b.className){case "dhx_cancel_btn":scheduler.callEvent("onEventCancel",[scheduler._lightbox_id]),scheduler._edit_stop_event(scheduler.getEvent(scheduler._lightbox_id),!1),scheduler.hide_lightbox()}}}return f};var j=scheduler.showCover;scheduler.showCover=function(){this.config.readonly_active||j.apply(this,arguments)};var l=scheduler.hide_lightbox;scheduler.hide_lightbox=function(){if(this._lightbox_r)this._lightbox_r.parentNode.removeChild(this._lightbox_r),
+this._lightbox_r=null;return l.apply(this,arguments)}});