From bdaac8ba494e973dfe4197fa2ac3b971b733452f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 7 Jun 2023 09:10:35 +0200 Subject: [PATCH] wait #5916 @0.5 --- resources/linkeditor/js/linkeditor.layers.js | 3 ++- resources/linkeditor/js/linkeditor.links.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.layers.js b/resources/linkeditor/js/linkeditor.layers.js index 1511e7a53..d3aa49264 100644 --- a/resources/linkeditor/js/linkeditor.layers.js +++ b/resources/linkeditor/js/linkeditor.layers.js @@ -42,8 +42,9 @@ LinkeditorLayers.prototype = { dest = '' + TRANSLATIONS.empty + ''; } var l = ''; + let level = Math.floor(parseInt($(this).attr('fb-calc-depth')) / 10); layers.push({ - level: Math.round(parseInt($(this).attr('fb-calc-depth')) / 10), + level: level, zindex: parseInt($(this).attr('fb-calc-zindex')), html: l }); diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index a1c3cb272..30224fc96 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -1059,7 +1059,7 @@ LinkeditorLinks.prototype = { var settings = []; $.each(conf, function (k, v) { let val = $(link).attr('fb-' + k); - if (k === 'alternative') { + if (k === 'alternative' || k==='to') { let e = val.split('.'); let ext = e.pop().toLowerCase(); val = (['png', 'jpg', 'jpeg', 'gif', 'webp', 'avif', 'svg'].indexOf(ext) >= 0) ? 'file.jpg' : 'file.zip'; -- 2.39.5