From 39cdc926a5992bab75eef5366533cd8442e78ccb Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 21 Dec 2018 00:35:24 +0000 Subject: [PATCH] muting: Simplify dismiss() method. --- static/js/muting_ui.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/static/js/muting_ui.js b/static/js/muting_ui.js index 52dd7e26db..bc624bfca8 100644 --- a/static/js/muting_ui.js +++ b/static/js/muting_ui.js @@ -49,6 +49,10 @@ exports.build_feedback_widget = function () { } }, 100); + self.dismiss = function () { + animate.fadeOut(); + }; + self.show = function (opts) { if (!opts.populate) { blueslip.error('programmer needs to supply populate callback.'); @@ -95,13 +99,6 @@ exports.build_feedback_widget = function () { }); }; - self.dismiss = function () { - var $container = $("#feedback_container"); - if ($container) { - $container.fadeOut(500).removeClass("show"); - } - }; - return self; };