From 5d1a79e5bc0e23ca560d47c01cb5a7c25f43945d Mon Sep 17 00:00:00 2001 From: "ghendricks%novell.com" Date: Thu, 10 Apr 2008 20:38:59 +0000 Subject: [PATCH] Pager wasn't working for adding cases to a run. --- webtools/testopia/testopia/js/case.js | 2 +- webtools/testopia/testopia/js/run.js | 1 + webtools/testopia/testopia/js/util.js | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webtools/testopia/testopia/js/case.js b/webtools/testopia/testopia/js/case.js index de0b50a92b7..09933f29fe0 100644 --- a/webtools/testopia/testopia/js/case.js +++ b/webtools/testopia/testopia/js/case.js @@ -168,7 +168,7 @@ CaseGrid = function(params, cfg){ }); 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, { title: 'Test Cases', id: cfg.id || 'case_grid', diff --git a/webtools/testopia/testopia/js/run.js b/webtools/testopia/testopia/js/run.js index 508bc2e6086..6b3e219170a 100644 --- a/webtools/testopia/testopia/js/run.js +++ b/webtools/testopia/testopia/js/run.js @@ -989,6 +989,7 @@ AddCaseToRunForm = function(run){ params.plan_id = run.plan_id; params.exclude = run.run_id; params.status = 'CONFIRMED'; + params.limit = Ext.getCmp('case_pager').pageSize; casegrid.store.baseParams = params; casegrid.store.load(); } diff --git a/webtools/testopia/testopia/js/util.js b/webtools/testopia/testopia/js/util.js index 1942dcf2490..8e08c4f68f1 100755 --- a/webtools/testopia/testopia/js/util.js +++ b/webtools/testopia/testopia/js/util.js @@ -1040,7 +1040,11 @@ Ext.override(Ext.form.Field, { } });// End Override -var TestopiaPager = function(type, store){ +var TestopiaPager = function(type, store, cfg){ + if (! cfg){ + cfg = {}; + } + function doUpdate(){ this.updateInfo(); } @@ -1126,7 +1130,7 @@ var TestopiaPager = function(type, store){ } }); TestopiaPager.superclass.constructor.call(this,{ - id: 'testopia_pager', + id: cfg.id || 'testopia_pager', pageSize: Ext.state.Manager.get('TESTOPIA_DEFAULT_PAGE_SIZE', 25), displayInfo: true, displayMsg: 'Displaying test ' + type + 's {0} - {1} of {2}',