Skip to content

Commit

Permalink
Merge branch 'release-30.20.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 20, 2024
2 parents 4cae14b + 57f43bc commit f5c7604
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 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.

20 changes: 18 additions & 2 deletions views/js/qtiCreator/editor/styleEditor/styleSheetToggler.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,34 @@ define([
uploadUrl: itemConfig.fileUploadUrl,
deleteUrl: itemConfig.fileDeleteUrl,
downloadUrl: itemConfig.fileDownloadUrl,
fileExistsUrl : itemConfig.fileExistsUrl,
fileExistsUrl: itemConfig.fileExistsUrl,
params: {
uri: itemConfig.uri,
lang: itemConfig.lang,
filters: 'text/css'
},
pathParam: 'path',
select: function (e, files) {
select(e, files) {
var i, l = files.length;
for (i = 0; i < l; i++) {
styleEditor.addStylesheet(files[i].file);
}
},
close() {
$('#mediaManager').off('filedelete.resourcemgr');
}
});

// watch for file deletion inside the media manager that are related to a linked stylesheet
$('#mediaManager').on('filedelete.resourcemgr', (e, file) => {
const filePath = [file]
if (file.startsWith('/')) {
filePath.push(file.substring(1));
}

const $style = cssToggler.find(filePath.map(path => `[data-css-res="${path}"]`).join(', '));
if ($style.length) {
deleteStylesheet($style);
}
});
});
Expand Down
1 change: 1 addition & 0 deletions views/js/qtiCreator/helper/changeTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ define([
// every click outside the authoring (except feedback message)
$(wrapperSelector).on(`click${eventNS}`, e => {
if (
e.target.isConnected && // check if the target is still in the DOM, if not there is no need to check further since parent will be null
!$.contains(container, e.target) &&
!$(e.target).parents('#feedback-box').length &&
!$(e.target).parents('.outcome-container').length &&
Expand Down

0 comments on commit f5c7604

Please sign in to comment.