[IMP] rollback namespace-alteration to dhtmlXChart, fix dhtmlxscheduler and dhtmlxgantt to not fuck up the root dhtmlx namespace (which is what breaks chart)
bzr revid: xmo@openerp.com-20110620100557-zya9u6a3zuhhs0c3
This commit is contained in:
parent
0aedbd386c
commit
ca34076fbd
|
@ -6,47 +6,6 @@ to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
|||
|
||||
(c) DHTMLX Ltd.
|
||||
*/
|
||||
dhtmlx = function (B) {
|
||||
for (var A in B) {
|
||||
dhtmlx[A] = B[A]
|
||||
}
|
||||
return dhtmlx
|
||||
};
|
||||
dhtmlx.extend_api = function (A, D, C) {
|
||||
var B = window[A];
|
||||
if (!B) {
|
||||
return
|
||||
}
|
||||
window[A] = function (G) {
|
||||
if (G && typeof G == "object" && !G.tagName && !(G instanceof Array)) {
|
||||
var F = B.apply(this, (D._init ? D._init(G) : arguments));
|
||||
for (var E in dhtmlx) {
|
||||
if (D[E]) {
|
||||
this[D[E]](dhtmlx[E])
|
||||
}
|
||||
}
|
||||
for (var E in G) {
|
||||
if (D[E]) {
|
||||
this[D[E]](G[E])
|
||||
} else {
|
||||
if (E.indexOf("on") == 0) {
|
||||
this.attachEvent(E, G[E])
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var F = B.apply(this, arguments)
|
||||
}
|
||||
if (D._patch) {
|
||||
D._patch(this)
|
||||
}
|
||||
return F || this
|
||||
};
|
||||
window[A].prototype = B.prototype;
|
||||
if (C) {
|
||||
dhtmlXHeir(window[A].prototype, C)
|
||||
}
|
||||
};
|
||||
dhtmlxAjax = {
|
||||
get: function (A, C) {
|
||||
var B = new dtmlXMLLoaderObject(true);
|
||||
|
@ -3732,4 +3691,4 @@ This software is allowed to use under GPL or you need to obtain Commercial or En
|
|||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
|
||||
(c) DHTMLX Ltd.
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -1,42 +1,11 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
dhtmlx=function(obj){
|
||||
for (var a in obj) dhtmlx[a]=obj[a];
|
||||
return dhtmlx; //simple singleton
|
||||
};
|
||||
dhtmlx.extend_api=function(name,map,ext){
|
||||
var t = window[name];
|
||||
if (!t) return; //component not defined
|
||||
window[name]=function(obj){
|
||||
if (obj && typeof obj == "object" && !obj.tagName && !(obj instanceof Array)){
|
||||
var that = t.apply(this,(map._init?map._init(obj):arguments));
|
||||
//global settings
|
||||
for (var a in dhtmlx)
|
||||
if (map[a]) this[map[a]](dhtmlx[a]);
|
||||
//local settings
|
||||
for (var a in obj){
|
||||
if (map[a]) this[map[a]](obj[a]);
|
||||
else if (a.indexOf("on")==0){
|
||||
this.attachEvent(a,obj[a]);
|
||||
}
|
||||
}
|
||||
} else
|
||||
var that = t.apply(this,arguments);
|
||||
if (map._patch) map._patch(this);
|
||||
return that||this;
|
||||
};
|
||||
window[name].prototype=t.prototype;
|
||||
if (ext)
|
||||
dhtmlXHeir(window[name].prototype,ext);
|
||||
};
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
dhtmlxAjax={
|
||||
get:function(url,callback){
|
||||
var t=new dtmlXMLLoaderObject(true);
|
||||
|
@ -908,7 +877,7 @@ dhtmlxEventable=function(obj){
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @desc: constructor, data processor object
|
||||
* @param: serverProcessorURL - url used for update
|
||||
|
@ -1489,7 +1458,7 @@ dataProcessor.prototype={
|
|||
|
||||
};
|
||||
|
||||
//(c)dhtmlx ltd. www.dhtmlx.com
|
||||
//(c)dhtmlx ltd. www.dhtmlx.com
|
||||
dataProcessor.prototype._o_init = dataProcessor.prototype.init;
|
||||
dataProcessor.prototype.init=function(obj){
|
||||
this._console=this._console||this._createConsole();
|
||||
|
@ -1654,7 +1623,7 @@ dataProcessor.wrap("afterUpdateCallback",function(sid,tid,action){
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
dhx_sort[index]=direction
|
||||
dhx_filter[index]=mask
|
||||
|
@ -1792,7 +1761,7 @@ if (window.dataProcessor){
|
|||
dhtmlxError.catchError("LoadXML",function(a,b,c){
|
||||
alert(c[0].responseText);
|
||||
});
|
||||
|
||||
|
||||
window.dhtmlXScheduler=window.scheduler={version:2.2};
|
||||
dhtmlxEventable(scheduler);
|
||||
scheduler.init=function(id,date,mode){
|
||||
|
@ -2434,7 +2403,7 @@ scheduler.getLabel = function(property, key) {
|
|||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
};
|
||||
scheduler.date={
|
||||
date_part:function(date){
|
||||
date.setHours(0);
|
||||
|
@ -2568,7 +2537,7 @@ scheduler.date={
|
|||
return this.getISOWeek(ndate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scheduler.locale={
|
||||
date:{
|
||||
month_full:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
|
@ -2609,7 +2578,7 @@ scheduler.locale={
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
%e Day of the month without leading zeros (01..31)
|
||||
%d Day of the month, 2 digits with leading zeros (01..31)
|
||||
|
@ -2715,7 +2684,7 @@ scheduler.init_templates=function(){
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
scheduler.uid=function(){
|
||||
if (!this._seed) this._seed=(new Date).valueOf();
|
||||
return this._seed++;
|
||||
|
@ -3260,7 +3229,7 @@ scheduler.getEvents = function(from,to){
|
|||
result.push(ev);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
};
|
||||
scheduler._loaded={};
|
||||
scheduler._load=function(url,from){
|
||||
url=url||this._load_url;
|
||||
|
@ -3445,7 +3414,7 @@ scheduler.attachEvent("onXLE",function(){
|
|||
this.config.show_loading=true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
scheduler.ical={
|
||||
parse:function(str){
|
||||
var data = str.match(RegExp(this.c_start+"[^\f]*"+this.c_end,""));
|
||||
|
@ -3510,7 +3479,7 @@ scheduler.ical={
|
|||
e_start:"BEGIN:VEVENT",
|
||||
e_end:"END:VEVENT",
|
||||
c_end:"END:VCALENDAR"
|
||||
};
|
||||
};
|
||||
scheduler.form_blocks={
|
||||
textarea:{
|
||||
render:function(sns){
|
||||
|
@ -3850,7 +3819,7 @@ scheduler._get_lightbox=function(){
|
|||
}
|
||||
return this._lightbox;
|
||||
}
|
||||
scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'> </span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div><div class='dhx_btn_set'><div class='dhx_save_btn'></div><div> </div></div><div class='dhx_btn_set'><div class='dhx_cancel_btn'></div><div> </div></div><div class='dhx_btn_set' style='float:right;'><div class='dhx_delete_btn'></div><div> </div></div>";
|
||||
scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'> </span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div><div class='dhx_btn_set'><div class='dhx_save_btn'></div><div> </div></div><div class='dhx_btn_set'><div class='dhx_cancel_btn'></div><div> </div></div><div class='dhx_btn_set' style='float:right;'><div class='dhx_delete_btn'></div><div> </div></div>";
|
||||
scheduler._dp_init=function(dp){
|
||||
dp._methods=["setEventTextStyle","","changeEventId","deleteEvent"];
|
||||
|
||||
|
@ -3928,4 +3897,4 @@ scheduler._update_callback = function(upd,id){
|
|||
data.end_date = scheduler.templates.xml_date(data.end_date);
|
||||
|
||||
scheduler.addEvent(data);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,33 +1,3 @@
|
|||
dhtmlx=function(obj){
|
||||
for (var a in obj) dhtmlx[a]=obj[a];
|
||||
return dhtmlx; //simple singleton
|
||||
};
|
||||
dhtmlx.extend_api=function(name,map,ext){
|
||||
var t = window[name];
|
||||
if (!t) return; //component not defined
|
||||
window[name]=function(obj){
|
||||
if (obj && typeof obj == "object" && !obj.tagName && !(obj instanceof Array)){
|
||||
var that = t.apply(this,(map._init?map._init(obj):arguments));
|
||||
//global settings
|
||||
for (var a in dhtmlx)
|
||||
if (map[a]) this[map[a]](dhtmlx[a]);
|
||||
//local settings
|
||||
for (var a in obj){
|
||||
if (map[a]) this[map[a]](obj[a]);
|
||||
else if (a.indexOf("on")==0){
|
||||
this.attachEvent(a,obj[a]);
|
||||
}
|
||||
}
|
||||
} else
|
||||
var that = t.apply(this,arguments);
|
||||
if (map._patch) map._patch(this);
|
||||
return that||this;
|
||||
};
|
||||
window[name].prototype=t.prototype;
|
||||
if (ext)
|
||||
dhtmlXHeir(window[name].prototype,ext);
|
||||
};
|
||||
|
||||
dhtmlxAjax={
|
||||
get:function(url,callback){
|
||||
var t=new dtmlXMLLoaderObject(true);
|
||||
|
|
|
@ -1,33 +1,3 @@
|
|||
dhtmlx=function(obj){
|
||||
for (var a in obj) dhtmlx[a]=obj[a];
|
||||
return dhtmlx; //simple singleton
|
||||
};
|
||||
dhtmlx.extend_api=function(name,map,ext){
|
||||
var t = window[name];
|
||||
if (!t) return; //component not defined
|
||||
window[name]=function(obj){
|
||||
if (obj && typeof obj == "object" && !obj.tagName){
|
||||
var that = t.apply(this,(map._init?map._init(obj):arguments));
|
||||
//global settings
|
||||
for (var a in dhtmlx)
|
||||
if (map[a]) this[map[a]](dhtmlx[a]);
|
||||
//local settings
|
||||
for (var a in obj){
|
||||
if (map[a]) this[map[a]](obj[a]);
|
||||
else if (a.indexOf("on")==0){
|
||||
this.attachEvent(a,obj[a]);
|
||||
}
|
||||
}
|
||||
} else
|
||||
var that = t.apply(this,arguments);
|
||||
if (map._patch) map._patch(this);
|
||||
return that||this;
|
||||
};
|
||||
window[name].prototype=t.prototype;
|
||||
if (ext)
|
||||
dhtmlXHeir(window[name].prototype,ext);
|
||||
};
|
||||
|
||||
dhtmlxAjax={
|
||||
get:function(url,callback){
|
||||
var t=new dtmlXMLLoaderObject(true);
|
||||
|
|
|
@ -2,37 +2,6 @@
|
|||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
To use this component please contact sales@dhtmlx.com to obtain license
|
||||
*/
|
||||
|
||||
dhtmlx=function(obj){
|
||||
for (var a in obj) dhtmlx[a]=obj[a];
|
||||
return dhtmlx; //simple singleton
|
||||
};
|
||||
dhtmlx.extend_api=function(name,map,ext){
|
||||
var t = window[name];
|
||||
if (!t) return; //component not defined
|
||||
window[name]=function(obj){
|
||||
if (obj && typeof obj == "object" && !obj.tagName){
|
||||
var that = t.apply(this,(map._init?map._init(obj):arguments));
|
||||
//global settings
|
||||
for (var a in dhtmlx)
|
||||
if (map[a]) this[map[a]](dhtmlx[a]);
|
||||
//local settings
|
||||
for (var a in obj){
|
||||
if (map[a]) this[map[a]](obj[a]);
|
||||
else if (a.indexOf("on")==0){
|
||||
this.attachEvent(a,obj[a]);
|
||||
}
|
||||
}
|
||||
} else
|
||||
var that = t.apply(this,arguments);
|
||||
if (map._patch) map._patch(this);
|
||||
return that||this;
|
||||
};
|
||||
window[name].prototype=t.prototype;
|
||||
if (ext)
|
||||
dhtmlXHeir(window[name].prototype,ext);
|
||||
};
|
||||
|
||||
dhtmlxAjax={
|
||||
get:function(url,callback){
|
||||
var t=new dtmlXMLLoaderObject(true);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -226,7 +226,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
|
|||
y_axis = ordinate_description;
|
||||
}
|
||||
|
||||
var bar_chart = new dhtmlxchartChart({
|
||||
var bar_chart = new dhtmlXChart({
|
||||
view: view_chart,
|
||||
container: self.view_id+"-barchart",
|
||||
value:"#"+group_list[0]+"#",
|
||||
|
@ -289,7 +289,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
|
|||
},
|
||||
schedule_pie: function(result) {
|
||||
var self = this;
|
||||
var chart = new dhtmlxchartChart({
|
||||
var chart = new dhtmlXChart({
|
||||
view:"pie3D",
|
||||
container:self.view_id+"-piechart",
|
||||
value:"#"+self.operator_field+"#",
|
||||
|
|
Loading…
Reference in New Issue