diff options
author | Christopher Lenz <cmlenz@apache.org> | 2008-05-23 11:09:17 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2008-05-23 11:09:17 +0000 |
commit | 0de41589080a9ebbd172e96a3d2130591c671898 (patch) | |
tree | 434d7f1c6d8fa7996d5095cf53b7225d1f3a0d9d /share/www/browse | |
parent | 10c68254aac8647c7bcf2a3d8f9523658eb828f7 (diff) |
Initial set of changes to Futon to support the recent introduction map/reduce.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@659501 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/browse')
-rw-r--r-- | share/www/browse/database.html | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/share/www/browse/database.html b/share/www/browse/database.html index 76990608..51cc19f4 100644 --- a/share/www/browse/database.html +++ b/share/www/browse/database.html @@ -36,7 +36,7 @@ specific language governing permissions and limitations under the License. $(document).ready(function() { $("h1 strong").text(page.db.name); - $("#viewcode label").click(function() { + $("#viewcode span").click(function() { $("#viewcode").toggleClass("expanded"); }); $("#viewcode button.run").click(function() { @@ -51,11 +51,14 @@ specific language governing permissions and limitations under the License. $("#viewcode button.saveas").click(function() { page.saveViewAs(); }); - $("#viewcode textarea").resizable({grippie: $("#viewcode .bottom")}); + $("#viewcode textarea").resizable({ + always: true, + grippie: $("#viewcode .bottom") + }); // Restore preferences/state from cookies var query = $.cookies.get(page.db.name + ".query"); - if (query) $("#viewcode textarea").val(query); + if (query) $("#viewcode_map").val(query); var desc = $.cookies.get(page.db.name + ".desc"); if (desc) $("#documents thead th.key").addClass("desc"); var rowsPerPage = $.cookies.get(page.db.name + ".perpage"); @@ -108,11 +111,18 @@ specific language governing permissions and limitations under the License. <div id="viewcode" style="display: none"> <div class="top"> <a id="designdoc-link"></a> - <label for="viewcode_textarea">View Function</label> + <span id="view-toggle">View Function</span> </div> - <textarea id="viewcode_textarea" rows="5" cols="79" spellcheck="false" wrap="off">function(doc) { + <div class="code map"> + <label>Map Function:</label> + <textarea id="viewcode_map" class="map" rows="5" cols="79" spellcheck="false" wrap="off">function(doc) { emit(null, doc); }</textarea> + </div> + <div class="code reduce"> + <label>Reduce Function (optional):</label> + <textarea id="viewcode_reduce" class="reduce" rows="5" cols="79" spellcheck="false" wrap="off"></textarea> + </div> <div class="bottom"> <button class="save" type="button" disabled>Save</button> <button class="saveas" type="button">Save As…</button> |