Skip to content

Commit

Permalink
[jan] Add Alt+Home and Alt+End hotkeys to navigate in preview pane (m…
Browse files Browse the repository at this point in the history
…ichael.menge@zdv.uni-tuebingen.de, Request #13983).
  • Loading branch information
yunosh committed Jan 22, 2016
1 parent be77531 commit be701f3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions imp/docs/CHANGES
Expand Up @@ -2,6 +2,8 @@
v7.0.0-git
----------

[jan] Add Alt+Home and Alt+End hotkeys to navigate in preview pane
(michael.menge@zdv.uni-tuebingen.de, Request #13983).
[mjr] Add support for sending MDN via the API.
[mjr] Add imap_preauthenticate hook.
[mms] Report multiple spam/innocent messages in a single digest.
Expand Down
20 changes: 18 additions & 2 deletions imp/js/base.js
Expand Up @@ -2718,8 +2718,24 @@ var ImpBase = {

case Event.KEY_HOME:
case Event.KEY_END:
this.moveSelected(kc == Event.KEY_HOME ? 1 : this.viewport.getMetaData('total_rows'), true);
e.stop();
if (e.altKey) {
pp = $('previewPane');
h = pp.getHeight();
if (h != pp.scrollHeight) {
switch (kc) {
case Event.KEY_HOME:
pp.scrollTop = 0;
break;
case Event.KEY_END:
pp.scrollTop = pp.scrollHeight;
break;
}
}
e.stop();
} else {
this.moveSelected(kc == Event.KEY_HOME ? 1 : this.viewport.getMetaData('total_rows'), true);
e.stop();
}
break;

case Event.KEY_RETURN:
Expand Down
2 changes: 2 additions & 0 deletions imp/package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Add Alt+Home and Alt+End hotkeys to navigate in preview pane (michael.menge@zdv.uni-tuebingen.de, Request #13983).
* [mjr] Add support for sending MDN via the API.
* [mjr] Add imap_preauthenticate hook.
* [mms] Report multiple spam/innocent messages in a single digest.
Expand Down Expand Up @@ -3875,6 +3876,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Add Alt+Home and Alt+End hotkeys to navigate in preview pane (michael.menge@zdv.uni-tuebingen.de, Request #13983).
* [mjr] Add support for sending MDN via the API.
* [mjr] Add imap_preauthenticate hook.
* [mms] Report multiple spam/innocent messages in a single digest.
Expand Down

0 comments on commit be701f3

Please sign in to comment.