updates and bug fixes
Former-commit-id: 93650c47c24e8d407e4894b933423c0649bc95f6 [formerly ca7ad619d1a585ad89519938f098d8f343aabf34] [formerly 9dcbd79513e6fd751307c83962d8bab1270cb165 [formerly 476d20606db250e1fb23db637a6250938fa0ddd6]] Former-commit-id: dcaf4a8dc56d81c241613427fc25e2599bdbfb0d [formerly c2ab3d17080de2b721101d656ae401ffbb9bbab5] Former-commit-id: b5c39f335b709677e6c088d0a422d289f548c8c2
This commit is contained in:
parent
749d3ea3fc
commit
7a4e2a86e0
|
@ -117,6 +117,8 @@ export default {
|
||||||
mounted () {
|
mounted () {
|
||||||
window.addEventListener('keydown', this.keyEvent)
|
window.addEventListener('keydown', this.keyEvent)
|
||||||
window.addEventListener('scroll', event => {
|
window.addEventListener('scroll', event => {
|
||||||
|
if (this.req.kind !== 'listing') return
|
||||||
|
|
||||||
let top = 112 - window.scrollY
|
let top = 112 - window.scrollY
|
||||||
|
|
||||||
if (top < 64) {
|
if (top < 64) {
|
||||||
|
|
|
@ -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)
|
|
||||||
})
|
|
||||||
}
|
|
Loading…
Reference in New Issue