aboutsummaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-11-04 21:46:41 +0000
committerDavid Lawrence <dkl@mozilla.com>2014-11-04 21:46:41 +0000
commitf5fc4a6d6bf930607d8dd5cd7ffeb78a1044918f (patch)
treeb95c7e398739df2b8447d93a32a1b10f2c9fc2e7 /template/en
parentfc62fd4082c76068c2062f4e50b88c0908db2be2 (diff)
downloadbugs-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')
-rw-r--r--template/en/default/bug/comment.html.tmpl12
-rw-r--r--template/en/default/bug/comments.html.tmpl56
-rw-r--r--template/en/default/bug/process/midair.html.tmpl1
-rw-r--r--template/en/default/email/bugmail.html.tmpl2
-rw-r--r--template/en/default/filterexceptions.pl2
-rw-r--r--template/en/default/global/setting-descs.none.tmpl3
-rw-r--r--template/en/default/global/user-error.html.tmpl3
-rw-r--r--template/en/default/pages/linked.html.tmpl4
-rw-r--r--template/en/default/pages/markdown.html.tmpl265
-rw-r--r--template/en/default/setup/strings.txt.pl1
10 files changed, 13 insertions, 336 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 %]">
diff --git a/template/en/default/email/bugmail.html.tmpl b/template/en/default/email/bugmail.html.tmpl
index b0f4efb45..9473a4459 100644
--- a/template/en/default/email/bugmail.html.tmpl
+++ b/template/en/default/email/bugmail.html.tmpl
@@ -25,7 +25,7 @@
on [% "$terms.bug $bug.id" FILTER bug_link(bug, { full_url => 1, user => to_user }) FILTER none %]
from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]</b>
[% END %]
- <pre>[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %]</pre>
+ <pre>[% comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment, to_user) %]</pre>
</div>
[% END %]
</p>
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index f5f1bd783..6adbbcb95 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -20,7 +20,7 @@
# [% foo.push() %]
# TT loop variables - [% loop.count %]
# Already-filtered stuff - [% wibble FILTER html %]
-# where the filter is one of html|csv|js|quoteUrls|time|uri|xml|markdown|none
+# where the filter is one of html|csv|js|quoteUrls|time|uri|xml|none
%::safe = (
diff --git a/template/en/default/global/setting-descs.none.tmpl b/template/en/default/global/setting-descs.none.tmpl
index ac99094c5..6e3358782 100644
--- a/template/en/default/global/setting-descs.none.tmpl
+++ b/template/en/default/global/setting-descs.none.tmpl
@@ -44,8 +44,7 @@
"requestee_cc" => "Automatically add me to the CC list of $terms.bugs I am requested to review",
"bugmail_new_prefix" => "Add 'New:' to subject line of email sent when a new $terms.bug is filed",
"possible_duplicates" => "Display possible duplicates when reporting a new $terms.bug",
- "use_markdown" => "Enable Markdown support for $terms.comments"
- }
+ }
%]
[% Hook.process('settings') %]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index e9bdb63c4..a0ae25c08 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1181,9 +1181,6 @@
[%# Used for non-web-based LOGIN_REQUIRED situations. %]
You must log in before using this part of [% terms.Bugzilla %].
- [% ELSIF error == "markdown_disabled" %]
- Markdown feature is not enabled.
-
[% ELSIF error == "migrate_config_created" %]
The file <kbd>[% file FILTER html %]</kbd> contains configuration
variables that must be set before continuing with the migration.
diff --git a/template/en/default/pages/linked.html.tmpl b/template/en/default/pages/linked.html.tmpl
index ab74470c2..3fcf87952 100644
--- a/template/en/default/pages/linked.html.tmpl
+++ b/template/en/default/pages/linked.html.tmpl
@@ -18,7 +18,7 @@
<p>
<pre class="bz_comment_text">
-[%- cgi.param("text") FILTER markdown FILTER html -%]
+[%- cgi.param("text") FILTER quoteUrls FILTER html -%]
</pre>
</p>
@@ -33,7 +33,7 @@
<p>
<pre class="bz_comment_text">
-[%- cgi.param("text") FILTER markdown -%]
+[%- cgi.param("text") FILTER quoteUrls -%]
</pre>
</p>
diff --git a/template/en/default/pages/markdown.html.tmpl b/template/en/default/pages/markdown.html.tmpl
deleted file mode 100644
index 8b43f5f17..000000000
--- a/template/en/default/pages/markdown.html.tmpl
+++ /dev/null
@@ -1,265 +0,0 @@
-[%# this source code form is subject to the terms of the mozilla public
- # license, v. 2.0. if a copy of the mpl was not distributed with this
- # file, you can obtain one at http://mozilla.org/mpl/2.0/.
- #
- # this source code form is "incompatible with secondary licenses", as
- # defined by the mozilla public license, v. 2.0.
- #%]
-
-[% INCLUDE global/header.html.tmpl
- title = "Markdown Syntax Guide"
- bodyclasses = ['narrow_page']
- %]
-
-<h2>What is Markdown?</h2>
-
- Markdown is a simple text formatting language that enables you to write your
- [%+ terms.comments %] in plain-text and have them generated as HTML. Markdown
- in [%+ terms.Bugzilla %] supports the following structures:
-
- <ul>
- <li><a href="#headers">Headers</a></li>
- <li><a href="#blockquotes">Blockquotes</a></li>
- <li><a href="#emphasis">Emphasis</a></li>
- <li><a href="#lists">Lists</a></li>
- <li><a href="#code">Code</a></li>
- <li><a href="#strikethroughs">Strikethroughs</a></li>
- <li><a href="#links">Links</a></li>
- </ul>
-
-<h2 id="headers">Headers</h2>
-
- You have two options for making headers. First, you may use any number of
- equal signs (for first-level header) or dashes (for second-level headers).
-
- <p>
- <pre>
- <code>
- This is an H1 header
- ====================
-
- This is an H2 header
- --------------------
- </code>
- </pre>
- </p>
-
- Second, you can use hash signs at the beginning of the line to specify the
- level of the header from 1 to 6.
-
- <p>
- <pre>
- <code>
- # This is the largest header (H1 level)
- ### This is a small header (H3 level)
- ###### This is the smallest header (H6 level)
- </code>
- </pre>
- </p>
-
-<h2 id="blockquotes">Blockquotes</h2>
-
- Use a closing angle bracket (<code>&gt;</code>) at the beginning of the line
- to indicate a line as quoted.
-
- <p>
- <pre>
- <code>
- &gt; Some text to be quoted.
- </code>
- </pre>
- </p>
-
-<h2 id="emphasis">Emphasis</h2>
-
- Single underscores or asterisks will make the text italic. Double underscores
- or asterisks will make the text bold.
-
- <p>
- <pre>
- <code>
- _This text will become italic_
- *This text also will become italic*
-
- __But this one will be bold__
- **And this one as well**
- </code>
- </pre>
- </p>
-
- Turns into
-
- <p>
- <pre>
- <em>This text will become italic</em>
- <em>This text also will become italic</em>
- <br>
- <strong>But this one will be bold</strong>
- <strong>And this one as well</strong>
- </pre>
- </p>
-
- Use different signs to combine them nestedly in order to avoid ambiguity:
-
- <p>
- <pre>
- <code>
- _This [% terms.bug %] **must** be resolved ASAP._
- </code>
- </pre>
- </p>
-
- <strong>Note:</strong> [% terms.Bugzilla %] will skip emphasizing words that
- have the form of <code>multiple_underscore_in_a_word</code>. This measure is
- taken to not emphasize words that are possible programming variables. If your
- word has this form and you still want it to become emphasized/bold, you must
- use single/double asterisks (<code>*</code>) instead of underscores
- (<code>_</code>).
-
-<h2 id="lists">Lists</h2>
-
- Markdown supports both unordered and ordered lists.
-
- <h3>Unordered Lists</h3>
-
- Use asterisks (<code>*</code>), pluses (<code>+</code>) or hyphens
- (<code>-</code>) to mark the items of an unordered list.
-
- <p>
- <pre>
- <code>
- + First item
- + Second item
- + Third item
- </code>
- </pre>
- </p>
-
- <h3>Ordered Lists</h3>
-
- Use a number followed by a period to denote an item of an ordered list.
-
- <p>
- <pre>
- <code>
- 1. Item one
- 4. Item two
- 3. Item three
- </code>
- </pre>
- </p>
-
- <strong>Note:</strong> Your numbers have no effect on the rendered item
- numbers and the rendered numbers are automatically generated. Your numbers
- are only used to specify the items of an ordered list.<br>
-
- <p>
- A list item can have nested lists recursively:
- </p>
-
- <p>
- <pre>
- <code>
- 1. Item one
- 4. Item two
- 3. Item three
- * First sub-item
- * Second sub-item
- 5. Item four
- </code>
- </pre>
- </p>
-
-<h2 id="code">Code</h2>
-
- To make a part of your text to get generated as a piece of code, use one or
- more backticks (<code>`</code>) and close that
- part with the same number of backticks.
-
- <p>
- <pre>
- <code>Please see the manual for `printf` function.</code>
- </pre>
- </p>
-
- If you want to make some lines of code, you need to use 3 or more backticks at
- the beginning of a line followed by your code lines and concluded by 3 or more
- backticks.
-
- <p>
- <pre>
- <code>
- See my function:
- ```
- int sum(int x, int y) {
- return x + y;
- }
- ```
- </code>
- </pre>
- </p>
-
- You can also use a tab or [% constants.MARKDOWN_TAB_WIDTH FILTER html %] or
- more spaces at the beginning of each line of your code to make the whole block
- look as a code block. Please take care that you might make your lines as code
- blocks by inadvertently indenting them.
-
-<h2 id="strikethroughs">Strikethroughs</h2>
-
- Surround your text between a pair of two tildes to have your text crossed out.
-
- <p>
- <pre>
- <code>
- Module ~~Foo~~ is deprecated.
- </code>
- </pre>
- </p>
-
-<h2 id="links">Links</h2>
-
- Literal URLs and Email addresses get linkified automatically. Besides that,
- you can define links with link texts and titles. You may define your links
- either as inline or as a reference. To define a link as inline, put your link
- text in square bracket immediately followed by a pair of parentheses which
- containts the URL that you want your link to point to and an <em>optional</em>
- link title surrounded by quotes.
-
- <p>
- <pre>
- <code>
- This is [Bugzilla](http://www.bugzilla.org "View Bugzilla Homepage")
- [% terms.bug %] tracking system.</code>
- This [example link](http://www.example.com) does not have title.
- </code>
- </pre>
- </p>
-
- To define your links in a reference style, define your links any where in
- your [% terms.comment %] with the following format:
-
- <p>
- <pre>
- <code>
- [bz]: http://www.bugzilla.org "Bugzilla Homepage"
- [mz]: http://www.mozilla.org (Mozilla Homepage)
- </code>
- </pre>
- </p>
-
- That is, define a unique ID for each link in square brackets with their
- corresponding URL and optional title in quotes or parentheses. Then, point to
- those links simply by writing your link text in square brackets followed by
- the ID in another pair of square brackets.
-
- <p>
- <pre>
- <code>
- [Bugzilla][bz] is open-sourced server software designed to help groups
- manage software development. [Mozilla][mz] uses [Bugzilla][bz] to track
- issues with Firefox and other projects.
- </code>
- </pre>
- </p>
-
-[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl
index 6de588e6d..7dc8e8bf1 100644
--- a/template/en/default/setup/strings.txt.pl
+++ b/template/en/default/setup/strings.txt.pl
@@ -101,7 +101,6 @@ END
feature_xmlrpc => 'XML-RPC Interface',
feature_detect_charset => 'Automatic charset detection for text attachments',
feature_typesniffer => 'Sniff MIME type of attachments',
- feature_markdown => 'Markdown syntax support for comments',
file_remove => 'Removing ##name##...',
file_rename => 'Renaming ##from## to ##to##...',