Pagination in process permission,process supervisor,and fixed issue with extjs

This commit is contained in:
safan
2011-02-12 12:42:15 +00:00
parent 0c575422a2
commit 4ccf2c140a
5 changed files with 413 additions and 306 deletions

View File

@@ -375,7 +375,7 @@ ProcessMapContext.prototype.processPermission= function()
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermission'
})
});
PermissionStore.load();
PermissionStore.load({params:{start:0, limit:10}});
var PermissionGridColumn = new Ext.grid.ColumnModel({
columns: [
@@ -551,7 +551,6 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
id : 'mygrid',
loadMask: true,
loadingText: 'Loading...',
//renderTo: 'cases-grid',
frame: false,
autoHeight:false,
clicksToEdit: 1,
@@ -562,6 +561,14 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
cm: PermissionGridColumn,
stripeRows: true,
tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: PermissionStore,
displayInfo: true,
displayMsg: 'Displaying Process Permission {0} - {1} of {2}',
emptyMsg: "No Process Permission to display",
items:[]
}),
viewConfig: {forceFit: true}
});
@@ -1105,15 +1112,15 @@ ProcessMapContext.prototype.processSupervisors= function()
remoteSort : true,
fields : processUserFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyProcessSupervisors?pid='+pro_uid+'&action=process_User'
url: 'proxyExtjs?pid='+pro_uid+'&action=process_Supervisors'
})
});
processUser.load();
processUser.load({params:{start:0, limit:10}});
// create the Data Store of users that are not assigned to a process supervisor
var availableProcessesUser = new Ext.data.JsonStore({
root : 'data',
url : 'proxyProcessSupervisors?pid='+pro_uid+'&action=availableProcessesUser',
url : 'proxyExtjs?pid='+pro_uid+'&action=availableProcessesSupervisors',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -1184,6 +1191,14 @@ ProcessMapContext.prototype.processSupervisors= function()
],
stripeRows: true,
viewConfig: {forceFit: true},
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: processUser,
displayInfo: true,
displayMsg: 'Displaying Process Supervisor {0} - {1} of {2}',
emptyMsg: "No Process Supervisor to display",
items:[]
}),
tbar: tb
});
@@ -1257,6 +1272,17 @@ ProcessMapContext.prototype.processDynaform= function()
STEP_TYPE_OBJ: '',
STEP_POSITION: ''
});
if(availableSupervisorDynaforms.data.items.length == 0)
Ext.MessageBox.alert ('Status','No Dynaforms are available. All Dynaforms have been already assigned.');
else
{
editor.stopEditing();
supervisorDynaforms.insert(0, e);
grid.getView().refresh();
//grid.getSelectionModel().selectRow(0);
editor.startEditing(0, 0);
}
}
});
@@ -1316,22 +1342,22 @@ ProcessMapContext.prototype.processDynaform= function()
remoteSort : true,
fields : supervisorDynaformsFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyProcessSupervisors?pid='+pro_uid+'&action=supervisorDynaforms'
url: 'proxyExtjs?pid='+pro_uid+'&action=supervisorDynaforms'
})
});
supervisorDynaforms.load();
supervisorDynaforms.load({params:{start : 0 , limit : 10 }});
// create the Data Store of users that are not assigned to a process supervisor
var availableSupervisorDynaforms = new Ext.data.JsonStore({
root : 'data',
url : 'proxyProcessSupervisors?pid='+pro_uid+'&action=availableSupervisorDynaforms',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
autoLoad : true,
fields : supervisorDynaformsFields
});
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&action=availableSupervisorDynaforms',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
autoLoad : true,
fields : supervisorDynaformsFields
});
availableSupervisorDynaforms.load();
var grid = new Ext.grid.GridPanel({
store: supervisorDynaforms,
@@ -1345,6 +1371,7 @@ ProcessMapContext.prototype.processDynaform= function()
clicksToEdit: 1,
minHeight:400,
height :400,
width :435,
layout: 'fit',
plugins: [editor],
columns: [
@@ -1384,7 +1411,15 @@ ProcessMapContext.prototype.processDynaform= function()
],
stripeRows: true,
viewConfig: {forceFit: true},
tbar: tb
tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: supervisorDynaforms,
displayInfo: true,
displayMsg: 'Displaying Supervisor Dynaform {0} - {1} of {2}',
emptyMsg: "No Supervisor Dynaform to display",
items:[]
})
});
//availableSupervisorDynaforms.load();
@@ -1420,7 +1455,7 @@ ProcessMapContext.prototype.processDynaform= function()
title: 'Dynaform',
collapsible: false,
maximizable: false,
width: 400,
width: 440,
height: 350,
minWidth: 200,
minHeight: 150,
@@ -1536,7 +1571,7 @@ ProcessMapContext.prototype.processIODoc = function()
url: 'proxyProcessSupervisors?pid='+pro_uid+'&action=supervisorInputDoc'
})
});
supervisorInputDoc.load();
supervisorInputDoc.load({params:{start : 0 , limit : 10 }});
// create the Data Store of users that are not assigned to a process supervisor
var availableSupervisorInputDoc = new Ext.data.JsonStore({
@@ -1548,7 +1583,7 @@ ProcessMapContext.prototype.processIODoc = function()
autoLoad : true,
fields : supervisorInputDocFields
});
availableSupervisorInputDoc.load();
var grid = new Ext.grid.GridPanel({
store: supervisorInputDoc,
@@ -1562,6 +1597,7 @@ ProcessMapContext.prototype.processIODoc = function()
clicksToEdit: 1,
minHeight:400,
height :400,
width :420,
layout: 'fit',
plugins: [editor],
columns: [
@@ -1601,7 +1637,15 @@ ProcessMapContext.prototype.processIODoc = function()
],
stripeRows: true,
viewConfig: {forceFit: true},
tbar: tb
tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: supervisorInputDoc,
displayInfo: true,
displayMsg: 'Displaying Supervisor Input Doc {0} - {1} of {2}',
emptyMsg: "No Supervisor Input Doc to display",
items:[]
})
});
//availableSupervisorInputDoc.load();
@@ -1637,7 +1681,7 @@ ProcessMapContext.prototype.processIODoc = function()
title: 'Input Documents',
collapsible: false,
maximizable: false,
width: 400,
width: 430,
height: 350,
minWidth: 200,
minHeight: 150,
@@ -1867,9 +1911,6 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
},{
name: 'CTO_TYPE_OBJ',
type: 'string'
},{
name:'CTO_UID_OBJ',
type:'string'
},{
name:'CTO_CONDITION',
type:'string'
@@ -1885,6 +1926,9 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
},{
name:'OBJECT_TYPE',
type:'string'
},{
name:'CTO_UID_OBJ',
type:'string'
}
]);
var editor = new Ext.ux.grid.RowEditor({
@@ -1906,7 +1950,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
});
if(availableStore.data.items.length == 0)
Ext.MessageBox.alert ('Status','No users are available. All users have been already assigned.');
Ext.MessageBox.alert ('Status','No Objects are available. All Objects have been already assigned.');
else
{
editor.stopEditing();
@@ -1915,9 +1959,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
//grid.getSelectionModel().selectRow(0);
editor.startEditing(0, 0);
}
}
});
var btnRemove = new Ext.Button({
@@ -1977,13 +2019,12 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
workflow.gridObjectRowSelected = rowSelected;
var rowData = ProcMapObj.ExtVariables();
}
})
});
var tb = new Ext.Toolbar({
items: [btnAdd, btnRemove,btnObjectsCondition]
});
var assignedStore = new Ext.data.JsonStore({
root : 'data',
totalProperty : 'totalCount',
@@ -1994,7 +2035,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
url : 'proxyExtjs?pid='+pro_uid+'&action=getAssignedCaseTrackerObjects'
})
});
assignedStore.load();
assignedStore.load({params:{start : 0 , limit : 10 }});
var availableStore = new Ext.data.JsonStore({
root : 'data',
@@ -2018,7 +2059,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
autoHeight:false,
clicksToEdit: 1,
minHeight:400,
height :400,
height :350,
layout: 'fit',
plugins: [editor],
cm: new Ext.grid.ColumnModel({
@@ -2063,16 +2104,17 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
header : 'Condition',
dataindex: 'CTO_CONDITION',
name : 'CTO_CONDITION',
//xtype: 'textfield',
editable : true
},{
editor: new Ext.form.TextField({
editable : true
})
}/*,{
sortable: false,
renderer: function(val, meta, record)
{
var recordData = Ext.util.JSON.encode(record);
return String.format("<input type='button' value='@@' onclick=workflow.ExtVariables('CTO_CONDITION','{0}');>",recordData);
//var recordData = Ext.util.JSON.encode(record);
return String.format("<input type='button' value='@@' onclick=workflow.ExtVariables('{0}');>",record.data.CTO_UID);
}
}]
}*/]
}),
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
@@ -2084,7 +2126,15 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
}),
stripeRows: true,
viewConfig: {forceFit: true},
tbar: tb
tbar: tb,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: assignedStore,
displayInfo: true,
displayMsg: 'Displaying Case Tracker Object {0} - {1} of {2}',
emptyMsg: "No Case Tracker Object to display",
items:[]
})
});
editor.on({
@@ -2096,7 +2146,6 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
var cto_uid = record.data.CTO_UID;
var condition = record.data.CTO_CONDITION;
Ext.Ajax.request({
url : '../tracker/tracker_Ajax.php',
method: 'POST',
@@ -2156,7 +2205,6 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
availableStore.reload();
assignedStore.reload();
}
});
var gridObjectWindow = new Ext.Window({
@@ -2165,15 +2213,14 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
maximizable : false,
width : 550,
defaults :{ autoScroll:true },
height : 400,
height : 380,
minWidth : 200,
minHeight : 150,
//layout : 'fit',
plain : true,
items : Objectsgrid,
buttonAlign : 'center'
});
gridObjectWindow.show()
gridObjectWindow.show()
}
ProcessMapContext.prototype.ExtVariables = function()

View File

@@ -278,7 +278,7 @@ var dynaformColumns = new Ext.grid.ColumnModel({
bodyStyle : 'padding:10px 0 0 10px;',
//monitorValid : true,
autoHeight: true,
autoScroll: true,
defaults :{autoScroll:true},
items:
[{
xtype: 'fieldset',
@@ -334,7 +334,7 @@ var dynaformColumns = new Ext.grid.ColumnModel({
items:[{
xtype : 'textfield',
fieldLabel: _('ID_TITLE'),
name : 'DYN_TITLE',
name : 'DYN_TITLE1',
width : 350,
allowBlank: false
},{
@@ -360,7 +360,7 @@ var dynaformColumns = new Ext.grid.ColumnModel({
},{
xtype : 'textarea',
fieldLabel: _('ID_DESCRIPTION'),
name : 'DYN_DESCRIPTION',
name : 'DYN_DESCRIPTION1',
height : 120,
width : 350
}
@@ -404,13 +404,13 @@ var dynaformColumns = new Ext.grid.ColumnModel({
{
xtype : 'textfield',
fieldLabel: _('ID_TITLE'),
name : 'DYN_TITLE',
name : 'DYN_TITLE2',
allowBlank: false,
width : 350
},{
xtype : 'textarea',
fieldLabel: _('ID_DESCRIPTION'),
name : 'DYN_DESCRIPTION',
name : 'DYN_DESCRIPTION2',
height : 120,
width : 350
},
@@ -441,8 +441,8 @@ var dynaformColumns = new Ext.grid.ColumnModel({
if(getForm.DYN_SOURCE == 'blankDyna')
{
var sAction = getForm.ACTION;
var sTitle = getForm.DYN_TITLE[0];
var sDesc = getForm.DYN_DESCRIPTION[0];
var sTitle = getForm.DYN_TITLE1;
var sDesc = getForm.DYN_DESCRIPTION1;
}
else
{
@@ -457,8 +457,8 @@ var dynaformColumns = new Ext.grid.ColumnModel({
}
var fieldname = Ext.util.JSON.encode(fName);
var variable = Ext.util.JSON.encode(pVar);
sTitle = getForm.DYN_TITLE[1];
sDesc = getForm.DYN_DESCRIPTION[1];
sTitle = getForm.DYN_TITLE2;
sDesc = getForm.DYN_DESCRIPTION2;
}
if(sTitle == '' || sAction == '')
@@ -517,6 +517,8 @@ var dynaformColumns = new Ext.grid.ColumnModel({
collapsible: false,
maximizable: true,
width: 550,
height: 300,
defaults :{autoScroll:true},
//autoHeight: true,
//height: 500,
layout: 'fit',
@@ -666,7 +668,7 @@ ProcessOptions.prototype.dbConnection = function()
id: 'DBS_DATABASE_NAME',
header: 'Database Name',
dataIndex: 'DBS_DATABASE_NAME',
//width: 100,
width: 150,
sortable: true,
editor: new Ext.form.TextField({
// allowBlank: false
@@ -1901,7 +1903,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
handler: function (s) {
workflow.variablesAction = 'form';
workflow.fieldName = 'OUT_DOC_FILENAME' ;
workflow.variable = '@@',
workflow.variable = '@#',
workflow.formSelected = outputDocForm;
var rowData = ProcMapObj.ExtVariables();
console.log(rowData);
@@ -2521,7 +2523,7 @@ var reportForm =new Ext.FormPanel({
align:'left',
items:[{
xtype: 'combo',
width: 250,
width: 200,
mode: 'local',
editable:false,
fieldLabel: 'Grid Fields',

View File

@@ -440,7 +440,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
title: _('ID_STEPS_OF'),
collapsible: false,
maximizable: false,
width: 750,
width: 770,
height: 365,
minWidth: 200,
minHeight: 150,
@@ -1426,7 +1426,7 @@ TaskContext.prototype.stepTriggers = function()
border : false,
rootVisible : false,
height : 320,
width : 200,
width : 230,
useArrows : false,
autoScroll : true,
animate : true
@@ -1572,7 +1572,7 @@ TaskContext.prototype.stepTriggers = function()
fields : triggersFields
});
//taskUsers.setDefaultSort('LABEL', 'asc');
stepsTriggers.load({params:{start : 0 , limit : 10 }});
stepsTriggers.load({params:{start : 0 , limit : 5 }});
var availableTriggers = new Ext.data.JsonStore({
root : 'data',
@@ -1599,7 +1599,7 @@ TaskContext.prototype.stepTriggers = function()
clicksToEdit: 1,
width : 450,
minHeight:400,
height :400,
height :320,
layout: 'fit',
plugins: [triggerEditor],
columns: [
@@ -1676,7 +1676,7 @@ TaskContext.prototype.stepTriggers = function()
stripeRows: true,
viewConfig: {forceFit: true},
bbar: new Ext.PagingToolbar({
pageSize: 10,
pageSize: 5,
store: stepsTriggers,
displayInfo: true,
displayMsg: 'Displaying Step Tiggers {0} - {1} of {2}',