made few changes

This commit is contained in:
safan
2010-12-14 07:28:38 +00:00
parent 1e6261c04e
commit cd1c476b99
3 changed files with 54 additions and 231 deletions

View File

@@ -65,7 +65,7 @@ MyWorkflow.prototype.AddTaskContextMenu= function(_4092)
{ {
text: 'Users & Users Groups (ad-hoc)', text: 'Users & Users Groups (ad-hoc)',
scope: _4092 scope: _4092
}, }/*,
{ {
text: 'Routing Rule', text: 'Routing Rule',
handler: taskExtObj.editRoutingRule, handler: taskExtObj.editRoutingRule,
@@ -78,7 +78,7 @@ MyWorkflow.prototype.AddTaskContextMenu= function(_4092)
{ {
text: 'Delete Task', text: 'Delete Task',
scope: _4092 scope: _4092
}, }*/,
{ {
text: 'Transform To', text: 'Transform To',
menu: { // <-- submenu by nested config object menu: { // <-- submenu by nested config object
@@ -878,167 +878,6 @@ MyWorkflow.prototype.editSubProcessProperties= function(_3525)
MyWorkflow.prototype.editGatewayProperties= function() MyWorkflow.prototype.editGatewayProperties= function()
{ {
var myData = {
records : [
{ name : "Rec 0", column1 : "0", column2 : "0" },
{ name : "Rec 1", column1 : "1", column2 : "1" },
{ name : "Rec 2", column1 : "2", column2 : "2" },
{ name : "Rec 3", column1 : "3", column2 : "3" },
{ name : "Rec 4", column1 : "4", column2 : "4" },
{ name : "Rec 5", column1 : "5", column2 : "5" },
{ name : "Rec 6", column1 : "6", column2 : "6" },
{ name : "Rec 7", column1 : "7", column2 : "7" },
{ name : "Rec 8", column1 : "8", column2 : "8" },
{ name : "Rec 9", column1 : "9", column2 : "9" }
]
};
// Generic fields array to use in both store defs.
var fields = [
{name: 'name', mapping : 'name'},
{name: 'column1', mapping : 'column1'},
{name: 'column2', mapping : 'column2'}
];
// create the data store
var firstGridStore = new Ext.data.JsonStore({
fields : fields,
data : myData,
root : 'records'
});
// Column Model shortcut array
var cols = [
{ id : 'name', header: "Record Name", width: 160, sortable: true, dataIndex: 'name'},
{header: "column1", width: 50, sortable: true, dataIndex: 'column1'},
{header: "column2", width: 50, sortable: true, dataIndex: 'column2'}
];
// declare the source Grid
var firstGrid = new Ext.grid.GridPanel({
ddGroup : 'secondGridDDGroup',
getView : function(){
if(!this.view){
this.view = new Ext.grid.GridView(this.viewConfig);
}
return this.view;
},
store : firstGridStore,
columns : cols,
enableDragDrop : true,
stripeRows : true,
autoExpandColumn : 'name',
title : 'First Grid'
});
var secondGridStore = new Ext.data.JsonStore({
fields : fields,
root : 'records'
});
// create the destination Grid
var secondGrid = new Ext.grid.GridPanel({
ddGroup : 'firstGridDDGroup',
getView : function(){
if(!this.view){
this.view = new Ext.grid.GridView(this.viewConfig);
}
return this.view;
},
store : secondGridStore,
columns : cols,
enableDragDrop : true,
stripeRows : true,
autoExpandColumn : 'name',
title : 'Second Grid'
});
//Simple 'border layout' panel to house both grids
var displayPanel = new Ext.Panel({
width : 650,
height : 300,
layout : 'hbox',
//renderTo : 'panel',
defaults : { flex : 1 }, //auto stretch
layoutConfig : { align : 'stretch' },
items : [
firstGrid,
secondGrid
],
bbar : [
'->', // Fill
{
text : 'Reset both grids',
handler : function() {
//refresh source grid
firstGridStore.loadData(myData);
//purge destination grid
secondGridStore.removeAll();
}
}
]
});
// used to add records to the destination stores
var blankRecord = Ext.data.Record.create(fields);
/****
* Setup Drop Targets
***/
// This will make sure we only drop to the view scroller element
// var view = new Ext.grid.GridView(this.viewConfig);
var firstGridDropTargetEl = firstGrid.getView().scroller.dom;
var firstGridDropTarget = new Ext.dd.DropTarget(firstGridDropTargetEl, {
ddGroup : 'firstGridDDGroup',
notifyDrop : function(ddSource, e, data){
var records = ddSource.dragData.selections;
Ext.each(records, ddSource.grid.store.remove, ddSource.grid.store);
firstGrid.store.add(records);
firstGrid.store.sort('name', 'ASC');
return true
}
});
// This will make sure we only drop to the view scroller element
var secondGridDropTargetEl = secondGrid.getView().scroller.dom;
var secondGridDropTarget = new Ext.dd.DropTarget(secondGridDropTargetEl, {
ddGroup : 'secondGridDDGroup',
notifyDrop : function(ddSource, e, data){
var records = ddSource.dragData.selections;
Ext.each(records, ddSource.grid.store.remove, ddSource.grid.store);
secondGrid.store.add(records);
secondGrid.store.sort('name', 'ASC');
return true
}
});
firstGrid.render(document.body);
secondGrid.render(document.body);
var window = new Ext.Window({
title: 'Gateways Properties',
collapsible: false,
maximizable: false,
width: 500,
height: 400,
minWidth: 300,
minHeight: 200,
layout: 'fit',
plain: true,
bodyStyle: 'padding:5px;',
buttonAlign: 'center',
items: displayPanel,
buttons: [{
text: 'Save'
},{
text: 'Cancel'
}]
});
window.show();
} }
@@ -1621,7 +1460,6 @@ MyWorkflow.prototype.getCommonConnections = function(_4356)
if(routes[j][1] != temp1.data[0].sourcePort.parentNode.id) if(routes[j][1] != temp1.data[0].sourcePort.parentNode.id)
{ {
routes[j] = new Array(3); routes[j] = new Array(3);
routes[j][0] = temp1.data[0].id; routes[j][0] = temp1.data[0].id;
routes[j][1] = temp1.data[0].sourcePort.parentNode.id; routes[j][1] = temp1.data[0].sourcePort.parentNode.id;
routes[j][2] = temp1.data[0].targetPort.parentNode.id; routes[j][2] = temp1.data[0].targetPort.parentNode.id;

View File

@@ -12,7 +12,6 @@ ProcessOptions.prototype.type="ProcessOptions";
ProcessOptions.prototype.addDynaform= function(_5625) ProcessOptions.prototype.addDynaform= function(_5625)
{ {
var pro_uid = workflow.getUrlVars(); var pro_uid = workflow.getUrlVars();
//var taskId = workflow.currentSelection.id;
var dynaFields = Ext.data.Record.create([ var dynaFields = Ext.data.Record.create([
{ name: 'DYN_UID', type: 'string'}, { name: 'DYN_UID', type: 'string'},
@@ -200,6 +199,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
labelWidth: 100, labelWidth: 100,
bodyStyle :'padding:5px 5px 0', bodyStyle :'padding:5px 5px 0',
width : 550, width : 550,
autoHeight: true,
items: items:
[{ [{
xtype: 'fieldset', xtype: 'fieldset',
@@ -339,8 +339,8 @@ ProcessOptions.prototype.addDynaform= function(_5625)
ds: tablesFieldsStore, ds: tablesFieldsStore,
cm: addTableColumns, cm: addTableColumns,
width: 550, width: 550,
height: 300, //height: 300,
//autoHeight: true, autoHeight: true,
plugins: [editor], plugins: [editor],
//loadMask : true, //loadMask : true,
loadingText : 'Loading...', loadingText : 'Loading...',
@@ -373,7 +373,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
maximizable: true, maximizable: true,
width: 550, width: 550,
//autoHeight: true, //autoHeight: true,
height: 400, //height: 500,
layout: 'fit', layout: 'fit',
plain: true, plain: true,
bodyStyle: 'padding:5px;', bodyStyle: 'padding:5px;',
@@ -441,7 +441,6 @@ ProcessOptions.prototype.addDynaform= function(_5625)
ProcessOptions.prototype.addInputDoc= function(_5625) ProcessOptions.prototype.addInputDoc= function(_5625)
{ {
var pro_uid = workflow.getUrlVars(); var pro_uid = workflow.getUrlVars();
//var taskId = workflow.currentSelection.id;
var dynaFields = Ext.data.Record.create([ var dynaFields = Ext.data.Record.create([
{ {
@@ -466,9 +465,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
saveText: 'Update' saveText: 'Update'
}); });
var inputDocStore = new Ext.data.JsonStore({
var inputDocStore = new Ext.data.JsonStore({
root : 'data', root : 'data',
totalProperty: 'totalCount', totalProperty: 'totalCount',
idProperty : 'gridIndex', idProperty : 'gridIndex',
@@ -478,9 +475,9 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
url: 'proxyInputDocument?pid='+pro_uid url: 'proxyInputDocument?pid='+pro_uid
}) })
}); });
inputDocStore.load(); inputDocStore.load();
var btnRemove = new Ext.Button({ var btnRemove = new Ext.Button({
id: 'btnRemove', id: 'btnRemove',
text: 'Delete Input Document', text: 'Delete Input Document',
iconCls: 'application_delete', iconCls: 'application_delete',
@@ -514,7 +511,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
} }
}); });
var btnAdd = new Ext.Button({ var btnAdd = new Ext.Button({
id: 'btnAdd', id: 'btnAdd',
text: 'New Input Document', text: 'New Input Document',
iconCls: 'application_add', iconCls: 'application_add',
@@ -523,13 +520,12 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
} }
}); });
var inputDocForm = new Ext.FormPanel({ var inputDocForm = new Ext.FormPanel({
labelWidth: 100, labelWidth: 100,
bodyStyle :'padding:5px 5px 0', bodyStyle :'padding:5px 5px 0',
width : 500, width : 500,
items: autoHeight: true,
[{ items:[{
xtype: 'fieldset', xtype: 'fieldset',
layout: 'form', layout: 'form',
border:true, border:true,
@@ -655,35 +651,32 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
border:false, border:false,
width: 550, width: 550,
items:[{ items:[{
columnWidth:.6, columnWidth:.6,
layout: 'form', layout: 'form',
border:false, border:false,
items: [{ items: [{
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Tags', fieldLabel: 'Tags',
name: 'INP_DOC_TAGS', name: 'INP_DOC_TAGS',
anchor:'100%' anchor:'100%'
}] }]
},{ },{
columnWidth:.3, columnWidth:.3,
layout: 'form', layout: 'form',
border:false, border:false,
items: [{ items: [{
xtype:'button', xtype:'button',
title: ' ', title: ' ',
text: '@@', text: '@@',
name: 'selectorigin' name: 'selectorigin'
//anchor:'15%' //anchor:'15%'
}] }]
}] }]
}]
}] }]
}); }]
});
var inputDocColumns = new Ext.grid.ColumnModel({
var inputDocColumns = new Ext.grid.ColumnModel({
columns: [ columns: [
{ {
id: 'INP_DOC_TITLE', id: 'INP_DOC_TITLE',
@@ -729,7 +722,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
}); });
var gridWindow = new Ext.Window({ var gridWindow = new Ext.Window({
title: 'Input Document', title: 'Input Document',
collapsible: false, collapsible: false,
maximizable: false, maximizable: false,
@@ -744,7 +737,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
buttonAlign: 'center' buttonAlign: 'center'
}); });
var newIOWindow = new Ext.Window({ var newIOWindow = new Ext.Window({
title: 'Input Document', title: 'Input Document',
collapsible: false, collapsible: false,
maximizable: false, maximizable: false,
@@ -826,7 +819,6 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
ProcessOptions.prototype.addOutputDoc= function(_5625) ProcessOptions.prototype.addOutputDoc= function(_5625)
{ {
var pro_uid = workflow.getUrlVars(); var pro_uid = workflow.getUrlVars();
//var taskId = workflow.currentSelection.id;
var dynaFields = Ext.data.Record.create([ var dynaFields = Ext.data.Record.create([
{ {
@@ -847,13 +839,13 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
} }
]); ]);
var editor = new Ext.ux.grid.RowEditor({ var editor = new Ext.ux.grid.RowEditor({
saveText: 'Update' saveText: 'Update'
}); });
var outputDocStore = new Ext.data.JsonStore({ var outputDocStore = new Ext.data.JsonStore({
root : 'data', root : 'data',
totalProperty: 'totalCount', totalProperty: 'totalCount',
idProperty : 'gridIndex', idProperty : 'gridIndex',
@@ -863,9 +855,9 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
url: 'proxyOutputDocument?pid='+pro_uid url: 'proxyOutputDocument?pid='+pro_uid
}) })
}); });
outputDocStore.load(); outputDocStore.load();
var btnRemove = new Ext.Button({ var btnRemove = new Ext.Button({
id: 'btnRemove', id: 'btnRemove',
text: 'Delete Output Document', text: 'Delete Output Document',
iconCls: 'application_delete', iconCls: 'application_delete',
@@ -900,7 +892,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
}); });
var btnAdd = new Ext.Button({ var btnAdd = new Ext.Button({
id: 'btnAdd', id: 'btnAdd',
text: 'New Output Document', text: 'New Output Document',
iconCls: 'application_add', iconCls: 'application_add',
@@ -909,12 +901,12 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
} }
}); });
var tb = new Ext.Toolbar({ var tb = new Ext.Toolbar({
items: [btnAdd, btnRemove] items: [btnAdd, btnRemove]
}); });
var outputDocColumns = new Ext.grid.ColumnModel({ var outputDocColumns = new Ext.grid.ColumnModel({
columns: [ columns: [
{ {
id: 'OUT_DOC_TITLE', id: 'OUT_DOC_TITLE',
@@ -937,7 +929,7 @@ var tb = new Ext.Toolbar({
}); });
var outputDocGrid = new Ext.grid.GridPanel({ var outputDocGrid = new Ext.grid.GridPanel({
store : outputDocStore, store : outputDocStore,
id : 'mygrid', id : 'mygrid',
loadMask : true, loadMask : true,
@@ -955,7 +947,7 @@ var tb = new Ext.Toolbar({
viewConfig : {forceFit: true} viewConfig : {forceFit: true}
}); });
var outputDocForm = new Ext.FormPanel({ var outputDocForm = new Ext.FormPanel({
labelWidth : 100, labelWidth : 100,
bodyStyle :'padding:5px 5px 0', bodyStyle :'padding:5px 5px 0',
@@ -1175,12 +1167,9 @@ var tb = new Ext.Toolbar({
}] }]
}] }]
}] }]
}); });
var newOPWindow = new Ext.Window({
var newOPWindow = new Ext.Window({
title : 'Output Document', title : 'Output Document',
collapsible : false, collapsible : false,
maximizable : false, maximizable : false,
@@ -1244,9 +1233,6 @@ var tb = new Ext.Toolbar({
} }
}); });
//var getData = getstore.data.items;
//taskExtObj.saveTaskUsers(getData);
newOPWindow.close(); newOPWindow.close();
outputDocStore.reload(); outputDocStore.reload();
} }
@@ -1273,9 +1259,8 @@ var tb = new Ext.Toolbar({
bodyStyle : 'padding:5px;', bodyStyle : 'padding:5px;',
items : outputDocGrid, items : outputDocGrid,
buttonAlign : 'center' buttonAlign : 'center'
}); });
gridWindow.show();
gridWindow.show();
} }

View File

@@ -176,7 +176,7 @@ Ext.onReady ( function() {
handler : function() { handler : function() {
processObj.addOutputDoc(); processObj.addOutputDoc();
} }
},{text: 'Trigger'},{text: 'Report Table'},{text: 'Database Connection'},{text: 'Cases Scheduler'}] },{text: 'Trigger'},{text: 'Report Table'},{text: 'Database Connection'}]
}) })
}, },