couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r912082 - /couchdb/trunk/share/www/script/futon.browse.js
Date Sat, 20 Feb 2010 07:09:57 GMT
Author: jan
Date: Sat Feb 20 07:09:57 2010
New Revision: 912082

URL: http://svn.apache.org/viewvc?rev=912082&view=rev
Log:
Futon: Set rows for document source edit textarea to the number
of rows in the source.

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=912082&r1=912081&r2=912082&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Sat Feb 20 07:09:57 2010
@@ -826,7 +826,8 @@
           $(this).html($("<pre></pre>").html($.futon.formatJSON(page.doc, {html:
true})))
             .makeEditable({allowEmpty: false,
               createInput: function(value) {
-                return $("<textarea rows='8' cols='80' spellcheck='false'></textarea>").enableTabInsertion();
+                var rows = value.split("\n").length;
+                return $("<textarea rows='" + rows + "' cols='80' spellcheck='false'></textarea>").enableTabInsertion();
               },
               prepareInput: function(input) {
                 $(input).makeResizable({vertical: true});



Mime
View raw message