BUG 0000 new Feature: Report table ver 2.
This commit is contained in:
@@ -867,8 +867,12 @@ class Cases {
|
|||||||
$TAS_UID = isset($Fields['TAS_UID']) ? $Fields['TAS_UID'] : '';
|
$TAS_UID = isset($Fields['TAS_UID']) ? $Fields['TAS_UID'] : '';
|
||||||
|
|
||||||
G::LoadClass('reportTables');
|
G::LoadClass('reportTables');
|
||||||
|
require_once 'classes/model/AdditionalTables.php';
|
||||||
$oReportTables = new ReportTables();
|
$oReportTables = new ReportTables();
|
||||||
|
$addtionalTables = new additionalTables();
|
||||||
|
|
||||||
$oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
|
$oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
|
||||||
|
$addtionalTables->updateReportTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
|
||||||
|
|
||||||
//now update the priority in appdelegation table, using the defined variable in task
|
//now update the priority in appdelegation table, using the defined variable in task
|
||||||
if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') {
|
if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') {
|
||||||
|
|||||||
@@ -2270,6 +2270,8 @@ class processMap {
|
|||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->addSelectColumn(ReportTablePeer::REP_TAB_UID);
|
$oCriteria->addSelectColumn(ReportTablePeer::REP_TAB_UID);
|
||||||
$oCriteria->addSelectColumn(ReportTablePeer::PRO_UID);
|
$oCriteria->addSelectColumn(ReportTablePeer::PRO_UID);
|
||||||
|
$oCriteria->addSelectColumn(ReportTablePeer::REP_TAB_NAME);
|
||||||
|
$oCriteria->addSelectColumn(ReportTablePeer::REP_TAB_TYPE);
|
||||||
// $oCriteria->addAsColumn ( 'REP_TAB_TITLE', 'C.CON_VALUE' );
|
// $oCriteria->addAsColumn ( 'REP_TAB_TITLE', 'C.CON_VALUE' );
|
||||||
$oCriteria->addAsColumn('REP_TAB_TITLE', "CASE WHEN C.CON_VALUE IS NULL THEN (SELECT DISTINCT MAX(A.CON_VALUE) FROM CONTENT A WHERE A.CON_ID = REPORT_TABLE.REP_TAB_UID ) ELSE C.CON_VALUE END ");
|
$oCriteria->addAsColumn('REP_TAB_TITLE', "CASE WHEN C.CON_VALUE IS NULL THEN (SELECT DISTINCT MAX(A.CON_VALUE) FROM CONTENT A WHERE A.CON_ID = REPORT_TABLE.REP_TAB_UID ) ELSE C.CON_VALUE END ");
|
||||||
$oCriteria->addAlias('C', 'CONTENT');
|
$oCriteria->addAlias('C', 'CONTENT');
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -250,9 +250,9 @@ class Process extends BaseProcess {
|
|||||||
// $this->pro_title = $aFields['PRO_TITLE'];
|
// $this->pro_title = $aFields['PRO_TITLE'];
|
||||||
// $this->pro_description = $aFields['PRO_DESCRIPTION'];
|
// $this->pro_description = $aFields['PRO_DESCRIPTION'];
|
||||||
|
|
||||||
|
|
||||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||||
|
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->clearSelectColumns();
|
$c->clearSelectColumns();
|
||||||
$c->addSelectColumn(ContentPeer::CON_CATEGORY);
|
$c->addSelectColumn(ContentPeer::CON_CATEGORY);
|
||||||
@@ -297,16 +297,16 @@ class Process extends BaseProcess {
|
|||||||
$oPro->setProParent ( $oPro->getProUid() );
|
$oPro->setProParent ( $oPro->getProUid() );
|
||||||
$oPro->save();
|
$oPro->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get category Name, by default No category
|
//Get category Name, by default No category
|
||||||
$aFields['PRO_CATEGORY_LABEL']=G::LoadTranslation("ID_PROCESS_NO_CATEGORY");
|
$aFields['PRO_CATEGORY_LABEL']=G::LoadTranslation("ID_PROCESS_NO_CATEGORY");
|
||||||
if($aFields['PRO_CATEGORY']!=""){
|
if($aFields['PRO_CATEGORY']!=""){
|
||||||
$oProCat = ProcessCategoryPeer::retrieveByPk( $aFields['PRO_CATEGORY'] );
|
$oProCat = ProcessCategoryPeer::retrieveByPk( $aFields['PRO_CATEGORY'] );
|
||||||
if (is_object ($oProCat) && get_class ($oProCat) == 'ProcessCategory' ) {
|
if (is_object ($oProCat) && get_class ($oProCat) == 'ProcessCategory' ) {
|
||||||
$aFields['PRO_CATEGORY_LABEL']=$oProCat->getCategoryName();
|
$aFields['PRO_CATEGORY_LABEL']=$oProCat->getCategoryName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -319,10 +319,62 @@ class Process extends BaseProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getAll($getAllLang=false) {
|
function getAll() {
|
||||||
|
|
||||||
|
$oCriteria = new Criteria('workflow');
|
||||||
|
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_UID );
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_PARENT );
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_STATUS );
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY );
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_DATE );
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_USER );
|
||||||
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_DEBUG );
|
||||||
|
|
||||||
|
$oCriteria->add(ProcessPeer::PRO_UID, '', Criteria::NOT_EQUAL);
|
||||||
|
$oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
|
||||||
|
|
||||||
|
//execute the query
|
||||||
|
$oDataset = ProcessPeer::doSelectRS ( $oCriteria );
|
||||||
|
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$processes = Array();
|
||||||
|
$uids=array();
|
||||||
|
while( $oDataset->next() ) {
|
||||||
|
$processes[] = $oDataset->getRow();
|
||||||
|
$uids[] = $processes[sizeof($processes)-1]['PRO_UID'];
|
||||||
|
}
|
||||||
|
//process details will have the info about the processes
|
||||||
|
$processesDetails = Array();
|
||||||
|
|
||||||
|
//now get the labels for all process, using an array of Uids,
|
||||||
$c = new Criteria('workflow');
|
$c = new Criteria('workflow');
|
||||||
|
//$c->add ( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
|
||||||
|
$c->add ( ContentPeer::CON_LANG, defined('SYS_LANG')?SYS_LANG:'en', Criteria::EQUAL );
|
||||||
|
$c->add ( ContentPeer::CON_ID, $uids, Criteria::IN );
|
||||||
|
|
||||||
|
$dt = ContentPeer::doSelectRS ($c);
|
||||||
|
$dt->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
|
while( $dt->next() ) {
|
||||||
|
$row = $dt->getRow();
|
||||||
|
$processesDetails[$row['CON_ID']] [$row['CON_CATEGORY']] = $row['CON_VALUE'];
|
||||||
|
}
|
||||||
|
|
||||||
|
G::loadClass('configuration');
|
||||||
|
$oConf = new Configurations;
|
||||||
|
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
||||||
|
|
||||||
|
foreach( $processes as $i=>$process ) {
|
||||||
|
$processes[$i]['PRO_TITLE'] = $processes[$i]['PRO_DESCRIPTION'] = '';
|
||||||
|
|
||||||
|
if (isset($processesDetails[$process['PRO_UID']]['PRO_TITLE']))
|
||||||
|
$processes[$i]['PRO_TITLE'] = $processesDetails[$process['PRO_UID']]['PRO_TITLE'];
|
||||||
|
|
||||||
|
if (isset($processesDetails[$process['PRO_UID']]))
|
||||||
|
$processes[$i]['PRO_DESCRIPTION'] = $processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $processes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -457,7 +509,7 @@ class Process extends BaseProcess {
|
|||||||
$oPro = ProcessPeer::retrieveByPk( $ProUid );
|
$oPro = ProcessPeer::retrieveByPk( $ProUid );
|
||||||
return (is_object ($oPro) && get_class ($oPro) == 'Process' );
|
return (is_object ($oPro) && get_class ($oPro) == 'Process' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function existsByProTitle($PRO_TITLE)
|
public function existsByProTitle($PRO_TITLE)
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
@@ -469,10 +521,10 @@ class Process extends BaseProcess {
|
|||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
|
|
||||||
return $aRow['PROCESS'] ? true : false;
|
return $aRow['PROCESS'] ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//new functions
|
//new functions
|
||||||
function getAllProcessesCount(){
|
function getAllProcessesCount(){
|
||||||
$c = $this->tmpCriteria;
|
$c = $this->tmpCriteria;
|
||||||
@@ -497,67 +549,61 @@ class Process extends BaseProcess {
|
|||||||
$aProcesses = Array();
|
$aProcesses = Array();
|
||||||
$categories = Array();
|
$categories = Array();
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
|
|
||||||
//$oCriteria->addSelectColumn(ProcessPeer::TABLE_NAME . '.*');
|
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_UID );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_UID );
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_PARENT );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_PARENT );
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_STATUS );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_STATUS );
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY );
|
||||||
//$oCriteria->addSelectColumn(ProcessPeer::PRO_SUB_CATEGORY);
|
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_DATE );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_DATE );
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_USER );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_USER );
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_DEBUG );
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_DEBUG );
|
||||||
|
|
||||||
//$oCriteria->addSelectColumn(UsersPeer::TABLE_NAME . '.*');
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID );
|
$oCriteria->addSelectColumn(UsersPeer::USR_UID );
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME );
|
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME );
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME );
|
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME );
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME );
|
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME );
|
||||||
|
|
||||||
//$oCriteria->addSelectColumn(ProcessCategoryPeer::TABLE_NAME . '.*');
|
|
||||||
$oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID );
|
$oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID );
|
||||||
$oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME );
|
$oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME );
|
||||||
|
|
||||||
$oCriteria->add(ProcessPeer::PRO_UID, '', Criteria::NOT_EQUAL);
|
$oCriteria->add(ProcessPeer::PRO_UID, '', Criteria::NOT_EQUAL);
|
||||||
$oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
|
$oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
|
||||||
|
|
||||||
if( isset($category) )
|
if( isset($category) )
|
||||||
$oCriteria->add(ProcessPeer::PRO_CATEGORY, $category, Criteria::EQUAL);
|
$oCriteria->add(ProcessPeer::PRO_CATEGORY, $category, Criteria::EQUAL);
|
||||||
|
|
||||||
$oCriteria->addJoin(ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
$oCriteria->addJoin(ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||||
$oCriteria->addJoin(ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN);
|
$oCriteria->addJoin(ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN);
|
||||||
//$oCriteria->addDescendingOrderByColumn(ProcessPeer::PRO_CREATE_DATE);
|
|
||||||
|
|
||||||
$this->tmpCriteria = clone $oCriteria;
|
$this->tmpCriteria = clone $oCriteria;
|
||||||
|
|
||||||
if($start != '')
|
if($start != '')
|
||||||
$oCriteria->setOffset($start);
|
$oCriteria->setOffset($start);
|
||||||
if($limit != '' && !isset($category) && !isset($processName))
|
if($limit != '' && !isset($category) && !isset($processName))
|
||||||
$oCriteria->setLimit($limit);
|
$oCriteria->setLimit($limit);
|
||||||
|
|
||||||
//execute a query to obtain numbers, how many cases there are by process
|
//execute a query to obtain numbers, how many cases there are by process
|
||||||
$casesCnt = $this->getCasesCountInAllProcesses();
|
$casesCnt = $this->getCasesCountInAllProcesses();
|
||||||
|
|
||||||
//execute the query
|
//execute the query
|
||||||
|
|
||||||
$oDataset = ProcessPeer::doSelectRS ( $oCriteria );
|
$oDataset = ProcessPeer::doSelectRS ( $oCriteria );
|
||||||
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
$processes = Array();
|
$processes = Array();
|
||||||
$uids=array();
|
$uids=array();
|
||||||
while( $oDataset->next() ) {
|
while( $oDataset->next() ) {
|
||||||
$processes[] = $oDataset->getRow();
|
$processes[] = $oDataset->getRow();
|
||||||
$uids[] = $processes[sizeof($processes)-1]['PRO_UID'];
|
$uids[] = $processes[sizeof($processes)-1]['PRO_UID'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//process details will have the info about the processes
|
//process details will have the info about the processes
|
||||||
$processesDetails = Array();
|
$processesDetails = Array();
|
||||||
|
|
||||||
//now get the labels for all process, using an array of Uids,
|
//now get the labels for all process, using an array of Uids,
|
||||||
$c = new Criteria('workflow');
|
$c = new Criteria('workflow');
|
||||||
//$c->add ( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
|
//$c->add ( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
|
||||||
$c->add ( ContentPeer::CON_LANG, defined('SYS_LANG')?SYS_LANG:'en', Criteria::EQUAL );
|
$c->add ( ContentPeer::CON_LANG, defined('SYS_LANG')?SYS_LANG:'en', Criteria::EQUAL );
|
||||||
$c->add ( ContentPeer::CON_ID, $uids, Criteria::IN );
|
$c->add ( ContentPeer::CON_ID, $uids, Criteria::IN );
|
||||||
|
|
||||||
$dt = ContentPeer::doSelectRS ($c);
|
$dt = ContentPeer::doSelectRS ($c);
|
||||||
$dt->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$dt->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
@@ -577,11 +623,11 @@ class Process extends BaseProcess {
|
|||||||
// verify if the title is already set on the current language
|
// verify if the title is already set on the current language
|
||||||
if ( trim($proTitle) == '') {
|
if ( trim($proTitle) == '') {
|
||||||
// if not, then load the record to generate content for current language
|
// if not, then load the record to generate content for current language
|
||||||
$proData = $this->load($process['PRO_UID']);
|
$proData = $this->load($process['PRO_UID']);
|
||||||
$proTitle = $proData['PRO_TITLE'];
|
$proTitle = $proData['PRO_TITLE'];
|
||||||
$proDescription = $proData['PRO_DESCRIPTION'];
|
$proDescription = $proData['PRO_DESCRIPTION'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//filtering by $processName
|
//filtering by $processName
|
||||||
if( isset($processName) && $processName != '' && stripos($proTitle, $processName) === false){
|
if( isset($processName) && $processName != '' && stripos($proTitle, $processName) === false){
|
||||||
continue;
|
continue;
|
||||||
@@ -597,13 +643,12 @@ class Process extends BaseProcess {
|
|||||||
//get user format from configuration
|
//get user format from configuration
|
||||||
$userOwner = isset($oConf->aConfig['format'])? $oConf->aConfig['format']: '';
|
$userOwner = isset($oConf->aConfig['format'])? $oConf->aConfig['format']: '';
|
||||||
$creationDateMask = isset($oConf->aConfig['dateFormat'])? $oConf->aConfig['dateFormat']: '';
|
$creationDateMask = isset($oConf->aConfig['dateFormat'])? $oConf->aConfig['dateFormat']: '';
|
||||||
|
if( $userOwner != '' ) {
|
||||||
if( $userOwner != '' ){
|
$userOwner = str_replace('@userName', $process['USR_USERNAME'], $userOwner);
|
||||||
$userOwner = str_replace('@userName', $process['USR_USERNAME'], $userOwner);
|
|
||||||
$userOwner = str_replace('@firstName', $process['USR_FIRSTNAME'], $userOwner);
|
$userOwner = str_replace('@firstName', $process['USR_FIRSTNAME'], $userOwner);
|
||||||
$userOwner = str_replace('@lastName', $process['USR_LASTNAME'], $userOwner);
|
$userOwner = str_replace('@lastName', $process['USR_LASTNAME'], $userOwner);
|
||||||
if ( $userOwner == " ( )" ) $userOwner = '-';
|
if ( $userOwner == " ( )" ) $userOwner = '-';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$userOwner = $process['USR_FIRSTNAME'].' '.$process['USR_LASTNAME'];
|
$userOwner = $process['USR_FIRSTNAME'].' '.$process['USR_LASTNAME'];
|
||||||
}
|
}
|
||||||
@@ -611,11 +656,11 @@ class Process extends BaseProcess {
|
|||||||
//get date format from configuration
|
//get date format from configuration
|
||||||
if( $creationDateMask != '' ){
|
if( $creationDateMask != '' ){
|
||||||
list($date, $time) = explode(' ', $process['PRO_CREATE_DATE']);
|
list($date, $time) = explode(' ', $process['PRO_CREATE_DATE']);
|
||||||
list($y, $m, $d) = explode('-', $date);
|
list($y, $m, $d) = explode('-', $date);
|
||||||
list($h, $i, $s) = explode(':', $time);
|
list($h, $i, $s) = explode(':', $time);
|
||||||
|
|
||||||
$process['PRO_CREATE_DATE'] = date($creationDateMask, mktime($h, $i, $s, $m, $d, $y));
|
$process['PRO_CREATE_DATE'] = date($creationDateMask, mktime($h, $i, $s, $m, $d, $y));
|
||||||
}
|
}
|
||||||
|
|
||||||
$process['PRO_CATEGORY_LABEL'] = trim($process['PRO_CATEGORY']) != ''? $process['CATEGORY_NAME']: G::LoadTranslation('ID_PROCESS_NO_CATEGORY');
|
$process['PRO_CATEGORY_LABEL'] = trim($process['PRO_CATEGORY']) != ''? $process['CATEGORY_NAME']: G::LoadTranslation('ID_PROCESS_NO_CATEGORY');
|
||||||
$process['PRO_TITLE'] = $proTitle;
|
$process['PRO_TITLE'] = $proTitle;
|
||||||
@@ -624,18 +669,18 @@ class Process extends BaseProcess {
|
|||||||
$process['PRO_DEBUG_LABEL'] = ($process['PRO_DEBUG']=="1")? G::LoadTranslation('ID_ON'): G::LoadTranslation('ID_OFF');
|
$process['PRO_DEBUG_LABEL'] = ($process['PRO_DEBUG']=="1")? G::LoadTranslation('ID_ON'): G::LoadTranslation('ID_OFF');
|
||||||
$process['PRO_STATUS_LABEL'] = $process ['PRO_STATUS'] == 'ACTIVE'? G::LoadTranslation ('ID_ACTIVE'): G::LoadTranslation('ID_INACTIVE');
|
$process['PRO_STATUS_LABEL'] = $process ['PRO_STATUS'] == 'ACTIVE'? G::LoadTranslation ('ID_ACTIVE'): G::LoadTranslation('ID_INACTIVE');
|
||||||
$process['PRO_CREATE_USER_LABEL'] = $userOwner;
|
$process['PRO_CREATE_USER_LABEL'] = $userOwner;
|
||||||
$process['CASES_COUNT_TO_DO'] = (isset($casesCnt[$process['PRO_UID']]['TO_DO'])? $casesCnt[$process['PRO_UID']]['TO_DO']: 0);
|
$process['CASES_COUNT_TO_DO'] = (isset($casesCnt[$process['PRO_UID']]['TO_DO'])? $casesCnt[$process['PRO_UID']]['TO_DO']: 0);
|
||||||
$process['CASES_COUNT_COMPLETED'] = (isset($casesCnt[$process['PRO_UID']]['COMPLETED'])? $casesCnt[$process['PRO_UID']]['COMPLETED']: 0);
|
$process['CASES_COUNT_COMPLETED'] = (isset($casesCnt[$process['PRO_UID']]['COMPLETED'])? $casesCnt[$process['PRO_UID']]['COMPLETED']: 0);
|
||||||
$process['CASES_COUNT_DRAFT'] = (isset($casesCnt[$process['PRO_UID']]['DRAFT'])? $casesCnt[$process['PRO_UID']]['DRAFT']: 0);
|
$process['CASES_COUNT_DRAFT'] = (isset($casesCnt[$process['PRO_UID']]['DRAFT'])? $casesCnt[$process['PRO_UID']]['DRAFT']: 0);
|
||||||
$process['CASES_COUNT_CANCELLED'] = (isset($casesCnt[$process['PRO_UID']]['CANCELLED'])? $casesCnt[$process['PRO_UID']]['CANCELLED']: 0);
|
$process['CASES_COUNT_CANCELLED'] = (isset($casesCnt[$process['PRO_UID']]['CANCELLED'])? $casesCnt[$process['PRO_UID']]['CANCELLED']: 0);
|
||||||
$process['CASES_COUNT'] = $casesCountTotal;
|
$process['CASES_COUNT'] = $casesCountTotal;
|
||||||
|
|
||||||
unset( $process['PRO_CREATE_USER']);
|
unset( $process['PRO_CREATE_USER']);
|
||||||
|
|
||||||
$aProcesses[] = $process;
|
$aProcesses[] = $process;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
usort($aProcesses, 'ordProcessByProTitle');
|
usort($aProcesses, 'ordProcessByProTitle');
|
||||||
return $aProcesses;
|
return $aProcesses;
|
||||||
}
|
}
|
||||||
@@ -663,11 +708,11 @@ class Process extends BaseProcess {
|
|||||||
}
|
}
|
||||||
return $aProcesses;
|
return $aProcesses;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllProcessesByCategory(){
|
function getAllProcessesByCategory(){
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
$oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||||
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
|
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
|
||||||
$oCriteria->addGroupByColumn(ProcessPeer::PRO_CATEGORY);
|
$oCriteria->addGroupByColumn(ProcessPeer::PRO_CATEGORY);
|
||||||
$oDataSet = ProcessPeer::doSelectRS($oCriteria);
|
$oDataSet = ProcessPeer::doSelectRS($oCriteria);
|
||||||
$oDataSet->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataSet->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
@@ -678,20 +723,20 @@ class Process extends BaseProcess {
|
|||||||
}
|
}
|
||||||
return $aProc;
|
return $aProc;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Process
|
} // Process
|
||||||
|
|
||||||
function ordProcessByProTitle($a, $b){
|
function ordProcessByProTitle($a, $b){
|
||||||
|
|
||||||
if ($a['PRO_TITLE']>$b['PRO_TITLE']) {
|
if ($a['PRO_TITLE']>$b['PRO_TITLE']) {
|
||||||
return 1;
|
return 1;
|
||||||
} elseif ($a['PRO_TITLE']<$b['PRO_TITLE']) {
|
} elseif ($a['PRO_TITLE']<$b['PRO_TITLE']) {
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,24 +70,30 @@ class AdditionalTablesMapBuilder {
|
|||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_CLASS_NAME', 'AddTabClassName', 'string', CreoleTypes::VARCHAR, true, 100);
|
$tMap->addColumn('ADD_TAB_CLASS_NAME', 'AddTabClassName', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_DESCRIPTION', 'AddTabDescription', 'string', CreoleTypes::LONGVARCHAR, true, null);
|
$tMap->addColumn('ADD_TAB_DESCRIPTION', 'AddTabDescription', 'string', CreoleTypes::LONGVARCHAR, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_SDW_LOG_INSERT', 'AddTabSdwLogInsert', 'int', CreoleTypes::TINYINT, true, null);
|
$tMap->addColumn('ADD_TAB_SDW_LOG_INSERT', 'AddTabSdwLogInsert', 'int', CreoleTypes::TINYINT, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_SDW_LOG_UPDATE', 'AddTabSdwLogUpdate', 'int', CreoleTypes::TINYINT, true, null);
|
$tMap->addColumn('ADD_TAB_SDW_LOG_UPDATE', 'AddTabSdwLogUpdate', 'int', CreoleTypes::TINYINT, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_SDW_LOG_DELETE', 'AddTabSdwLogDelete', 'int', CreoleTypes::TINYINT, true, null);
|
$tMap->addColumn('ADD_TAB_SDW_LOG_DELETE', 'AddTabSdwLogDelete', 'int', CreoleTypes::TINYINT, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_SDW_LOG_SELECT', 'AddTabSdwLogSelect', 'int', CreoleTypes::TINYINT, true, null);
|
$tMap->addColumn('ADD_TAB_SDW_LOG_SELECT', 'AddTabSdwLogSelect', 'int', CreoleTypes::TINYINT, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_SDW_MAX_LENGTH', 'AddTabSdwMaxLength', 'int', CreoleTypes::INTEGER, true, null);
|
$tMap->addColumn('ADD_TAB_SDW_MAX_LENGTH', 'AddTabSdwMaxLength', 'int', CreoleTypes::INTEGER, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_SDW_AUTO_DELETE', 'AddTabSdwAutoDelete', 'int', CreoleTypes::TINYINT, true, null);
|
$tMap->addColumn('ADD_TAB_SDW_AUTO_DELETE', 'AddTabSdwAutoDelete', 'int', CreoleTypes::TINYINT, false, null);
|
||||||
|
|
||||||
$tMap->addColumn('ADD_TAB_PLG_UID', 'AddTabPlgUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addColumn('ADD_TAB_PLG_UID', 'AddTabPlgUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||||
|
|
||||||
$tMap->addColumn('DBS_UID', 'DbsUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
$tMap->addColumn('DBS_UID', 'DbsUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('ADD_TAB_TYPE', 'AddTabType', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('ADD_TAB_GRID', 'AddTabGrid', 'string', CreoleTypes::VARCHAR, false, 256);
|
||||||
|
|
||||||
} // doBuild()
|
} // doBuild()
|
||||||
|
|
||||||
} // AdditionalTablesMapBuilder
|
} // AdditionalTablesMapBuilder
|
||||||
|
|||||||
@@ -88,6 +88,12 @@ class FieldsMapBuilder {
|
|||||||
|
|
||||||
$tMap->addColumn('FLD_FOREIGN_KEY_TABLE', 'FldForeignKeyTable', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addColumn('FLD_FOREIGN_KEY_TABLE', 'FldForeignKeyTable', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('FLD_DYN_NAME', 'FldDynName', 'string', CreoleTypes::VARCHAR, false, 128);
|
||||||
|
|
||||||
|
$tMap->addColumn('FLD_DYN_UID', 'FldDynUid', 'string', CreoleTypes::VARCHAR, false, 128);
|
||||||
|
|
||||||
|
$tMap->addColumn('FLD_FILTER', 'FldFilter', 'int', CreoleTypes::TINYINT, false, null);
|
||||||
|
|
||||||
} // doBuild()
|
} // doBuild()
|
||||||
|
|
||||||
} // FieldsMapBuilder
|
} // FieldsMapBuilder
|
||||||
|
|||||||
@@ -60,21 +60,21 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
* The value for the add_tab_sdw_log_insert field.
|
* The value for the add_tab_sdw_log_insert field.
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $add_tab_sdw_log_insert = 1;
|
protected $add_tab_sdw_log_insert = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the add_tab_sdw_log_update field.
|
* The value for the add_tab_sdw_log_update field.
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $add_tab_sdw_log_update = 1;
|
protected $add_tab_sdw_log_update = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the add_tab_sdw_log_delete field.
|
* The value for the add_tab_sdw_log_delete field.
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $add_tab_sdw_log_delete = 1;
|
protected $add_tab_sdw_log_delete = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,7 +88,7 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
* The value for the add_tab_sdw_max_length field.
|
* The value for the add_tab_sdw_max_length field.
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $add_tab_sdw_max_length = -1;
|
protected $add_tab_sdw_max_length = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,7 +109,28 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
* The value for the dbs_uid field.
|
* The value for the dbs_uid field.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $dbs_uid = '0';
|
protected $dbs_uid = '';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the pro_uid field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $pro_uid = '';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the add_tab_type field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $add_tab_type = '';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the add_tab_grid field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $add_tab_grid = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
@@ -257,6 +278,39 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
return $this->dbs_uid;
|
return $this->dbs_uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [pro_uid] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getProUid()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->pro_uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [add_tab_type] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getAddTabType()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->add_tab_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [add_tab_grid] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getAddTabGrid()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->add_tab_grid;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [add_tab_uid] column.
|
* Set the value of [add_tab_uid] column.
|
||||||
*
|
*
|
||||||
@@ -360,7 +414,7 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
$v = (int) $v;
|
$v = (int) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->add_tab_sdw_log_insert !== $v || $v === 1) {
|
if ($this->add_tab_sdw_log_insert !== $v || $v === 0) {
|
||||||
$this->add_tab_sdw_log_insert = $v;
|
$this->add_tab_sdw_log_insert = $v;
|
||||||
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT;
|
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT;
|
||||||
}
|
}
|
||||||
@@ -382,7 +436,7 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
$v = (int) $v;
|
$v = (int) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->add_tab_sdw_log_update !== $v || $v === 1) {
|
if ($this->add_tab_sdw_log_update !== $v || $v === 0) {
|
||||||
$this->add_tab_sdw_log_update = $v;
|
$this->add_tab_sdw_log_update = $v;
|
||||||
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE;
|
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE;
|
||||||
}
|
}
|
||||||
@@ -404,7 +458,7 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
$v = (int) $v;
|
$v = (int) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->add_tab_sdw_log_delete !== $v || $v === 1) {
|
if ($this->add_tab_sdw_log_delete !== $v || $v === 0) {
|
||||||
$this->add_tab_sdw_log_delete = $v;
|
$this->add_tab_sdw_log_delete = $v;
|
||||||
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE;
|
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE;
|
||||||
}
|
}
|
||||||
@@ -448,7 +502,7 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
$v = (int) $v;
|
$v = (int) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->add_tab_sdw_max_length !== $v || $v === -1) {
|
if ($this->add_tab_sdw_max_length !== $v || $v === 0) {
|
||||||
$this->add_tab_sdw_max_length = $v;
|
$this->add_tab_sdw_max_length = $v;
|
||||||
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH;
|
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH;
|
||||||
}
|
}
|
||||||
@@ -514,13 +568,79 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
$v = (string) $v;
|
$v = (string) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->dbs_uid !== $v || $v === '0') {
|
if ($this->dbs_uid !== $v || $v === '') {
|
||||||
$this->dbs_uid = $v;
|
$this->dbs_uid = $v;
|
||||||
$this->modifiedColumns[] = AdditionalTablesPeer::DBS_UID;
|
$this->modifiedColumns[] = AdditionalTablesPeer::DBS_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setDbsUid()
|
} // setDbsUid()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [pro_uid] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setProUid($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->pro_uid !== $v || $v === '') {
|
||||||
|
$this->pro_uid = $v;
|
||||||
|
$this->modifiedColumns[] = AdditionalTablesPeer::PRO_UID;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setProUid()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [add_tab_type] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setAddTabType($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->add_tab_type !== $v || $v === '') {
|
||||||
|
$this->add_tab_type = $v;
|
||||||
|
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setAddTabType()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [add_tab_grid] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setAddTabGrid($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->add_tab_grid !== $v || $v === '') {
|
||||||
|
$this->add_tab_grid = $v;
|
||||||
|
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_GRID;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setAddTabGrid()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hydrates (populates) the object variables with values from the database resultset.
|
* Hydrates (populates) the object variables with values from the database resultset.
|
||||||
*
|
*
|
||||||
@@ -562,12 +682,18 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
|
|
||||||
$this->dbs_uid = $rs->getString($startcol + 11);
|
$this->dbs_uid = $rs->getString($startcol + 11);
|
||||||
|
|
||||||
|
$this->pro_uid = $rs->getString($startcol + 12);
|
||||||
|
|
||||||
|
$this->add_tab_type = $rs->getString($startcol + 13);
|
||||||
|
|
||||||
|
$this->add_tab_grid = $rs->getString($startcol + 14);
|
||||||
|
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
|
||||||
// FIXME - using NUM_COLUMNS may be clearer.
|
// FIXME - using NUM_COLUMNS may be clearer.
|
||||||
return $startcol + 12; // 12 = AdditionalTablesPeer::NUM_COLUMNS - AdditionalTablesPeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 15; // 15 = AdditionalTablesPeer::NUM_COLUMNS - AdditionalTablesPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating AdditionalTables object", $e);
|
throw new PropelException("Error populating AdditionalTables object", $e);
|
||||||
@@ -806,6 +932,15 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
case 11:
|
case 11:
|
||||||
return $this->getDbsUid();
|
return $this->getDbsUid();
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
return $this->getProUid();
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
return $this->getAddTabType();
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
return $this->getAddTabGrid();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
@@ -838,6 +973,9 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
$keys[9] => $this->getAddTabSdwAutoDelete(),
|
$keys[9] => $this->getAddTabSdwAutoDelete(),
|
||||||
$keys[10] => $this->getAddTabPlgUid(),
|
$keys[10] => $this->getAddTabPlgUid(),
|
||||||
$keys[11] => $this->getDbsUid(),
|
$keys[11] => $this->getDbsUid(),
|
||||||
|
$keys[12] => $this->getProUid(),
|
||||||
|
$keys[13] => $this->getAddTabType(),
|
||||||
|
$keys[14] => $this->getAddTabGrid(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -905,6 +1043,15 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
case 11:
|
case 11:
|
||||||
$this->setDbsUid($value);
|
$this->setDbsUid($value);
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
$this->setProUid($value);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
$this->setAddTabType($value);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
$this->setAddTabGrid($value);
|
||||||
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -940,6 +1087,9 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
if (array_key_exists($keys[9], $arr)) $this->setAddTabSdwAutoDelete($arr[$keys[9]]);
|
if (array_key_exists($keys[9], $arr)) $this->setAddTabSdwAutoDelete($arr[$keys[9]]);
|
||||||
if (array_key_exists($keys[10], $arr)) $this->setAddTabPlgUid($arr[$keys[10]]);
|
if (array_key_exists($keys[10], $arr)) $this->setAddTabPlgUid($arr[$keys[10]]);
|
||||||
if (array_key_exists($keys[11], $arr)) $this->setDbsUid($arr[$keys[11]]);
|
if (array_key_exists($keys[11], $arr)) $this->setDbsUid($arr[$keys[11]]);
|
||||||
|
if (array_key_exists($keys[12], $arr)) $this->setProUid($arr[$keys[12]]);
|
||||||
|
if (array_key_exists($keys[13], $arr)) $this->setAddTabType($arr[$keys[13]]);
|
||||||
|
if (array_key_exists($keys[14], $arr)) $this->setAddTabGrid($arr[$keys[14]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -963,6 +1113,9 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE)) $criteria->add(AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE, $this->add_tab_sdw_auto_delete);
|
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE)) $criteria->add(AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE, $this->add_tab_sdw_auto_delete);
|
||||||
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_PLG_UID)) $criteria->add(AdditionalTablesPeer::ADD_TAB_PLG_UID, $this->add_tab_plg_uid);
|
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_PLG_UID)) $criteria->add(AdditionalTablesPeer::ADD_TAB_PLG_UID, $this->add_tab_plg_uid);
|
||||||
if ($this->isColumnModified(AdditionalTablesPeer::DBS_UID)) $criteria->add(AdditionalTablesPeer::DBS_UID, $this->dbs_uid);
|
if ($this->isColumnModified(AdditionalTablesPeer::DBS_UID)) $criteria->add(AdditionalTablesPeer::DBS_UID, $this->dbs_uid);
|
||||||
|
if ($this->isColumnModified(AdditionalTablesPeer::PRO_UID)) $criteria->add(AdditionalTablesPeer::PRO_UID, $this->pro_uid);
|
||||||
|
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_TYPE)) $criteria->add(AdditionalTablesPeer::ADD_TAB_TYPE, $this->add_tab_type);
|
||||||
|
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_GRID)) $criteria->add(AdditionalTablesPeer::ADD_TAB_GRID, $this->add_tab_grid);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -1039,6 +1192,12 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent {
|
|||||||
|
|
||||||
$copyObj->setDbsUid($this->dbs_uid);
|
$copyObj->setDbsUid($this->dbs_uid);
|
||||||
|
|
||||||
|
$copyObj->setProUid($this->pro_uid);
|
||||||
|
|
||||||
|
$copyObj->setAddTabType($this->add_tab_type);
|
||||||
|
|
||||||
|
$copyObj->setAddTabGrid($this->add_tab_grid);
|
||||||
|
|
||||||
|
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ abstract class BaseAdditionalTablesPeer {
|
|||||||
const CLASS_DEFAULT = 'classes.model.AdditionalTables';
|
const CLASS_DEFAULT = 'classes.model.AdditionalTables';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 12;
|
const NUM_COLUMNS = 15;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
@@ -66,6 +66,15 @@ abstract class BaseAdditionalTablesPeer {
|
|||||||
/** the column name for the DBS_UID field */
|
/** the column name for the DBS_UID field */
|
||||||
const DBS_UID = 'ADDITIONAL_TABLES.DBS_UID';
|
const DBS_UID = 'ADDITIONAL_TABLES.DBS_UID';
|
||||||
|
|
||||||
|
/** the column name for the PRO_UID field */
|
||||||
|
const PRO_UID = 'ADDITIONAL_TABLES.PRO_UID';
|
||||||
|
|
||||||
|
/** the column name for the ADD_TAB_TYPE field */
|
||||||
|
const ADD_TAB_TYPE = 'ADDITIONAL_TABLES.ADD_TAB_TYPE';
|
||||||
|
|
||||||
|
/** the column name for the ADD_TAB_GRID field */
|
||||||
|
const ADD_TAB_GRID = 'ADDITIONAL_TABLES.ADD_TAB_GRID';
|
||||||
|
|
||||||
/** The PHP to DB Name Mapping */
|
/** The PHP to DB Name Mapping */
|
||||||
private static $phpNameMap = null;
|
private static $phpNameMap = null;
|
||||||
|
|
||||||
@@ -77,10 +86,10 @@ abstract class BaseAdditionalTablesPeer {
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('AddTabUid', 'AddTabName', 'AddTabClassName', 'AddTabDescription', 'AddTabSdwLogInsert', 'AddTabSdwLogUpdate', 'AddTabSdwLogDelete', 'AddTabSdwLogSelect', 'AddTabSdwMaxLength', 'AddTabSdwAutoDelete', 'AddTabPlgUid', 'DbsUid', ),
|
BasePeer::TYPE_PHPNAME => array ('AddTabUid', 'AddTabName', 'AddTabClassName', 'AddTabDescription', 'AddTabSdwLogInsert', 'AddTabSdwLogUpdate', 'AddTabSdwLogDelete', 'AddTabSdwLogSelect', 'AddTabSdwMaxLength', 'AddTabSdwAutoDelete', 'AddTabPlgUid', 'DbsUid', 'ProUid', 'AddTabType', 'AddTabGrid', ),
|
||||||
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID, AdditionalTablesPeer::ADD_TAB_NAME, AdditionalTablesPeer::ADD_TAB_CLASS_NAME, AdditionalTablesPeer::ADD_TAB_DESCRIPTION, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE, AdditionalTablesPeer::ADD_TAB_PLG_UID, AdditionalTablesPeer::DBS_UID, ),
|
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID, AdditionalTablesPeer::ADD_TAB_NAME, AdditionalTablesPeer::ADD_TAB_CLASS_NAME, AdditionalTablesPeer::ADD_TAB_DESCRIPTION, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE, AdditionalTablesPeer::ADD_TAB_PLG_UID, AdditionalTablesPeer::DBS_UID, AdditionalTablesPeer::PRO_UID, AdditionalTablesPeer::ADD_TAB_TYPE, AdditionalTablesPeer::ADD_TAB_GRID, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID', 'ADD_TAB_NAME', 'ADD_TAB_CLASS_NAME', 'ADD_TAB_DESCRIPTION', 'ADD_TAB_SDW_LOG_INSERT', 'ADD_TAB_SDW_LOG_UPDATE', 'ADD_TAB_SDW_LOG_DELETE', 'ADD_TAB_SDW_LOG_SELECT', 'ADD_TAB_SDW_MAX_LENGTH', 'ADD_TAB_SDW_AUTO_DELETE', 'ADD_TAB_PLG_UID', 'DBS_UID', ),
|
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID', 'ADD_TAB_NAME', 'ADD_TAB_CLASS_NAME', 'ADD_TAB_DESCRIPTION', 'ADD_TAB_SDW_LOG_INSERT', 'ADD_TAB_SDW_LOG_UPDATE', 'ADD_TAB_SDW_LOG_DELETE', 'ADD_TAB_SDW_LOG_SELECT', 'ADD_TAB_SDW_MAX_LENGTH', 'ADD_TAB_SDW_AUTO_DELETE', 'ADD_TAB_PLG_UID', 'DBS_UID', 'PRO_UID', 'ADD_TAB_TYPE', 'ADD_TAB_GRID', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,10 +99,10 @@ abstract class BaseAdditionalTablesPeer {
|
|||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('AddTabUid' => 0, 'AddTabName' => 1, 'AddTabClassName' => 2, 'AddTabDescription' => 3, 'AddTabSdwLogInsert' => 4, 'AddTabSdwLogUpdate' => 5, 'AddTabSdwLogDelete' => 6, 'AddTabSdwLogSelect' => 7, 'AddTabSdwMaxLength' => 8, 'AddTabSdwAutoDelete' => 9, 'AddTabPlgUid' => 10, 'DbsUid' => 11, ),
|
BasePeer::TYPE_PHPNAME => array ('AddTabUid' => 0, 'AddTabName' => 1, 'AddTabClassName' => 2, 'AddTabDescription' => 3, 'AddTabSdwLogInsert' => 4, 'AddTabSdwLogUpdate' => 5, 'AddTabSdwLogDelete' => 6, 'AddTabSdwLogSelect' => 7, 'AddTabSdwMaxLength' => 8, 'AddTabSdwAutoDelete' => 9, 'AddTabPlgUid' => 10, 'DbsUid' => 11, 'ProUid' => 12, 'AddTabType' => 13, 'AddTabGrid' => 14, ),
|
||||||
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID => 0, AdditionalTablesPeer::ADD_TAB_NAME => 1, AdditionalTablesPeer::ADD_TAB_CLASS_NAME => 2, AdditionalTablesPeer::ADD_TAB_DESCRIPTION => 3, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT => 4, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE => 5, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE => 6, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT => 7, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH => 8, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE => 9, AdditionalTablesPeer::ADD_TAB_PLG_UID => 10, AdditionalTablesPeer::DBS_UID => 11, ),
|
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID => 0, AdditionalTablesPeer::ADD_TAB_NAME => 1, AdditionalTablesPeer::ADD_TAB_CLASS_NAME => 2, AdditionalTablesPeer::ADD_TAB_DESCRIPTION => 3, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT => 4, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE => 5, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE => 6, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT => 7, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH => 8, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE => 9, AdditionalTablesPeer::ADD_TAB_PLG_UID => 10, AdditionalTablesPeer::DBS_UID => 11, AdditionalTablesPeer::PRO_UID => 12, AdditionalTablesPeer::ADD_TAB_TYPE => 13, AdditionalTablesPeer::ADD_TAB_GRID => 14, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID' => 0, 'ADD_TAB_NAME' => 1, 'ADD_TAB_CLASS_NAME' => 2, 'ADD_TAB_DESCRIPTION' => 3, 'ADD_TAB_SDW_LOG_INSERT' => 4, 'ADD_TAB_SDW_LOG_UPDATE' => 5, 'ADD_TAB_SDW_LOG_DELETE' => 6, 'ADD_TAB_SDW_LOG_SELECT' => 7, 'ADD_TAB_SDW_MAX_LENGTH' => 8, 'ADD_TAB_SDW_AUTO_DELETE' => 9, 'ADD_TAB_PLG_UID' => 10, 'DBS_UID' => 11, ),
|
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID' => 0, 'ADD_TAB_NAME' => 1, 'ADD_TAB_CLASS_NAME' => 2, 'ADD_TAB_DESCRIPTION' => 3, 'ADD_TAB_SDW_LOG_INSERT' => 4, 'ADD_TAB_SDW_LOG_UPDATE' => 5, 'ADD_TAB_SDW_LOG_DELETE' => 6, 'ADD_TAB_SDW_LOG_SELECT' => 7, 'ADD_TAB_SDW_MAX_LENGTH' => 8, 'ADD_TAB_SDW_AUTO_DELETE' => 9, 'ADD_TAB_PLG_UID' => 10, 'DBS_UID' => 11, 'PRO_UID' => 12, 'ADD_TAB_TYPE' => 13, 'ADD_TAB_GRID' => 14, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -218,6 +227,12 @@ abstract class BaseAdditionalTablesPeer {
|
|||||||
|
|
||||||
$criteria->addSelectColumn(AdditionalTablesPeer::DBS_UID);
|
$criteria->addSelectColumn(AdditionalTablesPeer::DBS_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(AdditionalTablesPeer::PRO_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_TYPE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_GRID);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const COUNT = 'COUNT(ADDITIONAL_TABLES.ADD_TAB_UID)';
|
const COUNT = 'COUNT(ADDITIONAL_TABLES.ADD_TAB_UID)';
|
||||||
|
|||||||
@@ -111,6 +111,27 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
*/
|
*/
|
||||||
protected $fld_foreign_key_table = '';
|
protected $fld_foreign_key_table = '';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the fld_dyn_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $fld_dyn_name = '';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the fld_dyn_uid field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $fld_dyn_uid = '';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the fld_filter field.
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $fld_filter = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
* by another object which falls in this transaction.
|
* by another object which falls in this transaction.
|
||||||
@@ -257,6 +278,39 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
return $this->fld_foreign_key_table;
|
return $this->fld_foreign_key_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [fld_dyn_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFldDynName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->fld_dyn_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [fld_dyn_uid] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFldDynUid()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->fld_dyn_uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [fld_filter] column value.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getFldFilter()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->fld_filter;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [fld_uid] column.
|
* Set the value of [fld_uid] column.
|
||||||
*
|
*
|
||||||
@@ -521,6 +575,72 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
|
|
||||||
} // setFldForeignKeyTable()
|
} // setFldForeignKeyTable()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [fld_dyn_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setFldDynName($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->fld_dyn_name !== $v || $v === '') {
|
||||||
|
$this->fld_dyn_name = $v;
|
||||||
|
$this->modifiedColumns[] = FieldsPeer::FLD_DYN_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setFldDynName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [fld_dyn_uid] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setFldDynUid($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->fld_dyn_uid !== $v || $v === '') {
|
||||||
|
$this->fld_dyn_uid = $v;
|
||||||
|
$this->modifiedColumns[] = FieldsPeer::FLD_DYN_UID;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setFldDynUid()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [fld_filter] column.
|
||||||
|
*
|
||||||
|
* @param int $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setFldFilter($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is integer,
|
||||||
|
// we will cast the input value to an int (if it is not).
|
||||||
|
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||||
|
$v = (int) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->fld_filter !== $v || $v === 0) {
|
||||||
|
$this->fld_filter = $v;
|
||||||
|
$this->modifiedColumns[] = FieldsPeer::FLD_FILTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setFldFilter()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hydrates (populates) the object variables with values from the database resultset.
|
* Hydrates (populates) the object variables with values from the database resultset.
|
||||||
*
|
*
|
||||||
@@ -562,12 +682,18 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
|
|
||||||
$this->fld_foreign_key_table = $rs->getString($startcol + 11);
|
$this->fld_foreign_key_table = $rs->getString($startcol + 11);
|
||||||
|
|
||||||
|
$this->fld_dyn_name = $rs->getString($startcol + 12);
|
||||||
|
|
||||||
|
$this->fld_dyn_uid = $rs->getString($startcol + 13);
|
||||||
|
|
||||||
|
$this->fld_filter = $rs->getInt($startcol + 14);
|
||||||
|
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
|
||||||
// FIXME - using NUM_COLUMNS may be clearer.
|
// FIXME - using NUM_COLUMNS may be clearer.
|
||||||
return $startcol + 12; // 12 = FieldsPeer::NUM_COLUMNS - FieldsPeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 15; // 15 = FieldsPeer::NUM_COLUMNS - FieldsPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating Fields object", $e);
|
throw new PropelException("Error populating Fields object", $e);
|
||||||
@@ -806,6 +932,15 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
case 11:
|
case 11:
|
||||||
return $this->getFldForeignKeyTable();
|
return $this->getFldForeignKeyTable();
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
return $this->getFldDynName();
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
return $this->getFldDynUid();
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
return $this->getFldFilter();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
@@ -838,6 +973,9 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
$keys[9] => $this->getFldKey(),
|
$keys[9] => $this->getFldKey(),
|
||||||
$keys[10] => $this->getFldForeignKey(),
|
$keys[10] => $this->getFldForeignKey(),
|
||||||
$keys[11] => $this->getFldForeignKeyTable(),
|
$keys[11] => $this->getFldForeignKeyTable(),
|
||||||
|
$keys[12] => $this->getFldDynName(),
|
||||||
|
$keys[13] => $this->getFldDynUid(),
|
||||||
|
$keys[14] => $this->getFldFilter(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -905,6 +1043,15 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
case 11:
|
case 11:
|
||||||
$this->setFldForeignKeyTable($value);
|
$this->setFldForeignKeyTable($value);
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
$this->setFldDynName($value);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
$this->setFldDynUid($value);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
$this->setFldFilter($value);
|
||||||
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -940,6 +1087,9 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
if (array_key_exists($keys[9], $arr)) $this->setFldKey($arr[$keys[9]]);
|
if (array_key_exists($keys[9], $arr)) $this->setFldKey($arr[$keys[9]]);
|
||||||
if (array_key_exists($keys[10], $arr)) $this->setFldForeignKey($arr[$keys[10]]);
|
if (array_key_exists($keys[10], $arr)) $this->setFldForeignKey($arr[$keys[10]]);
|
||||||
if (array_key_exists($keys[11], $arr)) $this->setFldForeignKeyTable($arr[$keys[11]]);
|
if (array_key_exists($keys[11], $arr)) $this->setFldForeignKeyTable($arr[$keys[11]]);
|
||||||
|
if (array_key_exists($keys[12], $arr)) $this->setFldDynName($arr[$keys[12]]);
|
||||||
|
if (array_key_exists($keys[13], $arr)) $this->setFldDynUid($arr[$keys[13]]);
|
||||||
|
if (array_key_exists($keys[14], $arr)) $this->setFldFilter($arr[$keys[14]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -963,6 +1113,9 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
if ($this->isColumnModified(FieldsPeer::FLD_KEY)) $criteria->add(FieldsPeer::FLD_KEY, $this->fld_key);
|
if ($this->isColumnModified(FieldsPeer::FLD_KEY)) $criteria->add(FieldsPeer::FLD_KEY, $this->fld_key);
|
||||||
if ($this->isColumnModified(FieldsPeer::FLD_FOREIGN_KEY)) $criteria->add(FieldsPeer::FLD_FOREIGN_KEY, $this->fld_foreign_key);
|
if ($this->isColumnModified(FieldsPeer::FLD_FOREIGN_KEY)) $criteria->add(FieldsPeer::FLD_FOREIGN_KEY, $this->fld_foreign_key);
|
||||||
if ($this->isColumnModified(FieldsPeer::FLD_FOREIGN_KEY_TABLE)) $criteria->add(FieldsPeer::FLD_FOREIGN_KEY_TABLE, $this->fld_foreign_key_table);
|
if ($this->isColumnModified(FieldsPeer::FLD_FOREIGN_KEY_TABLE)) $criteria->add(FieldsPeer::FLD_FOREIGN_KEY_TABLE, $this->fld_foreign_key_table);
|
||||||
|
if ($this->isColumnModified(FieldsPeer::FLD_DYN_NAME)) $criteria->add(FieldsPeer::FLD_DYN_NAME, $this->fld_dyn_name);
|
||||||
|
if ($this->isColumnModified(FieldsPeer::FLD_DYN_UID)) $criteria->add(FieldsPeer::FLD_DYN_UID, $this->fld_dyn_uid);
|
||||||
|
if ($this->isColumnModified(FieldsPeer::FLD_FILTER)) $criteria->add(FieldsPeer::FLD_FILTER, $this->fld_filter);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -1039,6 +1192,12 @@ abstract class BaseFields extends BaseObject implements Persistent {
|
|||||||
|
|
||||||
$copyObj->setFldForeignKeyTable($this->fld_foreign_key_table);
|
$copyObj->setFldForeignKeyTable($this->fld_foreign_key_table);
|
||||||
|
|
||||||
|
$copyObj->setFldDynName($this->fld_dyn_name);
|
||||||
|
|
||||||
|
$copyObj->setFldDynUid($this->fld_dyn_uid);
|
||||||
|
|
||||||
|
$copyObj->setFldFilter($this->fld_filter);
|
||||||
|
|
||||||
|
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ abstract class BaseFieldsPeer {
|
|||||||
const CLASS_DEFAULT = 'classes.model.Fields';
|
const CLASS_DEFAULT = 'classes.model.Fields';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 12;
|
const NUM_COLUMNS = 15;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
@@ -66,6 +66,15 @@ abstract class BaseFieldsPeer {
|
|||||||
/** the column name for the FLD_FOREIGN_KEY_TABLE field */
|
/** the column name for the FLD_FOREIGN_KEY_TABLE field */
|
||||||
const FLD_FOREIGN_KEY_TABLE = 'FIELDS.FLD_FOREIGN_KEY_TABLE';
|
const FLD_FOREIGN_KEY_TABLE = 'FIELDS.FLD_FOREIGN_KEY_TABLE';
|
||||||
|
|
||||||
|
/** the column name for the FLD_DYN_NAME field */
|
||||||
|
const FLD_DYN_NAME = 'FIELDS.FLD_DYN_NAME';
|
||||||
|
|
||||||
|
/** the column name for the FLD_DYN_UID field */
|
||||||
|
const FLD_DYN_UID = 'FIELDS.FLD_DYN_UID';
|
||||||
|
|
||||||
|
/** the column name for the FLD_FILTER field */
|
||||||
|
const FLD_FILTER = 'FIELDS.FLD_FILTER';
|
||||||
|
|
||||||
/** The PHP to DB Name Mapping */
|
/** The PHP to DB Name Mapping */
|
||||||
private static $phpNameMap = null;
|
private static $phpNameMap = null;
|
||||||
|
|
||||||
@@ -77,10 +86,10 @@ abstract class BaseFieldsPeer {
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('FldUid', 'AddTabUid', 'FldIndex', 'FldName', 'FldDescription', 'FldType', 'FldSize', 'FldNull', 'FldAutoIncrement', 'FldKey', 'FldForeignKey', 'FldForeignKeyTable', ),
|
BasePeer::TYPE_PHPNAME => array ('FldUid', 'AddTabUid', 'FldIndex', 'FldName', 'FldDescription', 'FldType', 'FldSize', 'FldNull', 'FldAutoIncrement', 'FldKey', 'FldForeignKey', 'FldForeignKeyTable', 'FldDynName', 'FldDynUid', 'FldFilter', ),
|
||||||
BasePeer::TYPE_COLNAME => array (FieldsPeer::FLD_UID, FieldsPeer::ADD_TAB_UID, FieldsPeer::FLD_INDEX, FieldsPeer::FLD_NAME, FieldsPeer::FLD_DESCRIPTION, FieldsPeer::FLD_TYPE, FieldsPeer::FLD_SIZE, FieldsPeer::FLD_NULL, FieldsPeer::FLD_AUTO_INCREMENT, FieldsPeer::FLD_KEY, FieldsPeer::FLD_FOREIGN_KEY, FieldsPeer::FLD_FOREIGN_KEY_TABLE, ),
|
BasePeer::TYPE_COLNAME => array (FieldsPeer::FLD_UID, FieldsPeer::ADD_TAB_UID, FieldsPeer::FLD_INDEX, FieldsPeer::FLD_NAME, FieldsPeer::FLD_DESCRIPTION, FieldsPeer::FLD_TYPE, FieldsPeer::FLD_SIZE, FieldsPeer::FLD_NULL, FieldsPeer::FLD_AUTO_INCREMENT, FieldsPeer::FLD_KEY, FieldsPeer::FLD_FOREIGN_KEY, FieldsPeer::FLD_FOREIGN_KEY_TABLE, FieldsPeer::FLD_DYN_NAME, FieldsPeer::FLD_DYN_UID, FieldsPeer::FLD_FILTER, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('FLD_UID', 'ADD_TAB_UID', 'FLD_INDEX', 'FLD_NAME', 'FLD_DESCRIPTION', 'FLD_TYPE', 'FLD_SIZE', 'FLD_NULL', 'FLD_AUTO_INCREMENT', 'FLD_KEY', 'FLD_FOREIGN_KEY', 'FLD_FOREIGN_KEY_TABLE', ),
|
BasePeer::TYPE_FIELDNAME => array ('FLD_UID', 'ADD_TAB_UID', 'FLD_INDEX', 'FLD_NAME', 'FLD_DESCRIPTION', 'FLD_TYPE', 'FLD_SIZE', 'FLD_NULL', 'FLD_AUTO_INCREMENT', 'FLD_KEY', 'FLD_FOREIGN_KEY', 'FLD_FOREIGN_KEY_TABLE', 'FLD_DYN_NAME', 'FLD_DYN_UID', 'FLD_FILTER', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,10 +99,10 @@ abstract class BaseFieldsPeer {
|
|||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('FldUid' => 0, 'AddTabUid' => 1, 'FldIndex' => 2, 'FldName' => 3, 'FldDescription' => 4, 'FldType' => 5, 'FldSize' => 6, 'FldNull' => 7, 'FldAutoIncrement' => 8, 'FldKey' => 9, 'FldForeignKey' => 10, 'FldForeignKeyTable' => 11, ),
|
BasePeer::TYPE_PHPNAME => array ('FldUid' => 0, 'AddTabUid' => 1, 'FldIndex' => 2, 'FldName' => 3, 'FldDescription' => 4, 'FldType' => 5, 'FldSize' => 6, 'FldNull' => 7, 'FldAutoIncrement' => 8, 'FldKey' => 9, 'FldForeignKey' => 10, 'FldForeignKeyTable' => 11, 'FldDynName' => 12, 'FldDynUid' => 13, 'FldFilter' => 14, ),
|
||||||
BasePeer::TYPE_COLNAME => array (FieldsPeer::FLD_UID => 0, FieldsPeer::ADD_TAB_UID => 1, FieldsPeer::FLD_INDEX => 2, FieldsPeer::FLD_NAME => 3, FieldsPeer::FLD_DESCRIPTION => 4, FieldsPeer::FLD_TYPE => 5, FieldsPeer::FLD_SIZE => 6, FieldsPeer::FLD_NULL => 7, FieldsPeer::FLD_AUTO_INCREMENT => 8, FieldsPeer::FLD_KEY => 9, FieldsPeer::FLD_FOREIGN_KEY => 10, FieldsPeer::FLD_FOREIGN_KEY_TABLE => 11, ),
|
BasePeer::TYPE_COLNAME => array (FieldsPeer::FLD_UID => 0, FieldsPeer::ADD_TAB_UID => 1, FieldsPeer::FLD_INDEX => 2, FieldsPeer::FLD_NAME => 3, FieldsPeer::FLD_DESCRIPTION => 4, FieldsPeer::FLD_TYPE => 5, FieldsPeer::FLD_SIZE => 6, FieldsPeer::FLD_NULL => 7, FieldsPeer::FLD_AUTO_INCREMENT => 8, FieldsPeer::FLD_KEY => 9, FieldsPeer::FLD_FOREIGN_KEY => 10, FieldsPeer::FLD_FOREIGN_KEY_TABLE => 11, FieldsPeer::FLD_DYN_NAME => 12, FieldsPeer::FLD_DYN_UID => 13, FieldsPeer::FLD_FILTER => 14, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('FLD_UID' => 0, 'ADD_TAB_UID' => 1, 'FLD_INDEX' => 2, 'FLD_NAME' => 3, 'FLD_DESCRIPTION' => 4, 'FLD_TYPE' => 5, 'FLD_SIZE' => 6, 'FLD_NULL' => 7, 'FLD_AUTO_INCREMENT' => 8, 'FLD_KEY' => 9, 'FLD_FOREIGN_KEY' => 10, 'FLD_FOREIGN_KEY_TABLE' => 11, ),
|
BasePeer::TYPE_FIELDNAME => array ('FLD_UID' => 0, 'ADD_TAB_UID' => 1, 'FLD_INDEX' => 2, 'FLD_NAME' => 3, 'FLD_DESCRIPTION' => 4, 'FLD_TYPE' => 5, 'FLD_SIZE' => 6, 'FLD_NULL' => 7, 'FLD_AUTO_INCREMENT' => 8, 'FLD_KEY' => 9, 'FLD_FOREIGN_KEY' => 10, 'FLD_FOREIGN_KEY_TABLE' => 11, 'FLD_DYN_NAME' => 12, 'FLD_DYN_UID' => 13, 'FLD_FILTER' => 14, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -218,6 +227,12 @@ abstract class BaseFieldsPeer {
|
|||||||
|
|
||||||
$criteria->addSelectColumn(FieldsPeer::FLD_FOREIGN_KEY_TABLE);
|
$criteria->addSelectColumn(FieldsPeer::FLD_FOREIGN_KEY_TABLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(FieldsPeer::FLD_DYN_NAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(FieldsPeer::FLD_DYN_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(FieldsPeer::FLD_FILTER);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const COUNT = 'COUNT(FIELDS.FLD_UID)';
|
const COUNT = 'COUNT(FIELDS.FLD_UID)';
|
||||||
|
|||||||
@@ -2035,15 +2035,18 @@
|
|||||||
<column name="ADD_TAB_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
<column name="ADD_TAB_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||||
<column name="ADD_TAB_NAME" type="VARCHAR" size="60" required="true" default=""/>
|
<column name="ADD_TAB_NAME" type="VARCHAR" size="60" required="true" default=""/>
|
||||||
<column name="ADD_TAB_CLASS_NAME" type="VARCHAR" size="100" required="true" default=""/>
|
<column name="ADD_TAB_CLASS_NAME" type="VARCHAR" size="100" required="true" default=""/>
|
||||||
<column name="ADD_TAB_DESCRIPTION" type="LONGVARCHAR" required="true"/>
|
<column name="ADD_TAB_DESCRIPTION" type="LONGVARCHAR" required="false"/>
|
||||||
<column name="ADD_TAB_SDW_LOG_INSERT" type="TINYINT" required="true" default="1"/>
|
<column name="ADD_TAB_SDW_LOG_INSERT" type="TINYINT" required="false" default="0"/>
|
||||||
<column name="ADD_TAB_SDW_LOG_UPDATE" type="TINYINT" required="true" default="1"/>
|
<column name="ADD_TAB_SDW_LOG_UPDATE" type="TINYINT" required="false" default="0"/>
|
||||||
<column name="ADD_TAB_SDW_LOG_DELETE" type="TINYINT" required="true" default="1"/>
|
<column name="ADD_TAB_SDW_LOG_DELETE" type="TINYINT" required="false" default="0"/>
|
||||||
<column name="ADD_TAB_SDW_LOG_SELECT" type="TINYINT" required="true" default="0"/>
|
<column name="ADD_TAB_SDW_LOG_SELECT" type="TINYINT" required="false" default="0"/>
|
||||||
<column name="ADD_TAB_SDW_MAX_LENGTH" type="INTEGER" required="true" default="-1"/>
|
<column name="ADD_TAB_SDW_MAX_LENGTH" type="INTEGER" required="false" default="0"/>
|
||||||
<column name="ADD_TAB_SDW_AUTO_DELETE" type="TINYINT" required="true" default="0"/>
|
<column name="ADD_TAB_SDW_AUTO_DELETE" type="TINYINT" required="false" default="0"/>
|
||||||
<column name="ADD_TAB_PLG_UID" type="VARCHAR" size="32" required="true" default=""/>
|
<column name="ADD_TAB_PLG_UID" type="VARCHAR" size="32" required="false" default=""/>
|
||||||
<column name="DBS_UID" type="VARCHAR" size="32" required="false" default="0"/>
|
<column name="DBS_UID" type="VARCHAR" size="32" required="false" default=""/>
|
||||||
|
<column name="PRO_UID" type="VARCHAR" size="32" required="false" default=""/>
|
||||||
|
<column name="ADD_TAB_TYPE" type="VARCHAR" size="32" required="false" default=""/>
|
||||||
|
<column name="ADD_TAB_GRID" type="VARCHAR" size="256" required="false" default=""/>
|
||||||
</table>
|
</table>
|
||||||
<table name="FIELDS">
|
<table name="FIELDS">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
@@ -2078,6 +2081,9 @@
|
|||||||
<column name="FLD_KEY" type="TINYINT" required="true" default="0"/>
|
<column name="FLD_KEY" type="TINYINT" required="true" default="0"/>
|
||||||
<column name="FLD_FOREIGN_KEY" type="TINYINT" required="true" default="0"/>
|
<column name="FLD_FOREIGN_KEY" type="TINYINT" required="true" default="0"/>
|
||||||
<column name="FLD_FOREIGN_KEY_TABLE" type="VARCHAR" size="32" required="true" default=""/>
|
<column name="FLD_FOREIGN_KEY_TABLE" type="VARCHAR" size="32" required="true" default=""/>
|
||||||
|
<column name="FLD_DYN_NAME" type="VARCHAR" size="128" required="false" default=""/>
|
||||||
|
<column name="FLD_DYN_UID" type="VARCHAR" size="128" required="false" default=""/>
|
||||||
|
<column name="FLD_FILTER" type="TINYINT" required="false" default="0"/>
|
||||||
</table>
|
</table>
|
||||||
<table name="SHADOW_TABLE">
|
<table name="SHADOW_TABLE">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
|
|||||||
@@ -936,15 +936,18 @@ CREATE TABLE `ADDITIONAL_TABLES`
|
|||||||
`ADD_TAB_UID` VARCHAR(32) default '' NOT NULL,
|
`ADD_TAB_UID` VARCHAR(32) default '' NOT NULL,
|
||||||
`ADD_TAB_NAME` VARCHAR(60) default '' NOT NULL,
|
`ADD_TAB_NAME` VARCHAR(60) default '' NOT NULL,
|
||||||
`ADD_TAB_CLASS_NAME` VARCHAR(100) default '' NOT NULL,
|
`ADD_TAB_CLASS_NAME` VARCHAR(100) default '' NOT NULL,
|
||||||
`ADD_TAB_DESCRIPTION` MEDIUMTEXT NOT NULL,
|
`ADD_TAB_DESCRIPTION` MEDIUMTEXT,
|
||||||
`ADD_TAB_SDW_LOG_INSERT` TINYINT default 1 NOT NULL,
|
`ADD_TAB_SDW_LOG_INSERT` TINYINT default 0,
|
||||||
`ADD_TAB_SDW_LOG_UPDATE` TINYINT default 1 NOT NULL,
|
`ADD_TAB_SDW_LOG_UPDATE` TINYINT default 0,
|
||||||
`ADD_TAB_SDW_LOG_DELETE` TINYINT default 1 NOT NULL,
|
`ADD_TAB_SDW_LOG_DELETE` TINYINT default 0,
|
||||||
`ADD_TAB_SDW_LOG_SELECT` TINYINT default 0 NOT NULL,
|
`ADD_TAB_SDW_LOG_SELECT` TINYINT default 0,
|
||||||
`ADD_TAB_SDW_MAX_LENGTH` INTEGER default -1 NOT NULL,
|
`ADD_TAB_SDW_MAX_LENGTH` INTEGER default 0,
|
||||||
`ADD_TAB_SDW_AUTO_DELETE` TINYINT default 0 NOT NULL,
|
`ADD_TAB_SDW_AUTO_DELETE` TINYINT default 0,
|
||||||
`ADD_TAB_PLG_UID` VARCHAR(32) default '' NOT NULL,
|
`ADD_TAB_PLG_UID` VARCHAR(32) default '',
|
||||||
`DBS_UID` VARCHAR(32) default '0',
|
`DBS_UID` VARCHAR(32) default '',
|
||||||
|
`PRO_UID` VARCHAR(32) default '',
|
||||||
|
`ADD_TAB_TYPE` VARCHAR(32) default '',
|
||||||
|
`ADD_TAB_GRID` VARCHAR(256) default '',
|
||||||
PRIMARY KEY (`ADD_TAB_UID`)
|
PRIMARY KEY (`ADD_TAB_UID`)
|
||||||
)ENGINE=MyISAM DEFAULT CHARSET='utf8';
|
)ENGINE=MyISAM DEFAULT CHARSET='utf8';
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@@ -968,6 +971,9 @@ CREATE TABLE `FIELDS`
|
|||||||
`FLD_KEY` TINYINT default 0 NOT NULL,
|
`FLD_KEY` TINYINT default 0 NOT NULL,
|
||||||
`FLD_FOREIGN_KEY` TINYINT default 0 NOT NULL,
|
`FLD_FOREIGN_KEY` TINYINT default 0 NOT NULL,
|
||||||
`FLD_FOREIGN_KEY_TABLE` VARCHAR(32) default '' NOT NULL,
|
`FLD_FOREIGN_KEY_TABLE` VARCHAR(32) default '' NOT NULL,
|
||||||
|
`FLD_DYN_NAME` VARCHAR(128) default '',
|
||||||
|
`FLD_DYN_UID` VARCHAR(128) default '',
|
||||||
|
`FLD_FILTER` TINYINT default 0,
|
||||||
PRIMARY KEY (`FLD_UID`)
|
PRIMARY KEY (`FLD_UID`)
|
||||||
)ENGINE=MyISAM DEFAULT CHARSET='utf8';
|
)ENGINE=MyISAM DEFAULT CHARSET='utf8';
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -19,9 +19,14 @@ var processmap=function(){
|
|||||||
buildingBlocks:{
|
buildingBlocks:{
|
||||||
injector:function(lanzado)
|
injector:function(lanzado)
|
||||||
{
|
{
|
||||||
Wx = (lanzado=='dynaforms' || lanzado=='triggers' || lanzado=='outputs' ) ?600 : 500;
|
Wx = (lanzado=='dynaforms' || lanzado=='triggers' || lanzado=='outputs') ?600 : 500;
|
||||||
Hx = 460;
|
Hx = 460;
|
||||||
|
|
||||||
|
if(lanzado=='reportTables'){
|
||||||
|
Wx = 800;
|
||||||
|
Hx = 600;
|
||||||
|
}
|
||||||
|
|
||||||
var bbk = {
|
var bbk = {
|
||||||
dynaforms:1,
|
dynaforms:1,
|
||||||
messages:1,
|
messages:1,
|
||||||
@@ -75,7 +80,7 @@ var processmap=function(){
|
|||||||
this.buildLoading=false;
|
this.buildLoading=false;
|
||||||
}.extend(this);
|
}.extend(this);
|
||||||
r.make();
|
r.make();
|
||||||
|
|
||||||
processmapOutputsPanel = panel;
|
processmapOutputsPanel = panel;
|
||||||
}.extend(this),
|
}.extend(this),
|
||||||
inputs:function()
|
inputs:function()
|
||||||
@@ -132,7 +137,7 @@ var processmap=function(){
|
|||||||
}.extend(this);
|
}.extend(this);
|
||||||
r.make();
|
r.make();
|
||||||
}.extend(this),
|
}.extend(this),
|
||||||
reportTables:function(){
|
reportTables2:function(){
|
||||||
var panel = this.panels.buildingBlocks;
|
var panel = this.panels.buildingBlocks;
|
||||||
panel.addContentTitle(G_STRINGS.ID_PROCESSMAP_REPORT_TABLES);
|
panel.addContentTitle(G_STRINGS.ID_PROCESSMAP_REPORT_TABLES);
|
||||||
panel.clearContent();
|
panel.clearContent();
|
||||||
@@ -150,6 +155,18 @@ var processmap=function(){
|
|||||||
}.extend(this);
|
}.extend(this);
|
||||||
r.make();
|
r.make();
|
||||||
}.extend(this),
|
}.extend(this),
|
||||||
|
reportTables:function(){
|
||||||
|
var panel = this.panels.buildingBlocks;
|
||||||
|
panel.addContentTitle(G_STRINGS.ID_PROCESSMAP_REPORT_TABLES);
|
||||||
|
panel.clearContent();
|
||||||
|
var iframe=document.createElement('iframe');
|
||||||
|
iframe.setAttribute('id','reportTablesIframe');
|
||||||
|
iframe.src = '../reportTables/main?PRO_UID=' + this.options.uid;
|
||||||
|
iframe.style.border='0px';
|
||||||
|
iframe.style.width='786px';
|
||||||
|
iframe.style.height='564px';
|
||||||
|
panel.addContent(iframe);
|
||||||
|
}.extend(this),
|
||||||
dynaforms:function(){
|
dynaforms:function(){
|
||||||
var panel = this.panels.buildingBlocks;
|
var panel = this.panels.buildingBlocks;
|
||||||
panel.addContentTitle(G_STRINGS.ID_PROCESSMAP_DYNAFORMS);
|
panel.addContentTitle(G_STRINGS.ID_PROCESSMAP_DYNAFORMS);
|
||||||
@@ -712,7 +729,7 @@ var processmap=function(){
|
|||||||
}.extend(this,panel);
|
}.extend(this,panel);
|
||||||
r.make();
|
r.make();
|
||||||
}.extend(this)},
|
}.extend(this)},
|
||||||
*/
|
*/
|
||||||
{image:"/images/event_messageThrow.png",text:"intermediate message event",launch:function(event){
|
{image:"/images/event_messageThrow.png",text:"intermediate message event",launch:function(event){
|
||||||
this.tmp.eventsPanel = panel =new leimnud.module.panel();
|
this.tmp.eventsPanel = panel =new leimnud.module.panel();
|
||||||
panel.options={
|
panel.options={
|
||||||
@@ -1186,7 +1203,7 @@ var processmap=function(){
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reviewed by recharge in the process design
|
* Reviewed by recharge in the process design
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if(task.statusIcons){
|
if(task.statusIcons){
|
||||||
@@ -1348,9 +1365,9 @@ var processmap=function(){
|
|||||||
};
|
};
|
||||||
panel.events = {
|
panel.events = {
|
||||||
remove: function() {
|
remove: function() {
|
||||||
|
|
||||||
}.extend(this)
|
}.extend(this)
|
||||||
};
|
};
|
||||||
panel.make();
|
panel.make();
|
||||||
}.extend(this,index)},
|
}.extend(this,index)},
|
||||||
{image:"/images/users.png",text:G_STRINGS.ID_PROCESSMAP_USERS_AND_GROUPS,launch:function(event,index){
|
{image:"/images/users.png",text:G_STRINGS.ID_PROCESSMAP_USERS_AND_GROUPS,launch:function(event,index){
|
||||||
@@ -1368,9 +1385,9 @@ var processmap=function(){
|
|||||||
};
|
};
|
||||||
panel.events = { //neyek
|
panel.events = { //neyek
|
||||||
remove: function() {
|
remove: function() {
|
||||||
|
|
||||||
}.extend(this)
|
}.extend(this)
|
||||||
};
|
};
|
||||||
panel.make();
|
panel.make();
|
||||||
panel.loader.show();
|
panel.loader.show();
|
||||||
var r;
|
var r;
|
||||||
@@ -1506,7 +1523,7 @@ var processmap=function(){
|
|||||||
|
|
||||||
this.tmp.propertiesPanel = panel =new leimnud.module.panel();
|
this.tmp.propertiesPanel = panel =new leimnud.module.panel();
|
||||||
var data = this.data.db.task[index];
|
var data = this.data.db.task[index];
|
||||||
|
|
||||||
panel.options={
|
panel.options={
|
||||||
limit:true,
|
limit:true,
|
||||||
size:{w:600,h:430},
|
size:{w:600,h:430},
|
||||||
@@ -1526,7 +1543,7 @@ var processmap=function(){
|
|||||||
modal:true
|
modal:true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
panel.tab={
|
panel.tab={
|
||||||
width :170,
|
width :170,
|
||||||
optWidth:160,
|
optWidth:160,
|
||||||
@@ -1567,12 +1584,12 @@ var processmap=function(){
|
|||||||
content : this.parent.closure({instance:this,method:iForm,args:[panel,index,taskOptions[i].id]}),
|
content : this.parent.closure({instance:this,method:iForm,args:[panel,index,taskOptions[i].id]}),
|
||||||
noClear : true
|
noClear : true
|
||||||
};
|
};
|
||||||
panel.tab.options.push(anElement);
|
panel.tab.options.push(anElement);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.loadExtendedProperties();
|
this.loadExtendedProperties();
|
||||||
panel.make();
|
panel.make();
|
||||||
|
|
||||||
},args:index})}
|
},args:index})}
|
||||||
]:
|
]:
|
||||||
[
|
[
|
||||||
@@ -2265,7 +2282,7 @@ processmap.prototype={
|
|||||||
{
|
{
|
||||||
var h = this.parent.dom.element("pm_header");
|
var h = this.parent.dom.element("pm_header");
|
||||||
var m = this.parent.dom.element("pm_menu");
|
var m = this.parent.dom.element("pm_menu");
|
||||||
var s = this.parent.dom.element("pm_submenu");
|
var s = this.parent.dom.element("pm_submenu");
|
||||||
var sep = this.parent.dom.element("pm_separator");
|
var sep = this.parent.dom.element("pm_separator");
|
||||||
sep.className = "pm_separatorOff___"+this.options.theme;
|
sep.className = "pm_separatorOff___"+this.options.theme;
|
||||||
this.menuRolled=false;
|
this.menuRolled=false;
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ $G_TMP_MENU->AddIdRawOption('TRIGGERS', '', G::LoadTranslation('ID_TRIGGERS'
|
|||||||
//$G_TMP_MENU->AddIdRawOption('MESSAGES', '', G::LoadTranslation('ID_MESSAGES'),"/images/mail.gif",'Pm.data.render.buildingBlocks.injector(\'messages\'); return false;');
|
//$G_TMP_MENU->AddIdRawOption('MESSAGES', '', G::LoadTranslation('ID_MESSAGES'),"/images/mail.gif",'Pm.data.render.buildingBlocks.injector(\'messages\'); return false;');
|
||||||
G::LoadClass('reportTables');
|
G::LoadClass('reportTables');
|
||||||
if (ReportTables::tableExist()) {
|
if (ReportTables::tableExist()) {
|
||||||
|
//DEPRECATED $G_TMP_MENU->AddIdRawOption('REPORT_TABLES', '', G::LoadTranslation('ID_REPORT_TABLESOLD'),"",'Pm.data.render.buildingBlocks.injector(\'reportTables2\'); return false;','','ss_sprite ss_table');
|
||||||
$G_TMP_MENU->AddIdRawOption('REPORT_TABLES', '', G::LoadTranslation('ID_REPORT_TABLES'),"",'Pm.data.render.buildingBlocks.injector(\'reportTables\'); return false;','','ss_sprite ss_table');
|
$G_TMP_MENU->AddIdRawOption('REPORT_TABLES', '', G::LoadTranslation('ID_REPORT_TABLES'),"",'Pm.data.render.buildingBlocks.injector(\'reportTables\'); return false;','','ss_sprite ss_table');
|
||||||
}
|
}
|
||||||
$G_TMP_MENU->AddIdRawOption('DB_CONNECTIONS', '', G::LoadTranslation('ID_DB_CONNECTIONS'),"",'showDbConnectionsList(Pm.options.uid); return false;','','ss_sprite ss_database_connect');
|
$G_TMP_MENU->AddIdRawOption('DB_CONNECTIONS', '', G::LoadTranslation('ID_DB_CONNECTIONS'),"",'showDbConnectionsList(Pm.options.uid); return false;','','ss_sprite ss_database_connect');
|
||||||
|
|||||||
@@ -41,8 +41,11 @@ if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1)
|
|||||||
$G_TMP_MENU->AddIdRawOption('APPCACHEVIEW_SETUP', '../setup/appCacheViewConf', G::LoadTranslation('ID_APPCACHE_SETUP'), "",'', 'settings');
|
$G_TMP_MENU->AddIdRawOption('APPCACHEVIEW_SETUP', '../setup/appCacheViewConf', G::LoadTranslation('ID_APPCACHE_SETUP'), "",'', 'settings');
|
||||||
$G_TMP_MENU->AddIdRawOption('CLEAR_CACHE', 'clearCompiled', G::LoadTranslation('ID_CLEAR_CACHE'), 'icon-rebuild-clean.png', "", 'settings' );
|
$G_TMP_MENU->AddIdRawOption('CLEAR_CACHE', 'clearCompiled', G::LoadTranslation('ID_CLEAR_CACHE'), 'icon-rebuild-clean.png', "", 'settings' );
|
||||||
|
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') == 1)
|
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||||
$G_TMP_MENU->AddIdRawOption('ADDITIONAL_TABLES', '../additionalTables/additionalTablesList', G::LoadTranslation('ID_ADDITIONAL_TABLES'), 'icon-tables.png','', 'settings');
|
$G_TMP_MENU->AddIdRawOption('ADDITIONAL_TABLES', '../additionalTables/additionalTablesList', G::LoadTranslation('ID_ADDITIONAL_TABLES'), 'icon-tables.png','', 'settings');
|
||||||
|
$G_TMP_MENU->AddIdRawOption('REPORT_TABLES', '../reportTables/main', 'Report Tables', 'icon-tables.png','', 'settings');
|
||||||
|
}
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption('WEBSERVICES', 'webServices', G::LoadTranslation('ID_WEB_SERVICES'), 'icon-webservices.png', '', 'settings');
|
$G_TMP_MENU->AddIdRawOption('WEBSERVICES', 'webServices', G::LoadTranslation('ID_WEB_SERVICES'), 'icon-webservices.png', '', 'settings');
|
||||||
$G_TMP_MENU->AddIdRawOption('LOG_CASE_SCHEDULER', '../cases/cases_Scheduler_Log', G::LoadTranslation('ID_LOG_CASE_SCHEDULER'), "icon-logs-list.png",'', 'settings');
|
$G_TMP_MENU->AddIdRawOption('LOG_CASE_SCHEDULER', '../cases/cases_Scheduler_Log', G::LoadTranslation('ID_LOG_CASE_SCHEDULER'), "icon-logs-list.png",'', 'settings');
|
||||||
$G_TMP_MENU->AddIdRawOption('LOGIN', 'loginSettings', G::LoadTranslation('LOGIN'), "",'', 'settings');
|
$G_TMP_MENU->AddIdRawOption('LOGIN', 'loginSettings', G::LoadTranslation('LOGIN'), "",'', 'settings');
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ $oCriteria = new Criteria('workflow');
|
|||||||
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_UID);
|
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_UID);
|
||||||
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_NAME);
|
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_NAME);
|
||||||
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_DESCRIPTION);
|
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_DESCRIPTION);
|
||||||
|
$oCriteria->add(AdditionalTablesPeer::PRO_UID, '', Criteria::EQUAL);
|
||||||
if ($filter!=''){
|
if ($filter!=''){
|
||||||
$oCriteria->add(
|
$oCriteria->add(
|
||||||
$oCriteria->getNewCriterion(AdditionalTablesPeer::ADD_TAB_NAME, '%'.$filter.'%',Criteria::LIKE)->addOr(
|
$oCriteria->getNewCriterion(AdditionalTablesPeer::ADD_TAB_NAME, '%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||||
@@ -54,6 +55,7 @@ $oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_UID);
|
|||||||
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_NAME);
|
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_NAME);
|
||||||
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_DESCRIPTION);
|
$oCriteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_DESCRIPTION);
|
||||||
$oCriteria->add(AdditionalTablesPeer::ADD_TAB_UID, '', Criteria::NOT_EQUAL);
|
$oCriteria->add(AdditionalTablesPeer::ADD_TAB_UID, '', Criteria::NOT_EQUAL);
|
||||||
|
$oCriteria->add(AdditionalTablesPeer::PRO_UID, '', Criteria::EQUAL);
|
||||||
if ($filter!=''){
|
if ($filter!=''){
|
||||||
$oCriteria->add(
|
$oCriteria->add(
|
||||||
$oCriteria->getNewCriterion(AdditionalTablesPeer::ADD_TAB_NAME, '%'.$filter.'%',Criteria::LIKE)->addOr(
|
$oCriteria->getNewCriterion(AdditionalTablesPeer::ADD_TAB_NAME, '%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||||
|
|||||||
80
workflow/engine/methods/reportTables/edit.php
Normal file
80
workflow/engine/methods/reportTables/edit.php
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$id = isset($_GET['id']) ? $_GET['id'] : false;
|
||||||
|
$table = false;
|
||||||
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
|
|
||||||
|
$oHeadPublisher->addExtJsScript('reportTables/edit', true );
|
||||||
|
$oHeadPublisher->addContent('reportTables/edit');
|
||||||
|
$oHeadPublisher->assign('ADD_TAB_UID', $id);
|
||||||
|
|
||||||
|
if ($id) { // if is a edit request
|
||||||
|
require_once 'classes/model/AdditionalTables.php';
|
||||||
|
require_once 'classes/model/Fields.php';
|
||||||
|
G::LoadClass('xmlfield_InputPM');
|
||||||
|
|
||||||
|
$additionalTables = new AdditionalTables();
|
||||||
|
$table = $additionalTables->load($id, true);
|
||||||
|
$tableFields = array();
|
||||||
|
$fieldsList = array();
|
||||||
|
|
||||||
|
// list the case fields
|
||||||
|
foreach ($table['FIELDS'] as $i=>$field) {
|
||||||
|
if ($field['FLD_NAME'] == 'APP_UID' || $field['FLD_NAME'] == 'APP_NUMBER' || $field['FLD_NAME'] == 'ROW') {
|
||||||
|
unset($table['FIELDS'][$i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
array_push($tableFields, $field['FLD_DYN_NAME']);
|
||||||
|
}
|
||||||
|
|
||||||
|
//list dynaform fields
|
||||||
|
if ($table['ADD_TAB_TYPE'] == 'NORMAL') {
|
||||||
|
$fields = getDynaformsVars($table['PRO_UID'], false);
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
//select to not assigned fields for available grid
|
||||||
|
if (!in_array($field['sName'], $tableFields)) {
|
||||||
|
$fieldsList[] = array(
|
||||||
|
'FIELD_UID' => $field['sName'] . '-' . $field['sType'],
|
||||||
|
'FIELD_NAME' => $field['sName']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
list($gridName, $gridId) = explode('-', $table['ADD_TAB_GRID']);
|
||||||
|
|
||||||
|
$G_FORM = new Form($table['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||||
|
$gridFields = $G_FORM->getVars(false);
|
||||||
|
|
||||||
|
foreach ($gridFields as $gfield) {
|
||||||
|
if (!in_array($gfield['sName'], $tableFields)) {
|
||||||
|
$fieldsList[] = array(
|
||||||
|
'FIELD_UID' => $gfield['sName'] . '-' . $gfield['sType'],
|
||||||
|
'FIELD_NAME' => $gfield['sName']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('avFieldsList', $fieldsList);
|
||||||
|
}
|
||||||
|
|
||||||
|
$repTabPluginPermissions = false;
|
||||||
|
global $G_TMP_MENU;
|
||||||
|
$oMenu = new Menu();
|
||||||
|
$oMenu->load('setup');
|
||||||
|
foreach( $oMenu->Options as $i=>$option) {
|
||||||
|
if ($oMenu->Types[$i] == 'private' && $oMenu->Id[$i] == 'PLUGIN_REPTAB_PERMISSIONS') {
|
||||||
|
$repTabPluginPermissions = array();
|
||||||
|
$repTabPluginPermissions['label'] = $oMenu->Labels[$i];
|
||||||
|
$repTabPluginPermissions['fn'] = $oMenu->Options[$i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('_plugin_permissions', $repTabPluginPermissions);
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('PRO_UID', isset($_GET['PRO_UID'])? $_GET['PRO_UID'] : false);
|
||||||
|
$oHeadPublisher->assign('TABLE', $table);
|
||||||
|
|
||||||
|
|
||||||
|
G::RenderPage('publish', 'extJs');
|
||||||
54
workflow/engine/methods/reportTables/main.php
Normal file
54
workflow/engine/methods/reportTables/main.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* main.php Cases List main processor
|
||||||
|
*
|
||||||
|
* ProcessMaker Open Source Edition
|
||||||
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*$proUid = $_GET['PRO_UID'];
|
||||||
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
|
|
||||||
|
$oHeadPublisher->addExtJsScript('reportTables/main', true ); //adding a javascript file .js
|
||||||
|
$oHeadPublisher->addContent('reportTables/main'); //adding a html file .html.
|
||||||
|
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('PRO_UID', $proUid);
|
||||||
|
|
||||||
|
G::RenderPage('publish', 'extJs');*/
|
||||||
|
|
||||||
|
global $RBAC;
|
||||||
|
$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
||||||
|
$G_PUBLISH = new Publisher;
|
||||||
|
|
||||||
|
G::LoadClass('configuration');
|
||||||
|
$c = new Configurations();
|
||||||
|
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||||
|
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
|
|
||||||
|
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||||
|
$oHeadPublisher->addExtJsScript('reportTables/main', true); //adding a javascript file .js
|
||||||
|
$oHeadPublisher->addContent('reportTables/main'); //adding a html file .html.
|
||||||
|
$oHeadPublisher->assign('FORMATS',$c->getFormats());
|
||||||
|
$oHeadPublisher->assign('CONFIG', $Config);
|
||||||
|
$oHeadPublisher->assign('PRO_UID', isset($_GET['PRO_UID'])? $_GET['PRO_UID'] : false);
|
||||||
|
G::RenderPage('publish', 'extJs');
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* triggers_Edit.php
|
* reportTables_Ajax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2011 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
@@ -22,20 +22,513 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G::LoadClass('case');
|
G::LoadClass('case');
|
||||||
switch($_POST['action']) {
|
|
||||||
case 'tableExists':
|
$action = $_REQUEST['action'];
|
||||||
|
unset($_POST['action']);
|
||||||
|
|
||||||
|
switch($action) {
|
||||||
|
|
||||||
|
case 'availableFieldsReportTables':
|
||||||
|
G::LoadClass('reportTables');
|
||||||
|
G::LoadClass('xmlfield_InputPM');
|
||||||
|
|
||||||
|
$aFields['FIELDS'] = array();
|
||||||
|
$aFields['PRO_UID'] = $_POST['PRO_UID'];
|
||||||
|
|
||||||
|
if(isset($_POST['TYPE']) && $_POST['TYPE'] == 'GRID') {
|
||||||
|
$aProcessGridFields = Array();
|
||||||
|
if (isset($_POST['GRID_UID'])) {
|
||||||
|
global $G_FORM;
|
||||||
|
list($gridName, $gridId) = explode('-', $_POST['GRID_UID']);
|
||||||
|
|
||||||
|
// $G_FORM = new Form($_POST['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||||
|
//$gridFields = $G_FORM->getVars(false);
|
||||||
|
$gridFields = getGridDynafields($_POST['PRO_UID'], $gridId);
|
||||||
|
|
||||||
|
foreach ($gridFields as $gfield) {
|
||||||
|
$aProcessGridFields[] = array(
|
||||||
|
'FIELD_UID' => $gfield['name'] . '-' . $gfield['type'],
|
||||||
|
'FIELD_NAME' => $gfield['name']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$gridFields = getGridFields($aFields['PRO_UID']);
|
||||||
|
|
||||||
|
foreach ($gridFields as $gfield) {
|
||||||
|
$aProcessGridFields[] = array(
|
||||||
|
'FIELD_UID' => $gfield['name'] . '-' . $gfield['xmlform'],
|
||||||
|
'FIELD_NAME' => $gfield['name']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$resultList['processFields'] = $aProcessGridFields;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$aProcessFields = Array();
|
||||||
|
//$dynFields = getDynaformsVars($aFields['PRO_UID'], false);
|
||||||
|
$dynFields = getDynafields($aFields['PRO_UID']);
|
||||||
|
|
||||||
|
foreach ($dynFields as $dfield) {
|
||||||
|
$aProcessFields[] = array(
|
||||||
|
'FIELD_UID' => $dfield['name'] . '-' . $dfield['type'],
|
||||||
|
'FIELD_NAME' => $dfield['name']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$resultList['processFields'] = $aProcessFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo G::json_encode($resultList);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
case 'fieldsList':
|
||||||
|
|
||||||
|
G::LoadClass('reportTables');
|
||||||
|
G::LoadClass('xmlfield_InputPM');
|
||||||
|
$aFields['FIELDS'] = array();
|
||||||
|
$oReportTable = new ReportTable();
|
||||||
|
$aFields = $oReportTable->load($_POST['REP_TAB_UID']);
|
||||||
|
$aTheFields = getDynaformsVars($aFields['PRO_UID'], false);
|
||||||
|
$oReportTables = new ReportTables();
|
||||||
|
$aVars = $oReportTables->getTableVars($_POST['REP_TAB_UID']);
|
||||||
|
$aFields['FIELDS'] = array();
|
||||||
|
|
||||||
|
foreach ($aTheFields as $aField) {
|
||||||
|
if (in_array($aField['sName'], $aVars)) {
|
||||||
|
|
||||||
|
$aResultFields[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sType'],
|
||||||
|
'FIELD_NAME' => $aField['sName'],
|
||||||
|
'FIELD_DYNAFORM' => $aField['sName']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$result->success = true;
|
||||||
|
$result->data=$aResultFields;
|
||||||
|
echo G::json_encode($result);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'getDbConnectionsList':
|
||||||
|
G::LoadClass ( 'dbConnections');
|
||||||
|
$proUid = $_POST['PRO_UID'];
|
||||||
|
$dbConn = new DbConnections();
|
||||||
|
$dbConnections = $dbConn->getConnectionsProUid($proUid);
|
||||||
|
$defaultConnections = array (
|
||||||
|
array('DBS_UID'=>'workflow', 'DBS_NAME'=>'Workflow'),
|
||||||
|
array('DBS_UID'=>'rp', 'DBS_NAME'=>'REPORT')
|
||||||
|
);
|
||||||
|
|
||||||
|
echo G::json_encode(array_merge($defaultConnections, $dbConnections));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'getProcessList':
|
||||||
|
require_once 'classes/model/Process.php';
|
||||||
|
|
||||||
|
$process = new Process();
|
||||||
|
echo G::json_encode($process->getAll());
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case 'save':
|
||||||
|
require_once 'classes/model/AdditionalTables.php';
|
||||||
|
require_once 'classes/model/Fields.php';
|
||||||
|
try {
|
||||||
|
$data = $_POST;
|
||||||
|
$data['columns'] = G::json_decode($_POST['columns']); //decofing data columns
|
||||||
|
|
||||||
|
// Reserved Words
|
||||||
|
$aReservedWords = array(
|
||||||
|
'ALTER', 'CLOSE', 'COMMIT', 'CREATE', 'DECLARE',
|
||||||
|
'DELETE', 'DROP', 'FETCH', 'FUNCTION', 'GRANT',
|
||||||
|
'INDEX', 'INSERT', 'OPEN', 'REVOKE', 'ROLLBACK',
|
||||||
|
'SELECT', 'SYNONYM', 'TABLE', 'UPDATE', 'VIEW',
|
||||||
|
'APP_UID', 'ROW'
|
||||||
|
);
|
||||||
|
|
||||||
|
$oAdditionalTables = new AdditionalTables();
|
||||||
|
$oFields = new Fields();
|
||||||
|
|
||||||
|
// verify if exists.
|
||||||
|
$aNameTable = $oAdditionalTables->loadByName($data['REP_TAB_NAME']);
|
||||||
|
|
||||||
|
$columns = $data['columns'];
|
||||||
|
//setting default columns
|
||||||
|
$defaultColumns = array();
|
||||||
|
$application = new stdClass(); //APPLICATION KEY
|
||||||
|
$application->field_name = 'APP_UID';
|
||||||
|
$application->field_label = 'APP_UID';
|
||||||
|
$application->field_type = 'VARCHAR';
|
||||||
|
$application->field_size = 32;
|
||||||
|
$application->field_dyn = '';
|
||||||
|
$application->field_key = 1;
|
||||||
|
$application->field_null = 0;
|
||||||
|
array_push($defaultColumns, $application);
|
||||||
|
|
||||||
|
$application = new stdClass(); //APP_NUMBER
|
||||||
|
$application->field_name = 'APP_NUMBER';
|
||||||
|
$application->field_label = 'APP_NUMBER';
|
||||||
|
$application->field_type = 'INT';
|
||||||
|
$application->field_size = 11;
|
||||||
|
$application->field_dyn = '';
|
||||||
|
$application->field_key = 1;
|
||||||
|
$application->field_null = 0;
|
||||||
|
array_push($defaultColumns, $application);
|
||||||
|
|
||||||
|
//if it is a grid report table
|
||||||
|
if ($data['REP_TAB_TYPE'] == 'GRID') { //GRID INDEX
|
||||||
|
$gridIndex = new stdClass();
|
||||||
|
$gridIndex->field_name = 'ROW';
|
||||||
|
$gridIndex->field_label = 'ROW';
|
||||||
|
$gridIndex->field_type = 'INT';
|
||||||
|
$gridIndex->field_size = '11';
|
||||||
|
$gridIndex->field_dyn = '';
|
||||||
|
$gridIndex->field_null = 0;
|
||||||
|
array_push($defaultColumns, $gridIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
$columns = array_merge($defaultColumns, $columns);
|
||||||
|
|
||||||
|
$repTabClassName = to_camel_case($data['REP_TAB_NAME']);
|
||||||
|
|
||||||
|
$repTabData = array(
|
||||||
|
'ADD_TAB_UID' => $data['REP_TAB_UID'],
|
||||||
|
'ADD_TAB_NAME' => $data['REP_TAB_NAME'],
|
||||||
|
'ADD_TAB_CLASS_NAME' => $repTabClassName,
|
||||||
|
'ADD_TAB_DESCRIPTION' => $data['REP_TAB_DSC'],
|
||||||
|
'ADD_TAB_PLG_UID' => '',
|
||||||
|
'DBS_UID' => $data['REP_TAB_CONNECTION'],
|
||||||
|
'PRO_UID' => $data['PRO_UID'],
|
||||||
|
'ADD_TAB_TYPE' => $data['REP_TAB_TYPE'],
|
||||||
|
'ADD_TAB_GRID' => $data['REP_TAB_GRID']
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($data['REP_TAB_UID'] == '') { //new report table
|
||||||
|
|
||||||
|
/** validations **/
|
||||||
|
if(is_array($aNameTable)) {
|
||||||
|
throw new Exception('The table "' . $data['REP_TAB_NAME'] . '" already exits.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array(strtoupper($data['REP_TAB_NAME']), $aReservedWords) ) {
|
||||||
|
throw new Exception('Could not create the table with the name "' . $data['REP_TAB_NAME'] . '" because it is a reserved word.');
|
||||||
|
}
|
||||||
|
//create record
|
||||||
|
$addTabUid = $oAdditionalTables->create($repTabData);
|
||||||
|
|
||||||
|
} else { //editing report table
|
||||||
|
$addTabUid = $data['REP_TAB_UID'];
|
||||||
|
//loading old data before update
|
||||||
|
$addTabBeforeData = $oAdditionalTables->load($addTabUid, true);
|
||||||
|
//updating record
|
||||||
|
$oAdditionalTables->update($repTabData);
|
||||||
|
|
||||||
|
//removing old data fields references
|
||||||
|
$oCriteria = new Criteria('workflow');
|
||||||
|
$oCriteria->add(FieldsPeer::ADD_TAB_UID, $data['REP_TAB_UID']);
|
||||||
|
$oCriteria->add(FieldsPeer::FLD_NAME, 'APP_UID', Criteria::NOT_EQUAL);
|
||||||
|
$oCriteria->add(FieldsPeer::FLD_NAME, 'ROW', Criteria::NOT_EQUAL);
|
||||||
|
FieldsPeer::doDelete($oCriteria);
|
||||||
|
|
||||||
|
//getting old fieldnames
|
||||||
|
$oldFields = array();
|
||||||
|
foreach ($addTabBeforeData['FIELDS'] as $field) {
|
||||||
|
if ($field['FLD_NAME'] == 'APP_UID' || $field['FLD_NAME'] == 'ROW') continue;
|
||||||
|
$oldFields[$field['FLD_UID']] = $field;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$aFields = array();
|
||||||
|
$fieldsList = array();
|
||||||
|
|
||||||
|
foreach ($columns as $i => $column) {
|
||||||
|
$field = array(
|
||||||
|
'FLD_UID' => $column->uid,
|
||||||
|
'FLD_INDEX' => $i,
|
||||||
|
'ADD_TAB_UID' => $addTabUid,
|
||||||
|
'FLD_NAME' => $column->field_name,
|
||||||
|
'FLD_DESCRIPTION' => $column->field_label,
|
||||||
|
'FLD_TYPE' => $column->field_type,
|
||||||
|
'FLD_SIZE' => $column->field_size,
|
||||||
|
'FLD_NULL' => isset($column->field_null) ? $column->field_null : 1,
|
||||||
|
'FLD_AUTO_INCREMENT' => 0,
|
||||||
|
'FLD_KEY' => isset($column->field_key) ? $column->field_key : 0,
|
||||||
|
'FLD_FOREIGN_KEY' => 0,
|
||||||
|
'FLD_FOREIGN_KEY_TABLE' => '',
|
||||||
|
'FLD_DYN_NAME' => $column->field_dyn,
|
||||||
|
'FLD_DYN_UID' => $column->field_uid,
|
||||||
|
'FLD_FILTER' => (isset($column->field_filter)? 1 : 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
$fieldUid = $oFields->create($field);
|
||||||
|
array_push($fieldsList, $field);
|
||||||
|
if($data['REP_TAB_UID'] == '') { //new
|
||||||
|
$aFields[] = array(
|
||||||
|
'sType' => $column->field_type,
|
||||||
|
'iSize' => $column->field_size,
|
||||||
|
'sFieldName' => $column->field_name,
|
||||||
|
'bNull' => isset($column->field_null) ? $defaultColumns[1]->field_null : 1,
|
||||||
|
'bAI' => 0,
|
||||||
|
'bPrimaryKey' => isset($column->field_key) ? $defaultColumns[1]->field_key : 0
|
||||||
|
);
|
||||||
|
} else { //editing
|
||||||
|
$aFields[$fieldUid] = $field;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($data['REP_TAB_UID'] == '') { //create a new report table
|
||||||
|
$oAdditionalTables->createTable($data['REP_TAB_NAME'], $data['REP_TAB_CONNECTION'], $aFields);
|
||||||
|
} else { //editing
|
||||||
|
//print_R($aFields);
|
||||||
|
$oAdditionalTables->updateTable($data['REP_TAB_NAME'], $data['REP_TAB_CONNECTION'], $aFields, $oldFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oAdditionalTables->createPropelClasses($data['REP_TAB_NAME'], $repTabClassName, $fieldsList, $addTabUid);
|
||||||
|
|
||||||
|
$oAdditionalTables->populateReportTable($data['REP_TAB_NAME'], $data['REP_TAB_CONNECTION'], $data['REP_TAB_TYPE'], $fieldsList, $data['PRO_UID'], $data['REP_TAB_GRID']);
|
||||||
|
|
||||||
|
|
||||||
|
$result->success = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$result->success = false;
|
||||||
|
$result->msg = $e->getMessage();
|
||||||
|
$result->trace = $e->getTraceAsString();
|
||||||
|
}
|
||||||
|
|
||||||
|
echo G::json_encode($result);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete':
|
||||||
|
require_once 'classes/model/AdditionalTables.php';
|
||||||
|
G::LoadClass('reportTables');
|
||||||
|
$rows = G::json_decode($_REQUEST['rows']);
|
||||||
|
$rp = new reportTables();
|
||||||
|
$at = new AdditionalTables();
|
||||||
|
|
||||||
|
try {
|
||||||
|
foreach ($rows as $row ) {
|
||||||
|
if($row->type == 'CLASSIC') {
|
||||||
|
$rp->deleteReportTable($row->id);
|
||||||
|
} else {
|
||||||
|
$at->deleteAll($row->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result->success = true;
|
||||||
|
} catch(Exception $e) {
|
||||||
|
$result->success = false;
|
||||||
|
$result->msg = $e->getMessage();
|
||||||
|
}
|
||||||
|
echo G::json_encode($result);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'list':
|
||||||
|
require_once 'classes/model/AdditionalTables.php';
|
||||||
|
G::LoadClass('configuration');
|
||||||
|
G::LoadClass('processMap');
|
||||||
|
$configigurations = new Configurations();
|
||||||
|
$oProcessMap = new processMap();
|
||||||
|
|
||||||
|
$config = $configigurations->getConfiguration('additionalTablesList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||||
|
$env = $configigurations->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||||
|
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
||||||
|
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||||
|
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||||
|
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
||||||
|
$pro_uid = isset($_REQUEST['pro_uid']) ? $_REQUEST['pro_uid'] : '';
|
||||||
|
|
||||||
|
$process = $pro_uid == '' ? array('not_equal'=>$pro_uid) : array('equal'=>$pro_uid);
|
||||||
|
$addTab = AdditionalTables::getAll($start, $limit, $filter, $process);
|
||||||
|
|
||||||
|
if ($pro_uid != '') {
|
||||||
|
$c = $oProcessMap->getReportTablesCriteria($pro_uid);
|
||||||
|
$oDataset = RoutePeer::doSelectRS($c);
|
||||||
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
$reportTablesOldList = array();
|
||||||
|
while($oDataset->next()) {
|
||||||
|
$reportTablesOldList[] = $oDataset->getRow();
|
||||||
|
}
|
||||||
|
$addTab['count'] += count($reportTablesOldList);
|
||||||
|
|
||||||
|
foreach ($reportTablesOldList as $i => $oldRepTab) {
|
||||||
|
$addTab['rows'][] = array(
|
||||||
|
'ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'],
|
||||||
|
'PRO_UID' => $oldRepTab['PRO_UID'],
|
||||||
|
'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'],
|
||||||
|
'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'],
|
||||||
|
'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'],
|
||||||
|
'TYPE' => 'CLASSIC'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
echo G::json_encode($addTab);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translates a string with underscores into camel case (e.g. first_name -> firstName)
|
||||||
|
* @param string $str String in underscore format
|
||||||
|
* @param bool $capitalise_first_char If true, capitalise the first char in $str
|
||||||
|
* @return string $str translated into camel caps
|
||||||
|
*/
|
||||||
|
function to_camel_case($str, $capitalise_first_char = true) {
|
||||||
|
if($capitalise_first_char) {
|
||||||
|
$str[0] = strtoupper($str[0]);
|
||||||
|
}
|
||||||
|
$func = create_function('$c', 'return strtoupper($c[1]);');
|
||||||
|
return preg_replace_callback('/_([a-z])/', $func, $str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getDynafields($proUid, $type = 'xmlform')
|
||||||
|
{
|
||||||
|
require_once 'classes/model/Dynaform.php';
|
||||||
|
$fields = array();
|
||||||
|
$fieldsNames = array();
|
||||||
|
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->add(ReportTablePeer::REP_TAB_NAME, $_POST['sTableName']);
|
$oCriteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
|
||||||
$oDataset = ReportTablePeer::doSelectRS($oCriteria);
|
$oCriteria->add(DynaformPeer::PRO_UID, $proUid);
|
||||||
|
$oCriteria->add(DynaformPeer::DYN_TYPE, $type);
|
||||||
|
$oDataset = DynaformPeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
if ($aRow = $oDataset->getRow()) {
|
|
||||||
echo '0';
|
$excludeFieldsList = array('title', 'subtitle', 'link', 'file', 'button', 'reset', 'submit',
|
||||||
|
'listbox', 'checkgroup', 'grid', 'javascript');
|
||||||
|
|
||||||
|
$labelFieldsTypeList = array('dropdown', 'checkbox', 'radiogroup', 'yesno');
|
||||||
|
|
||||||
|
while ($aRow = $oDataset->getRow()) {
|
||||||
|
if (file_exists(PATH_DYNAFORM . PATH_SEP . $aRow['DYN_FILENAME'] . '.xml')) {
|
||||||
|
$G_FORM = new Form($aRow['DYN_FILENAME'], PATH_DYNAFORM, SYS_LANG);
|
||||||
|
|
||||||
|
if ($G_FORM->type == 'xmlform' || $G_FORM->type == '') {
|
||||||
|
foreach($G_FORM->fields as $fieldName => $fieldNode) {
|
||||||
|
if (!in_array($fieldNode->type, $excludeFieldsList) && !in_array($fieldName, $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
|
||||||
|
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
echo '1';
|
return $fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getGridDynafields($proUid, $gridId)
|
||||||
|
{
|
||||||
|
$fields = array();
|
||||||
|
$fieldsNames = array();
|
||||||
|
$excludeFieldsList = array('title', 'subtitle', 'link', 'file', 'button', 'reset', 'submit',
|
||||||
|
'listbox', 'checkgroup', 'grid', 'javascript');
|
||||||
|
|
||||||
|
$labelFieldsTypeList = array('dropdown', 'checkbox', 'radiogroup', 'yesno');
|
||||||
|
|
||||||
|
$G_FORM = new Form($proUid . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||||
|
|
||||||
|
if ($G_FORM->type == 'grid') {
|
||||||
|
foreach($G_FORM->fields as $fieldName => $fieldNode) {
|
||||||
|
if (!in_array($fieldNode->type, $excludeFieldsList) && !in_array($fieldName, $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
|
||||||
|
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
return $fields;
|
||||||
?>
|
}
|
||||||
|
|
||||||
|
function getGridFields($proUid)
|
||||||
|
{
|
||||||
|
$aFields = array();
|
||||||
|
$aFieldsNames = array();
|
||||||
|
require_once 'classes/model/Dynaform.php';
|
||||||
|
$oCriteria = new Criteria('workflow');
|
||||||
|
$oCriteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
|
||||||
|
$oCriteria->add(DynaformPeer::PRO_UID, $proUid);
|
||||||
|
$oDataset = DynaformPeer::doSelectRS($oCriteria);
|
||||||
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
$oDataset->next();
|
||||||
|
while ($aRow = $oDataset->getRow()) {
|
||||||
|
$G_FORM = new Form($aRow['DYN_FILENAME'], PATH_DYNAFORM, SYS_LANG);
|
||||||
|
if ($G_FORM->type == 'xmlform') {
|
||||||
|
foreach($G_FORM->fields as $k => $v) {
|
||||||
|
if ($v->type == 'grid') {
|
||||||
|
if (!in_array($k, $aFieldsNames)) {
|
||||||
|
$aFields[] = array('name' => $k, 'xmlform' => str_replace($proUid . '/', '', $v->xmlGrid));
|
||||||
|
$aFieldsNames[] = $k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$oDataset->next();
|
||||||
|
}
|
||||||
|
return $aFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAllFields($filepath, $includeTypes=array(), $excludeTypes=array())
|
||||||
|
{
|
||||||
|
$G_FORM = new Form($filepath, PATH_DYNAFORM, SYS_LANG);
|
||||||
|
$fields = array();
|
||||||
|
$fieldsNames = array();
|
||||||
|
$labelFieldsTypeList = array('dropdown', 'checkbox', 'radiogroup', 'yesno');
|
||||||
|
|
||||||
|
if ($G_FORM->type == 'xmlform' || $G_FORM->type == '') {
|
||||||
|
|
||||||
|
foreach($G_FORM->fields as $fieldName => $fieldNode) {
|
||||||
|
if (!in_array($fieldNode->type, $excludeTypes)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($includeTypes) > 0) {
|
||||||
|
if (in_array($fieldNode->type, $includeTypes) && !in_array($fieldName, $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
|
||||||
|
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($fieldName, $fieldsNames)) {
|
||||||
|
|
||||||
|
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
|
||||||
|
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||||
|
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||||
|
$fieldsNames[] = $fieldName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -68,5 +68,5 @@ $_SESSION['_DBArray'] = $_DBArray;
|
|||||||
$aFields['LANG'] = SYS_LANG;
|
$aFields['LANG'] = SYS_LANG;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reportTables/reportTables_Edit', '', $aFields, '../reportTables/reportTables_Save');
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reportTables/reportTables_Edit', '', $aFields, '../reportTables/reportTables_Save');
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'blank');
|
||||||
?>
|
?>
|
||||||
@@ -33,13 +33,13 @@ var expander;
|
|||||||
var cmodel;
|
var cmodel;
|
||||||
var infoGrid;
|
var infoGrid;
|
||||||
var viewport;
|
var viewport;
|
||||||
var smodel;
|
var smodel;
|
||||||
|
|
||||||
var rowsSelected;
|
var rowsSelected;
|
||||||
|
|
||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
Ext.QuickTips.init();
|
Ext.QuickTips.init();
|
||||||
|
|
||||||
pageSize = parseInt(CONFIG.pageSize);
|
pageSize = parseInt(CONFIG.pageSize);
|
||||||
|
|
||||||
newButton = new Ext.Action({
|
newButton = new Ext.Action({
|
||||||
@@ -61,14 +61,14 @@ Ext.onReady(function(){
|
|||||||
handler: DeletePMTable,
|
handler: DeletePMTable,
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
importButton = new Ext.Action({
|
importButton = new Ext.Action({
|
||||||
text: _('ID_IMPORT'),
|
text: _('ID_IMPORT'),
|
||||||
iconCls: 'silk-add',
|
iconCls: 'silk-add',
|
||||||
icon: '/images/import.gif',
|
icon: '/images/import.gif',
|
||||||
handler: ImportPMTable
|
handler: ImportPMTable
|
||||||
});
|
});
|
||||||
|
|
||||||
exportButton = new Ext.Action({
|
exportButton = new Ext.Action({
|
||||||
text: _('ID_EXPORT'),
|
text: _('ID_EXPORT'),
|
||||||
iconCls: 'silk-add',
|
iconCls: 'silk-add',
|
||||||
@@ -76,24 +76,24 @@ Ext.onReady(function(){
|
|||||||
handler: ExportPMTable,
|
handler: ExportPMTable,
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dataButton = new Ext.Action({
|
dataButton = new Ext.Action({
|
||||||
text: _('ID_DATA'),
|
text: ' ' + _('ID_DATA'),
|
||||||
iconCls: 'silk-add',
|
iconCls: 'silk-add',
|
||||||
icon: '/images/cases-draft.png',
|
icon: '/images/icon-pmtables.png',
|
||||||
handler: PMTableData,
|
handler: PMTableData,
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
searchButton = new Ext.Action({
|
searchButton = new Ext.Action({
|
||||||
text: _('ID_SEARCH'),
|
text: _('ID_SEARCH'),
|
||||||
handler: DoSearch
|
handler: DoSearch
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenu = new Ext.menu.Menu({
|
contextMenu = new Ext.menu.Menu({
|
||||||
items: [editButton, deleteButton,'-',dataButton,'-',exportButton]
|
items: [editButton, deleteButton,'-',dataButton,'-',exportButton]
|
||||||
});
|
});
|
||||||
|
|
||||||
searchText = new Ext.form.TextField ({
|
searchText = new Ext.form.TextField ({
|
||||||
id: 'searchTxt',
|
id: 'searchTxt',
|
||||||
ctCls:'pm_search_text_field',
|
ctCls:'pm_search_text_field',
|
||||||
@@ -112,19 +112,19 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
clearTextButton = new Ext.Action({
|
clearTextButton = new Ext.Action({
|
||||||
text: 'X',
|
text: 'X',
|
||||||
ctCls:'pm_search_x_button',
|
ctCls:'pm_search_x_button',
|
||||||
handler: GridByDefault
|
handler: GridByDefault
|
||||||
});
|
});
|
||||||
|
|
||||||
storePageSize = new Ext.data.SimpleStore({
|
storePageSize = new Ext.data.SimpleStore({
|
||||||
fields: ['size'],
|
fields: ['size'],
|
||||||
data: [['20'],['30'],['40'],['50'],['100']],
|
data: [['20'],['30'],['40'],['50'],['100']],
|
||||||
autoLoad: true
|
autoLoad: true
|
||||||
});
|
});
|
||||||
|
|
||||||
comboPageSize = new Ext.form.ComboBox({
|
comboPageSize = new Ext.form.ComboBox({
|
||||||
typeAhead : false,
|
typeAhead : false,
|
||||||
mode : 'local',
|
mode : 'local',
|
||||||
@@ -142,7 +142,7 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
comboPageSize.setValue(pageSize);
|
comboPageSize.setValue(pageSize);
|
||||||
|
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ Ext.onReady(function(){
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
smodel = new Ext.grid.CheckboxSelectionModel({
|
smodel = new Ext.grid.CheckboxSelectionModel({
|
||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
@@ -188,7 +188,7 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cmodel = new Ext.grid.ColumnModel({
|
cmodel = new Ext.grid.ColumnModel({
|
||||||
defaults: {
|
defaults: {
|
||||||
width: 50,
|
width: 50,
|
||||||
@@ -201,7 +201,7 @@ Ext.onReady(function(){
|
|||||||
{header: _('ID_DESCRIPTION'), dataIndex: 'ADD_TAB_DESCRIPTION', width: 400, hidden:false, align:'left'}
|
{header: _('ID_DESCRIPTION'), dataIndex: 'ADD_TAB_DESCRIPTION', width: 400, hidden:false, align:'left'}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
bbarpaging = new Ext.PagingToolbar({
|
bbarpaging = new Ext.PagingToolbar({
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
store: store,
|
store: store,
|
||||||
@@ -230,7 +230,7 @@ Ext.onReady(function(){
|
|||||||
store: store,
|
store: store,
|
||||||
cm: cmodel,
|
cm: cmodel,
|
||||||
sm: smodel,
|
sm: smodel,
|
||||||
tbar:[newButton,'-', editButton, deleteButton,'-', dataButton,'-' , importButton, exportButton,{xtype: 'tbfill'},searchText,clearTextButton,searchButton],
|
tbar:[newButton, '-', editButton, deleteButton,'-', dataButton,'-' , importButton, exportButton,{xtype: 'tbfill'},searchText,clearTextButton,searchButton],
|
||||||
bbar: bbarpaging,
|
bbar: bbarpaging,
|
||||||
listeners: {
|
listeners: {
|
||||||
rowdblclick: PMTableData,
|
rowdblclick: PMTableData,
|
||||||
@@ -243,15 +243,15 @@ Ext.onReady(function(){
|
|||||||
groupTextTpl: '{text}'
|
groupTextTpl: '{text}'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
infoGrid.on('rowcontextmenu',
|
infoGrid.on('rowcontextmenu',
|
||||||
function (grid, rowIndex, evt) {
|
function (grid, rowIndex, evt) {
|
||||||
var sm = grid.getSelectionModel();
|
var sm = grid.getSelectionModel();
|
||||||
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
|
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
|
||||||
},
|
},
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
||||||
infoGrid.on('contextmenu', function(evt){evt.preventDefault();}, this);
|
infoGrid.on('contextmenu', function(evt){evt.preventDefault();}, this);
|
||||||
infoGrid.addListener('rowcontextmenu',onMessageContextMenu, this);
|
infoGrid.addListener('rowcontextmenu',onMessageContextMenu, this);
|
||||||
|
|
||||||
@@ -289,6 +289,10 @@ NewPMTable = function(){
|
|||||||
location.href = 'additionalTablesNew';
|
location.href = 'additionalTablesNew';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
newReportTable = function(){
|
||||||
|
location.href = '../reportTables/new';
|
||||||
|
};
|
||||||
|
|
||||||
//Load PM Table Edition Forms
|
//Load PM Table Edition Forms
|
||||||
EditPMTable = function(){
|
EditPMTable = function(){
|
||||||
iGrid = Ext.getCmp('infoGrid');
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
@@ -345,7 +349,7 @@ UpdatePageConfig = function(pageSize){
|
|||||||
|
|
||||||
//Do Search Function
|
//Do Search Function
|
||||||
DoSearch = function(){
|
DoSearch = function(){
|
||||||
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
||||||
};
|
};
|
||||||
|
|
||||||
//Load Grid By Default
|
//Load Grid By Default
|
||||||
|
|||||||
69
workflow/engine/templates/reportTables/edit.html
Normal file
69
workflow/engine/templates/reportTables/edit.html
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<html>
|
||||||
|
<header>
|
||||||
|
<style type="text/css">
|
||||||
|
/*!
|
||||||
|
* Ext JS Library 3.3.3
|
||||||
|
* Copyright(c) 2006-2011 Sencha Inc.
|
||||||
|
* licensing@sencha.com
|
||||||
|
* http://www.sencha.com/license
|
||||||
|
*/
|
||||||
|
.ext-ie .x-row-editor .x-form-text {
|
||||||
|
margin:0 !important;
|
||||||
|
}
|
||||||
|
.x-row-editor-header {
|
||||||
|
height:2px;
|
||||||
|
overflow:hidden;
|
||||||
|
background: transparent url(../images/row-editor-bg.gif) repeat-x 0 0;
|
||||||
|
}
|
||||||
|
.x-row-editor-footer {
|
||||||
|
height:2px;
|
||||||
|
overflow:hidden;
|
||||||
|
background: transparent url(../images/row-editor-bg.gif) repeat-x 0 -2px;
|
||||||
|
}
|
||||||
|
.ext-ie .x-row-editor-footer {
|
||||||
|
margin-top:-1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-row-editor-body {
|
||||||
|
overflow:hidden;
|
||||||
|
zoom:1;
|
||||||
|
background: #ebf2fb;
|
||||||
|
padding-top:2px;
|
||||||
|
}
|
||||||
|
.x-row-editor .x-btns {
|
||||||
|
position:absolute;
|
||||||
|
top:28px;
|
||||||
|
left:20px;
|
||||||
|
padding-left:5px;
|
||||||
|
background: transparent url(../images/row-editor-btns.gif) no-repeat 0 0;
|
||||||
|
}
|
||||||
|
.x-row-editor .x-btns .x-plain-bwrap {
|
||||||
|
padding-right:5px;
|
||||||
|
background: transparent url(../images/row-editor-btns.gif) no-repeat right -31px;
|
||||||
|
}
|
||||||
|
.x-row-editor .x-btns .x-plain-body {
|
||||||
|
background: transparent url(../images/row-editor-btns.gif) repeat-x 0 -62px;
|
||||||
|
height:31px;
|
||||||
|
}
|
||||||
|
.x-row-editor .x-btns .x-table-layout-cell {
|
||||||
|
padding:3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fixes for IE6/7 trigger fields */
|
||||||
|
.ext-ie6 .x-row-editor .x-form-field-wrap .x-form-trigger, .ext-ie7 .x-row-editor .x-form-field-wrap .x-form-trigger {
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ext-ie6 .x-row-editor .x-form-field-trigger-wrap, .ext-ie7 .x-row-editor .x-form-field-trigger-wrap {
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorTip .x-tip-body ul{
|
||||||
|
list-style-type:disc;
|
||||||
|
margin-left:15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
</html>
|
||||||
1199
workflow/engine/templates/reportTables/edit.js
Normal file
1199
workflow/engine/templates/reportTables/edit.js
Normal file
File diff suppressed because it is too large
Load Diff
3
workflow/engine/templates/reportTables/main.html
Normal file
3
workflow/engine/templates/reportTables/main.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<div style="padding: 15px">
|
||||||
|
<div id="list-panel"></div>
|
||||||
|
</div>
|
||||||
492
workflow/engine/templates/reportTables/main.js
Normal file
492
workflow/engine/templates/reportTables/main.js
Normal file
@@ -0,0 +1,492 @@
|
|||||||
|
/*
|
||||||
|
* @author: Qennix
|
||||||
|
* Jan 10th, 2011
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Keyboard Events
|
||||||
|
new Ext.KeyMap(document, {
|
||||||
|
key: Ext.EventObject.F5,
|
||||||
|
fn: function(keycode, e) {
|
||||||
|
if (! e.ctrlKey) {
|
||||||
|
if (Ext.isIE) {
|
||||||
|
// IE6 doesn't allow cancellation of the F5 key, so trick it into
|
||||||
|
// thinking some other key was pressed (backspace in this case)
|
||||||
|
e.browserEvent.keyCode = 8;
|
||||||
|
}
|
||||||
|
e.stopEvent();
|
||||||
|
document.location = document.location;
|
||||||
|
}else{
|
||||||
|
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var newButton;
|
||||||
|
var newReportTableButton;
|
||||||
|
var editButton;
|
||||||
|
var deleteButton;
|
||||||
|
var importButton;
|
||||||
|
var exportButton;
|
||||||
|
var dataButton;
|
||||||
|
|
||||||
|
var store;
|
||||||
|
var expander;
|
||||||
|
var cmodel;
|
||||||
|
var infoGrid;
|
||||||
|
var viewport;
|
||||||
|
var smodel;
|
||||||
|
|
||||||
|
var rowsSelected;
|
||||||
|
|
||||||
|
Ext.onReady(function(){
|
||||||
|
Ext.QuickTips.init();
|
||||||
|
|
||||||
|
pageSize = parseInt(CONFIG.pageSize);
|
||||||
|
|
||||||
|
newButton = new Ext.Action({
|
||||||
|
text: _('ID_NEW_ADD_TABLE'),
|
||||||
|
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
|
handler: NewPMTable
|
||||||
|
});
|
||||||
|
|
||||||
|
newReportTableButton = new Ext.Action({
|
||||||
|
text: 'New',
|
||||||
|
//iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
|
icon: '/images/addc.png',
|
||||||
|
handler: newReportTable
|
||||||
|
});
|
||||||
|
|
||||||
|
editButton = new Ext.Action({
|
||||||
|
text: _('ID_EDIT'),
|
||||||
|
//iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
|
icon: '/images/icon-edit.png',
|
||||||
|
handler: EditPMTable,
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
|
deleteButton = new Ext.Action({
|
||||||
|
text: _('ID_DELETE'),
|
||||||
|
//iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
|
icon: '/images/delete-16x16.gif',
|
||||||
|
handler: DeletePMTable,
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
|
importButton = new Ext.Action({
|
||||||
|
text: _('ID_IMPORT'),
|
||||||
|
iconCls: 'silk-add',
|
||||||
|
icon: '/images/import.gif',
|
||||||
|
handler: ImportPMTable
|
||||||
|
});
|
||||||
|
|
||||||
|
exportButton = new Ext.Action({
|
||||||
|
text: _('ID_EXPORT'),
|
||||||
|
iconCls: 'silk-add',
|
||||||
|
icon: '/images/export.png',
|
||||||
|
handler: ExportPMTable,
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
|
dataButton = new Ext.Action({
|
||||||
|
text: ' ' + _('ID_DATA'),
|
||||||
|
iconCls: 'silk-add',
|
||||||
|
icon: '/images/icon-pmtables.png',
|
||||||
|
handler: PMTableData,
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
|
searchButton = new Ext.Action({
|
||||||
|
text: _('ID_SEARCH'),
|
||||||
|
handler: DoSearch
|
||||||
|
});
|
||||||
|
|
||||||
|
contextMenu = new Ext.menu.Menu({
|
||||||
|
items: [
|
||||||
|
editButton,
|
||||||
|
deleteButton
|
||||||
|
//dataButton,'-',
|
||||||
|
//exportButton
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
searchText = new Ext.form.TextField ({
|
||||||
|
id: 'searchTxt',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 150,
|
||||||
|
emptyText: _('ID_ENTER_SEARCH_TERM'),
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearch();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
focus: function(f,e) {
|
||||||
|
var row = infoGrid.getSelectionModel().getSelected();
|
||||||
|
infoGrid.getSelectionModel().deselectRow(infoGrid.getStore().indexOf(row));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButton = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefault
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButton1 = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefault1
|
||||||
|
});
|
||||||
|
|
||||||
|
storePageSize = new Ext.data.SimpleStore({
|
||||||
|
fields: ['size'],
|
||||||
|
data: [['20'],['30'],['40'],['50'],['100']],
|
||||||
|
autoLoad: true
|
||||||
|
});
|
||||||
|
|
||||||
|
comboPageSize = new Ext.form.ComboBox({
|
||||||
|
typeAhead : false,
|
||||||
|
mode : 'local',
|
||||||
|
triggerAction : 'all',
|
||||||
|
store: storePageSize,
|
||||||
|
valueField: 'size',
|
||||||
|
displayField: 'size',
|
||||||
|
width: 50,
|
||||||
|
editable: false,
|
||||||
|
listeners:{
|
||||||
|
select: function(c,d,i){
|
||||||
|
UpdatePageConfig(d.data['size']);
|
||||||
|
bbarpaging.pageSize = parseInt(d.data['size']);
|
||||||
|
bbarpaging.moveFirst();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
comboPageSize.setValue(pageSize);
|
||||||
|
|
||||||
|
cmodelColumns = new Array();
|
||||||
|
|
||||||
|
cmodelColumns.push({id:'ADD_TAB_UID', dataIndex: 'ADD_TAB_UID', hidden:true, hideable:false});
|
||||||
|
cmodelColumns.push({header: _('ID_NAME'), dataIndex: 'ADD_TAB_NAME', width: 300, align:'left', renderer: function(v,p,r){
|
||||||
|
return r.get('TYPE') == 'CLASSIC'? v + ' <span style="font-size:9px; color:green">(old version)</font>' : v;
|
||||||
|
}});
|
||||||
|
cmodelColumns.push({header: _('ID_DESCRIPTION'), dataIndex: 'ADD_TAB_DESCRIPTION', width: 400, hidden:false, align:'left'});
|
||||||
|
if (PRO_UID === false) {
|
||||||
|
cmodelColumns.push({header: _('ID_PROCESS'), dataIndex: 'PRO_TITLE', width: 300, align:'left'});
|
||||||
|
}
|
||||||
|
|
||||||
|
cmodelColumns.push({header: _('ID_TYPE'), dataIndex: 'ADD_TAB_TYPE', width: 400, hidden:true, align:'left'});
|
||||||
|
cmodelColumns.push({header: _('ID_TYPE'), dataIndex: 'ADD_TAB_TYPE', width: 150, hidden:false, align:'left'});
|
||||||
|
|
||||||
|
cmodel = new Ext.grid.ColumnModel({
|
||||||
|
defaults: {
|
||||||
|
width: 50,
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
columns: cmodelColumns
|
||||||
|
});
|
||||||
|
|
||||||
|
store = new Ext.data.GroupingStore( {
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url: 'reportTables_Ajax?action=list' + (PRO_UID !== false ? '&pro_uid=' + PRO_UID : '')
|
||||||
|
}),
|
||||||
|
reader : new Ext.data.JsonReader({
|
||||||
|
root: 'rows',
|
||||||
|
totalProperty: 'count',
|
||||||
|
fields : [
|
||||||
|
{name : 'ADD_TAB_UID'},
|
||||||
|
{name : 'ADD_TAB_NAME'},
|
||||||
|
{name : 'ADD_TAB_DESCRIPTION'},
|
||||||
|
{name : 'PRO_TITLE'},
|
||||||
|
{name : 'TYPE'},
|
||||||
|
{name : 'ADD_TAB_TYPE'}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
smodel = new Ext.grid.CheckboxSelectionModel({
|
||||||
|
listeners:{
|
||||||
|
selectionchange: function(sm){
|
||||||
|
var count_rows = sm.getCount();
|
||||||
|
switch(count_rows){
|
||||||
|
case 0:
|
||||||
|
editButton.disable();
|
||||||
|
deleteButton.disable();
|
||||||
|
exportButton.disable();
|
||||||
|
dataButton.disable();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
editButton.enable();
|
||||||
|
deleteButton.enable();
|
||||||
|
exportButton.enable();
|
||||||
|
dataButton.enable();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
editButton.disable();
|
||||||
|
deleteButton.enable();
|
||||||
|
exportButton.enable();
|
||||||
|
dataButton.disable();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bbarpaging = new Ext.PagingToolbar({
|
||||||
|
pageSize: pageSize,
|
||||||
|
store: store,
|
||||||
|
displayInfo: true,
|
||||||
|
displayMsg: _('ID_GRID_PAGE_DISPLAYING_PMTABLES_MESSAGE') + ' ',
|
||||||
|
emptyMsg: _('ID_GRID_PAGE_NO_PMTABLES_MESSAGE'),
|
||||||
|
items: ['-',_('ID_PAGE_SIZE')+':',comboPageSize]
|
||||||
|
});
|
||||||
|
|
||||||
|
processStore = new Ext.data.Store( {
|
||||||
|
autoLoad: true,
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url: '../reportTables/reportTables_Ajax',
|
||||||
|
method : 'POST'
|
||||||
|
}),
|
||||||
|
baseParams : {
|
||||||
|
action: 'getProcessList'
|
||||||
|
},
|
||||||
|
reader : new Ext.data.JsonReader( {
|
||||||
|
fields : [{name : 'PRO_UID'}, {name : 'PRO_TITLE'},{name : 'PRO_DESCRIPTION'}]
|
||||||
|
}),
|
||||||
|
listeners: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
processComboBox = new Ext.form.ComboBox({
|
||||||
|
id: 'PROCESS',
|
||||||
|
fieldLabel : 'Process',
|
||||||
|
hiddenName : 'PRO_UID',
|
||||||
|
store : processStore,
|
||||||
|
emptyText: 'Select a process',
|
||||||
|
valueField : 'PRO_UID',
|
||||||
|
displayField : 'PRO_TITLE',
|
||||||
|
|
||||||
|
//width: 180,
|
||||||
|
editable : true,
|
||||||
|
typeAhead: true,
|
||||||
|
mode: 'local',
|
||||||
|
autocomplete: true,
|
||||||
|
triggerAction: 'all',
|
||||||
|
forceSelection: false,
|
||||||
|
|
||||||
|
listeners:{
|
||||||
|
select: doSearchByProcess
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
tbar = new Array();
|
||||||
|
tbar.push(newReportTableButton);
|
||||||
|
tbar.push('-');
|
||||||
|
tbar.push(editButton);
|
||||||
|
tbar.push(deleteButton)
|
||||||
|
tbar.push('-');
|
||||||
|
//dataButton,'-' ,
|
||||||
|
tbar.push({xtype: 'tbfill'})
|
||||||
|
if (PRO_UID === false) {
|
||||||
|
tbar.push('process');
|
||||||
|
tbar.push(processComboBox);
|
||||||
|
tbar.push(clearTextButton1);
|
||||||
|
}
|
||||||
|
|
||||||
|
tbar.push('-');
|
||||||
|
tbar.push(searchText);
|
||||||
|
tbar.push(clearTextButton);
|
||||||
|
tbar.push(searchButton);
|
||||||
|
|
||||||
|
|
||||||
|
infoGrid = new Ext.grid.GridPanel({
|
||||||
|
region: 'center',
|
||||||
|
layout: 'fit',
|
||||||
|
id: 'infoGrid',
|
||||||
|
height:100,
|
||||||
|
autoWidth : true,
|
||||||
|
title : _('ID_REPORT_TABLES'),
|
||||||
|
stateful : true,
|
||||||
|
stateId : 'grid',
|
||||||
|
enableColumnResize: true,
|
||||||
|
enableHdMenu: true,
|
||||||
|
frame:false,
|
||||||
|
columnLines: false,
|
||||||
|
viewConfig: {
|
||||||
|
forceFit:true
|
||||||
|
},
|
||||||
|
store: store,
|
||||||
|
cm: cmodel,
|
||||||
|
sm: smodel,
|
||||||
|
tbar: tbar,
|
||||||
|
bbar: bbarpaging,
|
||||||
|
listeners: {
|
||||||
|
rowdblclick: EditPMTable,
|
||||||
|
render: function(){
|
||||||
|
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING_GRID')});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
view: new Ext.grid.GroupingView({
|
||||||
|
forceFit:true,
|
||||||
|
groupTextTpl: '{text}'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
infoGrid.on('rowcontextmenu',
|
||||||
|
function (grid, rowIndex, evt) {
|
||||||
|
var sm = grid.getSelectionModel();
|
||||||
|
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
|
||||||
|
},
|
||||||
|
this
|
||||||
|
);
|
||||||
|
|
||||||
|
infoGrid.on('contextmenu', function(evt){evt.preventDefault();}, this);
|
||||||
|
infoGrid.addListener('rowcontextmenu',onMessageContextMenu, this);
|
||||||
|
|
||||||
|
infoGrid.store.load();
|
||||||
|
|
||||||
|
viewport = new Ext.Viewport({
|
||||||
|
layout: 'fit',
|
||||||
|
autoScroll: false,
|
||||||
|
items: [
|
||||||
|
infoGrid
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Funtion Handles Context Menu Opening
|
||||||
|
onMessageContextMenu = function (grid, rowIndex, e) {
|
||||||
|
e.stopEvent();
|
||||||
|
var coords = e.getXY();
|
||||||
|
contextMenu.showAt([coords[0], coords[1]]);
|
||||||
|
};
|
||||||
|
|
||||||
|
/////JS FUNCTIONS
|
||||||
|
|
||||||
|
//Capitalize String Function
|
||||||
|
capitalize = function(s){
|
||||||
|
s = s.toLowerCase();
|
||||||
|
return s.replace( /(^|\s)([a-z])/g , function(m,p1,p2){ return p1+p2.toUpperCase(); } );
|
||||||
|
};
|
||||||
|
|
||||||
|
//Do Nothing Function
|
||||||
|
DoNothing = function(){};
|
||||||
|
|
||||||
|
//Load New PM Table Forms
|
||||||
|
NewPMTable = function(){
|
||||||
|
location.href = 'additionalTablesNew';
|
||||||
|
};
|
||||||
|
|
||||||
|
newReportTable = function(){
|
||||||
|
if(PRO_UID !== false)
|
||||||
|
location.href = '../reportTables/edit?PRO_UID='+PRO_UID;
|
||||||
|
else
|
||||||
|
location.href = '../reportTables/edit';
|
||||||
|
};
|
||||||
|
|
||||||
|
//Load PM Table Edition Forms
|
||||||
|
EditPMTable = function(){
|
||||||
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
|
row = iGrid.getSelectionModel().getSelected();
|
||||||
|
|
||||||
|
if (row.data.TYPE != 'CLASSIC') {
|
||||||
|
if(PRO_UID !== false)
|
||||||
|
location.href = 'edit?PRO_UID='+PRO_UID+'&id='+row.data.ADD_TAB_UID
|
||||||
|
else
|
||||||
|
location.href = 'edit?id='+row.data.ADD_TAB_UID
|
||||||
|
} else { //old rep tab
|
||||||
|
location.href = '../reportTables/reportTables_Edit?REP_TAB_UID='+row.data.ADD_TAB_UID
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//Confirm PM Table Deletion Tasks
|
||||||
|
DeletePMTable = function(){
|
||||||
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
|
rowsSelected = iGrid.getSelectionModel().getSelections();
|
||||||
|
var selections = new Array();
|
||||||
|
for(i=0; i<rowsSelected.length; i++){
|
||||||
|
selections[i] = {id: rowsSelected[i].get('ADD_TAB_UID'), type: rowsSelected[i].get('TYPE')};
|
||||||
|
}
|
||||||
|
|
||||||
|
Ext.Msg.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_DELETE_PM_TABLE'),
|
||||||
|
function(btn, text){
|
||||||
|
if (btn=="yes"){
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'reportTables_Ajax',
|
||||||
|
params: {
|
||||||
|
action: 'delete',
|
||||||
|
rows: Ext.util.JSON.encode(selections)
|
||||||
|
},
|
||||||
|
success: function(resp){
|
||||||
|
result = Ext.util.JSON.decode(resp.responseText);
|
||||||
|
if (result.success) {
|
||||||
|
iGrid.getStore().reload();
|
||||||
|
PMExt.notify('DELETION SUCCESSFULLY', 'All records was deleted successfully!');
|
||||||
|
} else {
|
||||||
|
Ext.Msg.alert( _('ID_ERROR'), result.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
failure: function(obj, resp){
|
||||||
|
Ext.Msg.alert( _('ID_ERROR'), resp.result.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//Load Import PM Table Form
|
||||||
|
ImportPMTable = function(){
|
||||||
|
location.href = 'additionalTablesToImport';
|
||||||
|
};
|
||||||
|
|
||||||
|
//Load Export PM Tables Form
|
||||||
|
ExportPMTable = function(){
|
||||||
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
|
rowsSelected = iGrid.getSelectionModel().getSelections();
|
||||||
|
location.href = 'additionalTablesToExport?sUID='+RetrieveRowsID(rowsSelected)+'&rand='+Math.random();
|
||||||
|
};
|
||||||
|
|
||||||
|
//Load PM TAble Data
|
||||||
|
PMTableData = function(){
|
||||||
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
|
rowsSelected = iGrid.getSelectionModel().getSelections();
|
||||||
|
location.href = 'additionalTablesData?sUID='+RetrieveRowsID(rowsSelected)+'&rand='+Math.random();
|
||||||
|
};
|
||||||
|
|
||||||
|
//Gets UIDs from a array of rows
|
||||||
|
RetrieveRowsID = function(rows){
|
||||||
|
var arrAux = new Array();
|
||||||
|
for(var c=0; c<rows.length; c++){
|
||||||
|
arrAux[c] = rows[c].get('ADD_TAB_UID');
|
||||||
|
}
|
||||||
|
return arrAux.join(',');
|
||||||
|
};
|
||||||
|
//Update Page Size Configuration
|
||||||
|
UpdatePageConfig = function(pageSize){
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'additionalTablesAjax',
|
||||||
|
params: {action:'updatePageSize', size: pageSize}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//Do Search Function
|
||||||
|
DoSearch = function(){
|
||||||
|
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
||||||
|
};
|
||||||
|
|
||||||
|
//Do Search by process
|
||||||
|
doSearchByProcess = function(){
|
||||||
|
infoGrid.store.load({params: {pro_uid: Ext.getCmp('PROCESS').getValue()}});
|
||||||
|
};
|
||||||
|
|
||||||
|
//Load Grid By Default
|
||||||
|
GridByDefault = function(){
|
||||||
|
searchText.reset();
|
||||||
|
infoGrid.store.load();
|
||||||
|
};
|
||||||
|
|
||||||
|
GridByDefault1 = function(){
|
||||||
|
Ext.getCmp('PROCESS').setValue('');
|
||||||
|
infoGrid.store.load();
|
||||||
|
};
|
||||||
42
workflow/engine/templates/reportTables/mainLoad.php
Normal file
42
workflow/engine/templates/reportTables/mainLoad.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<html>
|
||||||
|
<style>
|
||||||
|
.Footer{
|
||||||
|
font :normal 8pt sans-serif,Tahoma,MiscFixed !important;
|
||||||
|
color :#000 !important;
|
||||||
|
height :0px !important;
|
||||||
|
text-align :center !important;
|
||||||
|
}
|
||||||
|
.Footer .content{
|
||||||
|
color :black !important;
|
||||||
|
padding :0px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body onresize="autoResizeScreen()" onload="autoResizeScreen()">
|
||||||
|
<iframe name="frameMain" id="frameMain" src ="../reportTables/mainInit?PRO_UID=<?php echo $_GET['gui']?>" width="99%" height="200" frameborder="0">
|
||||||
|
<p>Your browser does not support iframes.</p>
|
||||||
|
</iframe>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
oClientWinSize = getClientWindowSize();
|
||||||
|
h = getStyle(document.getElementById('pm_menu'),'top');
|
||||||
|
h = h.replace("px", "");
|
||||||
|
h = parseInt(h) + 18;
|
||||||
|
if ( document.getElementById('pm_submenu') )
|
||||||
|
document.getElementById('pm_submenu').style.display = 'none';
|
||||||
|
document.documentElement.style.overflowY = 'hidden';
|
||||||
|
function autoResizeScreen() {
|
||||||
|
oCasesFrame = document.getElementById('frameMain');
|
||||||
|
oClientWinSize = getClientWindowSize();
|
||||||
|
height = oClientWinSize.height-105;
|
||||||
|
oCasesFrame.style.height = height;
|
||||||
|
//oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('casesSubFrame');
|
||||||
|
//oCasesSubFrame.style.height = height-10;
|
||||||
|
}
|
||||||
|
function getStyle(targetElement,styleProp) {
|
||||||
|
if (targetElement) {
|
||||||
|
if (targetElement.currentStyle) return targetElement.currentStyle[styleProp];
|
||||||
|
else if (window.getComputedStyle) return document.defaultView.getComputedStyle(targetElement,null).getPropertyValue(styleProp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
@@ -32,7 +32,7 @@ SELECT * FROM processFields
|
|||||||
<en>Fields</en>
|
<en>Fields</en>
|
||||||
</FIELDS>
|
</FIELDS>
|
||||||
|
|
||||||
<BTN_CANCEL type="button" onclick="cancel();">
|
<BTN_CANCEL type="button" onclick="history.back();">
|
||||||
<en>Cancel</en>
|
<en>Cancel</en>
|
||||||
</BTN_CANCEL>
|
</BTN_CANCEL>
|
||||||
|
|
||||||
@@ -89,6 +89,73 @@ function cancel(){
|
|||||||
currentPopupWindow.remove();
|
currentPopupWindow.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////
|
||||||
|
|
||||||
|
function reportTablesSave(form)
|
||||||
|
{
|
||||||
|
var bContinue = true;
|
||||||
|
if (getField('REP_TAB_TITLE').value == '') {
|
||||||
|
bContinue = false;
|
||||||
|
}
|
||||||
|
if (getField('REP_TAB_NAME').value == '') {
|
||||||
|
bContinue = false;
|
||||||
|
}
|
||||||
|
var j = 0;
|
||||||
|
if (getField('REP_TAB_TYPE').value == 'NORMAL') {
|
||||||
|
var i;
|
||||||
|
var oAux = getField('FIELDS');
|
||||||
|
var iMax = oAux.length;
|
||||||
|
for (i = 0; i < oAux.length; i++) {
|
||||||
|
if (oAux.options[i].selected) {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((j < 1) || (j > 80)) {
|
||||||
|
bContinue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (getField('REP_TAB_GRID').value == '') {
|
||||||
|
bContinue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bContinue) {
|
||||||
|
ajax_post(form.action, form, 'POST');
|
||||||
|
//currentPopupWindow.remove();
|
||||||
|
//@#PAGED_TABLE_ID.refresh();
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (getField('REP_TAB_TYPE').value == 'NORMAL') {
|
||||||
|
if (j == 0) {
|
||||||
|
new leimnud.module.app.alert().make({
|
||||||
|
label:'@G::LoadTranslation(ID_PLEASE_ENTER_REQUIRED_FIELDS)'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
new leimnud.module.app.alert().make({
|
||||||
|
label:'@G::LoadTranslation(ID_PLEASE_SELECT_MAX_X_FIELDS)'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
new leimnud.module.app.alert().make({
|
||||||
|
label:'@G::LoadTranslation(ID_PLEASE_ENTER_REQUIRED_FIELDS)'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reportTablesDelete(sUID)
|
||||||
|
{
|
||||||
|
new leimnud.module.app.confirm().make({
|
||||||
|
label:'@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_REPORT_TABLE)',
|
||||||
|
action:function()
|
||||||
|
{
|
||||||
|
ajax_function('@G::encryptlink(@#reportTablesDelete)', '', 'REP_TAB_UID=' + sUID, 'POST');
|
||||||
|
//@#PAGED_TABLE_ID.refresh();
|
||||||
|
}.extend(this)
|
||||||
|
});
|
||||||
|
}
|
||||||
]]></JS>
|
]]></JS>
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<dynaForm sqlConnection="" menu="reportTables/reportTables_Options" width="100%" rowsPerPage="10">
|
<dynaForm sqlConnection="" menu="reportTables/reportTables_Options" width="100%" rowsPerPage="10">
|
||||||
|
<!--<dynaForm sqlConnection="" width="100%" rowsPerPage="10">-->
|
||||||
<REP_TAB_UID type="hidden" showInTable="0"/>
|
<REP_TAB_UID type="hidden" showInTable="0"/>
|
||||||
|
|
||||||
<REP_TAB_TITLE type="text" colWidth="350" titleAlign="left" align="left">
|
<REP_TAB_TITLE type="text" colWidth="350" titleAlign="left" align="left">
|
||||||
@@ -24,4 +24,4 @@ function pagedTableFilter(form) {
|
|||||||
}
|
}
|
||||||
</JSFILTER>
|
</JSFILTER>
|
||||||
|
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
BIN
workflow/public_html/images/icon-edit.png
Normal file
BIN
workflow/public_html/images/icon-edit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 437 B |
Reference in New Issue
Block a user