Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
138c15b1
Commit
138c15b1
authored
Feb 11, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 375382: When viewing a bug, make obsolete attachments hidden by default
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
parent
6a10905a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
list.html.tmpl
template/en/default/attachment/list.html.tmpl
+21
-20
No files found.
template/en/default/attachment/list.html.tmpl
View file @
138c15b1
...
...
@@ -20,33 +20,32 @@
#%]
<script type="text/javascript">
<!--
function toggle_display(link) {
<!--
function toggle_display(link) {
var table = document.getElementById("attachment_table");
var rows = table.getElementsByTagName("tr");
var originalHeight = table.offsetHeight; // Store current height for scrolling
// Store current height for scrolling later
var originalHeight = table.offsetHeight;
var rows = YAHOO.util.Dom.getElementsByClassName(
'bz_tr_obsolete', 'tr', table);
var toggle;
if (link.innerHTML == "Show Obsolete") {
toggle = ""; // This should be 'table-row', but IE 6 doesn't understand it.
link.innerHTML = "Hide Obsolete";
}
else {
toggle = "none";
link.innerHTML = "Show Obsolete";
for (var i = 0; i < rows.length; i++) {
bz_toggleClass(rows[i], 'bz_default_hidden');
}
for (var i = 0; i < rows.length; i++) {
if (rows[i].className.match('bz_tr_obsolete'))
rows[i].style.display = toggle;
if (YAHOO.util.Dom.hasClass(rows[0], 'bz_default_hidden')) {
link.innerHTML = "Show Obsolete";
}
else {
link.innerHTML = "Hide Obsolete";
}
var newHeight = table.offsetHeight;
// This scrolling makes the window appear to not move at all.
window.scrollBy(0, newHeight - originalHeight);
return false;
}
//-->
}
//-->
</script>
<br>
...
...
@@ -66,8 +65,9 @@
[% IF attachment.isobsolete %]
[% obsolete_attachments = obsolete_attachments + 1 %]
[% END %]
<tr class="[% "bz_private" IF attachment.isprivate %][%-%]
[%+ "bz_tr_obsolete" IF attachment.isobsolete %]">
<tr class="[% "bz_private" IF attachment.isprivate %]
[% " bz_tr_obsolete bz_default_hidden"
IF attachment.isobsolete %]">
<td valign="top">
[% IF attachment.datasize %]
<a name="a[% count %]" href="attachment.cgi?id=[% attachment.id %]"
...
...
@@ -131,7 +131,8 @@
[% IF attachments.size %]
<span class="bz_attach_view_hide">
[% IF obsolete_attachments %]
<a href="#a0" onClick="return toggle_display(this);">Hide Obsolete</a> ([% obsolete_attachments %])
<a href="#a0" onclick="return toggle_display(this);">Show
Obsolete</a> ([% obsolete_attachments %])
[% END %]
[% IF Param("allow_attachment_display") %]
<a href="attachment.cgi?bugid=[% bugid %]&action=viewall">View All</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment