Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/KeyboardShortcutManager.js
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | members : { | ||||
| * KeyboardShortcut.register(). | * KeyboardShortcut.register(). | ||||
| */ | */ | ||||
| addKeyboardShortcut : function(s) { | addKeyboardShortcut : function(s) { | ||||
| this._shortcuts.push(s); | this._shortcuts.push(s); | ||||
| }, | }, | ||||
| getShortcutDescriptions : function() { | getShortcutDescriptions : function() { | ||||
| var desc = []; | var desc = []; | ||||
| for (var ii = 0; ii < this._shortcuts.length; ii++) { | for (var ii = 0; ii < this._shortcuts.length; ii++) { | ||||
| var shortcut = this._shortcuts[ii]; | |||||
| desc.push({ | desc.push({ | ||||
| keys : this._shortcuts[ii].getKeys(), | keys : shortcut.getKeys(), | ||||
| description : this._shortcuts[ii].getDescription() | group: shortcut.getGroup(), | ||||
| description : shortcut.getDescription() | |||||
| }); | }); | ||||
| } | } | ||||
| return desc; | return desc; | ||||
| }, | }, | ||||
| /** | /** | ||||
| * Scroll an element into view. | * Scroll an element into view. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines | |||||