From f55a4b8497ad3e21637769f9de7e600a40dd1189 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Tue, 14 Mar 2017 23:08:15 +0800 Subject: [PATCH] Update to fix pagination error in list.js over v1.5.0 --- package.json | 3 +-- public/js/cover.js | 8 +++----- webpackBaseConfig.js | 2 -- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 0578932..e56ac52 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,7 @@ "js-yaml": "^3.7.0", "jsdom-nogyp": "^0.8.3", "keymaster": "^1.6.2", - "list.js": "^1.3.0", - "list.pagination.js": "^0.1.1", + "list.js": "^1.5.0", "lodash": "^4.17.4", "lz-string": "1.4.4", "markdown-it": "^8.2.2", diff --git a/public/js/cover.js b/public/js/cover.js index a45a1c1..c9c2b6c 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -54,11 +54,9 @@ const options = { '' + '', page: 18, - plugins: [ - window.ListPagination({ - outerWindow: 1 - }) - ] + pagination: [{ + outerWindow: 1 + }] } const historyList = new List('history', options) diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index 9ab4c06..f37eae5 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -182,7 +182,6 @@ module.exports = { 'cover-pack': [ 'babel-polyfill', 'bootstrap-validator', - 'script!listPagnation', 'expose?select2!select2', 'expose?moment!moment', 'script!js-url', @@ -365,7 +364,6 @@ module.exports = { codemirrorSpellChecker: path.join(__dirname, 'public/vendor/codemirror-spell-checker/spell-checker.min.js'), codemirrorInlineAttachment: path.join(__dirname, 'public/vendor/inlineAttachment/codemirror.inline-attachment.js'), ot: path.join(__dirname, 'public/vendor/ot/ot.min.js'), - listPagnation: path.join(__dirname, 'node_modules/list.pagination.js/dist/list.pagination.min.js'), mermaid: path.join(__dirname, 'node_modules/mermaid/dist/mermaid.min.js'), handlebars: path.join(__dirname, 'node_modules/handlebars/dist/handlebars.min.js'), 'jquery-ui-resizable': path.join(__dirname, 'public/vendor/jquery-ui/jquery-ui.min.js'),