Fix history filter tags and search keyword might not apply after refresh
This commit is contained in:
parent
83d8142045
commit
357ad0b535
1 changed files with 15 additions and 1 deletions
|
@ -266,9 +266,23 @@ $(".ui-clear-history").click(function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".ui-refresh-history").click(function () {
|
$(".ui-refresh-history").click(function () {
|
||||||
|
var lastTags = $(".ui-use-tags").select2('val');
|
||||||
|
$(".ui-use-tags").select2('val', '');
|
||||||
|
historyList.filter();
|
||||||
|
var lastKeyword = $('.search').val();
|
||||||
|
$('.search').val('');
|
||||||
|
historyList.search();
|
||||||
|
|
||||||
resetCheckAuth();
|
resetCheckAuth();
|
||||||
historyList.clear();
|
historyList.clear();
|
||||||
parseHistory(historyList, parseHistoryCallback);
|
parseHistory(historyList, function (list, notehistory) {
|
||||||
|
parseHistoryCallback(list, notehistory);
|
||||||
|
$(".ui-use-tags").select2('val', lastTags);
|
||||||
|
$(".ui-use-tags").trigger('change');
|
||||||
|
historyList.search(lastKeyword);
|
||||||
|
$('.search').val(lastKeyword);
|
||||||
|
checkHistoryList();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".ui-logout").click(function () {
|
$(".ui-logout").click(function () {
|
||||||
|
|
Loading…
Reference in a new issue