diff options
author | Jan Lehnardt <jan@apache.org> | 2010-02-20 07:09:57 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2010-02-20 07:09:57 +0000 |
commit | 2d61a5d372b65b4a71a01a6ded48b3aa253e90aa (patch) | |
tree | 92edd8321e3d6c04fbe3c6880079a857da708ff4 | |
parent | 309e618bbdcc68062dfa9aa61bff550d2dbe7f35 (diff) |
Futon: Set rows for document source edit textarea to the number
of rows in the source.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@912082 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | share/www/script/futon.browse.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js index cc9c846e..408d34cc 100644 --- a/share/www/script/futon.browse.js +++ b/share/www/script/futon.browse.js @@ -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}); |