Changes for page Calendar Macro
Last modified by Vladislav ANTOLÍK on 19.10.2026, 08:01
From version 6.1
edited by Vladislav ANTOLÍK
on 19.10.2026, 08:01
on 19.10.2026, 08:01
Change comment:
Install extension [org.xwiki.contrib:macro-fullcalendar-ui/2.5.5]
To version 5.1
edited by Vladislav ANTOLÍK
on 11.11.2025, 12:11
on 11.11.2025, 12:11
Change comment:
Install extension [org.xwiki.contrib:macro-fullcalendar-ui/2.5.0]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 1 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,7 +7,7 @@ 7 7 8 8 {{calendar classname="Blog.BlogPostClass" startfield="publishDate" editable="false" year="2009" month="5" date="1" /}} 9 9 10 -or 10 +or 11 11 12 12 {{velocity}} 13 13 {{calendar json="${xwiki.getDocument("Calendar.ExampleJSON").getURL("get")}" editable="false" year="2012" month="5" date="18" /}}
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -6,11 +6,7 @@ 6 6 #else 7 7 #set($calcounter = 1) 8 8 #end 9 -#set($containerId = "calendar${calcounter}") 10 -#if ($xcontext.macro.params.id) 11 - #set ($containerId = $xcontext.macro.params.id) 12 -#end 13 -(% id="$services.rendering.escape($containerId, 'xwiki/2.1')" class="xwiki-fullcalendar" %) 9 +(% id="calendar${calcounter}" %) 14 14 ((( 15 15 ))) 16 16 ... ... @@ -158,7 +158,7 @@ 158 158 function init() { 159 159 // The page is now ready, initialize the calendar... 160 160 var progressNotification; 161 - $('#${cont ainerId}').fullCalendar({157 + $('#calendar${calcounter}').fullCalendar({ 162 162 views: { 163 163 month : { 164 164 columnFormat: "$!services.localization.render('xwiki.calendar.columnFormat.month')", ... ... @@ -234,7 +234,6 @@ 234 234 tooltip = tooltip + "$services.localization.render('xwiki.calendar.event.description') " + event.description; 235 235 } 236 236 element.attr('title', tooltip); 237 - document.fire("xwiki:fullcalendar:${containerId}:eventrendering", { eventObj: event, eventElement: element }); 238 238 }, 239 239 loading: function( isLoading) { 240 240 if (isLoading) { ... ... @@ -257,13 +257,14 @@ 257 257 }); 258 258 } 259 259 260 - function scheduleInit() { 261 - clearTimeout(window['_calMacroTimer${calcounter}']); 262 - window['_calMacroTimer${calcounter}'] = setTimeout(init, 200); 263 - } 264 - 265 - $(window).off('.calMacro${calcounter}').on('xwiki:dom:updated.calMacro${calcounter}', scheduleInit); 266 - scheduleInit(); 255 + // Load the calendar in edit mode. 256 + $(window).on('xwiki:dom:updated', function() { 257 + init(); 258 + }); 259 + // Load the calendar in view mode. 260 + $(document).ready(function() { 261 + init(); 262 + }); 267 267 }); 268 268 }); 269 269 </script>
- XWiki.WikiMacroParameterClass[19]
-
- Parameter description
-
... ... @@ -1,1 +1,0 @@ 1 -The id (html attribute) that will be set to the wrapper of the calendar. - Parameter mandatory
-
... ... @@ -1,1 +1,0 @@ 1 -No - Parameter name
-
... ... @@ -1,1 +1,0 @@ 1 -id