From 7e69bc65ce507391353f6ca8d67ccc967e0f571f Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 18 Jan 2015 23:03:54 +0000 Subject: [PATCH] remove infinite load was causing pain --- src/static/js/admin/plugins.js | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js index a60ad446c..a1ad624a4 100644 --- a/src/static/js/admin/plugins.js +++ b/src/static/js/admin/plugins.js @@ -26,12 +26,11 @@ $(document).ready(function () { $('#search-progress').show() search.messages.show('fetching') - storeScrollPosition() search.searching = true } search.searching = false; search.offset = 0; - search.limit = 25; + search.limit = 999; search.results = []; search.sortBy = 'name'; search.sortDir = /*DESC?*/true; @@ -43,7 +42,7 @@ $(document).ready(function () { $('.search-results .messages .'+msg+' *').show() }, hide: function(msg) { - //$('.search-results .messages').hide() + $('.search-results .messages').hide() $('.search-results .messages .'+msg+'').hide() $('.search-results .messages .'+msg+' *').hide() } @@ -104,28 +103,6 @@ $(document).ready(function () { }) } - // Infinite scroll - var scrollPosition - function storeScrollPosition() { - scrollPosition = $(window).scrollTop() - } - function restoreScrollPosition() { - setTimeout(function() { - $(window).scrollTop(scrollPosition) - }, 0) - } - - $(window).scroll(checkInfiniteScroll) - function checkInfiniteScroll() { - if(search.end || search.searching) return;// don't keep requesting if there are no more results - setTimeout(function() { - try{ - var top = $('.results>tr:last').offset().top - if($(window).scrollTop()+$(window).height() > top) search(search.searchTerm) - }catch(e){} - }, 1) - } - function updateHandlers() { // Search $("#search-query").unbind('keyup').keyup(function () { @@ -209,8 +186,6 @@ $(document).ready(function () { } search.messages.hide('fetching') $('#search-progress').hide() - restoreScrollPosition() - checkInfiniteScroll() search.searching = false });