process permission loading and saving form
This commit is contained in:
@@ -323,9 +323,10 @@ ProcessMapContext.prototype.delLines= function()
|
|||||||
ProcessMapContext.prototype.processPermission= function()
|
ProcessMapContext.prototype.processPermission= function()
|
||||||
{
|
{
|
||||||
var pro_uid = workflow.getUrlVars();
|
var pro_uid = workflow.getUrlVars();
|
||||||
//Database store code starts here
|
//Process Permission store code starts here
|
||||||
var dbConnFields = Ext.data.Record.create([
|
var dbConnFields = Ext.data.Record.create([
|
||||||
{ name: 'OP_UID',type: 'string'},
|
{ name: 'OP_UID',type: 'string'},
|
||||||
|
{ name: 'LABEL',type: 'string'},
|
||||||
{ name: 'TASK_TARGET',type: 'string'},
|
{ name: 'TASK_TARGET',type: 'string'},
|
||||||
{ name: 'GROUP_USER',type: 'string'},
|
{ name: 'GROUP_USER',type: 'string'},
|
||||||
{ name: 'TASK_SOURCE',type: 'string'},
|
{ name: 'TASK_SOURCE',type: 'string'},
|
||||||
@@ -429,6 +430,19 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var btnAdd = new Ext.Button({
|
||||||
|
id: 'btnAdd',
|
||||||
|
text: 'New',
|
||||||
|
iconCls: 'application_add',
|
||||||
|
handler: function () {
|
||||||
|
formWindow.show();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
var tb = new Ext.Toolbar({
|
||||||
|
items: [btnAdd]
|
||||||
|
});
|
||||||
|
|
||||||
var PermissionGrid = new Ext.grid.GridPanel({
|
var PermissionGrid = new Ext.grid.GridPanel({
|
||||||
store: PermissionStore,
|
store: PermissionStore,
|
||||||
id : 'mygrid',
|
id : 'mygrid',
|
||||||
@@ -444,7 +458,7 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
cm: PermissionGridColumn,
|
cm: PermissionGridColumn,
|
||||||
stripeRows: true,
|
stripeRows: true,
|
||||||
//tbar: tb,
|
tbar: tb,
|
||||||
viewConfig: {forceFit: true}
|
viewConfig: {forceFit: true}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -462,16 +476,20 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
items: PermissionGrid
|
items: PermissionGrid
|
||||||
|
|
||||||
});
|
});
|
||||||
var btnNew = new Ext.Button({
|
|
||||||
id: 'btnNew',
|
|
||||||
text: 'New',
|
|
||||||
iconCls: 'application_add',
|
|
||||||
handler: function () {
|
|
||||||
formWindow.show();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
var PermissionForm =new Ext.FormPanel({
|
var formStore = new Ext.data.JsonStore({
|
||||||
|
root : 'data',
|
||||||
|
totalProperty: 'totalCount',
|
||||||
|
idProperty : 'gridIndex',
|
||||||
|
remoteSort : true,
|
||||||
|
fields : dbConnFields,
|
||||||
|
proxy: new Ext.data.HttpProxy({
|
||||||
|
url: 'proxyObjectPermissions.php?pid='+pro_uid+'&t=1'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
formStore.load();
|
||||||
|
|
||||||
|
var PermissionForm =new Ext.FormPanel({
|
||||||
// title:"Add new Database Source",
|
// title:"Add new Database Source",
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
@@ -520,7 +538,17 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
{name : 'Apply for leave', value: '1'},
|
{name : 'Apply for leave', value: '1'},
|
||||||
{name : 'HR approval', value: '2'},
|
{name : 'HR approval', value: '2'},
|
||||||
{name : 'Supervisor Approval', value: '3'}]})
|
{name : 'Supervisor Approval', value: '3'}]})
|
||||||
},{
|
},new Ext.form.ComboBox({
|
||||||
|
fieldLabel: 'Group or Users',
|
||||||
|
hiddenName:'popType',
|
||||||
|
store: formStore,
|
||||||
|
valueField:'LABEL',
|
||||||
|
displayField:'LABEL',
|
||||||
|
triggerAction: 'all',
|
||||||
|
emptyText:'Select',
|
||||||
|
editable: true
|
||||||
|
})
|
||||||
|
,/*{
|
||||||
width :150,
|
width :150,
|
||||||
xtype :'combo',
|
xtype :'combo',
|
||||||
mode :'local',
|
mode :'local',
|
||||||
@@ -536,7 +564,7 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
{name : 'Administrator(Admin)', value: '0'}]})
|
{name : 'Administrator(Admin)', value: '0'}]})
|
||||||
},{
|
},*/{
|
||||||
width :150,
|
width :150,
|
||||||
xtype :'combo',
|
xtype :'combo',
|
||||||
mode :'local',
|
mode :'local',
|
||||||
@@ -612,17 +640,7 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
var formStore = new Ext.data.JsonStore({
|
|
||||||
root : 'data',
|
|
||||||
totalProperty: 'totalCount',
|
|
||||||
idProperty : 'gridIndex',
|
|
||||||
remoteSort : true,
|
|
||||||
fields : dbConnFields,
|
|
||||||
proxy: new Ext.data.HttpProxy({
|
|
||||||
url: 'proxyObjectPermissions.php?pid='+pro_uid+'&t=1'
|
|
||||||
})
|
|
||||||
});
|
|
||||||
formStore.load();
|
|
||||||
|
|
||||||
var formWindow = new Ext.Window({
|
var formWindow = new Ext.Window({
|
||||||
title: 'New specific Permission',
|
title: 'New specific Permission',
|
||||||
@@ -669,7 +687,7 @@ var formWindow = new Ext.Window({
|
|||||||
//taskExtObj.saveTaskUsers(getData);
|
//taskExtObj.saveTaskUsers(getData);
|
||||||
|
|
||||||
formWindow.close();
|
formWindow.close();
|
||||||
dbStore.reload();
|
PermissionStore.reload();
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
|
|||||||
@@ -1322,8 +1322,6 @@ TaskContext.prototype.editTaskProperties= function(_5625)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
taskPropertiesTabs.render(document.body);
|
taskPropertiesTabs.render(document.body);
|
||||||
_5625.scope.workflow.taskPropertiesTabs = taskPropertiesTabs;
|
_5625.scope.workflow.taskPropertiesTabs = taskPropertiesTabs;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user