worked on saving condition for trackers
worked on getting Variables list
This commit is contained in:
60
workflow/engine/methods/bpmn/proxyVariable.php
Normal file
60
workflow/engine/methods/bpmn/proxyVariable.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
<?php
|
||||||
|
G::LoadClass('processMap');
|
||||||
|
G::LoadClass('XmlForm_Field');
|
||||||
|
//$oXMLfield = new XmlForm_Field_TextPM(new DBConnection);
|
||||||
|
$aFields = getDynaformsVars($_GET['pid']);
|
||||||
|
if(isset ($_GET['type']))
|
||||||
|
|
||||||
|
$aType = $_GET['type'];
|
||||||
|
|
||||||
|
else $aType='';
|
||||||
|
|
||||||
|
$aRows[0] = Array (
|
||||||
|
'fieldname' => 'char',
|
||||||
|
'variable' => 'char',
|
||||||
|
'type' => 'type',
|
||||||
|
'label' => 'char'
|
||||||
|
);
|
||||||
|
foreach ( $aFields as $aField ) {
|
||||||
|
switch ($aType){
|
||||||
|
case "system":
|
||||||
|
if($aField['sType']=="system"){
|
||||||
|
$aRows[] = Array (
|
||||||
|
'fieldname' => $_GET['sFieldName'],
|
||||||
|
'variable' => $_GET['sSymbol'] . $aField['sName'],
|
||||||
|
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_GET['sFieldName'].'\',\''.$_GET['sSymbol'] . $aField['sName'].'\');">'.$_GET['sSymbol'] . $aField['sName'].'</a></div>',
|
||||||
|
'type' => $aField['sType'],
|
||||||
|
'label' => $aField['sLabel']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "process":
|
||||||
|
if($aField['sType']!="system"){
|
||||||
|
$aRows[] = Array (
|
||||||
|
'fieldname' => $_GET['sFieldName'],
|
||||||
|
'variable' => $_GET['sSymbol'] . $aField['sName'],
|
||||||
|
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_GET['sFieldName'].'\',\''.$_GET['sSymbol'] . $aField['sName'].'\');">'.$_GET['sSymbol'] . $aField['sName'].'</a></div>',
|
||||||
|
'type' => $aField['sType'],
|
||||||
|
'label' => $aField['sLabel']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$aRows[] = Array (
|
||||||
|
'fieldname' => $_GET['sFieldName'],
|
||||||
|
'variable' => $_GET['sSymbol'] . $aField['sName'],
|
||||||
|
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_GET['sFieldName'].'\',\''.$_GET['sSymbol'] . $aField['sName'].'\');">'.$_GET['sSymbol'] . $aField['sName'].'</a></div>',
|
||||||
|
'type' => $aField['sType'],
|
||||||
|
'label' => $aField['sLabel']
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
array_shift($aRows);
|
||||||
|
$result['totalCount'] = count($aRows);
|
||||||
|
$result['data'] = $aRows;
|
||||||
|
print json_encode($result);
|
||||||
|
?>
|
||||||
@@ -1754,7 +1754,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
|
|
||||||
var btnRemove = new Ext.Button({
|
var btnRemove = new Ext.Button({
|
||||||
id: 'btnRemove',
|
id: 'btnRemove',
|
||||||
text: 'Remove User',
|
text: 'Remove',
|
||||||
iconCls: 'application_delete',
|
iconCls: 'application_delete',
|
||||||
handler: function (s) {
|
handler: function (s) {
|
||||||
editor.stopEditing();
|
editor.stopEditing();
|
||||||
@@ -1962,7 +1962,182 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
buttonAlign : 'center'
|
buttonAlign : 'center'
|
||||||
});
|
});
|
||||||
gridObjectWindow.show()
|
gridObjectWindow.show()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProcessMapContext.prototype.ExtVariables = function()
|
||||||
|
{
|
||||||
|
var pro_uid = workflow.getUrlVars();
|
||||||
|
//var taskId = workflow.currentSelection.id;
|
||||||
|
var varFields = Ext.data.Record.create([
|
||||||
|
{
|
||||||
|
name: 'variable',
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'type',
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'label',
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
var varStore = new Ext.data.JsonStore({
|
||||||
|
root : 'data',
|
||||||
|
totalProperty: 'totalCount',
|
||||||
|
idProperty : 'gridIndex',
|
||||||
|
remoteSort : true,
|
||||||
|
fields : varFields,
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url : 'proxyVariable?pid='+pro_uid+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
//taskUsers.setDefaultSort('LABEL', 'asc');
|
||||||
|
varStore.load();
|
||||||
|
|
||||||
|
var allVarGrid = new Ext.grid.GridPanel({
|
||||||
|
store : varStore,
|
||||||
|
id : 'mygrid',
|
||||||
|
loadMask : true,
|
||||||
|
loadingText : 'Loading...',
|
||||||
|
//renderTo : 'cases-grid',
|
||||||
|
frame : false,
|
||||||
|
autoHeight : false,
|
||||||
|
enableDragDrop : true,
|
||||||
|
ddGroup : 'firstGridDDGroup',
|
||||||
|
clicksToEdit: 1,
|
||||||
|
minHeight :400,
|
||||||
|
height :400,
|
||||||
|
layout : 'form',
|
||||||
|
//plugins : [editor],
|
||||||
|
columns : [{
|
||||||
|
id: 'variable',
|
||||||
|
header: 'Variable',
|
||||||
|
dataIndex: 'variable',
|
||||||
|
width: 200,
|
||||||
|
sortable: true
|
||||||
|
},{
|
||||||
|
id: 'label',
|
||||||
|
header: 'Label',
|
||||||
|
dataIndex: 'label',
|
||||||
|
width: 200,
|
||||||
|
sortable: true
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
|
var sysStore = new Ext.data.JsonStore({
|
||||||
|
root : 'data',
|
||||||
|
totalProperty: 'totalCount',
|
||||||
|
idProperty : 'gridIndex',
|
||||||
|
remoteSort : true,
|
||||||
|
fields : varFields,
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url : 'proxyVariable?pid='+pro_uid+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
//taskUsers.setDefaultSort('LABEL', 'asc');
|
||||||
|
sysStore.load();
|
||||||
|
|
||||||
|
var sysGrid = new Ext.grid.GridPanel({
|
||||||
|
store : sysStore,
|
||||||
|
id : 'mygrid',
|
||||||
|
loadMask : true,
|
||||||
|
loadingText : 'Loading...',
|
||||||
|
//renderTo : 'cases-grid',
|
||||||
|
frame : false,
|
||||||
|
autoHeight : false,
|
||||||
|
enableDragDrop : true,
|
||||||
|
ddGroup : 'firstGridDDGroup',
|
||||||
|
clicksToEdit: 1,
|
||||||
|
minHeight :400,
|
||||||
|
height :400,
|
||||||
|
layout : 'form',
|
||||||
|
//plugins : [editor],
|
||||||
|
columns : [{
|
||||||
|
id: 'variable',
|
||||||
|
header: 'Variable',
|
||||||
|
dataIndex: 'variable',
|
||||||
|
width: 200,
|
||||||
|
sortable: true
|
||||||
|
},{
|
||||||
|
id: 'Label',
|
||||||
|
header: 'Label',
|
||||||
|
dataIndex: 'label',
|
||||||
|
width: 200,
|
||||||
|
sortable: true
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
var varForm = new Ext.FormPanel({
|
||||||
|
labelWidth: 100,
|
||||||
|
bodyStyle :'padding:5px 5px 0',
|
||||||
|
width : 850,
|
||||||
|
height : 500,
|
||||||
|
items:
|
||||||
|
{
|
||||||
|
xtype:'tabpanel',
|
||||||
|
activeTab: 0,
|
||||||
|
defaults:{
|
||||||
|
autoHeight:true,
|
||||||
|
bodyStyle:'padding:10px'
|
||||||
|
},
|
||||||
|
items:[{
|
||||||
|
title:'All Variables',
|
||||||
|
layout:'fit',
|
||||||
|
defaults: {
|
||||||
|
width: 400
|
||||||
|
},
|
||||||
|
items:[allVarGrid]
|
||||||
|
},{
|
||||||
|
title:'System',
|
||||||
|
layout:'fit',
|
||||||
|
defaults: {
|
||||||
|
width: 400
|
||||||
|
},
|
||||||
|
items:[sysGrid]
|
||||||
|
},{
|
||||||
|
title:'Process',
|
||||||
|
layout:'form',
|
||||||
|
defaults: {
|
||||||
|
width: 400
|
||||||
|
},
|
||||||
|
items:[]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//varForm.render(document.body);
|
||||||
|
//workflow.taskStepsTabs = varForm;
|
||||||
|
|
||||||
|
var window = new Ext.Window({
|
||||||
|
title: 'Steps Of',
|
||||||
|
collapsible: false,
|
||||||
|
maximizable: false,
|
||||||
|
width: 800,
|
||||||
|
height: 470,
|
||||||
|
minWidth: 200,
|
||||||
|
minHeight: 150,
|
||||||
|
layout: 'fit',
|
||||||
|
plain: true,
|
||||||
|
bodyStyle: 'padding:5px;',
|
||||||
|
buttonAlign: 'center',
|
||||||
|
items: varForm
|
||||||
|
/*buttons: [{
|
||||||
|
text: 'Save',
|
||||||
|
handler: function(){
|
||||||
|
//var getstore = grid.getStore();
|
||||||
|
//var getData = getstore.data.items;
|
||||||
|
//taskExtObj.saveTaskSteps(getData);
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: 'Cancel',
|
||||||
|
handler: function(){
|
||||||
|
// when this button clicked,
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
}]*/
|
||||||
|
});
|
||||||
|
window.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -258,6 +258,11 @@ Ext.onReady ( function() {
|
|||||||
text: 'Objects',
|
text: 'Objects',
|
||||||
handler: ProcessMapObj.caseTrackerObjects,
|
handler: ProcessMapObj.caseTrackerObjects,
|
||||||
scope:this
|
scope:this
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Test',
|
||||||
|
handler: ProcessMapObj.ExtVariables,
|
||||||
|
scope:this
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user