PM-605 Deleting the Creation of RT old Version. & Fixing the paginator in RT List

This commit is contained in:
jennylee
2014-10-16 09:51:04 -04:00
parent 24866995d1
commit 941843b767
2 changed files with 43 additions and 32 deletions

View File

@@ -51,21 +51,20 @@ class pmTablesProxy extends HttpProxyController
while ($oDataset->next()) {
$reportTablesOldList[] = $oDataset->getRow();
}
$addTables['count'] += count( $reportTablesOldList );
if(($start+$limit) > $addTables['count']){
foreach ($reportTablesOldList as $i => $oldRepTab) {
if($filter != ''){
$oldTableName = strtolower($oldRepTab['REP_TAB_NAME']);
$oldTableDesc = strtolower($oldRepTab['REP_TAB_TITLE']);
if((strpos($oldTableName, $filter) !== false) || (strpos($oldTableDesc, $filter) !== false)){
$addTables['rows'][] = array ('ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'],'PRO_UID' => $oldRepTab['PRO_UID'],'DBS_UID' => ($oldRepTab['REP_TAB_CONNECTION'] == 'wf' ? 'workflow' : 'rp'),'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'],'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'],'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'],'TYPE' => 'CLASSIC' );
}
} else {
$addTables['rows'][] = array ('ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'],'PRO_UID' => $oldRepTab['PRO_UID'],'DBS_UID' => ($oldRepTab['REP_TAB_CONNECTION'] == 'wf' ? 'workflow' : 'rp'),'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'],'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'],'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'],'TYPE' => 'CLASSIC' );
}
}
}
foreach ($reportTablesOldList as $i => $oldRepTab) {
if($filter != ''){
if((stripos($oldRepTab['REP_TAB_NAME'], $filter) !== false) || (stripos($oldRepTab['REP_TAB_TITLE'], $filter) !== false)){
$addTables['rows'][] = array ('ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'],'PRO_UID' => $oldRepTab['PRO_UID'],'DBS_UID' => ($oldRepTab['REP_TAB_CONNECTION'] == 'wf' ? 'workflow' : 'rp'),'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'],'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'],'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'],'TYPE' => 'CLASSIC' );
}
} else {
$addTables['rows'][] = array ('ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'],'PRO_UID' => $oldRepTab['PRO_UID'],'DBS_UID' => ($oldRepTab['REP_TAB_CONNECTION'] == 'wf' ? 'workflow' : 'rp'),'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'],'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'],'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'],'TYPE' => 'CLASSIC' );
}
}
$addTables['count'] = count($addTables['rows']);
if($start != 0){
$addTables['rows'] = array_splice($addTables['rows'], $start);
}
$addTables['rows'] = array_splice($addTables['rows'], 0, $limit);
} else {
$addTables = AdditionalTables::getAll( $start, $limit, $filter );
}

View File

@@ -40,33 +40,43 @@ Ext.onReady(function(){
pageSize = parseInt(CONFIG.pageSize);
var newMenuOptions = new Array();
if (PRO_UID == false) {
var newMenuOptions = new Array();
newMenuOptions.push({
text: _('ID_NEW_PMTABLE'),
handler: newPMTable
text: _('ID_NEW_PMTABLE'),
handler: newPMTable
});
newMenuOptions.push({
text: _('ID_NEW_REPORT_TABLE'),
handler: NewReportTable
});
newButton = new Ext.Action({
id: 'newButton',
text: _('ID_NEW'),
icon: '/images/add-table.png',
menu: newMenuOptions
});
}
var flagProcessmap = (typeof('flagProcessmap') != 'undefined') ? flagProcessmap : 0;
newMenuOptions.push({
text: _('ID_NEW_REPORT_TABLE'),
handler: NewReportTable
});
if (PRO_UID !== false) {
/*if (PRO_UID !== false) {
newMenuOptions.push({
text: _('ID_NEW_REPORT_TABLE_OLD'),
handler: NewReportTableOld
});
}
}*/
newButton = new Ext.Action({
id: 'newButton',
text: _('ID_NEW'),
icon: '/images/add-table.png',
menu: newMenuOptions
});
if (PRO_UID !== false) {
newButton = new Ext.Action({
id: 'newButton',
text: _('ID_NEW'),
icon: '/images/add-table.png',
handler: NewReportTable
});
}
editButton = new Ext.Action({
id: 'editButton',
@@ -705,12 +715,14 @@ UpdatePageConfig = function(pageSize){
//Do Search Function
DoSearch = function(){
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
infoGrid.store.load();
};
//Load Grid By Default
GridByDefault = function(){
searchText.reset();
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
infoGrid.store.load();
};