Rename subs.add -> subs.add_for_send

This has some logic specific to the "Create and send" / "Subscribe and send"
buttons.

(imported from commit 5f9e314ebde31ec1e6a183513816d1ade361e4cc)
This commit is contained in:
Keegan McAllister 2012-10-18 16:25:58 -04:00
parent 95f8eea14b
commit 2fe034d161
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ exports.fetch = function () {
});
};
exports.add = function (stream, prompt_button) {
exports.add_for_send = function (stream, prompt_button) {
$.ajax({
type: 'POST',
url: '/json/subscriptions/add',

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 () {
subs.add(compose.stream_name(), $('#stream-dne'));
subs.add_for_send(compose.stream_name(), $('#stream-dne'));
});
// Prepare the click handler for subbing to an existing stream.
$('#sub-it').click(function () {
subs.add(compose.stream_name(), $('#stream-nosub'));
subs.add_for_send(compose.stream_name(), $('#stream-nosub'));
});
var throttled_scrollhandler = $.throttle(50, function(e) {