Commit Graph

131 Commits

Author SHA1 Message Date
Tim Abbott 6642a65269 Convert last few json views to use the json_success api.
(imported from commit 7a617ec7e7c8607e8ba87e7a9b8599a83b91666c)
2012-10-16 16:54:41 -04:00
Tim Abbott a859c10017 Don't redirect to a login page when responding to json messages.
Also update tests to actually check all our URLs.

(imported from commit 86de2027d140da6118e2f2f60c1c86511b16c141)
2012-10-16 16:38:39 -04:00
Tim Abbott 3e994c16b7 Rename/reorganize our urls to be more consistent.
(imported from commit ca3cc7ccd5d7da83a9c60968527378ee1118648e)
2012-10-16 15:56:06 -04:00
Zev Benjamin 24c1a2d7f1 Make compose box accessor functions also be setters
(imported from commit ab568cc2c224b8558148f158d1c9c1f89bb1eb49)
2012-10-16 15:30:09 -04:00
Zev Benjamin adf75d48e1 Make pressing escape also un-narrow
(imported from commit 17d2cc3e8074af332f98588ad201ec342476d51f)
2012-10-11 14:30:51 -04:00
Tim Abbott ac3f4393ff Rename instance to subject.
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott 8dca315a18 Rename s/class/stream/ in code local to various js files.
(imported from commit c441f9d7d4155ff3c4b171a2a4a3db4ffbb60ac4)
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 413fdeb655 Rename class_name to stream_name.
(imported from commit e610f5de5edf756ef0a71c5361fcd507adbb1605)
2012-10-10 17:48:17 -04:00
Jessica McKellar c4dd4ea06f Clear compose error messages on New Message or message type tab toggle.
Also highlight a useful input box on tab toggle.

(imported from commit e046cd077039b42069e866267038b92536a05e1b)
2012-10-10 16:59:20 -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 a62cd32107 Rename zephyr_compose* to compose*.
(imported from commit 103351bbdb7657720d7b7b9f57ee88e5957d09a4)
2012-10-09 22:41:17 -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 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
Waseem Daher 86dfc93f96 Reintroduce composebox animation.
So what's now happening here is that the outer div (which we were
previously animating) doesn't get animated at all; instead it is
simply made visible or hidden.

I *believe* this means that it always continues to take the same
amount of space in the DOM; its being added and removed seemed to
cause a slight height-of-page change which caused the scrollHandler to
fire, causing the selected message indicator to move down the page.

So now that this height is fixed, we achieve the animation instead by
animating the inner div -- the one that actually contains the
composebox elements.

(imported from commit 95b2f95d52254e3792633460f42efaac27559efe)
2012-10-09 14:25:18 -04:00
Waseem Daher 8083a149b8 Fix selected-message glitch on composewindow by removing animation.
The issue with the animation is that it removes the composebox div
when it's done -- or more relevantly, it "adds" it when the composebox
appears, which causes some DOM elements to get reshuffled slightly
which causes some jitter.

(Similar to what was happening with the email addresses earlier.)

So instead of using display:none, we play with visibility:hidden,
which causes the thing not to show up, but doesn't cause it to
lose its place in the DOM.

(imported from commit a18dbdcd1784b2b54436d48d8425d5fdc8dfbba4)
2012-10-09 14:25:18 -04:00
Jessica McKellar ad213fc810 Fix focus on create/sub buttons if you try to send to a new/unsubscribed class.
This is a regression introduced by switching from links to buttons,
which get blurred by hide_compose.

(imported from commit f5aa67cb949f3edc7f86a0ef0d7f48b43860138b)
2012-10-09 14:06:56 -04:00
Tim Abbott d510a62976 Rename huddle recipient field to #huddle_recipient.
(imported from commit 8670f06679aa1554003aa2832dec3ed6d00ad1c3)
2012-10-09 10:27:40 -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
Keegan McAllister c944c08e79 Drop JSLint directives
(imported from commit 5a091b4cb23bae5c307ad19cb772b878d605fbfe)
2012-10-04 11:04:25 -04:00
Keegan McAllister 2f749afc8d Tweak JSLint options
(imported from commit 7e7582a48228b879ea29c2a27eb22e46e093f9dc)
2012-10-03 18:26:00 -04:00
Keegan McAllister 1cbceeec87 Fix more problems uncovered by lint
(imported from commit 7fb8432f362f22770334e6bd1161a61b0bc0e528)
2012-10-03 18:26:00 -04:00
Keegan McAllister d4217b4383 Add jslint options to each file
(imported from commit f49cdbfd655d8d8fdff792f525c7abc58951dacb)
2012-10-03 18:26:00 -04:00
Keegan McAllister 8e47b33645 Move still more validation
(imported from commit a98d145168abc743888fb4a88dc00c925f138b00)
2012-10-03 18:26:00 -04:00
Keegan McAllister 2508e87d03 Fix an undefined variable
(imported from commit ed2432b4414617e97d61c84c9636e771e9c05b81)
2012-10-03 18:26:00 -04:00
Keegan McAllister d619618fed Move more validation
(imported from commit 62d660a3c34f4aeb170771ee85580362a2c1b8a7)
2012-10-03 18:26:00 -04:00
Keegan McAllister 0c76788ed5 Move some validation functions
(imported from commit e482108981b2b4caa6159060729766b4d224db23)
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