[imp] added this._super() in all views

bzr revid: nicolas.vanhoren@openerp.com-20110915094246-6v6imml9bf3y4ycj
This commit is contained in:
niv-openerp 2011-09-15 11:42:46 +02:00
parent eb45de7805
commit eddd4a8827
9 changed files with 9 additions and 4 deletions

View File

@ -10,7 +10,6 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
* view should be displayed (if there is one active).
*/
searchable: false,
template: "EmptyComponent",
form_template: "FormView",
/**
* @constructs openerp.web.FormView
@ -484,7 +483,6 @@ openerp.web.FormDialog = openerp.web.Dialog.extend({
},
start: function() {
this._super();
debugger; // TODO niv: check
this.form = new openerp.web.FormView(this, this.dataset, this.view_id, {
sidebar: false,
pager: false

View File

@ -2,7 +2,6 @@ openerp.web.list = function (openerp) {
var QWeb = openerp.web.qweb;
openerp.web.views.add('list', 'openerp.web.ListView');
openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# */ {
template: "EmptyComponent",
defaults: {
// records can be selected one by one
'selectable': true,

View File

@ -729,6 +729,7 @@ db.web.TranslateDialog = db.web.Dialog.extend({
});
db.web.View = db.web.Widget.extend(/** @lends db.web.View# */{
template: "EmptyComponent",
set_default_options: function(options) {
this.options = options || {};
_.defaults(this.options, {

View File

@ -30,6 +30,7 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
this.color_map = {};
},
start: function() {
this._super();
this.rpc("/web/view/load", {"model": this.model, "view_id": this.view_id, "view_type":"calendar", 'toolbar': true}, this.on_loaded);
},
stop: function() {
@ -344,7 +345,6 @@ openerp.web_calendar.CalendarFormDialog = openerp.web.Dialog.extend({
},
start: function() {
this._super();
debugger; //TODO niv: check
this.form = new openerp.web.FormView(this, this.dataset, this.view_id, {
sidebar: false,
pager: false

View File

@ -295,6 +295,7 @@ openerp.web_dashboard.ConfigOverview = openerp.web.View.extend({
this.dataset.domain = [['type', '=', 'manual']];
},
start: function () {
this._super();
$.when(this.dataset.read_slice(['state', 'action_id', 'category_id']),
this.dataset.call('progress'))
.then(this.on_records_loaded);
@ -352,6 +353,7 @@ openerp.web.client_actions.add(
openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({
template: 'ApplicationTiles',
start: function () {
this._super();
var self = this;
return new openerp.web.DataSetSearch(
this, 'ir.ui.menu', null, [['parent_id', '=', false]])
@ -393,6 +395,7 @@ openerp.web_dashboard.Widget = openerp.web.View.extend(/** @lends openerp.web_da
this.widget_id = options.widget_id;
},
start: function () {
this._super();
return new openerp.web.DataSet(this, 'res.widget').read_ids(
[this.widget_id], ['title'], this.on_widget_loaded);
},

View File

@ -20,6 +20,7 @@ openerp.web.DiagramView = openerp.web.View.extend({
this.ids = this.dataset.ids;
},
start: function() {
this._super();
return this.rpc("/web_diagram/diagram/load", {"model": this.model, "view_id": this.view_id}, this.on_loaded);
},

View File

@ -32,6 +32,7 @@ init: function(parent, element_id, dataset, view_id) {
},
start: function() {
this._super();
this.rpc("/web/view/load", {"model": this.model, "view_id": this.view_id, "view_type": "gantt"}, this.on_loaded);
},

View File

@ -33,6 +33,7 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
this.$element.hide();
},
start: function() {
this._super();
return this.rpc("/web_graph/graphview/load", {"model": this.model, "view_id": this.view_id}, this.on_loaded);
},
on_loaded: function(data) {

View File

@ -24,6 +24,7 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
}
},
start: function() {
this._super();
return this.rpc("/web/view/load", {"model": this.model, "view_id": this.view_id, "view_type": "kanban"}, this.on_loaded);
},
on_loaded: function(data) {