Skip to content

Commit

Permalink
Merge branch 'master' into release/2.4.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Resources/public/js/generalDriver.js
#	src/Resources/public/js/generalDriver.js.map
#	src/Resources/public/js/generalDriver_src.js
  • Loading branch information
zonky2 committed Jan 6, 2025
2 parents 6292902 + 00a0cbf commit 72b29ef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Resources/public/js/generalDriver.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Resources/public/js/generalDriver.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions src/Resources/public/js/generalDriver_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ var BackendGeneral =
loadSubTree: function (el, data) {
el.blur();

var id = data.toggler,
level = data.level,
mode = data.mode,
item = $(id),
image = $(el).getFirst('img');
var id = data.toggler,
level = data.level,
mode = data.mode,
item = $(id),
image = $(el).getFirst('img');

data.action = 'DcGeneralLoadSubTree';
data.action = 'DcGeneralLoadSubTree';
data.REQUEST_TOKEN = Contao.request_token;

if (item) {
Expand Down Expand Up @@ -179,9 +179,9 @@ var BackendGeneral =
if (img.nodeName.toLowerCase() === 'img') {
if (img.getParent('ul.tl_listing').hasClass('tl_tree_xtnd')) {
if (publish) {
img.src = img.src.replace(/_1\.(gif|png|jpe?g)/, '.$1');
img.src = img.src.replace(/_1\.(gif|png|jpe?g|svg)/, '.$1');
} else {
img.src = img.src.replace(/\.(gif|png|jpe?g)/, '_1.$1');
img.src = img.src.replace(/\.(gif|png|jpe?g|svg)/, '_1.$1');
}
} else {
if (img.src.match(/folPlus|folMinus/)) {
Expand All @@ -193,11 +193,11 @@ var BackendGeneral =
}
var index;
if (publish) {
index = img.src.replace(/.*_([0-9])\.(gif|png|jpe?g)/, '$1');
img.src = img.src.replace(/_[0-9]\.(gif|png|jpe?g)/, ((index.toInt() === 1) ? '' : '_' + (index.toInt() - 1)) + '.$1');
index = img.src.replace(/.*_([0-9])\.(gif|png|jpe?g|svg)/, '$1');
img.src = img.src.replace(/_[0-9]\.(gif|png|jpe?g|svg)/, ((index.toInt() === 1) ? '' : '_' + (index.toInt() - 1)) + '.$1');
} else {
index = img.src.replace(/.*_([0-9])\.(gif|png|jpe?g)/, '$1');
img.src = img.src.replace(/(_[0-9])?\.(gif|png|jpe?g)/, ((index === img.src) ? '_1' : '_' + (index.toInt() + 1)) + '.$2');
index = img.src.replace(/.*_([0-9])\.(gif|png|jpe?g|svg)/, '$1');
img.src = img.src.replace(/(_[0-9])?\.(gif|png|jpe?g|svg)/, ((index === img.src) ? '_1' : '_' + (index.toInt() + 1)) + '.$2');
}
}
}
Expand Down

0 comments on commit 72b29ef

Please sign in to comment.