alt+s is now shortcut for sorting, search is not triggered with ctrl+s

This commit is contained in:
azivner 2018-01-13 23:03:17 -05:00
parent 9839ea019e
commit 36f920b975
4 changed files with 8 additions and 7 deletions

View file

@ -189,8 +189,6 @@ async function runImport() {
let importedComments = 0;
for (const account of redditAccounts) {
log.info("Reddit: Importing account " + account);
importedComments += await importComments(account);
}
@ -199,9 +197,7 @@ async function runImport() {
}
sql.dbReady.then(async () => {
console.log(config);
if (!config['Reddit'] || !config['Reddit']['enabled'] !== true) {
if (!config['Reddit'] || config['Reddit']['enabled'] !== true) {
return;
}

View file

@ -91,7 +91,7 @@ const contextMenu = (function() {
{title: "----"},
{title: "Collapse sub-tree <kbd>Alt+-</kbd>", cmd: "collapse-sub-tree", uiIcon: "ui-icon-minus"},
{title: "Force note sync", cmd: "force-note-sync", uiIcon: "ui-icon-refresh"},
{title: "Sort alphabetically", cmd: "sort-alphabetically", uiIcon: " ui-icon-arrowthick-2-n-s"}
{title: "Sort alphabetically <kbd>Alt+s</kbd>", cmd: "sort-alphabetically", uiIcon: " ui-icon-arrowthick-2-n-s"}
],
beforeOpen: (event, ui) => {

View file

@ -468,6 +468,11 @@ const noteTree = (function() {
"alt+-": node => {
collapseTree(node);
},
"alt+s": node => {
sortAlphabetically(node.data.note_id);
return false;
},
"ctrl+a": node => {
for (const child of node.getParent().getChildren()) {
child.setSelected(true);

View file

@ -48,7 +48,7 @@ const searchTree = (function() {
}
}).focus();
$(document).bind('keydown', 'alt+s', e => {
$(document).bind('keydown', 'ctrl+s', e => {
toggleSearch();
e.preventDefault();