Commit Graph

5 Commits

Author SHA1 Message Date
Steve Howell 7e4702c9c1 Avoid double-escaping HTML for settings notifications.
The i18n.t function already escapes HTML, so we should avoid
calling jQuery's text() method, which double escapes the HTML.

The symptom reported here was that if you changed your
timezone to something like like America/Mexico_City, you'd
see `/` instead of `/`.

Most callers to the `ui_report` functions clearly call `i18n.t`
on the messages with code like this:

    ui_report.success(i18n.t("No changes to save!"), status);

There are some exceptions:

    blueslip.js: has really long hard coded messages
    reload.js: mostly says "Reloading...", which perhaps we should
               translate
    settings_account.js: uses helper functions
    settings_lab.js: uses local variable
    settings_org.js: i18n happens in property_types
    ui.js: uses generic_embed_error (unaffected by this change)

Fixes #7280
2017-11-07 09:52:20 -08:00
Brock Whittaker 32af99cd4d Display an error for the ZulipDesktop unsupported platform.
This displays an error at the top of the screen on page load that
will inform any user with the userAgent string "ZulipDesktop" that
they should upgrade to our newer electron app

Fixes: #6551.
2017-09-16 03:01:51 -07:00
Harshit Bansal 6615f2f2e8 common.js: Migrate `common.js` module to use IIFE module style.
This module was exposing its functions as globals. This PR fixes
it use the IIFE module style that we use in our other modules.
2017-06-22 19:06:32 -04:00
Brock Whittaker 34f9ccb87c alerts: Change sidebar alerts to be at top of the screen.
This changes the alerts to be individual boxes that slide down from
the top of the screen for a better UI experience.
2017-04-03 16:22:05 -07:00
Steve Howell 2d52463b61 Extract ui_report.js.
This moves the implementations of error/report/message from
ui.js to ui_report.js.  They had been shimmed before, so calling
modules still use the same names to call the functions, but we
no longer need the shims.
2017-04-03 07:13:25 -07:00