diff options
| author | Christophe Simonis <chs@openerp.com> | 2011-12-15 16:31:34 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2011-12-15 16:31:34 +0100 |
| commit | 160801b0e69e0d5aedb73a408e9341ddde5092be (patch) | |
| tree | 470425bb6bed07d7d11d32ced87ab3a261dac4f7 /addons/web/static/src | |
| parent | af2e4fe2b54651904d72e84d681f16563c4de7a0 (diff) | |
[IMP] handle url for list views
bzr revid: chs@openerp.com-20111215153134-tdwy5y8j7ktm1dzv
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_list.js | 24 | ||||
| -rw-r--r-- | addons/web/static/src/js/views.js | 1 |
2 files changed, 24 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index f3aa9a61703..86749849053 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -459,8 +459,32 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# self.compute_aggregates(); reloaded.resolve(); })); + this.do_push_state({ + page: this.page, + limit: this._limit, + }); return reloaded.promise(); }, + + do_load_state: function(state) { + var reload = false; + if (state.page && this.page !== state.page) { + this.page = state.page; + reload = true; + } + if (state.limit) { + if (_.isString(state.limit)) { + state.limit = null; + } + if (state.limit !== this._limit) { + this._limit = state.limit; + reload = true; + } + } + if (reload) { + this.reload_content(); + } + }, /** * Handler for the result of eval_domain_and_context, actually perform the * searching diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 76082f3318b..579027a360a 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1067,7 +1067,6 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{ }, do_show: function () { this.$element.show(); - this.do_push_state({}); }, do_hide: function () { this.$element.hide(); |
