Was working on assigning system variable in all other form in EXTJS.
This commit is contained in:
@@ -1876,6 +1876,8 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
||||
id: 'btnCondition',
|
||||
text: 'Assign Condition',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'grid';
|
||||
workflow.gridField = 'CTO_CONDITION';
|
||||
var rowSelected = Objectsgrid.getSelectionModel().getSelections();
|
||||
if(rowSelected == '')
|
||||
workflow.gridObjectRowSelected = Objectsgrid;
|
||||
@@ -2125,7 +2127,39 @@ ProcessMapContext.prototype.ExtVariables = function()
|
||||
//plugins: [editor],
|
||||
//loadMask : true,
|
||||
loadingText : 'Loading...',
|
||||
border: false
|
||||
border: false,
|
||||
listeners: {
|
||||
//rowdblclick: alert("ok"),
|
||||
rowdblclick: function(){
|
||||
var objectSelected = workflow.variablesAction;
|
||||
switch(objectSelected)
|
||||
{
|
||||
case 'grid':
|
||||
var getObjectGridRow = workflow.gridObjectRowSelected;
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var FieldSelected = workflow.gridField;
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
//Assigned new object with condition
|
||||
if(typeof getObjectGridRow.colModel != 'undefined')
|
||||
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
|
||||
//Assigning / updating Condition for a row
|
||||
else
|
||||
getObjectGridRow[0].set(FieldSelected,rowLabel);
|
||||
window.hide();
|
||||
break;
|
||||
case 'form':
|
||||
var FormSelected = workflow.formSelected;
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var FieldSelected = workflow.fieldId;
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
Ext.getCmp(FieldSelected).setValue(rowLabel);
|
||||
window.hide();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}]
|
||||
},{
|
||||
title:'System',
|
||||
@@ -2152,21 +2186,34 @@ ProcessMapContext.prototype.ExtVariables = function()
|
||||
listeners: {
|
||||
//rowdblclick: alert("ok"),
|
||||
rowdblclick: function(){
|
||||
var getObjectGridRow = workflow.gridObjectRowSelected;
|
||||
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
var objectSelected = workflow.variablesAction;
|
||||
switch(objectSelected)
|
||||
{
|
||||
case 'grid':
|
||||
var getObjectGridRow = workflow.gridObjectRowSelected;
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var FieldSelected = workflow.gridField;
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
//Assigned new object with condition
|
||||
if(typeof getObjectGridRow.colModel != 'undefined')
|
||||
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
|
||||
//Assigning / updating Condition for a row
|
||||
else
|
||||
getObjectGridRow[0].set(FieldSelected,rowLabel);
|
||||
window.hide();
|
||||
break;
|
||||
case 'form':
|
||||
var FormSelected = workflow.formSelected;
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var FieldSelected = workflow.fieldId;
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
Ext.getCmp(FieldSelected).setValue(rowLabel);
|
||||
window.hide();
|
||||
break;
|
||||
|
||||
//Assigned new object with condition
|
||||
if(typeof getObjectGridRow.colModel != 'undefined')
|
||||
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
|
||||
//Assigning / updating Condition for a row
|
||||
else
|
||||
getObjectGridRow[0].set("CTO_CONDITION",rowLabel);
|
||||
window.hide();
|
||||
//return rowSelected;
|
||||
//Ext.getCmp('activator').setIcon();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}]
|
||||
},{
|
||||
@@ -2191,15 +2238,37 @@ ProcessMapContext.prototype.ExtVariables = function()
|
||||
//loadMask : true,
|
||||
loadingText : 'Loading...',
|
||||
border: false,
|
||||
listeners: {
|
||||
listeners: {
|
||||
//rowdblclick: alert("ok"),
|
||||
rowclick: function(){
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var rowLabel = rowSelected.data.label;
|
||||
return rowSelected;
|
||||
window.hide();
|
||||
//Ext.getCmp('activator').setIcon();
|
||||
}
|
||||
rowdblclick: function(){
|
||||
var objectSelected = workflow.variablesAction;
|
||||
switch(objectSelected)
|
||||
{
|
||||
case 'grid':
|
||||
var getObjectGridRow = workflow.gridObjectRowSelected;
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var FieldSelected = workflow.gridField;
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
//Assigned new object with condition
|
||||
if(typeof getObjectGridRow.colModel != 'undefined')
|
||||
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
|
||||
//Assigning / updating Condition for a row
|
||||
else
|
||||
getObjectGridRow[0].set(FieldSelected,rowLabel);
|
||||
window.hide();
|
||||
break;
|
||||
case 'form':
|
||||
var FormSelected = workflow.formSelected;
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var FieldSelected = workflow.fieldId;
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
Ext.getCmp(FieldSelected).setValue(rowLabel);
|
||||
window.hide();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}]
|
||||
}]
|
||||
|
||||
@@ -977,6 +977,7 @@ ProcessOptions.prototype.dbConnection = function()
|
||||
|
||||
ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
{
|
||||
var ProcMapObj= new ProcessMapContext();
|
||||
var pro_uid = workflow.getUrlVars();
|
||||
|
||||
var dynaFields = Ext.data.Record.create([
|
||||
@@ -1212,6 +1213,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
border:false,
|
||||
items: [{
|
||||
xtype: 'textfield',
|
||||
id: 'DestPath',
|
||||
fieldLabel: 'Destination Path',
|
||||
name: 'INP_DOC_DESTINATION_PATH',
|
||||
anchor:'100%'
|
||||
@@ -1224,8 +1226,15 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
xtype:'button',
|
||||
title: ' ',
|
||||
text: '@@',
|
||||
name: 'selectorigin'
|
||||
//anchor:'15%'
|
||||
name: 'selectorigin',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'DestPath' ;
|
||||
workflow.formSelected = inputDocForm;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
|
||||
}]
|
||||
}]
|
||||
},{
|
||||
@@ -1237,6 +1246,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
border:false,
|
||||
items: [{
|
||||
xtype: 'textfield',
|
||||
id:'tags',
|
||||
fieldLabel: 'Tags',
|
||||
name: 'INP_DOC_TAGS',
|
||||
anchor:'100%'
|
||||
@@ -1249,8 +1259,15 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
xtype:'button',
|
||||
title: ' ',
|
||||
text: '@@',
|
||||
name: 'selectorigin'
|
||||
//anchor:'15%'
|
||||
name: 'selectorigin',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'tags' ;
|
||||
workflow.formSelected = inputDocForm;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
|
||||
}]
|
||||
}]
|
||||
},{
|
||||
@@ -1393,8 +1410,9 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
INP_DOC_FORM_NEEDED : sFormNeeded,
|
||||
INP_DOC_ORIGINAL : sOrig,
|
||||
INP_DOC_VERSIONING : sVers,
|
||||
INP_DOC_TAGS : 'INPUT', //By Default
|
||||
INP_DOC_DESCRIPTION : sDesc
|
||||
INP_DOC_TAGS : sTags,
|
||||
INP_DOC_DESCRIPTION : sDesc,
|
||||
INP_DOC_DESTINATION_PATH : sDestPath
|
||||
},
|
||||
success: function(response) {
|
||||
Ext.MessageBox.alert ('Status','Input document has been created successfully.');
|
||||
@@ -1448,6 +1466,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
{
|
||||
var pro_uid = workflow.getUrlVars();
|
||||
var ProcMapObj= new ProcessMapContext();
|
||||
|
||||
var dynaFields = Ext.data.Record.create([
|
||||
{
|
||||
@@ -1657,6 +1676,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
border:false,
|
||||
items: [{
|
||||
xtype : 'textfield',
|
||||
id : 'filenameGenerated',
|
||||
fieldLabel : 'Filename generated',
|
||||
name : 'OUT_DOC_FILENAME',
|
||||
allowBlank : false,
|
||||
@@ -1671,7 +1691,15 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
xtype:'button',
|
||||
title: ' ',
|
||||
text: '@@',
|
||||
name: 'selectorigin'
|
||||
name: 'selectorigin',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'filenameGenerated' ;
|
||||
workflow.formSelected = outputDocForm;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
|
||||
//anchor:'95%'
|
||||
}]
|
||||
}]
|
||||
@@ -1795,6 +1823,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
border :false,
|
||||
items : [{
|
||||
xtype : 'textfield',
|
||||
id : 'DestPath',
|
||||
fieldLabel : 'Destination Path',
|
||||
name : 'OUT_DOC_DESTINATION_PATH',
|
||||
anchor :'100%'
|
||||
@@ -1807,7 +1836,14 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
xtype :'button',
|
||||
title : ' ',
|
||||
text : '@@',
|
||||
name : 'selectorigin'
|
||||
name : 'selectorigin',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'DestPath' ;
|
||||
workflow.formSelected = outputDocForm;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
//anchor :'15%'
|
||||
}]
|
||||
}]
|
||||
@@ -1820,6 +1856,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
border :false,
|
||||
items : [{
|
||||
xtype : 'textfield',
|
||||
id :'tags',
|
||||
fieldLabel : 'Tags',
|
||||
name : 'OUT_DOC_TAGS',
|
||||
anchor :'100%'
|
||||
@@ -1832,7 +1869,14 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||
xtype :'button',
|
||||
title : ' ',
|
||||
text : '@@',
|
||||
name : 'selectorigin'
|
||||
name : 'selectorigin',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'tags' ;
|
||||
workflow.formSelected = outputDocForm;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
//anchor :'15%'
|
||||
}]
|
||||
}]
|
||||
|
||||
@@ -7,6 +7,7 @@ TaskContext.prototype.type="TaskContext";
|
||||
|
||||
TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
var taskExtObj = new TaskContext();
|
||||
var ProcMapObj= new ProcessMapContext();
|
||||
var pro_uid = _3252.scope.workflow.getUrlVars();
|
||||
var taskId = _3252.scope.workflow.currentSelection.id;
|
||||
|
||||
@@ -141,39 +142,86 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
remoteSort : false,
|
||||
autoLoad : true,
|
||||
fields : stepsFields
|
||||
|
||||
});
|
||||
//availableSteps.load();
|
||||
|
||||
var btnCondition = new Ext.Button({
|
||||
id: 'btnCondition',
|
||||
text: 'Assign Condition',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'grid';
|
||||
workflow.gridField = 'STEP_CONDITION';
|
||||
var rowSelected = conditionGrid.getSelectionModel().getSelections();
|
||||
if(rowSelected == '')
|
||||
workflow.gridObjectRowSelected = conditionGrid;
|
||||
else
|
||||
workflow.gridObjectRowSelected = rowSelected;
|
||||
//var rowSelected = Objectsgrid;
|
||||
//workflow.gridObject = Objectsgrid;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
//var a = Ext.getCmp('btnCondition');
|
||||
//alert (a);
|
||||
|
||||
//console.log(rowData);
|
||||
}
|
||||
|
||||
|
||||
var conditionsColumns = new Ext.grid.ColumnModel({
|
||||
columns: [
|
||||
{
|
||||
id: 'STEP_TITLE',
|
||||
header: 'Title',
|
||||
dataIndex: 'STEP_TITLE',
|
||||
width: 280,
|
||||
editor: new Ext.form.TextField({
|
||||
//allowBlank: false
|
||||
})
|
||||
},
|
||||
{
|
||||
//id: 'STEP_TITLE',
|
||||
header: 'Condition',
|
||||
dataIndex: 'STEP_CONDITION',
|
||||
width: 250,
|
||||
editable: true,
|
||||
editor: new Ext.form.TextField({
|
||||
})
|
||||
},
|
||||
{
|
||||
header: 'Assign Condition',
|
||||
width: 200,
|
||||
renderer: function(val){return '<input type="button" value="@@" id="'+val+'"/>';}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
var toolbar = new Ext.Toolbar({
|
||||
items: [btnCondition]
|
||||
});
|
||||
//availableSteps.load();
|
||||
var conditionGrid = new Ext.grid.GridPanel({
|
||||
store : taskSteps,
|
||||
id : 'conditiongrid',
|
||||
loadMask : true,
|
||||
loadingText : 'Loading...',
|
||||
// renderTo : 'cases-grid',
|
||||
|
||||
frame : false,
|
||||
autoHeight : false,
|
||||
enableDragDrop : true,
|
||||
layout : 'form',
|
||||
tbar: toolbar,
|
||||
ddGroup : 'firstGridDDGroup',
|
||||
|
||||
|
||||
clicksToEdit: 1,
|
||||
minHeight :400,
|
||||
height :400,
|
||||
|
||||
|
||||
|
||||
//plugins : [editor],
|
||||
columns : [{
|
||||
id: 'STEP_TITLE',
|
||||
header: 'Title',
|
||||
dataIndex: 'STEP_TITLE',
|
||||
width: 280,
|
||||
editor: new Ext.form.TextField({
|
||||
//alloBlank: false
|
||||
})
|
||||
},
|
||||
{
|
||||
id: 'STEP_CONDITION',
|
||||
header: 'Condition',
|
||||
dataIndex: 'STEP_CONDITION',
|
||||
width: 250,
|
||||
editable: true,
|
||||
editor: new Ext.form.TextField({
|
||||
})
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var grid = new Ext.grid.GridPanel({
|
||||
store : taskSteps,
|
||||
@@ -375,15 +423,17 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
defaults: {
|
||||
width: 400
|
||||
},
|
||||
items:[{
|
||||
xtype: 'grid',
|
||||
items:[conditionGrid]
|
||||
/*xtype: 'grid',
|
||||
name: 'conditionGrid',
|
||||
ds: taskSteps,
|
||||
cm: conditionsColumns,
|
||||
height: 350,
|
||||
loadMask : true,
|
||||
loadingText : 'Loading...',
|
||||
border: false
|
||||
}]
|
||||
border: false,
|
||||
tbar: toolbar }]*/
|
||||
|
||||
},{
|
||||
title:'Triggers',
|
||||
layout:'form',
|
||||
@@ -428,6 +478,8 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
});
|
||||
window.show();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -718,7 +770,7 @@ TaskContext.prototype.editUsers= function(_5625)
|
||||
|
||||
TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
{
|
||||
|
||||
var ProcMapObj= new ProcessMapContext();
|
||||
var taskExtObj = new TaskContext();
|
||||
var taskId = _5625.scope.workflow.currentSelection.id;
|
||||
|
||||
@@ -827,9 +879,11 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
border:false,
|
||||
items: [{
|
||||
xtype: 'textfield',
|
||||
id: 'priorityVariable',
|
||||
fieldLabel: 'Variable for Case priority',
|
||||
name: 'TAS_PRIORITY_VARIABLE',
|
||||
anchor:'100%'
|
||||
|
||||
}]
|
||||
},{
|
||||
columnWidth:.3,
|
||||
@@ -839,7 +893,14 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
xtype:'button',
|
||||
title: ' ',
|
||||
text: '@@',
|
||||
name: 'selectorigin'
|
||||
name: 'selectorigin',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'priorityVariable' ;
|
||||
workflow.formSelected = taskPropertiesTabs;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
//anchor:'15%'
|
||||
}]
|
||||
}]
|
||||
@@ -1211,6 +1272,7 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
items: [{
|
||||
xtype: 'textarea',
|
||||
fieldLabel: 'Case Title',
|
||||
id: 'caseTitle',
|
||||
name: 'TAS_DEF_TITLE',
|
||||
height : 100,
|
||||
//value: _5625.scope.workflow.taskDetails.TAS_ASSIGN_VARIABLE
|
||||
@@ -1225,7 +1287,14 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
xtype:'button',
|
||||
title: ' ',
|
||||
text: '@#',
|
||||
name: 'selectCaseTitle'
|
||||
name: 'selectCaseTitle',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'caseTitle' ;
|
||||
workflow.formSelected = taskPropertiesTabs;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
//anchor:'10%'
|
||||
}]
|
||||
}]
|
||||
@@ -1241,10 +1310,12 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
border:false,
|
||||
items: [{
|
||||
xtype: 'textarea',
|
||||
id: 'caseDescription',
|
||||
fieldLabel: 'Case Description',
|
||||
name: 'TAS_DEF_DESCRIPTION',
|
||||
height : 100,
|
||||
anchor:'100%'
|
||||
|
||||
}]
|
||||
},{
|
||||
columnWidth:.3,
|
||||
@@ -1255,7 +1326,14 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
||||
xtype:'button',
|
||||
title: ' ',
|
||||
text: '@#',
|
||||
name: 'selectCaseDesc'
|
||||
name: 'selectCaseDesc',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'form';
|
||||
workflow.fieldId= 'caseDescription' ;
|
||||
workflow.formSelected = taskPropertiesTabs;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
}
|
||||
//anchor:'10%'
|
||||
}]
|
||||
}]
|
||||
@@ -1409,6 +1487,7 @@ TaskContext.prototype.stepTriggers = function(_5625)
|
||||
{
|
||||
var pro_uid = _5625.scope.workflow.getUrlVars();
|
||||
var taskId = _5625.scope.workflow.currentSelection.id;
|
||||
var ProcMapObj= new ProcessMapContext();
|
||||
|
||||
var triggersFields = Ext.data.Record.create([
|
||||
{
|
||||
@@ -1560,10 +1639,33 @@ TaskContext.prototype.stepTriggers = function(_5625)
|
||||
stepsTriggers.remove(r);
|
||||
}
|
||||
}
|
||||
});
|
||||
var btnCondition = new Ext.Button({
|
||||
id: 'btnCondition',
|
||||
text: 'Assign Condition',
|
||||
handler: function (s) {
|
||||
workflow.variablesAction = 'grid';
|
||||
workflow.gridField = 'ST_CONDITION';
|
||||
var rowSelected = triggerGrid.getSelectionModel().getSelections();
|
||||
if(rowSelected == '')
|
||||
workflow.gridObjectRowSelected = triggerGrid;
|
||||
else
|
||||
workflow.gridObjectRowSelected = rowSelected;
|
||||
//var rowSelected = Objectsgrid;
|
||||
//workflow.gridObject = Objectsgrid;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
//var a = Ext.getCmp('btnCondition');
|
||||
//alert (a);
|
||||
|
||||
//console.log(rowData);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
var toolBar = new Ext.Toolbar({
|
||||
items: [addBtn, removeBtn]
|
||||
items: [addBtn, removeBtn, btnCondition]
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user