Skip to content
Snippets Groups Projects
Commit 11ec6d7e authored by Oana-Lavinia Florean's avatar Oana-Lavinia Florean Committed by github-actions[bot]
Browse files

XWIKI-22304: Do not trigger the lightbox feature for images from the Gallery macro

(cherry picked from commit c963ae28)
parent a1484973
No related tags found
No related merge requests found
......@@ -118,6 +118,8 @@ public List<Block> execute(GalleryMacroParameters parameters, String content, Ma
Map<String, String> groupParameters = new HashMap<>();
groupParameters.put("class", ("gallery " + StringUtils.defaultString(parameters.getClassNames())).trim());
// Disable lightbox for the gallery macro since the two features are very similar and it produces confusion.
groupParameters.put("data-xwiki-lightbox", "false");
if (inlineStyle.length() > 0) {
groupParameters.put("style", inlineStyle.toString());
}
......
......@@ -12,13 +12,13 @@ image:second.png
beginDocument
beginMacroMarkerStandalone [gallery] [] [image:first.png
image:second.png]
beginGroup [[class]=[gallery]]
beginGroup [[class]=[gallery][data-xwiki-lightbox]=[false]]
beginParagraph
onImage [Typed = [false] Type = [url] Reference = [first.png]] [true] [Ifirst.png]
onNewLine
onImage [Typed = [false] Type = [url] Reference = [second.png]] [true] [Isecond.png]
endParagraph
endGroup [[class]=[gallery]]
endGroup [[class]=[gallery][data-xwiki-lightbox]=[false]]
endMacroMarkerStandalone [gallery] [] [image:first.png
image:second.png]
endDocument
\ No newline at end of file
......@@ -12,13 +12,13 @@ image:second.png
beginDocument
beginMacroMarkerStandalone [gallery] [class=foo|width=300px|height=200px] [image:first.png
image:second.png]
beginGroup [[class]=[gallery foo][style]=[width: 300px;height: 200px;]]
beginGroup [[class]=[gallery foo][data-xwiki-lightbox]=[false][style]=[width: 300px;height: 200px;]]
beginParagraph
onImage [Typed = [false] Type = [url] Reference = [first.png]] [true] [Ifirst.png]
onNewLine
onImage [Typed = [false] Type = [url] Reference = [second.png]] [true] [Isecond.png]
endParagraph
endGroup [[class]=[gallery foo][style]=[width: 300px;height: 200px;]]
endGroup [[class]=[gallery foo][data-xwiki-lightbox]=[false][style]=[width: 300px;height: 200px;]]
endMacroMarkerStandalone [gallery] [class=foo|width=300px|height=200px] [image:first.png
image:second.png]
endDocument
\ No newline at end of file
......@@ -12,13 +12,13 @@ image:second.png
beginDocument
beginMacroMarkerStandalone [gallery] [width=|height=] [image:first.png
image:second.png]
beginGroup [[class]=[gallery]]
beginGroup [[class]=[gallery][data-xwiki-lightbox]=[false]]
beginParagraph
onImage [Typed = [false] Type = [url] Reference = [first.png]] [true] [Ifirst.png]
onNewLine
onImage [Typed = [false] Type = [url] Reference = [second.png]] [true] [Isecond.png]
endParagraph
endGroup [[class]=[gallery]]
endGroup [[class]=[gallery][data-xwiki-lightbox]=[false]]
endMacroMarkerStandalone [gallery] [width=|height=] [image:first.png
image:second.png]
endDocument
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment