editing function part of input document.
This commit is contained in:
@@ -35,14 +35,3 @@ try
|
|||||||
catch ( Exception $e ) {
|
catch ( Exception $e ) {
|
||||||
print json_encode ( $e->getMessage() );
|
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 ) ;
|
|
||||||
@@ -8,10 +8,21 @@ try
|
|||||||
$rows = $oProcessMap->getExtInputDocumentsCriteria($_GET['pid']);
|
$rows = $oProcessMap->getExtInputDocumentsCriteria($_GET['pid']);
|
||||||
array_shift($rows);
|
array_shift($rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result['totalCount'] = count($rows);
|
if (isset($_GET['INP_DOC_UID'])) {
|
||||||
$result['data'] = $rows;
|
require_once 'classes/model/InputDocument.php';
|
||||||
print json_encode( $result) ;
|
$oInputDocument = new InputDocument();
|
||||||
|
$rows = $oInputDocument->load($_GET['INP_DOC_UID']);
|
||||||
|
}
|
||||||
|
// $result['totalCount'] = count($rows);
|
||||||
|
// $result['data'] = $rows;
|
||||||
|
// print json_encode( $result) ;
|
||||||
|
$tmpData = json_encode( $rows ) ;
|
||||||
|
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||||
|
|
||||||
|
$result = $tmpData;
|
||||||
|
echo $result;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch ( Exception $e ) {
|
catch ( Exception $e ) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ try {
|
|||||||
if(isset($_POST['function']))
|
if(isset($_POST['function']))
|
||||||
$sfunction =$_POST['function'];
|
$sfunction =$_POST['function'];
|
||||||
else
|
else
|
||||||
$sfunction ='';
|
$sfunction =$_POST['functions'];
|
||||||
|
|
||||||
switch($sfunction){
|
switch($sfunction){
|
||||||
case 'lookForNameInput':
|
case 'lookForNameInput':
|
||||||
|
|||||||
@@ -595,6 +595,32 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var btnEdit = new Ext.Button({
|
||||||
|
id: 'btnEdit',
|
||||||
|
text: 'Edit',
|
||||||
|
iconCls: 'application_add',
|
||||||
|
handler: function (s) {
|
||||||
|
var selectedRow = inputDocGrid.getSelectionModel().getSelections();
|
||||||
|
var inputDocUID = selectedRow[0].data.INP_DOC_UID;
|
||||||
|
|
||||||
|
//Loading Task Details into the form
|
||||||
|
inputDocForm.form.load({
|
||||||
|
url:'proxyInputDocument.php?INP_DOC_UID=' +inputDocUID,
|
||||||
|
method:'GET',
|
||||||
|
waitMsg:'Loading',
|
||||||
|
success:function(form, action) {
|
||||||
|
//Ext.MessageBox.alert('Message', 'Loaded OK');
|
||||||
|
newIOWindow.show();
|
||||||
|
Ext.getCmp("INP_DOC_UID").setValue(inputDocUID);
|
||||||
|
},
|
||||||
|
failure:function(form, action) {
|
||||||
|
Ext.MessageBox.alert('Message', 'Load failed');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
var inputDocForm = new Ext.FormPanel({
|
var inputDocForm = new Ext.FormPanel({
|
||||||
labelWidth: 100,
|
labelWidth: 100,
|
||||||
bodyStyle :'padding:5px 5px 0',
|
bodyStyle :'padding:5px 5px 0',
|
||||||
@@ -744,6 +770,10 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
//anchor:'15%'
|
//anchor:'15%'
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
|
},{
|
||||||
|
id : 'INP_DOC_UID',
|
||||||
|
xtype: 'hidden',
|
||||||
|
name : 'INP_DOC_UID'
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
@@ -773,7 +803,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
|
|
||||||
|
|
||||||
var tb = new Ext.Toolbar({
|
var tb = new Ext.Toolbar({
|
||||||
items: [btnAdd, btnRemove]
|
items: [btnAdd, btnRemove,btnEdit]
|
||||||
});
|
});
|
||||||
|
|
||||||
var inputDocGrid = new Ext.grid.GridPanel({
|
var inputDocGrid = new Ext.grid.GridPanel({
|
||||||
@@ -810,6 +840,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
buttonAlign: 'center'
|
buttonAlign: 'center'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var newIOWindow = new Ext.Window({
|
var newIOWindow = new Ext.Window({
|
||||||
title: 'Input Document',
|
title: 'Input Document',
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
@@ -828,7 +859,8 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
handler: function(){
|
handler: function(){
|
||||||
var getForm = inputDocForm.getForm().getValues();
|
var getForm = inputDocForm.getForm().getValues();
|
||||||
|
|
||||||
var sDocType = getForm.INP_DOC_TITLE
|
var sDocUID = getForm.INP_DOC_UID;
|
||||||
|
var sDocTitle = getForm.INP_DOC_TITLE;
|
||||||
var sFormNeeded = getForm.INP_DOC_FORM_NEEDED;
|
var sFormNeeded = getForm.INP_DOC_FORM_NEEDED;
|
||||||
var sOrig = getForm.INP_DOC_ORIGINAL;
|
var sOrig = getForm.INP_DOC_ORIGINAL;
|
||||||
if(sOrig == 'LEGAL COPY')
|
if(sOrig == 'LEGAL COPY')
|
||||||
@@ -852,30 +884,69 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
var sDestPath = getForm.INP_DOC_DESTINATION_PATH;
|
var sDestPath = getForm.INP_DOC_DESTINATION_PATH;
|
||||||
var sTags = getForm.INP_DOC_TAGS;
|
var sTags = getForm.INP_DOC_TAGS;
|
||||||
|
|
||||||
Ext.Ajax.request({
|
if(sDocUID == "")
|
||||||
url : '../inputdocs/inputdocs_Save.php',
|
{
|
||||||
method: 'POST',
|
Ext.Ajax.request({
|
||||||
params:{
|
url : '../inputdocs/inputdocs_Save.php',
|
||||||
INP_DOC_TITLE :sDocType,
|
method: 'POST',
|
||||||
INP_DOC_UID : '',
|
params:{
|
||||||
PRO_UID : pro_uid,
|
functions : 'lookForNameInput',
|
||||||
INP_DOC_FORM_NEEDED : sFormNeeded,
|
NAMEINPUT : sDocTitle,
|
||||||
INP_DOC_ORIGINAL : sOrig,
|
proUid : pro_uid
|
||||||
INP_DOC_VERSIONING : sVers,
|
},
|
||||||
INP_DOC_TAGS : 'INPUT', //By Default
|
success: function(response) {
|
||||||
INP_DOC_DESCRIPTION : sDesc
|
if(response.responseText == "1")
|
||||||
},
|
{
|
||||||
success: function(response) {
|
Ext.Ajax.request({
|
||||||
Ext.MessageBox.alert ('Status','Input document has been created successfully.');
|
url : '../inputdocs/inputdocs_Save.php',
|
||||||
|
method: 'POST',
|
||||||
|
params:{
|
||||||
|
functions : '',
|
||||||
|
INP_DOC_TITLE : sDocTitle,
|
||||||
|
INP_DOC_UID : sDocUID,
|
||||||
|
PRO_UID : pro_uid,
|
||||||
|
INP_DOC_FORM_NEEDED : sFormNeeded,
|
||||||
|
INP_DOC_ORIGINAL : sOrig,
|
||||||
|
INP_DOC_VERSIONING : sVers,
|
||||||
|
INP_DOC_TAGS : 'INPUT', //By Default
|
||||||
|
INP_DOC_DESCRIPTION : sDesc
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Input document has been created successfully.');
|
||||||
|
newIOWindow.close();
|
||||||
|
inputDocStore.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Ext.MessageBox.alert ('Status','There is an Input Document with the same name in this process. It is not saving');
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
}
|
||||||
//var getData = getstore.data.items;
|
else
|
||||||
//taskExtObj.saveTaskUsers(getData);
|
{
|
||||||
|
Ext.Ajax.request({
|
||||||
newIOWindow.close();
|
url : '../inputdocs/inputdocs_Save.php',
|
||||||
inputDocStore.reload();
|
method: 'POST',
|
||||||
}
|
params:{
|
||||||
|
functions : '',
|
||||||
|
INP_DOC_TITLE : sDocTitle,
|
||||||
|
INP_DOC_UID : sDocUID,
|
||||||
|
PRO_UID : pro_uid,
|
||||||
|
INP_DOC_FORM_NEEDED : sFormNeeded,
|
||||||
|
INP_DOC_ORIGINAL : sOrig,
|
||||||
|
INP_DOC_VERSIONING : sVers,
|
||||||
|
INP_DOC_TAGS : 'INPUT', //By Default
|
||||||
|
INP_DOC_DESCRIPTION : sDesc
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Input document has been updated successfully.');
|
||||||
|
newIOWindow.close();
|
||||||
|
inputDocStore.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
@@ -885,6 +956,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
gridWindow.show();
|
gridWindow.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -985,6 +1057,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
|
|||||||
var selectedRow = outputDocGrid.getSelectionModel().getSelections();
|
var selectedRow = outputDocGrid.getSelectionModel().getSelections();
|
||||||
var outDocUID = selectedRow[0].data.OUT_DOC_UID;
|
var outDocUID = selectedRow[0].data.OUT_DOC_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var btnProperties = new Ext.Button({
|
var btnProperties = new Ext.Button({
|
||||||
|
|||||||
Reference in New Issue
Block a user