From 476d20606db250e1fb23db637a6250938fa0ddd6 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 --- 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) - }) -}