fixed few issues with extjs. Worked on database connection part

This commit is contained in:
safan
2010-12-16 15:15:31 +00:00
parent c59dbc85cc
commit 09ae458466
5 changed files with 49 additions and 49 deletions

View File

@@ -35,3 +35,14 @@ try
catch ( Exception $e ) {
print json_encode ( $e->getMessage() );
}
G::LoadClass('processMap');
$oProcessMap = new processMap(new DBConnection);
$rows = $oProcessMap->showExtDBConnList();
array_shift($rows);
$result['totalCount'] = count($rows);
$result['data'] = $rows;
print json_encode( $result ) ;

View File

@@ -12,36 +12,7 @@ try
{
$rows = $oProcessMap->getAvailableExtUsersCriteria($_GET['tid']);
}
/*else
{
require_once 'classes/model/Users.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
$sDataBase = 'database_' . strtolower(DB_ADAPTER);
if(G::LoadSystemExist($sDataBase)){
G::LoadSystem($sDataBase);
$oDataBase = new database();
$oCriteria->addAsColumn('USR_COMPLETENAME', $oDataBase->concatString("USR_LASTNAME", "' '", "USR_FIRSTNAME"));
}
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$result = array();
$rows = array();
$index = isset($start) ? $start : 0;
while($aRow = $oDataset->getRow()){
$aRow['index'] = ++$index;
$rows[] = $aRow;
$oDataset->next();
}
}
*/
$result['totalCount'] = count($rows);
$result['data'] = $rows;
print json_encode( $result ) ;

View File

@@ -2089,16 +2089,23 @@ MyWorkflow.prototype.zoom = function(sType)
var fig = figures.get(f);
var width = fig.getWidth();
var height = fig.getHeight();
var xPos = fig.getX();
var yPos = fig.getY();
if(sType == 'in')
{
width += 20;
height += 20
height += 20;
}
else
{
width -= 20;
height -= 20
height -= 20;
}
if(sType == 'in')
fig.setPosition(xPos,yPos - 15);
else if(sType == 'out')
fig.setPosition(xPos,yPos + 15);
fig.setDimension(width,height);
if(fig.type == 'bpmnTask')
{
@@ -2127,6 +2134,10 @@ MyWorkflow.prototype.zoom = function(sType)
else
fig.size = parseInt(fig.size) - 4;
//Setting font minimum limit
if(fig.size < 11)
fig.size = 11;
eval("fig.bpmnText.setFont('verdana','"+fig.size+"px', Font.PLAIN)");
fig.bpmnText.drawStringRect(fig.taskName, padleft, padtop, fig.rectWidth, rectheight, 'center');
fig.bpmnText.paint();
@@ -2152,9 +2163,14 @@ MyWorkflow.prototype.zoom = function(sType)
fig.size = fig.size;
if(sType == 'in')
fig.size = parseInt(fig.size) + 4;
else
fig.size = parseInt(fig.size) - 4;
fig.size = parseInt(fig.size) + 4;
else
fig.size = parseInt(fig.size) - 4;
//Setting font minimum limit i.e. 11px
if(fig.size < 11)
fig.size = 11;
eval("fig.bpmnText.setFont('verdana','"+fig.size+"px', Font.PLAIN)");
fig.bpmnText.drawStringRect(text,20,20,fig.rectWidth,'left');
fig.bpmnText.paint();

View File

@@ -445,7 +445,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
sDesc = getForm.DYN_DESCRIPTION[1];
}
Ext.Ajax.request({
/*Ext.Ajax.request({
url : '../dynaforms/dynaforms_Save.php',
method: 'POST',
params:{
@@ -455,12 +455,12 @@ ProcessOptions.prototype.addDynaform= function(_5625)
},
success: function(response) {
if(response.responseText == "1")
{
{*/
Ext.Ajax.request({
url : '../dynaforms/dynaforms_Save.php',
method: 'POST',
params:{
functions : '',
functions : 'saveDynaform',
ACTION : sAction,
FIELDS : sData,
ADD_TABLE : sAddTab,
@@ -473,14 +473,14 @@ ProcessOptions.prototype.addDynaform= function(_5625)
Ext.MessageBox.alert ('Status','Dynaform has been created successfully.');
}
});
formWindow.close();
taskDynaform.reload();
}
//formWindow.close();
//taskDynaform.reload();
/*}
else
Ext.MessageBox.alert ('Status','There is an Dynaform with the same name in this process. It is not saving');
Ext.MessageBox.alert ('Status','There is an Dynaform with the same name in this process. It is not saving');*/
}
})
}
// })
//}
},{
text: 'Cancel',
handler: function(){
@@ -580,6 +580,8 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
}
});
}
else
inputDocStore.remove(r);
}
}
});

View File

@@ -104,7 +104,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
//Secondly deleting from Grid
taskSteps.remove(r);
//Reloading store after removing steps
availableSteps.reload();
taskSteps.reload();
}
});
}
@@ -403,7 +403,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
collapsible: false,
maximizable: false,
width: 800,
height: 500,
height: 470,
minWidth: 200,
minHeight: 150,
layout: 'fit',
@@ -434,8 +434,8 @@ TaskContext.prototype.editTaskSteps = function(_3252){
TaskContext.prototype.editUsers= function(_5625)
{
var taskExtObj = new TaskContext();
var pro_uid = _5625.scope.workflow.getUrlVars();
var taskId = _5625.scope.workflow.currentSelection.id;
var pro_uid = workflow.getUrlVars();
var taskId = workflow.currentSelection.id;
var userFields = Ext.data.Record.create([
{
@@ -529,7 +529,7 @@ TaskContext.prototype.editUsers= function(_5625)
taskUsers.remove(r);
//Reloading available user store
storeUsers.reload();
taskUsers.reload();
}
});
}