netzke-basepack 0.3.3 → 0.3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +3 -0
- data/lib/netzke/grid_panel_extras/js_builder.rb +3 -3
- data/netzke-basepack.gemspec +1 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -162,7 +162,7 @@ module Netzke
|
|
162
162
|
}, this);
|
163
163
|
|
164
164
|
var r = new this.Row(rowConfig); // TODO: add default values
|
165
|
-
r.
|
165
|
+
r.is_new = true; // to distinguish new records
|
166
166
|
r.set('id', r.id); // otherwise later r.get('id') returns empty string
|
167
167
|
this.stopEditing();
|
168
168
|
this.store.add(r);
|
@@ -235,7 +235,7 @@ module Netzke
|
|
235
235
|
|
236
236
|
Ext.each(this.store.getModifiedRecords(),
|
237
237
|
function(r) {
|
238
|
-
if (r.
|
238
|
+
if (r.is_new) {
|
239
239
|
newRecords.push(Ext.apply(r.getChanges(), {id:r.get('id')}));
|
240
240
|
} else {
|
241
241
|
updatedRecords.push(Ext.apply(r.getChanges(), {id:r.get('id')}));
|
@@ -257,7 +257,7 @@ module Netzke
|
|
257
257
|
// commit those rows that have successfully been updated/created
|
258
258
|
var modRecords = [].concat(this.store.getModifiedRecords()) // there must be a better way to clone an array...
|
259
259
|
Ext.each(modRecords, function(r){
|
260
|
-
var idsToSearch = r.
|
260
|
+
var idsToSearch = r.is_new ? m.modRecordIds.create : m.modRecordIds.update
|
261
261
|
if (idsToSearch.indexOf(r.id) >= 0) r.commit();
|
262
262
|
})
|
263
263
|
|
data/netzke-basepack.gemspec
CHANGED