diff options
-rw-r--r-- | extensions/BMO/web/styles/edit_bug.css | 5 | ||||
-rw-r--r-- | skins/standard/global.css | 4 | ||||
-rw-r--r-- | template/en/default/bug/comments.html.tmpl | 26 |
3 files changed, 34 insertions, 1 deletions
diff --git a/extensions/BMO/web/styles/edit_bug.css b/extensions/BMO/web/styles/edit_bug.css index 901d3befb..089a92fbb 100644 --- a/extensions/BMO/web/styles/edit_bug.css +++ b/extensions/BMO/web/styles/edit_bug.css @@ -31,3 +31,8 @@ .bz_hidden { display: none; } + +.bz_collapse_comment { + font-family: monospace; +} + diff --git a/skins/standard/global.css b/skins/standard/global.css index 49842554e..47cebdeac 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -365,6 +365,10 @@ div#docslinks { white-space: pre; } +.bz_comment_text span.quote_wrapped { + color: #65379c; +} + table#flags th, table#flags td { vertical-align: middle; diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 0c0f959f6..5b90c1720 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -57,7 +57,27 @@ } textarea.focus(); - } + } + + function toggleCommentWrap(a, id) { + var spans = document.getElementById('comment_text_' + id).getElementsByTagName('span'); + var old_class; + var new_class; + if (a.innerHTML == 'wrap') { + a.innerHTML = 'unwrap'; + old_class = 'quote'; + new_class = 'quote_wrapped'; + } else { + a.innerHTML = 'wrap'; + old_class = 'quote_wrapped'; + new_class = 'quote'; + } + for (var i = 0, l = spans.length; i < l; i++) { + if (spans[i].className == old_class) + spans[i].className = new_class; + } + return false; + } //--> </script> @@ -146,6 +166,10 @@ [% IF mode == "edit" %] <span class="bz_comment_actions"> + [% IF comment_text.search("(?:^>|\n>)") %] + [<a class="bz_wrap_link" href="#" + onclick="return toggleCommentWrap(this, [% count %])">wrap</a>] + [% END %] [<a class="bz_reply_link" href="#add_comment" [% IF user.settings.quote_replies.value != 'off' %] onclick="replyToComment('[% count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]'); return false;" |