Skip to content

Commit

Permalink
Merge branch 'release-30.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 17, 2024
2 parents 7336dcf + 7526782 commit 353ced2
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions views/js/qtiCreator/helper/changeTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ define([
exit: __('The item has unsaved changes, would you like to save it ?')
};

const DISABLE_FIGURE_WIDGET = context.featureFlags && context.featureFlags.FEATURE_FLAG_DISABLE_FIGURE_WIDGET;

/**
*
* @param {HTMLElement} container
Expand Down Expand Up @@ -120,8 +122,7 @@ define([
!$.contains(container, e.target) &&
!$(e.target).parents('#feedback-box').length &&
!$(e.target).parents('.outcome-container').length &&
(context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'] ||
!$(e.target).parents('.media-alignment').length) &&
(DISABLE_FIGURE_WIDGET || !$(e.target).parents('.media-alignment').length) &&
!$(e.target).hasClass('icon-close') &&
this.hasChanged()
) {
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/model/Figure.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define([
'taoQtiItem/qtiCreator/model/Figcaption'
], function (_, context, editable, Figure, Img, Figcaption) {
'use strict';
const DISABLE_FIGURE_WIDGET = context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'];
const DISABLE_FIGURE_WIDGET = context.featureFlags && context.featureFlags.FEATURE_FLAG_DISABLE_FIGURE_WIDGET;
const methods = {};
_.extend(methods, editable);
_.extend(methods, {
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/renderers/Img.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define([

const CreatorImg = _.clone(Renderer);

const DISABLE_FIGURE_WIDGET = context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'];
const DISABLE_FIGURE_WIDGET = context.featureFlags && context.featureFlags.FEATURE_FLAG_DISABLE_FIGURE_WIDGET;

CreatorImg.render = function (img, options) {
const $container = Renderer.getContainer(img);
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/widgets/static/figure/Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define([
'use strict';

const FigureWidget = Widget.clone();
const DISABLE_FIGURE_WIDGET = context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'];
const DISABLE_FIGURE_WIDGET = context.featureFlags && context.featureFlags.FEATURE_FLAG_DISABLE_FIGURE_WIDGET;

FigureWidget.initCreator = function initCreator(options) {
const figure = this.element;
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/widgets/static/text/states/Sleep.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define([
'taoQtiItem/qtiCreator/widgets/static/states/Sleep',
'taoQtiItem/qtiCreator/editor/gridEditor/content'
], function (context, stateFactory, SleepState, contentHelper) {
const DISABLE_FIGURE_WIDGET = context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'];
const DISABLE_FIGURE_WIDGET = context.featureFlags && context.featureFlags.FEATURE_FLAG_DISABLE_FIGURE_WIDGET;

const TextBlockStateSleep = stateFactory.extend(
SleepState,
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiXmlRenderer/renderers/Figure.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define(['context', 'tpl!taoQtiItem/qtiXmlRenderer/tpl/figure', 'tpl!taoQtiItem/q
figureTpl,
elementTpl
) {
const DISABLE_FIGURE_WIDGET = context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'];
const DISABLE_FIGURE_WIDGET = context.featureFlags && context.featureFlags.FEATURE_FLAG_DISABLE_FIGURE_WIDGET;

return {
qtiClass: 'figure',
Expand Down

0 comments on commit 353ced2

Please sign in to comment.