From e8da22757e6349ee0308831c2eb711393ab67c4d Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Wed, 23 Oct 2024 11:54:28 +0530 Subject: [PATCH] feat: adds upstreamRef in mfe url for new editors to display alert --- cms/static/js/views/pages/container.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cms/static/js/views/pages/container.js b/cms/static/js/views/pages/container.js index c49c2439473e..54524e9ad57a 100644 --- a/cms/static/js/views/pages/container.js +++ b/cms/static/js/views/pages/container.js @@ -405,7 +405,13 @@ function($, _, Backbone, gettext, BasePage, || (useNewVideoEditor === 'True' && blockType === 'video') || (useNewProblemEditor === 'True' && blockType === 'problem') ) { - var destinationUrl = primaryHeader.attr('authoring_MFE_base_url') + '/' + blockType + '/' + encodeURI(primaryHeader.attr('data-usage-id')); + var destinationUrl = primaryHeader.attr('authoring_MFE_base_url') + + '/' + blockType + + '/' + encodeURI(primaryHeader.attr('data-usage-id')); + var upstreamRef = primaryHeader.attr('data-upstream-ref'); + if(upstreamRef) { + destinationUrl += '?upstreamLibRef=' + upstreamRef; + } window.location.href = destinationUrl; return; }