mirror of https://github.com/zulip/zulip.git
Only register the callback for subbing to a class once.
(imported from commit a6c41f79ea8c6e2f6a6ff5a6b41b98fd53ad4e82)
This commit is contained in:
parent
d7f453dfb3
commit
ccfc9f5889
|
@ -19,6 +19,13 @@ $(function () {
|
||||||
$("#class-message form").ajaxSubmit();
|
$("#class-message form").ajaxSubmit();
|
||||||
$('#class-dne').stop(true).fadeOut(500);
|
$('#class-dne').stop(true).fadeOut(500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Prepare the click handler for subbing to an existing class.
|
||||||
|
$('#sub-it').click(function () {
|
||||||
|
sub(compose_class_name());
|
||||||
|
$("#class-message form").ajaxSubmit();
|
||||||
|
$('#class-nosub').stop(true).fadeOut(500);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ajaxSetup({
|
$.ajaxSetup({
|
||||||
|
@ -123,11 +130,7 @@ $(function () {
|
||||||
send_status.toggle();
|
send_status.toggle();
|
||||||
$('#class-nosub-name').text(zephyr_class);
|
$('#class-nosub-name').text(zephyr_class);
|
||||||
$('#class-nosub').show();
|
$('#class-nosub').show();
|
||||||
$('#sub-it').focus().click(function () {
|
$('#sub-it').focus();
|
||||||
sub(compose_class_name());
|
|
||||||
$("#class-message form").ajaxSubmit();
|
|
||||||
$('#class-nosub').stop(true).fadeOut(500);
|
|
||||||
});
|
|
||||||
buttons.removeAttr('disabled');
|
buttons.removeAttr('disabled');
|
||||||
hide_compose();
|
hide_compose();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue