var workflow = {}; var ProcessOptions = function(id){ //Workflow.call(this,id); }; //ProcessOptions.prototype=new Workflow; //ProcessOptions.prototype.type="ProcessOptions"; /** * 'addDynaform' function that will allow adding new dynaforms and showing list of * dynaforms available */ ProcessOptions.prototype.addDynaform= function(_5625) { var dynaFields = Ext.data.Record.create([ {name: 'DYN_UID'}, {name: 'DYN_TYPE'}, {name: 'DYN_TITLE'}, {name: 'DYN_DESCRIPTION'}, {name: 'TAS_EDIT'}, {name: 'TAS_VIEW'}, {name: 'ACTION'} ]); var editor = new Ext.ux.grid.RowEditor({ saveText: 'Update' }); var btnAdd = new Ext.Button({ id: 'btnEdit', text: _('ID_NEW'), iconCls: 'button_menu_ext ss_sprite ss_add', //iconCls: 'application_add', handler: function () { dynaformDetails.getForm().reset(); dynaformDetails.getForm().items.items[0].focus('',200); dynaformDetails.getForm().items.items[1].setValue('normal'); formWindow.show(); } }); //edit dynaform Function var editDynaform = function() { var rowSelected = Ext.getCmp('dynaformGrid').getSelectionModel().getSelected(); if( rowSelected ) location.href = '../dynaforms/dynaforms_Editor?PRO_UID='+pro_uid+'&DYN_UID='+rowSelected.data.DYN_UID+'&bpmn=1' else PMExt.error('', _('ID_NO_SELECTION_WARNING')); } var removeDynaform = function() { ids = Array(); editor.stopEditing(); var rowsSelected = Ext.getCmp('dynaformGrid').getSelectionModel().getSelections(); if( rowsSelected.length == 0 ) { PMExt.error('', _('ID_NO_SELECTION_WARNING')); return false; } for(i=0; i"+TRANSLATIONS.ID_DESCRIPTION+": {DYN_DESCRIPTION}

") }); var dynaformColumns = new Ext.grid.ColumnModel({ defaults: { width: 90, sortable: true }, columns: [ expander, { header: _('ID_TITLE_FIELD'), dataIndex: 'DYN_TITLE', width: 280 },{ header: _('ID_TYPE'), dataIndex: 'DYN_TYPE', width: 90 },{ sortable: false, header: _('ID_TAS_EDIT'), dataIndex: 'TAS_EDIT', width: 110 },{ sortable: false, header: _('ID_TAS_VIEW'), dataIndex: 'TAS_VIEW', width: 110 } ] }); var addTableColumns = new Ext.grid.ColumnModel({ columns: [ new Ext.grid.RowNumberer(), { id: 'FLD_NAME', header: _('ID_PRIMARY_KEY'), dataIndex: 'FLD_NAME', width: 200, editable: false, sortable: true, editor: new Ext.form.TextField({ allowBlank: false }) },{ id: 'PRO_VARIABLE', header: _('ID_VARIABLES'), dataIndex: 'PRO_VARIABLE', width: 200, sortable: true, editor: new Ext.form.TextField({ allowBlank: false }) },{ sortable: false, renderer: function(val){return '';} } ] }); var dynaformGrid = new Ext.grid.GridPanel({ store: taskDynaform, id : 'dynaformGrid', loadMask: true, loadingText: 'Loading...', //renderTo: 'cases-grid', frame: false, autoHeight:false, minHeight:400, height :400, width: '', layout: 'fit', cm: dynaformColumns, stateful : true, stateId : 'grid', plugins: expander, stripeRows: true, tbar: tb, bbar: new Ext.PagingToolbar({ pageSize: 10, store: taskDynaform, displayInfo: true, displayMsg: 'Displaying dynaforms {0} - {1} of {2}', emptyMsg: "No users to display", items:[] }), viewConfig: {forceFit: true} }); //connecting context menu to grid dynaformGrid.addListener('rowcontextmenu', onDynaformsContextMenu,this); //by default the right click is not selecting the grid row over the mouse //we need to set this four lines dynaformGrid.on('rowcontextmenu', function (grid, rowIndex, evt) { var sm = grid.getSelectionModel(); sm.selectRow(rowIndex, sm.isSelected(rowIndex)); }, this); //prevent default dynaformGrid.on('contextmenu', function (evt) { evt.preventDefault(); }, this); function onDynaformsContextMenu(grid, rowIndex, e) { e.stopEvent(); var coords = e.getXY(); dynaformsContextMenu.showAt([coords[0], coords[1]]); } var dynaformsContextMenu = new Ext.menu.Menu({ id: 'messageContextMenu', items: [{ text: _('ID_EDIT'), iconCls: 'button_menu_ext ss_sprite ss_pencil', handler: editDynaform },{ text: _('ID_DELETE'), icon: '/images/delete.png', handler: removeDynaform },{ text: _('ID_UID'), handler: function(){ var rowSelected = Ext.getCmp('dynaformGrid').getSelectionModel().getSelected(); workflow.createUIDButton(rowSelected.data.DYN_UID); } } ] }); var dynaformDetails = new Ext.FormPanel({ labelWidth : 100, buttonAlign : 'center', width : 490, height : 420, bodyStyle : 'padding:10px 0 0 10px;', autoHeight: true, items: [ // { // xtype: 'fieldset', // layout: 'fit', // border:true, // title: _('ID_SELECT_DYNAFORM'), // width: 500, // collapsible: false, // labelAlign: 'top', // items:[{ // xtype: 'radiogroup', // //id: 'dynaformType', // layout: 'fit', // fieldLabel: _('ID_TYPE'), // itemCls: 'x-check-group-alt', // columns: 1, // items: [ // { // boxLabel: _('ID_BLANK_DYNAFORM'), // name: 'DYN_SOURCE', // inputValue: 'blankDyna', // checked: true // }, // { // boxLabel: _('ID_PM_DYNAFORM'), // name: 'DYN_SOURCE', // inputValue: 'pmTableDyna' // }], // listeners: { // change: function(radiogroup, radio) { // if(radio.inputValue == 'blankDyna') // { // Ext.getCmp("blankDynaform").show(); // var f = form.findField('yourField'); // f.container.up('div.x-form-item').hide(); // } // else // { // Ext.getCmp("blankDynaform").hide(); // Ext.getCmp("pmTableDynaform").show(); // } // } // } // }] // }, { xtype: 'fieldset', id: 'blankDynaform', border:true, hidden: false, title: _('ID_DYNAFORM_INFORMATION'), width: 500, items:[{ xtype : 'textfield', fieldLabel: _('ID_TITLE'), name : 'DYN_TITLE1', width : 350, allowBlank: false },{ width : 350, xtype : 'combo', allowBlank : false, mode : 'local', editable : false, fieldLabel : _('ID_TYPE'), triggerAction : 'all', forceSelection : true, name : 'DYN_TYPE', valueField : 'value', displayField : 'name', value : 'normal', store : new Ext.data.JsonStore({ fields : ['value', 'name'], data : [ {value: 'normal', name : _('ID_NORMAL')}, {value: 'grid', name : _('ID_GRID')}, ] }) },{ xtype : 'textarea', fieldLabel: _('ID_DESCRIPTION'), name : 'DYN_DESCRIPTION1', height : 120, width : 350 } ] } // ,{ // xtype: 'fieldset', // id: 'pmTableDynaform', // border:true, // hidden: true, // title: 'Dynaform Information', // width: 500, // items:[{ // width: 350, // xtype: 'combo', // mode: 'local', // editable: true, // triggerAction: 'all', // forceSelection: true, // fieldLabel: _('ID_CREATE_PM_TABLE'), // emptyText : 'Select Table', // displayField: 'ADD_TAB_NAME', // valueField: 'ADD_TAB_UID', // value : '---------------------------', // store : additionalTables, // onSelect: function(record, index){ // var link = 'proxyExtjs?tabId='+record.data.ADD_TAB_UID+'&action=getPMTableDynaform'; // tablesFieldsStore.proxy.setUrl(link, true); // tablesFieldsStore.load(); // // Ext.getCmp("fieldsGrid").show(); // Ext.getCmp("pmTable").setValue(record.data.ADD_TAB_UID); // // this.setValue(record.data[this.valueField || this.displayField]); // this.collapse(); // } // },{ // xtype:'hidden',//<--hidden field // name:'ADD_TABLE', // id :'pmTable' // }, // { // xtype : 'textfield', // fieldLabel: _('ID_TITLE'), // name : 'DYN_TITLE2', // allowBlank: false, // width : 350 // },{ // xtype : 'textarea', // fieldLabel: _('ID_DESCRIPTION'), // name : 'DYN_DESCRIPTION2', // height : 120, // width : 350 // }, // { // xtype: 'grid', // id:'fieldsGrid', // hidden: true, // store: tablesFieldsStore, // cm: addTableColumns, // width: 500, // //height: 300, // autoHeight: true, // clicksToEdit: 1, // plugins: [editor], // //loadMask : true, // loadingText : 'Loading...', // border: false // //renderTo : Ext.getBody() // } // ] // } ], buttons: [{ text: _('ID_SAVE'), handler: function(){ var getForm = dynaformDetails.getForm().getValues(); //var sDynaformType = getForm.DYN_TYPE; var sDynaformType = dynaformDetails.getForm().items.items[1].getValue(); if ( sDynaformType == 'normal' || sDynaformType == '' ) sDynaformType = 'xmlform'; else sDynaformType = 'grid'; // if ( getForm.DYN_SOURCE == 'blankDyna') // { var sTitle = getForm.DYN_TITLE1; var sDesc = getForm.DYN_DESCRIPTION1; // } // else // { // var sAddTab = getForm.ADD_TABLE; // var aStoreFields = tablesFieldsStore.data.items; // var fName = new Array(); // var pVar = new Array(); // for(var i=0;i"+TRANSLATIONS.ID_DESCRIPTION+": {DBS_DESCRIPTION}

" ) }); var dbGridColumn = new Ext.grid.ColumnModel({ columns: [ expander, { id: 'DBS_TYPE', header: _('ID_TYPE'), dataIndex: 'DBS_TYPE', //width: 100, editable: false, sortable: true, editor: new Ext.form.TextField({ //allowBlank: false }) },{ id: 'DBS_SERVER', header: _('ID_SERVER'), dataIndex: 'DBS_SERVER', //width: 100, sortable: true, editor: new Ext.form.TextField({ //allowBlank: false }) },{ id: 'DBS_DATABASE_NAME', header: _('ID_DATABASE_NAME'), dataIndex: 'DBS_DATABASE_NAME', width: 150, sortable: true, editor: new Ext.form.TextField({ // allowBlank: false }) },{ id: 'DBS_DESCRIPTION', header: _('ID_DESCRIPTION'), dataIndex: 'DBS_DESCRIPTION', width: 100, sortable: true, editor: new Ext.form.TextField({ }) } ] }); var dbGrid = new Ext.grid.GridPanel({ store: dbStore, id : 'dbConnGrid', loadMask: true, loadingText: 'Loading...', //renderTo: 'cases-grid', frame: false, autoHeight:false, clicksToEdit: 1, width:480, minHeight:400, height :380, layout: 'fit', cm: dbGridColumn, plugins: expander, stripeRows: true, tbar: tb, bbar: new Ext.PagingToolbar({ pageSize: 10, store: dbStore, displayInfo: true, displayMsg: 'Displaying DB Connection {0} - {1} of {2}', emptyMsg: "No DB Connection to display", items:[] }), viewConfig: {forceFit: true} }); //connecting context menu to grid dbGrid.addListener('rowcontextmenu', ondbGridContextMenu,this); //by default the right click is not selecting the grid row over the mouse //we need to set this four lines dbGrid.on('rowcontextmenu', function (grid, rowIndex, evt) { var sm = grid.getSelectionModel(); sm.selectRow(rowIndex, sm.isSelected(rowIndex)); }, this); //prevent default dbGrid.on('contextmenu', function (evt) { evt.preventDefault(); }, this); function ondbGridContextMenu(grid, rowIndex, e) { e.stopEvent(); var coords = e.getXY(); dbGridContextMenu.showAt([coords[0], coords[1]]); } var dbGridContextMenu = new Ext.menu.Menu({ id: 'messageContextMenu', items: [{ text: _('ID_EDIT'), iconCls: 'button_menu_ext ss_sprite ss_pencil', handler: editDBConn },{ text: _('ID_DELETE'), icon: '/images/delete.png', handler: removeDBConn },{ text: _('ID_UID'), handler: function(){ var rowSelected = Ext.getCmp('dbConnGrid').getSelectionModel().getSelected(); workflow.createUIDButton(rowSelected.data.DBS_UID); } } ] }); var dbconnForm =new Ext.FormPanel({ // title:"Add new Database Source", collapsible: false, maximizable: true, //allowBlank:false, width:400, frame:false, autoDestroy : true, monitorValid : true, plain: true, bodyStyle : 'padding:10px 0 0 10px;', buttonAlign: 'center', items:[{ xtype: 'combo', width: 200, mode: 'local', editable: false, fieldLabel: _('ID_ENGINE'), triggerAction: 'all', forceSelection: true, name: 'DBS_TYPE', displayField: 'name', emptyText : 'Select Format', valueField : 'value', allowBlank: false, //value : 'Select', store: new Ext.data.JsonStore({ fields : ['name', 'value'], data : [ {name : 'Select', value: 'select'}, {name : 'MySql', value: 'MySql'}, {name : 'PostGreSql', value: 'PostGreSql'}, {name : 'Microsoft SQL server', value: 'Microsoft SQL server'} ]}), onSelect: function(record, index) { //Show-Hide Format Type Field if(record.data.value == 'MySql') { Ext.getCmp("encode").show(); Ext.getCmp("postgre").hide(); dbconnForm.getForm().findField('DBS_PORT').setValue('3306'); } else if(record.data.value == 'PostGreSql') { Ext.getCmp("postgre").show(); Ext.getCmp("encode").hide(); dbconnForm.getForm().findField('DBS_PORT').setValue('5432'); } else { Ext.getCmp("sqlserver").show(); Ext.getCmp("postgre").hide(); dbconnForm.getForm().findField('DBS_PORT').setValue('1433'); } this.setValue(record.data[this.valueField || this.displayField]); this.collapse(); } },{ xtype: 'fieldset', id: 'encode', border:false, hidden: true, items: [{ xtype: 'combo', width: 220, mode: 'local', // hidden: true, editable: false, fieldLabel: _('ID_ENCODE'), triggerAction: 'all', forceSelection: true, //dataIndex : 'ENGINE', displayField: 'value', valueField: 'name', name: 'DBS_ENCODE', store: new Ext.data.JsonStore({ fields : ['name', 'value'], data : [ {name:'armscii8', value:'armscii8 - ARMSCII-8 Armenian'}, {name:'ascii', value:'ascii - US ASCII'}, {name:'big5', value:'big5 - Big5 Traditional Chinese'}, {name:'binary', value: 'binary - Binary pseudo charset'}, {name:'cp850', value:'cp850 - DOS West European'}, {name:'cp852', value: 'cp852 - DOS Central European'}, {name:'cp866', value:'cp866 - DOS Russian'}, {name:'cp932', value: 'cp932] - SJIS for Windows Japanese'}, {name:'cp1250', value: 'cp1250 - Windows Central European'}, {name:'cp1251', value: 'cp1251 - Windows Cyrillic'}, {name:'cp1256', value: 'cp1256 - Windows Arabic'}, {name:'cp1257', value: 'cp1257 - Windows Baltic'}, {name:'dec8', value:'dec8 - DEC West European'}, {name:'eucjpms', value: 'eucjpms - UJIS for Windows Japanese'}, {name:'euckr', value: 'euckr - EUC-KR Korean'}, {name:'gb2312', value: 'gb2312 - GB2312 Simplified Chinese'}, {name:'gbk', value: 'gbk - GBK Simplified Chinese'}, {name:'geostd8', value: 'geostd8 - GEOSTD8 Georgian'}, {name:'greek', value: 'greek - ISO 8859-7 Greek'}, {name:'hebrew', value: 'hebrew - ISO 8859-8 Hebrew'}, {name:'hp8', value: 'hp8 - HP West European'}, {name:'keybcs2', value: 'keybcs2 - DOS Kamenicky Czech-Slovak'}, {name:'koi8r', value:'koi8r - KOI8-R Relcom Russian'}, {name:'koi8u', value: 'koi8u - KOI8-U Ukrainian'}, {name:'latin1', value:'latin1 - cp1252 West European'}, {name:'latin2', value:'latin2 - ISO 8859-2 Central European'}, {name:'latin5', value:'latin5 - ISO 8859-9 Turkish'}, {name:'latin7', value: 'atin7 - ISO 8859-13 Baltic'}, {name:'macce', value: 'macce - Mac Central European'}, {name:'macroman', value:'macroman - Mac West European'}, {name:'sjis', value:'sjis - Shift-JIS Japanese'}, {name:'swe7', value:'swe7 - 7bit Swedish'}, {name:'tis620', value: 'tis620 - TIS620 Thai'}, {name:'ucs2', value:'ucs2 - UCS-2 Unicode'}, {name:'ujis', value:'ujis - EUC-JP Japanese'}, {name:'utf8', value:'utf8 - UTF-8 Unicode'} ]}), onSelect: function(record, index){ dbconnForm.getForm().findField('DBS_ENCODE').setValue(record.data.value); this.setValue(record.data[this.valueField || this.displayField]); this.collapse(); } }] },{ xtype: 'fieldset', id: 'postgre', border:false, hidden: true, items:[{ xtype: 'combo', width: 220, mode: 'local', // hidden: true, editable:false, fieldLabel:_('ID_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:"EUC_CN", value:"EUC_CN"}, {name:"EUC_JP", value:"EUC_JP"}, {name:"EUC_KR", value:"EUC_KR"}, {name:"EUC_TW", value:"EUC_TW"}, {name:"GB18030", value:"GB18030"}, {name:"GBK", value:"GBK"}, {name:"ISO_8859_5", value:"ISO_8859_5"}, {name:"ISO_8859_6", value:"ISO_8859_6"}, {name:"ISO_8859_7", value:"ISO_8859_7"}, {name:"ISO_8859_8", value: "ISO_8859_8"}, {name:"JOHAB", value:"JOHAB"}, {name:"KOI8", value: "KOI8"}, {name:"selected", value: "LATIN1"}, {name:"LATIN2", value:"LATIN2"}, {name:"LATIN3", value:"LATIN3"}, {name:"LATIN4", value: "LATIN4"}, {name:"LATIN5", value:"LATIN5"}, {name:"LATIN6", value: "LATIN6"}, {name:"LATIN7", value:"LATIN7"}, {name:"LATIN8", value:"LATIN8"}, {name:"LATIN9", value:"LATIN9"}, {name:"LATIN10", value:"LATIN10"}, {name:"SJIS", value:"SJIS"}, {name:"SQL_ASCII", value:"SQL_ASCII"}, {name:"UHC", value: "UHC"}, {name:"UTF8", value: "UTF8"}, {name:"WIN866", value: "WIN866"}, {name:"WIN874", value:"WIN874"}, {name:"WIN1250", value:"WIN1250"}, {name:"WIN1251", value:"WIN1251"}, {name:"WIN1252", value:"WIN1252"}, {name:"WIN1256", value:"WIN1256"}, {name:"WIN1258", value:"WIN1258"} ]}), onSelect: function(record, index){ dbconnForm.getForm().findField('DBS_ENCODE').setValue(record.data.value); this.setValue(record.data[this.valueField || this.displayField]); this.collapse(); } }] },{ xtype: 'fieldset', id: 'sqlserver', border:false, hidden: true, items:[{ xtype: 'combo', width: 220, mode: 'local', editable: false, fieldLabel: _('ID_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'} ]}), onSelect: function(record, index){ dbconnForm.getForm().findField('DBS_ENCODE').setValue(record.data.value); this.setValue(record.data[this.valueField || this.displayField]); this.collapse(); } }] },{ xtype: 'textfield', fieldLabel: _('ID_SERVER'), name: 'DBS_SERVER', width: 200, allowBlank: false },{ xtype: 'textfield', fieldLabel: _('ID_DATABASE_NAME'), name: 'DBS_DATABASE_NAME', width: 200, allowBlank: false },{ xtype: 'textfield', fieldLabel: _('ID_USERNAME'), name: 'DBS_USERNAME', width: 200, allowBlank: false },{ xtype: 'textfield', fieldLabel: _('ID_CACHE_PASSWORD'), inputType:'password', width: 200, name: 'DBS_PASSWORD', allowBlank: true },{ xtype: 'textfield', fieldLabel: _('ID_PORT'), name: 'DBS_PORT', width: 200, //id:'port', //allowBlank: false, editable:false },{ xtype: 'textarea', fieldLabel: _('ID_DESCRIPTION'), name: 'DBS_DESCRIPTION', allowBlank: true, width: 220, height:100 },{ id : 'DBS_UID', xtype: 'hidden', name : 'DBS_UID' },{ id : 'DBS_ENCODE', xtype: 'hidden', name : 'DBS_ENCODE' }], buttons: [{text:_('ID_TEST_CONNECTION'), id: 'test', //formbind: true, handler: function(){ // testConnWindow.show(); } },{ text: _('ID_SAVE'), formBind :true, handler: function(){ var getForm = dbconnForm.getForm().getValues(); var dbConnUID = getForm.DBS_UID; var Type = getForm.DBS_TYPE; var Server = getForm.DBS_SERVER; var DatabaseName = getForm.DBS_DATABASE_NAME; var Username = getForm.DBS_USERNAME; var Password = getForm.DBS_PASSWORD; var Port = getForm.DBS_PORT; var Description = getForm.DBS_DESCRIPTION; var encode = getForm.DBS_ENCODE; if(dbConnUID=='') { 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, PROCESS :pro_uid, enc :encode, action :'saveConnection' }, success: function(response) { PMExt.notify( _('ID_STATUS') , _('ID_DBS_CONNECTION_SAVE') ); } }); } 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, PROCESS :pro_uid, desc :Description, enc :encode, action :'saveEditConnection' }, success: function(response) { PMExt.notify( _('ID_STATUS') , _('ID_DBS_CONNECTION_EDIT') ); } }); } formWindow.hide(); dbStore.reload(); } },{ text: _('ID_CANCEL'), handler: function(){ // when this button clicked, formWindow.hide(); } }] }) var formWindow = new Ext.Window({ title: _('ID_DBS_SOURCE'), collapsible: false, maximizable: true, width: 400, //autoHeight: true, //height: 400, //layout: 'fit', plain: true, buttonAlign: 'center', items: dbconnForm }); var gridWindow = new Ext.Window({ title: _('ID_DBS_LIST'), collapsible: false, maximizable: true, width: 480, //autoHeight: true, height: 350, //layout: 'fit', plain: true, buttonAlign: 'center', items: dbGrid }); gridWindow.show(); } */ ProcessOptions.prototype.addInputDoc= function(_5625) { var inpDocFields = Ext.data.Record.create([ { 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' } ]); var editor = new Ext.ux.grid.RowEditor({ saveText: _('ID_UPDATE') }); var btnAdd = new Ext.Button({ id : 'btnAdd', text : _('ID_NEW'), iconCls: 'button_menu_ext ss_sprite ss_add', handler: function () { newIOWindow.show(); inputDocForm.getForm().reset(); inputDocForm.getForm().items.items[2].hide(); inputDocForm.getForm().items.items[2].getEl().up('.x-form-item').setDisplayed(false); // show label inputDocForm.getForm().items.items[0].focus('',200); } }); //edit input document Function var editInputDoc = function() { editor.stopEditing(); var rowSelected = Ext.getCmp('inputdocGrid').getSelectionModel().getSelections(); if( rowSelected.length == 0 ) { PMExt.error('', _('ID_NO_SELECTION_WARNING')); return false; } var inputDocUID = rowSelected[0].get('INP_DOC_UID'); inputDocForm.form.load({ url : '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) { 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