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

View File

@ -91,7 +91,7 @@ const contextMenu = (function() {
{title: "----"}, {title: "----"},
{title: "Collapse sub-tree <kbd>Alt+-</kbd>", cmd: "collapse-sub-tree", uiIcon: "ui-icon-minus"}, {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: "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) => { beforeOpen: (event, ui) => {

View File

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

View File

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