History state is persisted across page reloads now

This commit is contained in:
Mark McDowall 2013-12-12 22:37:37 -08:00
parent 7e20e48023
commit 7dc641b3a9
5 changed files with 22 additions and 8 deletions

View file

@ -8,9 +8,15 @@ define(
var originalInit = this.prototype.initialize;
this.prototype.initialize = function () {
this.prototype.initialize = function (options) {
if (!this.tableName) {
options = options || {};
if (options.tableName) {
this.tableName = options.tableName;
}
if (!this.tableName && !options.tableName) {
throw 'tableName is required';
}
@ -19,7 +25,7 @@ define(
this.on('backgrid:sort', _storeState, this);
if (originalInit) {
originalInit.call(this);
originalInit.call(this, options);
}
};