From c06fb7a526989862dc237b74b312899f8eac161c Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Thu, 24 Sep 2015 11:55:56 +0800 Subject: Fixed index clear history list not working, history list will now be id-unique, fixed typo and styles --- public/js/cover.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'public/js/cover.js') diff --git a/public/js/cover.js b/public/js/cover.js index f1ca6131..412d329c 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -8,7 +8,7 @@ var options = {
\

\

\ - visit \ + visited \
\ \ \ @@ -148,18 +148,19 @@ function deleteHistory() { saveHistory([]); historyList.clear(); checkHistoryList(); + deleteId = null; } else { if (!deleteId) return; getHistory(function (notehistory) { var newnotehistory = removeHistory(deleteId, notehistory); saveHistory(newnotehistory); + historyList.remove('id', deleteId); + checkHistoryList(); + deleteId = null; }); - historyList.remove('id', deleteId); - checkHistoryList(); } $('.delete-modal').modal('hide'); clearHistory = false; - deleteId = null; } $(".ui-delete-modal-confirm").click(function () { -- cgit v1.2.3