summaryrefslogtreecommitdiffstats
path: root/template/en/default/attachment
diff options
context:
space:
mode:
authorreed%reedloden.com <>2006-12-27 10:14:39 +0100
committerreed%reedloden.com <>2006-12-27 10:14:39 +0100
commite3aed7515a6e413a9c9152493a2c98af7b94c671 (patch)
treeea08c0f749aec85640596f49449b0df55ef788c2 /template/en/default/attachment
parentd8d2ca30e3780b4693ba42a0315e3f00f1884ebc (diff)
downloadbugzilla-e3aed7515a6e413a9c9152493a2c98af7b94c671.tar.gz
bugzilla-e3aed7515a6e413a9c9152493a2c98af7b94c671.tar.xz
Bug 364952 - "Clicking "Hide/Show Obsolete" link should not scroll show_bug page" [p=reed/Hannibal r=LpSolit a=justdave]
Diffstat (limited to 'template/en/default/attachment')
-rw-r--r--template/en/default/attachment/list.html.tmpl7
1 files changed, 6 insertions, 1 deletions
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl
index 57840db03..5da894e07 100644
--- a/template/en/default/attachment/list.html.tmpl
+++ b/template/en/default/attachment/list.html.tmpl
@@ -25,6 +25,7 @@
function toggle_display(link) {
var table = document.getElementById("attachment_table");
var rows = table.getElementsByTagName("tr");
+ var originalHeight = table.offsetHeight; // Store current height for scrolling
var toggle;
if (link.innerHTML == "Show Obsolete") {
@@ -40,7 +41,11 @@
if (rows[i].className.match('bz_tr_obsolete'))
rows[i].style.display = toggle;
}
- return true;
+
+ var newHeight = table.offsetHeight;
+ window.scrollBy(0, newHeight - originalHeight);
+
+ return false;
}
//-->
</script>