fixed DB edit issue...

This commit is contained in:
safan
2011-02-03 15:03:44 +00:00
parent 81a4319440
commit fe40b3e8d2
6 changed files with 88 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
<?php
$oHeadPublisher =& headPublisher::getSingleton();
//$oHeadPublisher->setExtSkin( 'xtheme-gray');
//$oHeadPublisher->setExtSkin( 'xtheme-gray');
$oHeadPublisher->addExtJsScript('bpmn/MyWorkflow',true ); //adding a javascript file .js
$oHeadPublisher->addExtJsScript('bpmn/pmosExt', true ); //adding a javascript file .js
$oHeadPublisher->addExtJsScript('bpmn/TaskContext', true ); //adding a javascript file .js
@@ -53,11 +53,6 @@
$oHeadPublisher->addExtJsScript('bpmn/GatewayComplex' );
$oHeadPublisher->addExtJsScript('bpmn/GridPanel');
$oHeadPublisher->addExtJsScript('bpmn/SubProcess' );
$oHeadPublisher->addExtJsScript('bpmn/AwesomeUploader' );
$oHeadPublisher->addExtJsScript('bpmn/Ext.ux.form.FileUploadField' );
$oHeadPublisher->addExtJsScript('bpmn/Ext.ux.XHRUpload' );
$oHeadPublisher->addExtJsScript('bpmn/swfupload' );
$oHeadPublisher->addExtJsScript('bpmn/swfupload.swfobject' );
$oHeadPublisher->addExtJsScript('bpmn/ProcessOptions',true);
$oHeadPublisher->addContent( 'bpmn/processmap'); //adding a html file .html.

View File

@@ -113,7 +113,7 @@ switch($_GET['action'])
case 'editDatabaseConnection':
require_once 'classes/model/DbSource.php';
$o = new DbSource();
$rows = $o->load($_GET['tid']);
$rows = $o->load($_GET['dbs_uid'],$_GET['pid']);
break;
case 'process_User':

View File

@@ -849,7 +849,7 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
{name : 'BLOCK', value: 'BLOCK'}]})
},{
xtype :'hidden',
name :'TAS_UID',
name :'TASK_TARGET',
id :'TAS_UID'
},{
xtype:'hidden',
@@ -857,8 +857,8 @@ var PermissionGridColumn = new Ext.grid.ColumnModel({
id:'GROUP_USER'
},{
xtype:'hidden',
name:'OP_TASK_SOURCE',
id:'OP_TASK_SOURCE'
name:'TASK_SOURCE',
id:'TASK_SOURCE'
},{
xtype:'hidden',
name:'DYNAFORMS',

View File

@@ -140,7 +140,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
url: 'proxyExtjs?action=getAdditionalTables'
})
});
additionalTables.load();
//additionalTables.load();
//Creating store for getting list of Fields of additional PM tables
var TablesFields = Ext.data.Record.create([
@@ -162,6 +162,35 @@ ProcessOptions.prototype.addDynaform= function(_5625)
});
//tablesFieldsStore.load();
// Renderer function
function renderInstall(value, id, r)
{
var id = Ext.id();
var uidbutton = createGridButton.defer(1, this, ['Install', id, r]);
return uidbutton;
//return('&lt;div id="' + id + '"&gt;&lt;/div&gt;');
/*if (r.data.registered == false)
{
createGridButton.defer(1, this, ['Install', id, r]);
return('&lt;div id="' + id + '"&gt;&lt;/div&gt;');
}else
{
createGridButton.defer(1, this, ['ReInstall', id, r]);
return('&lt;div id="' + id + '"&gt;&lt;/div&gt;');
}*/
}
function createGridButton(value, id, record) {
new Ext.Button({
text: 'UID'
,iconCls: 'button_menu_ext ss_sprite ss_delete'
,handler : function(btn, e) {
// do whatever you want here
}
});
}
var dynaformColumns = new Ext.grid.ColumnModel({
columns: [
new Ext.grid.RowNumberer(),
@@ -188,7 +217,14 @@ ProcessOptions.prototype.addDynaform= function(_5625)
sortable: false,
renderer: function(val, meta, record)
{
return String.format("<a href='../dynaforms/dynaforms_Editor?PRO_UID={0}&DYN_UID={1}'>Edit</a>",pro_uid,record.data.DYN_UID);
return String.format("<a href='../dynaforms/dynaforms_Editor?PRO_UID={0}&DYN_UID={1}' >Edit</a>",pro_uid,record.data.DYN_UID);
}
},
{
sortable: false,
renderer: function(val, meta, record)
{
return String.format("<input type='submit' name='UID' value='UID' onclick='renderInstall()'>",record.data.DYN_UID);
}
}
]
@@ -516,10 +552,10 @@ ProcessOptions.prototype.dbConnection = function()
var btnNew = new Ext.Button({
id: 'btnNew',
text: 'New',
iconCls: 'application_add',
iconCls: 'button_menu_ext ss_sprite ss_add',
handler: function () {
dbconnForm.getForm().reset();
formWindow.show();
dbconnForm.getForm().reset();
}
});
@@ -528,10 +564,10 @@ ProcessOptions.prototype.dbConnection = function()
text: 'Edit',
iconCls: 'button_menu_ext ss_sprite ss_pencil',
handler: function (s) {
var s = dbGrid.getSelectionModel().getSelections();
var dbConnUID = s[0].data.DBS_UID;
var selectedRow = dbGrid.getSelectionModel().getSelections();
var dbConnUID = selectedRow[0].data.DBS_UID;
dbconnForm.form.load({
url:'proxyExtjs.php?tid='+dbConnUID+'&action=editDatabaseConnection',
url:'proxyExtjs.php?pid='+pro_uid+'&dbs_uid='+dbConnUID+'&action=editDatabaseConnection',
method:'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -891,7 +927,9 @@ ProcessOptions.prototype.dbConnection = function()
xtype: 'textarea',
fieldLabel: 'Description',
name: 'DBS_DESCRIPTION',
allowBlank: true
allowBlank: true,
width: 200,
height:100
},{
id : 'DBS_UID',
xtype: 'hidden',
@@ -1046,7 +1084,7 @@ var testConnWindow = new Ext.Window({
title: 'Add new Database Source',
collapsible: false,
maximizable: true,
width: 300,
width: 450,
//autoHeight: true,
//height: 400,
//layout: 'fit',
@@ -2528,3 +2566,9 @@ var formWindow = new Ext.Window({
//gridWindow.show();
}
ProcessOptions.prototype.addTriggers= function()
{
var pro_uid = workflow.getUrlVars();
}

View File

@@ -517,15 +517,6 @@ TaskContext.prototype.editUsers= function()
{
Ext.Ajax.request({
url : 'processes_Ajax.php' +urlparams ,
/*method: 'POST',
params: {
functions : 'ofToAssign',
TAS_UID : taskId,
TU_RELATION : user_TURel,
USR_UID : userUID,
TU_TYPE : user_TUtype
},*/
success: function(response) {
Ext.MessageBox.alert ('Status','User has been removed successfully.');
//Secondly deleting from Grid
@@ -557,10 +548,10 @@ TaskContext.prototype.editUsers= function()
url: 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAssignedUsersList'
})
});
//taskUsers.setDefaultSort('LABEL', 'asc');
taskUsers.load();
taskUsers.setDefaultSort('LABEL', 'asc');
// create the Data Store of users that are not assigned to a task
// create the Data Store of users that are not assigned to a task
var storeUsers = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?tid='+taskId+'&action=getAvailableUsersList',
@@ -570,12 +561,19 @@ TaskContext.prototype.editUsers= function()
autoLoad : true,
fields : userFields
});
//storeUsers.load();
// paging bar on the bottom
var paging = new Ext.PagingToolbar({
pageSize: 10,
store: taskUsers,
displayInfo: true,
displayMsg: 'Displaying users {0} - {1} of {2}',
emptyMsg: "No users to display"
});
var grid = new Ext.grid.GridPanel({
store: taskUsers,
id : 'mygrid',
//cm: cm,
loadMask: true,
loadingText: 'Loading...',
renderTo: 'cases-grid',
@@ -583,22 +581,26 @@ TaskContext.prototype.editUsers= function()
autoHeight:false,
clicksToEdit: 1,
minHeight:400,
height :400,
height :300,
layout: 'fit',
plugins: [editor],
columns: [
cm: new Ext.grid.ColumnModel({
defaults: {
width: 200,
sortable: true
},
columns: [
new Ext.grid.RowNumberer(),
{
id: 'LABEL',
header: 'Group or User',
dataIndex: 'LABEL',
width: 100,
sortable: true,
editor: new Ext.form.ComboBox({
xtype: 'combo',
fieldLabel: 'Users_groups',
hiddenName: 'number',
store : storeUsers,
//store : storeUsers,
displayField : 'LABEL' ,
valueField : 'LABEL',
name : 'LABEL',
@@ -623,8 +625,9 @@ TaskContext.prototype.editUsers= function()
this.collapse();
}
})
}
],
},
]
}),
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {
@@ -633,12 +636,14 @@ TaskContext.prototype.editUsers= function()
}
}
}),
stripeRows: true,
viewConfig: {forceFit: true},
bbar:paging,
tbar: tb
});
storeUsers.load();
taskUsers.load({params:{start:0, limit:10}});
editor.on({
scope: this,

View File

@@ -165,7 +165,10 @@ Ext.onReady ( function() {
}
},{
text: 'Trigger',
iconCls: 'button_menu_ext ss_sprite ss_cog'
iconCls: 'button_menu_ext ss_sprite ss_cog',
handler : function() {
processObj.addTriggers();
}
},
{
text: 'Report Table',