mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
added new label type URL with open button, fixes #156
This commit is contained in:
@@ -309,6 +309,15 @@ async function loadAttributes() {
|
||||
|
||||
$actionCell.append($todayButton);
|
||||
}
|
||||
else if (definition.labelType === 'url') {
|
||||
$input.prop("placeholder", "http://website...");
|
||||
|
||||
const $openButton = $("<button>").addClass("btn btn-small").text("Open").click(() => {
|
||||
window.open($input.val(), '_blank');
|
||||
});
|
||||
|
||||
$actionCell.append($openButton);
|
||||
}
|
||||
else {
|
||||
messagingService.logError("Unknown labelType=" + definitionAttr.labelType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user