Continued working on assigning system variables part and fixed issue in Extjs

This commit is contained in:
safan
2011-01-18 13:25:01 +00:00
parent 0a027babcd
commit 9487cc3a2e
4 changed files with 424 additions and 633 deletions

View File

@@ -4615,6 +4615,7 @@ class processMap {
{ {
try { try {
$oTasks = new Tasks ( ); $oTasks = new Tasks ( );
$_SESSION['TASK'] = $sTaskUID;
$aSteps = $oTasks->getStepsOfTask ( $sTaskUID ); $aSteps = $oTasks->getStepsOfTask ( $sTaskUID );
$sUIDs = array (); $sUIDs = array ();
foreach ( $aSteps as $aStep ) { foreach ( $aSteps as $aStep ) {

View File

@@ -127,21 +127,21 @@ ProcessMapContext.prototype.editProcess= function(_5678)
var pro_debug = fields[0].items.items[4].getValue(); var pro_debug = fields[0].items.items[4].getValue();
if(pro_debug == true) if(pro_debug == true)
pro_debug = '1'; pro_debug = '1';
else else
pro_debug = '0'; pro_debug = '0';
var pro_uid = _5678.scope.workflow.getUrlVars(); var pro_uid = _5678.scope.workflow.getUrlVars();
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) {
window.close(); window.close();
}, },
failure: function(){ failure: function(){
Ext.Msg.alert ('Failure'); Ext.Msg.alert ('Failure');
} }
}); });
} }
},{ },{
text: 'Cancel', text: 'Cancel',
@@ -160,37 +160,7 @@ ProcessMapContext.prototype.exportProcess= function()
workflow.FILENAME_LINK = ''; workflow.FILENAME_LINK = '';
workflow.FILENAME_LINKXPDL = ''; workflow.FILENAME_LINKXPDL = '';
/*var exportProcessFields = Ext.data.Record.create([
{
name: 'PRO_TITLE',
type: 'string'
},{
name: 'PRO_DESCRIPTION',
type: 'string'
},{
name: 'SIZE',
type: 'string'
},{
name: 'File',
type: 'string'
}]);
var pro_uid = workflow.getUrlVars();
exportProcess = new Ext.data.JsonStore
({
root : 'data',
totalProperty: 'totalCount',
idProperty : 'gridIndex',
remoteSort : true,
fields : exportProcessFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyProcesses_Export?pro_uid='+pro_uid
})
});
//taskUsers.setDefaultSort('LABEL', 'asc');
exportProcess.load();*/
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 : true, frame : true,
@@ -1042,7 +1012,6 @@ ProcessMapContext.prototype.processSupervisors= function()
User.data.items[selectedrowIndex].data.PU_UID = record.data.PU_UID; User.data.items[selectedrowIndex].data.PU_UID = record.data.PU_UID;
User.data.items[selectedrowIndex].data.USR_UID = record.data.USR_UID; User.data.items[selectedrowIndex].data.USR_UID = record.data.USR_UID;
User.data.items[selectedrowIndex].data.PU_TYPE = record.data.PU_TYPE; User.data.items[selectedrowIndex].data.PU_TYPE = record.data.PU_TYPE;
//User.data.items[selectedrowIndex].data.USR_FIRSTNAME = record.data.USR_FIRSTNAME;
User.data.items[selectedrowIndex].data.USR_LASTNAME = record.data.USR_LASTNAME; User.data.items[selectedrowIndex].data.USR_LASTNAME = record.data.USR_LASTNAME;
User.data.items[selectedrowIndex].data.USR_EMAIL = record.data.USR_EMAIL; User.data.items[selectedrowIndex].data.USR_EMAIL = record.data.USR_EMAIL;
@@ -1052,7 +1021,6 @@ ProcessMapContext.prototype.processSupervisors= function()
} }
}) })
},{ },{
//id: 'USR_LASTNAME',
header: 'Last Name', header: 'Last Name',
dataIndex: 'USR_LASTNAME', dataIndex: 'USR_LASTNAME',
width: 200, width: 200,
@@ -1092,7 +1060,7 @@ ProcessMapContext.prototype.processSupervisors= function()
} }
}); });
var window = new Ext.Window({ var window = new Ext.Window({
title: 'Supervisor', title: 'Supervisor',
collapsible: false, collapsible: false,
maximizable: false, maximizable: false,
@@ -1528,7 +1496,7 @@ ProcessMapContext.prototype.processIODoc= function()
} }
}); });
var window = new Ext.Window({ var window = new Ext.Window({
title: 'Input Documents', title: 'Input Documents',
collapsible: false, collapsible: false,
maximizable: false, maximizable: false,
@@ -1560,7 +1528,7 @@ ProcessMapContext.prototype.processFileManager= function()
,height:300 ,height:300
}); });
var window = new Ext.Window({ var window = new Ext.Window({
title: 'Process File Manager', title: 'Process File Manager',
collapsible: false, collapsible: false,
maximizable: false, maximizable: false,
@@ -1711,7 +1679,7 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
MessageHistory = '1'; MessageHistory = '1';
else else
MessageHistory = '0'; MessageHistory = '0';
Ext.Ajax.request({ Ext.Ajax.request({
url : '../tracker/tracker_Save.php', url : '../tracker/tracker_Save.php',
method: 'POST', method: 'POST',
@@ -1872,32 +1840,25 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
var btnCondition = new Ext.Button({ var btnObjectsCondition = new Ext.Button({
id: 'btnCondition', id: 'btnCondition',
text: 'Assign Condition', text: 'Assign Condition',
handler: function (s) { handler: function (s) {
workflow.variablesAction = 'grid'; workflow.variablesAction = 'grid';
workflow.gridField = 'CTO_CONDITION'; workflow.gridField = 'CTO_CONDITION';
var rowSelected = Objectsgrid.getSelectionModel().getSelections(); var rowSelected = Objectsgrid.getSelectionModel().getSelections();
if(rowSelected == '') if(rowSelected == '')
workflow.gridObjectRowSelected = Objectsgrid; workflow.gridObjectRowSelected = Objectsgrid;
else else
workflow.gridObjectRowSelected = rowSelected; workflow.gridObjectRowSelected = rowSelected;
//var rowSelected = Objectsgrid;
//workflow.gridObject = Objectsgrid;
var rowData = ProcMapObj.ExtVariables(); var rowData = ProcMapObj.ExtVariables();
console.log(rowData); console.log(rowData);
//var a = Ext.getCmp('btnCondition');
//alert (a); }
})
//console.log(rowData);
}
})
var tb = new Ext.Toolbar({ var tb = new Ext.Toolbar({
items: [btnAdd, btnRemove,btnCondition] items: [btnAdd, btnRemove,btnObjectsCondition]
}); });
// create the Data Store of objects that are already assigned // create the Data Store of objects that are already assigned
@@ -2013,11 +1974,11 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
Ext.MessageBox.alert ('Status','Failed to assign Objects'); Ext.MessageBox.alert ('Status','Failed to assign Objects');
} }
}) })
} }
}); });
assignedStore.reload(); assignedStore.reload();
availableStore.reload(); availableStore.reload();
@@ -2136,9 +2097,9 @@ ProcessMapContext.prototype.ExtVariables = function()
{ {
case 'grid': case 'grid':
var getObjectGridRow = workflow.gridObjectRowSelected; var getObjectGridRow = workflow.gridObjectRowSelected;
var rowSelected = this.getSelectionModel().getSelected(); var rowSelected = this.getSelectionModel().getSelected();
var FieldSelected = workflow.gridField; var FieldSelected = workflow.gridField;
var rowLabel = rowSelected.data.variable; var rowLabel = rowSelected.data.variable;
//Assigned new object with condition //Assigned new object with condition
if(typeof getObjectGridRow.colModel != 'undefined') if(typeof getObjectGridRow.colModel != 'undefined')
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel); getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
@@ -2148,16 +2109,16 @@ ProcessMapContext.prototype.ExtVariables = function()
window.hide(); window.hide();
break; break;
case 'form': case 'form':
var FormSelected = workflow.formSelected; var FormSelected = workflow.formSelected;
var rowSelected = this.getSelectionModel().getSelected(); var rowSelected = this.getSelectionModel().getSelected();
var FieldSelected = workflow.fieldId; var FieldSelected = workflow.fieldId;
var rowLabel = rowSelected.data.variable; var rowLabel = rowSelected.data.variable;
Ext.getCmp(FieldSelected).setValue(rowLabel); Ext.getCmp(FieldSelected).setValue(rowLabel);
window.hide(); window.hide();
break; break;
} }
} }
} }
}] }]
@@ -2191,9 +2152,9 @@ ProcessMapContext.prototype.ExtVariables = function()
{ {
case 'grid': case 'grid':
var getObjectGridRow = workflow.gridObjectRowSelected; var getObjectGridRow = workflow.gridObjectRowSelected;
var rowSelected = this.getSelectionModel().getSelected(); var rowSelected = this.getSelectionModel().getSelected();
var FieldSelected = workflow.gridField; var FieldSelected = workflow.gridField;
var rowLabel = rowSelected.data.variable; var rowLabel = rowSelected.data.variable;
//Assigned new object with condition //Assigned new object with condition
if(typeof getObjectGridRow.colModel != 'undefined') if(typeof getObjectGridRow.colModel != 'undefined')
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel); getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
@@ -2203,12 +2164,12 @@ ProcessMapContext.prototype.ExtVariables = function()
window.hide(); window.hide();
break; break;
case 'form': case 'form':
var FormSelected = workflow.formSelected; var FormSelected = workflow.formSelected;
var rowSelected = this.getSelectionModel().getSelected(); var rowSelected = this.getSelectionModel().getSelected();
var FieldSelected = workflow.fieldId; var FieldSelected = workflow.fieldId;
var rowLabel = rowSelected.data.variable; var rowLabel = rowSelected.data.variable;
Ext.getCmp(FieldSelected).setValue(rowLabel); Ext.getCmp(FieldSelected).setValue(rowLabel);
window.hide(); window.hide();
break; break;
} }
@@ -2246,9 +2207,9 @@ ProcessMapContext.prototype.ExtVariables = function()
{ {
case 'grid': case 'grid':
var getObjectGridRow = workflow.gridObjectRowSelected; var getObjectGridRow = workflow.gridObjectRowSelected;
var rowSelected = this.getSelectionModel().getSelected(); var rowSelected = this.getSelectionModel().getSelected();
var FieldSelected = workflow.gridField; var FieldSelected = workflow.gridField;
var rowLabel = rowSelected.data.variable; var rowLabel = rowSelected.data.variable;
//Assigned new object with condition //Assigned new object with condition
if(typeof getObjectGridRow.colModel != 'undefined') if(typeof getObjectGridRow.colModel != 'undefined')
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel); getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
@@ -2258,11 +2219,11 @@ ProcessMapContext.prototype.ExtVariables = function()
window.hide(); window.hide();
break; break;
case 'form': case 'form':
var FormSelected = workflow.formSelected; var FormSelected = workflow.formSelected;
var rowSelected = this.getSelectionModel().getSelected(); var rowSelected = this.getSelectionModel().getSelected();
var FieldSelected = workflow.fieldId; var FieldSelected = workflow.fieldId;
var rowLabel = rowSelected.data.variable; var rowLabel = rowSelected.data.variable;
Ext.getCmp(FieldSelected).setValue(rowLabel); Ext.getCmp(FieldSelected).setValue(rowLabel);
window.hide(); window.hide();
break; break;
@@ -2293,4 +2254,4 @@ ProcessMapContext.prototype.ExtVariables = function()
items: [varForm] items: [varForm]
}); });
window.show(); window.show();
} }

View File

@@ -1230,6 +1230,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
handler: function (s) { handler: function (s) {
workflow.variablesAction = 'form'; workflow.variablesAction = 'form';
workflow.fieldId= 'DestPath' ; workflow.fieldId= 'DestPath' ;
workflow.variable = '@@',
workflow.formSelected = inputDocForm; workflow.formSelected = inputDocForm;
var rowData = ProcMapObj.ExtVariables(); var rowData = ProcMapObj.ExtVariables();
console.log(rowData); console.log(rowData);
@@ -1262,7 +1263,8 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
name: 'selectorigin', name: 'selectorigin',
handler: function (s) { handler: function (s) {
workflow.variablesAction = 'form'; workflow.variablesAction = 'form';
workflow.fieldId= 'tags' ; workflow.fieldId= 'tags' ;
workflow.variable = '@@',
workflow.formSelected = inputDocForm; workflow.formSelected = inputDocForm;
var rowData = ProcMapObj.ExtVariables(); var rowData = ProcMapObj.ExtVariables();
console.log(rowData); console.log(rowData);
@@ -1439,8 +1441,9 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
INP_DOC_FORM_NEEDED : sFormNeeded, INP_DOC_FORM_NEEDED : sFormNeeded,
INP_DOC_ORIGINAL : sOrig, INP_DOC_ORIGINAL : sOrig,
INP_DOC_VERSIONING : sVers, INP_DOC_VERSIONING : sVers,
INP_DOC_TAGS : 'INPUT', //By Default INP_DOC_TAGS : sTags,
INP_DOC_DESCRIPTION : sDesc INP_DOC_DESCRIPTION : sDesc,
INP_DOC_DESTINATION_PATH : sDestPath
}, },
success: function(response) { success: function(response) {
Ext.MessageBox.alert ('Status','Input document has been updated successfully.'); Ext.MessageBox.alert ('Status','Input document has been updated successfully.');
@@ -1612,15 +1615,8 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
editor: new Ext.form.TextField({ editor: new Ext.form.TextField({
//allowBlank: false //allowBlank: false
}) })
}/*, }
{ ]
sortable: false,
renderer: function(val, meta, record)
{
return String.format("<a href='../dynaforms/dynaforms_Editor?PRO_UID={0}&DYN_UID={1}'>Edit</a>",pro_uid,pro_uid);
}
}*/
]
}); });
@@ -1658,9 +1654,6 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
collapsible : false, collapsible : false,
labelAlign : '', labelAlign : '',
items :[{ items :[{
// xtype: 'hiddenfield',
// name:'OUT_DOC_UID'
// },{
xtype : 'textfield', xtype : 'textfield',
fieldLabel : 'Title', fieldLabel : 'Title',
allowBlank : false, allowBlank : false,
@@ -1694,15 +1687,14 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
name: 'selectorigin', name: 'selectorigin',
handler: function (s) { handler: function (s) {
workflow.variablesAction = 'form'; workflow.variablesAction = 'form';
workflow.fieldId= 'filenameGenerated' ; workflow.fieldId = 'filenameGenerated' ;
workflow.formSelected = outputDocForm; workflow.variable = '@@',
workflow.formSelected = outputDocForm;
var rowData = ProcMapObj.ExtVariables(); var rowData = ProcMapObj.ExtVariables();
console.log(rowData); console.log(rowData);
} }
//anchor:'95%'
}]
}] }]
}]
},{ },{
xtype : 'textarea', xtype : 'textarea',
fieldLabel : 'Description', fieldLabel : 'Description',
@@ -1818,34 +1810,34 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
layout :'column', layout :'column',
border :false, border :false,
items :[{ items :[{
columnWidth :.6, columnWidth :.6,
layout : 'form', layout : 'form',
border :false, border :false,
items : [{ items : [{
xtype : 'textfield', xtype : 'textfield',
id : 'DestPath', id : 'DestPath',
fieldLabel : 'Destination Path', fieldLabel : 'Destination Path',
name : 'OUT_DOC_DESTINATION_PATH', name : 'OUT_DOC_DESTINATION_PATH',
anchor :'100%' anchor :'100%'
}]
},{
columnWidth :.4,
layout : 'form',
border :false,
items : [{
xtype :'button',
title : ' ',
text : '@@',
name : 'selectorigin',
handler: function (s) {
workflow.variablesAction = 'form';
workflow.fieldId= 'DestPath' ;
workflow.formSelected = outputDocForm;
var rowData = ProcMapObj.ExtVariables();
console.log(rowData);
}
//anchor :'15%'
}] }]
},{
columnWidth :.4,
layout : 'form',
border :false,
items : [{
xtype :'button',
title : ' ',
text : '@@',
name : 'selectorigin',
handler: function (s) {
workflow.variablesAction = 'form';
workflow.fieldId = 'DestPath' ;
workflow.variable = '@@',
workflow.formSelected = outputDocForm;
var rowData = ProcMapObj.ExtVariables();
console.log(rowData);
}
}]
}] }]
},{ },{
layout :'column', layout :'column',
@@ -1872,13 +1864,13 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
name : 'selectorigin', name : 'selectorigin',
handler: function (s) { handler: function (s) {
workflow.variablesAction = 'form'; workflow.variablesAction = 'form';
workflow.fieldId= 'tags' ; workflow.fieldId = 'tags' ;
workflow.formSelected = outputDocForm; workflow.variable = '@@',
workflow.formSelected = outputDocForm;
var rowData = ProcMapObj.ExtVariables(); var rowData = ProcMapObj.ExtVariables();
console.log(rowData); console.log(rowData);
} }
//anchor :'15%' }]
}]
}] }]
},{ },{
id : 'OUT_DOC_UID', id : 'OUT_DOC_UID',
@@ -1914,9 +1906,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
sVersioning=1; sVersioning=1;
var sDestPath = getForm.OUT_DOC_DESTINATION_PATH; var sDestPath = getForm.OUT_DOC_DESTINATION_PATH;
var sTags = getForm.OUT_DOC_TAGS; var sTags = getForm.OUT_DOC_TAGS;
if(sDocUID == "")
if(sDocUID == "")
{ {
Ext.Ajax.request({ Ext.Ajax.request({
url : '../outputdocs/outputdocs_Save.php', url : '../outputdocs/outputdocs_Save.php',
@@ -1996,10 +1986,6 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
}); });
} }
} }
},{ },{
@@ -2337,11 +2323,8 @@ var formWindow = new Ext.Window({
var Grid = getForm.REP_TAB_GRID; var Grid = getForm.REP_TAB_GRID;
var Fields = getForm.FIELDS; var Fields = getForm.FIELDS;
// var VariableName = getForm.REP_VAR_NAME;
// var VariableType = getForm.REP_VAR_TYPE; if(typeof tableUID=='undefined')
// var Connection = getForm.REP_TAB_CONNECTION
if(typeof tableUID=='undefined')
{ {
Ext.Ajax.request({ Ext.Ajax.request({
url : '../reportTables/reportTables_Save.php', url : '../reportTables/reportTables_Save.php',
@@ -2354,17 +2337,12 @@ var formWindow = new Ext.Window({
REP_TAB_TYPE :Type , REP_TAB_TYPE :Type ,
REP_TAB_GRID :Grid, REP_TAB_GRID :Grid,
FIELDS :Fields FIELDS :Fields
//REP_VAR_NAME : VariableName,
//REP_VAR_TYPE : VariableType,
//REP_TAB_CONNECTION: Connection
}, },
success: function(response) { success: function(response) {
Ext.MessageBox.alert ('Status','Report Table Saved Successfully.'); Ext.MessageBox.alert ('Status','Report Table Saved Successfully.');
} }
}); });
} }
else else
{ {
Ext.Ajax.request({ Ext.Ajax.request({
@@ -2390,7 +2368,7 @@ var formWindow = new Ext.Window({
}); });
} }
formWindow.close(); formWindow.close();
// reportStore.reload(); reportStore.reload();
} }
},{ },{

File diff suppressed because it is too large Load Diff