Keegan McAllister
36f4ce0c0b
Properly defer send_pointer_update setTimeout
...
(imported from commit 02a9c648eb420c8aebe84386cbb708bec96ca2e7)
2012-10-26 22:48:21 -04:00
Keegan McAllister
92acd7bd1c
match_on_visible_text: Return boolean directly, without a conditional
...
(imported from commit b38800d074ab3e1dd557e49ef5a6cd7adfd677a3)
2012-10-26 22:21:41 -04:00
Keegan McAllister
c32b0a1a22
Remove dodgy use of $( array ).last()
...
Per the docs, these are only meant to be used on arrays of DOM elements.
jQuery might one day assign a different meaning to arrays of strings,
and then we could have some security issues or weird breakage.
(imported from commit 545eee1e9c6955556d5c4bda30cd6db0dce19c60)
2012-10-26 22:21:30 -04:00
Keegan McAllister
5c4fe1d521
Simplify tab click handler
...
We don't need to get the tab link href twice.
(imported from commit 4b437924c88074e706536b143af493804612746f)
2012-10-26 21:45:05 -04:00
Keegan McAllister
6d0cebb6c2
Simplify update_floating_recipient_bar
...
The transformation here is
$($('foo')[0]) -> $('foo:first')
(imported from commit 79ea257c9935eea01c5a2f7afb171045692eff01)
2012-10-26 21:38:39 -04:00
Keegan McAllister
582cb799dd
Get rid of the selected_message_class global
...
Instead we infer this from narrow.active(), with the ability to override during
the narrowing procedure.
(imported from commit fab9c6861f19aedf0ee8af094c1ef4e8a0a73d80)
2012-10-26 21:05:04 -04:00
Keegan McAllister
6e63ac926e
Add rows.get_table()
...
This checks against the table name whitelist before building the jQuery query.
(imported from commit b296f117cdd2707aeb626328f8b0f9e00c723d59)
2012-10-26 21:03:52 -04:00
Keegan McAllister
138721ebbb
ui.js: Wrap an extremely long line
...
(imported from commit e8bef501249cc11655780ab87c425c91e2ad4db5)
2012-10-26 20:41:08 -04:00
Keegan McAllister
19d4631e6f
search.js: Call .each on the jQuery match rather than $ itself
...
(imported from commit cff239b483a8ef1a7997a1430f40a7fda11739b1)
2012-10-26 20:41:08 -04:00
Keegan McAllister
a0eea37fd4
search.js: Wrap extremely long line
...
(imported from commit c5b76e2da4ebb8322b5a69bf0679fa7700bb7bd1)
2012-10-26 20:41:08 -04:00
Keegan McAllister
58ca5b3e24
Harden rows.get against bad input
...
(imported from commit af0283323089f6ed4edb4cb732fe1cc821fb5dd5)
2012-10-26 20:41:08 -04:00
Keegan McAllister
3ebee51ce0
rows.js: Use full module pattern
...
(imported from commit 770741958798317401e918a7b8331cfc2f73bf77)
2012-10-26 20:41:08 -04:00
Keegan McAllister
6bd2087d89
zephyr.js: Combine get_huddle_recipient{,_names}
...
(imported from commit dcb4c32250f4ff3a3cf32d999d6469916b17b06e)
2012-10-26 20:31:52 -04:00
Zev Benjamin
5413f74a7e
Allow API users to update the pointer and receive pointer updates
...
The get_profile API call now returns a client_id, which an API user
can pass to update_pointer and get_messages (note that clients still
need to pass a pointer argument to get pointer updates). This
client_id is currently the equivalent of the website's session key,
but the website might get client_ids in the future to distinguish
browser windows.
This commit differs from 88f6cf0033c849af88d1b99da3bdc2148dfbb6fe in
that it uses request.POST.get("foo") instead of request.POST["foo"].
For some reason the latter triggers CSRF errors.
(imported from commit b2a4a7322d16dbf241cd6eef146621c79d84cafc)
2012-10-26 17:17:09 -04:00
Zev Benjamin
b36f1702fc
Revert "Allow API users to update the pointer and receive pointer updates"
...
This reverts commit 88f6cf0033c849af88d1b99da3bdc2148dfbb6fe.
It seems to have broken API users.
(imported from commit 2f861ebc016076547092421f87dbcac00a65e2f6)
2012-10-26 16:19:57 -04:00
Keegan McAllister
faa7565a75
Clean up duplicated code in setup.js
...
(imported from commit 86566f194497b618dff0be6ea2bc829204d03366)
2012-10-26 16:08:18 -04:00
Keegan McAllister
80ef222a60
Get the CSRF token from the DOM rather than a cookie
...
This simplifies the code, and lets us set the CSRF cookie as HttpOnly, which
adds a little bit of security.
(imported from commit 9d5923a1acf19bd27e6e1d55cf627049526de245)
2012-10-26 16:08:18 -04:00
Zev Benjamin
a4fd478e3d
Allow API users to update the pointer and receive pointer updates
...
The get_profile API call now returns a client_id, which an API user
can pass to update_pointer and get_messages (note that clients still
need to pass a pointer argument to get pointer updates). This
client_id is currently the equivalent of the website's session key,
but the website might get client_ids in the future to distinguish
browser windows.
(imported from commit 88f6cf0033c849af88d1b99da3bdc2148dfbb6fe)
2012-10-26 16:06:41 -04:00
Waseem Daher
22e6a8ac1d
Revert "Hide additional search buttons when not in use."
...
This reverts commit 074011dfe7dfa4d3cb331b32fc6cf465f98d095f. For
some reason this introduces some buggy behavior, and if anything I
should debug it more locally first.
(imported from commit 182193e6bb466a5668c2bb64e41712a793fa7ca2)
2012-10-26 15:41:38 -04:00
Waseem Daher
b0406ee1d2
update_floating_recipient_bar: Don't loop infinitely if no message selected.
...
(imported from commit a75cfd41ed8a8ce5256d1caa29f6c5bc0689e7d2)
2012-10-26 15:10:30 -04:00
Waseem Daher
9274437eb5
Hide additional search buttons when not in use.
...
(imported from commit 074011dfe7dfa4d3cb331b32fc6cf465f98d095f)
2012-10-26 14:55:42 -04:00
Waseem Daher
44a6a2b8a4
Have search bar always take on color of main area.
...
(imported from commit 85f6db17ca2fd616e4c7b63a98b80332cbddc1c0)
2012-10-26 14:31:05 -04:00
Waseem Daher
e365b94a27
Restyle searchbox to look more consistent/bootstrappy.
...
(imported from commit 2d381fb6ea7f27846d583e27dda0fd1a6df77fab)
2012-10-26 14:31:05 -04:00
Jessica McKellar
92593b7cc8
Add basic up/down search functionality, including across narrows.
...
(imported from commit c82acad95e97733b87d65287c685caf7533a774e)
2012-10-26 14:31:05 -04:00
Jessica McKellar
74a75eea0c
Add search bar and buttons above narrowbar.
...
(imported from commit 7def7d5824714a44c65d6a8e6699b2d8cda31418)
2012-10-26 14:29:30 -04:00
Jessica McKellar
14388baf4b
Add jQuery highlight plugin, for use by search.
...
(imported from commit b596d0435db11f0369e2e6903714e2e1346b006b)
2012-10-26 14:29:30 -04:00
Zev Benjamin
652c524777
Try loading older messages after user is idle
...
(imported from commit bb3c39f9b5a9b7befb353647af75001ec168fc8d)
2012-10-26 13:31:14 -04:00
Zev Benjamin
807303a325
jquery.idle: don't allow the active handler to fire as a result of the user going idle
...
(imported from commit 28793228e50449b096dfe999a8cd17b7fa9e347e)
2012-10-26 13:31:14 -04:00
Zev Benjamin
ec389c5c83
Non-asynchronous API calls only take two arguments
...
(imported from commit 39f21892e38b0f8c2369d77ffcfb077f1006863e)
2012-10-26 11:53:01 -04:00
Zev Benjamin
6ed1d38743
Show persistent pointer on narrow again
...
(imported from commit c871ec931ffad4bc692a908e687bb21c6cb2e7e9)
2012-10-26 11:44:28 -04:00
Zev Benjamin
9c838c44a1
Scroll to the correct message when narrowing
...
(imported from commit c6f11f3315f1d168b85f80ab524f322b399f5a85)
2012-10-26 11:44:28 -04:00
Zev Benjamin
8a66d52228
Expose get_old_messages to API
...
(imported from commit d3b86a049440c54b52d96c27f8925a73496eaffe)
2012-10-26 10:42:11 -04:00
Zev Benjamin
ec9e0a4b9f
Have get_updates include an "update_types" array in its response
...
This is similar to the previous "reason_empty" variable, but captures
why we've returned from the call even when there are updates and all
the reasons if there are multiple. For now, it's useful for debugging.
(imported from commit fd8d9e859660e51b57178d066b184f831b71a0b6)
2012-10-25 18:12:11 -04:00
Zev Benjamin
51a39fdb0a
Remove unused variable
...
(imported from commit 5a2a100aa3d9a577cde2517be3d9bacc2147fa7e)
2012-10-25 18:11:23 -04:00
Zev Benjamin
1c904e8607
Only start get_updates call after we've gotten all old messages
...
(imported from commit 8af46008a3abcdacb59e6223f38742a94a87b125)
2012-10-25 18:11:23 -04:00
Zev Benjamin
a9583f6889
Fix get_updates missing messages between calls
...
(imported from commit 2b84df2a35a9a006b8548904ebf145a351a2e92b)
2012-10-25 18:11:23 -04:00
Tim Abbott
f2c6347471
Return to failing clients immediately the first time.
...
(imported from commit b29df3165030ffd95dfe89b6471aeb74c06b6126)
2012-10-25 17:53:30 -04:00
Waseem Daher
44547e4e36
Properly check stream/subject lengths.
...
(imported from commit 1432266d8db1122f561e9e2f997071a19fb0f190)
2012-10-25 17:07:32 -04:00
Waseem Daher
98d7116ee8
Delete some dead code in signup workflow.
...
(imported from commit d07fffd4c0efdaaf4a233c1dbc9d09bc5ec03ad3)
2012-10-25 16:59:37 -04:00
Waseem Daher
c894bab738
Compute a user's realm from the verified email address, not a user-passed field.
...
(imported from commit 5c220a7b9e4b137b5c98b286e409004318565137)
2012-10-25 16:50:00 -04:00
Waseem Daher
29d94b60b6
Add an "I agree to the terms of use" checkbox inside signup workflow.
...
(imported from commit 6d3320e71e189f4577da464fade9c8f7f5838f78)
2012-10-25 16:05:28 -04:00
Tim Abbott
0c54fab1e2
Check for too-long stream/subject names.
...
(imported from commit 6d37dff9af7e471e1e6a1ba77a9500bf5bb4ba7d)
2012-10-25 16:04:47 -04:00
Tim Abbott
7c8bde5d90
Add log/restore for fullnames and passwords.
...
(imported from commit 048ca3c86b9f077fcbccd5df4a509191a545da4c)
2012-10-25 15:52:26 -04:00
Zev Benjamin
a798e14d86
Remove more unused code related to get_updates not returning old messages
...
(imported from commit d2cc795634c46d8a595ed15c093cfbfc113e6d10)
2012-10-25 15:48:35 -04:00
Zev Benjamin
47eeae0d36
Restore the "load more messages" button disappearing when there are no more
...
(imported from commit 4f46d49c88d9d0dadefe3e770868b6844dc80d64)
2012-10-25 15:45:14 -04:00
Zev Benjamin
cf1d35fd62
Remove unused variable
...
(imported from commit 0636d51527ea9cac8b1ba5490bf5836cd4e79269)
2012-10-25 15:45:14 -04:00
Keegan McAllister
1d4f339eae
bugdown: Hide alphanumeric characters in exception logs, for privacy
...
(imported from commit 39481494b7910307f56e566035c1b464c83d196e)
2012-10-25 15:40:01 -04:00
Zev Benjamin
451a041919
Remove the ability to fetch old messages via get_updates
...
Clients should use get_old_messages, instead.
(imported from commit 67847ef67d8ad4bf4af3f6082f85f0c76a41944c)
2012-10-25 15:31:27 -04:00
Keegan McAllister
eef027560a
Remove unused imports
...
(imported from commit eb576627ff72e57fee0e3a4c357f51ad74cd6c86)
2012-10-25 15:22:18 -04:00
Keegan McAllister
9629e7111b
already_sent_mirrored_message: Reduce code duplication
...
and eliminate extremely long lines.
(imported from commit 29a08b1757c1bb3af1f82222fd7150db05f86034)
2012-10-25 15:22:18 -04:00