From a2558bfc9ed5abe113a1c54cea49d1ca13b6d7b0 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 11 Feb 2022 14:03:46 +0100 Subject: [PATCH] removed dependency by moving click handler part of #2462 --- frontend/src/js/popups/quote-report-popup.js | 8 ++++++++ frontend/src/js/test/test-ui.js | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/js/popups/quote-report-popup.js b/frontend/src/js/popups/quote-report-popup.js index a002004b0..e1b393268 100644 --- a/frontend/src/js/popups/quote-report-popup.js +++ b/frontend/src/js/popups/quote-report-popup.js @@ -3,6 +3,7 @@ import * as Notifications from "../elements/notifications"; import axiosInstance from "../axios-instance"; import Config from "../config"; import * as Loader from "../elements/loader"; +import * as TestWords from "./../test/test-words"; const CAPTCHA_ID = 1; @@ -138,3 +139,10 @@ $("#quoteReportPopup .comment").on("input", (e) => { $("#quoteReportPopup .submit").on("click", async (e) => { await submitReport(); }); + +$(".pageTest #reportQuoteButton").click(async (event) => { + show({ + quoteId: parseInt(TestWords.randomQuote.id), + noAnim: false, + }); +}); diff --git a/frontend/src/js/test/test-ui.js b/frontend/src/js/test/test-ui.js index f2381daa8..1087b35b7 100644 --- a/frontend/src/js/test/test-ui.js +++ b/frontend/src/js/test/test-ui.js @@ -11,7 +11,6 @@ import * as Replay from "./replay"; import * as Misc from "../misc"; import * as PageController from "./../controllers/page-controller"; import * as SlowTimer from "../states/slow-timer"; -import * as ReportQuotePopup from "../popups/quote-report-popup"; $(document).ready(() => { UpdateConfig.subscribeToEvent((eventKey, eventValue) => { @@ -806,13 +805,6 @@ $(".pageTest #copyWordsListButton").click(async (event) => { } }); -$(".pageTest #reportQuoteButton").click(async (event) => { - ReportQuotePopup.show({ - quoteId: parseInt(TestWords.randomQuote.id), - noAnim: false, - }); -}); - $(".pageTest #toggleBurstHeatmap").click(async (event) => { UpdateConfig.setBurstHeatmap(!Config.burstHeatmap); });