help buttons and existing custom HTML attribute refactoring to data-*

This commit is contained in:
azivner
2018-08-15 10:14:14 +02:00
parent f440493e45
commit 510704a074
9 changed files with 74 additions and 30 deletions

View File

@@ -71,6 +71,14 @@ window.onerror = function (msg, url, lineNo, columnNo, error) {
return false;
};
const wikiBaseUrl = "https://github.com/zadam/trilium/wiki/";
$(document).on("click", "button[data-help-page]", e => {
const $button = $(e.target);
window.open(wikiBaseUrl + $button.attr("data-help-page"), '_blank');
});
$("#logout-button").toggle(!utils.isElectron());
if (utils.isElectron()) {