Jessica McKellar
aaf537f528
Hide the scrollbar.
...
I am not thrilled with this hack, even though everyone on the Internet
says this is how you do it
(e.g. http://stackoverflow.com/questions/5820304/hidden-scrollbars-in-firefox-allows-scrolling-but-just-no-scrollbar ).
(imported from commit 3a3e782f8f7e489d897187a583e0f7de704b26cd)
2012-09-17 13:51:33 -04:00
Jessica McKellar
3d2de1fa7c
Snap back to where you were in the home view upon un-narrowing.
...
(imported from commit 72458f4006890c392e5ca557f7178260bff7c7f9)
2012-09-17 13:26:09 -04:00
Jessica McKellar
8e1ce1c371
Shorten the compose box fade and collapse time.
...
(imported from commit 136f0fc02da291c85a4f4b169217a273ff496faf)
2012-09-17 13:26:09 -04:00
Luke Faraone
8a89c56b7b
Iterate through an array without using 'in', remove extra spacing.
...
This corrects some additional bugs introduced in 9128ddd and a5f06bd
identified by Keegan.
We previously used "for i in"-style looping, which is sub-optimal. Move
to a different style.
We also had a weird spacing thing I introduced in a previous commit,
which has now been fixed.
(imported from commit 7334d8ee703564bedeb0ea939b0d64ad2d5fceba)
2012-09-17 13:12:24 -04:00
Luke Faraone
de5ff99c21
Don't generate both zephyr_json and zephyr_dict_json on the server.
...
Previously we were iterating through all zephyrs twice on the server, now
we are moving part of that to the client so the client has an index of
Zephyrs that it generates itself as part of add_message.
(imported from commit c07a6c36911fa2eae6f216c34331be34b2aa8178)
2012-09-17 13:12:22 -04:00
Luke Faraone
50dd1c31b8
Don't directly use showToggle, instead calling upon show_compose.
...
(imported from commit 4f3f81edf0c19abf34cbc5f39e25bdbad50c6d9a)
2012-09-17 13:11:49 -04:00
Keegan McAllister
2ba583a214
Remove unnecessary padding on <body>
...
This was copied from a Bootstrap example page and is messing up the topbar on
login, subscriptions, etc.
But I like the padding on the main view left side links, so we'll keep that.
(imported from commit 67ef75a7a0f359d0f2bc2857e56aa2249ec09cbf)
2012-09-17 11:31:05 -04:00
Jessica McKellar
69cc5c02dc
Make clicking anywhere in a zephyr start a reply.
...
Previously you had to be inside the content span.
(imported from commit 0570ddeb9bc948d278b0b1859b4a041b81ff184d)
2012-09-17 11:16:53 -04:00
Jessica McKellar
e8a6fee147
Fix the ability to send zephyrs when there are no previous zephyrs.
...
Previously, select_zephyr was erroring out, preventing New Message
from working.
(imported from commit 570a777318a7078c0c326042876b94dcc496011f)
2012-09-17 10:42:45 -04:00
Jessica McKellar
ccfc9f5889
Only register the callback for subbing to a class once.
...
(imported from commit a6c41f79ea8c6e2f6a6ff5a6b41b98fd53ad4e82)
2012-09-14 15:44:55 -04:00
Jessica McKellar
d7f453dfb3
Only register the callback for creating a new class once.
...
Previously, when trying to send a zephyr to a new class, you would
actually send N zephyrs, where N is the number of times you'd created
a new class.
(imported from commit 2c36b0282c8c2291e05b5ad952f5b25e3f43d406)
2012-09-14 15:44:55 -04:00
Jessica McKellar
a12f582d92
Don't let people try to send zephyrs to empty class names.
...
Also strip leading and trailing whitespace, so 'Bar' and 'Bar' aren't
separate classes.
(imported from commit a39c220d1a4c4d179f4adbf5e1391436eda32f4f)
2012-09-14 15:44:54 -04:00
Jessica McKellar
ebfc684a6e
css: Add missing semicolon.
...
(imported from commit 055cae0fdb00db656b4fcea9a384c0f2a3af58fc)
2012-09-14 15:44:54 -04:00
Jessica McKellar
9a7dc0e50b
Only hide the compose box on a successful zephyr.
...
(imported from commit a83e26ce42ae6b80872dd81ed10d5318c193f1ef)
2012-09-14 15:44:54 -04:00
Jessica McKellar
56ea3d12d5
Clear the compose box after successfully sending a zephyr.
...
You don't care about that content anymore. We probably want to clear
even more aggressively than this.
(imported from commit 29f6910a12e1b722f5801db644b04f54cf5bfd63)
2012-09-14 15:44:54 -04:00
Waseem Daher
ea586ac581
Restyle compose window slightly, add close button.
...
I still don't love it visually, but it's getting there.
Some obvious issues:
Personals window is totally unstyled
Clicking 'new message' should perhaps give you a fresh new window
not something prepopulated with old stuff. Think about this.
(imported from commit 8b28fd084d550db404eabbe63c056fa6866c0697)
2012-09-14 12:22:25 -04:00
Waseem Daher
bee291afaa
Restyle the narrow bar slightly.
...
Put a little 'x' by the class or class-instance indicator, to make
it more analogous to the planned behavior of the view-in-context
search box.
(imported from commit fa01001cffa6a6094ba5fbdcbdc965addb2efa1c)
2012-09-14 11:40:56 -04:00
Keegan McAllister
5711e953f9
Remove redundant font spec for emails
...
(imported from commit 335608864107bb3c4b611ba4ba09bfd67e62e562)
2012-09-13 17:45:44 -04:00
Keegan McAllister
67b337ce07
Get rid of selectors like span.foo
...
Just write .foo. We shouldn't have to care what type of tag it is.
(imported from commit 86c4eeecbe4f5c9875002e3fd81757cd49050268)
2012-09-13 16:32:21 -04:00
Keegan McAllister
7638dc7279
Less confusing names for some classes
...
(imported from commit 15475d7dc98702a3935b1eb8a1373ab222913a7c)
2012-09-13 16:32:21 -04:00
Keegan McAllister
1674dea775
Restyle email addresses in zephyrs
...
(imported from commit 7176758240da9f5b85370bf02d7ea5c9991a44a2)
2012-09-13 16:32:16 -04:00
Keegan McAllister
8b691ec0b2
Don't update pointer when it hasn't actually changed
...
(imported from commit 41c8b1cd2a586bb9d82b0ff194c076e93f34d98a)
2012-09-13 16:29:47 -04:00
Keegan McAllister
d7a5fa3d99
Add some padding on email
...
(imported from commit 59746e712cf9a5f75bb9dbf3f9a4257a7667dbab)
2012-09-13 16:29:47 -04:00
Keegan McAllister
02fa8e5f17
Whitespace
...
(imported from commit fa47eddc4978927e3d9d5c913a3a7638535691d3)
2012-09-13 16:29:47 -04:00
Keegan McAllister
3694ecaf4c
Only display email while hovering on fullname
...
(imported from commit 0f366deb69ba49bfda998dd993e32de0d29affe4)
2012-09-13 16:29:47 -04:00
Luke Faraone
17537ffe17
Use zephyr_dict as the authoritative source for data about zephyrs.
...
Previously we would extract zephyr data from a TR. In the NWO where
sometimes this data is ommitted, we instead need to use the zephyr_dict
object.
(imported from commit a5f06bdadc4fbe13f1718d6dcb41046d0ed040cd)
2012-09-13 14:36:54 -04:00
Luke Faraone
4821175dd5
Provide both a sequential list of zephyrs and an associative array.
...
The purpose of this is to ensure that we can reference a zephyr by its ID
and get all the data about the zephyr; in the future we may not have all
such data stored in TRs as we do now.
(imported from commit 9128ddd01b46396fd276124ca1e6430538d3dd63)
2012-09-13 14:31:02 -04:00
Waseem Daher
fa8dd00f15
Shrink timestamp size slightly.
...
(imported from commit b4c0a20a4008d8f0f96421e1fa246cb31d3ccc3f)
2012-09-13 13:15:20 -04:00
Keegan McAllister
afa608fad8
Only display email on the selected zephyr
...
(imported from commit fc0ca119abaf31f74e7ad384c6821bfeaedaae87)
2012-09-13 11:58:59 -04:00
Keegan McAllister
ea42342031
Distinguish the selected zephyr in CSS
...
(imported from commit 42e243ff95de5427e78dbc532dfe9e50e9677438)
2012-09-13 11:57:26 -04:00
Keegan McAllister
a8dcf09f1e
Use get_zephyr
...
(imported from commit 160eb772992cb18450b859637935f1039c576832)
2012-09-13 11:44:51 -04:00
Keegan McAllister
16b8258924
Fix bad merge
...
(imported from commit 6d6a4e7da0e3e3dacd732cde19009b427aa813cb)
2012-09-13 11:42:23 -04:00
Jessica McKellar
09bb68e52c
Have the pointer follow the mouse.
...
(imported from commit cfd6bcd7ba506c440f74bd7e40eaacadc06b10c8)
2012-09-13 11:06:29 -04:00
Jessica McKellar
08904cae43
Clicking on a zephyr pops up the compose window and prepares a response.
...
(imported from commit 00139f7b0c6d1ded198064689f1a1bd8038e72f9)
2012-09-13 11:06:28 -04:00
Waseem Daher
3e5008b143
Remove searchbar from narrowed view.
...
Today I'm of the mindset that searching is a fundamentally
distinct operation than narrowing, so this reflects that.
(There would be a separate screen and UI for searching,
I guess.)
(imported from commit 432a4088612dafd06184bec228b63056961325dd)
2012-09-13 10:36:29 -04:00
Keegan McAllister
51e109d043
Show full date hovering over timestamp
...
(imported from commit 486cd85b4ec21ad8468ced207c541372f341c200)
2012-09-13 01:00:28 -04:00
Keegan McAllister
c3c675a872
Fix the size of profile pictures
...
This fixes a transient display glitch while the image is loading.
(imported from commit a153de8ebb07eaa89a7a0eb215f15a88e950a1f4)
2012-09-12 21:58:12 -04:00
Keegan McAllister
b0d8f30d91
Make Esc hide the compose pane in every hotkey mode
...
(imported from commit 487f19265053780a322ea741a08b3bf318821574)
2012-09-12 18:06:28 -04:00
Keegan McAllister
a236e29afa
Factor out hiding/showing compose pane
...
And avoid slideToggle, so that we don't have to care about the current state.
(imported from commit 52ddcfda50baa297c56114574600c5a5e0ee47f2)
2012-09-12 18:06:28 -04:00
Waseem Daher
e8a1ecad94
Renaming some divs for additional clarity.
...
unhide -> show_all_messages
narrow_indicator -> currently_narrowed_to
narrow -> searchbox
This is a little clearer about what these buttons/functions
do, which will be useful as we add a little more complexity
associated with searching.
(imported from commit b51e745ea71c212d6735e04011eaea5e71bf6d5a)
2012-09-12 17:31:48 -04:00
Keegan McAllister
7d4fd5b14f
Zero-pad hour and minute
...
(imported from commit 404600ce3cb2233acb1b2e69cdd87c64604d9826)
2012-09-12 17:07:13 -04:00
Keegan McAllister
ae5137b5c9
Show timestamps on zephyrs
...
We use the browser's local timezone.
(imported from commit 6ed6444df6edf2093b9399adb1511dd3ee80def3)
2012-09-12 17:00:02 -04:00
Keegan McAllister
f47b88ccc8
Don't take up space with the hidden username span
...
(imported from commit 9ae4953a583947c259a20ce5f7c25c0216b2cc51)
2012-09-12 16:24:42 -04:00
Keegan McAllister
714eec5594
Select zephyr rows by class
...
This fixes the bug where the reply box is hidden when narrowed.
(imported from commit 0673b9063818946b7da70f6109ca17403240737d)
2012-09-12 11:47:56 -04:00
Waseem Daher
3f42c8422f
Experimentally add a search bar.
...
I'm not exactly sure that this is the interface we'll want for
this, but it's the start of an experiment.
(imported from commit ea18a9b05106546475bc151229955ddafd8e7b8e)
2012-09-12 11:19:33 -04:00
Waseem Daher
85398abba3
My take on a prettier pointer.
...
(imported from commit 7d0c37c85781bdd48efb4cf9cec49bb6df7f0954)
2012-09-11 17:38:05 -04:00
Waseem Daher
9a7993a954
Cause class and instance names not to wrap.
...
This looks ugly, uglier than the alternative, but I want
to encourage us to figure out how to deal with this case
rather than allowing it to wrap.
(imported from commit 9ef9cedeca2e27a0db996083e2e528f3daec3f43)
2012-09-11 16:57:03 -04:00
Waseem Daher
5ca1ac55d6
Make classes and instances always take up 100px.
...
Setting both max-width and min-width really feels like
a hack -- surely I can just set "width" and be done
with it?
(imported from commit 7650419c5ae8bb7ce3a3d6bd7dabbfb42390586f)
2012-09-11 16:53:30 -04:00
Jessica McKellar
f5e8f025b7
Bring back preparing a personal when you click on a user.
...
(imported from commit b9081cb77dafa590605ee3a0892b359cc7ac6d06)
2012-09-11 16:35:01 -04:00
Jessica McKellar
49af4ec000
Don't hide the New Message button when you click on it.
...
It's not part of the original WaseemUI scheme, and it doesn't ever
reappear.
(imported from commit 3417fae31fc8d1b87d0d8b463548c24f5c2d260c)
2012-09-11 16:35:01 -04:00
Jessica McKellar
f52ec24926
For now, compose zephyrs to usernames.
...
We'll eventually need to normalize emails, autocompleted names,
etc. to one entity we use when talking to the server about senders and
personals recipients, but for now since we've hardcoded usernames
everywhere, just use those.
(imported from commit 4a0e033b301b8dec55d97157eb4993982f6b2641)
2012-09-11 16:35:01 -04:00
Jessica McKellar
bfdf2bef57
[schema] Collect and display names and e-mail addresses.
...
(imported from commit aa6bceb05fcd5b456c03288cbfed65b14050fe88)
2012-09-11 16:34:53 -04:00
Jessica McKellar
06711afa51
Add a block of whitespace at the bottom of the zephyr feed.
...
That way you can see new zephyrs as they come in.
(imported from commit 6b72a7f2116130edc0444f601423453801ddb6b5)
2012-09-11 16:27:12 -04:00
Waseem Daher
cca0e8f521
Restyle narrowbar slightly.
...
I have some serious concerns with this implementation,
but I think it's still an incremental improvement.
(imported from commit 6ed8d2545c727e25bf85b98a1528dbf3d155bc92)
2012-09-11 16:20:16 -04:00
Keegan McAllister
b4103798f5
Speed up narrowing
...
(imported from commit e1f06866ebc7d3dae3a5813565002853a6f6d8ba)
2012-09-11 15:37:09 -04:00
Luke Faraone
34a7ad5be0
Revert "Collapse duplicate instance names, add breaks."
...
This reverts commit 8c47682cd80fec0d221a519abc593f4d83dc90b5.
I accidentally broke.. a lot of things in my last commit. Lets fix those
issues before pushing to master again.
(imported from commit fbadd6e854722e41cccd2535748ee47f4efd657b)
2012-09-11 15:19:51 -04:00
Keegan McAllister
a5d105dbae
Move styles out of index.html
...
(imported from commit 8b3732ff67af71dac49886004370b6d4759b140f)
2012-09-11 14:38:33 -04:00
Keegan McAllister
75c34a7f1b
Fix a bunch of code style problems
...
(imported from commit 473ae8fdd64783f7a0989b17cae39826de42d30d)
2012-09-11 14:38:33 -04:00
Luke Faraone
c5238e4af5
Collapse duplicate instance names, add breaks.
...
(imported from commit 8c47682cd80fec0d221a519abc593f4d83dc90b5)
2012-09-11 14:37:24 -04:00
Keegan McAllister
00e3f9d948
Right-align zephyr table within its div
...
(imported from commit 59365d0ef466bf08fe1cf9ddcac5558579962c84)
2012-09-11 13:46:47 -04:00
Keegan McAllister
8b1b5ddbdb
Hide horizontal scrollbar
...
(imported from commit 5510657c7adfb189e1a332c8f6f2eab9840a8080)
2012-09-11 13:08:18 -04:00
Keegan McAllister
bcdfafb37f
Tweak class/instance display, esp. for long names
...
(imported from commit e8b73f2f772e18ea72fbbfb68107659d0b9adb8c)
2012-09-11 13:06:07 -04:00
Keegan McAllister
84cfca1ea0
Shrink messagebox further
...
(imported from commit 4184f19aec54b764bc205bef067426d90e67d843)
2012-09-11 12:48:57 -04:00
Luke Faraone
34b594b96b
Reimplement the narrow bar.
...
(imported from commit 19e41c1238dff404813a21b9dc318458d5f29c64)
2012-09-11 12:12:02 -04:00
Keegan McAllister
65c6f2dfcb
Set messagebox max-width as well
...
(imported from commit 0ada0fcabf23f38caf7b7cfa7173cc9822d2eefb)
2012-09-11 12:05:28 -04:00
Keegan McAllister
e5ac53674a
Use fixed table layout
...
(imported from commit 12eb4882b03e6cf4b633334481a82da70b868ce1)
2012-09-11 11:56:34 -04:00
Keegan McAllister
1c539ac828
Fit compose box to zephyr list
...
(imported from commit 7b17e637b14ec5b97a890d4c16422259adec8c4c)
2012-09-11 11:51:28 -04:00
Keegan McAllister
7da13a873e
Fix size of messagebox
...
(imported from commit ea236a85cf8a5556242cce79d1911a3744fdf7b4)
2012-09-11 11:49:33 -04:00
Keegan McAllister
8db9a7c1d6
Adjust hover color to match Bootstrap
...
(imported from commit f43a9d07ce027932e4a22d2fb9efe7711883f318)
2012-09-11 11:49:13 -04:00
Keegan McAllister
ad27472b05
Indicate clickable labels
...
(imported from commit aebd6171bbe45d8e8055ca22526ab919b6e348e1)
2012-09-11 11:32:04 -04:00
Keegan McAllister
8440fdd838
Use a fixed width Zephyr list
...
This is about the same size as Twitter.
(imported from commit b171b0202dfaaf14c535824a4bc2df06d18a1e51)
2012-09-11 11:16:32 -04:00
Luke Faraone
1da8c16367
Make "new message" open the compose window.
...
(imported from commit d63f4915f884dfa2bc11653d17782e5ee4c6191e)
2012-09-11 10:54:25 -04:00
Waseem Daher
0958e380d0
...but add the padding only on the top.
...
(imported from commit 2459b639d40aaac44d71a8f754481f90348e72ac)
2012-09-10 15:16:17 -04:00
Waseem Daher
f847931dbd
...but add padding so it lines up.
...
(imported from commit 5d174cd0c72233702dc1681e0118f2da4bb912f2)
2012-09-10 15:14:46 -04:00
Waseem Daher
e1b7efe988
Vertically align the pointer.
...
(imported from commit 5ba1586eb1576439b4f0665cf85ba1f59a197c23)
2012-09-10 15:14:01 -04:00
Waseem Daher
7c10832118
Restyle zephyr window slightly.
...
Eliminate huge left margin, and don't let long class or instance
names totally break the layout.
(imported from commit 69237d29a60241bdadda0469c4e08aa1d987222a)
2012-09-10 15:06:08 -04:00
Keegan McAllister
7b8544a53f
Get class/instance for narrowing more uniformly
...
(imported from commit 1e9622cb93cf5954cf94f38c77c191524a6e72bc)
2012-09-10 14:46:03 -04:00
Luke Faraone
37c226e6b6
Remove spurios padding on instances.
...
(imported from commit fbcbbe3f0973bbac74574f59d076b010f38951b5)
2012-09-10 14:37:36 -04:00
Luke Faraone
cfc42b1d82
Implement portions of Waseem's new UI.
...
This is mostly working; things that need to be implemented:
- Ask users for their Real Name
- Personal replies need skinning
- Miscl UI changes to match mockups
(imported from commit 3638cf5ec2ba2306004ba6db6fa4c25c47f76517)
2012-09-10 14:32:42 -04:00
Keegan McAllister
afee8630aa
Implement hotkey state as a state machine
...
(imported from commit d4f52cbc6bc9e66643e89c5b49a2201e4c938265)
2012-09-10 11:36:17 -04:00
Keegan McAllister
2798f83dbe
Use switch-case for hotkeys
...
(imported from commit c269119d6e1034508303b1c67f5e7a59376674da)
2012-09-10 11:36:17 -04:00
Keegan McAllister
e3307aff39
Factor out hotkey processing
...
(imported from commit bb7a7269b39481cbe831a9a5872b4e32f0f04234)
2012-09-10 11:36:17 -04:00
Keegan McAllister
11b5a8e193
Add JSLint options
...
(imported from commit ff01274558cf1145a6ab057218bc16bac5628b2e)
2012-09-07 15:15:16 -04:00
Keegan McAllister
b4c2aba14d
Reparenthesize an expression
...
This was supposed to be (x && (y || z)) but was written as
(x && y || z) i.e. ((x && y) || z).
(imported from commit c2d6d385f71e6bc4b8933f6426d88aeee0123f66)
2012-09-07 15:07:50 -04:00
Keegan McAllister
52b6ed0ba4
Move scroll_to_selected definition before first use
...
(imported from commit 22f3274f8f636950784f241b9b61dc3785b370b0)
2012-09-07 15:07:50 -04:00
Keegan McAllister
8c9d29842d
Fix formatting of nested functions
...
(imported from commit 7777d6bcc3d249d6c5dd51305c88220e5ec6e469)
2012-09-07 15:07:50 -04:00
Keegan McAllister
c31e7903e9
Missing semicolons
...
(imported from commit 76bfb622f5e6a90b4c14dc4db78ab16e7a935df0)
2012-09-07 15:07:50 -04:00
Keegan McAllister
b7d7d3da26
Declare all variables at the top of each function
...
Javascript has function scope only, not block scope, so the block use of 'var'
is misleading.
(imported from commit 6763fa241408e5893392f622fd92b2664a993ed0)
2012-09-07 15:07:43 -04:00
Keegan McAllister
fd7a7aaff4
Javascript: Use !== and === instead of != and ==
...
!= and == will perform type coercions, which can hide bugs.
(imported from commit 42d3d990a659b62e196f3755c176f83f80c9e319)
2012-09-07 15:07:43 -04:00
Keegan McAllister
1211995d2e
Fix indentation
...
(imported from commit 8f4880ceaa2e84fa842ba195ebe40800fc168eab)
2012-09-07 15:07:38 -04:00
Keegan McAllister
7659937586
Inline a global constant which is now only used in one place
...
(imported from commit 2c288202f5c46ff62f6044cd23f092e4175d498a)
2012-09-06 17:01:19 -04:00
Keegan McAllister
115334c82a
Don't bracket $.get with $.ajaxSetup
...
Instead, use the more general $.ajax which can take these options directly.
(imported from commit bb915e7d25cb6ac675d098903f7e7b57bde5006e)
2012-09-06 15:48:15 -04:00
Keegan McAllister
474f08198b
Send zephyr template inline with index.html using django-jstemplate
...
(imported from commit 58cc8a50d463548aa283658dbe0aae366ecab39f)
2012-09-06 15:48:15 -04:00
Keegan McAllister
fce5643d15
Handle Zephyr body clicks like the other clickable elements
...
(imported from commit 97da4b22aea4e23dd0227b0179481cb3b5f7a65e)
2012-09-06 15:48:15 -04:00
Keegan McAllister
6f269051d1
Partially consolidate the code which knows that zephyrs are <tr>s
...
(imported from commit ca2a208af9f1d3cc8a3f3980f55a5c008d28147a)
2012-09-06 15:48:15 -04:00
Keegan McAllister
689ab1efd6
Misc stylistic consistency
...
(imported from commit 624a07f50544d96f9e3c3b417b00369641bd3ae1)
2012-09-06 15:48:15 -04:00
Keegan McAllister
59ab88f886
Rename current_view -> apply_view
...
And related cleanups.
(imported from commit 4b1a7e7ef19b17c0887e2864f7cc2121eeda361e)
2012-09-06 15:48:15 -04:00
Keegan McAllister
1fa40e515c
Style fixes
...
(imported from commit 311600ad8627d7060f235f59852d77f73a951e81)
2012-09-06 15:48:15 -04:00
Keegan McAllister
5e5b5986af
Don't pass the global selected_zephyr_id through the narrow functions
...
(imported from commit a19232052913f45a6f8d3c08dd8761a6a2b5ec99)
2012-09-06 15:48:15 -04:00
Keegan McAllister
a9f45e6e0e
Have select_zephyr ensure that we point at a visible zephyr
...
(imported from commit 91e485742a040cf6c3454d1f55993a6c77a8ca09)
2012-09-06 15:48:15 -04:00
Keegan McAllister
74c97e7d59
Remove duplication between do_narrow and select_zephyr
...
(imported from commit 84c3e5a0d5682fd8790bd6e277e05e54a47d9aac)
2012-09-06 15:48:15 -04:00
Keegan McAllister
d78e1f1bcb
Remember the selected zephyr in a Javascript variable rather than querying the DOM
...
And related cleanups.
(imported from commit aa64980b4e66a64e92735c736159a8e2f717ea09)
2012-09-06 15:48:15 -04:00
Keegan McAllister
03d2a087a7
Organize global variables a bit
...
(imported from commit d3ad323bad4cda98e55a54ed3c9aec81ccd4008b)
2012-09-06 15:48:15 -04:00
Keegan McAllister
84e618a902
Use 'var' at top level consistently.
...
This has no effect but is stylistically consistent.
(imported from commit 71d7f615ea140195cc5081fb331677bc5d856fed)
2012-09-06 15:48:15 -04:00
Keegan McAllister
8f1cee0b88
Move third-party components into static/third/
...
(imported from commit 709c78a6e41afcd4202a8264c9103ac7827158ec)
2012-09-06 15:48:15 -04:00
Luke Faraone
3d1e956069
Don't check for class existence if we're not sending to a class.
...
(imported from commit 832de3f899d90ee727cebeede061de6a409b7845)
2012-09-06 15:19:56 -04:00
Luke Faraone
f6b481546f
Offer to subscribe / create classes if user zwrites to a non-subbed class
...
Here we check if a class exists. If not, we prompt the user to create, sub,
and send his message to the class. If the class exists but we're not subbed
we prompt the user to sub.
This commit also added a decorator to views.py and refactored out some
redundant code.
(imported from commit 7234ef6c080f2a6de6ff0922635dddd90032f7fe)
2012-09-06 14:33:55 -04:00
Tim Abbott
31ece4d3aa
Fix narrowing by instance.
...
(imported from commit 824f0c113b9b6970bd451f4b0c3285dd3b88d9c4)
2012-09-06 11:17:39 -04:00
Keegan McAllister
4dd1567426
Keep third-party jQuery style in the jquery dir
...
(imported from commit 9e34277b90c13b3ce71521fe0657014f186fc1c3)
2012-09-06 11:00:34 -04:00
Jessica McKellar
cede8e59fb
Return a 400 and error message instead of 500ing on a personal to an invalid user.
...
(imported from commit b8cdf342f2919aa0dbd2e30764c7662b6756aa57)
2012-09-05 18:01:06 -04:00
Keegan McAllister
0788f2efe6
get_updates_longpoll: Retry indefinitely, with exponential backoff
...
The client still won't recognize when it's reconnected, if there is no traffic.
Probably we should have the server send periodic heartbeat messages to the
clients, and make the clients look for them.
(imported from commit 4dab3ddf20bf3c48a65b9395c1e24b635b70aa81)
2012-09-05 16:37:20 -04:00
Keegan McAllister
c3aaf54468
get_updates_longpoll: Timeout and retry
...
We're currently proxying through Apache, which will eventually drop an idle
connection to the app server. Before that happens, drop it on the client and
retry. This may also help with flaky Internet connections. This timeout isn't
really an error condition and is naturally rate-limited, so we retry
indefinitely.
(imported from commit 45fbf812af63ed331fe046d85c64c97c1ec57611)
2012-09-05 16:37:10 -04:00
Keegan McAllister
53690d757f
Avoid infinite tail recursion in get_updates_longpoll
...
Javascript doesn't guarantee tail-call optimization. Also we should yield
control back to the browser in case it needs to catch up on rendering.
(imported from commit 1c35c0c2c39f13311b98bfb6221a1bac1fb22de8)
2012-09-05 14:06:19 -04:00
Keegan McAllister
1f522eddac
Move zephyr rendering inside longpoll success callback
...
(imported from commit f7c2bbb0a31b339892a033e4192e44cb53b0d62c)
2012-09-05 14:06:08 -04:00
Keegan McAllister
162cb075b7
DEBUG: report longpoll events in JS console
...
(imported from commit f82edf2fcec66ec119319a691281726a16a46b31)
2012-09-05 14:00:56 -04:00
Tim Abbott
8eb778dc32
Fix display of which people we're showing personals with.
...
(imported from commit 4e2f2554c9af4b176dcbbe6300b72c2ce69bc8bd)
2012-09-05 11:48:35 -04:00
Keegan McAllister
5ac4b4345e
Point at the first zephyr if the initial pointer is invalid
...
(imported from commit 7661a7d23f1d161815f2a22048cd23ede76e1758)
2012-09-05 11:24:29 -04:00
Keegan McAllister
7cb3c05b40
Cleanup / local var in hotkeys
...
(imported from commit 8df3d84495d0d50b0987037dceb8b16023866119)
2012-09-05 11:24:28 -04:00
Keegan McAllister
49704b84f3
Clean up select_zephyr
...
Eliminate some global variables, and other style fixes.
(imported from commit 95dfbaa024d709f5b98238afcf904f3e92c8a260)
2012-09-05 11:24:28 -04:00
Tim Abbott
08b55de0af
Add support for replying to huddle messages.
...
(imported from commit 21c760838fa87bf524ff178eab6473dfa3c6921c)
2012-09-05 11:19:31 -04:00
Tim Abbott
d13e7d5c2a
Clean up prepare_personal function.
...
(imported from commit 497ff1ff2162eba879728755cf37e6317530a641)
2012-09-05 11:19:31 -04:00
Tim Abbott
6e427d4aa1
Remove trailing whitespace in zephyr.js.
...
(imported from commit d003d9c337239e90f6dbda16f6624c42909a88b7)
2012-09-05 11:19:31 -04:00
Jessica McKellar
2694183a9d
Make clicking on a personals user narrow to the conversation with that user.
...
Previously, clicking would narrow to all personals. The gp hotkey
combo still does that -- we'll need to think about the UI for making
both types of narrowing easy.
(imported from commit acce1da52de1b9b757ef76a9734d61f399f81a01)
2012-09-05 11:03:53 -04:00
Luke Faraone
3db1766015
Fix broken narrowing on classes with keyboard shortcuts.
...
(imported from commit e829c55e88a57c4dbe4693c41f15eaf27a025daa)
2012-09-05 10:56:59 -04:00
Tim Abbott
2ff6a39976
Some huddle cleanups.
...
(imported from commit 244bfde4da2a4faeb150182f232937f0cb3a9a85)
2012-09-04 19:41:42 -04:00
Tim Abbott
4d284d8a92
[schema] Add support for multi-user personals ("huddles").
...
This is controlled by listing multiple comma-separate usernames in the
personal message sending box.
(imported from commit 06c9dadb7977b98f88ad31e5df453b59f1afad96)
2012-09-04 19:15:07 -04:00
Tim Abbott
84ece4b3fe
Combine the zephyr() and personal_zephyr() functions.
...
(imported from commit a39b70f019901d0dd6994d4c440002111e4c29e1)
2012-09-04 19:14:46 -04:00
Luke Faraone
974b560659
Add autocomplete for personals, classes, and instances.
...
Here we pull in the jqueryui library and a style sheet to provide a widget
to do autocomplete for various fields. We populate a list of all ever-seen
classes, instances, and people (C/I/P) into JS arrays and then pass them to
jqueryui.
Each time a new C/I/P appears, we reinitialise the autocomplete functions
so they will notice the new data.
(imported from commit f1ab69c99d21f68ccf40c015bd43960f463c6ff2)
2012-09-04 16:14:48 -04:00
Keegan McAllister
ac2553cdff
Replace get_state with a variable embedded into index.html
...
(imported from commit 3ef4a0163107248618a25e242ab30fdff5da17e0)
2012-09-04 13:01:00 -04:00
Keegan McAllister
e86216dff0
Add missing semicolons
...
(imported from commit f562f6e63368d5cb48ccba3b72981ff36a9cff30)
2012-09-04 13:01:00 -04:00
Keegan McAllister
9b5e47cd45
Don't select a zephyr until we've loaded them.
...
(imported from commit 04f72ae1e2ca67dfc1220baee11940008e0d2c91)
2012-09-04 13:01:00 -04:00
Keegan McAllister
2e8b1fa14a
Use client-side templating to render zephyrs
...
(imported from commit 5ac650c3df0fa8caa823407d9d1a65a38f7e63c6)
2012-09-04 13:01:00 -04:00
Keegan McAllister
85215733d8
Import ICanHaz.js (yes, really)
...
(imported from commit b864603cfac2b3626e01d8ba7c89d030f7c0fa43)
2012-09-04 12:27:17 -04:00
Tim Abbott
d85e80483f
Eliminate the dummy row.
...
(imported from commit 4f0cd12e77cbe4d6a29baed9902c7c7074fcff27)
2012-09-04 11:49:13 -04:00
Tim Abbott
87188e2575
Filter newly arriving messages by the current view.
...
(imported from commit db23824bfc584d3b1bc0d6239d04988ca1b3ca4a)
2012-09-04 11:49:13 -04:00
Tim Abbott
633aceb054
Keep track of the current narrowing rules.
...
(imported from commit 0af6fc38f0f17a57428f64570139171dbede30fe)
2012-09-04 11:49:13 -04:00
Jessica McKellar
f556702804
Add a missing semicolon.
...
(imported from commit c0676f077ee8655abd33a382cd01b0330eff4e82)
2012-09-04 11:38:10 -04:00
Jessica McKellar
e51ab0cdfa
Get pointer state from the server on page load, and scroll to that zephyr.
...
(imported from commit a1387d89378494a55f084f56ed9eb33c4f719dcb)
2012-09-04 11:36:36 -04:00
Tim Abbott
b784202128
Unify the various narrowing interfaces.
...
(imported from commit e2ddd5ae3ecaa385f1adf80b75a64534dd5b3950)
2012-08-31 17:58:20 -04:00
Tim Abbott
8506656df1
Fix bug in scroll_to_zephyr removal.
...
(imported from commit 4aca6534889012fd1b0e59dc88a156494b6ec51f)
2012-08-31 17:58:17 -04:00
Tim Abbott
6369da671b
Clean up narrowing code to all use the same pattern.
...
(imported from commit 7f213ccdb31522a0fcb63cb69e2ea7677e3b352c)
2012-08-31 17:16:39 -04:00
Tim Abbott
e4e3fde8a5
Rename narrow to narrow_class.
...
(imported from commit 8bd0f91ac7496d2da4706128b7d2c32acfad081c)
2012-08-31 17:16:09 -04:00
Keegan McAllister
115edb57b2
Eliminate tab characters from source code
...
(imported from commit 60c0742b8998ee08189b576b38cd0b4416f22b66)
2012-08-31 16:51:46 -04:00
Luke Faraone
cd5b623cfd
Reply to the recipient instead of the sender if replying to my own personal
...
Previously, if hamlet wrote to iago, and then hit "r" on his own message,
the form would prompt hamlet to reply to himself. Now, Humbug will DTRT and
prefill the form with iago instead.
(imported from commit cb3260d1d0bc89b184dac84ebf1e5642d0bc1606)
2012-08-31 16:50:24 -04:00
Luke Faraone
29a41d992e
Blur buttons on submitting a zephyrgram.
...
This way the user can continue using the keyboard to navigate
after sending a message, without pressing additional keys.
(imported from commit 014997194f546fe56da063e19d3818e949a3ee7e)
2012-08-31 16:29:00 -04:00
Luke Faraone
3223d2e0ba
Make scrolling Correct (a la Barnowl) without losing messages
...
Previously the wedge sometimes got lost when you scroll. Now, on a
scrolling action the selected message is moved in to the middle.
We also now use scroll_to_selected as opposed to scroll_to_zephyr because
there wasn't really a usecase for scrolling to a non-selected zephyr.
(imported from commit 5091b3a715f2253dfe302d4c7ea8a087ff9d508e)
2012-08-31 16:20:20 -04:00
Keegan McAllister
2d30c9440d
Retry if long polling fails
...
(imported from commit fc2d09976231974bf48efbcf5dfc480be36e26ec)
2012-08-31 15:33:04 -04:00
Keegan McAllister
d07a1b914c
Code style consistency
...
(imported from commit a5345b0fda9701c62b65c367f71ac871a7e15d60)
2012-08-31 15:04:15 -04:00
Keegan McAllister
57bdc40b87
Fix superfluous use of .html
...
(imported from commit 4f165669c1d09efa811169c26e1e7541fbfb45f6)
2012-08-31 14:55:28 -04:00
Luke Faraone
8342c2c2ee
Ensure that the ▶ stays after clicking on a selected message.
...
(imported from commit 2af024f0090383f429bd5727fe3ceb8b32cd2021)
2012-08-31 14:43:49 -04:00
Luke Faraone
6a7b183e06
Clicking on a Zephyr now sets the pointer to that Zephyr.
...
(imported from commit 2707f22997892c1414965c988a80609ef8d93388)
2012-08-31 11:10:19 -04:00
Luke Faraone
266f6397a2
Correctly handle 'r' for personals.
...
(imported from commit 7f60fbc6aa737d32d710b2ec2c5c9d6fe9b047e4)
2012-08-30 17:45:06 -04:00
Luke Faraone
148738447c
Select the value of "content" when replying to a zephyr.
...
(imported from commit ef8759911b602a67b594f085772d33251ad94dde)
2012-08-30 17:45:06 -04:00
Luke Faraone
833cf8b1ff
Implement hotkeys for filters, let ESC break out of input boxes.
...
Here we added code to enable users to use shortcuts like "g-c" or "g-a" to
go between zoomed-to-class and showing-all and related forms.
Documented on the wiki in (Hotkeys).
(imported from commit ee3bdf070a560d503c6537ccb1d213707bc11f66)
2012-08-30 17:45:06 -04:00
Luke Faraone
e9ee6e365a
Only allow hotkeys when not focused on input/textarea/button elements.
...
Here we bind to the focus and blur events to keep track of when elements
we care about are in focus. Elsewhere, we test whether hotkeys are allowed
before... using hotkeys.
(imported from commit 50f8f8cb4874209411db59512f77c8dd33d837f5)
2012-08-30 17:45:05 -04:00
Keegan McAllister
41adbfc92d
Allow the user to dismiss send errors
...
(imported from commit bcce5f0a1cdc0d5eec2586e72f8a5945574697ad)
2012-08-30 16:41:09 -04:00
Keegan McAllister
2313498891
Build zephyrs using DOM manipulation rather than string munging
...
(imported from commit 521fafe3a393ffffa215cee42519edeee8d48b3f)
2012-08-30 16:41:09 -04:00
Keegan McAllister
d57d19e562
Move all zephyr HTML generation to the client
...
(imported from commit 3afec768a5cd220c14ce615e03c29ee22754fdf2)
2012-08-30 16:41:09 -04:00
Keegan McAllister
ddacce81b7
More responsive UI for sending messages
...
(imported from commit 8a6c4e78788f46dde4fe166e17828eb9e7bdcaff)
2012-08-30 16:19:44 -04:00
Keegan McAllister
a1a7291fe5
Send zephyrs via Ajax
...
(imported from commit cdfd69079212d36a9e4e9d2d01dc7b6a93b6a4e0)
2012-08-30 16:19:44 -04:00
Keegan McAllister
109edcfa21
Import jQuery Form Plugin
...
(imported from commit 2631b3eaa0d1569cb6eb421ce8ba0e4a2d3ac741)
2012-08-30 16:19:44 -04:00
Tim Abbott
9afd63692f
Implement long polling using Tornado.
...
(imported from commit 4385304b27d7fe55a57a23133cd214fe8fc33482)
2012-08-30 14:29:34 -04:00
Keegan McAllister
9714cf920e
Focus first text field on tab switch
...
(imported from commit 10b03b741f689d6dc80c968c7e057d72a88fb12e)
2012-08-29 17:25:04 -04:00
Keegan McAllister
556837d3a6
Indicate clickability on labels
...
(imported from commit cc3c48879d50c0808d465492c20a887bef408a91)
2012-08-29 17:25:04 -04:00
Jessica McKellar
a47adef065
Add missing recipient textarea to check for focus.
...
(imported from commit e7af941dbc0e76d54f573b3b6dd92ae3331394d8)
2012-08-29 17:23:28 -04:00
Jessica McKellar
d85c0d6ad8
Suppress displaying the 'r' in the content box on r-to-start-composing-zephyr.
...
(imported from commit 1216b3739737a9dbf203fe105b16c6672bccd272)
2012-08-29 17:09:33 -04:00
Jessica McKellar
ebb08446e2
When you hit 'r', only try to start a zephyr if you weren't in the middle of one.
...
(imported from commit 36779bf955e28c3a10713829e93cd207fbbb36f3)
2012-08-29 17:08:16 -04:00
Jessica McKellar
a8fa6b156a
Turn newlines into linebreaks.
...
(imported from commit 67999641a8cff471be1430e421f259b1c558444d)
2012-08-29 16:47:53 -04:00
Keegan McAllister
13ee85f886
Enforce minimum height for main_div
...
(imported from commit 291e5e0fc8680db63dec55b7339c4fe72d6acb76)
2012-08-29 16:32:12 -04:00
Keegan McAllister
a0e59fbbc9
Narrow on all personals together
...
(imported from commit 2dc2646344767acbda7f1d8d6f847f8a69d597cf)
2012-08-29 16:23:56 -04:00
Keegan McAllister
452b218ab6
Hide personals when narrowing on class or instance
...
(imported from commit 1bd5a8ea05fcb6e3d8c7b68821faa9664cf5586b)
2012-08-29 16:02:26 -04:00
Keegan McAllister
03a087a654
Rework display of personals
...
Code cleanup, and add an arrow to indicate sender and recipient
(imported from commit 24881ee1e5f3bc9209f9ec485195dcd7178d86fb)
2012-08-29 15:53:38 -04:00
Keegan McAllister
6e88482977
Remove debugging code
...
(imported from commit 6e128f9f97fd433464bf14fc728d577e7e4fa0e4)
2012-08-29 15:40:30 -04:00
Keegan McAllister
6832fa9489
Use 'BLACK RIGHT-POINTING TRIANGLE' for the 'selected' indicator
...
(imported from commit 713b24521f080e7772991d2d9808324ef6219ac5)
2012-08-29 15:40:10 -04:00
Keegan McAllister
738ed46941
Factor out the HTML for #selected
...
(imported from commit 2de461dca6ee22bcb701e0c5c2ec49bbcad496e4)
2012-08-29 15:40:09 -04:00
Keegan McAllister
a2777eaed4
Resize main_div to exactly take up remaining vertical space
...
Unfortunately, it's not so easy to do this with CSS only.
(imported from commit 93b58a53e20aae9ee651aa66b3163f68549a3982)
2012-08-29 15:40:09 -04:00
Keegan McAllister
a1d852d124
Jump to personals tab on prepare_personal
...
(imported from commit 5f3fbc7a84a0af6742ceb1f1ab8806234870445f)
2012-08-29 15:40:09 -04:00
Keegan McAllister
395001d8db
Indicate narrowing
...
(imported from commit 19682fc07393f0848481abf72339eefd56b30ab2)
2012-08-29 15:40:09 -04:00
Keegan McAllister
1b587fc2c6
Style class / instance / username labels
...
(imported from commit 2e0c9d72aa17971bdc12750dad62a59c46f646f1)
2012-08-29 15:40:09 -04:00
Keegan McAllister
8948b21758
Restyle unhide button
...
(imported from commit c668f19a581fa111dabdba5b1304922c7387c5dd)
2012-08-29 15:16:28 -04:00
Keegan McAllister
3ef5334d9b
Focus username field on loading login/register pages
...
(imported from commit 004a98ffaa59aebab34057cbe34f5e1038e44b62)
2012-08-29 15:16:28 -04:00
Jessica McKellar
1f56ac9e60
Make the zephyr highlighting for new zephyrs consistent with those on page load.
...
(imported from commit 28dbdb564b4dff479af1f71551a393f8dd54d597)
2012-08-29 14:54:00 -04:00
Tim Abbott
cc01ad04bf
Move javascript into its own file.
...
(imported from commit b0e9a5e2700e85f31f8cd5922ab489000c96781c)
2012-08-29 12:04:57 -04:00
Keegan McAllister
5e59c79d1d
Tab between class and personal message
...
(imported from commit f7ce9eebc8fe75ad0fcfd0f60dde9ae117681134)
2012-08-28 19:09:48 -04:00
Keegan McAllister
473de4eb2a
New layout
...
(imported from commit d44db3acf1d4c6a7b42a54aff9720bb86d01a754)
2012-08-28 19:09:48 -04:00
Keegan McAllister
54622c9101
Create zephyr.css
...
(imported from commit 56c698496ba5cc59aeed4902dfee7bcfa248ffcf)
2012-08-28 18:36:55 -04:00
Keegan McAllister
1490ae1855
Add Bootstrap
...
(imported from commit a5936ac9752931c797bef8a13517f3ebc0a73063)
2012-08-28 18:36:55 -04:00