summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2011-12-14 18:24:34 +0100
committerAntony Lesuisse <al@openerp.com>2011-12-14 18:24:34 +0100
commit7991d820f528f95cfabfefcf2f9a7738bfc061ab (patch)
tree5ea0bfafcc9aefddd38f9c01b770b5334743e64a /addons/web/static/src/js
parent99ffc0507f791eb33074a1789f6d47e0bc3226d0 (diff)
parentd1ddc1ee7824dd571ac564359883198a73a747b5 (diff)
[MERGE] trunk
bzr revid: al@openerp.com-20111214172434-u2i6im40bviq229q
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/chrome.js2
-rw-r--r--addons/web/static/src/js/data.js2
-rw-r--r--addons/web/static/src/js/view_form.js4
-rw-r--r--addons/web/static/src/js/view_list.js4
-rw-r--r--addons/web/static/src/js/views.js18
5 files changed, 19 insertions, 11 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index ab492445691..8eb5298e956 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -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);
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js
index 26147b4d4e0..aec701e6e67 100644
--- a/addons/web/static/src/js/data.js
+++ b/addons/web/static/src/js/data.js
@@ -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;
},
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index b961b0089e3..502778d0f28 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -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();
}
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index bf423434ecc..ad253586591 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -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();
}
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index af0f0f47aba..e2bca4cc674 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -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,13 @@ 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);
}
},
-
+ do_load_state: function(state) {
+ }
});
session.web.json_node_to_xml = function(node, human_readable, indent) {