Commit Graph

297 Commits

Author SHA1 Message Date
Zev Benjamin 103bf321b4 Have client and server exchange a server generation number
This will allow the client to detect when the server has restarted.

(imported from commit 89e75916719d967beb2520be6263f79f897d9ec1)
2012-10-16 15:30:09 -04:00
Keegan McAllister 7d44e1c56f Don't include signup.js in login.html
(imported from commit fe36afb1703e706012f1c690d15481a0da204eb3)
2012-10-16 01:33:15 -04:00
Keegan McAllister 216ab3de8b Rename signup.css -> portico.css
This is used on all portico pages, including login.

(imported from commit b37121a0975c46fba581c314e05af0a77e6607e9)
2012-10-16 01:33:15 -04:00
Keegan McAllister 37c51b80cc Add a tool to draw the Django template inheritance graph
(imported from commit e10bb719d62a76abfea76c7fc69093a3cc33272e)
2012-10-16 01:33:15 -04:00
Keegan McAllister dbd88b28f3 Document what all the Django templates are for
(imported from commit fa2b6c5327b0004f2c19502471f6717d84705ba7)
2012-10-16 01:33:15 -04:00
Keegan McAllister b55e277930 Rename more_content -> portico_content
(imported from commit 4a3df508bb0227e998115eeff24b789dd8b42698)
2012-10-16 01:33:15 -04:00
Keegan McAllister 46f17431cf Rename content_base.html -> portico.html
(imported from commit 556fb5aeca76eb186013a28da9bab77c1e56d700)
2012-10-16 01:33:15 -04:00
Waseem Daher bca36ba4c2 Eliminate some inline styles (visibility: collapse).
(imported from commit a29f12ea2f82672ef05e5dcca486ec527acbd6dd)
2012-10-15 22:47:41 -04:00
Waseem Daher 4d914df68b Rename things.
narrowbox -> top_statusbar
narrowcontent -> narrowed_to_bar

floating_indicator -> floating_recipient_bar
fixed_narrowbox -> table.floating_recipient

(imported from commit 7b5bbb17aeff9372275311ab09cd3cbf8262ea13)
2012-10-15 22:47:41 -04:00
Waseem Daher 470143e254 Add top_whitespace.
(imported from commit 2c049f3032879926e98287428e839b9117460a90)
2012-10-15 22:47:41 -04:00
Waseem Daher f3ab2dc5ac Move the floating stream/subject bar into #narrowbox.
This allows us to reposition both of them more cleanly
when we resize things.

(imported from commit a772d2390bd80146e91181e348930559a9e2f4eb)
2012-10-15 22:47:41 -04:00
Waseem Daher 4933a986b9 Un-remove the normal narrowbar.
(imported from commit 2dbaa7e482db40b65865c252b9eee081655d5f72)
2012-10-15 22:47:41 -04:00
Jessica McKellar d07f4c05f3 Keep the top-most recipient row floating at the top of the screen as you scroll.
(imported from commit e597b60c86f5b38a55dc78df80d84dfe112c8d8f)
2012-10-15 22:47:41 -04:00
Keegan McAllister 8819bdc0fc Hide most of the navbar on the deployed app
(imported from commit 3b055588f7de805bf1b038f1bc6c03837eda010a)
2012-10-15 18:44:36 -04:00
Keegan McAllister 277f37aea4 Fix formatting
(imported from commit d87311335d97a6e01892b8e341edf95f41977340)
2012-10-15 17:05:36 -04:00
Tim Abbott 18d48fcd40 Fix javascript referenced via http url.
(imported from commit e72e265f5a5ba6b6a362f5be03069f7cd40c8fc1)
2012-10-15 14:50:34 -04:00
Zev Benjamin bc4487ebf9 Fix autocomplete
There were two issues:
* The people_list population changed and I failed to noticed
* Typeahead source updating never worked before because calling .typeahead()
  more than once does not change the data source

(imported from commit fda14029f4cd37260d82e7bb5689f5022e1b0d28)
2012-10-12 16:57:27 -04:00
Waseem Daher 23cc654847 Condense name and email when we have a very narrow window.
When the window is narrow, vertical space (particularly in
our navigation menu) is at a premium, so let's be more
parsimonious.

(imported from commit 72628827bc108f4d9f2d47a11c48e0e772b769d4)
2012-10-11 23:10:48 -04:00
Waseem Daher 9556f58953 Provide tooltips for navbar items.
(imported from commit 88d36eab304e87639a46451677783596e2b8ffba)
2012-10-11 22:44:28 -04:00
Waseem Daher 1c14c461c2 Small "New Message" button when we don't have lots of room.
(imported from commit 58f2bdf0aafec7714d0f3a9be99f953dd8b237b3)
2012-10-11 22:44:28 -04:00
Waseem Daher 6e57c4f3ae Change Settings icon.
(imported from commit a6e7a8a022f7b3d6e8dd61ea74bfe41703cba2eb)
2012-10-11 22:44:28 -04:00
Waseem Daher 7d155850a9 Have the navbar,composewindow,narrowbar look OK in small windows.
(imported from commit 724ecfee79a263919e93c47513332ffdd3c6d286)
2012-10-11 22:44:28 -04:00
Waseem Daher 31840811cf Cleaner HTML for the sidebar.
(imported from commit 2b630a6a37b634e29f0eb90368e9d174c1af3bc2)
2012-10-11 22:44:04 -04:00
Waseem Daher 8492aaee4b Firefox-specific fix: make narrowbar 'x' appear in the right place.
If its div comes after the currently_narrowed_to span, it appears
on its own, second line, for some reason.

(imported from commit d0b24f8e3aba3a6fdbe5624ba92ac81456e06634)
2012-10-11 16:15:19 -04:00
Waseem Daher 39e936242b Reindent.
(imported from commit 58b50e4e8cf39da6986fd0a03202b4b1c4655d51)
2012-10-11 16:15:19 -04:00
Waseem Daher 97daefee1c Responsive compose window.
(imported from commit 432223391cf158a6c8902370a911a08fd3179401)
2012-10-11 16:15:18 -04:00
Waseem Daher 601488e7df Make the narrowbar responsive as well.
This is one approach, anyway. Another is to keep it inside
message_list, which is what we (currently) do in the composebox.

(imported from commit 64c69b931012e3d21b7a10e3909f7a13f7dcfc4f)
2012-10-11 16:15:18 -04:00
Keegan McAllister 99209b4c0a register.html: Remove 'escape' filter
Now that we have enabled Django autoescaping, this happens automatically.

(imported from commit 43ac39e34354297b195facfde5a49dd071bf995e)
2012-10-11 15:01:54 -04:00
Keegan McAllister 7137787984 Escape variables interpolated into <script> within index.html
Django's escapejs prevents breaking out with an embedded </script> tag.

It only works on bare string contents, not JSON-ish lists and such.  So we
generate stream_list and people_list with template loops now.

(imported from commit 07fe4bebaa3fa11bc479b4378b8989560ce77f6f)
2012-10-11 15:01:54 -04:00
Keegan McAllister 648ed8bb0d Remove stupid copy
(imported from commit 428648daf82928ef34380923c0b2de47a18f9d67)
2012-10-11 11:17:50 -04:00
Tim Abbott ac3f4393ff Rename instance to subject.
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott 0562e52974 Rename newstyle_class to newstyle_stream.
(imported from commit b5b9dc1a899c31a07c9c5eba84fd4846aeb4cd08)
2012-10-10 17:48:18 -04:00
Tim Abbott f2fef23d82 Rename classname to streamname.
(imported from commit 098bf15c39080797ea5fbc2a9dc3d5842c934eaf)
2012-10-10 17:48:18 -04:00
Tim Abbott 5509419084 Rename #class* to #stream*.
(imported from commit a8f15f636f3801ba1152f1020e885240984d070e)
2012-10-10 17:48:17 -04:00
Tim Abbott 873f8fd2bb Rename class-message to stream-message.
(imported from commit fe69222bdca28bab303adca8ea8448a6aac35e40)
2012-10-10 17:48:17 -04:00
Tim Abbott ef3b8a2ce5 Rename class_list to stream_list.
(imported from commit c9f5b10acdb20d3e923cf7f32bc5a3f37aa40705)
2012-10-10 17:48:17 -04:00
Tim Abbott 08e832e093 Change send_message to accept a stream, not a class.
(imported from commit 0f58de2502bec227f5f33e44692d03f2f28d6f63)
2012-10-10 17:48:17 -04:00
Tim Abbott 6dc913766d Rename 'classes' to 'streams'.
(imported from commit 8ad6791f39d49e90a2828b6af86d039ba5ca5abc)
2012-10-10 17:47:13 -04:00
Keegan McAllister 7850305dcf index.html: Narrow the scope of autoescape off
(imported from commit 8a2903ba219f1792501977318ecb44db3ae8f50e)
2012-10-10 17:24:49 -04:00
Keegan McAllister 66ed141dc1 Enable Django template autoescaping
This has been disabled since forever, but we've mostly been assuming it's
enabled.  Let's actually turn it on and see what breaks.

(imported from commit a194ba4b77b5290c31b46401d400bece68a33e6d)
2012-10-10 17:24:49 -04:00
Waseem Daher ad4551128b Rename "Topic" to "Subject".
(imported from commit ad35917f2f3d3d382426d4514cefd1ef100ee2a4)
2012-10-10 11:57:32 -04:00
Tim Abbott 42c05b9690 Rename the zephyr template to the message template.
(imported from commit c15e2cc08d3604a82d90a96efa4f70d101971df4)
2012-10-10 10:32:59 -04:00
Tim Abbott e10966f1bb Rename zephyr_message to new_message_textarea.
(imported from commit 7176738a9bf04bf96327338626e63adf03884a56)
2012-10-09 22:42:19 -04:00
Tim Abbott 2748625ed2 Rename zephyr_picture to message_picture.
(imported from commit 829ccc59184ff7728c6da61d4ed71db1695e1729)
2012-10-09 22:42:19 -04:00
Tim Abbott 363c658896 Rename zephyr_comp to message_comp.
(imported from commit 752b669c3298dd791ba26de9fd815faa1b4e8a73)
2012-10-09 22:42:19 -04:00
Tim Abbott 0d2410952d Rename zephyr_list to message_list.
(imported from commit e9fbf075036f85aaf95d492701efb464347d9586)
2012-10-09 22:42:19 -04:00
Tim Abbott 7d70b31511 Rename send_zephyr to send_message.
(imported from commit 211d5a78435fe797191425a2ed975ca1885a15a6)
2012-10-09 22:42:19 -04:00
Tim Abbott 836971d3b3 Rename zephyr_content to message_content.
(imported from commit 05e255ec275a8aeaf3967d6a4305cc4440c81913)
2012-10-09 22:42:19 -04:00
Tim Abbott a259244f0b Rename zephyr_newstyle_* to message_newstyle_*.
(imported from commit 774588d19c782255ce128cbadb20aef8373d0030)
2012-10-09 22:42:19 -04:00
Tim Abbott 183f87f335 Rename zephyr_recipient_box to just recipient_box.
(imported from commit 82084fa50e51d646b1f8ea225c7ec6b1f3b7b66d)
2012-10-09 22:41:51 -04:00
Tim Abbott a62cd32107 Rename zephyr_compose* to compose*.
(imported from commit 103351bbdb7657720d7b7b9f57ee88e5957d09a4)
2012-10-09 22:41:17 -04:00
Tim Abbott bc988b16e3 Rename zephyr_table to message_table.
(imported from commit 5a898b642235516a193eaacdf430ca9bb0eccc38)
2012-10-09 22:40:13 -04:00
Tim Abbott 78c303e44a Rename zephyr-type-tabs to message-type-tabs.
(imported from commit 623d226209bc6cbe20721be08a271e52185ea65e)
2012-10-09 22:40:12 -04:00
Tim Abbott 864a26acd6 Rename the new_zephyr text area to new_message_content.
(imported from commit b5d09625a9c50865be7a6401e8da95efe06410fc)
2012-10-09 22:40:12 -04:00
Jessica McKellar b07bb45e35 Fix regression focusing on content box after autocompleting a single huddle name.
There are other focus issues related to switching between a class
message and huddle during composition, but this fixes the immediate
problem.

(imported from commit ec7ebc1c68e52942e9eaa0ea61e0de2f6ccae521)
2012-10-09 18:00:08 -04:00
Jessica McKellar fb62e808d7 Use an associative array for faster subscription checks.
This also helps us manage checking, case-insensitive, for
subscriptions while preserving the casing used by the class creator
for display.

It also fixes a bug where the class_list would become out of sync with
your true subscriptions, allowing you to appear to send messages to
classes to which you had unsubscribed.

(imported from commit 5e8d017bcfb27a71c52f7517733eda7b926d721b)
2012-10-09 17:28:21 -04:00
Jessica McKellar 9544964277 Having tabbing from a huddle recipient focus on the content input box.
This stopped working after unifying the content boxes for streams and
huddles.

(imported from commit cd4e733ff8b3a2fe43c4551b9615ba922ff005a1)
2012-10-09 13:33:50 -04:00
Jessica McKellar 6050a0a251 Advance focus to the next input field after autocompleting class or instance.
(imported from commit 068009946f0581834e268f1ed3d5e7e6a940fcde)
2012-10-09 11:45:46 -04:00
Waseem Daher c32a6a4d88 HTML cleanup since the two compose forms are now unified.
This also prevents the "bounciness" associated with the fact
that the stream/huddle selector was an absolutely positioned
div relative to the bottom of the compose window.

(imported from commit 413003a83c187efd45d0281f7cb6c9d0bd550674)
2012-10-09 11:14:21 -04:00
Tim Abbott d510a62976 Rename huddle recipient field to #huddle_recipient.
(imported from commit 8670f06679aa1554003aa2832dec3ed6d00ad1c3)
2012-10-09 10:27:40 -04:00
Waseem Daher 1f2c0faee4 Unnarrow when you click 'home'.
Potential downside: If you were narrowed and went to, e.g.,
settings, you would lose your place. If we wanted to be more
fancy we could have this code fire only if you were already
on the #home tab.

(imported from commit 5e8d90ba255076a11aa6f7a58c447156729ca23f)
2012-10-07 17:02:22 -04:00
Waseem Daher 10c15ba1cf Don't use <a> when you really want a button.
href="#" will cause the browser to jump to the top of the page, which
breaks everything in the scrolltheworld world, unless you suppress the
event.

(imported from commit ae03cbb9e8a82f28e8536f29485e9e947e7e76c2)
2012-10-06 22:18:35 -04:00
Tim Abbott 358351d423 Use the new_zephyr form for personal zephyrs, rather than a duplicate.
(imported from commit 741a785efba9ea40b5c1022d710360f086a2d859)
2012-10-05 17:44:55 -04:00
Tim Abbott d9f03d9842 Import xdate javascript library.
(imported from commit 6a9344a07672c377f38d29f6d8a5d866684c8456)
2012-10-05 15:42:54 -04:00
Waseem Daher 0c3ace82d5 Use throttling on our handling of scroll events.
This actually is a bit cleaner than our last approach,
because (I believe) we run our scroll handler code
even after the final scroll event, which prevents the
pointer from getting hidden by rapid scrolls.

(imported from commit 3bde4e8f067cd2406f90c04425c6e4ffb81ea784)
2012-10-05 15:39:10 -04:00
Waseem Daher 10adfee7b0 Clicking "New Message" no longer resets your position on the page.
The issue was that our 'button' was actually a link with href='#',
and we didn't actually cancel the event; so it jumped to the
top of the page.

(imported from commit e66decb3a202ea22176ec539a1ec1d405faf0117)
2012-10-05 14:52:46 -04:00
Waseem Daher 6d37154a36 Better, but still not great, small-window behavior.
I'd like it to ultimately be the case that if you make the window
too narrow, the menubar goes to the very top and has small icons.

(imported from commit 0a5fe548d4d848c0358c9780df7af1fe1abc93fa)
2012-10-05 11:50:40 -04:00
Waseem Daher c59cb40a71 CSS cleanup.
Try to adhere to Bootstrap grid system a bit more consistently.
Unstyle subscriptions page for consistency.
Still not sure why the "affix" jumps when we switch to "Subscriptions."

(imported from commit 1c28de4e2ef3d6ed3d1bdcfd143eadefba2b46cb)
2012-10-05 11:50:40 -04:00
Keegan McAllister 2ebd708a8d Remove client-side linkification
It causes problems when [un]narrowing, and we already do the rest of formatting
on the server side.

This reverts commit 90af0192b37bbebbf56d5e7c50f182485ddbca10.
This reverts commit df7e355648d2c4d6319de049933547ed96402fd8.

(imported from commit 99d87f0826ec2f49741f86fad6524ed93e76723f)
2012-10-04 16:52:08 -04:00
Luke Faraone 8f81dc5670 Changing your gravatar should be in a new window.
(imported from commit 4877bcdfc1ad2b0597a13078816c39a8768bcd71)
2012-10-04 16:46:20 -04:00
Waseem Daher 738fe500f0 Unbreak settings/subscriptions windows with some div cleanup.
(imported from commit 427ead3b0cb6ddaf399394ca6c3e363cc8264efe)
2012-10-04 16:35:53 -04:00
Waseem Daher 59a00cb1ab Eliminate scrolling-tab.
scrolling-tab used to be used to target which tab would be a recipient
of the scroll events generated by PgUp, PgDn, etc. Since we now let
the browser handle these natively, we don't need to worry about it.

(Instead, when we hook the 'scroll' event, we should make sure that
home screen.)

(imported from commit c555d960da995a09b370867c96d17f4ce4f2171f)
2012-10-04 15:47:20 -04:00
Waseem Daher 86ffd0de7a Make composebox look better.
Make it look as wide as normal messages, and improve the closing 'x'.

(imported from commit 2aae92192ba8fc9bc4ee28a57755c4bd40726fb4)
2012-10-04 15:45:59 -04:00
Waseem Daher f1efc6f920 Remove scroll buttons.
(imported from commit ddb3ed5073fc66c130e345b3a2eff8abfab06f9b)
2012-10-04 15:45:59 -04:00
Waseem Daher 785485041d Allow the whole page to scroll for 'Home'.
(imported from commit a61627cca0fb3624b343fae5b9a575f1b389e57a)
2012-10-04 15:45:58 -04:00
Waseem Daher 94663ed215 Enable scrolling in a reasonable way on tabs other than 'Home'.
(imported from commit 11a7b6e0055b5202003a0cdb93d90f5f9ebedf2a)
2012-10-04 15:45:58 -04:00
Luke Faraone 29555559d2 Create better error pages for 404 and 500.
(imported from commit c2903b630131c55b9e14369ca0b7f1a8f0fe765c)
2012-10-04 15:31:23 -04:00
Luke Faraone d0a1d32c2b Make the confirmation redirect as short as possible; don't render a waiting page first.
(imported from commit 05b035a59bd3cfced56649b95c0ed91a811d0041)
2012-10-04 14:52:32 -04:00
Luke Faraone 120d0aa99d Validate the register.html page.
(imported from commit 10ce8b637ae40ab733c01c2adbf6a2ad61a85d82)
2012-10-04 10:59:43 -04:00
Keegan McAllister ffff63eaad Move some subscriptions-related code
(imported from commit 49f6e525e3aa8a7a5336f713c94e81fee6546dfa)
2012-10-03 18:25:59 -04:00
Keegan McAllister 8d17de1247 Move some early setup code
(imported from commit ca57718e4a71f43bbf229d2a6e8c70174bb3583f)
2012-10-03 18:25:59 -04:00
Keegan McAllister 50d84e9ca8 Move some UI-related code
(imported from commit 28dc554ed91c14f8a8b4be282a211d3d50cf9873)
2012-10-03 18:25:59 -04:00
Keegan McAllister 37f8445318 Split more files out of zephyr.js
I would like to have split this into several commits, but it's hard to do
incrementally, because functions need to be defined before their use in global
data.

(imported from commit 31533396b236f3b657950b073982c317256f082a)
2012-10-03 18:25:59 -04:00
Waseem Daher 9b268e53ed Remove 'Search' from the navbar.
My expectation is that you may or may not get to "Search" by clicking
something like this.

(imported from commit 3f09286b1a8fa80455d6f6d55997f6f829fbad15)
2012-10-03 14:23:46 -04:00
Luke Faraone 568c7300ef Spacing, labelling fixes to register.html.
(imported from commit fee13c25740a0d0a80b44c3771c989d1c8cd30fe)
2012-10-03 13:51:01 -04:00
Luke Faraone ca50ecb945 Align registration form components for consistency.
(imported from commit 7933ea5fbc01c7d2ddd0bda71b5d2344aa6349a5)
2012-10-03 13:51:01 -04:00
Luke Faraone 2de8a1a59d Submit the confirmation form instantly for zero-delay registration.
(imported from commit b9465ba00a6e3bf57bb6d832bf1f3a98184fc36a)
2012-10-03 13:51:01 -04:00
Waseem Daher 2c294694fd Restyle narrowbar to avoid wrapping.
Previously, when we narrowed on a super-long class/instance or
a huddle with lots of people, the box overflowed. This is an
attempt to fix that, even if it isn't the prettiest.

(imported from commit 4eb58726a4c4714bd5435a791ad8fea0eabb58ed)
2012-10-03 13:38:33 -04:00
Tim Abbott 7acfb5c71c Rename /zephyr/ to /send_message/.
(imported from commit 41c2ff67cfc514e53aff8648c36f545526e324ed)
2012-10-03 12:30:37 -04:00
Tim Abbott e79805847b Rename the 'new_zephyr' argument to the more descriptive 'content'.
(imported from commit b47e2c4823bbfbf2f94cbafb24ed5d78dfbe841b)
2012-10-02 17:29:55 -04:00
Waseem Daher 61c7558b65 Long class and instance names get auto-abbreviated.
This required some serious retooling of the table,
and some thinking about the interactions between
table-layout: fixed and colspan.

And some of it is still a little magic-number-y.
(Like that 97% width on zephyr_compose_box -- without
 it, the stream compose box looks weird in Chrome,
 but not Firefox.)

(imported from commit 20c426ad2dae5efa3107890b28976a957bb3d1e3)
2012-10-02 16:00:46 -04:00
Jessica McKellar 588db5b4c5 Make class names case-insensitive.
(imported from commit e76e50156ca8dab1f7b3124351997e75ef08e521)
2012-10-02 15:16:26 -04:00
Waseem Daher 2873e45b3f Tweak signup email text slightly.
(imported from commit 4f8427a731376d7e9d5eb387673324bb25141743)
2012-10-01 18:05:01 -04:00
Jessica McKellar 28e668bb46 Handle home view subscriptions error cases.
(imported from commit 7f31b5c4837c524c3ad5a0538ca1f01ad73141a3)
2012-10-01 15:36:10 -04:00
Luke Faraone aca5cef3eb Redirect to login when attempting to resignup with a used email address.
(imported from commit d58a5dda9a0af409a6ee57cfcd30be45020352d2)
2012-10-01 10:45:58 -04:00
Luke Faraone 50dfbf7a1b Implement confirmation for new user signups.
We add a few templates for django-confirmation. We define a
"PreregistrationForm" which is validated by accounts_home, which then
generates a confirmation object and emails the user. This required creating
a new table for a PreregistrationUser with an email and status (confirmed)
field.

The register function now no longer accepts a "email" field in the form
and deals only with confirmation IDs to determine the email used to sign
up a user.

(imported from commit 4fcde04530aa7ad4de84579668daee7290b424ac)
2012-10-01 10:45:58 -04:00
Waseem Daher d13dd0a953 Restyle personals, attempt #2.
(imported from commit a8bdf6ad1d7e3dd24b8d42b0f46472ba2db15900)
2012-09-28 14:34:09 -04:00
Waseem Daher d767d0ee49 Style the compose dialog, too.
(imported from commit 5e464c18d913b016d1a9d4514e2aef7e56c5df2c)
2012-09-28 13:42:56 -04:00
Jessica McKellar 9cbdbc4893 Don't update the selected zephyr on mouseover.
But do keep the pointer on the screen as you scroll, and smoothly
scroll all the way up to the top or all the way down to the bottom.

(imported from commit 6acad2a16339ee5eeeebd62a853000c21e4b7152)
2012-09-28 10:59:38 -04:00
Waseem Daher 8c6e274dc6 Compose window class/instance should not be clickable.
(imported from commit b32bc57e101d232fb9d0a1f1272aba35b536576f)
2012-09-27 18:03:46 -04:00