Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/differential/behavior-keyboard-nav.js
| Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | JX.Stratcom.listen( | ||||
| 'differential-toggle-file-toggled', | 'differential-toggle-file-toggled', | ||||
| null, | null, | ||||
| function() { | function() { | ||||
| changesets = null; | changesets = null; | ||||
| init(); | init(); | ||||
| refreshFocus(); | refreshFocus(); | ||||
| }); | }); | ||||
| var haunt_mode = 0; | |||||
| function haunt() { | |||||
| haunt_mode = (haunt_mode + 1) % 3; | |||||
| var el = JX.$(config.haunt); | |||||
| for (var ii = 1; ii <= 2; ii++) { | |||||
| JX.DOM.alterClass(el, 'differential-haunt-mode-'+ii, (haunt_mode == ii)); | |||||
| } | |||||
| } | |||||
| new JX.KeyboardShortcut('j', 'Jump to next change.') | new JX.KeyboardShortcut('j', 'Jump to next change.') | ||||
| .setHandler(function(manager) { | .setHandler(function(manager) { | ||||
| jump(manager, 1); | jump(manager, 1); | ||||
| }) | }) | ||||
| .register(); | .register(); | ||||
| new JX.KeyboardShortcut('k', 'Jump to previous change.') | new JX.KeyboardShortcut('k', 'Jump to previous change.') | ||||
| .setHandler(function(manager) { | .setHandler(function(manager) { | ||||
| ▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | new JX.KeyboardShortcut('r', 'Reply to selected inline comment.') | ||||
| .register(); | .register(); | ||||
| new JX.KeyboardShortcut('e', 'Edit selected inline comment.') | new JX.KeyboardShortcut('e', 'Edit selected inline comment.') | ||||
| .setHandler(function() { | .setHandler(function() { | ||||
| inline_op(selection_begin, 'edit'); | inline_op(selection_begin, 'edit'); | ||||
| }) | }) | ||||
| .register(); | .register(); | ||||
| if (config.haunt) { | |||||
| new JX.KeyboardShortcut('z', 'Cycle comment panel haunting modes.') | |||||
| .setHandler(haunt) | |||||
| .register(); | |||||
| } | |||||
| }); | }); | ||||