zulip/static/js/settings_muting.js

26 lines
581 B
JavaScript
Raw Normal View History

"use strict";
exports.loaded = false;
2017-04-06 16:56:52 +02:00
exports.set_up = function () {
exports.loaded = true;
$("body").on("click", ".settings-unmute-topic", function (e) {
const $row = $(this).closest("tr");
const stream_id = parseInt($row.attr("data-stream-id"), 10);
const topic = $row.attr("data-topic");
2017-04-06 16:56:52 +02:00
e.stopImmediatePropagation();
muting_ui.unmute(stream_id, topic);
$row.remove();
2017-04-06 16:56:52 +02:00
});
muting_ui.set_up_muted_topics_ui();
2017-04-06 16:56:52 +02:00
};
exports.reset = function () {
exports.loaded = false;
};
window.settings_muting = exports;