Save number of songs in the search table to a cookie.

This commit is contained in:
Jim Driessen
2017-02-01 00:43:18 +01:00
parent 75bb88d52d
commit 17e134f528
5 changed files with 19 additions and 5 deletions

View File

@ -10,6 +10,7 @@ var iteration = 0;
var requestViewOpen = false;
$(function () {
$('.pagesize').val(Cookies.get('pagesize'));
refreshQueue();
setInterval(updateTime, 1000);
@ -38,14 +39,16 @@ $(function () {
});
$('.pagenum').change(function(){
console.log('Page: ' + $(this).val());
});
$('#search-all, #search-uploader, .pagenum').change(function(){
getSongs();
});
$('#search-all, #search-uploader').change(function(){
$('.pagenum').val(1);
getSongs();
});
$('.pagesize').change(function(){
Cookies.set('pagesize', $(this).val());
$('.pagenum').val(1);
getSongs();
});