mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 09:28:45 +02:00
wip
This commit is contained in:
parent
5e3c85f891
commit
cd4b1235a7
@ -40,13 +40,13 @@ export default class TabCachingWidget extends TabAwareWidget {
|
||||
|
||||
if (!widget) {
|
||||
widget = this.widgets[this.tabContext.tabId] = this.widgetFactory();
|
||||
this.child(widget);
|
||||
|
||||
const $renderedWidget = widget.render();
|
||||
keyboardActionsService.updateDisplayedShortcuts($renderedWidget);
|
||||
|
||||
this.$widget.after($renderedWidget);
|
||||
|
||||
keyboardActionsService.updateDisplayedShortcuts($renderedWidget);
|
||||
|
||||
this.child(widget); // add as child only once it is ready (also rendered)
|
||||
widget.handleEvent('setTabContext', {tabContext: this.tabContext});
|
||||
}
|
||||
|
||||
|
@ -293,15 +293,7 @@ export default class BookTypeWidget extends TypeWidget {
|
||||
}
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {
|
||||
this.$content.empty();
|
||||
}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
}
|
@ -132,8 +132,4 @@ export default class CodeTypeWidget extends TypeWidget {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
}
|
@ -38,12 +38,4 @@ export default class EmptyTypeWidget extends TypeWidget {
|
||||
doRefresh(note) {
|
||||
this.$autoComplete.trigger('focus');
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {}
|
||||
|
||||
scrollToTop() {}
|
||||
}
|
@ -144,12 +144,4 @@ export default class FileTypeWidget extends TypeWidget {
|
||||
getFileUrl() {
|
||||
return utils.getUrlForDownload("api/notes/" + this.noteId + "/download");
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {}
|
||||
|
||||
scrollToTop() {}
|
||||
}
|
@ -147,16 +147,6 @@ class ImageTypeWidget extends TypeWidget {
|
||||
getFileUrl() {
|
||||
return utils.getUrlForDownload(`api/notes/${this.noteId}/download`);
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
}
|
||||
|
||||
export default ImageTypeWidget
|
@ -39,14 +39,4 @@ export default class ProtectedSessionTypeWidget extends TypeWidget {
|
||||
|
||||
return this.$widget;
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
}
|
@ -640,8 +640,4 @@ export default class RelationMapTypeWidget extends TypeWidget {
|
||||
getContent() {
|
||||
return JSON.stringify(this.mapData);
|
||||
}
|
||||
|
||||
focus() {}
|
||||
|
||||
scrollToTop() {}
|
||||
}
|
@ -37,15 +37,7 @@ export default class RenderTypeWidget extends TypeWidget {
|
||||
}
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {
|
||||
this.$noteDetailRenderContent.empty();
|
||||
}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
}
|
@ -48,10 +48,4 @@ export default class SearchTypeWidget extends TypeWidget {
|
||||
searchString: this.$searchString.val()
|
||||
});
|
||||
}
|
||||
|
||||
focus() {}
|
||||
|
||||
cleanup() {}
|
||||
|
||||
scrollToTop() {}
|
||||
}
|
@ -186,10 +186,6 @@ export default class TextTypeWidget extends TypeWidget {
|
||||
}
|
||||
}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
|
||||
insertDateTimeToTextCommand() {
|
||||
const date = new Date();
|
||||
const dateString = utils.formatDateTime(date);
|
||||
|
@ -28,4 +28,12 @@ export default class TypeWidget extends TabAwareWidget {
|
||||
isActive() {
|
||||
return this.$widget.is(":visible");
|
||||
}
|
||||
|
||||
getContent() {}
|
||||
|
||||
focus() {}
|
||||
|
||||
scrollToTop() {
|
||||
this.$widget.scrollTop(0);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user