Implemented forward/backward navigation with Ctrl-PgUp/PgDn/Home/End

SVN revision: 1886
This commit is contained in:
2007-07-13 15:04:24 +00:00
parent ba028e1805
commit 3e65413647
2 changed files with 90 additions and 28 deletions
+41
View File
@@ -213,3 +213,44 @@ function elKeyPress(evt)
return true;
}
function browse(evt)
{
evt = (evt) ? evt : window.event;
var unicode = evt.charCode ? evt.charCode : evt.keyCode;
var actualkey = String.fromCharCode(unicode);
if (evt.ctrlKey && !evt.shiftKey && !evt.altKey) {
if (browser == 'MSIE') {
if (unicode == 10)
unicode = 13;
else
unicode += 96;
actualkey = String.fromCharCode(unicode);
}
if (actualkey == "$") {
// home
window.location.href = "?cmd_first.x=1";
return false;
}
if (actualkey == "#") {
// end
window.location.href = "?cmd_last.x=1";
return false;
}
if (actualkey == "!") {
// page up
window.location.href = "?cmd_previous.x=1";
return false;
}
if (actualkey == "\"") {
// page down
window.location.href = "?cmd_next.x=1";
return false;
}
}
return true;
}