Ezio Melotti <ezio.melo...@gmail.com> added the comment:
Attached patch tweaks the end key to jump to the last message rather than the
end of the page when pressed for the first time. After the first hit, the
normal 'end' behavior is restored.
I'll revert the history folding and apply this instead, to see how it works.
_______________________________________________________
PSF Meta Tracker <metatrac...@psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue401>
_______________________________________________________
Index: issue.item.js
===================================================================
--- issue.item.js (revision 88844)
+++ issue.item.js (working copy)
@@ -43,15 +43,14 @@
}
$(document).ready(function() {
- /* Add a "Show/Hide history" button that (un)folds the history. See #401 */
- var th = $('<td colspan="4">Show History</td>');
- th.css({'cursor': 'pointer', 'text-align': 'center',
- 'border': '1px solid #ccc'});
- /* select and hide all the tr except the first one ("History") */
- $('table.history tr:not(:first-child)').toggle();
- th.click(function() {
- $('table.history tr:not(:first-child):not(#togglehistory)').toggle();
- th.text(th.text() == 'Show History' ? 'Hide History' : 'Show History');
+ var offset = $('table.messages tr th a:last').offset()
+ $(document).keydown(function (event) {
+ var node = event.target.nodeName;
+ if ((event.keyCode == 35) && (node != 'TEXTAREA')
+ && (node != 'INPUT') && (node != 'SELECT')) {
+ window.scrollTo(offset.left, offset.top);
+ $(document).unbind('keydown')
+ return false;
+ }
});
- $('table.history').append(th.wrap('<tr id="togglehistory">').parent());
})
_______________________________________________
Tracker-discuss mailing list
Tracker-discuss@python.org
http://mail.python.org/mailman/listinfo/tracker-discuss