Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update methods to lodash 4 verios #496

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"oat-sa/oatbox-extension-installer": "~1.1||dev-master",
"oat-sa/lib-generis-search": "^2.1.2",
"oat-sa/generis": ">=15.24",
"oat-sa/tao-core": ">=53.12",
"oat-sa/tao-core": ">=54.0.0",
"oat-sa/extension-tao-item": ">=v12.1.0",
"oat-sa/extension-tao-itemqti": ">=29.14.5",
"oat-sa/extension-tao-test": ">=15.16",
Expand Down
6 changes: 3 additions & 3 deletions views/js/qtiCreator/editor/ckEditor/htmlEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ define([
options = options || {};

//re-init all widgets:
_.each(_.values(container.elements), function (elt) {
_.forEach(_.values(container.elements), function (elt) {
const widget = elt.data('widget'),
currentState = widget.getCurrentState().name;

Expand Down Expand Up @@ -387,7 +387,7 @@ define([
const deleted = [];
const container = $container.data('qti-container');

_.each(widgets, function (w) {
_.forEach(widgets, function (w) {
if (!w.element.data('removed')) {
const $widget = _findWidgetContainer($container, w.serial);
if (!$widget.length) {
Expand All @@ -402,7 +402,7 @@ define([

$messageBox
.on('confirm.deleting', function () {
_.each(deleted, function (w) {
_.forEach(deleted, function (w) {
w.element.remove();
w.destroy();
});
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/editor/containerEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ define([
container.setRootElement(item);

if (options.metadata) {
_.each(options.metadata, function (value, name) {
_.forEach(options.metadata, function (value, name) {
item.data(name, value);
});
}
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/editor/styleEditor/fontSizeChanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ define(['jquery', 'lodash', 'taoMediaManager/qtiCreator/editor/styleEditor/style
if (c === 13) {
$input.trigger('blur');
}
return _.contains([8, 37, 39, 46], c) || (c >= 48 && c <= 57) || (c >= 96 && c <= 105);
return _.includes([8, 37, 39, 46], c) || (c >= 48 && c <= 57) || (c >= 96 && c <= 105);
});

/**
Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/widgets/helpers/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define([

creatorRenderer.get().load(function(){

_.each(newElts, function(serial) {
_.forEach(newElts, function(serial) {
let $placeholder,
$widget,
widget;
Expand Down
4 changes: 2 additions & 2 deletions views/js/qtiCreator/widgets/item/Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ define([
const _detachElements = function(container, elements) {

const containerElements = {};
_.each(elements, function(elementSerial){
_.forEach(elements, function(elementSerial){
containerElements[elementSerial] = container.elements[elementSerial];
delete container.elements[elementSerial];
});
Expand Down Expand Up @@ -317,7 +317,7 @@ define([

} else {

_.each(newElts, function(container){
_.forEach(newElts, function(container){

const containerData = subContainers.shift();//get data in order
const containerElements = _detachElements(itemBody, containerData.elements);
Expand Down
Loading