Worked on fixing issues related to ExtJs

This commit is contained in:
safan
2011-02-10 13:15:51 +00:00
parent 1c0b2c96b9
commit 2300c62e1e
6 changed files with 387 additions and 170 deletions

View File

@@ -167,11 +167,6 @@ if ( isset ($_REQUEST['action']) ) {
$sOutput = $oJSON->encode($sOutput);
echo $sOutput;
break;
case 'process_Edit':
$sOutput = $oProcessMap->editProcessNew($oData->pro_uid);
$sOutput = $oJSON->encode($sOutput);
echo $sOutput;
break;
case 'loadCategory':
$sOutput = $oProcessMap->loadProcessCategory();
$sOutput = $oJSON->encode($sOutput);

View File

@@ -218,13 +218,9 @@ switch($_GET['action'])
array_shift($rows);
break;
}
case 'process_Edit':
$rows = $oProcessMap->editProcessNew($_GET['pid']);
}
//$result['totalCount'] = count($rows);
//$result['data'] = $rows;
//print json_encode( $result ) ;

View File

@@ -1849,4 +1849,130 @@ MyWorkflow.prototype.redrawAnnotationText = function(fig,sType)
MyWorkflow.prototype.createUIDButton = function (value) {
Ext.MessageBox.alert ('Info','UID: '+value);
}
}
MyWorkflow.prototype.ExtVariables = function(fieldName,rowData)
{
var pro_uid = workflow.getUrlVars();
var varFields = Ext.data.Record.create([
{
name: 'variable',
type: 'string'
},
{
name: 'type',
type: 'string'
},
{
name: 'label',
type: 'string'
}
]);
var varStore = '';
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=@@'
})
});
//varStore.load();
var varColumns = new Ext.grid.ColumnModel({
columns: [
new Ext.grid.RowNumberer(),
{
id: 'FLD_NAME',
header: 'Variable',
dataIndex: 'variable',
width: 170,
editable: false,
sortable: true
},{
id: 'PRO_VARIABLE',
header: 'Label',
dataIndex: 'label',
width: 150,
sortable: true
}
]
});
var varForm = new Ext.FormPanel({
labelWidth: 100,
monitorValid : true,
width : 400,
height : 350,
renderer: function(val){return '<table border=1> <tr> <td> @@ </td> <td> Replace the value in quotes </td> </tr> </table>';},
items:
{
xtype:'tabpanel',
activeTab: 0,
defaults:{
autoHeight:true
},
items:[{
title:'All Variables',
id :'allVar',
layout:'form',
listeners: {
activate: function(tabPanel){
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}
},
items:[{
xtype: 'grid',
ds: varStore,
cm: varColumns,
width: 380,
autoHeight: true,
//plugins: [editor],
//loadMask : true,
loadingText : 'Loading...',
border: false,
listeners: {
//rowdblclick: alert("ok"),
rowdblclick: function(){
var getObjectGridRow = workflow.gridObjectRowSelected;
var FieldSelected = workflow.gridField;
//getting selected row of variables
var rowSelected = this.getSelectionModel().getSelected();
var rowLabel = rowSelected.data.variable;
//Assigned new object with condition
if(typeof rowData.colModel != 'undefined')
rowData.colModel.config[3].editor.setValue(rowLabel);
//Assigning / updating Condition for a row
else
rowData[0].set(fieldName,rowLabel);
}
}
}]
}]
}
});
var window = new Ext.Window({
title: 'Variables',
collapsible: false,
maximizable: false,
scrollable: true,
width: 400,
height: 350,
minWidth: 200,
minHeight: 150,
autoScroll: true,
layout: 'fit',
plain: true,
buttonAlign: 'center',
items: [varForm]
});
window.show();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -778,7 +778,8 @@ TaskContext.prototype.editTaskProperties= function()
},{
xtype: 'checkbox',
fieldLabel: 'Starting Task',
name: 'TAS_START'
name: 'TAS_START',
checked:workflow.checkStartingTask
}]
},{
title:'Assignment Rules',
@@ -1221,7 +1222,12 @@ TaskContext.prototype.editTaskProperties= function()
method:'GET',
waitMsg:'Loading',
success:function(form, action) {
//To load the values of the selecte radio button in Assignment Rules
if(action.result.data.TAS_START== 0)
workflow.checkStartingTask = false;
else
workflow.checkStartingTask = true;
//To load the values of the selecte radio button in Assignment Rules
if(action.result.data.TAS_ASSIGN_TYPE=='BALANCED')
form.items.items[4].items[0].checked=true;
@@ -1263,6 +1269,8 @@ TaskContext.prototype.editTaskProperties= function()
form.items.items[13].checked=false;
else
form.items.items[13].checked=true;
},
failure:function(form, action) {
Ext.MessageBox.alert('Message', 'Load failed');
@@ -1291,7 +1299,7 @@ TaskContext.prototype.editTaskProperties= function()
//var getstore = taskPropertiesTabs.getStore();
//var getData = getstore.data.items;
taskExtObj.saveTaskProperties();
window.hide();
//window.hide();
}
},{
@@ -1310,7 +1318,8 @@ TaskContext.prototype.saveTaskProperties= function()
{
var saveTaskform = workflow.taskPropertiesTabs.getForm().getValues();
var taskId = workflow.currentSelection.id;
var newTaskValues = new Array();
var object_data = Ext.util.JSON.encode(saveTaskform);
/* var newTaskValues = new Array();
var oData = null;
for (var key in saveTaskform )
{
@@ -1336,7 +1345,7 @@ TaskContext.prototype.saveTaskProperties= function()
oData = '"'+key+'":"'+saveTaskform[key]+'",' + '"TAS_UID":"'+taskId+'",';
}
}
oData = '{'+oData.slice(0,oData.length-1)+'}';
oData = '{'+oData.slice(0,oData.length-1)+'}';*/
Ext.Ajax.request({
url: '../tasks/tasks_Ajax.php' ,
@@ -1348,7 +1357,7 @@ TaskContext.prototype.saveTaskProperties= function()
},
params: {
functions:'saveTaskData',
oData:oData
oData:object_data
}
});
}
@@ -1704,7 +1713,7 @@ TaskContext.prototype.stepTriggers = function()
});
var treeGrid = new Ext.FormPanel({
frame: true,
frame: false,
monitorValid : true,
labelAlign: 'left',
width: 750,
@@ -2174,7 +2183,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
loadMask : true,
loadingText : 'Loading...',
renderTo : 'cases-grid',
frame : true,
frame : false,
autoHeight : true,
autoScroll : true,
clicksToEdit: 1,
@@ -2228,7 +2237,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
loadMask : true,
loadingText : 'Loading...',
renderTo : 'cases-grid',
frame : true,
frame : false,
autoHeight : true,
autoScroll : true,
clicksToEdit: 1,