lib/netzke/basepack/grid/javascripts/event_handling.js in netzke-basepack-0.10.0.rc2 vs lib/netzke/basepack/grid/javascripts/event_handling.js in netzke-basepack-0.10.0
- old
+ new
@@ -9,31 +9,23 @@
r.isNew = true; // to distinguish new records
this.getStore().add(r);
- this.tryStartEditing(r);
+ this.netzkeTryStartEditing(r);
}
},
onDel: function() {
Ext.Msg.confirm(this.i18n.confirmation, this.i18n.areYouSure, function(btn){
if (btn == 'yes') {
- var ids = [];
+ var ids = [], records = [];
this.getSelectionModel().selected.each(function(r){
- if (r.isNew) {
- // this record is not know to server - simply remove from store
- this.store.remove(r);
- } else {
- ids.push(r.getId());
- }
+ this.store.remove(r);
}, this);
- if (ids.length > 0){
- this.serverDelete(ids);
- this.getStore().reload();
- }
+ this.store.sync();
}
}, this);
},
onApply: function(){
@@ -80,10 +72,10 @@
// Inline editing of 1 row
onEdit: function(){
var row = this.getSelectionModel().selected.first();
if (row){
- this.tryStartEditing(row);
+ this.netzkeTryStartEditing(row);
}
},
// Not a very clean approach to clean-up. The problem is that this way the advanced search functionality stops being really pluggable. With Ext JS 4 find the way to make it truely so.
onDestroy: function(){