Module pattern for compose.js

(imported from commit 8ea9d949b793285e8722bebcef30991d06e5673e)
This commit is contained in:
Keegan McAllister
2012-10-18 14:29:16 -04:00
parent c4bf81a312
commit e7661f7b2f
8 changed files with 85 additions and 81 deletions

View File

@@ -255,12 +255,12 @@ $(function () {
// Prepare the click handler for subbing to a new stream to which
// you have composed a message.
$('#create-it').click(function () {
sub_from_home(compose_stream_name(), $('#stream-dne'));
sub_from_home(compose.stream_name(), $('#stream-dne'));
});
// Prepare the click handler for subbing to an existing stream.
$('#sub-it').click(function () {
sub_from_home(compose_stream_name(), $('#stream-nosub'));
sub_from_home(compose.stream_name(), $('#stream-nosub'));
});
var throttled_scrollhandler = $.throttle(50, function(e) {
@@ -316,7 +316,7 @@ $(function () {
});
$('.button-slide').click(function () {
show_compose('stream', $("#stream"));
compose.show('stream', $("#stream"));
});
$('#sidebar a[href="#subscriptions"]').click(fetch_subs);