summaryrefslogtreecommitdiff
path: root/frontend
authorJosh <jokajak@gmail.com>2012-06-16 01:26:30 (UTC)
committer Josh <jokajak@gmail.com>2012-06-16 01:26:30 (UTC)
commit36b3236415b856ddd0ad2804e82e410b5240ff4f (patch) (side-by-side diff)
treef2efea0a967f890ce9235871fd26a96515596bc4 /frontend
parent36ff1deefcbbd24aceca97eb39a13f9da4af8ff5 (diff)
downloadclipperz-36b3236415b856ddd0ad2804e82e410b5240ff4f.zip
clipperz-36b3236415b856ddd0ad2804e82e410b5240ff4f.tar.gz
clipperz-36b3236415b856ddd0ad2804e82e410b5240ff4f.tar.bz2
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
Diffstat (limited to 'frontend') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Record.js10
1 files changed, 8 insertions, 2 deletions
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();