Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Only in share/www/: .svn
- Only in share/www/browse: .svn
- diff -C 3 -r share/www/browse/database.html /usr/local/share/couchdb/www/browse/database.html
- *** share/www/browse/database.html Sat Mar 1 13:15:28 2008
- --- /usr/local/share/couchdb/www/browse/database.html Fri Mar 7 13:36:27 2008
- ***************
- *** 52,57 ****
- --- 52,69 ----
- page.populateViewEditor();
- page.updateDocumentListing();
- + $("#paging a.paging-opts").click(function() {
- + $("#paging-opts").show();
- + });
- +
- + $('#custom-paging').submit(function(e) {
- + e.preventDefault();
- + var startkey = $('#custom-paging input#startkey').val();
- + var count = $('#custom-paging select#count').val();
- + page.updateDocumentListing({startkey:startkey, count:count});
- + return false;
- + });
- +
- $("#switch select").change(function() {
- var viewName = $(this).val();
- if (!viewName) $.cookies.remove(page.dbName + ".view");
- ***************
- *** 112,124 ****
- <tr>
- <td colspan="4">
- <div id="paging">
- ! <a class="prev">← Previous Page</a> | <a class="next">Next Page →</a>
- </div>
- <span></span>
- </td>
- </tr>
- </tbody>
- </table>
- -
- </body>
- </html>
- --- 124,150 ----
- <tr>
- <td colspan="4">
- <div id="paging">
- ! <a class="prev">← Previous Page</a> | <a class="next">Next Page →</a> | <a class="paging-opts" href="#paging-opts">Options</a>
- </div>
- <span></span>
- + <div id="paging-opts" style="display:none;">
- + <form id="custom-paging" action="#custom-paging">
- + <label for="startkey">Start Key:</label>
- + <input type="text" name="startkey" value="" id="startkey">
- +
- + <label for="count">Per Page:</label>
- + <select name="count" id="count">
- + <option value="20" selected>20</option>
- + <option value="50">50</option>
- + <option value="100">100</option>
- + </select>
- +
- + <input type="submit" name="refresh" value="Jump" id="refresh">
- + </form>
- + </div>
- </td>
- </tr>
- </tbody>
- </table>
- </body>
- </html>
- Only in share/www/image: .svn
- Only in share/www/script: .svn
- diff -C 3 -r share/www/script/browse.js /usr/local/share/couchdb/www/script/browse.js
- *** share/www/script/browse.js Sat Mar 1 13:15:33 2008
- --- /usr/local/share/couchdb/www/script/browse.js Fri Mar 7 13:14:30 2008
- ***************
- *** 162,172 ****
- $("#viewcode button.revert, #viewcode button.save").attr("disabled", "disabled");
- }
- this.updateDocumentListing = function(options) {
- if (options === undefined) {
- options = {};
- }
- ! if (options.count === undefined) options.count = rowsPerPage;
- if ($("#documents thead th.key").is(".desc")) {
- options.descending = true;
- } else if (options.descending !== undefined) {
- --- 162,177 ----
- $("#viewcode button.revert, #viewcode button.save").attr("disabled", "disabled");
- }
- + function currentRowsPerPage() {
- + var customCount = $('#custom-paging select#count').val();
- + return customCount || rowsPerPage;
- + };
- +
- this.updateDocumentListing = function(options) {
- if (options === undefined) {
- options = {};
- }
- ! if (options.count === undefined) options.count = currentRowsPerPage();
- if ($("#documents thead th.key").is(".desc")) {
- options.descending = true;
- } else if (options.descending !== undefined) {
- ***************
- *** 224,230 ****
- startkey: firstDoc.key !== undefined ? firstDoc.key : null,
- startkey_docid: firstDoc.id,
- skip: 1,
- ! count: -rowsPerPage
- });
- return false;
- });
- --- 229,235 ----
- startkey: firstDoc.key !== undefined ? firstDoc.key : null,
- startkey_docid: firstDoc.id,
- skip: 1,
- ! count: -currentRowsPerPage()
- });
- return false;
- });
- ***************
- *** 238,244 ****
- startkey: lastDoc.key !== undefined ? lastDoc.key : null,
- startkey_docid: lastDoc.id,
- skip: 1,
- ! count: rowsPerPage
- });
- return false;
- });
- --- 243,249 ----
- startkey: lastDoc.key !== undefined ? lastDoc.key : null,
- startkey_docid: lastDoc.id,
- skip: 1,
- ! count: currentRowsPerPage()
- });
- return false;
- });
- Only in share/www/style: .svn
- diff -C 3 -r share/www/style/layout.css /usr/local/share/couchdb/www/style/layout.css
- *** share/www/style/layout.css Sat Mar 1 13:15:28 2008
- --- /usr/local/share/couchdb/www/style/layout.css Fri Mar 7 15:38:21 2008
- ***************
- *** 97,102 ****
- --- 97,117 ----
- }
- table.listing tbody.footer #paging { float: right; }
- + /* Custom Pagination */
- +
- + #paging-opts {
- + margin:2px 0;
- + width:40%;
- + clear:right;
- + float:right;
- + }
- +
- + #paging-opts form {
- + border-top: 1px solid #a7a7a7;
- + float:right;
- + padding-top:4px;
- + }
- +
- /* Logo & Navigation */
- #logo { position: absolute; top: 20px; right: 20px; }
Add Comment
Please, Sign In to add comment