summaryrefslogtreecommitdiff
path: root/frontend/beta/js/Clipperz/PM/DataModel/Record.js
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-23 17:36:57 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-23 17:36:57 (UTC)
commit67455b069c4c9ec493f9cef76017e172a430a7d4 (patch) (unidiff)
tree0b287debfeeb0819b3df9dd02860cd84103e25b3 /frontend/beta/js/Clipperz/PM/DataModel/Record.js
parentb312e037ebba7c94abea9661bcf62c52b7d73fbf (diff)
downloadclipperz-67455b069c4c9ec493f9cef76017e172a430a7d4.zip
clipperz-67455b069c4c9ec493f9cef76017e172a430a7d4.tar.gz
clipperz-67455b069c4c9ec493f9cef76017e172a430a7d4.tar.bz2
Integration of PHP backend with /beta and /gamma front ends
Fixed PHP backend and /beta code to handle request and data format compatible with /gamma. At the moment adding/deleting/editing records seem to work fine.
Diffstat (limited to 'frontend/beta/js/Clipperz/PM/DataModel/Record.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Record.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Record.js b/frontend/beta/js/Clipperz/PM/DataModel/Record.js
index 270f2ae..ffb45de 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Record.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Record.js
@@ -276,24 +276,29 @@ Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, {
276 'processData': function(someValues) { 276 'processData': function(someValues) {
277//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData"); 277//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData");
278//MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues)); 278//MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues));
279 if (this.shouldProcessData()) { 279 if (this.shouldProcessData()) {
280 var currentVersionParameters; 280 var currentVersionParameters;
281 281
282console.log("Record.processData", someValues);
282 this.processDataToExtractLegacyValues(someValues['data']); 283 this.processDataToExtractLegacyValues(someValues['data']);
283 284
284 if (typeof(someValues['data']['notes']) != 'undefined') { 285 if (typeof(someValues['data']['notes']) != 'undefined') {
285 this.setNotes(someValues['data']['notes']); 286 this.setNotes(someValues['data']['notes']);
286 } 287 }
288
287 if (someValues['data']['currentVersionKey'] != null) { 289 if (someValues['data']['currentVersionKey'] != null) {
288 this.setCurrentVersionKey(someValues['data']['currentVersionKey']); 290 this.setCurrentVersionKey(someValues['data']['currentVersionKey']);
289 } else { 291 } else {
290 this.setCurrentVersionKey(this.key()); 292 this.setCurrentVersionKey(this.key());
291 } 293 }
292 294
293 currentVersionParameters = someValues['currentVersion']; 295 // currentVersionParameters = someValues['currentVersion'];
296 currentVersionParameters = someValues['versions'][someValues['currentVersion']];
297console.log("Record.processData - this.currentVersionKey()", this.currentVersionKey());
298console.log("Record.processData - currentVersionParameters", currentVersionParameters);
294 currentVersionParameters['key'] = this.currentVersionKey(); 299 currentVersionParameters['key'] = this.currentVersionKey();
295 this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters)); 300 this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters));
296 301
297 if (someValues['data']['directLogins'] != null) { 302 if (someValues['data']['directLogins'] != null) {
298 vardirectLoginReference; 303 vardirectLoginReference;
299 304