[MERGE] trunk
bzr revid: al@openerp.com-20111214172434-d1p2kn0vjvmoowec
This commit is contained in:
commit
f56166d67d
|
@ -663,7 +663,7 @@ openerp.web.Header = openerp.web.Widget.extend(/** @lends openerp.web.Header# *
|
|||
self.$content.remove();
|
||||
if (!self.session.uid)
|
||||
return;
|
||||
var func = new openerp.web.Model(self.session, "res.users").get_func("read");
|
||||
var func = new openerp.web.Model("res.users").get_func("read");
|
||||
return func(self.session.uid, ["name", "company_id"]).pipe(function(res) {
|
||||
self.$content = $(QWeb.render("Header-content", {widget: self, user: res}));
|
||||
self.$content.appendTo(self.$element);
|
||||
|
|
|
@ -811,7 +811,7 @@ openerp.web.ProxyDataSet = openerp.web.DataSetSearch.extend({
|
|||
});
|
||||
|
||||
openerp.web.Model = openerp.web.CallbackEnabled.extend({
|
||||
init: function(_, model_name) {
|
||||
init: function(model_name) {
|
||||
this._super();
|
||||
this.model_name = model_name;
|
||||
},
|
||||
|
|
|
@ -125,14 +125,14 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
|||
} else {
|
||||
promise = this.dataset.read_index(_.keys(this.fields_view.fields)).pipe(this.on_record_loaded);
|
||||
}
|
||||
this.$element.show();
|
||||
this._super();
|
||||
if (this.sidebar) {
|
||||
this.sidebar.$element.show();
|
||||
}
|
||||
return promise;
|
||||
},
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
this._super();
|
||||
if (this.sidebar) {
|
||||
this.sidebar.$element.hide();
|
||||
}
|
||||
|
|
|
@ -402,13 +402,13 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
|
|||
}, this));
|
||||
},
|
||||
do_show: function () {
|
||||
this.$element.show();
|
||||
this._super();
|
||||
if (this.sidebar) {
|
||||
this.sidebar.$element.show();
|
||||
}
|
||||
},
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
this._super();
|
||||
if (this.sidebar) {
|
||||
this.sidebar.$element.hide();
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ session.web.ActionManager = session.web.Widget.extend({
|
|||
},
|
||||
ir_actions_client: function (action) {
|
||||
this.content_stop();
|
||||
this.dialog_stop();
|
||||
var ClientWidget = session.web.client_actions.get_object(action.tag);
|
||||
(this.client_widget = new ClientWidget(this, action.params)).appendTo(this);
|
||||
},
|
||||
|
@ -1064,19 +1065,26 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
|
|||
this.embedded_view = embedded_view;
|
||||
this.options.sidebar = false;
|
||||
},
|
||||
do_show: function () {
|
||||
this.$element.show();
|
||||
},
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
},
|
||||
/**
|
||||
* Switches to a specific view type
|
||||
*
|
||||
* @param {String} view view type to switch to
|
||||
*/
|
||||
do_switch_view: function(view) { },
|
||||
do_switch_view: function(view) {
|
||||
},
|
||||
/**
|
||||
* Cancels the switch to the current view, switches to the previous one
|
||||
*/
|
||||
do_prev_view: function () { },
|
||||
do_prev_view: function () {
|
||||
},
|
||||
do_search: function(view) {
|
||||
},
|
||||
|
||||
set_common_sidebar_sections: function(sidebar) {
|
||||
sidebar.add_default_sections();
|
||||
},
|
||||
|
@ -1145,13 +1153,7 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
|
|||
sidebar_context: function () {
|
||||
return $.Deferred().resolve({}).promise();
|
||||
},
|
||||
|
||||
do_push_state: function(state) {
|
||||
if (this.wiget_parent && this.widget_parent.do_push_state) {
|
||||
this.widget_parent.do_push_state(state);
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
session.web.json_node_to_xml = function(node, human_readable, indent) {
|
||||
|
|
|
@ -394,7 +394,7 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
|
|||
});
|
||||
},
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
this._super();
|
||||
if (this.sidebar) {
|
||||
this.sidebar.$element.hide();
|
||||
}
|
||||
|
|
|
@ -298,14 +298,6 @@ openerp.web.DiagramView = openerp.web.View.extend({
|
|||
}
|
||||
$pager.find('span.oe_pager_index').html(index);
|
||||
$pager.find('span.oe_pager_count').html(this.dataset.count);
|
||||
},
|
||||
|
||||
do_show: function () {
|
||||
this.$element.show();
|
||||
},
|
||||
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -459,14 +459,6 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({
|
|||
}
|
||||
},
|
||||
|
||||
do_show: function () {
|
||||
this.$element.show();
|
||||
},
|
||||
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
},
|
||||
|
||||
convert_str_date: function (str) {
|
||||
if (typeof str == 'string') {
|
||||
if (str.length == 19) {
|
||||
|
|
|
@ -37,12 +37,6 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
|
|||
}
|
||||
this._super();
|
||||
},
|
||||
do_show: function () {
|
||||
this.$element.show();
|
||||
},
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
this._super();
|
||||
|
|
|
@ -258,12 +258,6 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
|
|||
});
|
||||
}
|
||||
},
|
||||
do_show: function () {
|
||||
this.$element.show();
|
||||
},
|
||||
do_hide: function () {
|
||||
this.$element.hide();
|
||||
},
|
||||
compute_groups_width: function() {
|
||||
var unfolded = 0;
|
||||
_.each(this.groups, function(group) {
|
||||
|
|
Loading…
Reference in New Issue