couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r919193 - /couchdb/trunk/share/www/script/futon.browse.js
Date Thu, 04 Mar 2010 21:46:56 GMT
Author: cmlenz
Date: Thu Mar  4 21:46:55 2010
New Revision: 919193

URL: http://svn.apache.org/viewvc?rev=919193&view=rev
Log:
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.

Modified:
    couchdb/trunk/share/www/script/futon.browse.js

Modified: couchdb/trunk/share/www/script/futon.browse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.browse.js?rev=919193&r1=919192&r2=919193&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Thu Mar  4 21:46:55 2010
@@ -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 $("<textarea rows='1' cols='40' spellcheck='false'></textarea>");
             }
             return $("<input type='text' spellcheck='false'>");



Mime
View raw message