BUG 0000 PM TABLES - importing issue

- fixed the problem when multiples tables are selected to import
This commit is contained in:
Erik Amaru Ortiz
2011-07-21 18:35:37 -04:00
parent 5ce13dcfc7
commit 65b5a2cc1d
6 changed files with 422 additions and 211 deletions

View File

@@ -114,7 +114,16 @@ Ext.onReady(function(){
//row editor for table columns grid
editor = new Ext.ux.grid.RowEditor({
saveText: _("ID_UPDATE")
saveText: _("ID_UPDATE"),
listeners: {
afteredit: {
fn:function(rowEditor, obj, data, rowIndex ){
if (data.phantom === true) {
store.reload(); // only if it is an insert
}
}
}
}
});
var proxy = new Ext.data.HttpProxy({
@@ -142,16 +151,16 @@ Ext.onReady(function(){
totalProperty: 'count'
})
store = new Ext.data.GroupingStore({
store = new Ext.data.Store({
proxy : proxy,
reader : reader,
writer : writer, // <-- plug a DataWriter into the store just as you would a Reader
autoSave: true // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
});
Ext.data.DataProxy.addListener('write', function(proxy, action, result, res, rs) {
/*Ext.data.DataProxy.addListener('write', function(proxy, action, result, res, rs) {
PMExt.notify('UPDATE', 'the record was updated successfully.');
});
});*/
// load the store immeditately
//store.load();
@@ -225,16 +234,12 @@ Ext.onReady(function(){
sm: smodel,
tbar:[newButton,'-',editButton, deleteButton,'-',importButton,{xtype: 'tbfill' }, backButton],
bbar: bbarpaging,
listeners: {
/*listeners: {
//rowdblclick: EditPMTableRow,
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING_GRID')});
}
},
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{text}'
})
},*/
});
infoGrid.on('rowcontextmenu',