updates and bug fixes

This commit is contained in:
Henrique Dias 2017-07-11 17:03:39 +01:00
parent 8b1d36dfb9
commit 476d20606d
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
2 changed files with 2 additions and 26 deletions

View File

@ -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) {

View File

@ -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)
})
}