Skip to content

Commit

Permalink
refactor: after review
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed May 7, 2024
1 parent 912a036 commit 2a1aa34
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cms/djangoapps/contentstore/views/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ def xblock_view_handler(request, usage_key_string, view_name):
@login_required
def xblock_actions_view(request, usage_key_string, action_name):
"""
The handler for rendered edit xblock view.
Return rendered xblock action view.
The action name should be provided as an argument.
Valid options for action names are edit and move.
"""
usage_key = usage_key_with_run(usage_key_string)
if not has_studio_read_access(request.user, usage_key.course_key):
Expand Down
2 changes: 1 addition & 1 deletion cms/static/js/views/modals/base_modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/baseview'],
event.stopPropagation(); // Make sure parent modals don't see the click
}
window.parent.postMessage({
method: 'close_edit_modal',
method: 'close_modal',
msg: 'Sends a message when the modal window is closed'
}, '*');
this.hide();
Expand Down
4 changes: 2 additions & 2 deletions cms/static/js/views/modals/edit_xblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ function($, _, Backbone, gettext, BaseModal, ViewUtils, XBlockViewUtils, XBlockE
Backbone.trigger('xblock:editorModalHidden');

window.parent.postMessage({
method: 'close_edit_modal',
msg: 'Sends a message when the modal window is closed'
method: 'close_modal',
msg: 'Sends a message when the edit modal window is closed'
}, '*');

BaseModal.prototype.hide.call(this);
Expand Down
2 changes: 1 addition & 1 deletion cms/static/js/views/utils/move_xblock_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function($, _, Backbone, Feedback, AlertView, XBlockViewUtils, MoveXBlockUtils,
}
}, '*');
window.parent.postMessage({
method: 'close_edit_modal',
method: 'close_modal',
msg: 'Sends a message when the modal window is closed'
}, '*');

Expand Down

0 comments on commit 2a1aa34

Please sign in to comment.