refactor: Extract stream_popover_sub().

Part of this change moved a click handler from subs.js to
popover.js.
This commit is contained in:
Steve Howell
2017-03-04 19:46:37 -08:00
committed by Tim Abbott
parent 6630b84dc0
commit ba49962f9a
2 changed files with 34 additions and 23 deletions

View File

@@ -1292,17 +1292,6 @@ $(function () {
e.stopPropagation();
});
$("body").on("click", ".popover_sub_unsub_button", function (e) {
$(this).toggleClass("unsub");
$(this).closest(".popover").fadeOut(500).delay(500).remove();
var stream_name = $(e.target).data("name");
var sub = stream_data.get_sub(stream_name);
exports.sub_or_unsub(sub);
e.preventDefault();
e.stopPropagation();
});
$("#zfilt").on("click", ".stream_sub_unsub_button", function (e) {
e.preventDefault();
e.stopPropagation();