[FIX] dhtmlx scheduler raises an exception when double clicking some of its dom elements.

lp bug: https://launchpad.net/bugs/1075551 fixed

bzr revid: fme@openerp.com-20121112151131-zw01nh86asqyl7ll
This commit is contained in:
Fabien Meghazi 2012-11-12 16:11:31 +01:00
parent 06bcfd27fc
commit 29578e1748
1 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,22 @@
* OpenERP web_calendar
*---------------------------------------------------------*/
(function() {
// Monkey patch dhtml scheduler in order to fix a bug.
// It manually implements some kind of dbl click event
// bubbling but fails to do it properly.
if (this.scheduler) {
var old_scheduler_dblclick = scheduler._on_dbl_click;
scheduler._on_dbl_click = function(e, src) {
if (src && !src.className) {
return;
} else {
old_scheduler_dblclick.apply(this, arguments);
}
};
}
}());
openerp.web_calendar = function(instance) {
var _t = instance.web._t,
_lt = instance.web._lt;