worked on ExTJs variables and report table part
This commit is contained in:
@@ -25,38 +25,42 @@
|
|||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
|
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
|
||||||
|
|
||||||
G::LoadClass('reportTables');
|
G::LoadClass('reportTables');
|
||||||
|
if(isset($_POST['form']))
|
||||||
|
$value= $_POST['form'];
|
||||||
|
else
|
||||||
|
$value=$_POST;
|
||||||
|
|
||||||
$oReportTable = new ReportTable();
|
$oReportTable = new ReportTable();
|
||||||
if (!isset($_POST['form']['REP_TAB_CONNECTION'])) {
|
if (!isset($value['REP_TAB_CONNECTION'])) {
|
||||||
$_POST['form']['REP_TAB_CONNECTION'] = 'report';
|
$value['REP_TAB_CONNECTION'] = 'report';
|
||||||
}
|
}
|
||||||
if ($_POST['form']['REP_TAB_UID'] != '') {
|
if ($value['REP_TAB_UID'] != '') {
|
||||||
$aReportTable = $oReportTable->load($_POST['form']['REP_TAB_UID']);
|
$aReportTable = $oReportTable->load($value['REP_TAB_UID']);
|
||||||
$sOldTableName = $aReportTable['REP_TAB_NAME'];
|
$sOldTableName = $aReportTable['REP_TAB_NAME'];
|
||||||
$sOldConnection = $aReportTable['REP_TAB_CONNECTION'];
|
$sOldConnection = $aReportTable['REP_TAB_CONNECTION'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sOldTableName = $_POST['form']['REP_TAB_NAME'];
|
$sOldTableName = $value['REP_TAB_NAME'];
|
||||||
$sOldConnection = $_POST['form']['REP_TAB_CONNECTION'];
|
$sOldConnection = $value['REP_TAB_CONNECTION'];
|
||||||
$oReportTable->create($_POST['form']);
|
$oReportTable->create($value);
|
||||||
$_POST['form']['REP_TAB_UID'] = $oReportTable->getRepTabUid();
|
$value['REP_TAB_UID'] = $oReportTable->getRepTabUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
$oReportTable->update($_POST['form']);
|
$oReportTable->update($value);
|
||||||
$oReportVar = new ReportVar();
|
$oReportVar = new ReportVar();
|
||||||
$oReportTables = new ReportTables();
|
$oReportTables = new ReportTables();
|
||||||
$oReportTables->deleteAllReportVars($_POST['form']['REP_TAB_UID']);
|
$oReportTables->deleteAllReportVars($value['REP_TAB_UID']);
|
||||||
$aFields = array();
|
$aFields = array();
|
||||||
if ($_POST['form']['REP_TAB_TYPE'] == 'GRID') {
|
if ($value['REP_TAB_TYPE'] == 'GRID') {
|
||||||
$aAux = explode('-', $_POST['form']['REP_TAB_GRID']);
|
$aAux = explode('-', $value['REP_TAB_GRID']);
|
||||||
global $G_FORM;
|
global $G_FORM;
|
||||||
$G_FORM = new Form($_POST['form']['PRO_UID'] . '/' . $aAux[1], PATH_DYNAFORM, SYS_LANG, false);
|
$G_FORM = new Form($value['PRO_UID'] . '/' . $aAux[1], PATH_DYNAFORM, SYS_LANG, false);
|
||||||
$aAux = $G_FORM->getVars(false);
|
$aAux = $G_FORM->getVars(false);
|
||||||
foreach ($aAux as $aField) {
|
foreach ($aAux as $aField) {
|
||||||
$_POST['form']['FIELDS'][] = $aField['sName'] . '-' . $aField['sType'];
|
$value['FIELDS'][] = $aField['sName'] . '-' . $aField['sType'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($_POST['form']['FIELDS'] as $sField) {
|
foreach ($value['FIELDS'] as $sField) {
|
||||||
$aField = explode('-', $sField);
|
$aField = explode('-', $sField);
|
||||||
switch ($aField[1]) {
|
switch ($aField[1]) {
|
||||||
case 'currency':
|
case 'currency':
|
||||||
@@ -82,13 +86,13 @@ foreach ($_POST['form']['FIELDS'] as $sField) {
|
|||||||
$sType = 'char';
|
$sType = 'char';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$oReportVar->create(array('REP_TAB_UID' => $_POST['form']['REP_TAB_UID'],
|
$oReportVar->create(array('REP_TAB_UID' => $value['REP_TAB_UID'],
|
||||||
'PRO_UID' => $_POST['form']['PRO_UID'],
|
'PRO_UID' => $value['PRO_UID'],
|
||||||
'REP_VAR_NAME' => $aField[0],
|
'REP_VAR_NAME' => $aField[0],
|
||||||
'REP_VAR_TYPE' => $sType));
|
'REP_VAR_TYPE' => $sType));
|
||||||
$aFields[] = array('sFieldName' => $aField[0], 'sType' => $sType);
|
$aFields[] = array('sFieldName' => $aField[0], 'sType' => $sType);
|
||||||
}
|
}
|
||||||
$oReportTables->dropTable($sOldTableName, $sOldConnection);
|
$oReportTables->dropTable($sOldTableName, $sOldConnection);
|
||||||
$oReportTables->createTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields);
|
$oReportTables->createTable($value['REP_TAB_NAME'], $value['REP_TAB_CONNECTION'], $value['REP_TAB_TYPE'], $aFields);
|
||||||
$oReportTables->populateTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields, $_POST['form']['PRO_UID'], $_POST['form']['REP_TAB_GRID']);
|
$oReportTables->populateTable($value['REP_TAB_NAME'], $value['REP_TAB_CONNECTION'], $value['REP_TAB_TYPE'], $aFields, $value['PRO_UID'], $value['REP_TAB_GRID']);
|
||||||
?>
|
?>
|
||||||
@@ -1582,36 +1582,34 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
|||||||
defaults: {width: 350},
|
defaults: {width: 350},
|
||||||
defaultType: 'textfield',
|
defaultType: 'textfield',
|
||||||
items: [{
|
items: [{
|
||||||
width: 100,
|
width :100,
|
||||||
xtype: 'combo',
|
xtype :'combo',
|
||||||
mode: 'local',
|
mode :'local',
|
||||||
triggerAction: 'all',
|
triggerAction :'all',
|
||||||
forceSelection: true,
|
forceSelection :true,
|
||||||
editable: false,
|
editable :false,
|
||||||
fieldLabel: 'Map Type',
|
fieldLabel :'Map Type',
|
||||||
name: 'CT_MAP_TYPE',
|
name :'CT_MAP_TYPE',
|
||||||
displayField: 'name',
|
displayField :'name',
|
||||||
value: 'Process Map',
|
value :'Process Map',
|
||||||
valueField: 'value',
|
valueField :'value',
|
||||||
store: new Ext.data.JsonStore({
|
store :new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data :[{name: 'None', value:'0'},
|
data :[{name: 'None', value:'0'},
|
||||||
{name: 'Process Map', value: '1'},
|
{name: 'Process Map', value: '1'},
|
||||||
{name: 'Stages Map', value:'2'}]
|
{name: 'Stages Map', value:'2'}]
|
||||||
|
})
|
||||||
})
|
},{
|
||||||
},{
|
|
||||||
xtype: 'checkbox',
|
xtype: 'checkbox',
|
||||||
fieldLabel: 'Derivation History',
|
fieldLabel: 'Derivation History',
|
||||||
name: 'CT_DERIVATION_HISTORY'
|
name: 'CT_DERIVATION_HISTORY'
|
||||||
//checked:checkDerivation
|
//checked:checkDerivation
|
||||||
},{
|
},{
|
||||||
xtype: 'checkbox',
|
xtype: 'checkbox',
|
||||||
fieldLabel: 'Messages History',
|
fieldLabel: 'Messages History',
|
||||||
name: 'CT_MESSAGE_HISTORY'
|
name: 'CT_MESSAGE_HISTORY'
|
||||||
// checked:checkMessages
|
// checked:checkMessages
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
|
|
||||||
});
|
});
|
||||||
var Propertieswindow = new Ext.Window({
|
var Propertieswindow = new Ext.Window({
|
||||||
@@ -1629,7 +1627,7 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
|||||||
items: PropertiesForm,
|
items: PropertiesForm,
|
||||||
buttons: [{
|
buttons: [{
|
||||||
text: 'Save',
|
text: 'Save',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
var getForm = PropertiesForm.getForm().getValues();
|
var getForm = PropertiesForm.getForm().getValues();
|
||||||
var pro_uid = getForm.PRO_UID;
|
var pro_uid = getForm.PRO_UID;
|
||||||
var MapType = getForm.CT_MAP_TYPE;
|
var MapType = getForm.CT_MAP_TYPE;
|
||||||
@@ -1637,26 +1635,25 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
|||||||
var MessageHistory = getForm.CT_MESSAGE_HISTORY;
|
var MessageHistory = getForm.CT_MESSAGE_HISTORY;
|
||||||
|
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url : '../tracker/tracker_save.php',
|
url : '../tracker/tracker_save.php',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params:{
|
params:{
|
||||||
PRO_UID :pro_uid,
|
PRO_UID :pro_uid,
|
||||||
CT_MAP_TYPE :MapType,
|
CT_MAP_TYPE :MapType,
|
||||||
CT_DERIVATION_HISTORY :DerivationHistory,
|
CT_DERIVATION_HISTORY :DerivationHistory,
|
||||||
CT_MESSAGE_HISTORY :MessageHistory
|
CT_MESSAGE_HISTORY :MessageHistory
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
Ext.MessageBox.alert ('Status','Connection Saved Successfully.');
|
Ext.MessageBox.alert ('Status','Connection Saved Successfully.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
Propertieswindow.close();
|
Propertieswindow.close();
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
});
|
});
|
||||||
Propertieswindow.show();
|
Propertieswindow.show();
|
||||||
}
|
}
|
||||||
@@ -1701,19 +1698,17 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
});
|
});
|
||||||
|
|
||||||
var assignedStore = new Ext.data.JsonStore({
|
var assignedStore = new Ext.data.JsonStore({
|
||||||
root : 'data',
|
root : 'data',
|
||||||
totalProperty: 'totalCount',
|
totalProperty : 'totalCount',
|
||||||
idProperty : 'gridIndex',
|
idProperty : 'gridIndex',
|
||||||
remoteSort : true,
|
remoteSort : true,
|
||||||
fields : ObjectFields,
|
fields : ObjectFields,
|
||||||
proxy: new Ext.data.HttpProxy({
|
proxy : new Ext.data.HttpProxy({
|
||||||
url: 'proxyCaseTrackerObjects?pid='+pro_uid
|
url : 'proxyCaseTrackerObjects?pid='+pro_uid
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
//taskUsers.setDefaultSort('LABEL', 'asc');
|
|
||||||
assignedStore.load();
|
assignedStore.load();
|
||||||
|
|
||||||
// create the Data Store of users that are not assigned to a task
|
|
||||||
var availableStore = new Ext.data.JsonStore({
|
var availableStore = new Ext.data.JsonStore({
|
||||||
root : 'data',
|
root : 'data',
|
||||||
url : 'proxyCaseTrackerObjects?tid='+pro_uid,
|
url : 'proxyCaseTrackerObjects?tid='+pro_uid,
|
||||||
@@ -1731,22 +1726,21 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
handler: function(){
|
handler: function(){
|
||||||
var User = Objectsgrid.getStore();
|
var User = Objectsgrid.getStore();
|
||||||
var e = new ObjectFields({
|
var e = new ObjectFields({
|
||||||
OBJECT_TITLE:'',
|
OBJECT_TITLE :'',
|
||||||
OBJECT_TYPE:'',
|
OBJECT_TYPE :'',
|
||||||
OBJECT_UID: ''
|
OBJECT_UID : ''
|
||||||
});
|
});
|
||||||
|
|
||||||
//storeUsers.reload();
|
if(availableStore.data.items.length == 0)
|
||||||
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 users are available. All users have been already assigned.');
|
else
|
||||||
else
|
{
|
||||||
{
|
editor.stopEditing();
|
||||||
editor.stopEditing();
|
assignedStore.insert(0, e);
|
||||||
assignedStore.insert(0, e);
|
Objectsgrid.getView().refresh();
|
||||||
Objectsgrid.getView().refresh();
|
//grid.getSelectionModel().selectRow(0);
|
||||||
//grid.getSelectionModel().selectRow(0);
|
editor.startEditing(0, 0);
|
||||||
editor.startEditing(0, 0);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1791,7 +1785,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
assignedStore.remove(r);
|
assignedStore.remove(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1826,15 +1820,15 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
editor: new Ext.form.ComboBox({
|
editor: new Ext.form.ComboBox({
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
store:availableStore,
|
store:availableStore,
|
||||||
fieldLabel: 'Title',
|
fieldLabel : 'Title',
|
||||||
hiddenName: 'number',
|
hiddenName : 'number',
|
||||||
displayField : 'OBJECT_TITLE' ,
|
displayField : 'OBJECT_TITLE' ,
|
||||||
valueField : 'OBJECT_TITLE',
|
valueField : 'OBJECT_TITLE',
|
||||||
name : 'OBJECT_TITLE',
|
name : 'OBJECT_TITLE',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
emptyText: 'Select User or Group',
|
emptyText : 'Select User or Group',
|
||||||
allowBlank: false,
|
allowBlank : false,
|
||||||
onSelect: function(record, index){
|
onSelect : function(record, index){
|
||||||
var User = Objectsgrid.getStore();
|
var User = Objectsgrid.getStore();
|
||||||
var selectedrowIndex = '0';
|
var selectedrowIndex = '0';
|
||||||
User.data.items[selectedrowIndex].data.OBJECT_UID = record.data.OBJECT_UID;
|
User.data.items[selectedrowIndex].data.OBJECT_UID = record.data.OBJECT_UID;
|
||||||
@@ -1844,36 +1838,29 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
this.collapse();
|
this.collapse();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},{
|
||||||
{
|
header : 'Type',
|
||||||
header: 'Type',
|
dataIndex : 'CTO_TYPE_OBJ',
|
||||||
dataIndex: 'CTO_TYPE_OBJ',
|
editable : false
|
||||||
//width: 200,
|
},{
|
||||||
editable: false
|
header : 'Condition',
|
||||||
},
|
dataIndex : 'CTO_CONDITION',
|
||||||
{
|
name : 'CTO_CONDITION',
|
||||||
header: 'Condition',
|
|
||||||
dataIndex: 'CTO_CONDITION',
|
|
||||||
name: 'CTO_CONDITION',
|
|
||||||
//width: 200,
|
|
||||||
editable: true,
|
editable: true,
|
||||||
editor: new Ext.form.TextField({
|
editor: new Ext.form.TextField({
|
||||||
allowBlank: true
|
allowBlank: true
|
||||||
})
|
})
|
||||||
},
|
},{
|
||||||
{
|
|
||||||
header: 'Assign Condition',
|
header: 'Assign Condition',
|
||||||
//width: 50,
|
|
||||||
renderer: function(val){return '<input type="button" value="@@" id="'+val+'"/>';}
|
renderer: function(val){return '<input type="button" value="@@" id="'+val+'"/>';}
|
||||||
}
|
}],
|
||||||
],
|
|
||||||
sm: new Ext.grid.RowSelectionModel({
|
sm: new Ext.grid.RowSelectionModel({
|
||||||
singleSelect: true,
|
singleSelect: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
rowselect: function(smObj, rowIndex, record) {
|
rowselect: function(smObj, rowIndex, record) {
|
||||||
workflow.currentrowIndex = rowIndex;
|
workflow.currentrowIndex = rowIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
stripeRows: true,
|
stripeRows: true,
|
||||||
viewConfig: {forceFit: true},
|
viewConfig: {forceFit: true},
|
||||||
@@ -1924,20 +1911,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
//Updating the user incase if already assigned user has been replaced by other user
|
|
||||||
/*if(changes != '' && typeof record.json != 'undefined')
|
|
||||||
{
|
|
||||||
var user_TURel = record.json.TU_RELATION;
|
|
||||||
var userUID = record.json.USR_UID;
|
|
||||||
var user_TUtype = record.json.TU_TYPE;
|
|
||||||
urlparams = '?action=ofToAssign&data={"TAS_UID":"'+taskId+'","TU_RELATION":"'+user_TURel+'","USR_UID":"'+userUID+'","TU_TYPE":"'+user_TUtype+'"}';
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : 'processes_Ajax.php' +urlparams ,
|
|
||||||
success: function(response) {
|
|
||||||
//Ext.MessageBox.alert ('Status','User has been updated successfully.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
assignedStore.reload();
|
assignedStore.reload();
|
||||||
availableStore.reload();
|
availableStore.reload();
|
||||||
|
|
||||||
@@ -2016,48 +1990,49 @@ ProcessMapContext.prototype.ExtVariables = function()
|
|||||||
bodyStyle :'padding:5px 5px 0',
|
bodyStyle :'padding:5px 5px 0',
|
||||||
width : 400,
|
width : 400,
|
||||||
height : 350,
|
height : 350,
|
||||||
|
renderer: function(val){return '<table border=1> <tr> <td> @@ </td> <td> Replace the value in quotes </td> </tr> </table>';},
|
||||||
items:
|
items:
|
||||||
{
|
{
|
||||||
xtype:'tabpanel',
|
xtype:'tabpanel',
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
defaults:{
|
defaults:{
|
||||||
autoHeight:true,
|
autoHeight:true,
|
||||||
bodyStyle:'padding:10px'
|
bodyStyle:'padding:10px'
|
||||||
},
|
},
|
||||||
items:[{
|
|
||||||
title:'All Variables',
|
|
||||||
id :'allVar',
|
|
||||||
layout:'form',
|
|
||||||
listeners: {
|
|
||||||
activate: function(tabPanel){
|
|
||||||
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
|
||||||
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
|
|
||||||
varStore.proxy.setUrl(link, true);
|
|
||||||
varStore.load();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
items:[{
|
items:[{
|
||||||
xtype: 'grid',
|
title:'All Variables',
|
||||||
ds: varStore,
|
id :'allVar',
|
||||||
cm: varColumns,
|
layout:'form',
|
||||||
width: 380,
|
listeners: {
|
||||||
autoHeight: true,
|
activate: function(tabPanel){
|
||||||
//plugins: [editor],
|
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
||||||
//loadMask : true,
|
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
|
||||||
loadingText : 'Loading...',
|
varStore.proxy.setUrl(link, true);
|
||||||
border: false
|
varStore.load();
|
||||||
}]
|
}
|
||||||
},{
|
},
|
||||||
|
items:[{
|
||||||
|
xtype: 'grid',
|
||||||
|
ds: varStore,
|
||||||
|
cm: varColumns,
|
||||||
|
width: 380,
|
||||||
|
autoHeight: true,
|
||||||
|
//plugins: [editor],
|
||||||
|
//loadMask : true,
|
||||||
|
loadingText : 'Loading...',
|
||||||
|
border: false
|
||||||
|
}]
|
||||||
|
},{
|
||||||
title:'System',
|
title:'System',
|
||||||
id:'system',
|
id:'system',
|
||||||
layout:'form',
|
layout:'form',
|
||||||
listeners: {
|
listeners:{
|
||||||
activate: function(tabPanel){
|
activate: function(tabPanel){
|
||||||
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
||||||
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
|
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
|
||||||
varStore.proxy.setUrl(link, true);
|
varStore.proxy.setUrl(link, true);
|
||||||
varStore.load();
|
varStore.load();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
items:[{
|
items:[{
|
||||||
xtype: 'grid',
|
xtype: 'grid',
|
||||||
@@ -2070,18 +2045,18 @@ ProcessMapContext.prototype.ExtVariables = function()
|
|||||||
loadingText : 'Loading...',
|
loadingText : 'Loading...',
|
||||||
border: false
|
border: false
|
||||||
}]
|
}]
|
||||||
},{
|
},{
|
||||||
title:'Process',
|
title:'Process',
|
||||||
id :'process',
|
id :'process',
|
||||||
layout:'form',
|
layout:'form',
|
||||||
listeners: {
|
listeners: {
|
||||||
activate: function(tabPanel){
|
activate: function(tabPanel){
|
||||||
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
||||||
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
|
var link = 'proxyVariable?pid='+pro_uid+'&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
|
||||||
varStore.proxy.setUrl(link, true);
|
varStore.proxy.setUrl(link, true);
|
||||||
varStore.load();
|
varStore.load();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
items:[{
|
items:[{
|
||||||
xtype: 'grid',
|
xtype: 'grid',
|
||||||
ds: varStore,
|
ds: varStore,
|
||||||
@@ -2093,14 +2068,16 @@ ProcessMapContext.prototype.ExtVariables = function()
|
|||||||
loadingText : 'Loading...',
|
loadingText : 'Loading...',
|
||||||
border: false
|
border: false
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
});
|
||||||
|
|
||||||
var window = new Ext.Window({
|
var window = new Ext.Window({
|
||||||
title: 'Steps Of',
|
title: 'Steps Of',
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
|
scrollable: true,
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 350,
|
height: 350,
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
@@ -2109,7 +2086,10 @@ ProcessMapContext.prototype.ExtVariables = function()
|
|||||||
plain: true,
|
plain: true,
|
||||||
bodyStyle: 'padding:5px;',
|
bodyStyle: 'padding:5px;',
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
items: varForm
|
items: [varForm]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*buttons: [{
|
/*buttons: [{
|
||||||
text: 'Save',
|
text: 'Save',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
|
|||||||
@@ -673,55 +673,114 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
|
|
||||||
items:[{
|
items:[{
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
width: 150,
|
width: 150,
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
editable: false,
|
editable: false,
|
||||||
fieldLabel: 'Engine',
|
fieldLabel: 'Engine',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
name: 'DBS_TYPE',
|
name: 'DBS_TYPE',
|
||||||
displayField: 'name',
|
displayField: 'name',
|
||||||
//emptyText : 'Select Format',
|
//emptyText : 'Select Format',
|
||||||
valueField : 'value',
|
valueField : 'value',
|
||||||
value : 'Select',
|
value : 'Select',
|
||||||
store: new Ext.data.JsonStore({
|
store: new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
{name : 'Select', value: 'select'},
|
{name : 'Select', value: 'select'},
|
||||||
{name : 'MySql', value: 'MySql'},
|
{name : 'MySql', value: 'MySql'},
|
||||||
{name : 'PostGreSql', value: 'PostGreSql'},
|
{name : 'PostGreSql', value: 'PostGreSql'},
|
||||||
{name : 'Microsoft SQL server', value: 'Microsoft SQL server'}
|
{name : 'Microsoft SQL server', value: 'Microsoft SQL server'}
|
||||||
]}),
|
]}),
|
||||||
onSelect: function(record, index) {
|
onSelect: function(record, index) {
|
||||||
//Show-Hide Format Type Field
|
//Show-Hide Format Type Field
|
||||||
if(record.data.value == 'MySql')
|
if(record.data.value == 'MySql')
|
||||||
{Ext.getCmp("encode").show();
|
{Ext.getCmp("encode").show();
|
||||||
Ext.getCmp("postgre").hide();
|
Ext.getCmp("postgre").hide();
|
||||||
Ext.getCmp("port").setValue('3306')}
|
Ext.getCmp("port").setValue('3306')}
|
||||||
else if(record.data.value == 'PostGreSql')
|
else if(record.data.value == 'PostGreSql')
|
||||||
{Ext.getCmp("postgre").show();
|
{Ext.getCmp("postgre").show();
|
||||||
Ext.getCmp("encode").hide();
|
Ext.getCmp("encode").hide();
|
||||||
Ext.getCmp("port").setValue('5432')}
|
Ext.getCmp("port").setValue('5432')}
|
||||||
else
|
else
|
||||||
{Ext.getCmp("sqlserver").show();
|
{Ext.getCmp("sqlserver").show();
|
||||||
Ext.getCmp("postgre").hide();
|
Ext.getCmp("postgre").hide();
|
||||||
Ext.getCmp("port").setValue('1433')}
|
Ext.getCmp("port").setValue('1433')}
|
||||||
this.setValue(record.data[this.valueField || this.displayField]);
|
this.setValue(record.data[this.valueField || this.displayField]);
|
||||||
this.collapse();
|
this.collapse();
|
||||||
}
|
}
|
||||||
},
|
},{
|
||||||
{
|
xtype: 'fieldset',
|
||||||
xtype: 'fieldset',
|
id: 'encode',
|
||||||
id: 'encode',
|
border:false,
|
||||||
border:false,
|
hidden: true,
|
||||||
hidden: true,
|
items: [{
|
||||||
items: [{
|
xtype: 'combo',
|
||||||
|
width: 150,
|
||||||
|
mode: 'local',
|
||||||
|
// hidden: true,
|
||||||
|
editable: false,
|
||||||
|
fieldLabel: 'Encode',
|
||||||
|
triggerAction: 'all',
|
||||||
|
forceSelection: true,
|
||||||
|
//dataIndex : 'ENGINE',
|
||||||
|
displayField: 'name',
|
||||||
|
valueField: 'value',
|
||||||
|
name: 'DBS_ENCODE',
|
||||||
|
store: new Ext.data.JsonStore({
|
||||||
|
fields : ['name', 'value'],
|
||||||
|
data : [
|
||||||
|
{name:'big5', value: 'big5'},
|
||||||
|
{name:'dec8', value:'dec8' },
|
||||||
|
{name:'cp850', value:'cp850'},
|
||||||
|
{name:'hp8', value:'hp8' },
|
||||||
|
{name:'koi8r', value:'koi8r'},
|
||||||
|
{name:'latin1', value:'latin1'},
|
||||||
|
{name:'latin2', value:'latin2'},
|
||||||
|
{name:'swe7', value:'swe7' },
|
||||||
|
{name:'ascii', value:'ascii'},
|
||||||
|
{name:'ujis', value:'ujis' },
|
||||||
|
{name:'sjis', value:'sjis' },
|
||||||
|
{name:'hebrew', value:'hebrew'},
|
||||||
|
{name:'tis620', value:'tis620' },
|
||||||
|
{name:'euckr', value:'euckr'},
|
||||||
|
{name:'koi8u', value:'koi8u' },
|
||||||
|
{name:'gb2312', value:'gb2312'},
|
||||||
|
{name:'greek', value:'greek'},
|
||||||
|
{name:'cp1250', value:'cp1250'},
|
||||||
|
{name:'gbk', value:'gbk' },
|
||||||
|
{name:'latin5', value:'latin5' },
|
||||||
|
{name:'armscii8', value:'armscii8'},
|
||||||
|
{name:'utf8', value:'utf8' },
|
||||||
|
{name:'ucs2', value:'ucs2'},
|
||||||
|
{name:'cp866', value:'cp866'},
|
||||||
|
{name:'keybcs2', value:'keybcs2' },
|
||||||
|
{name:'macce', value:'macce'},
|
||||||
|
{name:'macroman', value:'macroman' },
|
||||||
|
{name:'cp852', value:'cp852' },
|
||||||
|
{name:'latin7', value:'atin7' },
|
||||||
|
{name:'cp1251', value:'cp1251'},
|
||||||
|
{name:'cp1256', value:'cp1256'},
|
||||||
|
{name:'cp1257', value:'cp1257'},
|
||||||
|
{name:'binary', value:'binary'},
|
||||||
|
{name:'geostd8', value:'geostd8'},
|
||||||
|
{name:'cp932', value:'cp932'},
|
||||||
|
{name:'eucjpms', value:'eucjpms'}
|
||||||
|
]})
|
||||||
|
}]
|
||||||
|
|
||||||
|
},{
|
||||||
|
xtype: 'fieldset',
|
||||||
|
id: 'postgre',
|
||||||
|
border:false,
|
||||||
|
hidden: true,
|
||||||
|
items:[{
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
width: 150,
|
width: 150,
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
// hidden: true,
|
// hidden: true,
|
||||||
editable: false,
|
editable:false,
|
||||||
fieldLabel: 'Encode',
|
fieldLabel: 'Encode',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
@@ -732,276 +791,198 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
store: new Ext.data.JsonStore({
|
store: new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
{name:'big5', value: 'big5'},
|
{name:"BIG5", value:"BIG5"},
|
||||||
{name:'dec8', value:'dec8' },
|
{name:"EUC_CN", value:"EUC_CN"},
|
||||||
{name:'cp850', value:'cp850'},
|
{name:"EUC_JP", value:"EUC_JP"},
|
||||||
{name:'hp8', value:'hp8' },
|
{name:"EUC_KR", value:"EUC_KR"},
|
||||||
{name:'koi8r', value:'koi8r'},
|
{name:"EUC_TW", value:"EUC_TW"},
|
||||||
{name:'latin1', value:'latin1'},
|
{name:"GB18030", value:"GB18030"},
|
||||||
{name:'latin2', value:'latin2'},
|
{name:"GBK", value:"GBK"},
|
||||||
{name:'swe7', value:'swe7' },
|
{name:"ISO_8859_5", value:"ISO_8859_5"},
|
||||||
{name:'ascii', value:'ascii'},
|
{name:"ISO_8859_6", value:"ISO_8859_6"},
|
||||||
{name:'ujis', value:'ujis' },
|
{name:"ISO_8859_7", value:"ISO_8859_7"},
|
||||||
{name:'sjis', value:'sjis' },
|
{name:"ISO_8859_8", value: "ISO_8859_8"},
|
||||||
{name:'hebrew', value:'hebrew'},
|
{name:"JOHAB", value:"JOHAB"},
|
||||||
{name:'tis620', value:'tis620' },
|
{name:"KOI8", value: "KOI8"},
|
||||||
{name:'euckr', value:'euckr'},
|
{name:"selected", value: "LATIN1"},
|
||||||
{name:'koi8u', value:'koi8u' },
|
{name:"LATIN2", value:"LATIN2"},
|
||||||
{name:'gb2312', value:'gb2312'},
|
{name:"LATIN3", value:"LATIN3"},
|
||||||
{name:'greek', value:'greek'},
|
{name:"LATIN4", value: "LATIN4"},
|
||||||
{name:'cp1250', value:'cp1250'},
|
{name:"LATIN5", value:"LATIN5"},
|
||||||
{name:'gbk', value:'gbk' },
|
{name:"LATIN6", value: "LATIN6"},
|
||||||
{name:'latin5', value:'latin5' },
|
{name:"LATIN7", value:"LATIN7"},
|
||||||
{name:'armscii8', value:'armscii8'},
|
{name:"LATIN8", value:"LATIN8"},
|
||||||
{name:'utf8', value:'utf8' },
|
{name:"LATIN9", value:"LATIN9"},
|
||||||
{name:'ucs2', value:'ucs2'},
|
{name:"LATIN10", value:"LATIN10"},
|
||||||
{name:'cp866', value:'cp866'},
|
{name:"SJIS", value:"SJIS"},
|
||||||
{name:'keybcs2', value:'keybcs2' },
|
{name:"SQL_ASCII", value:"SQL_ASCII"},
|
||||||
{name:'macce', value:'macce'},
|
{name:"UHC", value: "UHC"},
|
||||||
{name:'macroman', value:'macroman' },
|
{name:"UTF8", value: "UTF8"},
|
||||||
{name:'cp852', value:'cp852' },
|
{name:"WIN866", value: "WIN866"},
|
||||||
{name:'latin7', value:'atin7' },
|
{name:"WIN874", value:"WIN874"},
|
||||||
{name:'cp1251', value:'cp1251'},
|
{name:"WIN1250", value:"WIN1250"},
|
||||||
{name:'cp1256', value:'cp1256'},
|
{name:"WIN1251", value:"WIN1251"},
|
||||||
{name:'cp1257', value:'cp1257'},
|
{name:"WIN1252", value:"WIN1252"},
|
||||||
{name:'binary', value:'binary'},
|
{name:"WIN1256", value:"WIN1256"},
|
||||||
{name:'geostd8', value:'geostd8'},
|
{name:"WIN1258", value:"WIN1258"}
|
||||||
{name:'cp932', value:'cp932'},
|
]})
|
||||||
{name:'eucjpms', value:'eucjpms'}
|
}]
|
||||||
]})
|
},{
|
||||||
}]
|
xtype: 'fieldset',
|
||||||
//displayField: 'name',
|
id: 'sqlserver',
|
||||||
//emptyText : 'Select Format',
|
border:false,
|
||||||
// valueField : 'value',
|
hidden: true,
|
||||||
// value : 'Select'
|
items:[{
|
||||||
}, {
|
xtype: 'combo',
|
||||||
xtype: 'fieldset',
|
width: 150,
|
||||||
id: 'postgre',
|
mode: 'local',
|
||||||
border:false,
|
editable: false,
|
||||||
hidden: true,
|
fieldLabel: 'Encode',
|
||||||
items:[{
|
triggerAction: 'all',
|
||||||
xtype: 'combo',
|
forceSelection: true,
|
||||||
width: 150,
|
//dataIndex : 'ENGINE',
|
||||||
mode: 'local',
|
displayField: 'name',
|
||||||
// hidden: true,
|
valueField: 'value',
|
||||||
editable:false,
|
name: 'DBS_ENCODE',
|
||||||
fieldLabel: 'Encode',
|
store: new Ext.data.JsonStore({
|
||||||
triggerAction: 'all',
|
fields : ['name', 'value'],
|
||||||
forceSelection: true,
|
data : [
|
||||||
//dataIndex : 'ENGINE',
|
{name:'utf8', value: 'utf8'}
|
||||||
displayField: 'name',
|
]})
|
||||||
valueField: 'value',
|
}]
|
||||||
name: 'DBS_ENCODE',
|
|
||||||
store: new Ext.data.JsonStore({
|
},{
|
||||||
fields : ['name', 'value'],
|
xtype: 'textfield',
|
||||||
data : [
|
fieldLabel: 'Server',
|
||||||
{name:"BIG5", value:"BIG5"},
|
name: 'DBS_SERVER',
|
||||||
{name:"EUC_CN", value:"EUC_CN"},
|
allowBlank: false
|
||||||
{name:"EUC_JP", value:"EUC_JP"},
|
},{
|
||||||
{name:"EUC_KR", value:"EUC_KR"},
|
xtype: 'textfield',
|
||||||
{name:"EUC_TW", value:"EUC_TW"},
|
fieldLabel: 'Database name',
|
||||||
{name:"GB18030", value:"GB18030"},
|
name: 'DBS_DATABASE_NAME',
|
||||||
{name:"GBK", value:"GBK"},
|
allowBlank: false
|
||||||
{name:"ISO_8859_5", value:"ISO_8859_5"},
|
},{
|
||||||
{name:"ISO_8859_6", value:"ISO_8859_6"},
|
xtype: 'textfield',
|
||||||
{name:"ISO_8859_7", value:"ISO_8859_7"},
|
fieldLabel: 'Username',
|
||||||
{name:"ISO_8859_8", value: "ISO_8859_8"},
|
name: 'DBS_USERNAME',
|
||||||
{name:"JOHAB", value:"JOHAB"},
|
allowBlank: false
|
||||||
{name:"KOI8", value: "KOI8"},
|
},{
|
||||||
{name:"selected", value: "LATIN1"},
|
xtype: 'textfield',
|
||||||
{name:"LATIN2", value:"LATIN2"},
|
fieldLabel: 'Password',
|
||||||
{name:"LATIN3", value:"LATIN3"},
|
name: 'DBS_PASSWORD',
|
||||||
{name:"LATIN4", value: "LATIN4"},
|
allowBlank: true
|
||||||
{name:"LATIN5", value:"LATIN5"},
|
},{
|
||||||
{name:"LATIN6", value: "LATIN6"},
|
xtype: 'textfield',
|
||||||
{name:"LATIN7", value:"LATIN7"},
|
fieldLabel: 'Port',
|
||||||
{name:"LATIN8", value:"LATIN8"},
|
name: 'DBS_PORT',
|
||||||
{name:"LATIN9", value:"LATIN9"},
|
id:'port',
|
||||||
{name:"LATIN10", value:"LATIN10"},
|
allowBlank: false
|
||||||
{name:"SJIS", value:"SJIS"},
|
},{
|
||||||
{name:"SQL_ASCII", value:"SQL_ASCII"},
|
xtype: 'textarea',
|
||||||
{name:"UHC", value: "UHC"},
|
fieldLabel: 'Description',
|
||||||
{name:"UTF8", value: "UTF8"},
|
name: 'DBS_DESCRIPTION',
|
||||||
{name:"WIN866", value: "WIN866"},
|
allowBlank: true
|
||||||
{name:"WIN874", value:"WIN874"},
|
},{
|
||||||
{name:"WIN1250", value:"WIN1250"},
|
id : 'DBS_UID',
|
||||||
{name:"WIN1251", value:"WIN1251"},
|
xtype: 'hidden',
|
||||||
{name:"WIN1252", value:"WIN1252"},
|
name : 'DBS_UID'
|
||||||
{name:"WIN1256", value:"WIN1256"},
|
}
|
||||||
{name:"WIN1258", value:"WIN1258"}
|
]
|
||||||
]})
|
|
||||||
}]
|
|
||||||
//displayField: 'name',
|
|
||||||
//emptyText : 'Select Format',
|
|
||||||
// valueField : 'value',
|
|
||||||
// value : 'Select'
|
|
||||||
}, {
|
|
||||||
xtype: 'fieldset',
|
|
||||||
id: 'sqlserver',
|
|
||||||
border:false,
|
|
||||||
hidden: true,
|
|
||||||
items:[{
|
|
||||||
xtype: 'combo',
|
|
||||||
width: 150,
|
|
||||||
mode: 'local',
|
|
||||||
// hidden: true,
|
|
||||||
editable: false,
|
|
||||||
fieldLabel: 'Encode',
|
|
||||||
triggerAction: 'all',
|
|
||||||
forceSelection: true,
|
|
||||||
//dataIndex : 'ENGINE',
|
|
||||||
displayField: 'name',
|
|
||||||
valueField: 'value',
|
|
||||||
name: 'DBS_ENCODE',
|
|
||||||
store: new Ext.data.JsonStore({
|
|
||||||
fields : ['name', 'value'],
|
|
||||||
data : [
|
|
||||||
{name:'utf8', value: 'utf8'}
|
|
||||||
]})
|
|
||||||
}]
|
|
||||||
//displayField: 'name',
|
|
||||||
//emptyText : 'Select Format',
|
|
||||||
// valueField : 'value',
|
|
||||||
// value : 'Select'
|
|
||||||
}, {
|
|
||||||
|
|
||||||
xtype: 'textfield',
|
|
||||||
fieldLabel: 'Server',
|
|
||||||
name: 'DBS_SERVER',
|
|
||||||
allowBlank: false
|
|
||||||
}, {
|
|
||||||
xtype: 'textfield',
|
|
||||||
fieldLabel: 'Database name',
|
|
||||||
name: 'DBS_DATABASE_NAME',
|
|
||||||
allowBlank: false
|
|
||||||
},{
|
|
||||||
xtype: 'textfield',
|
|
||||||
fieldLabel: 'Username',
|
|
||||||
name: 'DBS_USERNAME',
|
|
||||||
allowBlank: false
|
|
||||||
}, {
|
|
||||||
xtype: 'textfield',
|
|
||||||
fieldLabel: 'Password',
|
|
||||||
name: 'DBS_PASSWORD',
|
|
||||||
allowBlank: true
|
|
||||||
}, {
|
|
||||||
xtype: 'textfield',
|
|
||||||
fieldLabel: 'Port',
|
|
||||||
name: 'DBS_PORT',
|
|
||||||
id:'port',
|
|
||||||
allowBlank: false
|
|
||||||
}, {
|
|
||||||
xtype: 'textarea',
|
|
||||||
fieldLabel: 'Description',
|
|
||||||
name: 'DBS_DESCRIPTION',
|
|
||||||
allowBlank: true
|
|
||||||
},{
|
|
||||||
id : 'DBS_UID',
|
|
||||||
xtype: 'hidden',
|
|
||||||
name : 'DBS_UID'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
var formWindow = new Ext.Window({
|
var formWindow = new Ext.Window({
|
||||||
title: 'Add new Database Source',
|
title: 'Add new Database Source',
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
width: 450,
|
width: 450,
|
||||||
//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: dbconnForm,
|
items: dbconnForm,
|
||||||
buttons: [{
|
buttons: [{
|
||||||
text: 'Save',
|
text: 'Save',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
var getForm = dbconnForm.getForm().getValues();
|
var getForm = dbconnForm.getForm().getValues();
|
||||||
var dbConnUID = getForm.DBS_UID;
|
var dbConnUID = getForm.DBS_UID;
|
||||||
var Type = getForm.DBS_TYPE;
|
var Type = getForm.DBS_TYPE;
|
||||||
var Server = getForm.DBS_SERVER;
|
var Server = getForm.DBS_SERVER;
|
||||||
var DatabaseName = getForm.DBS_DATABASE_NAME;
|
var DatabaseName = getForm.DBS_DATABASE_NAME;
|
||||||
var Username = getForm.DBS_USERNAME;
|
var Username = getForm.DBS_USERNAME;
|
||||||
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;
|
||||||
|
|
||||||
if(dbConnUID=='')
|
if(dbConnUID=='')
|
||||||
{
|
{
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url : '../dbConnections/dbConnectionsAjax.php',
|
url : '../dbConnections/dbConnectionsAjax.php',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params:{
|
params:{
|
||||||
DBS_uid :dbConnUID,
|
DBS_uid :dbConnUID,
|
||||||
type :Type,
|
type :Type,
|
||||||
server :Server,
|
server :Server,
|
||||||
db_name :DatabaseName,
|
db_name :DatabaseName,
|
||||||
user :Username ,
|
user :Username ,
|
||||||
passwd :Password,
|
passwd :Password,
|
||||||
port :Port,
|
port :Port,
|
||||||
desc :Description,
|
desc :Description,
|
||||||
action :'saveConnection'
|
action :'saveConnection'
|
||||||
|
},
|
||||||
},
|
success: function(response) {
|
||||||
success: function(response) {
|
Ext.MessageBox.alert ('Status','Connection Saved Successfully.');
|
||||||
Ext.MessageBox.alert ('Status','Connection Saved Successfully.');
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : '../dbConnections/dbConnectionsAjax.php',
|
||||||
|
method: 'POST',
|
||||||
|
params:{
|
||||||
|
dbs_uid :dbConnUID,
|
||||||
|
type :Type,
|
||||||
|
server :Server,
|
||||||
|
db_name :DatabaseName,
|
||||||
|
user :Username ,
|
||||||
|
passwd :Password,
|
||||||
|
port :Port,
|
||||||
|
desc :Description,
|
||||||
|
action :'saveEditConnection'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Connection Edited Successfully.');
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : '../dbConnections/dbConnectionsAjax.php',
|
|
||||||
method: 'POST',
|
|
||||||
params:{
|
|
||||||
dbs_uid :dbConnUID,
|
|
||||||
type :Type,
|
|
||||||
server :Server,
|
|
||||||
db_name :DatabaseName,
|
|
||||||
user :Username ,
|
|
||||||
passwd :Password,
|
|
||||||
port :Port,
|
|
||||||
desc :Description,
|
|
||||||
action :'saveEditConnection'
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
Ext.MessageBox.alert ('Status','Connection Edited Successfully.');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
formWindow.close();
|
||||||
|
dbStore.reload();
|
||||||
//var getData = getstore.data.items;
|
}
|
||||||
//taskExtObj.saveTaskUsers(getData);
|
},{
|
||||||
|
text: 'Cancel',
|
||||||
|
handler: function(){
|
||||||
|
// when this button clicked,
|
||||||
formWindow.close();
|
formWindow.close();
|
||||||
dbStore.reload();
|
}
|
||||||
}
|
}]
|
||||||
},{
|
});
|
||||||
text: 'Cancel',
|
|
||||||
handler: function(){
|
|
||||||
// when this button clicked,
|
|
||||||
formWindow.close();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
|
|
||||||
var gridWindow = new Ext.Window({
|
var gridWindow = new Ext.Window({
|
||||||
title: 'Database Source List',
|
title: 'Database Source List',
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
width: 550,
|
width: 550,
|
||||||
//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: dbGrid
|
items: dbGrid
|
||||||
});
|
});
|
||||||
gridWindow.show();
|
gridWindow.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2279,8 +2260,8 @@ var formWindow = new Ext.Window({
|
|||||||
var Type = getForm.REP_TAB_TYPE;
|
var Type = getForm.REP_TAB_TYPE;
|
||||||
var Grid = getForm.REP_TAB_GRID;
|
var Grid = getForm.REP_TAB_GRID;
|
||||||
var Fields = getForm.FIELDS;
|
var Fields = getForm.FIELDS;
|
||||||
var VariableName = getForm.REP_VAR_NAME;
|
// var VariableName = getForm.REP_VAR_NAME;
|
||||||
var VariableType = getForm.REP_VAR_TYPE;
|
// var VariableType = getForm.REP_VAR_TYPE;
|
||||||
var Connection = getForm.REP_TAB_CONNECTION
|
var Connection = getForm.REP_TAB_CONNECTION
|
||||||
|
|
||||||
|
|
||||||
@@ -2289,14 +2270,14 @@ var formWindow = new Ext.Window({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
params:{
|
params:{
|
||||||
PRO_UID :pro_uid,
|
PRO_UID :pro_uid,
|
||||||
REP_TAB_UID :'',
|
REP_TAB_UID :tableUID,
|
||||||
REP_TAB_TITLE :Title,
|
REP_TAB_TITLE :Title,
|
||||||
REP_TAB_NAME :Name,
|
REP_TAB_NAME :Name,
|
||||||
REP_TAB_TYPE :Type ,
|
REP_TAB_TYPE :Type ,
|
||||||
REP_TAB_GRID :Grid,
|
REP_TAB_GRID :Grid,
|
||||||
FIELDS :Fields,
|
FIELDS :Fields,
|
||||||
REP_VAR_NAME : VariableName,
|
//REP_VAR_NAME : VariableName,
|
||||||
REP_VAR_TYPE : VariableType,
|
//REP_VAR_TYPE : VariableType,
|
||||||
REP_TAB_CONNECTION: Connection
|
REP_TAB_CONNECTION: Connection
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user