added pagination in dynaform,input doc,output doc,report tables,DB connection list

This commit is contained in:
safan
2011-02-11 12:56:26 +00:00
parent 8aca6a8567
commit 89014148db
5 changed files with 322 additions and 269 deletions

View File

@@ -4963,12 +4963,27 @@ class processMap {
} }
} }
//new functions
function getAllDynaformCount(){
$c = $this->tmpCriteria;
$c->clearSelectColumns();
$c->addSelectColumn('COUNT(*)');
$oDataset = DynaformPeer::doSelectRS($c);
$oDataset->next();
$aRow = $oDataset->getRow();
if( is_array($aRow) )
return $aRow[0];
else
return 0;
}
/* /*
* Return the dynaforms list array * Return the dynaforms list array
* @param string $sProcessUID * @param string $sProcessUID
* @return object * @return object
*/ */
function getExtDynaformsList($sProcessUID = '') function getExtDynaformsList($start, $limit, $sProcessUID = '')
{ {
$sDelimiter = DBAdapter::getStringDelimiter (); $sDelimiter = DBAdapter::getStringDelimiter ();
$oCriteria = new Criteria ( 'workflow' ); $oCriteria = new Criteria ( 'workflow' );
@@ -4991,6 +5006,13 @@ class processMap {
$oCriteria->addJoinMC ( $aConditions, Criteria::LEFT_JOIN ); $oCriteria->addJoinMC ( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->add ( DynaformPeer::PRO_UID, $sProcessUID ); $oCriteria->add ( DynaformPeer::PRO_UID, $sProcessUID );
$this->tmpCriteria = clone $oCriteria;
if($start != '')
$oCriteria->setOffset($start);
if($limit != '')
$oCriteria->setLimit($limit);
$oDataset = DynaformPeer::doSelectRS ( $oCriteria ); $oDataset = DynaformPeer::doSelectRS ( $oCriteria );
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$oDataset->next (); $oDataset->next ();
@@ -5015,12 +5037,27 @@ class processMap {
} }
//new functions
function getAllInputDocumentCount(){
$c = $this->tmpCriteria;
$c->clearSelectColumns();
$c->addSelectColumn('COUNT(*)');
$oDataset = InputDocumentPeer::doSelectRS($c);
$oDataset->next();
$aRow = $oDataset->getRow();
if( is_array($aRow) )
return $aRow[0];
else
return 0;
}
/* /*
* Return the Input Documents list array * Return the Input Documents list array
* @param string $sProcessUID * @param string $sProcessUID
* @return object * @return object
*/ */
function getExtInputDocumentsCriteria($sProcessUID = '') function getExtInputDocumentsCriteria($start, $limit,$sProcessUID = '')
{ {
$sDelimiter = DBAdapter::getStringDelimiter (); $sDelimiter = DBAdapter::getStringDelimiter ();
$oCriteria = new Criteria ( 'workflow' ); $oCriteria = new Criteria ( 'workflow' );
@@ -5042,6 +5079,13 @@ class processMap {
$oCriteria->addJoinMC ( $aConditions, Criteria::LEFT_JOIN ); $oCriteria->addJoinMC ( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->add ( InputDocumentPeer::PRO_UID, $sProcessUID ); $oCriteria->add ( InputDocumentPeer::PRO_UID, $sProcessUID );
$this->tmpCriteria = clone $oCriteria;
if($start != '')
$oCriteria->setOffset($start);
if($limit != '')
$oCriteria->setLimit($limit);
$oDataset = InputDocumentPeer::doSelectRS ( $oCriteria ); $oDataset = InputDocumentPeer::doSelectRS ( $oCriteria );
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$oDataset->next (); $oDataset->next ();
@@ -5066,12 +5110,27 @@ class processMap {
return $inputDocArray; return $inputDocArray;
} }
//new functions
function getAllOutputDocumentCount(){
$c = $this->tmpCriteria;
$c->clearSelectColumns();
$c->addSelectColumn('COUNT(*)');
$oDataset = OutputDocumentPeer::doSelectRS($c);
$oDataset->next();
$aRow = $oDataset->getRow();
if( is_array($aRow) )
return $aRow[0];
else
return 0;
}
/* /*
* Return the Output Documents list array * Return the Output Documents list array
* @param string $sProcessUID * @param string $sProcessUID
* @return object * @return object
*/ */
function getExtOutputDocumentsCriteria($sProcessUID = '') function getExtOutputDocumentsCriteria($start, $limit,$sProcessUID = '')
{ {
$sDelimiter = DBAdapter::getStringDelimiter (); $sDelimiter = DBAdapter::getStringDelimiter ();
$oCriteria = new Criteria ( 'workflow' ); $oCriteria = new Criteria ( 'workflow' );
@@ -5094,6 +5153,13 @@ class processMap {
$oCriteria->addJoinMC ( $aConditions, Criteria::LEFT_JOIN ); $oCriteria->addJoinMC ( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->add ( OutputDocumentPeer::PRO_UID, $sProcessUID ); $oCriteria->add ( OutputDocumentPeer::PRO_UID, $sProcessUID );
$this->tmpCriteria = clone $oCriteria;
if($start != '')
$oCriteria->setOffset($start);
if($limit != '')
$oCriteria->setLimit($limit);
$oDataset = OutputDocumentPeer::doSelectRS ( $oCriteria ); $oDataset = OutputDocumentPeer::doSelectRS ( $oCriteria );
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$oDataset->next (); $oDataset->next ();
@@ -5478,13 +5544,29 @@ class processMap {
return $aAvailableProcessIODoc; return $aAvailableProcessIODoc;
} }
//new functions
function getAllDbSourceCount(){
$c = $this->tmpCriteria;
$c->clearSelectColumns();
$c->addSelectColumn('COUNT(*)');
$oDataset = DbSourcePeer::doSelectRS($c);
$oDataset->next();
$aRow = $oDataset->getRow();
if( is_array($aRow) )
return $aRow[0];
else
return 0;
}
/** /**
* listDBSConnection * listDBSConnection
* *
* @param string $sProcessUID * @param string $sProcessUID
* @return array(aDBList) $aDBList * @return array(aDBList) $aDBList
*/ */
function getExtCriteriaDBSList($sProcessUID) function getExtCriteriaDBSList($start, $limit,$sProcessUID)
{ {
try try
{ {
@@ -5509,6 +5591,13 @@ class processMap {
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN); $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID); $oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
$this->tmpCriteria = clone $oCriteria;
if($start != '')
$oCriteria->setOffset($start);
if($limit != '')
$oCriteria->setLimit($limit);
$oDataset = DbSourcePeer::doSelectRS ( $oCriteria ); $oDataset = DbSourcePeer::doSelectRS ( $oCriteria );
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$oDataset->next (); $oDataset->next ();
@@ -5816,7 +5905,22 @@ class processMap {
return $oCriteria;*/ return $oCriteria;*/
} }
function getExtReportTables($sProcessUID = '') { //new functions
function getAllReportTableCount(){
$c = $this->tmpCriteria;
$c->clearSelectColumns();
$c->addSelectColumn('COUNT(*)');
$oDataset = ReportTablePeer::doSelectRS($c);
$oDataset->next();
$aRow = $oDataset->getRow();
if( is_array($aRow) )
return $aRow[0];
else
return 0;
}
function getExtReportTables($start, $limit,$sProcessUID = '') {
$sDelimiter = DBAdapter::getStringDelimiter (); $sDelimiter = DBAdapter::getStringDelimiter ();
$oCriteria = new Criteria('workflow'); $oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ReportTablePeer::REP_TAB_UID); $oCriteria->addSelectColumn(ReportTablePeer::REP_TAB_UID);
@@ -5831,6 +5935,13 @@ class processMap {
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN); $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(ReportTablePeer::PRO_UID, $sProcessUID); $oCriteria->add(ReportTablePeer::PRO_UID, $sProcessUID);
$this->tmpCriteria = clone $oCriteria;
if($start != '')
$oCriteria->setOffset($start);
if($limit != '')
$oCriteria->setLimit($limit);
$oDataset = ReportTablePeer::doSelectRS($oCriteria); $oDataset = ReportTablePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next(); $oDataset->next();

View File

@@ -21,10 +21,14 @@ if(isset($_GET['stepid']))
$sType = $aStepTypeId[1]; $sType = $aStepTypeId[1];
} }
$start = isset($_POST['start'])? $_POST['start']: 0;
$limit = isset($_POST['limit'])? $_POST['limit']: '';
switch($_GET['action']) switch($_GET['action'])
{ {
case 'getDynaformList': case 'getDynaformList':
$rows = $oProcessMap->getExtDynaformsList($_GET['pid']); $rows = $oProcessMap->getExtDynaformsList($start, $limit, $_GET['pid']);
$result['totalCount'] = $oProcessMap->getAllDynaformCount();
array_shift($rows); array_shift($rows);
break; break;
@@ -46,7 +50,8 @@ switch($_GET['action'])
break; break;
case 'getInputDocumentList': case 'getInputDocumentList':
$rows = $oProcessMap->getExtInputDocumentsCriteria($_GET['pid']); $rows = $oProcessMap->getExtInputDocumentsCriteria($start, $limit,$_GET['pid']);
$result['totalCount'] = $oProcessMap->getAllInputDocumentCount();
array_shift($rows); array_shift($rows);
break; break;
@@ -57,7 +62,8 @@ switch($_GET['action'])
break; break;
case 'getOutputDocument': case 'getOutputDocument':
$rows = $oProcessMap->getExtOutputDocumentsCriteria($_GET['pid']); $rows = $oProcessMap->getExtOutputDocumentsCriteria($start, $limit,$_GET['pid']);
$result['totalCount'] = $oProcessMap->getAllOutputDocumentCount();
array_shift($rows); array_shift($rows);
break; break;
@@ -73,7 +79,8 @@ switch($_GET['action'])
break; break;
case 'getReportTables': case 'getReportTables':
$rows = $oProcessMap->getExtReportTables($_GET['pid']); $rows = $oProcessMap->getExtReportTables($start, $limit,$_GET['pid']);
$result['totalCount'] = $oProcessMap->getAllReportTableCount();
break; break;
case 'editReportTables': case 'editReportTables':
@@ -107,7 +114,8 @@ switch($_GET['action'])
break; break;
case 'getDatabaseConnectionList': case 'getDatabaseConnectionList':
$rows = $oProcessMap->getExtCriteriaDBSList($_GET['pid']); $rows = $oProcessMap->getExtCriteriaDBSList($start, $limit,$_GET['pid']);
$result['totalCount'] = $oProcessMap->getAllDbSourceCount();
break; break;
case 'editDatabaseConnection': case 'editDatabaseConnection':
@@ -142,7 +150,7 @@ switch($_GET['action'])
break; break;
case 'getAvailableCaseTrackerObjects': case 'getAvailableCaseTrackerObjects':
$rows = $oProcessMap->getAvailableExtCaseTrackerObjects($_GET['tid']); $rows = $oProcessMap->getAvailableExtCaseTrackerObjects($_GET['pid']);
array_shift($rows); array_shift($rows);
break; break;
@@ -221,12 +229,12 @@ switch($_GET['action'])
case 'process_Edit': case 'process_Edit':
$rows = $oProcessMap->editProcessNew($_GET['pid']); $rows = $oProcessMap->editProcessNew($_GET['pid']);
} }
//$result['totalCount'] = count($rows);
//$result['data'] = $rows; $result['data'] = $rows;
//print json_encode( $result ) ; print json_encode( $result ) ;
$tmpData = json_encode( $rows ) ; /*$tmpData = json_encode( $rows ) ;
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes $tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
$result = $tmpData; $result = $tmpData;
echo $result; echo $result;*/
?> ?>

View File

@@ -30,6 +30,7 @@ ProcessMapContext.prototype.editProcess= function()
labelWidth: 75, // label settings here cascade unless overridden labelWidth: 75, // label settings here cascade unless overridden
frame:false, frame:false,
buttonAlign: 'center', buttonAlign: 'center',
bodyStyle : 'padding:5px 0 0 5px;',
//monitorValid : true, //monitorValid : true,
width: 450, width: 450,
height: 400, height: 400,
@@ -72,8 +73,8 @@ ProcessMapContext.prototype.editProcess= function()
store: new Ext.data.JsonStore({ store: new Ext.data.JsonStore({
fields : ['name', 'value'], fields : ['name', 'value'],
data : [ data : [
{name:'none', value: 'none'}, {name:'none', value: ''},
{name:'default', value: 'default'} {name:'default', value: '00000000000000000000000000000001'}
] ]
}) })
}, { }, {
@@ -87,8 +88,9 @@ ProcessMapContext.prototype.editProcess= function()
fieldLabel: 'Category', fieldLabel: 'Category',
name: 'PRO_CATEGORY', name: 'PRO_CATEGORY',
hiddenName: 'category', hiddenName: 'category',
displayField: 'CATEGORY_NAME', displayField: 'CATEGORY_NAME',
valueField: 'CATEGORY_UID', valueField: 'CATEGORY_UID',
value: '--None--',
store: new Ext.data.JsonStore({ store: new Ext.data.JsonStore({
fields : ['CATEGORY_NAME', 'CATEGORY_UID'] fields : ['CATEGORY_NAME', 'CATEGORY_UID']
//data :processCategoryData //data :processCategoryData
@@ -117,16 +119,15 @@ ProcessMapContext.prototype.editProcess= function()
pro_debug = 1; pro_debug = 1;
else else
pro_debug = 0; pro_debug = 0;
var urlparams = '?action=saveProcess&data={"PRO_UID":"'+ pro_uid +'","PRO_CALENDAR":"'+ pro_calendar +'","PRO_CATEGORY":"'+ pro_category +'","PRO_DEBUG":"'+ pro_debug +'","PRO_DESCRIPTION":"'+ pro_description +'","PRO_TITLE":"'+ pro_title +'",}'; var urlparams = '?action=saveProcess&data={"PRO_UID":"'+ pro_uid +'","PRO_CALENDAR":"'+ pro_calendar +'","PRO_CATEGORY":"'+ pro_category +'","PRO_DEBUG":"'+ pro_debug +'","PRO_DESCRIPTION":"'+ pro_description +'","PRO_TITLE":"'+ pro_title +'"}';
Ext.Ajax.request({ Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams, url: "processes_Ajax.php"+ urlparams,
success: function(response) { success: function(response) {
Ext.MessageBox.alert ('Status','Process Information Saved Successfully.'); Ext.MessageBox.alert ('Status','Process Information Saved Successfully.');
//window.hide(); window.hide();
} }
}); });
window.hide();
} }
},{ },{
@@ -137,19 +138,18 @@ ProcessMapContext.prototype.editProcess= function()
} }
}] }]
}); });
console.log(workflow.checkdebug);
editProcess.form.load({ editProcess.form.load({
url:'proxyExtjs.php?pid='+pro_uid+'&action=process_Edit', url:'proxyExtjs.php?pid='+pro_uid+'&action=process_Edit',
method:'GET', method:'GET',
waitMsg:'Loading', waitMsg:'Loading',
success:function(form, action) { success:function(form, action) {
if(action.result.data.PRO_DEBUG== 0) if(action.result.data.PRO_DEBUG== 0)
workflow.checkdebug = false; workflow.checkdebug = false;
else else
workflow.checkdebug = true; workflow.checkdebug = true;
window.show();
window.show(); },
},
failure:function(form, action) { failure:function(form, action) {
Ext.MessageBox.alert('Message', 'Load failed'); Ext.MessageBox.alert('Message', 'Load failed');
} }
@@ -181,12 +181,12 @@ ProcessMapContext.prototype.exportProcess= function()
workflow.FILENAME_LINK = ''; workflow.FILENAME_LINK = '';
workflow.FILENAME_LINKXPDL = ''; workflow.FILENAME_LINKXPDL = '';
var exportProcessForm = new Ext.FormPanel({ var exportProcessForm = new Ext.FormPanel({
labelWidth : 120, // label settings here cascade unless overridden labelWidth : 120, // label settings here cascade unless overridden
frame : false, frame : false,
monitorValid : true, monitorValid : true,
title : '', //title : 'Export Process',
bodyStyle :'padding:10px 0 0 10px;',
width : 500, width : 500,
height : 400, height : 400,
defaultType : 'textfield', defaultType : 'textfield',
@@ -542,39 +542,9 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
}); });
var tb = new Ext.Toolbar({ var tb = new Ext.Toolbar({
items: [btnCreate,btnRemove,btnEdit,SearchText,btnSearch] items: [btnCreate,btnRemove,btnEdit]
}); });
var SearchText = new Ext.TextField ({
id: 'searchTxt',
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
doSearch();
}
}
}
});
var btnSearch = new Ext.Button({
text:'X',
ctCls:'pm_search_x_button',
handler: function(){
//store.setBaseParam( 'category', '<reset>');
//store.setBaseParam( 'processName', '');
//store.load({params:{start : 0 , limit : '' }});
Ext.getCmp('searchTxt').setValue('');
//comboCategory.setValue('');
//store.reload();
}
});
var PermissionGrid = new Ext.grid.GridPanel({ var PermissionGrid = new Ext.grid.GridPanel({
store: PermissionStore, store: PermissionStore,
@@ -606,7 +576,6 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
plain: true, plain: true,
buttonAlign: 'center', buttonAlign: 'center',
items: PermissionGrid items: PermissionGrid
}); });
//Creating different stores required for fields in form //Creating different stores required for fields in form
@@ -677,6 +646,7 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
width:360, width:360,
//height: 30, //height: 30,
monitorValid : true, monitorValid : true,
bodyStyle : 'padding:10px 0 0 10px;',
frame:false, frame:false,
plain: true, plain: true,
buttonAlign: 'center', buttonAlign: 'center',
@@ -1026,8 +996,6 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
}] }]
}) })
var formWindow = new Ext.Window({ var formWindow = new Ext.Window({
title: 'New specific Permission', title: 'New specific Permission',
collapsible: false, collapsible: false,
@@ -1759,6 +1727,7 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
monitorValid : true, monitorValid : true,
width: 300, width: 300,
height: 300, height: 300,
bodyStyle : 'padding:10px 0 0 10px;',
//defaults: {width: 350}, //defaults: {width: 350},
defaultType: 'textfield', defaultType: 'textfield',
items: [{ items: [{
@@ -1886,8 +1855,7 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
ProcessMapContext.prototype.caseTrackerObjects= function() ProcessMapContext.prototype.caseTrackerObjects= function()
{ {
var ProcMapObj= new ProcessMapContext(); var ProcMapObj= new ProcessMapContext();
var pro_uid = workflow.getUrlVars(); var pro_uid = workflow.getUrlVars();
//var taskId = workflow.currentSelection.id;
var ObjectFields = Ext.data.Record.create([ var ObjectFields = Ext.data.Record.create([
{ {
@@ -1923,28 +1891,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
saveText: 'Update' saveText: 'Update'
}); });
var assignedStore = new Ext.data.JsonStore({
root : 'data',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : true,
fields : ObjectFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getAssignedCaseTrackerObjects'
})
});
assignedStore.load();
var availableStore = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?tid='+pro_uid+'&action=getAvailableCaseTrackerObjects',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
autoLoad : true,
fields : ObjectFields
});
var btnAdd = new Ext.Button({ var btnAdd = new Ext.Button({
id: 'btnAdd', id: 'btnAdd',
text: 'Assign', text: 'Assign',
@@ -1956,7 +1903,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
OBJECT_TYPE :'', OBJECT_TYPE :'',
OBJECT_UID : '', OBJECT_UID : '',
CTO_CONDITION: '' CTO_CONDITION: ''
}); });
if(availableStore.data.items.length == 0) if(availableStore.data.items.length == 0)
Ext.MessageBox.alert ('Status','No users are available. All users have been already assigned.'); Ext.MessageBox.alert ('Status','No users are available. All users have been already assigned.');
@@ -2017,8 +1964,6 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
} }
}); });
var btnObjectsCondition = new Ext.Button({ var btnObjectsCondition = new Ext.Button({
id: 'btnCondition', id: 'btnCondition',
text: 'Condition', text: 'Condition',
@@ -2031,8 +1976,6 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
else else
workflow.gridObjectRowSelected = rowSelected; workflow.gridObjectRowSelected = rowSelected;
var rowData = ProcMapObj.ExtVariables(); var rowData = ProcMapObj.ExtVariables();
console.log(rowData);
} }
}) })
@@ -2040,7 +1983,30 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
items: [btnAdd, btnRemove,btnObjectsCondition] items: [btnAdd, btnRemove,btnObjectsCondition]
}); });
// create the Data Store of objects that are already assigned
var assignedStore = new Ext.data.JsonStore({
root : 'data',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : true,
fields : ObjectFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getAssignedCaseTrackerObjects'
})
});
assignedStore.load();
var availableStore = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&action=getAvailableCaseTrackerObjects',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
fields : ObjectFields
});
availableStore.load();
// create the Data Store of objects that are already assigned
var Objectsgrid = new Ext.grid.GridPanel({ var Objectsgrid = new Ext.grid.GridPanel({
store: assignedStore, store: assignedStore,
id : 'mygrid', id : 'mygrid',
@@ -2055,53 +2021,59 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
height :400, height :400,
layout: 'fit', layout: 'fit',
plugins: [editor], plugins: [editor],
columns: [ cm: new Ext.grid.ColumnModel({
new Ext.grid.RowNumberer(), defaults: {
{ width: 200,
id: 'CTO_TITLE', sortable: true
header: 'Title', },
dataIndex: 'CTO_TITLE', columns: [
width: 100, new Ext.grid.RowNumberer(),
sortable: true, {
editor: new Ext.form.ComboBox({ id: 'CTO_TITLE',
xtype: 'combo', header: 'Title',
store:availableStore, dataIndex: 'CTO_TITLE',
fieldLabel : 'Title', width: 100,
hiddenName : 'number', sortable: true,
displayField : 'OBJECT_TITLE' , editor: new Ext.form.ComboBox({
valueField : 'OBJECT_TITLE', xtype: 'combo',
name : 'OBJECT_TITLE', store:availableStore,
triggerAction: 'all', fieldLabel : 'Title',
emptyText : 'Select User or Group', hiddenName : 'number',
allowBlank : false, displayField : 'OBJECT_TITLE' ,
onSelect : function(record, index){ valueField : 'OBJECT_TITLE',
var User = Objectsgrid.getStore(); name : 'OBJECT_TITLE',
var selectedrowIndex = '0'; triggerAction: 'all',
User.data.items[selectedrowIndex].data.OBJECT_UID = record.data.OBJECT_UID; emptyText : 'Select User or Group',
User.data.items[selectedrowIndex].data.OBJECT_TYPE = record.data.OBJECT_TYPE; allowBlank : false,
User.data.items[selectedrowIndex].data.OBJECT_TITLE = record.data.OBJECT_TITLE; onSelect : function(record, index){
this.setValue(record.data[this.valueField || this.displayField]); var User = Objectsgrid.getStore();
this.collapse(); var selectedrowIndex = '0';
} User.data.items[selectedrowIndex].data.OBJECT_UID = record.data.OBJECT_UID;
}) User.data.items[selectedrowIndex].data.OBJECT_TYPE = record.data.OBJECT_TYPE;
},{ User.data.items[selectedrowIndex].data.OBJECT_TITLE = record.data.OBJECT_TITLE;
header : 'Type', this.setValue(record.data[this.valueField || this.displayField]);
dataIndex : 'CTO_TYPE_OBJ', this.collapse();
editable : false }
},{ })
header : 'Condition', },{
dataindex: 'CTO_CONDITION', header : 'Type',
name : 'CTO_CONDITION', dataIndex : 'CTO_TYPE_OBJ',
//xtype: 'textfield', editable : false
editable : true },{
},{ header : 'Condition',
sortable: false, dataindex: 'CTO_CONDITION',
renderer: function(val, meta, record) name : 'CTO_CONDITION',
{ //xtype: 'textfield',
var recordData = Ext.util.JSON.encode(record); editable : true
return String.format("<input type='button' value='@@' onclick=workflow.ExtVariables('CTO_CONDITION','{0}');>",recordData); },{
} sortable: false,
}], renderer: function(val, meta, record)
{
var recordData = Ext.util.JSON.encode(record);
return String.format("<input type='button' value='@@' onclick=workflow.ExtVariables('CTO_CONDITION','{0}');>",recordData);
}
}]
}),
sm: new Ext.grid.RowSelectionModel({ sm: new Ext.grid.RowSelectionModel({
singleSelect: true, singleSelect: true,
listeners: { listeners: {
@@ -2187,10 +2159,6 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
}); });
// assignedStore.reload();
// availableStore.reload();
var gridObjectWindow = new Ext.Window({ var gridObjectWindow = new Ext.Window({
title : 'Objects', title : 'Objects',
collapsible : false, collapsible : false,
@@ -2200,15 +2168,13 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
height : 400, height : 400,
minWidth : 200, minWidth : 200,
minHeight : 150, minHeight : 150,
layout : 'fit', //layout : 'fit',
plain : true, plain : true,
autoScroll : true,
items : Objectsgrid, items : Objectsgrid,
buttonAlign : 'center' buttonAlign : 'center'
}); });
gridObjectWindow.show() gridObjectWindow.show()
}
}
ProcessMapContext.prototype.ExtVariables = function() ProcessMapContext.prototype.ExtVariables = function()
{ {
@@ -2264,6 +2230,7 @@ ProcessMapContext.prototype.ExtVariables = function()
labelWidth: 100, labelWidth: 100,
monitorValid : true, monitorValid : true,
width : 400, width : 400,
bodyStyle : 'padding:10px 0 0 10px;',
height : 350, height : 350,
renderer: function(val){return '<table border=1> <tr> <td> @@ </td> <td> Replace the value in quotes </td> </tr> </table>';}, renderer: function(val){return '<table border=1> <tr> <td> @@ </td> <td> Replace the value in quotes </td> </tr> </table>';},
items: items:

View File

@@ -124,8 +124,8 @@ ProcessOptions.prototype.addDynaform= function(_5625)
url: 'proxyExtjs?pid='+pro_uid+'&action=getDynaformList' url: 'proxyExtjs?pid='+pro_uid+'&action=getDynaformList'
}) })
}); });
taskDynaform.load({params:{start:0, limit:5}}); taskDynaform.load({params:{start:0, limit:10}});
//taskDynaform.load();
//Creating store for getting list of additional PM tables //Creating store for getting list of additional PM tables
var additionalTablesFields = Ext.data.Record.create([ var additionalTablesFields = Ext.data.Record.create([
{name: 'ADD_TAB_UID', type: 'string'}, {name: 'ADD_TAB_UID', type: 'string'},
@@ -165,12 +165,11 @@ ProcessOptions.prototype.addDynaform= function(_5625)
}); });
//tablesFieldsStore.load(); //tablesFieldsStore.load();
var dynaformColumns = new Ext.grid.ColumnModel({
defaults: {
width: 200,
sortable: true
},
var dynaformColumns = new Ext.grid.ColumnModel({
columns: [ columns: [
new Ext.grid.RowNumberer(), new Ext.grid.RowNumberer(),
{ {
@@ -203,11 +202,9 @@ ProcessOptions.prototype.addDynaform= function(_5625)
sortable: false, sortable: false,
renderer: function(val, meta, record) renderer: function(val, meta, record)
{ {
return String.format("<input type='button' value='UID' onclick=workflow.createUIDButton("+record+");>"); return String.format("<input type='button' value='UID' onclick=workflow.createUIDButton('{0}');>",record.data.DYN_UID);
} }
} }
] ]
}); });
@@ -263,11 +260,12 @@ ProcessOptions.prototype.addDynaform= function(_5625)
stripeRows: true, stripeRows: true,
tbar: tb, tbar: tb,
bbar: new Ext.PagingToolbar({ bbar: new Ext.PagingToolbar({
pageSize: 5, pageSize: 10,
store: taskDynaform, store: taskDynaform,
displayInfo: true, displayInfo: true,
displayMsg: 'Displaying dynaforms {0} - {1} of {2}', displayMsg: 'Displaying dynaforms {0} - {1} of {2}',
emptyMsg: "No users to display" emptyMsg: "No users to display",
items:[]
}), }),
viewConfig: {forceFit: true} viewConfig: {forceFit: true}
}); });
@@ -276,8 +274,10 @@ ProcessOptions.prototype.addDynaform= function(_5625)
labelWidth: 100, labelWidth: 100,
buttonAlign: 'center', buttonAlign: 'center',
width : 490, width : 490,
bodyStyle : 'padding:10px 0 0 10px;',
//monitorValid : true, //monitorValid : true,
autoHeight: true, autoHeight: true,
autoScroll: true,
items: items:
[{ [{
xtype: 'fieldset', xtype: 'fieldset',
@@ -372,7 +372,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
title: 'Dynaform Information', title: 'Dynaform Information',
width: 500, width: 500,
items:[{ items:[{
width: 150, width: 350,
xtype: 'combo', xtype: 'combo',
mode: 'local', mode: 'local',
editable: true, editable: true,
@@ -404,7 +404,8 @@ ProcessOptions.prototype.addDynaform= function(_5625)
xtype : 'textfield', xtype : 'textfield',
fieldLabel: _('ID_TITLE'), fieldLabel: _('ID_TITLE'),
name : 'DYN_TITLE', name : 'DYN_TITLE',
allowBlank: false allowBlank: false,
width : 350
},{ },{
xtype : 'textarea', xtype : 'textarea',
fieldLabel: _('ID_DESCRIPTION'), fieldLabel: _('ID_DESCRIPTION'),
@@ -418,7 +419,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
hidden: true, hidden: true,
store: tablesFieldsStore, store: tablesFieldsStore,
cm: addTableColumns, cm: addTableColumns,
width: 550, width: 500,
//height: 300, //height: 300,
autoHeight: true, autoHeight: true,
clicksToEdit: 1, clicksToEdit: 1,
@@ -634,7 +635,7 @@ ProcessOptions.prototype.dbConnection = function()
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getDatabaseConnectionList' url: 'proxyExtjs.php?pid='+pro_uid+'&action=getDatabaseConnectionList'
}) })
}); });
dbStore.load(); dbStore.load({params:{start : 0 , limit : 10 }});
@@ -704,6 +705,14 @@ ProcessOptions.prototype.dbConnection = function()
cm: dbGridColumn, cm: dbGridColumn,
stripeRows: true, stripeRows: true,
tbar: tb, tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: dbStore,
displayInfo: true,
displayMsg: 'Displaying Database Connection {0} - {1} of {2}',
emptyMsg: "No DB Connection to display",
items:[]
}),
viewConfig: {forceFit: true} viewConfig: {forceFit: true}
}); });
@@ -712,16 +721,16 @@ ProcessOptions.prototype.dbConnection = function()
collapsible: false, collapsible: false,
maximizable: true, maximizable: true,
//allowBlank:false, //allowBlank:false,
width:450, width:400,
frame:false, frame:false,
autoDestroy : true, autoDestroy : true,
monitorValid : true, monitorValid : true,
plain: true, plain: true,
bodyStyle : 'padding:10px 0 0 10px;',
buttonAlign: 'center', buttonAlign: 'center',
items:[{
items:[{
xtype: 'combo', xtype: 'combo',
width: 150, width: 200,
mode: 'local', mode: 'local',
editable: false, editable: false,
fieldLabel: 'Engine', fieldLabel: 'Engine',
@@ -761,12 +770,11 @@ ProcessOptions.prototype.dbConnection = function()
},{ },{
xtype: 'fieldset', xtype: 'fieldset',
id: 'encode', id: 'encode',
border:false, border:false,
hidden: true, hidden: true,
items: [{ items: [{
xtype: 'combo', xtype: 'combo',
width: 250, width: 220,
mode: 'local', mode: 'local',
// hidden: true, // hidden: true,
editable: false, editable: false,
@@ -831,7 +839,7 @@ ProcessOptions.prototype.dbConnection = function()
hidden: true, hidden: true,
items:[{ items:[{
xtype: 'combo', xtype: 'combo',
width: 150, width: 220,
mode: 'local', mode: 'local',
// hidden: true, // hidden: true,
editable:false, editable:false,
@@ -893,7 +901,7 @@ ProcessOptions.prototype.dbConnection = function()
hidden: true, hidden: true,
items:[{ items:[{
xtype: 'combo', xtype: 'combo',
width: 150, width: 220,
mode: 'local', mode: 'local',
editable: false, editable: false,
fieldLabel: 'Encode', fieldLabel: 'Encode',
@@ -919,27 +927,32 @@ ProcessOptions.prototype.dbConnection = function()
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Server', fieldLabel: 'Server',
name: 'DBS_SERVER', name: 'DBS_SERVER',
width: 200,
allowBlank: false allowBlank: false
},{ },{
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Database name', fieldLabel: 'Database name',
name: 'DBS_DATABASE_NAME', name: 'DBS_DATABASE_NAME',
width: 200,
allowBlank: false allowBlank: false
},{ },{
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Username', fieldLabel: 'Username',
name: 'DBS_USERNAME', name: 'DBS_USERNAME',
width: 200,
allowBlank: false allowBlank: false
},{ },{
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Password', fieldLabel: 'Password',
inputType:'password', inputType:'password',
width: 200,
name: 'DBS_PASSWORD', name: 'DBS_PASSWORD',
allowBlank: true allowBlank: true
},{ },{
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Port', fieldLabel: 'Port',
name: 'DBS_PORT', name: 'DBS_PORT',
width: 200,
id:'port', id:'port',
//allowBlank: false, //allowBlank: false,
editable:false editable:false
@@ -948,7 +961,7 @@ ProcessOptions.prototype.dbConnection = function()
fieldLabel: 'Description', fieldLabel: 'Description',
name: 'DBS_DESCRIPTION', name: 'DBS_DESCRIPTION',
allowBlank: true, allowBlank: true,
width: 200, width: 220,
height:100 height:100
},{ },{
id : 'DBS_UID', id : 'DBS_UID',
@@ -1006,12 +1019,10 @@ ProcessOptions.prototype.dbConnection = function()
success: function(response) { success: function(response) {
Ext.MessageBox.alert ('Status','Connection Tested Successfully.'); Ext.MessageBox.alert ('Status','Connection Tested Successfully.');
} }
}); });
} }
} }
},{
},{
text: 'Save', text: 'Save',
formBind :true, formBind :true,
handler: function(){ handler: function(){
@@ -1108,14 +1119,13 @@ var testConnWindow = new Ext.Window({
title: 'Add new Database Source', title: 'Add new Database Source',
collapsible: false, collapsible: false,
maximizable: true, maximizable: true,
width: 450, width: 400,
//autoHeight: true, //autoHeight: true,
//height: 400, //height: 400,
//layout: 'fit', //layout: 'fit',
plain: true, plain: true,
buttonAlign: 'center', buttonAlign: 'center',
items: dbconnForm items: dbconnForm
}); });
var gridWindow = new Ext.Window({ var gridWindow = new Ext.Window({
@@ -1178,7 +1188,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
url: 'proxyExtjs?pid='+pro_uid+'&action=getInputDocumentList' url: 'proxyExtjs?pid='+pro_uid+'&action=getInputDocumentList'
}) })
}); });
inputDocStore.load(); inputDocStore.load({params:{start : 0 , limit : 10 }});
var btnRemove = new Ext.Button({ var btnRemove = new Ext.Button({
id: 'btnRemove', id: 'btnRemove',
@@ -1277,6 +1287,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
height : 380, height : 380,
monitorValid : true, monitorValid : true,
autoHeight: true, autoHeight: true,
bodyStyle : 'padding:10px 0 0 10px;',
items:[{ items:[{
xtype: 'fieldset', xtype: 'fieldset',
layout: 'form', layout: 'form',
@@ -1610,6 +1621,14 @@ var inputDocColumns = new Ext.grid.ColumnModel({
cm: inputDocColumns, cm: inputDocColumns,
stripeRows: true, stripeRows: true,
tbar: tb, tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: inputDocStore,
displayInfo: true,
displayMsg: 'Displaying Input Document {0} - {1} of {2}',
emptyMsg: "No Input Document to display",
items:[]
}),
viewConfig: {forceFit: true} viewConfig: {forceFit: true}
}); });
@@ -1683,7 +1702,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
url: 'proxyExtjs?pid='+pro_uid+'&action=getOutputDocument' url: 'proxyExtjs?pid='+pro_uid+'&action=getOutputDocument'
}) })
}); });
outputDocStore.load(); outputDocStore.load({params:{start : 0 , limit : 10 }});
var btnRemove = new Ext.Button({ var btnRemove = new Ext.Button({
id: 'btnRemove', id: 'btnRemove',
@@ -1818,6 +1837,14 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
cm : outputDocColumns, cm : outputDocColumns,
stripeRows : true, stripeRows : true,
tbar : tb, tbar : tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: outputDocStore,
displayInfo: true,
displayMsg: 'Displaying Output Document {0} - {1} of {2}',
emptyMsg: "No Output Document to display",
items:[]
}),
viewConfig : {forceFit: true} viewConfig : {forceFit: true}
}); });
@@ -1826,7 +1853,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
labelWidth : 100, labelWidth : 100,
defaults :{autoScroll:true}, defaults :{autoScroll:true},
width : 450, width : 450,
bodyStyle : 'padding:10px 0 0 10px;',
items :[{ items :[{
xtype : 'fieldset', xtype : 'fieldset',
layout : 'form', layout : 'form',
@@ -2257,7 +2284,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
url : 'proxyExtjs?pid='+pro_uid+'&action=getReportTables' url : 'proxyExtjs?pid='+pro_uid+'&action=getReportTables'
}) })
}); });
reportStore.load(); reportStore.load({params:{start : 0 , limit : 10 }});
var reportTableTypeStore = new Ext.data.JsonStore({ var reportTableTypeStore = new Ext.data.JsonStore({
root : 'data', root : 'data',
@@ -2374,6 +2401,14 @@ ProcessOptions.prototype.addReportTable= function(_5625)
cm : reportColumns, cm : reportColumns,
stripeRows: true, stripeRows: true,
tbar: tb, tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: reportStore,
displayInfo: true,
displayMsg: 'Displaying Report Tables {0} - {1} of {2}',
emptyMsg: "No Report Tables to display",
items:[]
}),
viewConfig: {forceFit: true} viewConfig: {forceFit: true}
}); });
@@ -2401,6 +2436,7 @@ var reportForm =new Ext.FormPanel({
frame:false, frame:false,
monitorValid : true, monitorValid : true,
plain: true, plain: true,
bodyStyle : 'padding:10px 0 0 10px;',
buttonAlign: 'center', buttonAlign: 'center',
items:[{ items:[{
xtype: 'textfield', xtype: 'textfield',
@@ -2594,4 +2630,3 @@ ProcessOptions.prototype.addTriggers= function()
} }

View File

@@ -568,7 +568,7 @@ TaskContext.prototype.editUsers= function()
autoLoad : true, autoLoad : true,
fields : userFields fields : userFields
}); });
//storeUsers.load(); storeUsers.load();
// paging bar on the bottom // paging bar on the bottom
var paging = new Ext.PagingToolbar({ var paging = new Ext.PagingToolbar({
pageSize: 10, pageSize: 10,
@@ -607,7 +607,7 @@ TaskContext.prototype.editUsers= function()
xtype: 'combo', xtype: 'combo',
fieldLabel: 'Users_groups', fieldLabel: 'Users_groups',
hiddenName: 'number', hiddenName: 'number',
//store : storeUsers, store : storeUsers,
displayField : 'LABEL' , displayField : 'LABEL' ,
valueField : 'LABEL', valueField : 'LABEL',
name : 'LABEL', name : 'LABEL',
@@ -650,7 +650,7 @@ TaskContext.prototype.editUsers= function()
tbar: tb tbar: tb
}); });
taskUsers.load({params:{start:0, limit:10}}); taskUsers.load();
editor.on({ editor.on({
scope: this, scope: this,
@@ -698,7 +698,7 @@ TaskContext.prototype.editUsers= function()
var window = new Ext.Window({ var window = new Ext.Window({
title: _('ID_USERS_GROUPS'), title: _('ID_USERS_GROUPS'),
collapsible: false, collapsible: false,
maximizable: true, maximizable: false,
width: 400, width: 400,
height: 350, height: 350,
minWidth: 200, minWidth: 200,
@@ -728,6 +728,7 @@ TaskContext.prototype.editTaskProperties= function()
items: [{ items: [{
xtype:'tabpanel', xtype:'tabpanel',
activeTab: 0, activeTab: 0,
bodyStyle : 'padding:5px 0 0 5px;',
defaults:{ defaults:{
labelWidth : 140, labelWidth : 140,
height : 300 height : 300
@@ -2300,79 +2301,11 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
tbar: tbIn tbar: tbIn
}); });
/* editorOut.on({
scope: this,
afteredit: function(roweditor, changes, record, rowIndex) {
var storeData = variableOutGrid.getStore();
var sSP_UID = spUID;
var sProcess_Parent = proParent;
var sSync = spSync;
var sTask_Parent = tasParent;
var sTasks = tasks;
var sVar_Out1 = record.data.VAR_OUT1;
var sVar_Out2 = record.data.VAR_OUT2;
Ext.Ajax.request({
url : 'processes_Ajax.php',
method: 'POST',
params: {
action : 'saveSubProcessVariables',
PRO_UID : pro_uid,
TASKS : sTasks,
SP_SYNCHRONOUS : sSync,
SP_UID : sSP_UID,
PRO_PARENT : sProcess_Parent,
TAS_PARENT : sTask_Parent,
VAR_OUT1 : sVar_Out1,
VAR_OUT2 : sVar_Out2
},
success: function(response) {
Ext.MessageBox.alert ('Status','Variable Out has been saved successfully.');
}
});
}
});
editorIn.on({
scope: this,
afteredit: function(roweditor, changes, record, rowIndex) {
var storeData = variableInGrid.getStore();
var sSP_UID = spUID;
var sProcess_Parent = proParent;
var sSync = spSync;
var sTask_Parent = tasParent;
var sTasks = tasks;
var sVar_In1 = record.data.VAR_IN1;
var sVar_In2 = record.data.VAR_IN2;
Ext.Ajax.request({
url : 'processes_Ajax.php',
method: 'POST',
params: {
action : 'saveSubProcessVariables',
TASKS : sTasks,
SP_SYNCHRONOUS : sSync,
SP_UID : sSP_UID,
PRO_PARENT : sProcess_Parent,
TAS_PARENT : sTask_Parent,
VAR_IN1 : sVar_In1,
VAR_IN2 : sVar_In2
},
success: function(response) {
Ext.MessageBox.alert ('Status','Variable In has been saved successfully.');
}
});
}
});*/
var subProcessProperties = new Ext.FormPanel({ var subProcessProperties = new Ext.FormPanel({
labelWidth : 110, // label settings here cascade unless overridden labelWidth : 110, // label settings here cascade unless overridden
//frame:true, //frame:true,
width: 800, width: 500,
bodyStyle: 'padding:5px 0 0 5px;',
autoScroll: true, autoScroll: true,
items: [ items: [
{ {
@@ -2507,7 +2440,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
title: 'Properties ', title: 'Properties ',
collapsible: false, collapsible: false,
maximizable: false, maximizable: false,
width: 900, width: 800,
height: 400, height: 400,
layout: 'fit', layout: 'fit',
plain: true, plain: true,
@@ -2576,13 +2509,12 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
success: function(response) { success: function(response) {
Ext.MessageBox.alert ('Status','Sub Process Properties has been saved successfully.'); Ext.MessageBox.alert ('Status','Sub Process Properties has been saved successfully.');
window.close(); window.close();
workflow.currentSelection.bpmnNewText.clear();
workflow.currentSelection.bpmnNewText.drawStringRect(sSPNAME,20,5,150,'center');
workflow.currentSelection.bpmnNewText.paint();
workflow.currentSelection.subProcessName = sSPNAME;
} }
}); });
workflow.currentSelection.bpmnNewText.clear();
workflow.currentSelection.bpmnNewText.drawStringRect(sSPNAME,20,20,100,'left');
workflow.currentSelection.bpmnNewText.paint();
workflow.currentSelection.subProcessName = sSPNAME;
} }
},{ },{
text: 'Cancel', text: 'Cancel',