[IMP] handle url for list views
bzr revid: chs@openerp.com-20111215153134-tdwy5y8j7ktm1dzv
This commit is contained in:
parent
af2e4fe2b5
commit
160801b0e6
|
@ -459,8 +459,32 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
|
||||||
self.compute_aggregates();
|
self.compute_aggregates();
|
||||||
reloaded.resolve();
|
reloaded.resolve();
|
||||||
}));
|
}));
|
||||||
|
this.do_push_state({
|
||||||
|
page: this.page,
|
||||||
|
limit: this._limit,
|
||||||
|
});
|
||||||
return reloaded.promise();
|
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
|
* Handler for the result of eval_domain_and_context, actually perform the
|
||||||
* searching
|
* searching
|
||||||
|
|
|
@ -1067,7 +1067,6 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
|
||||||
},
|
},
|
||||||
do_show: function () {
|
do_show: function () {
|
||||||
this.$element.show();
|
this.$element.show();
|
||||||
this.do_push_state({});
|
|
||||||
},
|
},
|
||||||
do_hide: function () {
|
do_hide: function () {
|
||||||
this.$element.hide();
|
this.$element.hide();
|
||||||
|
|
Loading…
Reference in New Issue