Update to make history refresh have better UX and keep the beginning and end of the pagination visible

This commit is contained in:
Wu Cheng-Han 2016-10-12 13:08:53 +08:00
parent cd9f8fe36b
commit f4fe27e26c

View file

@ -21,7 +21,9 @@ var options = {
</li>', </li>',
page: 18, page: 18,
plugins: [ plugins: [
ListPagination({}) ListPagination({
outerWindow: 1
})
] ]
}; };
var historyList = new List('history', options); var historyList = new List('history', options);
@ -305,6 +307,8 @@ $(".ui-refresh-history").click(function () {
var lastKeyword = $('.search').val(); var lastKeyword = $('.search').val();
$('.search').val(''); $('.search').val('');
historyList.search(); historyList.search();
$('#history-list').slideUp('fast');
$('.pagination').slideUp('fast');
resetCheckAuth(); resetCheckAuth();
historyList.clear(); historyList.clear();
@ -315,6 +319,8 @@ $(".ui-refresh-history").click(function () {
historyList.search(lastKeyword); historyList.search(lastKeyword);
$('.search').val(lastKeyword); $('.search').val(lastKeyword);
checkHistoryList(); checkHistoryList();
$('#history-list').slideDown('fast');
$('.pagination').slideDown('fast');
}); });
}); });