summaryrefslogtreecommitdiff
path: root/src/static/js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2015-01-18 23:03:54 +0000
committerJohn McLear <john@mclear.co.uk>2015-01-18 23:03:54 +0000
commit7e69bc65ce507391353f6ca8d67ccc967e0f571f (patch)
tree6eae4bef2c61f5e5852c3aa63b968d1dc2f6ccf3 /src/static/js
parent689ced8443e4e8491cbd184027d10c953c0d8466 (diff)
downloadetherpad-lite-7e69bc65ce507391353f6ca8d67ccc967e0f571f.zip
remove infinite load was causing pain
Diffstat (limited to 'src/static/js')
-rw-r--r--src/static/js/admin/plugins.js29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js
index a60ad446..a1ad624a 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
});