From c91a533e432a3297dfc67049338c97f6c53daba6 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Thu, 4 Mar 2010 21:46:55 +0000 Subject: Futon: use proper document value when constructing input element for inline editing, instead of its HTML rendering, and always create textarea for multiline strings. Closes COUCHDB-671. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@919193 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/futon.browse.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js index 408d34cc..924372cf 100644 --- a/share/www/script/futon.browse.js +++ b/share/www/script/futon.browse.js @@ -1095,10 +1095,11 @@ row.find("td").makeEditable({acceptOnBlur: false, allowEmpty: true, createInput: function(value) { + value = doc[row.data("name")]; var elem = $(this); if (elem.find("dl").length > 0 || elem.find("code").is(".array, .object") || - elem.find("code.string").text().length > 60) { + typeof(value) == "string" && (value.length > 60 || value.match(/\n/))) { return $(""); } return $(""); -- cgit v1.2.3