[IMP] handle url for list views

bzr revid: chs@openerp.com-20111215153134-tdwy5y8j7ktm1dzv
This commit is contained in:
Christophe Simonis 2011-12-15 16:31:34 +01:00
parent af2e4fe2b5
commit 160801b0e6
2 changed files with 24 additions and 1 deletions

View File

@ -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

View File

@ -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();