-rw-r--r-- | frontend/beta/js/Clipperz/PM/DataModel/User.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/User.js b/frontend/beta/js/Clipperz/PM/DataModel/User.js index b065557..b29d224 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/User.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/User.js @@ -309,9 +309,14 @@ MochiKit.Logging.logDebug("--- User.saveRecords - 1"); }); MochiKit.Logging.logDebug("--- User.saveRecords - 2"); */ - result = {'records': []}; + result = { + 'records': { +// 'deleted': [], + 'updated': [] + } + }; deferredResult = new MochiKit.Async.Deferred(); c = someRecords.length; for (i=0; i<c; i++) { @@ -366,9 +371,9 @@ MochiKit.Logging.logDebug("--- User.saveRecords - 2"); }, recordData); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.7 " + res); return res;}); deferredResult.addCallback(function(aResult, res) { - aResult['records'] = { 'updated': [res] }; + aResult['records']['updated'].push(res); return aResult; }, result); //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.8 " + res); return res;}); } |