fixed DB connection issue,added EDIT process permission option
This commit is contained in:
@@ -158,6 +158,10 @@ if ( isset ($_REQUEST['action']) ) {
|
|||||||
$sOutput = $oTask->update($aData);
|
$sOutput = $oTask->update($aData);
|
||||||
echo $sOutput;
|
echo $sOutput;
|
||||||
break;
|
break;
|
||||||
|
case 'editObjectPermission':
|
||||||
|
// we also need the process uid variable for the function.
|
||||||
|
$oProcessMap->editObjectPermission($oData->op_uid,$oData->pro_uid);
|
||||||
|
break;
|
||||||
case 'triggersList':
|
case 'triggersList':
|
||||||
$sOutput = $oProcessMap->getTriggers($oData->pro_uid);
|
$sOutput = $oProcessMap->getTriggers($oData->pro_uid);
|
||||||
$sOutput = $oJSON->encode($sOutput);
|
$sOutput = $oJSON->encode($sOutput);
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ switch($_GET['action'])
|
|||||||
array_shift($rows);
|
array_shift($rows);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'editObjectPermission':
|
||||||
|
$rows = $oProcessMap->editExtObjectPermission($_GET['op_uid'],$_GET['pid']);
|
||||||
|
array_shift($rows);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'editOutputDocument':
|
case 'editOutputDocument':
|
||||||
require_once 'classes/model/OutputDocument.php';
|
require_once 'classes/model/OutputDocument.php';
|
||||||
$oOutputDocument = new OutputDocument();
|
$oOutputDocument = new OutputDocument();
|
||||||
@@ -195,6 +200,7 @@ switch($_GET['action'])
|
|||||||
$rows[$key] = 'Work Days';
|
$rows[$key] = 'Work Days';
|
||||||
else if($key == 'TAS_TYPE_DAY' && $value == '2')
|
else if($key == 'TAS_TYPE_DAY' && $value == '2')
|
||||||
$rows[$key] = 'Calendar Days';
|
$rows[$key] = 'Calendar Days';
|
||||||
|
|
||||||
if($key == 'TAS_TYPE' && $value == 'NORMAL')
|
if($key == 'TAS_TYPE' && $value == 'NORMAL')
|
||||||
$rows[$key] = false;
|
$rows[$key] = false;
|
||||||
else if($key == 'TAS_TYPE' && $value == 'ADHOC')
|
else if($key == 'TAS_TYPE' && $value == 'ADHOC')
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ if( isset($_POST['action']) ){
|
|||||||
throw new Exception('dbconnections Fatal error, No action defined!...');
|
throw new Exception('dbconnections Fatal error, No action defined!...');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($_POST['PROCESS']))
|
||||||
|
$_SESSION['PROCESS'] = $_POST['PROCESS'];
|
||||||
|
|
||||||
#Global Definitions
|
#Global Definitions
|
||||||
require_once 'classes/model/DbSource.php';
|
require_once 'classes/model/DbSource.php';
|
||||||
require_once 'classes/model/Content.php';
|
require_once 'classes/model/Content.php';
|
||||||
|
|||||||
@@ -426,27 +426,85 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
var editor = new Ext.ux.grid.RowEditor({
|
||||||
|
saveText: 'Update'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var btnCreate = new Ext.Button({
|
var btnCreate = new Ext.Button({
|
||||||
id: 'btnCreate',
|
id: 'btnCreate',
|
||||||
text: 'New',
|
text: 'New',
|
||||||
iconCls: 'application_add',
|
iconCls: 'application_add',
|
||||||
handler: function () {
|
handler: function () {
|
||||||
formWindow.show();
|
formWindow.show();
|
||||||
|
PermissionForm.getForm().reset();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var btnEdit = new Ext.Button({
|
||||||
|
id: 'btnEdit',
|
||||||
|
text: 'Edit',
|
||||||
|
iconCls: 'application_add',
|
||||||
|
handler: function (s) {
|
||||||
|
var selectedRow = PermissionGrid.getSelectionModel().getSelections();
|
||||||
|
var opUID = selectedRow[0].data.OP_UID;
|
||||||
|
//Loading Task Details into the form
|
||||||
|
PermissionForm.form.load({
|
||||||
|
url:'proxyExtjs.php?pid='+pro_uid+'&op_uid=' +opUID+'&action=editObjectPermission',
|
||||||
|
method:'GET',
|
||||||
|
waitMsg:'Loading',
|
||||||
|
success:function(form, action) {
|
||||||
|
//Ext.MessageBox.alert('Message', 'Loaded OK');
|
||||||
|
formWindow.show();
|
||||||
|
//Ext.getCmp("OP_UID").setValue(opUID);
|
||||||
|
},
|
||||||
|
failure:function(form, action) {
|
||||||
|
Ext.MessageBox.alert('Message', 'Load failed');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
|
||||||
var tb = new Ext.Toolbar({
|
|
||||||
items: [btnCreate]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var btnAdd = new Ext.Button({
|
var btnRemove = new Ext.Button({
|
||||||
id: 'btnAdd',
|
id: 'btnRemove',
|
||||||
text: 'New',
|
text: 'Delete',
|
||||||
iconCls: 'application_add',
|
iconCls: 'application_delete',
|
||||||
handler: function () {
|
handler: function (s) {
|
||||||
PermissionForm.getForm().reset();
|
editor.stopEditing();
|
||||||
formWindow.show();
|
var s = PermissionGrid.getSelectionModel().getSelections();
|
||||||
|
for(var i = 0, r; r = s[i]; i++){
|
||||||
|
|
||||||
|
//First Deleting process permission from Database using Ajax
|
||||||
|
var opUID = r.data.OP_UID;
|
||||||
|
|
||||||
|
//if OP_UID is properly defined (i.e. set to valid value) then only delete the row
|
||||||
|
//else its a BLANK ROW for which Ajax should not be called.
|
||||||
|
if(r.data.OP_UID != "")
|
||||||
|
{
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : '../inputdocs/inputdocs_Delete.php',
|
||||||
|
method: 'POST',
|
||||||
|
params: {
|
||||||
|
functions : 'deleteInputDocument',
|
||||||
|
OP_UID : opUID
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Process Permission has been removed successfully.');
|
||||||
|
//Secondly deleting from Grid
|
||||||
|
PermissionStore.remove(r);
|
||||||
|
//reloading store after deleting input document
|
||||||
|
PermissionStore.reload();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
PermissionStore.remove(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var tb = new Ext.Toolbar({
|
||||||
|
items: [btnCreate,btnRemove,btnEdit]
|
||||||
|
});
|
||||||
|
|
||||||
var PermissionGrid = new Ext.grid.GridPanel({
|
var PermissionGrid = new Ext.grid.GridPanel({
|
||||||
store: PermissionStore,
|
store: PermissionStore,
|
||||||
@@ -690,6 +748,7 @@ var tb = new Ext.Toolbar({
|
|||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
id : 'dynaform',
|
id : 'dynaform',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
border: false,
|
||||||
items: [{
|
items: [{
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
fieldLabel: 'Dynaform',
|
fieldLabel: 'Dynaform',
|
||||||
@@ -714,6 +773,7 @@ var tb = new Ext.Toolbar({
|
|||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
id : 'inputdoc',
|
id : 'inputdoc',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
border: false,
|
||||||
items: [{
|
items: [{
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
fieldLabel: 'Input Document',
|
fieldLabel: 'Input Document',
|
||||||
@@ -738,6 +798,7 @@ var tb = new Ext.Toolbar({
|
|||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
id : 'outputdoc',
|
id : 'outputdoc',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
border: false,
|
||||||
items: [{
|
items: [{
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
fieldLabel: 'Output Document',
|
fieldLabel: 'Output Document',
|
||||||
@@ -804,7 +865,8 @@ var tb = new Ext.Toolbar({
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
], buttons: [{
|
],
|
||||||
|
buttons: [{
|
||||||
text: 'Create',
|
text: 'Create',
|
||||||
formBind :true,
|
formBind :true,
|
||||||
handler: function(){
|
handler: function(){
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Title',
|
fieldLabel: 'Title',
|
||||||
name : 'DYN_TITLE',
|
name : 'DYN_TITLE'
|
||||||
// allowBlank: false
|
// allowBlank: false
|
||||||
},{
|
},{
|
||||||
xtype : 'textarea',
|
xtype : 'textarea',
|
||||||
@@ -895,6 +895,8 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
var Password = getForm.DBS_PASSWORD;
|
var Password = getForm.DBS_PASSWORD;
|
||||||
var Port = getForm.DBS_PORT;
|
var Port = getForm.DBS_PORT;
|
||||||
var Description = getForm.DBS_DESCRIPTION;
|
var Description = getForm.DBS_DESCRIPTION;
|
||||||
|
var encode = getForm.DBS_ENCODE;
|
||||||
|
|
||||||
|
|
||||||
if(dbConnUID=='')
|
if(dbConnUID=='')
|
||||||
{
|
{
|
||||||
@@ -910,6 +912,8 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
passwd :Password,
|
passwd :Password,
|
||||||
port :Port,
|
port :Port,
|
||||||
desc :Description,
|
desc :Description,
|
||||||
|
PROCESS :pro_uid,
|
||||||
|
enc :encode,
|
||||||
action :'saveConnection'
|
action :'saveConnection'
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
@@ -930,7 +934,9 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
user :Username ,
|
user :Username ,
|
||||||
passwd :Password,
|
passwd :Password,
|
||||||
port :Port,
|
port :Port,
|
||||||
|
PROCESS :pro_uid,
|
||||||
desc :Description,
|
desc :Description,
|
||||||
|
enc :encode,
|
||||||
action :'saveEditConnection'
|
action :'saveEditConnection'
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
@@ -1082,8 +1088,8 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
text: 'New',
|
text: 'New',
|
||||||
iconCls: 'application_add',
|
iconCls: 'application_add',
|
||||||
handler: function () {
|
handler: function () {
|
||||||
inputDocForm.getForm().reset();
|
|
||||||
newIOWindow.show();
|
newIOWindow.show();
|
||||||
|
inputDocForm.getForm().reset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2051,6 +2057,10 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
{
|
{
|
||||||
name: 'FIELD_NAME',
|
name: 'FIELD_NAME',
|
||||||
type: 'string'
|
type: 'string'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'FIELD_UID',
|
||||||
|
type: 'string'
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -2070,6 +2080,18 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
});
|
});
|
||||||
reportStore.load();
|
reportStore.load();
|
||||||
|
|
||||||
|
var reportTableTypeStore = new Ext.data.JsonStore({
|
||||||
|
root : 'data',
|
||||||
|
totalProperty: 'totalCount',
|
||||||
|
idProperty : 'gridIndex',
|
||||||
|
remoteSort : true,
|
||||||
|
fields : reportFields,
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url : 'proxyExtjs?pid='+pro_uid+'&type=NORMAL&action=getReportTableType'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
reportTableTypeStore.load();
|
||||||
|
|
||||||
var reportColumns = new Ext.grid.ColumnModel({
|
var reportColumns = new Ext.grid.ColumnModel({
|
||||||
columns: [
|
columns: [
|
||||||
new Ext.grid.RowNumberer(),
|
new Ext.grid.RowNumberer(),
|
||||||
@@ -2091,8 +2113,8 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
text: 'New',
|
text: 'New',
|
||||||
iconCls: 'application_add',
|
iconCls: 'application_add',
|
||||||
handler: function () {
|
handler: function () {
|
||||||
reportForm.getForm().reset();
|
|
||||||
formWindow.show();
|
formWindow.show();
|
||||||
|
reportForm.getForm().reset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2144,7 +2166,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
//Secondly deleting from Grid
|
//Secondly deleting from Grid
|
||||||
reportGrid.remove(r);
|
reportGrid.remove(r);
|
||||||
//Reloading store after deleting report table
|
//Reloading store after deleting report table
|
||||||
reportGrid.reload();
|
reportStore.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2226,7 +2248,7 @@ var reportForm =new Ext.FormPanel({
|
|||||||
name: 'REP_TAB_TYPE',
|
name: 'REP_TAB_TYPE',
|
||||||
displayField: 'name',
|
displayField: 'name',
|
||||||
valueField : 'value',
|
valueField : 'value',
|
||||||
value : 'global',
|
value : 'Global',
|
||||||
store: new Ext.data.JsonStore({
|
store: new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
@@ -2245,9 +2267,9 @@ var reportForm =new Ext.FormPanel({
|
|||||||
Ext.getCmp("gridfields").show();
|
Ext.getCmp("gridfields").show();
|
||||||
Ext.getCmp("fields").hide();
|
Ext.getCmp("fields").hide();
|
||||||
}
|
}
|
||||||
var link = 'proxyReportTables?pid='+pro_uid+'&type='+record.data.value+'&action=getReportTableType';
|
var link = 'proxyExtjs?pid='+pro_uid+'&type='+record.data.value+'&action=getReportTableType';
|
||||||
reportStore.proxy.setUrl(link, true);
|
reportTableTypeStore.proxy.setUrl(link, true);
|
||||||
reportStore.load();
|
reportTableTypeStore.load();
|
||||||
|
|
||||||
this.setValue(record.data[this.valueField || this.displayField]);
|
this.setValue(record.data[this.valueField || this.displayField]);
|
||||||
this.collapse();
|
this.collapse();
|
||||||
@@ -2269,9 +2291,9 @@ var reportForm =new Ext.FormPanel({
|
|||||||
forceSelection: false,
|
forceSelection: false,
|
||||||
dataIndex : 'FIELD_NAME',
|
dataIndex : 'FIELD_NAME',
|
||||||
name: 'FIELDS',
|
name: 'FIELDS',
|
||||||
valueField: 'FIELD_NAME',
|
valueField: 'FIELD_UID',
|
||||||
displayField: 'FIELD_NAME',
|
displayField: 'FIELD_NAME',
|
||||||
store: reportStore
|
store: reportTableTypeStore
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
@@ -2357,7 +2379,7 @@ var reportForm =new Ext.FormPanel({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
formWindow.hide();
|
formWindow.hide();
|
||||||
reportStore.reload();
|
//reportStore.reload();
|
||||||
|
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
@@ -2376,13 +2398,12 @@ var formWindow = new Ext.Window({
|
|||||||
width: 400,
|
width: 400,
|
||||||
//autoHeight: true,
|
//autoHeight: true,
|
||||||
height: 400,
|
height: 400,
|
||||||
//layout: 'fit',
|
layout: 'fit',
|
||||||
plain: true,
|
plain: true,
|
||||||
bodyStyle: 'padding:5px;',
|
bodyStyle: 'padding:5px;',
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
items: reportForm
|
items: reportForm
|
||||||
|
|
||||||
});
|
});
|
||||||
gridWindow.show();
|
//gridWindow.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1264,23 +1264,7 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
],buttons: [{
|
]
|
||||||
text: 'Save',
|
|
||||||
formBind :true,
|
|
||||||
handler: function(){
|
|
||||||
//var getstore = taskPropertiesTabs.getStore();
|
|
||||||
//var getData = getstore.data.items;
|
|
||||||
taskExtObj.saveTaskProperties();
|
|
||||||
window.hide();
|
|
||||||
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
text: 'Cancel',
|
|
||||||
handler: function(){
|
|
||||||
// when this button clicked,
|
|
||||||
window.hide();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1353,7 +1337,24 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
plain: true,
|
plain: true,
|
||||||
bodyStyle: 'padding:5px;',
|
bodyStyle: 'padding:5px;',
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
items: taskPropertiesTabs
|
items: taskPropertiesTabs,
|
||||||
|
buttons: [{
|
||||||
|
text: 'Save',
|
||||||
|
formBind :true,
|
||||||
|
handler: function(){
|
||||||
|
//var getstore = taskPropertiesTabs.getStore();
|
||||||
|
//var getData = getstore.data.items;
|
||||||
|
taskExtObj.saveTaskProperties();
|
||||||
|
window.hide();
|
||||||
|
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: 'Cancel',
|
||||||
|
handler: function(){
|
||||||
|
// when this button clicked,
|
||||||
|
window.hide();
|
||||||
|
}
|
||||||
|
}]
|
||||||
});
|
});
|
||||||
window.show();
|
window.show();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user