From 909d310e2fc715fad1bad3aa6e2b37818f247e95 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 26 Jun 2013 11:07:18 -0700 Subject: [PATCH] Prettier JSON claims from web UI. Fixes https://code.google.com/p/camlistore/issues/detail?id=162 Change-Id: I0a154c267665d189d43b0742047a8229bf627e65 --- server/camlistored/ui/server_connection.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/camlistored/ui/server_connection.js b/server/camlistored/ui/server_connection.js index 8eebbedb8..02b1f632b 100644 --- a/server/camlistored/ui/server_connection.js +++ b/server/camlistored/ui/server_connection.js @@ -342,7 +342,14 @@ function(clearObj, success, opt_fail) { } clearObj.camliSigner = sigConf.publicKeyBlobRef; - clearText = JSON.stringify(clearObj); + var camVersion = clearObj.camliVersion; + if (camVersion) { + delete clearObj.camliVersion; + } + var clearText = JSON.stringify(clearObj, null, " "); + if (camVersion) { + clearText = "{\"camliVersion\":" + camVersion + ",\n" + clearText.substr("{\n".length); + } this.sendXhr_( sigConf.signHandler,