unread: Move bankruptcy code out of click_handlers.js.

This commit is contained in:
Tim Abbott 2017-03-22 20:46:31 -07:00
parent f3af0fe635
commit 977e7b0fdc
2 changed files with 12 additions and 14 deletions

View File

@ -430,12 +430,6 @@ $(function () {
});
// End Webathena code
// BANKRUPTCY
$(".bankruptcy_button").click(function () {
unread_ui.enable();
});
(function () {
var map = {
".stream-description-editable": subs.change_stream_description,
@ -522,14 +516,6 @@ $(function () {
});
}());
$('#yes-bankrupt').click(function () {
pointer.fast_forward_pointer();
$("#yes-bankrupt").hide();
$("#no-bankrupt").hide();
$(this).after($("<div>").addClass("alert alert-info settings_committed")
.text(i18n.t("Bringing you to your latest messages…")));
});
// MAIN CLICK HANDLER
$(document).on('click', function (e) {

View File

@ -94,6 +94,18 @@ function consider_bankruptcy() {
}
exports.initialize = function initialize() {
$(".bankruptcy_button").click(function () {
unread_ui.enable();
});
$('#yes-bankrupt').click(function () {
pointer.fast_forward_pointer();
$("#yes-bankrupt").hide();
$("#no-bankrupt").hide();
$(this).after($("<div>").addClass("alert alert-info settings_committed")
.text(i18n.t("Bringing you to your latest messages…")));
});
consider_bankruptcy();
};