PageRenderTime 52ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/share/www/document.html

http://github.com/apache/couchdb
HTML | 114 lines | 93 code | 7 blank | 14 comment | 0 complexity | 1f02cdbe5d8885ec34f800229223d922 MD5 | raw file
Possible License(s): BSD-3-Clause, Apache-2.0
  1. <!DOCTYPE html>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  4. this file except in compliance with the License. You may obtain a copy of the
  5. License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software distributed
  8. under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  9. CONDITIONS OF ANY KIND, either express or implied. See the License for the
  10. specific language governing permissions and limitations under the License.
  11. -->
  12. <html lang="en">
  13. <head>
  14. <title>View Document</title>
  15. <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  16. <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
  17. <script src="script/json2.js"></script>
  18. <script src="script/sha1.js"></script>
  19. <script src="script/base64.js"></script>
  20. <script src="script/jquery.js"></script>
  21. <script src="script/jquery.couch.js"></script>
  22. <script src="script/jquery.dialog.js"></script>
  23. <script src="script/futon.js"></script>
  24. <script src="script/jquery.resizer.js"></script>
  25. <script src="script/futon.browse.js"></script>
  26. <script src="script/futon.format.js"></script>
  27. <script src="script/jquery.editinline.js"></script>
  28. <script src="script/jquery.form.js"></script>
  29. <script>
  30. var page = new $.futon.CouchDocumentPage();
  31. $.futon.navigation.ready(function() {
  32. this.addDatabase(page.db.name);
  33. this.updateSelection(
  34. location.pathname.replace(/document\.html/, "database.html"),
  35. "?" + page.db.name
  36. );
  37. });
  38. $(function() {
  39. $("h1 a.dbname").text(page.dbName)
  40. .attr("href", "database.html?" + encodeURIComponent(page.db.name));
  41. $("h1 strong").text(page.docId);
  42. $("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
  43. "/" + encodeURIComponent(page.docId));
  44. page.updateFieldListing();
  45. $("#tabs li.tabular a").click(page.activateTabularView);
  46. $("#tabs li.source a").click(page.activateSourceView);
  47. $("#toolbar button.save").click(page.saveDocument);
  48. $("#toolbar button.add").click(page.addField);
  49. $("#toolbar button.load").click(page.uploadAttachment);
  50. if (page.isNew) {
  51. $("#toolbar button.delete").hide();
  52. } else {
  53. $("#toolbar button.delete").click(page.deleteDocument);
  54. }
  55. });
  56. </script>
  57. </head>
  58. <body><div id="wrap">
  59. <h1>
  60. <a href="index.html">Overview</a>
  61. <a class="dbname" href="#">?</a>
  62. <strong>?</strong>
  63. <a class="raw" title="Raw document"></a>
  64. </h1>
  65. <div id="content">
  66. <ul id="toolbar">
  67. <li><button class="save">Save Document</button></li>
  68. <li><button class="add">Add Field</button></li>
  69. <li><button class="load">Upload Attachment…</button></li>
  70. <li><button class="delete">Delete Document…</button></li>
  71. </ul>
  72. <ul id="tabs">
  73. <li class="active tabular"><a href="#tabular">Fields</a></li>
  74. <li class="source"><a href="#source">Source</a></li>
  75. </ul>
  76. <table id="fields" class="listing" cellspacing="0">
  77. <col class="field"><col class="value">
  78. <caption>Fields</caption>
  79. <thead>
  80. <tr>
  81. <th>Field</th>
  82. <th>Value</th>
  83. </tr>
  84. </thead>
  85. <tbody class="content">
  86. </tbody>
  87. <tbody class="source" style="display: none">
  88. <tr><td colspan="2"></td></tr>
  89. </tbody>
  90. <tbody class="footer">
  91. <tr>
  92. <td colspan="2">
  93. <div id="paging">
  94. <a class="prev">? Previous Version</a> | <a class="next">Next Version ?</a>
  95. </div>
  96. <span></span>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. </div>
  102. </div></body>
  103. </html>