completed custom triggers part and modified grid view for processmap context option
This commit is contained in:
@@ -3172,7 +3172,7 @@ class processMap {
|
|||||||
}
|
}
|
||||||
//Obtain object and type
|
//Obtain object and type
|
||||||
switch ($aRow ['OP_OBJ_TYPE']) {
|
switch ($aRow ['OP_OBJ_TYPE']) {
|
||||||
case 'ANY' :
|
case 'ALL' :
|
||||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||||
$sObject = G::LoadTranslation('ID_ALL');
|
$sObject = G::LoadTranslation('ID_ALL');
|
||||||
break;
|
break;
|
||||||
@@ -3316,7 +3316,7 @@ class processMap {
|
|||||||
}
|
}
|
||||||
//Obtain object and type
|
//Obtain object and type
|
||||||
switch ($aRow ['OP_OBJ_TYPE']) {
|
switch ($aRow ['OP_OBJ_TYPE']) {
|
||||||
case 'ANY' :
|
case 'ALL' :
|
||||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||||
$sObject = G::LoadTranslation('ID_ALL');
|
$sObject = G::LoadTranslation('ID_ALL');
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -348,23 +348,7 @@ if ( isset ($_REQUEST['action']) ) {
|
|||||||
//$cont = Content::addContent( 'SP_TITLE', '', $_POST['form']['SP_UID'], $lang, $_POST['form']['SPROCESS_NAME'] );
|
//$cont = Content::addContent( 'SP_TITLE', '', $_POST['form']['SP_UID'], $lang, $_POST['form']['SPROCESS_NAME'] );
|
||||||
$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
|
$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
|
||||||
break;
|
break;
|
||||||
case'saveSubprocessDetails11':
|
|
||||||
//$aTask=($_POST['TASKS']!=0)?$oTask->load($_POST['TASKS']):0;
|
|
||||||
require_once 'classes/model/SubProcess.php';
|
|
||||||
$oOP = new SubProcess();
|
|
||||||
$aData = array(
|
|
||||||
'SP_UID' => $_POST['SP_UID'],
|
|
||||||
'PRO_UID' => $_POST['PRO_UID'],
|
|
||||||
'PRO_PARENT' => $_POST['PRO_PARENT'],
|
|
||||||
'TAS_PARENT' => $_POST['TAS_PARENT'],
|
|
||||||
'SP_SYNCHRONOUS' => $_POST['SP_SYNCHRONOUS']
|
|
||||||
);
|
|
||||||
$oOP->update($aData);
|
|
||||||
|
|
||||||
//require_once 'classes/model/Content.php';
|
|
||||||
//$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
|
||||||
//$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
|
|
||||||
break;
|
|
||||||
case 'subprocessProperties':
|
case 'subprocessProperties':
|
||||||
require_once 'classes/model/Content.php';
|
require_once 'classes/model/Content.php';
|
||||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||||
@@ -372,28 +356,28 @@ if ( isset ($_REQUEST['action']) ) {
|
|||||||
$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
|
$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'deleteTriggers':
|
case 'deleteTriggers':
|
||||||
try{
|
try{
|
||||||
require_once('classes/model/Triggers.php');
|
require_once('classes/model/Triggers.php');
|
||||||
foreach($TRI_UIDS as $i=>$TRI_UID) {
|
|
||||||
$oTrigger = new Triggers();
|
|
||||||
$triggerObj=$oTrigger->load($_POST['TRI_UID']);
|
|
||||||
$oTrigger->remove($_POST['TRI_UID']);
|
|
||||||
require_once('classes/model/StepTrigger.php');
|
require_once('classes/model/StepTrigger.php');
|
||||||
$oStepTrigger = new StepTrigger();
|
$TRI_UIDS = explode(',', $_POST['TRI_UID']);
|
||||||
$oStepTrigger->removeTrigger($_POST['TRI_UID']);
|
foreach($TRI_UIDS as $i=>$TRI_UID) {
|
||||||
|
$oTrigger = new Triggers();
|
||||||
|
$triggerObj=$oTrigger->load($TRI_UID);
|
||||||
|
$oTrigger->remove($TRI_UID);
|
||||||
|
|
||||||
|
$oStepTrigger = new StepTrigger();
|
||||||
|
$oStepTrigger->removeTrigger($TRI_UID);
|
||||||
}
|
}
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->message = G::LoadTranslation('ID_REPORTTABLE_REMOVED');
|
$result->message = G::LoadTranslation('ID_TRIGGERS_REMOVED');
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$result->success = false;
|
$result->success = false;
|
||||||
$result->message = $e->getMessage();
|
$result->message = $e->getMessage();
|
||||||
}
|
}
|
||||||
print G::json_encode($result);
|
print G::json_encode($result);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -309,7 +309,25 @@
|
|||||||
$result = $tmpData;
|
$result = $tmpData;
|
||||||
echo $result;
|
echo $result;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'getSubProcessProperties':
|
||||||
|
if($_GET['type'] == 2) //Loading sub process details
|
||||||
|
{
|
||||||
|
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'','0');
|
||||||
|
$tmpData = json_encode( $rows ) ;
|
||||||
|
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||||
|
|
||||||
|
$result = $tmpData;
|
||||||
|
print $result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'',$_GET['type']);
|
||||||
|
$result['totalCount'] = count($rows);
|
||||||
|
$result['data'] = $rows;
|
||||||
|
print json_encode( $result ) ;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'getObjectPermission':
|
case 'getObjectPermission':
|
||||||
$rows = $oProcessMap->getExtObjectsPermissions($start, $limit,$_GET['pid']);
|
$rows = $oProcessMap->getExtObjectsPermissions($start, $limit,$_GET['pid']);
|
||||||
$result['totalCount'] = $oProcessMap->getAllObjectPermissionCount();
|
$result['totalCount'] = $oProcessMap->getAllObjectPermissionCount();
|
||||||
@@ -343,18 +361,18 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'editTriggers':
|
case 'editTriggers':
|
||||||
require_once('classes/model/Triggers.php');
|
require_once('classes/model/Triggers.php');
|
||||||
|
|
||||||
if (isset($_GET['TRI_UID']))
|
if (isset($_GET['TRI_UID']))
|
||||||
{
|
{
|
||||||
$oTrigger = new Triggers();
|
$oTrigger = new Triggers();
|
||||||
$rows = $oTrigger->load($_GET['TRI_UID']);
|
$rows = $oTrigger->load($_GET['TRI_UID']);
|
||||||
}
|
}
|
||||||
|
$tmpData = json_encode( $rows ) ;
|
||||||
$result['totalCount'] = count($rows);
|
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||||
$result['data'] = $rows;
|
$result = $tmpData;
|
||||||
print json_encode( $result ) ;
|
echo $result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//$result['data'] = $rows;
|
//$result['data'] = $rows;
|
||||||
//print json_encode( $result ) ;
|
//print json_encode( $result ) ;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $oStepTrigger = new StepTrigger();
|
|||||||
$oStepTrigger->removeTrigger($_POST['TRI_UID']);
|
$oStepTrigger->removeTrigger($_POST['TRI_UID']);
|
||||||
|
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->msg = G::LoadTranslation('ID_REPORTTABLE_REMOVED');
|
$result->msg = G::LoadTranslation('ID_TRIGGERS_REMOVED');
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
|
|||||||
@@ -644,8 +644,10 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
waitMsg:'Loading',
|
waitMsg:'Loading',
|
||||||
success:function(form, action) {
|
success:function(form, action) {
|
||||||
//Ext.MessageBox.alert('Message', 'Loaded OK');
|
//Ext.MessageBox.alert('Message', 'Loaded OK');
|
||||||
|
Ext.getCmp("encode").show();
|
||||||
|
form.findField('DBS_ENCODE').setValue(action.result.data.DBS_ENCODE);
|
||||||
formWindow.show();
|
formWindow.show();
|
||||||
Ext.getCmp("DBS_UID").setValue(dbConnUID);
|
//Ext.getCmp("DBS_UID").setValue(dbConnUID);
|
||||||
},
|
},
|
||||||
failure:function(form, action) {
|
failure:function(form, action) {
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
||||||
@@ -768,15 +770,8 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
width: 100,
|
width: 100,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
editor: new Ext.form.TextField({
|
editor: new Ext.form.TextField({
|
||||||
//allowBlank: false
|
|
||||||
})
|
})
|
||||||
}/*,{
|
}
|
||||||
sortable: false,
|
|
||||||
renderer: function(val, meta, record)
|
|
||||||
{
|
|
||||||
return String.format("<input type='button' value='UID' onclick=workflow.createUIDButton('{0}');>",record.data.DBS_UID);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1118,7 +1113,7 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
handler: function(){
|
handler: function(){
|
||||||
// testConnWindow.show();
|
// testConnWindow.show();
|
||||||
|
|
||||||
Ext.fly('p3text').update('Working');
|
/*Ext.fly('p3text').update('Working');
|
||||||
mybar.wait({
|
mybar.wait({
|
||||||
interval:200,
|
interval:200,
|
||||||
duration:5000,
|
duration:5000,
|
||||||
@@ -1160,7 +1155,7 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
PMExt.notify( _('ID_STATUS') , _('ID_DBS_CONNECTION_TEST') );
|
PMExt.notify( _('ID_STATUS') , _('ID_DBS_CONNECTION_TEST') );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
text: _('ID_SAVE'),
|
text: _('ID_SAVE'),
|
||||||
@@ -2555,9 +2550,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
waitMsg:'Loading',
|
waitMsg:'Loading',
|
||||||
success:function(form, action) {
|
success:function(form, action) {
|
||||||
//Ext.MessageBox.alert('Message', 'Loaded OK');
|
|
||||||
formWindow.show();
|
formWindow.show();
|
||||||
Ext.getCmp("REP_TAB_UID").setValue(repTabUID);
|
|
||||||
},
|
},
|
||||||
failure:function(form, action) {
|
failure:function(form, action) {
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
||||||
@@ -2858,7 +2851,7 @@ var reportForm =new Ext.FormPanel({
|
|||||||
data : []
|
data : []
|
||||||
})
|
})
|
||||||
}]
|
}]
|
||||||
}
|
},{xtype:'hidden', name:'REP_TAB_UID'}
|
||||||
], buttons: [{
|
], buttons: [{
|
||||||
text: _('ID_SAVE'),
|
text: _('ID_SAVE'),
|
||||||
formBind :true,
|
formBind :true,
|
||||||
@@ -2950,6 +2943,7 @@ var formWindow = new Ext.Window({
|
|||||||
|
|
||||||
ProcessOptions.prototype.addTriggers= function()
|
ProcessOptions.prototype.addTriggers= function()
|
||||||
{
|
{
|
||||||
|
var ProcMapObj= new ProcessMapContext();
|
||||||
var triggerFields = Ext.data.Record.create([
|
var triggerFields = Ext.data.Record.create([
|
||||||
{name: 'TRI_UID'},
|
{name: 'TRI_UID'},
|
||||||
{name: 'TRI_TITLE'},
|
{name: 'TRI_TITLE'},
|
||||||
@@ -2973,27 +2967,50 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
|
|
||||||
//edit report table Function
|
//edit report table Function
|
||||||
var editTriggers = function() {
|
var editTriggers = function() {
|
||||||
editor.stopEditing();
|
editor.stopEditing();
|
||||||
var rowSelected = Ext.getCmp('triggerGrid').getSelectionModel().getSelections();
|
var rowSelected = Ext.getCmp('triggersGrid').getSelectionModel().getSelections();
|
||||||
if( rowSelected.length == 0 ) {
|
if( rowSelected.length == 0 ) {
|
||||||
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
|
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var triggerUID = rowSelected[0].get('TRI_UID');
|
var triggerUID = rowSelected[0].get('TRI_UID');
|
||||||
triggersForm.form.load({
|
editTriggerForm.form.load({
|
||||||
url :'proxyExtjs.php?pid='+pro_uid+'&triggerUid='+triggerUID+'&action=editTriggers',
|
url :'proxyExtjs.php?pid='+pro_uid+'&TRI_UID='+triggerUID+'&action=editTriggers',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
waitMsg:'Loading',
|
waitMsg:'Loading',
|
||||||
success:function(form, action) {
|
success:function(form, action) {
|
||||||
formWindow.show();
|
editTriggerFormWindow.show();
|
||||||
//Ext.getCmp("TRI_UID").setValue(triggerUID);
|
//Ext.getCmp("TRI_UID").setValue(triggerUID);
|
||||||
},
|
},
|
||||||
failure:function(form, action) {
|
failure:function(form, action) {
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var editProperties = function(){
|
||||||
|
editor.stopEditing();
|
||||||
|
var rowSelected = Ext.getCmp('triggersGrid').getSelectionModel().getSelections();
|
||||||
|
if( rowSelected.length == 0 ) {
|
||||||
|
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var triggerUID = rowSelected[0].get('TRI_UID');
|
||||||
|
//editPropertiesFormWindow.show();
|
||||||
|
editPropertiesForm.form.load({
|
||||||
|
url :'proxyExtjs.php?pid='+pro_uid+'&TRI_UID='+triggerUID+'&action=editTriggers',
|
||||||
|
method: 'GET',
|
||||||
|
waitMsg:'Loading',
|
||||||
|
success:function(form, action) {
|
||||||
|
editPropertiesFormWindow.show();
|
||||||
|
//Ext.getCmp("TRI_UID").setValue(triggerUID);
|
||||||
|
},
|
||||||
|
failure:function(form, action) {
|
||||||
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED') );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var removeTriggers = function() {
|
var removeTriggers = function() {
|
||||||
ids = Array();
|
ids = Array();
|
||||||
|
|
||||||
@@ -3009,7 +3026,7 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
ids[i] = rowsSelected[i].get('TRI_UID');
|
ids[i] = rowsSelected[i].get('TRI_UID');
|
||||||
|
|
||||||
ids = ids.join(',');
|
ids = ids.join(',');
|
||||||
//First check whether selected Dynaform is assigned to a task steps or not.
|
//First check whether selected trigger has any dependencies or not
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url : '../triggers/triggers_Ajax',
|
url : '../triggers/triggers_Ajax',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -3021,10 +3038,10 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
success: function(response) {
|
success: function(response) {
|
||||||
var result = Ext.util.JSON.decode(response.responseText);
|
var result = Ext.util.JSON.decode(response.responseText);
|
||||||
if( result.success ){
|
if( result.success ){
|
||||||
if( result.passed ) { //deleting the selected dyanoforms
|
if( result.passed ) { //deleting the selected triggers
|
||||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_DELETE_DYNAFORM_CONFIRM'), function(){
|
PMExt.confirm(_('ID_CONFIRM'), _('ID_DELETE_TRIGGER_CONFIRM'), function(){
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url : '../processes/processes_Ajax.php',
|
url : 'processes_Ajax.php',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params: {
|
params: {
|
||||||
action : 'deleteTriggers',
|
action : 'deleteTriggers',
|
||||||
@@ -3052,7 +3069,7 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//edit triggers button
|
//edit triggers button
|
||||||
var btnEdit = new Ext.Button({
|
var btnEdit = new Ext.Button({
|
||||||
id: 'btnEdit',
|
id: 'btnEdit',
|
||||||
text: _('ID_EDIT'),
|
text: _('ID_EDIT'),
|
||||||
@@ -3067,6 +3084,13 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
handler: removeTriggers
|
handler: removeTriggers
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var btnProperties = new Ext.Button({
|
||||||
|
id: 'btnProperty',
|
||||||
|
text: _('ID_Properties'),
|
||||||
|
//iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
|
handler: editProperties
|
||||||
|
});
|
||||||
|
|
||||||
var triggerStore = new Ext.data.GroupingStore({
|
var triggerStore = new Ext.data.GroupingStore({
|
||||||
idProperty : 'gridIndex',
|
idProperty : 'gridIndex',
|
||||||
reader : new Ext.data.JsonReader( {
|
reader : new Ext.data.JsonReader( {
|
||||||
@@ -3100,7 +3124,7 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
});
|
});
|
||||||
|
|
||||||
var tb = new Ext.Toolbar({
|
var tb = new Ext.Toolbar({
|
||||||
items: [btnAdd, btnEdit,btnRemove]
|
items: [btnAdd, btnEdit,btnProperties,btnRemove]
|
||||||
});
|
});
|
||||||
|
|
||||||
var triggersGrid = new Ext.grid.GridPanel({
|
var triggersGrid = new Ext.grid.GridPanel({
|
||||||
@@ -3159,6 +3183,10 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
text: _('ID_EDIT'),
|
text: _('ID_EDIT'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
handler: editTriggers
|
handler: editTriggers
|
||||||
|
},{
|
||||||
|
text: _('ID_PROPERTIES'),
|
||||||
|
//iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
|
handler: editProperties
|
||||||
},{
|
},{
|
||||||
text: _('ID_DELETE'),
|
text: _('ID_DELETE'),
|
||||||
icon: '/images/delete.png',
|
icon: '/images/delete.png',
|
||||||
@@ -3166,7 +3194,7 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
},{
|
},{
|
||||||
text: _('ID_UID'),
|
text: _('ID_UID'),
|
||||||
handler: function(){
|
handler: function(){
|
||||||
var rowSelected = Ext.getCmp('triggerGrid').getSelectionModel().getSelected();
|
var rowSelected = Ext.getCmp('triggersGrid').getSelectionModel().getSelected();
|
||||||
workflow.createUIDButton(rowSelected.data.TRI_UID);
|
workflow.createUIDButton(rowSelected.data.TRI_UID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3176,7 +3204,7 @@ ProcessOptions.prototype.addTriggers= function()
|
|||||||
var triggersForm = new Ext.FormPanel({
|
var triggersForm = new Ext.FormPanel({
|
||||||
labelWidth : 100,
|
labelWidth : 100,
|
||||||
buttonAlign : 'center',
|
buttonAlign : 'center',
|
||||||
width : 450,
|
width : 400,
|
||||||
height : 350,
|
height : 350,
|
||||||
bodyStyle : 'padding:10px 0 0 10px;',
|
bodyStyle : 'padding:10px 0 0 10px;',
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
@@ -3187,8 +3215,9 @@ var triggersForm = new Ext.FormPanel({
|
|||||||
border:true,
|
border:true,
|
||||||
name: 'TRI_TITLE',
|
name: 'TRI_TITLE',
|
||||||
fieldLabel: _('ID_TITLE'),
|
fieldLabel: _('ID_TITLE'),
|
||||||
width: 150,
|
width: 300,
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
|
allowBlank: false,
|
||||||
labelAlign: 'top'
|
labelAlign: 'top'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -3197,8 +3226,8 @@ var triggersForm = new Ext.FormPanel({
|
|||||||
name: 'TRI_DESCRIPTION',
|
name: 'TRI_DESCRIPTION',
|
||||||
hidden: false,
|
hidden: false,
|
||||||
fieldLabel: _('ID_DESCRIPTION'),
|
fieldLabel: _('ID_DESCRIPTION'),
|
||||||
width: 200,
|
width: 300,
|
||||||
height: 100
|
height: 120
|
||||||
},{
|
},{
|
||||||
layout :'column',
|
layout :'column',
|
||||||
border :false,
|
border :false,
|
||||||
@@ -3207,8 +3236,9 @@ var triggersForm = new Ext.FormPanel({
|
|||||||
layout : 'form',
|
layout : 'form',
|
||||||
border :false,
|
border :false,
|
||||||
items : [{
|
items : [{
|
||||||
xtype : 'textfield',
|
xtype : 'textarea',
|
||||||
width : 200,
|
width : 300,
|
||||||
|
height : 180,
|
||||||
name : 'TRI_WEBBOT',
|
name : 'TRI_WEBBOT',
|
||||||
anchor :'100%'
|
anchor :'100%'
|
||||||
}]
|
}]
|
||||||
@@ -3231,7 +3261,8 @@ var triggersForm = new Ext.FormPanel({
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
}], buttons: [{
|
}],
|
||||||
|
buttons: [{
|
||||||
text: _('ID_SAVE'),
|
text: _('ID_SAVE'),
|
||||||
//formBind :true,
|
//formBind :true,
|
||||||
handler: function(){
|
handler: function(){
|
||||||
@@ -3290,6 +3321,7 @@ var triggersForm = new Ext.FormPanel({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
formWindow.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
@@ -3301,14 +3333,226 @@ var triggersForm = new Ext.FormPanel({
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var editTriggerForm = new Ext.FormPanel({
|
||||||
|
buttonAlign: 'center',
|
||||||
|
labelWidth : 10,
|
||||||
|
layout : 'fit',
|
||||||
|
width : 450,
|
||||||
|
height : 350,
|
||||||
|
//autoHeight: true,
|
||||||
|
items:
|
||||||
|
[{
|
||||||
|
layout :'column',
|
||||||
|
border :false,
|
||||||
|
items :[{
|
||||||
|
//columnWidth :.6,
|
||||||
|
layout : 'form',
|
||||||
|
border :false,
|
||||||
|
items : [{
|
||||||
|
xtype : 'textarea',
|
||||||
|
width : 380,
|
||||||
|
height : 320,
|
||||||
|
name : 'TRI_WEBBOT',
|
||||||
|
anchor :'100%'
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
//columnWidth :.4,
|
||||||
|
layout : 'form',
|
||||||
|
border :false,
|
||||||
|
items : [{
|
||||||
|
xtype :'button',
|
||||||
|
title : ' ',
|
||||||
|
width :50,
|
||||||
|
text : '@@',
|
||||||
|
name : 'selectorigin',
|
||||||
|
handler: function (s) {
|
||||||
|
workflow.variablesAction = 'form';
|
||||||
|
workflow.fieldName = 'TRI_WEBBOT' ;
|
||||||
|
workflow.variable = '@@',
|
||||||
|
workflow.formSelected = triggersForm;
|
||||||
|
var rowData = ProcMapObj.ExtVariables();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
xtype: 'hidden',
|
||||||
|
name: 'TRI_UID'
|
||||||
|
}],
|
||||||
|
buttons: [{
|
||||||
|
text: _('ID_SAVE'),
|
||||||
|
//formBind :true,
|
||||||
|
handler: function(){
|
||||||
|
var getForm = editTriggerForm.getForm().getValues();
|
||||||
|
var triggerUid = getForm.TRI_UID;
|
||||||
|
var condition = getForm.TRI_WEBBOT;
|
||||||
|
var desc = getForm.TRI_DESCRIPTION;
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : '../triggers/triggers_Save.php',
|
||||||
|
method: 'POST',
|
||||||
|
params:{
|
||||||
|
PRO_UID : pro_uid,
|
||||||
|
TRI_UID : triggerUid,
|
||||||
|
TRI_TYPE : 'SCRIPT',
|
||||||
|
TRI_WEBBOT : condition,
|
||||||
|
mode : 'ext'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
var result = Ext.util.JSON.decode(response.responseText);
|
||||||
|
if( result.success ){
|
||||||
|
PMExt.notify( _('ID_STATUS') , result.msg);
|
||||||
|
|
||||||
|
//Reloading store after saving triggers
|
||||||
|
triggerStore.reload();
|
||||||
|
editTriggerFormWindow.hide();
|
||||||
|
} else {
|
||||||
|
PMExt.error(_('ID_ERROR'), result.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: _('ID_CANCEL'),
|
||||||
|
handler: function(){
|
||||||
|
// when this button clicked,
|
||||||
|
editTriggerFormWindow.hide();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
|
var editPropertiesForm = new Ext.FormPanel({
|
||||||
|
labelWidth : 100,
|
||||||
|
buttonAlign : 'center',
|
||||||
|
width : 400,
|
||||||
|
height : 300,
|
||||||
|
bodyStyle : 'padding:10px 0 0 10px;',
|
||||||
|
autoHeight: true,
|
||||||
|
items:
|
||||||
|
[{
|
||||||
|
xtype: 'fieldset',
|
||||||
|
title: 'Trigger Information',
|
||||||
|
border:true,
|
||||||
|
id: 'trigger',
|
||||||
|
width: 400,
|
||||||
|
items:[{
|
||||||
|
xtype: 'textfield',
|
||||||
|
layout: 'fit',
|
||||||
|
border:true,
|
||||||
|
name: 'TRI_TITLE',
|
||||||
|
fieldLabel: _('ID_TITLE'),
|
||||||
|
width: 250,
|
||||||
|
allowBlank: false,
|
||||||
|
labelAlign: 'top'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'textarea',
|
||||||
|
border:true,
|
||||||
|
name: 'TRI_DESCRIPTION',
|
||||||
|
hidden: false,
|
||||||
|
fieldLabel: _('ID_DESCRIPTION'),
|
||||||
|
width: 250,
|
||||||
|
height: 120
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
xtype: 'hidden',
|
||||||
|
name: 'TRI_UID'
|
||||||
|
}],
|
||||||
|
buttons: [{
|
||||||
|
text: _('ID_SAVE'),
|
||||||
|
//formBind :true,
|
||||||
|
handler: function(){
|
||||||
|
var getForm = editPropertiesForm.getForm().getValues();
|
||||||
|
var triggerUid = getForm.TRI_UID;
|
||||||
|
var title = getForm.TRI_TITLE;
|
||||||
|
var desc = getForm.TRI_DESCRIPTION;
|
||||||
|
//First check whether trigger name already exist or not
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : '../triggers/triggers_Save.php',
|
||||||
|
method: 'POST',
|
||||||
|
params: {
|
||||||
|
functions : 'lookforNameTrigger',
|
||||||
|
proUid : pro_uid,
|
||||||
|
NAMETRIGGER : title
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
var result = response.responseText;
|
||||||
|
if(result) {
|
||||||
|
//now save trigger
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : '../triggers/triggers_Save.php',
|
||||||
|
method: 'POST',
|
||||||
|
params:{
|
||||||
|
TRI_TITLE : title,
|
||||||
|
PRO_UID : pro_uid,
|
||||||
|
TRI_UID :triggerUid,
|
||||||
|
TRI_PARAM :'',
|
||||||
|
TRI_TYPE :'SCRIPT',
|
||||||
|
TRI_DESCRIPTION :desc,
|
||||||
|
mode :'ext'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
var result = Ext.util.JSON.decode(response.responseText);
|
||||||
|
if( result.success ){
|
||||||
|
PMExt.notify( _('ID_STATUS') , result.msg);
|
||||||
|
|
||||||
|
//Reloading store after saving triggers
|
||||||
|
triggerStore.reload();
|
||||||
|
editPropertiesFormWindow.hide();
|
||||||
|
} else {
|
||||||
|
PMExt.error(_('ID_ERROR'), result.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
PMExt.error(_('ID_VALIDATION_ERROR'), 'There is a triggers with the same name in this process.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
editPropertiesFormWindow.hide();
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: _('ID_CANCEL'),
|
||||||
|
handler: function(){
|
||||||
|
// when this button clicked,
|
||||||
|
editPropertiesFormWindow.hide();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
|
var editTriggerFormWindow = new Ext.Window({
|
||||||
|
title: _('ID_TRIGGERS'),
|
||||||
|
autoScroll: true,
|
||||||
|
collapsible: false,
|
||||||
|
width: 520,
|
||||||
|
//autoHeight: true,
|
||||||
|
height: 400,
|
||||||
|
layout: 'fit',
|
||||||
|
plain: true,
|
||||||
|
buttonAlign: 'center',
|
||||||
|
items: editTriggerForm
|
||||||
|
});
|
||||||
|
|
||||||
|
var editPropertiesFormWindow = new Ext.Window({
|
||||||
|
title: _('ID_EDIT_TRIGGERS'),
|
||||||
|
autoScroll: true,
|
||||||
|
collapsible: false,
|
||||||
|
width: 450,
|
||||||
|
//autoHeight: true,
|
||||||
|
height: 280,
|
||||||
|
layout: 'fit',
|
||||||
|
plain: true,
|
||||||
|
buttonAlign: 'center',
|
||||||
|
items: editPropertiesForm
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var formWindow = new Ext.Window({
|
var formWindow = new Ext.Window({
|
||||||
title: _('ID_TRIGGERS'),
|
title: _('ID_TRIGGERS'),
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
width: 450,
|
width: 510,
|
||||||
//autoHeight: true,
|
//autoHeight: true,
|
||||||
height: 350,
|
height: 420,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
plain: true,
|
plain: true,
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
|
|||||||
@@ -1655,7 +1655,7 @@ TaskContext.prototype.stepTriggers = function()
|
|||||||
{
|
{
|
||||||
id: 'blank',
|
id: 'blank',
|
||||||
hidden : true,
|
hidden : true,
|
||||||
width:0,
|
//width:0,
|
||||||
editable: true,
|
editable: true,
|
||||||
editor: new Ext.form.TextField({
|
editor: new Ext.form.TextField({
|
||||||
allowBlank: true
|
allowBlank: true
|
||||||
@@ -1799,7 +1799,7 @@ TaskContext.prototype.stepTriggers = function()
|
|||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
//labelWidth: 120,
|
//labelWidth: 120,
|
||||||
title:_('ID_ASSIGN_TRIGGERS'),
|
title:_('ID_ASSIGN_TRIGGERS'),
|
||||||
defaults: {width: 140, border:false},
|
//defaults: {width: 140, border:false},
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
border: false,
|
border: false,
|
||||||
items: [triggerGrid]
|
items: [triggerGrid]
|
||||||
@@ -2262,7 +2262,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
|
|||||||
loadingText : 'Loading...',
|
loadingText : 'Loading...',
|
||||||
//renderTo : 'cases-grid',
|
//renderTo : 'cases-grid',
|
||||||
frame : false,
|
frame : false,
|
||||||
autoHeight : false,
|
autoHeight : true,
|
||||||
autoScroll : true,
|
autoScroll : true,
|
||||||
clicksToEdit: 1,
|
clicksToEdit: 1,
|
||||||
layout : 'form',
|
layout : 'form',
|
||||||
@@ -2316,7 +2316,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
|
|||||||
loadingText : 'Loading...',
|
loadingText : 'Loading...',
|
||||||
//renderTo : 'cases-grid',
|
//renderTo : 'cases-grid',
|
||||||
frame : false,
|
frame : false,
|
||||||
autoHeight : false,
|
autoHeight : true,
|
||||||
autoScroll : true,
|
autoScroll : true,
|
||||||
clicksToEdit: 1,
|
clicksToEdit: 1,
|
||||||
layout : 'form',
|
layout : 'form',
|
||||||
|
|||||||
Reference in New Issue
Block a user