Merge lp:~openerp-dev/openerp-web/7.0-bug-1092164-chm into lp:openerp-web/7.0

Proposed by Christophe Matthieu (OpenERP)
Status: Merged
Merged at revision: 3680
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1092164-chm
Merge into: lp:openerp-web/7.0
Diff against target: 30 lines (+4/-2)
1 file modified
addons/web_gantt/static/src/js/gantt.js (+4/-2)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1092164-chm
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+141395@code.launchpad.net

Description of the change

[FIX] web gantt:
fix the view gantt for IE9 (remove wrong overflow and min value = 1)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web_gantt/static/src/js/gantt.js'
2--- addons/web_gantt/static/src/js/gantt.js 2012-12-13 14:09:14 +0000
3+++ addons/web_gantt/static/src/js/gantt.js 2012-12-28 10:40:33 +0000
4@@ -136,7 +136,7 @@
5 });
6 return group;
7 } else {
8- var group = new GanttTaskInfo(_.uniqueId("gantt_project_task_"), group_name, task_start, duration, 100);
9+ var group = new GanttTaskInfo(_.uniqueId("gantt_project_task_"), group_name, task_start, duration || 1, 100);
10 _.each(task_infos, function(el) {
11 group.addChildTask(el.task_info);
12 });
13@@ -161,7 +161,7 @@
14 }
15 var duration = (task_stop.getTime() - task_start.getTime()) / (1000 * 60 * 60);
16 var id = _.uniqueId("gantt_task_");
17- var task_info = new GanttTaskInfo(id, task_name, task_start, ((duration / 24) * 8), 100);
18+ var task_info = new GanttTaskInfo(id, task_name, task_start, ((duration / 24) * 8) || 1, 100);
19 task_info.internal_task = task;
20 task_ids[id] = task_info;
21 return {task_info: task_info, task_start: task_start, task_stop: task_stop};
22@@ -195,6 +195,8 @@
23 $(rendered).prependTo(td);
24 $(".oe_gantt_button_create", this.$el).click(this.on_task_create);
25 }
26+ // Fix for IE to display the content of gantt view.
27+ this.$el.find(".oe_gantt td:first > div, .oe_gantt td:eq(1) > div > div").css("overflow", "");
28 },
29 on_task_changed: function(task_obj) {
30 var self = this;