summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-07-22 21:41:41 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-07-22 21:41:41 +0000
commitff513dbb4c027ca85f67f4b9f9039efec2ea3dfe (patch)
tree3bc50c5ddec08a24674e0a1d68ac5afd4314860d
parenta7a6c6a7370cf6723011ebd174406df231cf4517 (diff)
Ignore whitespace in reduce code textarea in Futon. Closes COUCHDB-328.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796888 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--THANKS1
-rw-r--r--share/www/script/futon.browse.js6
2 files changed, 4 insertions, 3 deletions
diff --git a/THANKS b/THANKS
index b10bd9ea..d5043e82 100644
--- a/THANKS
+++ b/THANKS
@@ -32,5 +32,6 @@ suggesting improvements or submitting changes. Some of these people are:
* Robert Newson <robert.newson@gmail.com>
* Bob Dionne <dionne@member.fsf.org>
* Mark Hammond <mhammond@skippinet.com.au>
+ * Kevin Ilchmann Jørgensen <kijmail@gmail.com>
For a list of authors see the `AUTHORS` file.
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js
index 4cb3eb6a..e6875948 100644
--- a/share/www/script/futon.browse.js
+++ b/share/www/script/futon.browse.js
@@ -602,8 +602,8 @@
$("#viewcode").show().removeClass("collapsed");
var mapFun = $("#viewcode_map").val();
$.cookies.set(db.name + ".map", mapFun);
- var reduceFun = $("#viewcode_reduce").val() || null;
- if (reduceFun != null) {
+ var reduceFun = $.trim($("#viewcode_reduce").val()) || null;
+ if (reduceFun) {
$.cookies.set(db.name + ".reduce", reduceFun);
options.group = true;
} else {
@@ -618,7 +618,7 @@
} else {
$("#viewcode").show();
var currentMapCode = $("#viewcode_map").val();
- var currentReduceCode = $("#viewcode_reduce").val() || null;
+ var currentReduceCode = $.trim($("#viewcode_reduce").val()) || null;
if (currentReduceCode) {
options.group = true;
}