import BasicWidget from "./basic_widget.js"; import HistoryNavigationWidget from "./history_navigation.js"; import protectedSessionService from "../services/protected_session.js"; const TPL = `
`; export default class StandardTopWidget extends BasicWidget { doRender() { this.$widget = $(TPL); const historyNavigationWidget = new HistoryNavigationWidget(); this.child(historyNavigationWidget); this.$widget.prepend(historyNavigationWidget.render()); this.$widget.find(".jump-to-note-dialog-button").on('click', () => this.triggerCommand('jumpToNote')); this.$widget.find(".recent-changes-button").on('click', () => this.triggerCommand('showRecentChanges')); this.$widget.find(".enter-protected-session-button").on('click', protectedSessionService.enterProtectedSession); this.$widget.find(".leave-protected-session-button").on('click', protectedSessionService.leaveProtectedSession); return this.$widget } }