summaryrefslogtreecommitdiff
path: root/share/www/browse
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2008-08-30 21:09:31 +0000
committerChristopher Lenz <cmlenz@apache.org>2008-08-30 21:09:31 +0000
commit796a66de5f10b219c5ed196a8c97ed4bd3a227a2 (patch)
treec7283a48b96f9f28b4a815ca47ebbee7064e0732 /share/www/browse
parentc5a79c36f230b69e5ad810474316a52474bc4ad9 (diff)
Implement attachment uploading in Futon.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@690590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/browse')
-rw-r--r--share/www/browse/_upload_attachment.html36
-rw-r--r--share/www/browse/document.html3
2 files changed, 39 insertions, 0 deletions
diff --git a/share/www/browse/_upload_attachment.html b/share/www/browse/_upload_attachment.html
new file mode 100644
index 00000000..941fcc47
--- /dev/null
+++ b/share/www/browse/_upload_attachment.html
@@ -0,0 +1,36 @@
+<!--
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
+
+-->
+<form action="" method="post" id="upload-form">
+ <h2>Upload Attachment</h2>
+ <fieldset>
+ <p class="help">
+ Please select the file you want to upload as an attachment to this
+ document. Please note that this will result in the immediate creation of
+ a new revision of the document, so it's not necessary to save the
+ document after the upload.
+ </p>
+ <table summary=""><tbody><tr>
+ <th><label>File:</label></th>
+ <td><input type="file" name="_attachments"></td>
+ </tr><tr>
+ <td id="progress" colspan="2">&nbsp;</td>
+ </tr></table>
+ </fieldset>
+ <div class="buttons">
+ <input type="hidden" name="_rev" value="">
+ <button type="submit">Upload</button>
+ <button type="button" class="cancel">Cancel</button>
+ </div>
+</form>
diff --git a/share/www/browse/document.html b/share/www/browse/document.html
index 98d8ec48..09136533 100644
--- a/share/www/browse/document.html
+++ b/share/www/browse/document.html
@@ -23,6 +23,7 @@ specific language governing permissions and limitations under the License.
<script src="../script/jquery.cookies.js?0.8.0"></script>
<script src="../script/jquery.couch.js?0.8.0"></script>
<script src="../script/jquery.dialog.js?0.8.0"></script>
+ <script src="../script/jquery.form.js?0.8.0"></script>
<script src="../script/jquery.resizer.js?0.8.0"></script>
<script src="../script/browse.js?0.8.0"></script>
<script src="../script/pprint.js?0.8.0"></script>
@@ -61,6 +62,7 @@ specific language governing permissions and limitations under the License.
$("#toolbar button.save").click(page.saveDocument);
$("#toolbar button.add").click(page.addField);
+ $("#toolbar button.load").click(page.uploadAttachment);
$("#toolbar button.delete").click(page.deleteDocument);
});
</script>
@@ -76,6 +78,7 @@ specific language governing permissions and limitations under the License.
<ul id="toolbar">
<li><button class="save">Save Document</button></li>
<li><button class="add">Add Field</button></li>
+ <li><button class="load">Upload Attachment</button></li>
<li><button class="delete">Delete Document</button></li>
</ul>