summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2013-05-24 16:28:56 +0200
committerMartin Trigaux <mat@openerp.com>2013-05-24 16:28:56 +0200
commite528e410c2eebefe9ee1fde4f7e280e55417d46b (patch)
tree1a42b9d7909067f0c43fcaa651c14ed728b5f033 /addons
parent0e8d719cd1f783aedbf12dd1e2e348022fd00462 (diff)
[IMP] explain monkey patch
bzr revid: mat@openerp.com-20130524142856-gra4nuvl7upuldp5
Diffstat (limited to 'addons')
-rw-r--r--addons/web_calendar/static/src/js/calendar.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web_calendar/static/src/js/calendar.js b/addons/web_calendar/static/src/js/calendar.js
index 40539f7f0f6..8da2ad43819 100644
--- a/addons/web_calendar/static/src/js/calendar.js
+++ b/addons/web_calendar/static/src/js/calendar.js
@@ -4,9 +4,9 @@
(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) {
+ // It manually implements some kind of dbl click event
+ // bubbling but fails to do it properly.
var old_scheduler_dblclick = scheduler._on_dbl_click;
scheduler._on_dbl_click = function(e, src) {
if (src && !src.className) {
@@ -16,6 +16,8 @@
}
};
+ // It uses the date+time format, leading to month range being between
+ // 1/5 08:53 - 1/6 08:52 instead of 1/5 00:00 - 31/5 23:59
scheduler._click.dhx_cal_today_button = function() {
if (scheduler.callEvent("onBeforeTodayDisplayed", [])) {
scheduler.setCurrentView( scheduler.date.date_part(new Date()) );