Skip to content

Commit

Permalink
fix: Save and cancel button of ora2 block editor
Browse files Browse the repository at this point in the history
- It was this error 'Uncaught TypeError: el.timepicker is not a function' while rendering the editor.
    It's fixed adding the timepicker pluging in `xblock_v2/xblock_iframe.html`
- Added '.openassessment_cancel_button' and '.openassessment_save_button' as action buttons.
  • Loading branch information
ChrisChV committed Feb 4, 2025
1 parent 237e16f commit 3f7cd84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/templates/xblock_v2/xblock_iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
{% endif %}
<!-- Most XBlocks require jQuery: -->
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<!-- ORA2 blocks require timepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timepicker/1.13.18/jquery.timepicker.min.js"></script>
<!-- The Video XBlock requires "ajaxWithPrefix" -->
<script type="text/javascript">
$.postWithPrefix = $.post;
Expand Down Expand Up @@ -282,6 +284,8 @@
'.save-button',
'.action-cancel',
'.action-save',
'.openassessment_cancel_button',
'.openassessment_save_button',
];

for (const selector of selectors) {
Expand Down

0 comments on commit 3f7cd84

Please sign in to comment.