Z verze
změnil(a) David Brazda
k 08.04.2021 10:09
Na verzi < 9.1 >
změnil(a) David Brazda
k 08.04.2021 10:03
< >
Popis verze: allow view právo pro XWiki.Reader

Přehled

Rozpis

XWiki.JavaScriptExtension[1]
Kód
... ... @@ -11,7 +11,7 @@
11 11   //pokud ma img alt, pak ho nastavime jako title lightboxu
12 12   var img_src = $(this).attr('src');
13 13   var img_alt = $(this).attr('alt');
14 - if (img_alt && !(img_src.includes(img_alt))) {
14 + if (img_alt and !img_src.includes(img_alt)) {
15 15   $(this).parents("a").attr("data-title", img_alt);
16 16   }
17 17   //fig and figcaption handling
... ... @@ -20,10 +20,10 @@
20 20   'class': 'image'
21 21   }));
22 22  
23 - //pokud neni alt vyplneny a nebo je alt stejný jako název souboru - pak caption nezobrazuj
24 - if (img_alt && !(img_src.includes(img_alt))) {
25 - $(this).after($('<figcaption/>').append(img_alt));
26 - }
23 + //pokud neni alt vyplneny a nebo je alt stejný jako název souboru - pak caption nezobrazuj
24 + if (img_alt and !img_src.includes(img_alt))
25 + $(this).after($('<figcaption/>').append(img_alt));
26 + }
27 27   }
28 28   }); //each function
29 29   }); //dom updated