Commit Graph

17 Commits

Author SHA1 Message Date
Armaan Ahluwalia 6d255efe4c app: Prepare JS files for consumption by webpack.
This commit prepares the frontend code to be consumed by webpack.

It is a hack: In theory, modules should be declaring and importing the
modules they depend on and the globals they expose directly.

However, that requires significant per-module work, which we don't
really want to block moving our toolchain to webpack on.

So we expose the modules by setting window.varName = varName; as
needed in the js files.
2018-07-05 10:53:36 +02:00
Shubham Dhama dcb6254a4e eslint: Enable `no-extra-parens` rule.
Following sub-configuration is disabled:
                "nestedBinaryExpressions": false,
2018-06-11 07:51:24 -04:00
Yago González 67433691a9 templates: Fix typo in error message. 2017-06-26 19:33:25 -04:00
kevv87 e6369fc29b eslint: change no-plusplus from warning to 2 and fix violations. 2016-12-01 14:27:17 -08:00
Tim Abbott 30c654f83f templates: Fix stack traces throwing handlebars errors.
This fixes the fact that we weren't using `throw` correctly, and also
the "handlerbars" typo.

Fixes #2143.
2016-10-27 22:06:56 -07:00
acrefoot c671ae22d1 Error better when handlebars template is missing (#1338)
Currently if you try to use a non-existent handlebars
template, you get this error:

Uncaught TypeError: Handlebars.templates[name] is not a function

This change makes it a little more clear what the issue is
and what the fix would be.
2016-07-20 15:56:27 -07:00
Umair Khan 82b5d9304b [third] Integrate i18next with Handlebars 2016-05-19 22:58:25 -07:00
Kartik Maji 206452c867 Add stream subscription button added narrowed views.
Fixes: #273
2016-05-18 20:06:23 -07:00
Jessica McKellar c96ceeaea4 Add a handlebars helper for variadic compound OR conditions.
(imported from commit 9f08e998f9f699c05ccf3f5948fe3361a3834ba1)
2014-03-03 16:08:32 -05:00
Zev Benjamin 865c57fa72 Allow our template partials to take additional named arguments
(imported from commit 20e7dae7b5d27ee34936d400394357fc31c8e628)
2014-02-27 20:25:32 -05:00
Steve Howell 2504baf783 Use compiled.js in dev environments.
Make our dev setup more similar to prod by using compiled.js,
instead of AJAX-ing templates on the fly and compiling them
with non-node code.  This will make our dev environment more
consistent with prod (to avoid surprising bugs), plus it should
be faster (fewer AJAX calls).

This change also means we don't have to keep two copies
of static/third/handlebars/handlebars.js around.

(imported from commit d8d584b9aa13adcdcce7e424033610d77d2df79b)
2014-01-10 21:39:04 -05:00
Steve Howell c53845a69c Add unit tests for stream_list.
(imported from commit 1d04a2e6115f29b7949466260ec2ba3126b882e6)
2013-11-27 15:09:20 -05:00
Scott Feeney 967d0f7473 Don't wait for DOM ready to register Handlebars helpers
This fixes a bug (hit by a branch of mine) wherein you could not
render Handlebars templates from a DOM-ready callback in a file that
came before templates.js alphabetically.

(imported from commit 48091d016776eb6f12d33db199781e776af18fc5)
2013-08-27 15:32:20 -04:00
Jessica McKellar f7784a2f1d Add a handlebars helper for variadic compound AND conditions.
e.g., from a comment in the commit:

// Execute the conditional code if all conditions are true.
// Example usage:
//     {{#if_and cond1 cond2 cond3}}
//         <p>All true</p>
//     {{/if_and}}

We'll use this for the email forwarding UI, but it may also be
generally useful, and easy to generalize to OR.

(imported from commit da601f94d9da300213ff46be50255135c014eca0)
2013-08-13 14:28:47 -04:00
Kevin Mehall eac6463031 Implement message summarization experiment.
When you read messages in a narrow and then un-narrow, collapse
adjacent messages read in the narrow into a summary row that can
be clicked to expand those messages.

Scoped to staging with feature flags.

The implementation of this within our current MessageList is rather ugly.

(imported from commit bcb3a39d8c0c334136fe86318f18ead03f0f50bf)
2013-08-07 10:24:03 -04:00
Tim Abbott 5a320db3c1 Add curly braces for all javascript if statements lacking them.
(imported from commit 32c7643d1a6ecdfaf634424d217938c8a368dade)
2013-08-01 11:47:54 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00