var store; var cmodel; var smodel; var infoGrid; var viewport; var cancelButton; var exportButton; var w; Ext.onReady(function(){ Ext.QuickTips.init(); var reader = new Ext.data.ArrayReader({}, [{name: 'action'}]); var comboStore = new Ext.data.Store({ reader: reader, data: Ext.grid.dummyData }); exportButton = new Ext.Action({ text: _('ID_EXPORT'), iconCls: 'silk-add', icon: '/images/export.png', handler: ExportPMTables }); cancelButton = new Ext.Action({ text: _('ID_BACK'), icon: '/images/back-icon.png', handler: CancelExport }); store = new Ext.data.GroupingStore( { proxy : new Ext.data.HttpProxy({ url: '../pmTablesProxy/exportList?id='+EXPORT_TABLES.UID_LIST }), reader : new Ext.data.JsonReader( { root: '', fields : [ {name : 'ADD_TAB_UID'}, {name : 'ADD_TAB_NAME'}, {name : 'ADD_TAB_DESCRIPTION'}, {name : 'CH_SCHEMA'}, {name : 'CH_DATA'} ] }) }); var action_edit = new Ext.form.ComboBox({ typeAhead: true, triggerAction: 'all', mode: 'local', store: comboStore, displayField: 'action', valueField: 'action' }); cmodel = new Ext.grid.ColumnModel({ defaults: { width: 10, sortable: true }, columns: [ new Ext.grid.RowNumberer(), //smodel, {id:'ADD_TAB_UID', dataIndex: 'ADD_TAB_UID', hidden:true, hideable:false}, {header: _('ID_NAME'), dataIndex: 'ADD_TAB_NAME', width: 20, align:'left'}, {header: _('ID_DESCRIPTION'), dataIndex: 'ADD_TAB_DESCRIPTION', width: 50, hidden:false, align:'left'},//, {header: _('ID_SCHEMA'), dataIndex: 'CH_SCHEMA', hidden: false, width: 20, editor: action_edit, align: 'center'}, {header: 'DATA', dataIndex: 'CH_DATA', hidden: false, width: 20, editor: action_edit, align: 'center'} ] }); infoGrid = new Ext.grid.EditorGridPanel({ store: store, cm: cmodel, width: 600, height: 300, title: _('ID_ADDITIONAL_TABLES') + ': ' +_('ID_TITLE_EXPORT_TOOL'), frame: false, clicksToEdit: 1, id: 'infoGrid', sm: new Ext.grid.RowSelectionModel({singleSelect: false}), tbar:[exportButton, {xtype: 'tbfill'} ,cancelButton],//'-', editButton, deleteButton,'-', dataButton,{xtype: 'tbfill'} , importButton, exportButton], view: new Ext.grid.GroupingView({ forceFit:true, groupTextTpl: '{text}' }) }); infoGrid.store.load(); viewport = new Ext.Viewport({ layout: 'fit', autoScroll: false, items: [ infoGrid ] }); }); //Cancels Export View CancelExport = function(){ history.back(); }; //Export Schema/Data from PM Tables ExportPMTables = function(){ iGrid = Ext.getCmp('infoGrid'); var storeExport = iGrid.getStore(); var UIDs = new Array(); var SCHs = new Array(); var DATs = new Array(); for (var r=0; r