From 36b3236415b856ddd0ad2804e82e410b5240ff4f Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 16 Jun 2012 01:26:30 +0000 Subject: fix the cancel button for editing cards The javascript was checking for the parameters assuming the backend provided version information. The community edition backend does not supply any versioning information so the javascript checks both locations --- (limited to 'frontend') diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Record.js b/frontend/beta/js/Clipperz/PM/DataModel/Record.js index ffb45de..9e496de 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/Record.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/Record.js @@ -292,8 +292,14 @@ console.log("Record.processData", someValues); this.setCurrentVersionKey(this.key()); } -// currentVersionParameters = someValues['currentVersion']; - currentVersionParameters = someValues['versions'][someValues['currentVersion']]; +// community edition doesn't currently pass version +// information + if (someValues['versions'] == null) { + currentVersionParameters = someValues['currentVersion']; + } else { + currentVersionParameters = someValues['versions'][someValues['currentVersion']]; + } + console.log("Record.processData - this.currentVersionKey()", this.currentVersionKey()); console.log("Record.processData - currentVersionParameters", currentVersionParameters); currentVersionParameters['key'] = this.currentVersionKey(); -- cgit v0.9.0.2