From a92af056ef5b3704ab64574a8cb60f887870fa37 Mon Sep 17 00:00:00 2001 From: Vidya Ramakrishnan Date: Thu, 24 Oct 2024 16:22:05 +0530 Subject: [PATCH] For membership widget, change the url hash to membership instead of tickets (#2129) --- funnel/assets/js/index.js | 2 +- funnel/assets/js/utils/ticket_widget.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/funnel/assets/js/index.js b/funnel/assets/js/index.js index 291a708d8..24abc1292 100644 --- a/funnel/assets/js/index.js +++ b/funnel/assets/js/index.js @@ -23,7 +23,7 @@ $(() => { initEmbed(markdownContainer); if (tickets) { - Ticketing.init(tickets); + Ticketing.init(tickets, true); } }; }); diff --git a/funnel/assets/js/utils/ticket_widget.js b/funnel/assets/js/utils/ticket_widget.js index 1445f2311..54cc40e43 100644 --- a/funnel/assets/js/utils/ticket_widget.js +++ b/funnel/assets/js/utils/ticket_widget.js @@ -2,12 +2,12 @@ import { AJAX_TIMEOUT, RETRY_INTERVAL } from '../constants'; import Analytics from './analytics'; const Ticketing = { - init(tickets) { + init(tickets, membership = false) { if (tickets.boxofficeUrl) { this.initBoxfficeWidget(tickets); } - this.initTicketModal(); + this.initTicketModal(membership); }, initBoxfficeWidget({ @@ -114,8 +114,9 @@ const Ticketing = { ); }, - initTicketModal() { + initTicketModal(membership) { this.urlHash = '#tickets'; + if (membership) this.urlHash = '#membership'; if (window.location.hash.indexOf(this.urlHash) > -1) { this.openTicketModal(); }