Show the close description on the diff viewer page.

The close description was only shown on the review request page,
not on the diff viewer page, despite showing the banner. This now
adds the close description there as well.

Fixes bug #2913
Merge branch 'release-1.7.x'
Fix some more style issues with rendered Markdown text.

This fixes the lists to wrap correctly. We're back to native bullet
points, but now things line up correctly. Nested lists also now work,
whereas before they were flat.

The pre-wrap white-space mode has been turned off for all non-code
elements, fixing some other spacing problems.
Show a spinner before rendering markdown text or diff index.

When displaying a review request, there's a brief moment of time before
Markdown gets rendered or before the diff table is loaded where things
look wrong. For the Markdown fields (namely the Description and Testing
Done fields), the raw Markdown is shown first, and then switches to the
rendered text, which looks bad. The diff index shows a big line before
displaying its contents.

These now are marked as loading at first, and we'll show spinners. Once
the page has successfully loaded, the spinners go away and the rendered
content appears.

We also try to render the text for these fields a bit sooner than we did
before, hopefully reducing the load time.
Fix the grip image on the comment dialog.

When we added the jquery-ui stylesheet, and upgraded jquery-ui, it broke
our custom grip image on the comment dialog. That image remained, but an
arrow overlayed it.

This brings it back, and in a cleaner way. We don't add it through
JavaScript anymore. Instead, we just set the CSS rule for that icon.

It now looks as it did in earlier versions.
Set the rich-text info for new replies.

Replies were properly stored as rich-text, but the elements being
created for them didn't represent that, requiring a reload to see the
rendered markdown content. We now set this on the template for replies.
Fix a breakage with the recent close description fix.

The recent close description fix didn't default a variable, breaking the
diff viewer due to a "referenced before assignment" error. This is now
fixed.
Use CodeMirror as the new text field for editing Markdown.

The big problem with Markdown input was that it was too easy to
unintentionally add characters that would render text differently, such
as _, or `. While it wasn't a big deal for things like the review
request description fields, it was a problem for comments, as you
wouldn't know until you published how they look.

To fix this, I've added CodeMirror as a dependency, as integrated it
with all our edit fields. Now, instead of a textarea with just plain
text, there's a syntax-highlighted editor that otherwise behaves just
like a textarea.

CodeMirror itself is hidden behind a new view, MarkdownEditorView. This
is the view used for all text fields now. It provides a convenient way
to integrate in with inlineEditor as well.

All the benefits we had before are still there. CodeMirror does a good
job of feeling native on each platform, and it can autogrow the text
fields to fit the content, just like textarea with autoSizeTextArea.

What it doesn't do is syntax-highlight any code added in the Markdown
text (like Python). It could, but it means adding a bunch of
dependencies for each highlighter, which are bulkier than those in
google-code-prettify (due to also being tokenizers). Even with those
added, it requires an explicit ```language block in order to highlight
them.

It will, however, highlight that they are code blocks, so we have that
at least.
Render markdown fields for HTML emails.

This change adds some slightly questionable code to render markdown to HTML for
the HTML emails. Annoyingly, python markdown doesn't interpret the input quite
the same as marked.js, so some things don't render the same (this is mostly
edge cases, particularly with the treatment of things like whether lists
require a blank line before them or not).

This includes a simple extension for python-markdown that will go through the
resulting element tree and add inline styles. These styles are similar to what
we get from reviews.less, but somewhat simplified.

Testing done:
Viewed the html email previews for review requests, reviews, and replies with
markdown in the review request fields, review body_top/bottom, and comments.
Saw all of the fields rendered to markdown, instead of seeing all the control
and escape characters.

Reviewed at https://reviews.reviewboard.org/r/4844/
Fix the size of the floating collapse button in the diff viewer.

The floating collapse button, when in position: fixed mode, was
appearing as wide as the remainder of the diff viewer. This was due to
not specifying any width, which the old one did (as it was an <img/>
tag). We now specify that width/height appropriately.
Set up review request form fields before formatting text.

My recent change to load form fields earlier placed the calls to
formatText too soon. It needed to be called after form fields are set
up, or properties would be missing on the inlineEditor.  Those are now
moved to be set up first.
Add a note to the .rich-text styles about email_markdown.py

I meant to add this to my previous change which added markdown rendering for
HTML, but I forgot to commit it before pushing, so it just sat in my working
dir. Trivial change.
Update locale files.

Just a simple run of makemessages, in preparation for uploading to transifex.
Change MarkdownEditor to allow tabbing between form elements.

CodeMirror, by default, handles tabs specially, as it's intended for
editing source code. We want them to behave closer to textareas, so we
want the Tab key to switch focus instead. This turns off CodeMirror's
tab support.
Change default timezone to UTC

Commit 107ce3e3721c5517f345595a5740f2108e40e015 changed the pytz requirement to
be >= 2012h because versions earlier than that do not support the US/Pacific
designation of the timezone, which Review Board was using as a default. This
makes it difficult or impossible to install Review Board on Linux distributions
with an older version of pytz.

This patch changes the default timezone to UTC, which should be available in
all versions of pytz since time out of memory. With this, we can drop the pytz
strict version requirement as well, trusting that the platform version will
support UTC.
Merge branch 'release-1.7.x'
Lighten the deleted lines color in the diff viewer.

The deleted lines color in the diff viewer was still a lot darker than
the insert and replace lines, and the contrast with the move flags
weren't great. This lightens it a bit more, making it appear a lot
closer to the other colors, and making it easier to read.
Improve the style of the move indicator flags.

The move indicator flags were very noisy things. There was a flag for
every moved line, which made it harder to see that a range was moved as
a whole, if two ranges were right up against each other.

This changes the design to only have a flag for the first line in a
range, and not subsequent lines. Those are indicated by a tail on the
flag, or a flag pole perhaps.

This reduces the visual noise considerably, at the expense of only
allowing the first row to be clickable to jump lines. That's a necessity
due to the limitations in how we can represent this style in CSS (as we
cannot properly represent each row of that flag pole as an element with
the proper height in a TD without javascript).
Document Markdown support.

This change adds some relatively thorough documentation for using markdown.
The bulk of this is a page called "Using Markdown" which gives a quick overview
of the basics of markdown syntax for the things most people will care about. I
haven't made this an exhaustive document, since the pages on daring fireball
and github serve that purpose. Instead, this should hopefully be a nice quick
reference for the basics of markdown syntax as interpreted by Review Board.

This is linked to from all the various places where markdown can be used.

While I was in here, I updated everything to capitalize "Markdown", including
in the MD review UI docs, and capitalized the terms in the glossary (which
looks much better to me).

Testing done:
* Generated HTML docs and read through everything.
* Checked cross-linking.

Reviewed at https://reviews.reviewboard.org/r/4834/
Fix update notifications on review UI pages.

Review UI pages never had the last activity timestamp set for the review
request, which meant that within a few minutes of viewing the page, an
update notification would display. This passes that variable in the
context for the page.