mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Change of class position createCalendarListItem
This commit is contained in:
parent
5200917e0a
commit
f0d90db640
1 changed files with 42 additions and 42 deletions
|
|
@ -286,6 +286,47 @@ class NextcloudFilesPopupView extends rl.pluginPopupView {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Happens after showModal()
|
||||||
|
beforeShow(files, fResolve) {
|
||||||
|
this.select = '';
|
||||||
|
this.files(!!files);
|
||||||
|
this.fResolve = fResolve;
|
||||||
|
|
||||||
|
this.tree.innerHTML = '';
|
||||||
|
fetchFiles('/').then(items => {
|
||||||
|
buildTree(this, this.tree, items, '/');
|
||||||
|
}).catch(err => console.error(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
this.fResolve(this.select);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
beforeShow() {} // Happens before showModal()
|
||||||
|
onShow() {} // Happens after showModal()
|
||||||
|
afterShow() {} // Happens after showModal() animation transitionend
|
||||||
|
onHide() {} // Happens before animation transitionend
|
||||||
|
afterHide() {} // Happens after animation transitionend
|
||||||
|
close() {}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
class NextcloudCalendarsPopupView extends rl.pluginPopupView {
|
||||||
|
constructor() {
|
||||||
|
super('NextcloudCalendars');
|
||||||
|
}
|
||||||
|
|
||||||
|
onBuild(dom) {
|
||||||
|
this.tree = dom.querySelector('#sm-nc-calendars');
|
||||||
|
this.tree.addEventListener('click', event => {
|
||||||
|
let el = event.target;
|
||||||
|
if (el.matches('button')) {
|
||||||
|
this.select = el.href;
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
createCalendarListItem(calendarData, treeElement) {
|
createCalendarListItem(calendarData, treeElement) {
|
||||||
const {
|
const {
|
||||||
displayName,
|
displayName,
|
||||||
|
|
@ -331,47 +372,6 @@ class NextcloudFilesPopupView extends rl.pluginPopupView {
|
||||||
|
|
||||||
treeElement.appendChild(li);
|
treeElement.appendChild(li);
|
||||||
}
|
}
|
||||||
// Happens after showModal()
|
|
||||||
beforeShow(files, fResolve) {
|
|
||||||
this.select = '';
|
|
||||||
this.files(!!files);
|
|
||||||
this.fResolve = fResolve;
|
|
||||||
|
|
||||||
this.tree.innerHTML = '';
|
|
||||||
fetchFiles('/').then(items => {
|
|
||||||
buildTree(this, this.tree, items, '/');
|
|
||||||
}).catch(err => console.error(err))
|
|
||||||
}
|
|
||||||
|
|
||||||
onHide() {
|
|
||||||
this.fResolve(this.select);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
beforeShow() {} // Happens before showModal()
|
|
||||||
onShow() {} // Happens after showModal()
|
|
||||||
afterShow() {} // Happens after showModal() animation transitionend
|
|
||||||
onHide() {} // Happens before animation transitionend
|
|
||||||
afterHide() {} // Happens after animation transitionend
|
|
||||||
close() {}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
class NextcloudCalendarsPopupView extends rl.pluginPopupView {
|
|
||||||
constructor() {
|
|
||||||
super('NextcloudCalendars');
|
|
||||||
}
|
|
||||||
|
|
||||||
onBuild(dom) {
|
|
||||||
this.tree = dom.querySelector('#sm-nc-calendars');
|
|
||||||
this.tree.addEventListener('click', event => {
|
|
||||||
let el = event.target;
|
|
||||||
if (el.matches('button')) {
|
|
||||||
this.select = el.href;
|
|
||||||
this.close();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Happens after showModal()
|
// Happens after showModal()
|
||||||
beforeShow(fResolve) {
|
beforeShow(fResolve) {
|
||||||
this.select = '';
|
this.select = '';
|
||||||
|
|
@ -409,7 +409,7 @@ class NextcloudCalendarsPopupView extends rl.pluginPopupView {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Call the function to create and append the list item
|
// Call the function to create and append the list item
|
||||||
// this.createCalendarListItem(calendarData, this.tree);
|
this.createCalendarListItem(calendarData, this.tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue