From 7a4e2a86e0091ad063f12a00807ffba93f407eb4 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 11 Jul 2017 17:03:39 +0100 Subject: [PATCH] updates and bug fixes Former-commit-id: 93650c47c24e8d407e4894b933423c0649bc95f6 [formerly ca7ad619d1a585ad89519938f098d8f343aabf34] [formerly 9dcbd79513e6fd751307c83962d8bab1270cb165 [formerly 476d20606db250e1fb23db637a6250938fa0ddd6]] Former-commit-id: dcaf4a8dc56d81c241613427fc25e2599bdbfb0d [formerly c2ab3d17080de2b721101d656ae401ffbb9bbab5] Former-commit-id: b5c39f335b709677e6c088d0a422d289f548c8c2 --- assets/src/components/Files.vue | 2 ++ caddy/hugo/old.js | 26 -------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 caddy/hugo/old.js diff --git a/assets/src/components/Files.vue b/assets/src/components/Files.vue index c5d72c07..91296bdd 100644 --- a/assets/src/components/Files.vue +++ b/assets/src/components/Files.vue @@ -117,6 +117,8 @@ export default { mounted () { window.addEventListener('keydown', this.keyEvent) window.addEventListener('scroll', event => { + if (this.req.kind !== 'listing') return + let top = 112 - window.scrollY if (top < 64) { diff --git a/caddy/hugo/old.js b/caddy/hugo/old.js deleted file mode 100644 index 551ed893..00000000 --- a/caddy/hugo/old.js +++ /dev/null @@ -1,26 +0,0 @@ - -hugo.schedule = function (event) { - event.preventDefault(); - - let date = document.getElementById('date').value; - if(document.getElementById('publishDate')) { - date = document.getElementById('publishDate').value; - } - - buttons.setLoading('publish'); - - let data = JSON.stringify(form2js(document.querySelector('form'))), - headers = { - 'Kind': document.getElementById('editor').dataset.kind, - 'Schedule': 'true' - }; - - webdav.put(window.location.pathname, data, headers) - .then(() => { - buttons.setDone('publish'); - }) - .catch(e => { - console.log(e); - buttons.setDone('publish', false) - }) -}