Tim Abbott
55a88f049c
Remove unused within_viewport.
...
(imported from commit d528e022a0d088052bb0bac5c29864688dae59ca)
2014-01-31 14:59:03 -05:00
Jessica McKellar
ec88b3abaf
Give admins the ability to unsubscribe people from streams.
...
(imported from commit 7ec130a233a2976ad0be6f8a7b59c33ce0e0cf3f)
2014-01-31 11:23:14 -05:00
Jessica McKellar
c4c5ac210e
Convert stream member list to a handlebars template.
...
We had been concatenating strings.
(imported from commit 2d50d3f750a450029d39553ea9cd99ef824a149b)
2014-01-31 11:23:13 -05:00
Tim Abbott
6e5e5596fd
Remove deferred installation of scroll handler.
...
This is no longer required, now that we're no longer scrolling the
main body of the page.
(imported from commit c2aa0d403c8fd0679b3110fe8e7684d46a7557fa)
2014-01-31 11:15:14 -05:00
Leo Franchi
2fac412119
Get next local id correctly when all message list is empty
...
(imported from commit 07208222ea682251927ef13c684e9e89277233bf)
2014-01-30 18:08:48 -05:00
Leo Franchi
01e948ac97
Allow unnarrowing to an empty message list in unread-messages-read case
...
(imported from commit f377dbce61fe2fc2051bc286f7215e8112f92736)
2014-01-30 18:08:48 -05:00
Leo Franchi
1056078415
Truncate local ids when loading older messages if messages could be local only
...
(imported from commit b32ae8f3554632aa84ed2dd039a612bb0fa644e2)
2014-01-30 18:08:48 -05:00
Tim Abbott
e505583f52
Split out new module people.js for tracking people.
...
(imported from commit fb9b769819ade25d1d3d6e452e68c7ee8651cfdd)
2014-01-30 17:32:58 -05:00
Tim Abbott
d0ae8795c3
Clean up obsolete fields in get_events_params.
...
Both pointer and last are fields that were removed when we changed the
protocol to use events like a year ago.
This conveniently allows us to stop exporting get_updates_params to
other modules.
(imported from commit 13651ee240ce6e1bafb241b185e5ef653c348cdf)
2014-01-30 17:23:53 -05:00
Tim Abbott
2fb9baafb4
Start running get_events immediately on page load.
...
Previously, we waited until we'd fully loaded the home view to start
calling get_events, which:
(A) didn't make sense non-message related events
(B) resulted in our throwing "get_updates not started" errors when
users sent a message before the home view was fully loaded.
This commit only fixes problem (B); to fix problem (A) we will need to
change the event capture code to only capture some events.
(imported from commit 2aacd6bdfd1e7d7707e3a724f1fde7da4a556538)
2014-01-30 17:23:53 -05:00
Tim Abbott
f27edcd50a
Move initial call to get_events to server_events.home_view_loaded.
...
Note that this makes the event fire after the home view has messages
loaded all the way to current; previously it only waited for the first
batch of messages to load.
(imported from commit a5c408ea0136c761f4cc77e8be4977b13acc6d77)
2014-01-30 17:23:52 -05:00
Tim Abbott
1eb294ed11
Rename get_updates to get_events in the frontend.
...
We did this rename on the backend ages ago.
(imported from commit 11bdf6aa08d932fe2586de282f6174e3dba7267a)
2014-01-30 17:23:52 -05:00
Steve Howell
e60f148a3e
Clean up double negatives in message_matches_search_term
...
(imported from commit 677bb3a76d3404f9899498777e7f1169947422c7)
2014-01-30 17:19:50 -05:00
Steve Howell
189743e813
Extract message_matches_search_term in filter.js.
...
This diff really just moves code; it's a trivial function extraction.
(imported from commit 8ff82b089e49645a6c6034152a9fc9cd83da0737)
2014-01-30 16:46:51 -05:00
Steve Howell
3a412b35e1
Use _.all() in Filter._build_predicate.
...
By using _.all() instead of a for loop, we avoid a tiny bit of
confusing between "break" being for a switch statement and being for
the loop.
(imported from commit cd6e7ff788b50f4dadce93e7f0efcb381bc59270)
2014-01-30 16:45:47 -05:00
Steve Howell
15b0f9dcc7
Use operator/operand in narrow.collect_single().
...
(This is part of converting away from tuples.)
(imported from commit ba3083f8b3242fee1d532d7666aee68af89d8ddc)
2014-01-30 16:15:16 -05:00
Steve Howell
796ebfd007
Do not return raw operators from narrow.operators().
...
Even in the case where we are running embedded narrows,
we want narrow.operators() to return new-style operators
that you get with Filter objects, so that callees do
not need to support the legacy tuple format.
(imported from commit a6649881a926a2304e9f7cc8ca53b406e2c8828e)
2014-01-30 16:15:14 -05:00
Steve Howell
de7708ed6e
Handle id:<msg id> searches with multiple terms.
...
If you do a search like id:5 topic:foo and message #5
does not have the topic "foo", we now return zero results.
(imported from commit 8121fac1dbd79024c51af1f310d831dab9242e36)
2014-01-30 15:57:32 -05:00
Zev Benjamin
a2d989b318
Fix typo
...
(imported from commit dc7ef302a70291063c3ef339f72b6a91e8129dc1)
2014-01-30 15:57:32 -05:00
Zev Benjamin
50e1cb7ab3
socket: Specify reasons everywhere we close the SockJS object
...
(imported from commit 7314fa975b9408caba2c5f1374c8259d67784ad0)
2014-01-30 15:57:32 -05:00
Zev Benjamin
3df1097c95
socket: Wrap module in an anonymous function call
...
This is so we can have some class variables.
(imported from commit 6311444bb2739daebc6c5da2b7ea7eabdd88689d)
2014-01-30 15:57:31 -05:00
Zev Benjamin
9020f37141
socket: Add comment about the close() call in _try_to_reconnect()
...
(imported from commit 87e32adcb9eeb066b6f3ecd85550d00263e0a4e9)
2014-01-30 15:57:30 -05:00
Zev Benjamin
b8444daddd
socket: Pass wait_time as an option to _try_to_reconnect
...
(imported from commit 15a88c6da084f4834258868bc08b2cd983899820)
2014-01-30 15:57:29 -05:00
Zev Benjamin
1ed176b5ef
socket: Log the reason the SockJS connection was lost
...
(imported from commit 069067f9f979e7255f97f4943d6513076b2706bd)
2014-01-30 15:57:29 -05:00
Steve Howell
b3a551f402
Stop using raw operators in narrow.activate().
...
Have narrow.activate() user filter.operators() to produce
operators that have operand/operator fields, so that its callees
don't need to be backward compatible with the tuple format.
(imported from commit e408e33074d1be2d112bb3cdc081ec3616c908ee)
2014-01-30 15:57:28 -05:00
Tim Abbott
a7b1b29bf0
Move get_updates into a module.
...
(imported from commit 9a6c0ab1e76dd96abad8626bc5b1fdbd234b2645)
2014-01-30 15:57:28 -05:00
Tim Abbott
33690d1dc6
Clean up argument to get_updates_success.
...
(imported from commit 2583c79f83e1e3e540a00ba8afae5a07dff70845)
2014-01-30 15:57:28 -05:00
Jason Michalski
90995889fc
Fix scroll when muting and unmuting streams
...
(imported from commit 9bd22cd12dfa50cf8fd9d87eb659a4543c5c78c4)
2014-01-30 01:48:15 -05:00
Jason Michalski
bf57839e85
Remove scrollTop workaround for hash changes
...
Now that we are not scrolling the document we can remove the workaround
to prevent browsers from scrolling on hash changes.
(imported from commit 67fdaa4980d4d54d80ca9c259bbee567b8eeb917)
2014-01-30 01:48:15 -05:00
Jason Michalski
21c2aea755
Fix scroll position on narrow and unnarrow
...
Change the offset to hold of the selected message as an offset from the
top of the screen. Then use the current offset and scrollTop to compute
the new scrollTop.
(imported from commit 718e95d3435c0f84cbb7663a9bb2bc2789314203)
2014-01-30 01:48:15 -05:00
Jason Michalski
b0c5e2dbd0
Fix scroll on opening subscriptions details
...
Move the animated scroll from body to the app div.
(imported from commit 2d2062d7a917616a60f414a633dd2f827ae840a0)
2014-01-30 01:48:15 -05:00
Jason Michalski
9cc1dc242c
Move the mouse handlers from window to app
...
(imported from commit 0331496a578c47f73b6c9e81d8a79e26e8d7a9a3)
2014-01-30 01:48:15 -05:00
Jason Michalski
198648447f
Change viewport to use the app div not the document for size
...
Now that we are scrolling the app we should have viewport respect this
CSS change.
(imported from commit dec5450563a6f5ac23499819ec382030e3a910dc)
2014-01-30 01:48:15 -05:00
Allen Rabinovich
dedd3cf03c
Overflow scroll on app instead of body
...
(imported from commit 2be63b16afe212e95e983745eaa0bc5dc8e1397e)
2014-01-30 01:48:15 -05:00
Steve Howell
967d3c9c65
Use .operator to get operator for mixpanel.
...
(imported from commit 7c70a592b2efd769acab9b178c08a345785b889b)
2014-01-30 13:24:43 -05:00
Steve Howell
53027b71a4
Use operator/operand inside the Filter instance methods.
...
Avoid tuples in the methods inside Filter.prototype.
(imported from commit beed799e767d9645735a2bd4eefb5d431c04f17f)
2014-01-30 12:53:08 -05:00
Steve Howell
b18307b667
Start using operator/operands internally in Filter class.
...
By having Filter.canonicalize_tuple() call filter_term(),
we make it so that Filter objects get operator/operand
fields in their terms when we initialize this.
This mostly caused test breakage for tests that were doing
assert.deepEqual; now we just check to make sure that the
field we need are there.
(imported from commit 63b2516dc72edeb11e76a1fa4442570b9c605baa)
2014-01-30 12:53:08 -05:00
Steve Howell
12626ead66
Populate terms with named fields in filter_term().
...
Consumers of Filter.parse() can now reference
search term parts like so: term.operand, term.operator
(Legacy code can still use term[0] and term[1].)
(imported from commit 06d0da65f13f1eb7e3ba8eac0e69448aab2735ab)
2014-01-30 12:53:08 -05:00
Steve Howell
fdd57f5abe
Extract filter_term() in filter.js
...
(imported from commit 142464bb02817108726f9c118459c38e55b96bbf)
2014-01-30 12:53:07 -05:00
Tim Abbott
abbe0f781f
Don't wait 1 second before syncing updates manually controlled flags.
...
(imported from commit 8526f5d77aee078b5bc282da093009e19f016a44)
2014-01-30 12:48:36 -05:00
Tim Abbott
20457d695d
Fix starring/unstarring of messages.
...
This got broken in the local echo refactoring -- we accidentally
switched the update_starred function to be a toggle, which meant that
the message would be marked as starred and then unmarked as starred
moments later, due to the two update_starred calls for the initiating
browser (one from when the click happens, the second from when the
event returns from the server).
(imported from commit 8f83729fe5477cf052124c1c56ed9189b85b885c)
2014-01-30 12:48:36 -05:00
Jessica McKellar
7085dca1ce
Fix the Admin page not working for newly-knighted users.
...
Previously, while you'd get the event saying you'd been knighted,
which would make the Administration tab visible, clicking on the tab
would error out because the admin page HTML was never sent over on
page load (since you weren't an admin at that point).
(imported from commit 90ad351533515bebece630d67baf4b142d320754)
2014-01-29 12:41:22 -05:00
Jessica McKellar
3d234e1b84
Update admin page language on deleting streams.
...
(imported from commit 3670c65e3fe9e79855b1c0ffaa08f48368de9856)
2014-01-29 12:41:21 -05:00
Jessica McKellar
20f2baa614
admin: Show a lock icon next to private streams.
...
(imported from commit 26829016cf219b55aef0ef45187667b0a9bd86fd)
2014-01-29 12:41:21 -05:00
Leo Franchi
e716a75d22
Properly render at-all and at-everyone mentions locally
...
(imported from commit 9533b83dba6a61f6c09da755fca54e8a24ad61e6)
2014-01-28 17:37:10 -05:00
Leo Franchi
1666403850
Find message objects in any lists when updating, as update might come from server
...
(imported from commit fa70180c9a228bff39efd846d465d0f1fa9bb4e7)
2014-01-28 17:31:02 -05:00
Jason Michalski
c573efd437
Ignore stream description update events for unknown streams
...
Clients can receive description updates for streams which are not in
stream_data. We should ignore the updates and warn that this has
occurred.
(imported from commit 3cd5a98a133012ae27ea0f43b03cc9d8e459e49c)
2014-01-28 17:12:15 -05:00
Leo Franchi
91fb4f6b8c
Fix clicking on link to message when sending outside this narrow
...
(imported from commit 6eeeb3b4c06021be21f48c8c5f2869904cd13b09)
2014-01-28 16:03:11 -05:00
Leo Franchi
ffb816391c
Use our own fenced code preprocessor, fixing output mismatches
...
(imported from commit 3d4abb1043349e30adf265342ee7c946a99b3ce2)
2014-01-28 15:35:32 -05:00
Leo Franchi
420a7cab7a
[marked] Add preprocessors in marked and allow them to insert arbitrary HTML
...
(imported from commit 367418266f4fbe2d723212845f49f0d4356fab52)
2014-01-28 15:35:32 -05:00
Leo Franchi
daecc7993a
Add a fenced code parser in javascript
...
(imported from commit 42b1dc18ca34cbbdf3cda6e833adde631a9d88f5)
2014-01-28 15:35:32 -05:00
Leo Franchi
dd7d31c7a6
Allow an empty home view when unnarrowing
...
(imported from commit 69f1a84b23ae8942db58851a1a1c6723c26df560)
2014-01-28 15:35:31 -05:00
Leo Franchi
dc3c6f34fc
Convert python-regex inline flag style to JS regex flags
...
(imported from commit 16c58fa54c0b87931d873290b175461ceb176d62)
2014-01-27 12:30:42 -05:00
Leo Franchi
b83be2cd32
Properly avoid realm filter work in non-local-echo case
...
(imported from commit 9c01109e6900509690841306fb4a23464321de61)
2014-01-27 12:30:42 -05:00
Leo Franchi
1fdb586c13
Make sure then_select_id is a number to call .toFixed()
...
(imported from commit 58635110c737ccb38e74cce8b4feb5d93dfbf5cc)
2014-01-27 12:30:42 -05:00
Leo Franchi
a82bc689e8
Render /me message on the frontend
...
(imported from commit ce4a44624b7084464d5c6ce8e04eef03ee23c9e3)
2014-01-27 12:30:42 -05:00
Leo Franchi
883157893c
Use a UserMessage flag to indicate /me messages
...
(imported from commit ea503b0d3eb6e90230c0859be96ede60faf5c2bd)
2014-01-27 12:07:48 -05:00
Leo Franchi
b119bf74ca
[third] Update marked.js to HEAD to pull in javascript escape fixes
...
(imported from commit f673746c7f2d424c56b3e0b5d028952f97fb2a57)
2014-01-27 12:07:48 -05:00
Leo Franchi
5441409044
Consolidate emoji tests and test on frontend as well
...
(imported from commit 3244a93209b56b655b80633713a3f58ae46d06ff)
2014-01-27 12:07:48 -05:00
Leo Franchi
78f0cc1c4d
Don't set realm filters unless we have local echo
...
(imported from commit bbb7d87a869d6f1bd99a45581f8f557a97f30cce)
2014-01-27 11:56:25 -05:00
Leo Franchi
6d9edcf06f
Re-enable local echo for staging
...
(imported from commit e8b579e2289271732d3998cbe16854e39e55d5d6)
2014-01-24 16:09:44 -05:00
Leo Franchi
3b07c164fb
Fix realm filters with multiple groups
...
(imported from commit 9652cf8acbe51e25bcf053980b6caa9565b57e45)
2014-01-24 16:09:44 -05:00
Leo Franchi
97fb3e74af
Support subject links in local echo
...
(imported from commit 916fecccc834053ea0354936119c6591af273938)
2014-01-24 16:09:44 -05:00
Jason Michalski
62435e167f
Add frontend stream description event handling
...
Update the stream page when receiving stream description change events.
(imported from commit 84f6f3846a3197f14a24611cdc06350fae90f9dd)
2014-01-24 14:47:44 -05:00
Jason Michalski
1f98c4f4ce
Add support for updating the stream description
...
The stream description can now be updated, but the UI is not yet updated
on success.
(imported from commit f45e0a9d5138d828ae98d6d49645ab3ddc966704)
2014-01-24 14:47:44 -05:00
Jason Michalski
4104f00229
[schema] Add description to streams and display it
...
A description was added to the streams and it is now displayed on the
subscriptions page. It can not be set in the UI yet.
(imported from commit 81d08b65eee42dba87cd99dd5bd30106c4eb6c6a)
2014-01-24 14:47:44 -05:00
Jason Michalski
0c9271212d
Added a admin settings div to the subscription template
...
(imported from commit 8aaa55d90a78ab1c4b182efeb4cac5b7d0677822)
2014-01-24 14:47:44 -05:00
Leo Franchi
ea04d027cf
Don't allow editing of local-only messages
...
(imported from commit 4fcac6b4b7a5f917944934d06eae757d7cca8170)
2014-01-24 14:01:19 -05:00
Leo Franchi
9ec5cde8b0
Disable local echo for staging temporarily
...
(imported from commit dd4dcf1382f8511f49fc223223fa3dbba1634ef8)
2014-01-24 14:01:18 -05:00
Leo Franchi
f528ac659d
Only attempt to reorder a message if we had it in the message list originally
...
(imported from commit 0b2802c1f1b6b17cd9f52dd9cecdf84f6f1cf5b0)
2014-01-24 14:01:18 -05:00
Leo Franchi
b1ac754448
Don't local echo messages that we can't apply locally to the narrow filter
...
(imported from commit 372063352f17caa4990195ace4757bb68c53523a)
2014-01-24 14:01:18 -05:00
Leo Franchi
063484a917
Only clear the compose box if a message was locally echoed
...
(imported from commit a90a566f61e939e34eab9666743848e47c122400)
2014-01-24 14:01:18 -05:00
Steve Howell
e63d9d32e2
Remove an unneeded call to build_stream_list().
...
We were calling build_stream_list() twice in succession for
no good reason. The call to build_stream_list() inside
populate_subscriptions was pulled out to happen right after
its two callers.
(imported from commit 816ae2fd34224d8baf4e4bcccdb670143795bb42)
2014-01-24 12:23:41 -05:00
Steve Howell
4015189094
Release page_params.{un,}subbed_info during initialization.
...
(imported from commit 410eeb7978281ae9b9e2a28fe26dcae10a65518d)
2014-01-24 12:23:41 -05:00
Steve Howell
b82ed52e7b
Rename page_params.stream_list to page_params.subbed_info.
...
This matches page_params.unsubbed_info, plus it sets up to
add something like page_params.stream_dict without being confusing.
(imported from commit 2d40deb779e5c7a488d6952560b4119094bbc0d8)
2014-01-24 12:23:41 -05:00
Jessica McKellar
ee7a1f0953
tutorial: add helpful in-app links and be consistent with realm welcome message.
...
(imported from commit 2057dbe2606d32721192021ed2046ed9f412d8a7)
2014-01-23 17:06:29 -05:00
Jessica McKellar
6aaa11027f
Fix the Desktop App banner covering top links in the left sidebar.
...
Before this commit, while the banner is open you can't click on the
Home link.
(imported from commit 4d41bacc50d8115b4868fbda537c9bd64250040a)
2014-01-23 17:06:28 -05:00
Jessica McKellar
993a20bdee
tutorial: be flexible about the work-focused warm-up message recipient.
...
(imported from commit 190f0cb27dda8cb89c2682affe1daee4248fe846)
2014-01-23 17:06:28 -05:00
Jessica McKellar
117c98796e
Send some messages to warm up the first user in a realm.
...
(imported from commit b4d92d474b27c9a0eabf99576a0f441a7d919106)
2014-01-23 17:06:28 -05:00
Jessica McKellar
fcd89d5861
tutorial: show content as if in a stream narrow.
...
(imported from commit 716640dd5d0abeafdd8fd2f1b033a6203486a405)
2014-01-23 17:06:27 -05:00
Jessica McKellar
ebd6408ec7
Make the tutorial shorter, and visually highlight important concepts.
...
(imported from commit 543d0ff838edbc2148df4b8d08331c793c7af4f6)
2014-01-23 17:06:27 -05:00
Jessica McKellar
a677db4672
Start users in a narrow to the notifications stream after the tutorial.
...
They'll see the welcome messages they need without being overwhelmed
by the home view.
(imported from commit 195cb4defa1dc0aa5ba8870226036e4dfd111c0f)
2014-01-23 17:06:27 -05:00
Jessica McKellar
7702461700
Unconditionally subscribe new users to the notification stream if it is public.
...
(imported from commit 7d7f14eb6fee43ca6f18adddda741665ce22d24a)
2014-01-23 17:06:26 -05:00
Jessica McKellar
e5a24c2d21
tutorial: tweak Desktop app banner language.
...
(imported from commit 727dd269314092a28b39e43300ee322416e3e18e)
2014-01-23 17:06:26 -05:00
Leo Franchi
1c9a59fd3f
Add newlines outside code blocks in marked.js to match bugdown
...
(imported from commit 7618260dbfa11209b3cc45d007407476897c2a20)
2014-01-23 16:50:29 -05:00
Leo Franchi
07dae5fcb9
Locally echo messages that are loaded from storage and resent
...
(imported from commit 474a0994d82bdbff9c98b453d3e1e4dc7732f5bd)
2014-01-23 16:28:59 -05:00
Leo Franchi
4ac59a71bd
[socket] Persist queued requests across restarts in localStorage
...
(imported from commit a3a7b0c8292c53807d179b343d371eebc11ef10b)
2014-01-23 16:28:59 -05:00
Leo Franchi
fd4b68aa72
[socket] Save pending and queued requests together
...
(imported from commit aecf59b26938c831da03a6a31545f2522387e67f)
2014-01-23 16:28:59 -05:00
Leo Franchi
56d9446c41
[socket] Use socket req ids that contain queue ids
...
(imported from commit 781eafe60bf117d79ce3a30deea02ec1e875060a)
2014-01-23 16:28:58 -05:00
Leo Franchi
24cb5fb079
Add a localstorage.js module
...
(imported from commit 9f3ab248ce84ce296bb1fb918de3b2dd8cde1ded)
2014-01-23 16:28:58 -05:00
Leo Franchi
e24dcb3952
Report proper displayed/receive time and local echo data
...
(imported from commit 63aba6ef05b1a55d61e975831ebbaa074f8ea74f)
2014-01-23 16:28:58 -05:00
Leo Franchi
439633fd03
More markdown compatibility fixes
...
* Escape " as "
* Enable GFM newlines
* Output a linebreak after <br> in the generated markup
(imported from commit c007ec422054f9fc66a810b66aac70f70a2a1952)
2014-01-23 16:28:58 -05:00
Leo Franchi
c1442f386f
Local echo messages that mention the sender should be highlighted
...
(imported from commit 58184f00e63fd50ed4a68d12afe0779ae3745749)
2014-01-23 16:28:57 -05:00
Leo Franchi
86cb451dcb
Render <a> with title and target attributes
...
(imported from commit 0e195db0a3ff1ebe3d567a1ab6408c4a1bfe1e2d)
2014-01-23 16:28:57 -05:00
Leo Franchi
97a69cbc12
Convert realm filters in client-side markdown parser
...
(imported from commit ef12b9ed28cf0176881d33caa1973fe4d9b90d0b)
2014-01-23 16:28:57 -05:00
Leo Franchi
b1a6fdf5e2
Add support for realm filters to marked.js
...
(imported from commit cea1720b6535a23469185f0ad2677edd373e7cfb)
2014-01-23 16:28:57 -05:00
Leo Franchi
c0d56c822f
Use the batched_flag_updater in ui.js as well as zulip.js
...
(imported from commit 6dea64d068d013471baf4022a8041f54da5c111e)
2014-01-23 16:28:57 -05:00
Leo Franchi
b7b322d8cd
Parse user mentions client side
...
(imported from commit b2919912792b8a02afad45f48e1c8df4783b93a9)
2014-01-23 16:28:56 -05:00
Leo Franchi
0f8cb25d89
Parse emoji client-side
...
(imported from commit 3bf150d866689b301ee31218cb3d570119b766cf)
2014-01-23 16:28:56 -05:00
Leo Franchi
0de824f73e
Add a zulip module to marked, which supports emoji and user mentions
...
This is partially inspired by https://github.com/chjj/marked/pull/238
(imported from commit 03b84cde88fc8c2fe31c1003a5ce852cc364733e)
2014-01-23 16:28:56 -05:00