mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
bookmarks use cloning
This commit is contained in:
@@ -101,18 +101,26 @@ export default class SwitchWidget extends NoteContextAwareWidget {
|
||||
this.$switchOnName = this.$widget.find(".switch-on-name");
|
||||
this.$switchOnButton = this.$widget.find(".switch-on-button");
|
||||
|
||||
this.$switchOnButton.on('click', () => this.switchOn());
|
||||
this.$switchOnButton.on('click', () => this.toggle(true));
|
||||
|
||||
this.$switchOff = this.$widget.find(".switch-off");
|
||||
this.$switchOffName = this.$widget.find(".switch-off-name");
|
||||
this.$switchOffButton = this.$widget.find(".switch-off-button");
|
||||
|
||||
this.$switchOffButton.on('click', () => this.switchOff());
|
||||
this.$switchOffButton.on('click', () => this.toggle(false));
|
||||
|
||||
this.$helpButton = this.$widget.find(".switch-help-button");
|
||||
|
||||
}
|
||||
|
||||
toggle(state) {
|
||||
if (state) {
|
||||
this.switchOn();
|
||||
} else {
|
||||
this.switchOff();
|
||||
}
|
||||
}
|
||||
|
||||
switchOff() {}
|
||||
switchOn() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user