diff options
author | David Lawrence <dkl@mozilla.com> | 2014-11-04 21:46:41 +0000 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-11-04 21:46:41 +0000 |
commit | f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f (patch) | |
tree | b95c7e398739df2b8447d93a32a1b10f2c9fc2e7 /template/en/default/bug | |
parent | fc62fd4082c76068c2062f4e50b88c0908db2be2 (diff) | |
download | bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar.gz bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar.bz2 bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.tar.xz bugs-f5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f.zip |
Revert Bug 330707 - Add optional support for MarkDown
Diffstat (limited to 'template/en/default/bug')
-rw-r--r-- | template/en/default/bug/comment.html.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/bug/comments.html.tmpl | 56 | ||||
-rw-r--r-- | template/en/default/bug/process/midair.html.tmpl | 1 |
3 files changed, 8 insertions, 61 deletions
diff --git a/template/en/default/bug/comment.html.tmpl b/template/en/default/bug/comment.html.tmpl index 76054f92a..96cbb63ed 100644 --- a/template/en/default/bug/comment.html.tmpl +++ b/template/en/default/bug/comment.html.tmpl @@ -32,16 +32,6 @@ <div id="comment_preview" class="bz_default_hidden bz_comment"> <div id="comment_preview_loading" class="bz_default_hidden">Generating Preview...</div> <div id="comment_preview_error" class="bz_default_hidden"></div> - <div id="comment_preview_text" class="bz_comment_text"></div> - </div> -[% END %] - -[% IF user.use_markdown %] - <div id="comment_markdown"> - <input type="checkbox" name="use_markdown" - id="use_markdown" value="1" checked="checked" - onchange="refresh_markdown_preview([% bug.id FILTER none %])"> - <label id="use_markdown_label" for="use_markdown">Use Markdown for this [% terms.comment %]</label> - (<a href="page.cgi?id=markdown.html" target="_blank" title="View Markdown Syntax Guide">help</a>) + <pre id="comment_preview_text" class="bz_comment_text"></pre> </div> [% END %] diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 3895691d7..d040e651d 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -14,16 +14,13 @@ <script type="text/javascript"> <!-- /* Adds the reply text to the 'comment' textarea */ - function replyToComment(id, real_id, name, text) { + function replyToComment(id, real_id, name) { var prefix = "(In reply to " + name + " from comment #" + id + ")\n"; var replytext = ""; [% IF user.settings.quote_replies.value == 'quoted_reply' %] /* pre id="comment_name_N" */ - - if (text == null) { - var text_elem = document.getElementById('comment_text_'+id); - text = getText(text_elem); - } + var text_elem = document.getElementById('comment_text_'+id); + var text = getText(text_elem); replytext = prefix + wrapReplyText(text); [% ELSIF user.settings.quote_replies.value == 'simple_reply' %] replytext = prefix; @@ -44,39 +41,6 @@ textarea.focus(); } - - function replyToMarkdownComment(id, real_id, name) { - var textarea = document.getElementById('comment'); - var comment = textarea.value; - textarea.value += "Fetching comment..."; - YAHOO.util.Connect.setDefaultPostHeader('application/json', true); - YAHOO.util.Connect.asyncRequest('POST', 'jsonrpc.cgi', - { - success: function(res) { - var data = YAHOO.lang.JSON.parse(res.responseText); - if (!data.error) { - textarea.value = comment; - var text = data.result.comments[real_id].text; - replyToComment(id, real_id, name, text); - } else { - replyToComment(id, real_id, name, null); - } - }, - failure: function(res) { - /* On failure, quote the comment as plain-text */ - replyToComment(id, real_id, name, null); - } - }, - YAHOO.lang.JSON.stringify({ - version: "1.1", - method: "Bug.comments", - params: { - Bugzilla_api_token: BUGZILLA.api_token, - comment_ids: [real_id], - } - }) - ); - } //--> </script> @@ -162,13 +126,7 @@ [% END %] [<a class="bz_reply_link" href="#add_comment" [% IF user.settings.quote_replies.value != 'off' %] - onclick=" - [% IF feature_enabled('jsonrpc') && comment.is_markdown %] - replyToMarkdownComment('[% comment.count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]'); return false;" - [% ELSE %] - replyToComment('[% comment.count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]', null); return false;" - - [% END %] + onclick="replyToComment('[% comment.count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]'); return false;" [% END %] >reply</a>] [% END %] @@ -267,12 +225,12 @@ [%# Don't indent the <pre> block, since then the spaces are displayed in the # generated HTML #%] -<[% user.use_markdown(comment) ? "div" : "pre" %] class="bz_comment_text[% " collapsed" IF comment.collapsed %]" +<pre class="bz_comment_text[% " collapsed" IF comment.collapsed %]" [% IF mode == "edit" || comment.collapsed %] id="comment_text_[% comment.count FILTER none %]" [% END %]> - [%- comment_text FILTER markdown(bug, comment) -%] -</[% user.use_markdown(comment) ? "div" : "pre" %]> + [%- comment_text FILTER quoteUrls(bug, comment) -%] +</pre> [% Hook.process('a_comment-end', 'bug/comments.html.tmpl') %] </div> [% END %] diff --git a/template/en/default/bug/process/midair.html.tmpl b/template/en/default/bug/process/midair.html.tmpl index f89590df2..17025fee7 100644 --- a/template/en/default/bug/process/midair.html.tmpl +++ b/template/en/default/bug/process/midair.html.tmpl @@ -76,7 +76,6 @@ You have the following choices: <input type="hidden" name="id" value="[% cgi.param("id") FILTER html %]"> <input type="hidden" name="delta_ts" value="[% bug.delta_ts FILTER html %]"> <input type="hidden" name="comment" value="[% cgi.param("comment") FILTER html %]"> - <input type="hidden" name="use_markdown" value="[% cgi.param("use_markdown") FILTER html %]"> <input type="hidden" name="comment_is_private" value="[% cgi.param("comment_is_private") FILTER html %]"> <input type="hidden" name="token" value="[% cgi.param("token") FILTER html %]"> |