BPMN Editor - Input Documents Manager Fixed
This commit is contained in:
@@ -5362,10 +5362,13 @@ class processMap {
|
|||||||
*/
|
*/
|
||||||
function getExtInputDocumentsCriteria($start, $limit,$sProcessUID = '')
|
function getExtInputDocumentsCriteria($start, $limit,$sProcessUID = '')
|
||||||
{
|
{
|
||||||
|
$aTasks = $this->getAllInputDocsByTask($sProcessUID);
|
||||||
$sDelimiter = DBAdapter::getStringDelimiter ();
|
$sDelimiter = DBAdapter::getStringDelimiter ();
|
||||||
$oCriteria = new Criteria ( 'workflow' );
|
$oCriteria = new Criteria ( 'workflow' );
|
||||||
$oCriteria->addSelectColumn ( InputDocumentPeer::INP_DOC_UID );
|
$oCriteria->addSelectColumn ( InputDocumentPeer::INP_DOC_UID );
|
||||||
$oCriteria->addSelectColumn ( InputDocumentPeer::PRO_UID );
|
$oCriteria->addSelectColumn ( InputDocumentPeer::PRO_UID );
|
||||||
|
$oCriteria->addSelectColumn ( InputDocumentPeer::INP_DOC_VERSIONING );
|
||||||
|
$oCriteria->addSelectColumn ( InputDocumentPeer::INP_DOC_DESTINATION_PATH );
|
||||||
$oCriteria->addAsColumn ( 'INP_DOC_TITLE', 'C1.CON_VALUE' );
|
$oCriteria->addAsColumn ( 'INP_DOC_TITLE', 'C1.CON_VALUE' );
|
||||||
$oCriteria->addAsColumn ( 'INP_DOC_DESCRIPTION', 'C2.CON_VALUE' );
|
$oCriteria->addAsColumn ( 'INP_DOC_DESCRIPTION', 'C2.CON_VALUE' );
|
||||||
$oCriteria->addAlias ( 'C1', 'CONTENT' );
|
$oCriteria->addAlias ( 'C1', 'CONTENT' );
|
||||||
@@ -5401,6 +5404,7 @@ class processMap {
|
|||||||
$aRow ['INP_DOC_TITLE'] = $inputDocumentObj ['INP_DOC_TITLE'];
|
$aRow ['INP_DOC_TITLE'] = $inputDocumentObj ['INP_DOC_TITLE'];
|
||||||
$aRow ['INP_DOC_DESCRIPTION'] = $inputDocumentObj ['INP_DOC_DESCRIPTION'];
|
$aRow ['INP_DOC_DESCRIPTION'] = $inputDocumentObj ['INP_DOC_DESCRIPTION'];
|
||||||
}
|
}
|
||||||
|
$aRow['INP_DOC_TASKS'] = isset($aTasks[$aRow ['INP_DOC_UID']]) ? $aTasks[$aRow ['INP_DOC_UID']] :0;
|
||||||
$inputDocArray [] = $aRow;
|
$inputDocArray [] = $aRow;
|
||||||
$oDataset->next ();
|
$oDataset->next ();
|
||||||
}
|
}
|
||||||
@@ -6737,4 +6741,22 @@ function saveExtEvents($oData)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAllInputDocsByTask($sPRO_UID){
|
||||||
|
$oCriteria = new Criteria('workflow');
|
||||||
|
$oCriteria->addSelectColumn(StepPeer::STEP_UID_OBJ);
|
||||||
|
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
|
||||||
|
$oCriteria->addGroupByColumn(StepPeer::STEP_UID_OBJ);
|
||||||
|
$oCriteria->add(StepPeer::STEP_TYPE_OBJ,'INPUT_DOCUMENT');
|
||||||
|
$oCriteria->add(StepPeer::PRO_UID, $sPRO_UID);
|
||||||
|
$oDataset = StepPeer::doSelectRS($oCriteria);
|
||||||
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
|
$aIDocs = array();
|
||||||
|
while ($oDataset->next()){
|
||||||
|
$row = $oDataset->getRow();
|
||||||
|
$aIDocs[$row['STEP_UID_OBJ']] = $row['CNT'];
|
||||||
|
}
|
||||||
|
return $aIDocs;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
106
workflow/engine/controllers/processOptionsProxy.php
Normal file
106
workflow/engine/controllers/processOptionsProxy.php
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<?php
|
||||||
|
class processOptionsProxy extends HttpProxyController
|
||||||
|
{
|
||||||
|
function loadInputDocuments($params){
|
||||||
|
G::LoadClass('processMap');
|
||||||
|
$oProcessMap = new processMap(new DBConnection);
|
||||||
|
|
||||||
|
$pro_uid = $params->PRO_UID;
|
||||||
|
$start = isset($params->start) ? $params->start: 0;
|
||||||
|
$limit = isset($params->limit) ? $params->limit: '';
|
||||||
|
|
||||||
|
$rows = $oProcessMap->getExtInputDocumentsCriteria($start, $limit,$pro_uid);
|
||||||
|
$total = $oProcessMap->getAllInputDocumentCount();
|
||||||
|
$aDocs = $oProcessMap->getAllInputDocsByTask($pro_uid);
|
||||||
|
array_shift($rows);
|
||||||
|
|
||||||
|
$this->PRO_UID = $pro_uid;
|
||||||
|
$this->success = true;
|
||||||
|
$this->idocs = $rows;
|
||||||
|
$this->total_idocs = $total;
|
||||||
|
}
|
||||||
|
|
||||||
|
function canDeleteInputDoc($params){
|
||||||
|
G::LoadClass('processMap');
|
||||||
|
$oProcessMap = new processMap(new DBConnection);
|
||||||
|
$aRows = $oProcessMap->getAllInputDocsByTask($params->PRO_UID);
|
||||||
|
$response = isset($aRows[$params->IDOC_UID]) ? false : true;
|
||||||
|
$this->success = $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteInputDoc($params){
|
||||||
|
require_once 'classes/model/StepSupervisor.php';
|
||||||
|
require_once 'classes/model/ObjectPermission.php';
|
||||||
|
require_once 'classes/model/InputDocument.php';
|
||||||
|
G::LoadClass('processMap');
|
||||||
|
|
||||||
|
$oStepSupervisor = new StepSupervisor();
|
||||||
|
$fields2=$oStepSupervisor->loadInfo($params->IDOC_UID);
|
||||||
|
$oStepSupervisor->remove($fields2['STEP_UID']);
|
||||||
|
|
||||||
|
$oPermission = new ObjectPermission();
|
||||||
|
$fields3=$oPermission->loadInfo($params->IDOC_UID);
|
||||||
|
if(is_array($fields3))
|
||||||
|
$oPermission->remove($fields3['OP_UID']);
|
||||||
|
|
||||||
|
$oInputDocument = new InputDocument();
|
||||||
|
$fields = $oInputDocument->load($params->IDOC_UID);
|
||||||
|
|
||||||
|
$oInputDocument->remove($params->IDOC_UID);
|
||||||
|
|
||||||
|
$oStep = new Step();
|
||||||
|
$oStep->removeStep('INPUT_DOCUMENT', $params->IDOC_UID);
|
||||||
|
|
||||||
|
$oOP = new ObjectPermission();
|
||||||
|
$oOP->removeByObject('INPUT', $params->IDOC_UID);
|
||||||
|
|
||||||
|
//refresh dbarray with the last change in inputDocument
|
||||||
|
$oMap = new processMap();
|
||||||
|
$oCriteria = $oMap->getInputDocumentsCriteria($params->PRO_UID);
|
||||||
|
|
||||||
|
$this->success = true;
|
||||||
|
$this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_DELETE');
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveInputDoc($params){
|
||||||
|
require_once 'classes/model/InputDocument.php';
|
||||||
|
G::LoadClass( 'processMap' );
|
||||||
|
|
||||||
|
$aData = array();
|
||||||
|
$aData['PRO_UID'] = $params->PRO_UID;
|
||||||
|
$aData['INP_DOC_UID'] = $params->INP_DOC_UID;
|
||||||
|
$aData['INP_DOC_TITLE'] = $params->INP_DOC_TITLE;
|
||||||
|
$aData['INP_DOC_FORM_NEEDED'] = $params->INP_DOC_FORM_NEEDED;
|
||||||
|
if ($aData['INP_DOC_FORM_NEEDED'] != 'VIRTUAL'){
|
||||||
|
$aData['INP_DOC_ORIGINAL'] = $params->INP_DOC_ORIGINAL;
|
||||||
|
}else{
|
||||||
|
$aData['INP_DOC_ORIGINAL'] = 'ORIGINAL';
|
||||||
|
}
|
||||||
|
$aData['INP_DOC_VERSIONING'] = $params->INP_DOC_VERSIONING;
|
||||||
|
$aData['INP_DOC_DESCRIPTION'] = $params->INP_DOC_DESCRIPTION;
|
||||||
|
$aData['INP_DOC_DESTINATION_PATH'] = $params->INP_DOC_DESTINATION_PATH;
|
||||||
|
$aData['INP_DOC_TAGS'] = $params->INP_DOC_TAGS;
|
||||||
|
|
||||||
|
$oInputDocument = new InputDocument();
|
||||||
|
if ($aData['INP_DOC_UID'] == '') {
|
||||||
|
unset($aData['INP_DOC_UID']);
|
||||||
|
$oInputDocument->create($aData);
|
||||||
|
$this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_NEW');
|
||||||
|
}else {
|
||||||
|
$oInputDocument->update($aData);
|
||||||
|
$this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_UPDATE');
|
||||||
|
}
|
||||||
|
|
||||||
|
//refresh dbarray with the last change in inputDocument
|
||||||
|
$oMap = new processMap();
|
||||||
|
$oCriteria = $oMap->getInputDocumentsCriteria($aData['PRO_UID']);
|
||||||
|
$this->success = true;
|
||||||
|
}
|
||||||
|
function loadInputDoc($params){
|
||||||
|
require_once 'classes/model/InputDocument.php';
|
||||||
|
$oInputDocument = new InputDocument();
|
||||||
|
$fields = $oInputDocument->load($params->IDOC_UID);
|
||||||
|
$this->success = true;
|
||||||
|
$this->data = $fields;
|
||||||
|
}
|
||||||
|
} //End processOptionsProxy
|
||||||
@@ -1224,242 +1224,246 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
|
|
||||||
ProcessOptions.prototype.addInputDoc= function(_5625)
|
ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||||
{
|
{
|
||||||
|
var gridWidow;
|
||||||
|
var inputDocGrid;
|
||||||
|
var inputDocStore;
|
||||||
|
var expander;
|
||||||
|
var inputDocColumns;
|
||||||
|
var render_version;
|
||||||
|
var newButton;
|
||||||
|
var editButton;
|
||||||
|
var deleteButton;
|
||||||
|
var saveButton;
|
||||||
|
var cancelButton;
|
||||||
|
var smodel;
|
||||||
|
var bbarpaging;
|
||||||
|
var idocsContextMenu;
|
||||||
|
var newIDocWindow;
|
||||||
|
var inputDocForm;
|
||||||
|
|
||||||
var inpDocFields = Ext.data.Record.create([
|
//Renderer for Versioning Field
|
||||||
{
|
render_version = function(value){
|
||||||
name: 'INP_DOC_UID',
|
var out = '';
|
||||||
type: 'string'
|
switch(value){
|
||||||
},
|
case '0': out = 'No'; break;
|
||||||
{
|
case '1': out = 'Yes'; break;
|
||||||
name: 'PRO_UID',
|
}
|
||||||
type: 'string'
|
return out;
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'INP_DOC_TITLE',
|
|
||||||
type: 'string'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'INP_DOC_DESCRIPTION',
|
|
||||||
type: 'string'
|
|
||||||
},{
|
|
||||||
name: 'INP_DOC_VERSIONING',
|
|
||||||
type: 'string'
|
|
||||||
},{
|
|
||||||
name: 'INP_DOC_DESTINATION_PATH',
|
|
||||||
type: 'string'
|
|
||||||
}
|
}
|
||||||
]);
|
|
||||||
|
|
||||||
var editor = new Ext.ux.grid.RowEditor({
|
|
||||||
saveText: _('ID_UPDATE')
|
|
||||||
});
|
|
||||||
|
|
||||||
var btnAdd = new Ext.Button({
|
|
||||||
id : 'btnAdd',
|
newButton = new Ext.Action({
|
||||||
text : _('ID_NEW'),
|
text : _('ID_NEW'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
newIOWindow.show();
|
|
||||||
inputDocForm.getForm().reset();
|
inputDocForm.getForm().reset();
|
||||||
inputDocForm.getForm().items.items[2].hide();
|
Ext.getCmp('idoc_FORM_NEEDED').setValue('VIRTUAL');
|
||||||
inputDocForm.getForm().items.items[2].getEl().up('.x-form-item').setDisplayed(false); // show label
|
Ext.getCmp('idoc_VERSIONING').setValue('0');
|
||||||
inputDocForm.getForm().items.items[0].focus('',200);
|
inputDocForm.getForm().findField('INP_DOC_TAGS').setValue('INPUT');
|
||||||
|
inputDocForm.getForm().findField('PRO_UID').setValue(pro_uid);
|
||||||
|
newIDocWindow.setTitle(_('ID_NEW_INPUTDOCS'));
|
||||||
|
newIDocWindow.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//edit input document Function
|
editButton = new Ext.Action({
|
||||||
var editInputDoc = function() {
|
text : _('ID_EDIT'),
|
||||||
editor.stopEditing();
|
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
var rowSelected = Ext.getCmp('inputdocGrid').getSelectionModel().getSelections();
|
disabled: true,
|
||||||
if( rowSelected.length == 0 ) {
|
handler: function(){
|
||||||
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
|
Ext.getCmp('designerTab').getEl().mask(_('ID_PROCESSING'));
|
||||||
return false;
|
rowselected = inputDocGrid.getSelectionModel().getSelected();
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'processOptionsProxy/loadInputDoc',
|
||||||
|
params: {IDOC_UID: rowselected.data.INP_DOC_UID},
|
||||||
|
success: function(r,o){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
var res = Ext.decode(r.responseText);
|
||||||
|
if (res.success){
|
||||||
|
inputDocForm.getForm().reset();
|
||||||
|
Ext.getCmp('idoc_FORM_NEEDED').setValue(res.data.INP_DOC_FORM_NEEDED);
|
||||||
|
if (res.data.INP_DOC_FORM_NEEDED != 'VIRTUAL'){
|
||||||
|
Ext.getCmp('formType').setValue(res.data.INP_DOC_ORIGINAL);
|
||||||
|
Ext.getCmp("formType").enable();
|
||||||
|
}
|
||||||
|
Ext.getCmp('idoc_VERSIONING').setValue(res.data.INP_DOC_VERSIONING);
|
||||||
|
inputDocForm.getForm().findField('INP_DOC_TITLE').setValue(res.data.INP_DOC_TITLE);
|
||||||
|
inputDocForm.getForm().findField('INP_DOC_DESCRIPTION').setValue(res.data.INP_DOC_DESCRIPTION);
|
||||||
|
inputDocForm.getForm().findField('INP_DOC_DESTINATION_PATH').setValue(res.data.INP_DOC_DESTINATION_PATH);
|
||||||
|
inputDocForm.getForm().findField('INP_DOC_TAGS').setValue(res.data.INP_DOC_TAGS);
|
||||||
|
inputDocForm.getForm().findField('INP_DOC_UID').setValue(res.data.INP_DOC_UID);
|
||||||
|
inputDocForm.getForm().findField('PRO_UID').setValue(pro_uid);
|
||||||
|
newIDocWindow.setTitle(_('ID_EDIT_INPUTDOCS'));
|
||||||
|
newIDocWindow.show();
|
||||||
|
}else{
|
||||||
|
PMExt.notify(_('ID_REQUEST_DOCUMENTS'),res.msg);
|
||||||
}
|
}
|
||||||
var inputDocUID = rowSelected[0].get('INP_DOC_UID');
|
|
||||||
inputDocForm.form.load({
|
|
||||||
url : 'bpmn/proxyExtjs.php?INP_DOC_UID=' +inputDocUID+'&action=editInputDocument',
|
|
||||||
method : 'GET',
|
|
||||||
waitMsg : 'Loading',
|
|
||||||
success : function(form, action) {
|
|
||||||
newIOWindow.show();
|
|
||||||
Ext.getCmp("INP_DOC_UID").setValue(inputDocUID);
|
|
||||||
},
|
},
|
||||||
failure:function(form, action) {
|
failure: function(r,o){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED'));
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var removeInputDoc = function(){
|
|
||||||
ids = Array();
|
|
||||||
|
|
||||||
editor.stopEditing();
|
|
||||||
var rowsSelected = Ext.getCmp('inputdocGrid').getSelectionModel().getSelections();
|
|
||||||
|
|
||||||
if( rowsSelected.length == 0 ) {
|
|
||||||
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0; i<rowsSelected.length; i++)
|
|
||||||
ids[i] = rowsSelected[i].get('INP_DOC_UID');
|
|
||||||
|
|
||||||
ids = ids.join(',');
|
|
||||||
|
|
||||||
//First check whether selected Dynaform is assigned to a task steps or not.
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : '../inputdocs/inputdocs_Delete.php',
|
|
||||||
method: 'POST',
|
|
||||||
params: {
|
|
||||||
functions : 'getRelationInfDoc',
|
|
||||||
INP_DOC_UID : ids
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
var result = Ext.util.JSON.decode(response.responseText);
|
|
||||||
if( result.success ) {
|
|
||||||
if( result.passed ) { //deleting the selected input document
|
|
||||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_DELETE_INPUTDOCUMENT_CONFIRM'), function(){
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : '../inputdocs/inputdocs_Delete.php',
|
|
||||||
method: 'POST',
|
|
||||||
params: {
|
|
||||||
functions : 'deleteInputDocument',
|
|
||||||
INP_DOC_UID : ids
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
var result = Ext.util.JSON.decode(response.responseText);
|
|
||||||
if( result.success ){
|
|
||||||
PMExt.notify( _('ID_STATUS') , result.msg);
|
|
||||||
|
|
||||||
//Reloading store after deleting input document
|
|
||||||
inputDocStore.reload();
|
|
||||||
} else {
|
|
||||||
PMExt.error(_('ID_ERROR'), result.msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PMExt.error(_('ID_VALIDATION_ERROR'), result.msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PMExt.error(_('ID_ERROR'), result.msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//edit input document button
|
|
||||||
var btnEdit = new Ext.Button({
|
|
||||||
id: 'btnEdit',
|
|
||||||
text: _('ID_EDIT'),
|
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
|
||||||
handler: editInputDoc
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var btnRemove = new Ext.Button({
|
deleteButton = new Ext.Action({
|
||||||
id: 'btnRemove',
|
|
||||||
text : _('ID_DELETE'),
|
text : _('ID_DELETE'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
handler: removeInputDoc
|
disabled: true,
|
||||||
|
handler : function(){
|
||||||
|
Ext.getCmp('designerTab').getEl().mask(_('ID_PROCESSING'));
|
||||||
|
rowselected = inputDocGrid.getSelectionModel().getSelected();
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'processOptionsProxy/canDeleteInputDoc',
|
||||||
|
params: {PRO_UID: pro_uid, IDOC_UID: rowselected.data.INP_DOC_UID},
|
||||||
|
success: function(r,o){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
var res = Ext.decode(r.responseText);
|
||||||
|
if (res.success){
|
||||||
|
Ext.Msg.confirm(_('ID_CONFIRM'),_('ID_CONFIRM_DELETE_INPUT_DOC'), function(btn, text){
|
||||||
|
if (btn=='yes'){
|
||||||
|
Ext.getCmp('designerTab').getEl().mask(_('ID_PROCESSING'));
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'processOptionsProxy/deleteInputDoc',
|
||||||
|
params: {PRO_UID: pro_uid, IDOC_UID: rowselected.data.INP_DOC_UID},
|
||||||
|
success: function(r,o){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
var resp = Ext.decode(r.responseText);
|
||||||
|
if (resp.success){
|
||||||
|
editButton.disable();
|
||||||
|
deleteButton.disable();
|
||||||
|
inputDocGrid.store.load();
|
||||||
|
PMExt.notify(_('ID_REQUEST_DOCUMENTS'),resp.msg);
|
||||||
|
}else{
|
||||||
|
PMExt.error(_('ID_ERROR'), resp.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
failure: function(r,o){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED'));
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
PMExt.warning(_('ID_REQUEST_DOCUMENTS'),_('ID_MSG_CANNOT_DELETE_INPUT_DOC'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
failure: function(r,o){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
PMExt.notify( _('ID_STATUS') , _('ID_LOAD_FAILED'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var tb = new Ext.Toolbar({
|
saveButton = new Ext.Action({
|
||||||
items: [btnAdd, btnRemove, btnEdit]
|
text : _('ID_SAVE'),
|
||||||
|
disabled: false,
|
||||||
|
handler: function(){
|
||||||
|
Ext.getCmp('designerTab').getEl().mask(_('ID_PROCESSING'));
|
||||||
|
inputDocForm.getForm().submit({
|
||||||
|
success: function(f,a){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
var resp = Ext.decode(a.response.responseText);
|
||||||
|
if (resp.success){
|
||||||
|
editButton.disable();
|
||||||
|
deleteButton.disable();
|
||||||
|
inputDocGrid.store.load();
|
||||||
|
Ext.getCmp('frmNewInputDoc').hide();
|
||||||
|
PMExt.notify(_('ID_REQUEST_DOCUMENTS'),resp.msg);
|
||||||
|
}else{
|
||||||
|
PMExt.notify( _('ID_ERROR') , resp.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
failure: function(f,a){
|
||||||
|
Ext.getCmp('designerTab').getEl().unmask();
|
||||||
|
PMExt.notify( _('ID_REQUEST_DOCUMENTS') , _('ID_SOME_FIELDS_REQUIRED'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//inputDocStore? and groupingStore?
|
cancelButton = new Ext.Action({
|
||||||
var inputDocStore = new Ext.data.JsonStore({
|
text : _('ID_CANCEL'),
|
||||||
root : 'data',
|
disabled: false,
|
||||||
totalProperty: 'totalCount',
|
handler: function(){
|
||||||
idProperty : 'gridIndex',
|
Ext.getCmp('frmNewInputDoc').hide();
|
||||||
remoteSort : true,
|
}
|
||||||
fields : inpDocFields,
|
|
||||||
proxy: new Ext.data.HttpProxy({
|
|
||||||
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getInputDocumentList'
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
inputDocStore.load({params:{start : 0 , limit : 10}});
|
|
||||||
|
|
||||||
var inputDocForm = new Ext.FormPanel({
|
inputDocForm = new Ext.FormPanel({
|
||||||
labelWidth: 100,
|
labelWidth: 100,
|
||||||
width : 500,
|
autoWidth : true,
|
||||||
height : 380,
|
height : 380,
|
||||||
monitorValid : true,
|
monitorValid : true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
bodyStyle : 'padding:10px 0 0 10px;',
|
buttonAlign: 'center',
|
||||||
|
url: 'processOptionsProxy/saveInputDoc',
|
||||||
items: [{
|
items: [{
|
||||||
xtype : 'fieldset',
|
xtype : 'fieldset',
|
||||||
layout : 'form',
|
layout : 'form',
|
||||||
border : true,
|
border : true,
|
||||||
title : _('ID_INPUT_INFO'),
|
title : _('ID_INPUT_INFO'),
|
||||||
width : 500,
|
autoWidth : true,
|
||||||
labelWidth : 150,
|
labelWidth : 150,
|
||||||
collapsible : false,
|
collapsible : false,
|
||||||
labelAlign : '',
|
labelAlign : '',
|
||||||
items : [{
|
plain: false,
|
||||||
xtype : 'textfield',
|
items : [
|
||||||
fieldLabel: _('ID_TITLE'),
|
{xtype: 'textfield', fieldLabel: _('ID_TITLE'),width: 300,name: 'INP_DOC_TITLE', allowBlank: false},
|
||||||
width : 300,
|
{
|
||||||
name : 'INP_DOC_TITLE',
|
|
||||||
allowBlank: false
|
|
||||||
},{
|
|
||||||
width: 300,
|
width: 300,
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
editable: false,
|
editable: false,
|
||||||
fieldLabel: _('ID_TYPE'),
|
fieldLabel: _('ID_TYPE'),
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
forceSelection: true,
|
|
||||||
name: 'INP_DOC_FORM_NEEDED',
|
name: 'INP_DOC_FORM_NEEDED',
|
||||||
displayField: 'name',
|
displayField: 'name',
|
||||||
value : 'Digital',
|
|
||||||
valueField : 'value',
|
valueField : 'value',
|
||||||
|
id: 'idoc_FORM_NEEDED',
|
||||||
|
autoSelect: true,
|
||||||
|
allowBlank: false,
|
||||||
|
submitValue : false,
|
||||||
|
hiddenName: 'INP_DOC_FORM_NEEDED',
|
||||||
store: new Ext.data.JsonStore({
|
store: new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
{name : 'Digital', value: 'VIRTUAL'},
|
{name : 'Digital', value: 'VIRTUAL'},
|
||||||
{name : 'Printed', value: 'REAL'},
|
{name : 'Printed', value: 'REAL'},
|
||||||
{name : 'Digital/Printed', value: 'VREAL'}]}
|
{name : 'Digital/Printed', value: 'VREAL'}
|
||||||
),
|
]
|
||||||
|
}),
|
||||||
onSelect: function(record, index) {
|
onSelect: function(record, index) {
|
||||||
//Show-Hide Format Type Field
|
|
||||||
this.collapse();
|
|
||||||
if(record.data.value != 'VIRTUAL') {
|
if(record.data.value != 'VIRTUAL') {
|
||||||
Ext.getCmp("formType").show();
|
Ext.getCmp("formType").enable();
|
||||||
Ext.getCmp("formType").getEl().up('.x-form-item').setDisplayed(true); // show label
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Ext.getCmp("formType").hide();
|
Ext.getCmp("formType").disable();
|
||||||
Ext.getCmp("formType").getEl().up('.x-form-item').setDisplayed(false); // hide label
|
|
||||||
}
|
}
|
||||||
|
this.collapse();
|
||||||
this.setValue(record.data[this.valueField || this.displayField]);
|
this.setValue(record.data[this.valueField || this.displayField]);
|
||||||
}
|
}
|
||||||
},{
|
},
|
||||||
//xtype : 'fieldset',
|
{
|
||||||
//layout : 'form',
|
|
||||||
//id : 'formType',
|
|
||||||
//border : false,
|
|
||||||
//width : 470,
|
|
||||||
//hidden :true,
|
|
||||||
//labelAlign: '',
|
|
||||||
//items:[{
|
|
||||||
xtype : 'combo',
|
xtype : 'combo',
|
||||||
id : 'formType',
|
id : 'formType',
|
||||||
width : 150,
|
width : 150,
|
||||||
mode : 'local',
|
mode : 'local',
|
||||||
editable : false,
|
editable : false,
|
||||||
hidden : true,
|
hiddenName : 'INP_DOC_ORIGINAL',
|
||||||
|
disabled : true,
|
||||||
|
submitValue : false,
|
||||||
fieldLabel : _('ID_FORMAT'),
|
fieldLabel : _('ID_FORMAT'),
|
||||||
triggerAction : 'all',
|
triggerAction : 'all',
|
||||||
forceSelection : true,
|
forceSelection : true,
|
||||||
name : 'INP_DOC_ORIGINAL',
|
|
||||||
displayField : 'name',
|
displayField : 'name',
|
||||||
valueField : 'value',
|
valueField : 'value',
|
||||||
|
allowBlank : false,
|
||||||
value : 'ORIGINAL',
|
value : 'ORIGINAL',
|
||||||
store : new Ext.data.JsonStore({
|
store : new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
@@ -1469,14 +1473,9 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
{name : 'Copy', value: 'COPY'}
|
{name : 'Copy', value: 'COPY'}
|
||||||
]}
|
]}
|
||||||
)
|
)
|
||||||
//}]
|
},
|
||||||
},{
|
{xtype: 'textarea', fieldLabel: _('ID_DESCRIPTION'), name: 'INP_DOC_DESCRIPTION', height: 120, width: 300},
|
||||||
xtype : 'textarea',
|
{
|
||||||
fieldLabel: _('ID_DESCRIPTION'),
|
|
||||||
name : 'INP_DOC_DESCRIPTION',
|
|
||||||
height : 120,
|
|
||||||
width : 300
|
|
||||||
},{
|
|
||||||
width : 150,
|
width : 150,
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
@@ -1484,17 +1483,21 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
fieldLabel: _('ID_ENABLE_VERSIONING'),
|
fieldLabel: _('ID_ENABLE_VERSIONING'),
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
name: 'INP_DOC_VERSIONING',
|
hiddenName: 'INP_DOC_VERSIONING',
|
||||||
|
id: 'idoc_VERSIONING',
|
||||||
|
submitValue: false,
|
||||||
displayField: 'name',
|
displayField: 'name',
|
||||||
valueField: 'value',
|
valueField: 'value',
|
||||||
value : 'No',
|
value : '0',
|
||||||
|
allowBlank: false,
|
||||||
store: new Ext.data.JsonStore({
|
store: new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
{name : 'No', value: ''},
|
{name : 'No', value: '0'},
|
||||||
{name : 'Yes', value: '1'},
|
{name : 'Yes', value: '1'},
|
||||||
]})
|
]})
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
layout :'column',
|
layout :'column',
|
||||||
border :false,
|
border :false,
|
||||||
items :[{
|
items :[{
|
||||||
@@ -1560,186 +1563,102 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
},{
|
|
||||||
id : 'INP_DOC_UID',
|
|
||||||
xtype: 'hidden',
|
|
||||||
name : 'INP_DOC_UID'
|
|
||||||
}]
|
|
||||||
}],
|
|
||||||
buttons: [{
|
|
||||||
text: _('ID_SAVE'),
|
|
||||||
formBind :true,
|
|
||||||
handler: function(){
|
|
||||||
var getForm = inputDocForm.getForm().getValues();
|
|
||||||
var sDocUID = getForm.INP_DOC_UID;
|
|
||||||
var sDocTitle = getForm.INP_DOC_TITLE;
|
|
||||||
var sFormNeeded = getForm.INP_DOC_FORM_NEEDED;
|
|
||||||
var sOrig = getForm.INP_DOC_ORIGINAL;
|
|
||||||
if(sOrig == "" || sOrig == "Original")
|
|
||||||
sOrig = 'ORIGINAL';
|
|
||||||
|
|
||||||
if(sOrig == 'Legal Copy')
|
|
||||||
sOrig = 'COPYLEGAL';
|
|
||||||
|
|
||||||
if(sFormNeeded == 'Digital')
|
|
||||||
sFormNeeded = 'VIRTUAL';
|
|
||||||
else if(sFormNeeded == 'Printed')
|
|
||||||
sFormNeeded = 'REAL';
|
|
||||||
else
|
|
||||||
sFormNeeded = 'VREAL';
|
|
||||||
|
|
||||||
|
|
||||||
var sDesc = getForm.INP_DOC_DESCRIPTION;
|
|
||||||
var sVers = getForm.INP_DOC_VERSIONING;
|
|
||||||
if(sVers == 'Yes')
|
|
||||||
sVers = '1';
|
|
||||||
else
|
|
||||||
sVers = '';
|
|
||||||
|
|
||||||
var sDestPath = getForm.INP_DOC_DESTINATION_PATH;
|
|
||||||
var sTags = getForm.INP_DOC_TAGS;
|
|
||||||
|
|
||||||
if(sDocUID == "")
|
|
||||||
{
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : '../inputdocs/inputdocs_Save.php',
|
|
||||||
method: 'POST',
|
|
||||||
params:{
|
|
||||||
functions : 'lookForNameInput',
|
|
||||||
NAMEINPUT : sDocTitle,
|
|
||||||
proUid : pro_uid
|
|
||||||
},
|
},
|
||||||
success: function(response) {
|
{id : 'INP_DOC_UID', xtype: 'hidden', name : 'INP_DOC_UID'},
|
||||||
if(response.responseText == "1")
|
{id : 'PRO_UID', xtype: 'hidden', name : 'PRO_UID'}
|
||||||
{
|
|
||||||
Ext.Ajax.request({
|
|
||||||
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 : sTags,
|
|
||||||
INP_DOC_DESCRIPTION : sDesc,
|
|
||||||
INP_DOC_DESTINATION_PATH : sDestPath
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_INPUT_CREATE') );
|
|
||||||
newIOWindow.hide();
|
|
||||||
inputDocStore.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_INPUT_NOT_SAVE') );
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Ext.Ajax.request({
|
|
||||||
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 : sTags,
|
|
||||||
INP_DOC_DESCRIPTION : sDesc,
|
|
||||||
INP_DOC_DESTINATION_PATH : sDestPath
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
PMExt.notify( _('ID_STATUS') , _('ID_INPUT_UPDATE') );
|
|
||||||
newIOWindow.hide();
|
|
||||||
inputDocStore.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
text: _('ID_CANCEL'),
|
|
||||||
handler: function(){
|
|
||||||
// when this button clicked,
|
|
||||||
newIOWindow.hide();
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
buttonAlign : 'center'
|
|
||||||
});
|
|
||||||
|
|
||||||
var expander = new Ext.ux.grid.RowExpander({
|
|
||||||
tpl : new Ext.Template(
|
|
||||||
"<p><b>"+TRANSLATIONS.ID_DESCRIPTION+":</b> {INP_DOC_DESCRIPTION} </p>"
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
var inputDocColumns = new Ext.grid.ColumnModel({
|
|
||||||
columns: [
|
|
||||||
expander,
|
|
||||||
{
|
|
||||||
id: 'INP_DOC_TITLE',
|
|
||||||
header: _('ID_TITLE'),
|
|
||||||
dataIndex: 'INP_DOC_TITLE',
|
|
||||||
width: 280,
|
|
||||||
editable: false,
|
|
||||||
editor: new Ext.form.TextField({
|
|
||||||
//allowBlank: false
|
|
||||||
})
|
|
||||||
},{
|
|
||||||
id: 'INP_DOC_VERSIONING',
|
|
||||||
header: _('ID_VERSIONING'),
|
|
||||||
dataIndex: 'INP_DOC_VERSIONING',
|
|
||||||
width: 280,
|
|
||||||
editable: false,
|
|
||||||
editor: new Ext.form.TextField({
|
|
||||||
//allowBlank: false
|
|
||||||
})
|
|
||||||
},{
|
|
||||||
id: 'INP_DOC_DESTINATION_PATH',
|
|
||||||
header: _('ID_DESTINATION_PATH'),
|
|
||||||
dataIndex: 'INP_DOC_DESTINATION_PATH',
|
|
||||||
width: 280,
|
|
||||||
editable: false,
|
|
||||||
editor: new Ext.form.TextField({
|
|
||||||
//allowBlank: false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
}],
|
||||||
|
buttons: [saveButton, cancelButton]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var inputDocGrid = new Ext.grid.GridPanel({
|
smodel = new Ext.grid.RowSelectionModel({
|
||||||
store: inputDocStore,
|
singleSelect: true,
|
||||||
id : 'inputdocGrid',
|
listeners:{
|
||||||
loadMask: true,
|
rowselect: function(sm){
|
||||||
//loadingText: 'Loading...',
|
editButton.enable();
|
||||||
//renderTo: 'cases-grid',
|
deleteButton.enable();
|
||||||
frame: false,
|
},
|
||||||
autoHeight:false,
|
rowdeselect: function(sm){
|
||||||
clicksToEdit: 1,
|
editButton.disable();
|
||||||
minHeight:350,
|
deleteButton.disable();
|
||||||
height :350,
|
}
|
||||||
layout: 'fit',
|
}
|
||||||
plugins: expander,
|
});
|
||||||
cm: inputDocColumns,
|
|
||||||
stripeRows: true,
|
idocsContextMenu = new Ext.menu.Menu({
|
||||||
tbar: tb,
|
items: [editButton, deleteButton]
|
||||||
bbar: new Ext.PagingToolbar({
|
});
|
||||||
|
|
||||||
|
|
||||||
|
inputDocStore = new Ext.data.GroupingStore( {
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url: 'processOptionsProxy/loadInputDocuments?PRO_UID='+pro_uid
|
||||||
|
//params: {PRO_UID: pro_uid}
|
||||||
|
}),
|
||||||
|
reader : new Ext.data.JsonReader( {
|
||||||
|
root: 'idocs',
|
||||||
|
totalProperty: 'total_idocs',
|
||||||
|
fields : [
|
||||||
|
{name: 'INP_DOC_UID', type: 'string'},
|
||||||
|
{name: 'PRO_UID',type: 'string'},
|
||||||
|
{name: 'INP_DOC_TITLE', type: 'string'},
|
||||||
|
{name: 'INP_DOC_DESCRIPTION', type: 'string'},
|
||||||
|
{name: 'INP_DOC_VERSIONING',type: 'string'},
|
||||||
|
{name: 'INP_DOC_DESTINATION_PATH',type: 'string'},
|
||||||
|
{name: 'INP_DOC_TASKS', type: 'int'}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
bbarpaging = new Ext.PagingToolbar({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
store: inputDocStore,
|
store: inputDocStore,
|
||||||
displayInfo: true,
|
displayInfo: true,
|
||||||
displayMsg: 'Displaying Input Document {0} - {1} of {2}',
|
displayMsg: _('ID_GRID_PAGE_DISPLAYING_ROLES_MESSAGE') + ' ',
|
||||||
emptyMsg: "No Input Document to display",
|
emptyMsg: _('ID_GRID_PAGE_NO_ROLES_MESSAGE'),
|
||||||
items: []
|
items: []
|
||||||
}),
|
});
|
||||||
viewConfig: {forceFit: true}
|
|
||||||
|
expander = new Ext.ux.grid.RowExpander({
|
||||||
|
tpl : new Ext.Template("<p><b>"+TRANSLATIONS.ID_DESCRIPTION+":</b> {INP_DOC_DESCRIPTION} </p>")
|
||||||
|
});
|
||||||
|
|
||||||
|
inputDocColumns = new Ext.grid.ColumnModel({
|
||||||
|
defaults: {
|
||||||
|
editable: false,
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
expander,
|
||||||
|
{id: 'INP_DOC_UID', dataIndex: 'INP_DOC_UID', hidden:true, hideable:false},
|
||||||
|
{header: _('ID_TITLE'), dataIndex: 'INP_DOC_TITLE', width: 350},
|
||||||
|
{header: _('ID_VERSIONING'), dataIndex: 'INP_DOC_VERSIONING', width: 100, renderer: render_version},
|
||||||
|
{header: _('ID_DESTINATION_PATH'), dataIndex: 'INP_DOC_DESTINATION_PATH', width: 150},
|
||||||
|
{header: _('ID_TASK'), dataIndex: 'INP_DOC_TASKS', width: 100, align: 'center'}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
inputDocGrid = new Ext.grid.GridPanel({
|
||||||
|
store: inputDocStore,
|
||||||
|
cm: inputDocColumns,
|
||||||
|
sm: smodel,
|
||||||
|
id: 'inputdocGrid',
|
||||||
|
loadMask: true,
|
||||||
|
frame: false,
|
||||||
|
autoWidth: true,
|
||||||
|
clicksToEdit: 1,
|
||||||
|
height:100,
|
||||||
|
layout: 'fit',
|
||||||
|
plugins: expander,
|
||||||
|
stripeRows: true,
|
||||||
|
tbar: [newButton, '-', editButton, deleteButton],
|
||||||
|
bbar: bbarpaging,
|
||||||
|
viewConfig: {forceFit: true},
|
||||||
|
view: new Ext.grid.GroupingView({
|
||||||
|
forceFit:true,
|
||||||
|
groupTextTpl: '{text}'
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
//connecting context menu to grid
|
//connecting context menu to grid
|
||||||
@@ -1760,57 +1679,40 @@ var inputDocColumns = new Ext.grid.ColumnModel({
|
|||||||
function onInputDocContextMenu(grid, rowIndex, e) {
|
function onInputDocContextMenu(grid, rowIndex, e) {
|
||||||
e.stopEvent();
|
e.stopEvent();
|
||||||
var coords = e.getXY();
|
var coords = e.getXY();
|
||||||
dynaformsContextMenu.showAt([coords[0], coords[1]]);
|
idocsContextMenu.showAt([coords[0], coords[1]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var dynaformsContextMenu = new Ext.menu.Menu({
|
inputDocGrid.store.load();
|
||||||
id: 'messageContextMenu',
|
|
||||||
items: [{
|
|
||||||
text: _('ID_EDIT'),
|
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
|
||||||
handler: editInputDoc
|
|
||||||
},{
|
|
||||||
text: _('ID_DELETE'),
|
|
||||||
icon: '/images/delete.png',
|
|
||||||
handler: removeInputDoc
|
|
||||||
},{
|
|
||||||
text: _('ID_UID'),
|
|
||||||
handler: function(){
|
|
||||||
var rowSelected = Ext.getCmp('inputdocGrid').getSelectionModel().getSelected();
|
|
||||||
workflow.createUIDButton(rowSelected.data.INP_DOC_UID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
var gridWindow = new Ext.Window({
|
gridWindow = new Ext.Window({
|
||||||
title: _('ID_REQUEST_DOCUMENTS'),
|
title: _('ID_REQUEST_DOCUMENTS'),
|
||||||
width: 550,
|
width: 600,
|
||||||
height: 350,
|
height: 350,
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
minHeight: 350,
|
minHeight: 350,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
plain: true,
|
plain: true,
|
||||||
items: inputDocGrid,
|
items: inputDocGrid,
|
||||||
autoScroll: true
|
autoScroll: true,
|
||||||
|
modal: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var newIOWindow = new Ext.Window({
|
newIDocWindow = new Ext.Window({
|
||||||
title: _('ID_NEW_INPUTDOCS'),
|
title: _('ID_NEW_INPUTDOCS'),
|
||||||
width: 550,
|
width: 550,
|
||||||
height: 410,
|
id: 'frmNewInputDoc',
|
||||||
minWidth: 200,
|
autoHeight: true,
|
||||||
minHeight: 405,
|
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
|
closable: false,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
plain: true,
|
plain: true,
|
||||||
|
modal: true,
|
||||||
items: inputDocForm
|
items: inputDocForm
|
||||||
});
|
});
|
||||||
|
|
||||||
gridWindow.show();
|
gridWindow.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ProcessOptions.prototype.addOutputDoc= function(_5625)
|
ProcessOptions.prototype.addOutputDoc= function(_5625)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user