moved dialog entrypoints into bootstrap, fixes

This commit is contained in:
azivner
2018-03-25 19:49:33 -04:00
parent 19c605a9a8
commit 341f47f0f2
15 changed files with 62 additions and 102 deletions

View File

@@ -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
};