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
384a1c65
Commit
384a1c65
authored
Jun 16, 2014
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 956892: collapsed comments should display tags to indicate the reason for auto-collapsing
r=gerv,a=sgreen
parent
80c434b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
6 deletions
+44
-6
comments.js
js/comments.js
+5
-3
global.css
skins/standard/global.css
+14
-1
comments.html.tmpl
template/en/default/bug/comments.html.tmpl
+25
-2
No files found.
js/comments.js
View file @
384a1c65
...
...
@@ -23,11 +23,11 @@ function updateCommentPrivacy(checkbox, id) {
function
toggle_comment_display
(
link
,
comment_id
)
{
var
comment
=
document
.
getElementById
(
'comment_text_'
+
comment_id
);
var
re
=
new
RegExp
(
/
\b
collapsed
\b
/
);
if
(
comment
.
className
.
match
(
re
))
if
(
YAHOO
.
util
.
Dom
.
hasClass
(
comment
,
'collapsed'
))
{
expand_comment
(
link
,
comment
,
comment_id
);
else
}
else
{
collapse_comment
(
link
,
comment
,
comment_id
);
}
}
function
toggle_all_comments
(
action
)
{
...
...
@@ -61,6 +61,8 @@ function collapse_comment(link, comment, comment_id) {
function
expand_comment
(
link
,
comment
,
comment_id
)
{
link
.
innerHTML
=
"[−]"
;
YAHOO
.
util
.
Dom
.
addClass
(
'cr'
+
comment_id
,
'collapsed'
);
YAHOO
.
util
.
Dom
.
removeClass
(
'c'
+
comment_id
,
'bz_default_collapsed'
);
YAHOO
.
util
.
Dom
.
removeClass
(
comment
,
'collapsed'
);
YAHOO
.
util
.
Dom
.
removeClass
(
'comment_tag_'
+
comment_id
,
'collapsed'
);
}
...
...
skins/standard/global.css
View file @
384a1c65
...
...
@@ -372,6 +372,11 @@ div#docslinks {
padding
:
1em
0
;
}
.bz_comment_collapse_reason
,
.bz_default_collapsed
.bz_comment_number
{
font-weight
:
normal
;
}
/** End Comments **/
.bz_default_hidden
,
.bz_tui_hidden
,
.bz_hidden_field
,
.bz_hidden_option
{
...
...
@@ -558,7 +563,15 @@ div.user_match {
padding
:
0.5em
1em
;
}
.collapsed
{
.collapsed
,
.bz_default_collapsed
.bz_private_checkbox
,
.bz_default_collapsed
.bz_comment_user
,
.bz_default_collapsed
.bz_comment_user_images
,
.bz_default_collapsed
.bz_comment_time
,
.bz_default_collapsed
.bz_comment_tags
,
.bz_default_collapsed
.bz_comment_text
,
.bz_default_collapsed
.bz_collapsed_actions
{
display
:
none
;
}
...
...
template/en/default/bug/comments.html.tmpl
View file @
384a1c65
...
...
@@ -102,6 +102,7 @@
[% RETURN IF comment_text == '' AND (comment.work_time - 0) != 0 AND !user.is_timetracker %]
<div id="c[% comment.count %]" class="bz_comment[% " bz_private" IF comment.is_private %]
[% " bz_default_collapsed" IF comment.collapsed %]
[% " bz_comment_hilite" IF marks.${comment.count} %]
[% " bz_first_comment" IF comment.count == 0 %]">
[% IF comment.count == 0 %]
...
...
@@ -115,6 +116,9 @@
<div class="[% class_name FILTER html %]">
[% IF mode == "edit" %]
<span class="bz_comment_actions">
[% IF comment.collapsed %]
<span class="bz_collapsed_actions">
[% END %]
[% IF bug.check_can_change_field('longdesc', 0, 1) %]
[% IF user.can_tag_comments %]
[<a href="#"
...
...
@@ -126,6 +130,15 @@
[% END %]
>reply</a>]
[% END %]
[% IF comment.collapsed %]
</span>
[% END %]
<script type="text/javascript">
addCollapseLink([% comment.count %], [% comment.collapsed FILTER js %], 'Toggle comment display');
</script>
</span>
[% ELSIF comment.collapsed %]
<span class="bz_comment_actions">
<script type="text/javascript">
addCollapseLink([% comment.count %], [% comment.collapsed FILTER js %], 'Toggle comment display');
</script>
...
...
@@ -173,6 +186,14 @@
<span class="bz_comment_time">
[%+ comment.creation_ts FILTER time %]
</span>
[% IF comment.collapsed %]
<span id="cr[% comment.count %]" class="bz_comment_collapse_reason"
title="[% comment.author.name || comment.author.login FILTER html %]
[%~ %] [[% comment.creation_ts FILTER time %]]">
Comment hidden ([% comment.tags.join(', ') FILTER html %])
</span>
[% END %]
</div>
[% IF user.is_timetracker &&
...
...
@@ -184,7 +205,7 @@
[% IF user.id && Param('comment_taggers_group') %]
<div id="comment_tag_[% comment.count FILTER html %]"
class="bz_comment_tags
[% " collapsed" IF comment.collapsed %]
">
class="bz_comment_tags">
<span id="ct_[% comment.count %]"
class="[% 'bz_default_hidden' UNLESS comment.tags.size %]">
[% IF comment.tags.size %]
...
...
@@ -205,7 +226,9 @@
# generated HTML
#%]
<pre class="bz_comment_text[% " collapsed" IF comment.collapsed %]"
[% ' id="comment_text_' _ comment.count _ '"' IF mode == "edit" %]>
[% IF mode == "edit" || comment.collapsed %]
id="comment_text_[% comment.count FILTER none %]"
[% END %]>
[%- comment_text FILTER quoteUrls(bug, comment) -%]
</pre>
</div>
...
...
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