Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 2140853003: Fix keyboard commands on bookmarks page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo cripser.js change Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function() { 5 (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** @const */ var BookmarkList = bmm.BookmarkList; 8 /** @const */ var BookmarkList = bmm.BookmarkList;
9 /** @const */ var BookmarkTree = bmm.BookmarkTree; 9 /** @const */ var BookmarkTree = bmm.BookmarkTree;
10 /** @const */ var Command = cr.ui.Command; 10 /** @const */ var Command = cr.ui.Command;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bookmarkId: 'q=' 70 bookmarkId: 'q='
71 }); 71 });
72 72
73 /** 73 /**
74 * Command shortcut mapping. 74 * Command shortcut mapping.
75 * @const 75 * @const
76 */ 76 */
77 var commandShortcutMap = cr.isMac ? { 77 var commandShortcutMap = cr.isMac ? {
78 'edit': 'Enter', 78 'edit': 'Enter',
79 // On Mac we also allow Meta+Backspace. 79 // On Mac we also allow Meta+Backspace.
80 'delete': 'U+007F U+0008 Meta-U+0008', 80 'delete': 'Delete Backspace Meta|Backspace',
81 'open-in-background-tab': 'Meta-Enter', 81 'open-in-background-tab': 'Meta|Enter',
82 'open-in-new-tab': 'Shift-Meta-Enter', 82 'open-in-new-tab': 'Shift|Meta|Enter',
83 'open-in-same-window': 'Meta-Down', 83 'open-in-same-window': 'Meta|Down',
84 'open-in-new-window': 'Shift-Enter', 84 'open-in-new-window': 'Shift|Enter',
85 'rename-folder': 'Enter', 85 'rename-folder': 'Enter',
86 // Global undo is Command-Z. It is not in any menu. 86 // Global undo is Command-Z. It is not in any menu.
87 'undo': 'Meta-U+005A', 87 'undo': 'Meta|z',
88 } : { 88 } : {
89 'edit': 'F2', 89 'edit': 'F2',
90 'delete': 'U+007F', 90 'delete': 'Delete',
91 'open-in-background-tab': 'Ctrl-Enter', 91 'open-in-background-tab': 'Ctrl|Enter',
92 'open-in-new-tab': 'Shift-Ctrl-Enter', 92 'open-in-new-tab': 'Shift|Ctrl|Enter',
93 'open-in-same-window': 'Enter', 93 'open-in-same-window': 'Enter',
94 'open-in-new-window': 'Shift-Enter', 94 'open-in-new-window': 'Shift|Enter',
95 'rename-folder': 'F2', 95 'rename-folder': 'F2',
96 // Global undo is Ctrl-Z. It is not in any menu. 96 // Global undo is Ctrl-Z. It is not in any menu.
97 'undo': 'Ctrl-U+005A', 97 'undo': 'Ctrl|z',
98 }; 98 };
99 99
100 /** 100 /**
101 * Mapping for folder id to suffix of UMA. These names will be appeared 101 * Mapping for folder id to suffix of UMA. These names will be appeared
102 * after "BookmarkManager_NavigateTo_" in UMA dashboard. 102 * after "BookmarkManager_NavigateTo_" in UMA dashboard.
103 * @const 103 * @const
104 */ 104 */
105 var folderMetricsNameMap = { 105 var folderMetricsNameMap = {
106 '1': 'BookmarkBar', 106 '1': 'BookmarkBar',
107 '2': 'Other', 107 '2': 'Other',
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 1527
1528 cr.ui.FocusOutlineManager.forDocument(document); 1528 cr.ui.FocusOutlineManager.forDocument(document);
1529 initializeSplitter(); 1529 initializeSplitter();
1530 bmm.addBookmarkModelListeners(); 1530 bmm.addBookmarkModelListeners();
1531 dnd.init(selectItemsAfterUserAction); 1531 dnd.init(selectItemsAfterUserAction);
1532 bmm.tree.reload(); 1532 bmm.tree.reload();
1533 } 1533 }
1534 1534
1535 initializeBookmarkManager(); 1535 initializeBookmarkManager();
1536 })(); 1536 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698