mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
added plugin buttons to the launcher pane
This commit is contained in:
@@ -112,19 +112,23 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
.on('click', () => {
|
||||
setTimeout(() => $pluginButtons.dropdown('hide'), 0);
|
||||
});
|
||||
|
||||
if (opts.icon) {
|
||||
button.append($("<span>").addClass("bx bx-" + opts.icon))
|
||||
.append(" ");
|
||||
}
|
||||
|
||||
button.append($("<span>").text(opts.title));
|
||||
} else {
|
||||
button = $('<button class="noborder">')
|
||||
.addClass("btn btn-sm");
|
||||
button = $('<span class="button-widget icon-action bx" data-toggle="tooltip" title="" data-placement="right"></span>')
|
||||
.addClass("bx bx-" + opts.icon);
|
||||
|
||||
button.attr("title", opts.title);
|
||||
button.tooltip({html: true});
|
||||
}
|
||||
|
||||
button = button.on('click', opts.action);
|
||||
|
||||
if (opts.icon) {
|
||||
button.append($("<span>").addClass("bx bx-" + opts.icon))
|
||||
.append(" ");
|
||||
}
|
||||
|
||||
button.append($("<span>").text(opts.title));
|
||||
|
||||
button.attr('id', buttonId);
|
||||
|
||||
if ($("#" + buttonId).replaceWith(button).length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user