Découvrez les nouveautés de cette version : Fonctionnalités, améliorations et évolutions vous attendent ! 👉 Cliquez ici pour en savoir plus

Modifications pour le document Macro

Modifié par Admin le 21/07/2025 - 08:59

Depuis la version 1.1
modifié par Admin
sur 08/11/2024 - 07:55
Commentaire de modification : Install extension [com.xwiki.task:application-task-ui/3.6.0]
À la version 2.1
modifié par Admin
sur 28/05/2025 - 22:33
Commentaire de modification : Install extension [com.xwiki.task:application-task-ui/3.7.1]

Résumé

Détails

XWiki.JavaScriptExtension[0]
Code
... ... @@ -70,6 +70,9 @@
70 70   if (undefined !== ganttDiv.data('hide-no-due-date')) {
71 71   params['hideNoDueDate'] = ganttDiv.data('hide-no-due-date');
72 72   }
73 + if (undefined !== ganttDiv.data('max-tasks')) {
74 + params['maxTasks'] = ganttDiv.data('max-tasks');
75 + }
73 73   const query = $.param(params);
74 74   return jsonSourceBaseURL + query;
75 75   };
XWiki.JavaScriptExtension[1]
Code
... ... @@ -153,7 +153,7 @@
153 153   Day_upper: (this.options.column_width * 30) / 2,
154 154   Week_lower: 0,
155 155   Week_upper: (this.options.column_width * 4) / 2,
156 - Month_lower: this.options.column_width * 1.5, // Changed: Alignment (was width * 2). Now month names are actually above their corresponding column.
156 + Month_lower: this.options.column_width * 0.5, // Changed: Alignment (was width * 2). Now month names are actually above their corresponding column.
157 157   Month_upper: (this.options.column_width * 12) / 2,
158 158   Year_lower: this.options.column_width / 2,
159 159   Year_upper: (this.options.column_width * 30) / 2,
XWiki.WikiMacroClass[0]
Code de la macro
... ... @@ -59,6 +59,9 @@
59 59  {{html}}
60 60  <div class='taskgantt'
61 61   data-readonly="$diagramIsReadonly"
62 + #if ("$!xcontext.macro.params.maxTasks" != '')
63 + data-max-tasks="${escapetool.html($xcontext.macro.params.maxTasks)}"
64 + #end
62 62   #if ("$!xcontext.macro.params.from" != '')
63 63   #set ($fromMillis = $xwiki.jodatime.dateTime.parse($xcontext.macro.params.from, $storageDateTimeFormatter).getMillis())
64 64   data-date-from="${escapetool.html($fromMillis)}"
XWiki.WikiMacroParameterClass[7]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +50
Description du paramètre
... ... @@ -1,0 +1,1 @@
1 +Show at most this many tasks in the gantt diagram.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +maxTasks
Type du paramètre
... ... @@ -1,0 +1,1 @@
1 +java.lang.Integer