Skip to content

Commit

Permalink
refactor: some refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Dec 9, 2024
1 parent 0ce3b02 commit d66b63a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions cms/static/js/views/pages/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ function($, _, Backbone, gettext, BasePage,
return window.parent.postMessage(
{
type: 'manageXBlockAccess',
message: 'Open the manage access modal',
payload: {}
}, document.referrer
);
Expand Down Expand Up @@ -634,6 +635,7 @@ function($, _, Backbone, gettext, BasePage,
window.parent.postMessage(
{
type: 'currentXBlockId',
message: 'Send the current XBlock ID to the parent window',
payload: {
id: this.findXBlockElement(event.target).data('locator')
}
Expand Down Expand Up @@ -688,6 +690,7 @@ function($, _, Backbone, gettext, BasePage,
return window.parent.postMessage(
{
type: 'copyXBlock',
message: 'Copy the XBlock',
payload: {}
}, document.referrer
);
Expand Down Expand Up @@ -745,6 +748,7 @@ function($, _, Backbone, gettext, BasePage,
return window.parent.postMessage(
{
type: 'duplicateXBlock',
message: 'Duplicate the XBlock',
payload: {}
}, document.referrer
);
Expand Down Expand Up @@ -802,6 +806,7 @@ function($, _, Backbone, gettext, BasePage,
return window.parent.postMessage(
{
type: 'deleteXBlock',
message: 'Delete the XBlock',
payload: {}
}, document.referrer
);
Expand Down Expand Up @@ -964,13 +969,13 @@ function($, _, Backbone, gettext, BasePage,
){
var destinationUrl;
var pathToXBlockEditor;
if (useVideoGalleryFlow === "True" && blockType.includes("video")) {
if (useVideoGalleryFlow === 'True' && blockType.includes('video')) {
pathToXBlockEditor = `/course-videos/${encodeURI(data.locator)}`;
destinationUrl = `${this.$('.xblock-header-primary').attr("authoring_MFE_base_url")}${pathToXBlockEditor}`;
destinationUrl = `${this.$('.xblock-header-primary').attr('authoring_MFE_base_url')}${pathToXBlockEditor}`;
}
else {
pathToXBlockEditor = `/${blockType[1]}/${encodeURI(data.locator)}`;
destinationUrl = `${this.$('.xblock-header-primary').attr("authoring_MFE_base_url")}${pathToXBlockEditor}`;
destinationUrl = `${this.$('.xblock-header-primary').attr('authoring_MFE_base_url')}${pathToXBlockEditor}`;
}

try {
Expand Down
2 changes: 1 addition & 1 deletion cms/static/sass/course-unit-mfe-iframe-bundle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -659,5 +659,5 @@ select {
}

.wrapper-xblock .xblock-header-primary .header-actions .wrapper-nav-sub {
z-index: 15;
z-index: $zindex-dropdown;
}
2 changes: 2 additions & 0 deletions cms/static/sass/partials/cms/theme/_variables-v1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,5 @@ $light-background-color: #e1dddb !default;
$border-color: #707070 !default;
$base-font-size: 18px !default;
$dark: #212529;

$zindex-dropdown: 100;

0 comments on commit d66b63a

Please sign in to comment.