From: Vincent Vanwaelscappel Date: Wed, 7 Jun 2023 07:10:35 +0000 (+0200) Subject: wait #5916 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=bdaac8ba494e973dfe4197fa2ac3b971b733452f;p=fluidbook-toolbox.git wait #5916 @0.5 --- 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';