summaryrefslogtreecommitdiff
path: root/public/js/cover.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/cover.js')
-rw-r--r--public/js/cover.js25
1 files changed, 21 insertions, 4 deletions
diff --git a/public/js/cover.js b/public/js/cover.js
index 25434ed9..7156bf27 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -1,3 +1,20 @@
+var common = require('./common');
+var checkIfAuth = common.checkIfAuth;
+var urlpath = common.urlpath;
+var serverurl = common.serverurl;
+var resetCheckAuth = common.resetCheckAuth;
+
+var historyModule = require('./history');
+var parseStorageToHistory = historyModule.parseStorageToHistory;
+var parseHistory = historyModule.parseHistory;
+var getStorageHistory = historyModule.getStorageHistory;
+var getHistory = historyModule.getHistory;
+var saveHistory = historyModule.saveHistory;
+var removeHistory = historyModule.removeHistory;
+
+var saveAs = require('file-saver').saveAs;
+var List = require('list.js');
+
var options = {
valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'],
item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\
@@ -299,16 +316,16 @@ $(".ui-clear-history").click(function () {
});
$(".ui-refresh-history").click(function () {
- var lastTags = $(".ui-use-tags").select2('val');
+ var lastTags = $(".ui-use-tags").select2('val');
$(".ui-use-tags").select2('val', '');
historyList.filter();
var lastKeyword = $('.search').val();
$('.search').val('');
historyList.search();
-
+
resetCheckAuth();
historyList.clear();
- parseHistory(historyList, function (list, notehistory) {
+ parseHistory(historyList, function (list, notehistory) {
parseHistoryCallback(list, notehistory);
$(".ui-use-tags").select2('val', lastTags);
$(".ui-use-tags").trigger('change');
@@ -370,4 +387,4 @@ $(".ui-use-tags").on('change', function () {
$('.search').keyup(function () {
checkHistoryList();
-}); \ No newline at end of file
+});