mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
moved dialog entrypoints into bootstrap, fixes
This commit is contained in:
@@ -128,12 +128,6 @@ function linkTypeChanged() {
|
||||
|
||||
$linkTypes.change(linkTypeChanged);
|
||||
|
||||
$(document).bind('keydown', 'ctrl+l', e => {
|
||||
showDialog();
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
export default {
|
||||
showDialog
|
||||
};
|
||||
@@ -2,7 +2,6 @@ import treeService from '../services/tree.js';
|
||||
import linkService from '../services/link.js';
|
||||
import utils from '../services/utils.js';
|
||||
|
||||
const $showDialogButton = $("#jump-to-note-button");
|
||||
const $dialog = $("#jump-to-note-dialog");
|
||||
const $autoComplete = $("#jump-to-note-autocomplete");
|
||||
const $form = $("#jump-to-note-form");
|
||||
@@ -38,22 +37,12 @@ function goToNote() {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'ctrl+j', e => {
|
||||
showDialog();
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$form.submit(() => {
|
||||
const action = $dialog.find("button:focus").val();
|
||||
|
||||
goToNote();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$showDialogButton.click(showDialog);
|
||||
|
||||
export default {
|
||||
showDialog
|
||||
};
|
||||
@@ -2,7 +2,6 @@ import noteDetailService from '../services/note_detail.js';
|
||||
import utils from '../services/utils.js';
|
||||
import server from '../services/server.js';
|
||||
|
||||
const $showDialogButton = $(".show-labels-button");
|
||||
const $dialog = $("#labels-dialog");
|
||||
const $saveLabelsButton = $("#save-labels-button");
|
||||
const $labelsBody = $('#labels-table tbody');
|
||||
@@ -164,12 +163,6 @@ async function showDialog() {
|
||||
});
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'alt+l', e => {
|
||||
showDialog();
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
ko.applyBindings(labelsModel, document.getElementById('labels-dialog'));
|
||||
|
||||
$(document).on('focus', '.label-name', function (e) {
|
||||
@@ -220,8 +213,6 @@ $(document).on('focus', '.label-value', async function (e) {
|
||||
$(this).autocomplete("search", $(this).val());
|
||||
});
|
||||
|
||||
$showDialogButton.click(showDialog);
|
||||
|
||||
export default {
|
||||
showDialog
|
||||
};
|
||||
@@ -2,7 +2,6 @@ import noteDetailService from '../services/note_detail.js';
|
||||
import utils from '../services/utils.js';
|
||||
import server from '../services/server.js';
|
||||
|
||||
const $showDialogButton = $("#show-history-button");
|
||||
const $dialog = $("#note-history-dialog");
|
||||
const $list = $("#note-history-list");
|
||||
const $content = $("#note-history-content");
|
||||
@@ -49,12 +48,6 @@ async function showNoteHistoryDialog(noteId, noteRevisionId) {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'alt+h', e => {
|
||||
showCurrentNoteHistory();
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$list.on('change', () => {
|
||||
const optVal = $list.find(":selected").val();
|
||||
|
||||
@@ -74,8 +67,6 @@ $(document).on('click', "a[action='note-history']", event => {
|
||||
return false;
|
||||
});
|
||||
|
||||
$showDialogButton.click(showCurrentNoteHistory);
|
||||
|
||||
export default {
|
||||
showCurrentNoteHistory
|
||||
};
|
||||
@@ -1,6 +1,5 @@
|
||||
import noteDetailService from '../services/note_detail.js';
|
||||
|
||||
const $showDialogButton = $("#show-source-button");
|
||||
const $dialog = $("#note-source-dialog");
|
||||
const $noteSource = $("#note-source");
|
||||
|
||||
@@ -45,14 +44,6 @@ function formatNode(node, level) {
|
||||
return node;
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'ctrl+u', e => {
|
||||
showDialog();
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$showDialogButton.click(showDialog);
|
||||
|
||||
export default {
|
||||
showDialog
|
||||
};
|
||||
@@ -2,7 +2,6 @@ import linkService from '../services/link.js';
|
||||
import utils from '../services/utils.js';
|
||||
import server from '../services/server.js';
|
||||
|
||||
const $showDialogButton = $("#recent-changes-button");
|
||||
const $dialog = $("#recent-changes-dialog");
|
||||
|
||||
async function showDialog() {
|
||||
@@ -83,10 +82,6 @@ function groupByDate(result) {
|
||||
return groupedByDate;
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'alt+r', showDialog);
|
||||
|
||||
$showDialogButton.click(showDialog);
|
||||
|
||||
export default {
|
||||
showDialog
|
||||
};
|
||||
@@ -2,7 +2,6 @@ import treeService from '../services/tree.js';
|
||||
import messagingService from '../services/messaging.js';
|
||||
import server from '../services/server.js';
|
||||
|
||||
const $showDialogButton = $("#recent-notes-button");
|
||||
const $dialog = $("#recent-notes-dialog");
|
||||
const $searchInput = $('#recent-notes-search-input');
|
||||
|
||||
@@ -93,14 +92,6 @@ async function showDialog() {
|
||||
|
||||
setTimeout(reload, 100);
|
||||
|
||||
$(document).bind('keydown', 'ctrl+e', e => {
|
||||
showDialog();
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$showDialogButton.click(showDialog);
|
||||
|
||||
export default {
|
||||
showDialog,
|
||||
addRecentNote,
|
||||
|
||||
@@ -4,7 +4,6 @@ import protectedSessionService from '../services/protected_session.js';
|
||||
import utils from '../services/utils.js';
|
||||
import server from '../services/server.js';
|
||||
|
||||
const $showDialogButton = $("#settings-button");
|
||||
const $dialog = $("#settings-dialog");
|
||||
const $tabs = $("#settings-tabs");
|
||||
|
||||
@@ -42,12 +41,9 @@ async function saveSettings(settingName, settingValue) {
|
||||
utils.showMessage("Settings change have been saved.");
|
||||
}
|
||||
|
||||
$showDialogButton.click(showDialog);
|
||||
|
||||
export default {
|
||||
showDialog,
|
||||
saveSettings,
|
||||
addModule
|
||||
saveSettings
|
||||
};
|
||||
|
||||
addModule((function() {
|
||||
|
||||
@@ -94,8 +94,6 @@ async function execute(e) {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).bind('keydown', 'alt+o', showDialog);
|
||||
|
||||
$query.bind('keydown', 'ctrl+return', execute);
|
||||
|
||||
$executeButton.click(execute);
|
||||
|
||||
Reference in New Issue
Block a user