3da2cabc by Adam Heath

Extract pagination values from the query string.

1 parent 22582bd1
......@@ -59,6 +59,7 @@ define(function(require) {
if (parts) {
var formNameMap = this.get('formNameMap');
var pagination = {};
var keyValueParts = parts[1].split('&');
_.each(keyValueParts, function(keyValuePart, i) {
var keyFieldValue = keyValuePart.match(/^([^.]+)(?:\.([^.]+))?=(.*)$/);
......@@ -90,9 +91,14 @@ define(function(require) {
item.set('checked', true, skipOptions);
}
}
} else if (key === 'p') {
pagination['currentPage'] = parseInt(value);
} else if (key === 'sz') {
pagination['pageSize'] = parseInt(value);
}
}
}, this);
this.set(pagination, skipOptions);
}
},
initialize: function(data, options) {
......