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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4b2ebcb3
Commit
4b2ebcb3
authored
Oct 22, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 473557: Make the "Collapse All Comments" link work properly even when
the "comment order" preference is set to "newest to oldest with description at top" r=mkanat, a=mkanat
parent
ac80bc26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
comments.js
js/comments.js
+5
-5
comments.html.tmpl
template/en/default/bug/comments.html.tmpl
+2
-2
No files found.
js/comments.js
View file @
4b2ebcb3
...
...
@@ -44,18 +44,18 @@ function toggle_comment_display(link, comment_id) {
collapse_comment
(
link
,
comment
);
}
function
toggle_all_comments
(
action
,
comments_size
)
{
var
num_comments
=
comments_size
;
function
toggle_all_comments
(
action
)
{
// If for some given ID the comment doesn't exist, this doesn't mean
// there are no more comments, but that the comment is private and
// the user is not allowed to view it.
for
(
var
id
=
0
;
id
<
num_comments
;
id
++
)
{
var
comment
=
document
.
getElementById
(
'comment_text_'
+
id
);
var
comments
=
YAHOO
.
util
.
Dom
.
getElementsByClassName
(
'bz_comment_text'
);
for
(
var
i
=
0
;
i
<
comments
.
length
;
i
++
)
{
var
comment
=
comments
[
i
];
if
(
!
comment
)
continue
;
var
id
=
comments
[
i
].
id
.
match
(
/
\d
*$/
);
var
link
=
document
.
getElementById
(
'comment_link_'
+
id
);
if
(
action
==
'collapse'
)
collapse_comment
(
link
,
comment
);
...
...
template/en/default/bug/comments.html.tmpl
View file @
4b2ebcb3
...
...
@@ -82,9 +82,9 @@
<td>
[% IF mode == "edit" %]
<ul class="bz_collapse_expand_comments">
<li><a href="#" onclick="toggle_all_comments('collapse'
, [% comments.size %]
);
<li><a href="#" onclick="toggle_all_comments('collapse');
return false;">Collapse All Comments</a></li>
<li><a href="#" onclick="toggle_all_comments('expand'
, [% comments.size %]
);
<li><a href="#" onclick="toggle_all_comments('expand');
return false;">Expand All Comments</a></li>
[% IF user.settings.comment_box_position.value == "after_comments" && user.id %]
<li class="bz_add_comment"><a href="#"
...
...
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