Tim Abbott
d6acd8fce9
Add support for narrowing to a single message ID.
...
This is mostly useful for sending someone a link to a single Humbug
message.
(imported from commit b0994a2bf503c84690b13ce89bbcf5bab829bf0c)
2013-07-31 14:59:05 -04:00
Tim Abbott
ed6f5ac470
Fix time travel by adding new near: operator.
...
(imported from commit 727a68016090164b586cbe59e692676a00e8cd3a)
2013-07-31 14:59:01 -04:00
Scott Feeney
473a96fd1f
Fix #1629 (wrong scroll pos on narrow)
...
(imported from commit ac78077f104b079406e745c3eb9ff11b759d033e)
2013-07-31 14:35:48 -04:00
Scott Feeney
c56353138d
Fix tracebacks on reload while composing
...
(imported from commit 5ba1c93b8af015197e77bd16ef9178a6e743a849)
2013-07-30 13:10:50 -04:00
Scott Feeney
a35fff90cc
Replace $.extend
...
(imported from commit 2c1ee3c2714d388f2a71398fe81c049cc54ff94d)
2013-07-30 12:12:59 -04:00
Scott Feeney
8703134a23
Replace $.each with _.each
...
In a few cases the $.each was doing something imperatively that was
terser and easier to understand by using a different Underscore method,
so a few of these I rewrote.
Some code was using the fact that jQuery sets `this` in the callback to
be the item; I rewrote those to use an explicit parameter.
Some code was using $(some selector).each(callback). I converted these
to _.each($(some selector), callback).
One function, ui.process_condensing, was written to be a jQuery $.each
callback despite being in a totally different module from code using it.
I noticed this and updated the function's args.
(imported from commit bf5922a35f257c168cc09ec1d077415d6ef19a03)
2013-07-30 12:12:58 -04:00
Scott Feeney
5842d5c335
Replace $.inArray with _.indexOf
...
(imported from commit 6bd9c87ac98b8951411fc050e1bff83684cf8618)
2013-07-30 12:12:03 -04:00
Scott Feeney
375b1f9eb3
Replace $.map with _.map
...
(imported from commit 97c7a6612d8d56d19f8650db0ea8906afc0f20ef)
2013-07-30 12:09:18 -04:00
Scott Feeney
88952fb2b1
Replace $.grep with _.filter
...
(imported from commit 3a8830f697551a91f94f06b37d01a3687d8c583d)
2013-07-30 12:06:22 -04:00
Steve Howell
6cf5b64b3c
Update module.exports for various modules.
...
(This makes them play nice with node-style unit tests.)
(imported from commit 44fa97c9d38d0b7e82366b49db1425508b6aed67)
2013-07-30 08:54:23 -04:00
Steve Howell
f11cc9e6a2
Extract search.get_suggestions().
...
(This makes testing a bit easier, plus it dedents some code.)
(imported from commit 80532990608cc51ca55d3354bd300734afd7942e)
2013-07-30 08:54:22 -04:00
Steve Howell
2275809103
Shorten names of internal functions in avatar.js.
...
Just have accept() and clear() for brevity sake.
(imported from commit 7bf9b4d89f1b7978ae7b07b5fba87b654c90e314)
2013-07-30 08:41:09 -04:00
Steve Howell
1c69b7ea46
Extract avatar.set_up_file_input.
...
(imported from commit c85087a4e098b1af2e4d26c97d0cb69c42d4f671)
2013-07-30 08:41:09 -04:00
Steve Howell
e6609b3695
DRY up jQuery calls in avatar.js.
...
Extract some local variables to set up the next refactoring, where
we can parameterize the function.
(imported from commit 1c2801131c19a54713a0d5c2cc26c419412339b0)
2013-07-30 08:40:49 -04:00
Steve Howell
e18b9ae3d7
Use get_file_input() to specify hidden file input for avatar uploads.
...
(imported from commit 898216219b36a65519439da73158da4e5996649b)
2013-07-30 08:40:49 -04:00
Steve Howell
c5013c0ba1
Introduce validate_avatar function
...
(imported from commit 4d6d20e4b1c3b0998d0c40ca9b5c74cb7f3319e5)
2013-07-30 08:40:49 -04:00
Steve Howell
032415fcb4
Move bot avatar code to avatar.js (from settings.js).
...
This step of the refactoring really just moves the code.
(imported from commit 4d551c43d25723b2556448f47b6b61228e782f54)
2013-07-30 08:40:49 -04:00
Scott Feeney
209471a6c0
Fix disappearing stream sidebar chevron ( #1587 )
...
My mistake when refactoring popovers.js a month ago. Sorry everyone!
(imported from commit a588b44723a58fb01b6c3996d308e4e8ea11ec2f)
2013-07-29 19:23:09 -04:00
Steve Howell
546ae1023c
Remove smartSpaceBar option from typeahead and search.
...
The option caused some race conditions on Firefox, and it is
really made moot by the naturalSearch option anyway.
(imported from commit dc7080c905ced9b2f4ad4275d82549acf09a59f7)
2013-07-29 16:42:14 -04:00
Steve Howell
46c4a6a9b3
Add unit test coverage to unread.js.
...
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).
(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)
2013-07-29 13:47:57 -04:00
Steve Howell
3d8ce28964
Use underscore in unread.js
...
(imported from commit 91befaaaff5d9a791a3c1bb4ff99f4085c27c4cb)
2013-07-29 13:47:57 -04:00
Tim Abbott
bc4d7c687d
Rename our custom JS events to use Zulip, not Zephyr.
...
(imported from commit 61ac456d394a6dbc14f3e9183a53313990db5059)
2013-07-29 12:11:26 -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