From 20f2e27350dba2f77199b434a4c236073f1aae04 Mon Sep 17 00:00:00 2001
From: Yukai Huang
Date: Mon, 10 Oct 2016 10:14:17 +0800
Subject: Cover page is now working
---
public/js/cover.js | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
(limited to 'public/js/cover.js')
diff --git a/public/js/cover.js b/public/js/cover.js
index f3533826..d3d3c10b 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -1,3 +1,17 @@
+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 options = {
valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'],
item: '
\
@@ -265,16 +279,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');
@@ -336,4 +350,4 @@ $(".ui-use-tags").on('change', function () {
$('.search').keyup(function () {
checkHistoryList();
-});
\ No newline at end of file
+});
--
cgit v1.2.3
From 06437ccaa995afc48e30154c136c4e485ac04ae7 Mon Sep 17 00:00:00 2001
From: Yukai Huang
Date: Tue, 11 Oct 2016 14:52:45 +0800
Subject: Manage more packages with npm and webpack
---
public/js/cover.js | 3 +++
1 file changed, 3 insertions(+)
(limited to 'public/js/cover.js')
diff --git a/public/js/cover.js b/public/js/cover.js
index d3d3c10b..6346f144 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -12,6 +12,9 @@ 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: '\
--
cgit v1.2.3
From 4a6a69e7bc8f6e2897394f3a1285ff7626bceb16 Mon Sep 17 00:00:00 2001
From: Yukai Huang
Date: Tue, 11 Oct 2016 20:17:44 +0800
Subject: Fix module export
---
public/js/cover.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'public/js/cover.js')
diff --git a/public/js/cover.js b/public/js/cover.js
index 7156bf27..515c8827 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -3,6 +3,8 @@ var checkIfAuth = common.checkIfAuth;
var urlpath = common.urlpath;
var serverurl = common.serverurl;
var resetCheckAuth = common.resetCheckAuth;
+var getLoginState = common.getLoginState;
+var clearLoginState = common.clearLoginState;
var historyModule = require('./history');
var parseStorageToHistory = historyModule.parseStorageToHistory;
@@ -11,6 +13,10 @@ var getStorageHistory = historyModule.getStorageHistory;
var getHistory = historyModule.getHistory;
var saveHistory = historyModule.saveHistory;
var removeHistory = historyModule.removeHistory;
+var postHistoryToServer = historyModule.postHistoryToServer;
+var deleteServerHistory = historyModule.deleteServerHistory;
+var parseServerToHistory = historyModule.parseServerToHistory;
+var saveStorageHistoryToServer = historyModule.saveStorageHistoryToServer;
var saveAs = require('file-saver').saveAs;
var List = require('list.js');
@@ -196,7 +202,7 @@ function parseHistoryCallback(list, notehistory) {
$this.addClass('active');
else
$this.removeClass('active');
- }
+ }
});
}, function () {
getHistory(function (notehistory) {
--
cgit v1.2.3