Revert "Experimental navigation: t and b keys"

This reverts commit 13fb245f86ab84b1d2faea9d2a1f2145cd4aa907.

(Waseem wanted to hold off on adding more hot keys.)

(imported from commit 97c25ffa01fd7058fc90a278887d85b7d82a268a)
This commit is contained in:
Steve Howell 2013-05-29 17:34:42 -04:00
parent b159373153
commit fc2c5eb70a
3 changed files with 0 additions and 52 deletions

View File

@ -35,14 +35,6 @@
<td class="hotkey">End</td>
<td class="definition">Last message</td>
</tr>
<tr>
<td class="hotkey">t</td>
<td class="definition">Move selection to top</td>
</tr>
<tr>
<td class="hotkey">b</td>
<td class="definition">Move selection to bottom</td>
</tr>
</table>
<table class="hotkeys_table table table-striped table-bordered table-condensed">

View File

@ -199,13 +199,6 @@ function process_hotkey(e) {
case 63: // '?': Show keyboard shortcuts page
$('#keyboard-shortcuts').modal('show');
return true;
case 116: // 't'
ui.anchor_to_top();
return true;
case 98: // 'b'
ui.anchor_to_bottom();
return true;
}
return false;

View File

@ -59,31 +59,6 @@ exports.message_viewport_info = function () {
return res;
};
function pointer_distance_from_top() {
var res = exports.message_viewport_info();
var selected_row = current_msg_list.selected_row();
var selected_row_offset = selected_row.offset().top;
var delta = selected_row_offset - res.visible_top;
delta -= 20; // padding
if (delta < 0) delta = 0;
return delta;
}
function pointer_distance_to_bottom() {
var res = exports.message_viewport_info();
var selected_row = current_msg_list.selected_row();
var selected_row_bottom = selected_row.offset().top + selected_row.height();
var visible_bottom = res.visible_top + res.visible_height;
var delta = visible_bottom - selected_row_bottom;
delta -= 5; // padding
if (delta < 0) delta = 0;
return delta;
}
function amount_to_paginate() {
// Some day we might have separate versions of this function
// for Page Up vs. Page Down, but for now it's the same
@ -128,18 +103,6 @@ exports.page_down_the_right_amount = function () {
viewport.scrollTop(viewport.scrollTop() + delta);
};
exports.anchor_to_top = function () {
var delta = pointer_distance_from_top();
suppress_scroll_pointer_update = true;
viewport.scrollTop(viewport.scrollTop() + delta);
};
exports.anchor_to_bottom = function () {
var delta = pointer_distance_to_bottom();
suppress_scroll_pointer_update = true;
viewport.scrollTop(viewport.scrollTop() - delta);
};
function find_boundary_tr(initial_tr, iterate_row) {
var j, skip_same_td_check = false;
var tr = initial_tr;