summaryrefslogtreecommitdiff
path: root/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2011-04-08 01:41:30 +0200
committerAntony Lesuisse <al@openerp.com>2011-04-08 01:41:30 +0200
commit1fb7203f1c46db5d7d73397b288b9ae82af0362c (patch)
tree5718e62b0e5ea074de4650db19cb153371441563 /addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js
parent90354c9220fb49828302cbc973cb2e7f05664f24 (diff)
parenta20a5d36a51e90a71de3567f50342c7a90d6edfd (diff)
[MERGE] proto61
bzr revid: al@openerp.com-20110407234130-hyt5nxg5pqh2iyes
Diffstat (limited to 'addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js')
-rw-r--r--addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js b/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js
new file mode 100644
index 00000000000..2e041981b10
--- /dev/null
+++ b/addons/base_calendar/static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js
@@ -0,0 +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.data_attributes=function(){var C=[];var E=scheduler.templates.xml_format;for(var A in this._events){var D=this._events[A];for(var B in D){if(B.substr(0,1)!="_"){C.push([B,((B=="start_date"||B=="end_date")?E:null)])}}break}return C};scheduler.toXML=function(F){var C=[];var B=this.data_attributes();for(var A in this._events){var E=this._events[A];if(E.id.toString().indexOf("#")!=-1){continue}C.push("<event>");for(var D=0;D<B.length;D++){C.push("<"+B[D][0]+"><![CDATA["+(B[D][1]?B[D][1](E[B[D][0]]):E[B[D][0]])+"]]></"+B[D][0]+">")}C.push("</event>")}return(F||"")+"<data>"+C.join("\n")+"</data>"};scheduler.toJSON=function(){var E=[];var C=this.data_attributes();for(var B in this._events){var F=this._events[B];if(F.id.toString().indexOf("#")!=-1){continue}var F=this._events[B];var A=[];for(var D=0;D<C.length;D++){A.push(" "+C[D][0]+':"'+((C[D][1]?C[D][1](F[C[D][0]]):F[C[D][0]])||"").toString().replace(/\n/g,"")+'" ')}E.push("{"+A.join(",")+"}")}return"["+E.join(",\n")+"]"};scheduler.toICal=function(G){var F="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\nDESCRIPTION:";var C="END:VCALENDAR";var E=scheduler.date.date_to_str("%Y%m%dT%H%i%s");var B=[];for(var A in this._events){var D=this._events[A];if(D.id.toString().indexOf("#")!=-1){continue}B.push("BEGIN:VEVENT");B.push("DTSTART:"+E(D.start_date));B.push("DTEND:"+E(D.end_date));B.push("SUMMARY:"+D.text);B.push("END:VEVENT")}return F+(G||"")+"\n"+B.join("\n")+"\n"+C}; \ No newline at end of file