]> git.wh0rd.org Git - tt-rss.git/commitdiff
disable infinite scrolling when Limit == 0 (closes #143)
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 29 Aug 2007 14:10:41 +0000 (15:10 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 29 Aug 2007 14:10:41 +0000 (15:10 +0100)
feedlist.js
viewfeed.js

index 3874cceae25d800b6ec003f1528e4a529611626e..904638ce0f15ef5f6b6db01b08e2292c8af632b1 100644 (file)
@@ -75,7 +75,7 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
                var toolbar_form = document.forms["main_toolbar_form"];
                var toolbar_query = Form.serialize("main_toolbar_form");
 
-               if (document.forms["main_toolbar_form"].query) {
+               if (toolbar_form.query) {
                        toolbar_form.query.value = "";
                }
 
index 66b89920123fe5d4331d7a6709488c26c6cfd391..7106d781bcbdadf12a7e1b91f03ceb8d33c2c6ca 100644 (file)
@@ -1248,10 +1248,17 @@ function headlines_scroll_handler() {
 
                var e = document.getElementById("headlinesInnerContainer");
 
-               if (e.scrollTop + e.offsetHeight > e.scrollHeight - 50) {
-                       if (!_infscroll_disable) {
-                               debug("more cowbell!");
-                               viewNextFeedPage();
+               // don't do infinite scrolling when Limit == All
+
+               var toolbar_form = document.forms["main_toolbar_form"];
+
+               var limit = toolbar_form.limit[toolbar_form.limit.selectedIndex];
+               if (limit.value != 0) {
+                       if (e.scrollTop + e.offsetHeight > e.scrollHeight - 50) {
+                               if (!_infscroll_disable) {
+                                       debug("more cowbell!");
+                                       viewNextFeedPage();
+                               }
                        }
                }