/** * Handle PMtables Data * @author Erik A. O. */ var newButton; var editButton; var deleteButton; var importButton; var backButton; var store; var cmodel; var smodel; var infoGrid; var _fields; var isReport; Ext.onReady(function(){ pageSize = 20; //parseInt(CONFIG.pageSize); isReport = tableDef.PRO_UID ? true : false; newButton = new Ext.Action({ text : _('ID_ADD_ROW'), iconCls : 'button_menu_ext ss_sprite ss_add', handler : NewPMTableRow, disabled: (isReport ? true : false) }); editButton = new Ext.Action({ text : _('ID_EDIT'), iconCls : 'button_menu_ext ss_sprite ss_pencil', handler : EditPMTableRow, disabled : true }); deleteButton = new Ext.Action({ text : _('ID_DELETE'), iconCls : 'button_menu_ext ss_sprite ss_delete', handler : DeletePMTableRow, disabled : true }); importButton = new Ext.Action({ text : _('ID_IMPORT_CSV'), iconCls : 'silk-add', icon : '/images/import.gif', handler : ImportPMTableCSV }); exportButton = new Ext.Action({ text : _('ID_EXPORT_CSV'), iconCls : 'silk-add', icon : '/images/export.png', handler : ExportPMTableCSV }); genDataReportButton = new Ext.Action({ text: 'Regenerate Data Report', iconCls: 'silk-add', icon: '/images/database-tool.png', handler: genDataReport, disabled: false }); backButton = new Ext.Action({ text : _('ID_BACK'), icon : '/images/back-icon.png', handler : BackPMList }); contextMenu = new Ext.menu.Menu({ items : [ editButton, deleteButton ] }); //This loop loads columns and fields to store and column model _columns = new Array(); _fields = new Array(); _idProperty = '__index__'; //default generated id _columns.push({ id : _idProperty, hidden : true }); _fields.push({name: _idProperty}); for (i=0;i0){ var c = 0; for(var i=0; i