Merged in jennydmz/processmaker/PM-605 (pull request #943)
Deleting the Creation of RT old Version. & Fixing the paginator in RT List
This commit is contained in:
@@ -42,7 +42,7 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
if ($pro_uid !== null) {
|
if ($pro_uid !== null) {
|
||||||
$process = $pro_uid == '' ? array ('not_equal' => $pro_uid
|
$process = $pro_uid == '' ? array ('not_equal' => $pro_uid
|
||||||
) : array ('equal' => $pro_uid);
|
) : array ('equal' => $pro_uid);
|
||||||
$addTables = AdditionalTables::getAll( $start, $limit, $filter, $process );
|
$addTables = AdditionalTables::getAll( false, false, $filter, $process );
|
||||||
|
|
||||||
$c = $processMap->getReportTablesCriteria( $pro_uid );
|
$c = $processMap->getReportTablesCriteria( $pro_uid );
|
||||||
$oDataset = RoutePeer::doSelectRS( $c );
|
$oDataset = RoutePeer::doSelectRS( $c );
|
||||||
@@ -51,21 +51,20 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
while ($oDataset->next()) {
|
while ($oDataset->next()) {
|
||||||
$reportTablesOldList[] = $oDataset->getRow();
|
$reportTablesOldList[] = $oDataset->getRow();
|
||||||
}
|
}
|
||||||
$addTables['count'] += count( $reportTablesOldList );
|
foreach ($reportTablesOldList as $i => $oldRepTab) {
|
||||||
|
if($filter != ''){
|
||||||
if(($start+$limit) > $addTables['count']){
|
if((stripos($oldRepTab['REP_TAB_NAME'], $filter) !== false) || (stripos($oldRepTab['REP_TAB_TITLE'], $filter) !== false)){
|
||||||
foreach ($reportTablesOldList as $i => $oldRepTab) {
|
$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' );
|
||||||
if($filter != ''){
|
}
|
||||||
$oldTableName = strtolower($oldRepTab['REP_TAB_NAME']);
|
} else {
|
||||||
$oldTableDesc = strtolower($oldRepTab['REP_TAB_TITLE']);
|
$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' );
|
||||||
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' );
|
}
|
||||||
}
|
$addTables['count'] = count($addTables['rows']);
|
||||||
} else {
|
if($start != 0){
|
||||||
$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['rows'] = array_splice($addTables['rows'], $start);
|
||||||
}
|
}
|
||||||
}
|
$addTables['rows'] = array_splice($addTables['rows'], 0, $limit);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$addTables = AdditionalTables::getAll( $start, $limit, $filter );
|
$addTables = AdditionalTables::getAll( $start, $limit, $filter );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,33 +40,43 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
pageSize = parseInt(CONFIG.pageSize);
|
pageSize = parseInt(CONFIG.pageSize);
|
||||||
|
|
||||||
var newMenuOptions = new Array();
|
|
||||||
if (PRO_UID == false) {
|
if (PRO_UID == false) {
|
||||||
|
var newMenuOptions = new Array();
|
||||||
|
|
||||||
newMenuOptions.push({
|
newMenuOptions.push({
|
||||||
text: _('ID_NEW_PMTABLE'),
|
text: _('ID_NEW_PMTABLE'),
|
||||||
handler: newPMTable
|
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;
|
var flagProcessmap = (typeof('flagProcessmap') != 'undefined') ? flagProcessmap : 0;
|
||||||
|
|
||||||
newMenuOptions.push({
|
/*if (PRO_UID !== false) {
|
||||||
text: _('ID_NEW_REPORT_TABLE'),
|
|
||||||
handler: NewReportTable
|
|
||||||
});
|
|
||||||
|
|
||||||
if (PRO_UID !== false) {
|
|
||||||
newMenuOptions.push({
|
newMenuOptions.push({
|
||||||
text: _('ID_NEW_REPORT_TABLE_OLD'),
|
text: _('ID_NEW_REPORT_TABLE_OLD'),
|
||||||
handler: NewReportTableOld
|
handler: NewReportTableOld
|
||||||
});
|
});
|
||||||
}
|
}*/
|
||||||
|
|
||||||
newButton = new Ext.Action({
|
if (PRO_UID !== false) {
|
||||||
id: 'newButton',
|
newButton = new Ext.Action({
|
||||||
text: _('ID_NEW'),
|
id: 'newButton',
|
||||||
icon: '/images/add-table.png',
|
text: _('ID_NEW'),
|
||||||
menu: newMenuOptions
|
icon: '/images/add-table.png',
|
||||||
});
|
handler: NewReportTable
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
editButton = new Ext.Action({
|
editButton = new Ext.Action({
|
||||||
id: 'editButton',
|
id: 'editButton',
|
||||||
@@ -705,12 +715,14 @@ UpdatePageConfig = function(pageSize){
|
|||||||
|
|
||||||
//Do Search Function
|
//Do Search Function
|
||||||
DoSearch = function(){
|
DoSearch = function(){
|
||||||
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||||
|
infoGrid.store.load();
|
||||||
};
|
};
|
||||||
|
|
||||||
//Load Grid By Default
|
//Load Grid By Default
|
||||||
GridByDefault = function(){
|
GridByDefault = function(){
|
||||||
searchText.reset();
|
searchText.reset();
|
||||||
|
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||||
infoGrid.store.load();
|
infoGrid.store.load();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user