Changes for page Expandable

Last modified by teamwire005 on 2025/12/02 09:21

From version 2.1
edited by teamwire005
on 2025/12/02 09:21
Change comment: Install extension [rao:webhome/1.2.0]
To version 1.1
edited by teamwire001
on 2025/10/24 12:33
Change comment: Install extension [rao:webhome/1.1.0]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.teamwire005
1 +XWiki.teamwire001
Content
... ... @@ -31,7 +31,7 @@
31 31  {{/expandable}}
32 32  
33 33  
34 -== An non-exclusive accordion consisting of three Expandable elements ==
34 +== An non-exclusive accordion consisting of three Exapandable elements ==
35 35  
36 36  {{expandable summary="Expandable B1" expandByDefault="true"}}
37 37  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
XWiki.JavaScriptExtension[0]
Code
... ... @@ -1,4 +1,4 @@
1 -(() => {
1 +{
2 2   // Animation parameters for expanding and collapsing the expandable element
3 3   const animationDurationMillis = 300;
4 4   const animationEasing = 'ease-in-out';
... ... @@ -156,6 +156,5 @@
156 156   // In this way we prevent the need for a global event handler function that would pollute the
157 157   // global namespace.
158 158   document.addEventListener('internal:expandable-toggle', handleToggleEvent);
159 -})();
159 +}
160 160  
161 -
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -12,7 +12,7 @@
12 12   #if($wikimacro.parameters.cssClass)
13 13   #set($expandableClassNames=$expandableClassNames + ' ' + $wikimacro.parameters.cssClass)
14 14   #end
15 - #if($wikimacro.parameters.expandByDefault || $services.job.getCurrentJobStatus(['export', 'pdf']))
15 + #if($wikimacro.parameters.expandByDefault || $xcontext.action == 'export')
16 16   #set($expandableClassNames=$expandableClassNames + ' xw-expandable xw-expandable_expanded')
17 17   #end
18 18   #set($expandableAttributes='')