oops: Fix incorrect email information lookup
oops: Ensure cid does not corrupt the regex
oops: Fix pass string by reference error
oops: Fix incorrect <div> for thread attachments
Merge pull request #883 from greezybacon/issue/oops-i-did-it-again

oops: Fix a few small issues

Reviewed-By: Peter Rotich <peter@osticket.com>
oops: Fixup cid detection in thread body (again)
Merge remote branch 'upstream/develop' into develop-next
content: Update content_id after creating new content
css: Fix datepicker and redactor overlay
thread: Always embed HTML in email templates

With the advent of 1.9, the original, plain text email is saved in the
thread table. If a system has the HTML ticket thread enabled (which is the
default), if the plain text message is placed in the email template (which
is always HTML), it will not be formatted as correct HTML and the whitespace
will be collapsed.

This patch addresses the issue by always returning HTML from the asVar()
method, which is used to embed the thread post into a email template.
pjax: Fix state corruption

If a new PJAX request is started before the current PJAX request finishes,
leave the user interface in a consistent state.

  * Finish and re-start the loadingbar animation
  * Ensure the overlay is hidden
  * Cancel all current animations (without using clearTimeout)

This also fixes other nuances such as the help tips not working after the
PJAX ui state was corrupted.
pjax: Release ticket when navigating away
Merge pull request #892 from greezybacon/issue/pjax-various

pjax: Various issues

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #887 from greezybacon/issue/885

css: Fix datepicker and redactor overlay

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #886 from greezybacon/issue/879

content: Update content_id after creating new content

Reviewed-By: Peter Rotich <peter@osticket.com>
thread: Detect inline and separate attachments

If an email contains both inline and separate attachments, the previous
logic would detect all the attachments as inline.

Separate attachments have the `cid` set to `false`. This will pass the
`isset` test, which would cause the logic to search through the body for a
string of `cid:`, which would very likely be found if there was another
inline image somewhere in the body of the email.
Change initial group names

This is necessary to avoid the confusion caused by group names like
"Managers" and "Staff".
html: Remove duplicate style properties

Also use single quotes instead of double quotes in style attributes which
do not require escaping to &quot;
pjax: Fix confusing POST resubmit

If an agent submits a page via a POST (like updating settings in the admin
panel or creating a ticket) and navigates away via PJAX, if the browser
refresh button were clicked sometime later, the browser would prompt the
user to resubmit the POST data.

This patch avoids the issue by setting the browser's current URL to itself,
which magically clears the POST data.

The proper fix for the issue would be with
[Post/Redirect/Get](http://en.wikipedia.org/wiki/Post/Redirect/Get) method,
which would redirect the browser to a page it could GET after a successful
POST. Therefore a subsequent GET would reload the GET request, not the POST.
However, that would be too much of an edit for now.

References:
http://stackoverflow.com/a/6077822/1025836
http://en.wikipedia.org/wiki/Post/Redirect/Get
Merge pull request #900 from greezybacon/issue/pjax-various

pjax: Fix confusing POST resubmit

Reviewed-By: Peter Rotich <peter@osticket.com>