From: Chris Jaekl Date: Sat, 11 Aug 2018 02:29:17 +0000 (-0400) Subject: Add a bottom slider. X-Git-Url: https://jaekl.net/gitweb/?a=commitdiff_plain;h=18a0d7dec5cf675855108e0f463062d1ac7d948e;p=quanweb.git Add a bottom slider. I'm not happy with this; it works, but it seems a bit of a kludge. Need to think about how to refactor this to properly listen-notify with multiple pagers. --- diff --git a/app/index.html b/app/index.html index d2c48d9..d26603d 100644 --- a/app/index.html +++ b/app/index.html @@ -25,6 +25,13 @@
(No information available)
+
+ + + + Showing 0 through 0 out of 0 matching books. +
+ diff --git a/js/src/BooksView.js b/js/src/BooksView.js index 0259edd..05a315f 100644 --- a/js/src/BooksView.js +++ b/js/src/BooksView.js @@ -29,8 +29,11 @@ var BooksView = (function() { Browser.getElementById('books').innerHTML = html; Browser.getElementById('first').innerHTML = (BooksModel.first + 1); + Browser.getElementById('bottom_first').innerHTML = (BooksModel.first + 1); Browser.getElementById('last').innerHTML = (BooksModel.last + 1); + Browser.getElementById('bottom_last').innerHTML = (BooksModel.last + 1); Browser.getElementById('count').innerHTML = BooksModel.count; + Browser.getElementById('bottom_count').innerHTML = BooksModel.count; }; // =============== diff --git a/js/src/PagingController.js b/js/src/PagingController.js index c043dc1..0918f54 100644 --- a/js/src/PagingController.js +++ b/js/src/PagingController.js @@ -27,6 +27,7 @@ var PagingController = (function() { my.notify = function() { Browser.getElementById('slider').value = booksModel.first; + Browser.getElementById('bottom_slider').value = booksModel.first; }; return my; diff --git a/js/src/SearchController.js b/js/src/SearchController.js index 0f13194..54d76fa 100644 --- a/js/src/SearchController.js +++ b/js/src/SearchController.js @@ -31,6 +31,8 @@ var SearchController = (function () { var elem = Browser.getElementById('slider'); elem.max = booksModel.count; + elem = Browser.getElementById('bottom_slider'); + elem.max = booksModel.count; PagingController.adjustPos(0); })