summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-12-28 11:31:54 +0100
committerChristophe Matthieu <chm@openerp.com>2012-12-28 11:31:54 +0100
commit9bb15d90e2ed4822d6abdbe59b076573e4cb8e32 (patch)
treea3512169956ce875c69dfc7259197b641ec08012
parent5efdd18b0590584f315878968c112f6049bc5e62 (diff)
[IMP] web gantt: fix the view gantt for IE9 (remove wrong overflow and min value = 1)
bzr revid: chm@openerp.com-20121228103154-kr1xj1fln4gjiuqp
-rw-r--r--addons/web_gantt/static/src/js/gantt.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js
index dbe5a33fcca..e6b12038126 100644
--- a/addons/web_gantt/static/src/js/gantt.js
+++ b/addons/web_gantt/static/src/js/gantt.js
@@ -136,7 +136,7 @@ instance.web_gantt.GanttView = instance.web.View.extend({
});
return group;
} else {
- var group = new GanttTaskInfo(_.uniqueId("gantt_project_task_"), group_name, task_start, duration, 100);
+ var group = new GanttTaskInfo(_.uniqueId("gantt_project_task_"), group_name, task_start, duration || 1, 100);
_.each(task_infos, function(el) {
group.addChildTask(el.task_info);
});
@@ -161,7 +161,7 @@ instance.web_gantt.GanttView = instance.web.View.extend({
}
var duration = (task_stop.getTime() - task_start.getTime()) / (1000 * 60 * 60);
var id = _.uniqueId("gantt_task_");
- var task_info = new GanttTaskInfo(id, task_name, task_start, ((duration / 24) * 8), 100);
+ var task_info = new GanttTaskInfo(id, task_name, task_start, ((duration / 24) * 8) || 1, 100);
task_info.internal_task = task;
task_ids[id] = task_info;
return {task_info: task_info, task_start: task_start, task_stop: task_stop};
@@ -195,6 +195,8 @@ instance.web_gantt.GanttView = instance.web.View.extend({
$(rendered).prependTo(td);
$(".oe_gantt_button_create", this.$el).click(this.on_task_create);
}
+ // Fix for IE to display the content of gantt view.
+ this.$el.find(".oe_gantt td:first > div, .oe_gantt td:eq(1) > div > div").css("overflow", "");
},
on_task_changed: function(task_obj) {
var self = this;