[FIX] gantt addon so it loads correctly

Also remove leftover debugging log in chrome, and fix dependencies listing for calendar

bzr revid: xmo@openerp.com-20110413142001-5dpxoava5a0cwmq7
This commit is contained in:
Xavier Morel 2011-04-13 16:20:01 +02:00
parent a83bd29ada
commit bc2b83e883
5 changed files with 29 additions and 10 deletions

View File

@ -457,7 +457,6 @@ openerp.base.Session = openerp.base.BasicController.extend( /** @lends openerp.b
});
},
do_load_css: function (result) {
console.log('loading CSS files');
_.each(result.files, function (file) {
$('head').append($('<link>', {
'href': file,

View File

@ -1,7 +1,7 @@
{
"name": "Base calendar",
"version": "2.0",
"depends": [],
"depends": ['base'],
"js": [
'static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler.js',
'static/src/js/calendar.js'

View File

@ -1,8 +1,12 @@
{
"name": "Base Gantt",
"version": "2.0",
"depends": [],
"js": ["static/*/js/*.js"],
"css": [],
'active': False
"depends": ['base'],
"js": [
'static/lib/dhtmlxGantt/codebase/dhtmlxcommon.js',
'static/lib/dhtmlxGantt/codebase/dhtmlxgantt.js',
'static/src/js/gantt.js'
],
"css": ['static/lib/dhtmlxGantt/codebase/dhtmlxgantt.css'],
'active': True
}

View File

@ -2,9 +2,10 @@
* OpenERP base_gantt
*---------------------------------------------------------*/
openerp.base.gantt = function (openerp) {
openerp.base.views.add('gantt', 'openerp.base.GanttView');
openerp.base.GanttView = openerp.base.Controller.extend({
openerp.base_gantt = function (openerp) {
QWeb.add_template('/base_gantt/static/src/xml/base_gantt.xml');
openerp.base.views.add('gantt', 'openerp.base_gantt.GanttView');
openerp.base_gantt.GanttView = openerp.base.Controller.extend({
init: function(view_manager, session, element_id, dataset, view_id) {
this._super(session, element_id);
@ -216,7 +217,7 @@ openerp.base.GanttView = openerp.base.Controller.extend({
},
function(result) {
})
},
}
});

View File

@ -0,0 +1,15 @@
<template>
<t t-name="GanttView">
<h3 class="title"><t t-esc="view.fields_view.arch.attrs.string"/></h3>
<table class="gantt-view" width="100%" height="100%" cellspacing="0" cellpadding="0">
<tr>
<td style="width:85%">
<div style="width:100%;height:300px;position:relative" id="GanttDiv"/>
</td>
<td valign = "top">
<div id="gantt-sidebar"/>
</td>
</tr>
</table>
</t>
</template>