Pager wasn't working for adding cases to a run.

This commit is contained in:
ghendricks%novell.com 2008-04-10 20:38:59 +00:00
Родитель a11df60ca0
Коммит 5d1a79e5bc
3 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -168,7 +168,7 @@ CaseGrid = function(params, cfg){
}); });
this.form = new Ext.form.BasicForm('testopia_helper_frm', {}); this.form = new Ext.form.BasicForm('testopia_helper_frm', {});
this.bbar = new TestopiaPager('case', this.store); this.bbar = new TestopiaPager('case', this.store, {id: 'case_pager'});
CaseGrid.superclass.constructor.call(this, { CaseGrid.superclass.constructor.call(this, {
title: 'Test Cases', title: 'Test Cases',
id: cfg.id || 'case_grid', id: cfg.id || 'case_grid',

Просмотреть файл

@ -989,6 +989,7 @@ AddCaseToRunForm = function(run){
params.plan_id = run.plan_id; params.plan_id = run.plan_id;
params.exclude = run.run_id; params.exclude = run.run_id;
params.status = 'CONFIRMED'; params.status = 'CONFIRMED';
params.limit = Ext.getCmp('case_pager').pageSize;
casegrid.store.baseParams = params; casegrid.store.baseParams = params;
casegrid.store.load(); casegrid.store.load();
} }

Просмотреть файл

@ -1040,7 +1040,11 @@ Ext.override(Ext.form.Field, {
} }
});// End Override });// End Override
var TestopiaPager = function(type, store){ var TestopiaPager = function(type, store, cfg){
if (! cfg){
cfg = {};
}
function doUpdate(){ function doUpdate(){
this.updateInfo(); this.updateInfo();
} }
@ -1126,7 +1130,7 @@ var TestopiaPager = function(type, store){
} }
}); });
TestopiaPager.superclass.constructor.call(this,{ TestopiaPager.superclass.constructor.call(this,{
id: 'testopia_pager', id: cfg.id || 'testopia_pager',
pageSize: Ext.state.Manager.get('TESTOPIA_DEFAULT_PAGE_SIZE', 25), pageSize: Ext.state.Manager.get('TESTOPIA_DEFAULT_PAGE_SIZE', 25),
displayInfo: true, displayInfo: true,
displayMsg: 'Displaying test ' + type + 's {0} - {1} of {2}', displayMsg: 'Displaying test ' + type + 's {0} - {1} of {2}',