Modifications pour le document KanbanBoardMacro
Modifié par Admin le 21/07/2025 - 09:07
Résumé
-
Objets (4 modifications, 0 ajouts, 1 suppressions)
Détails
- XWiki.JavaScriptExtension[0]
-
- Mode de mise en cache
-
... ... @@ -1,1 +1,0 @@ 1 -long - Code
-
... ... @@ -1,49 +1,0 @@ 1 -require(['jquery'], function ($) { 2 - 3 - /** 4 - * Handles the fetching of the modal and the lazy loading of the css/js. 5 - */ 6 - $(document).on('click', '.space-picker-kanban-parameter', function () { 7 - let URL = new XWiki.Document('SpacePicker', 'TaskManager').getURL('get'); 8 - $.get(URL) 9 - .done(function (data) { 10 - $('body').append(`<div class='spacePickerKnbModal'> ${data} </div>`); 11 - $('.kanbanSpacePicker').modal('show'); 12 - // Initialize UI elements that are lazy loaded. 13 - $(document).trigger('xwiki:dom:updated', { 'elements': $('.spacePickerKnbModal').toArray()}); 14 - }) 15 - .fail(function(){ 16 - console.error('Failed to retrieve the space picker modal'); 17 - }); 18 - }) 19 - 20 - $(document).on('show.bs.modal', '.kanbanSpacePicker', function () { 21 - $('.modal.macro-editor-modal.in').hide(); 22 - }) 23 - 24 - $(document).on('hidden.bs.modal', '.kanbanSpacePicker', function () { 25 - $('.modal.macro-editor-modal.in').show(); 26 - // We remove the modal from the page 27 - $('.spacePickerKnbModal').remove(); 28 - }) 29 - /** 30 - * Handles the select button of the modal. If a space is selected it will return it's reference otherwise it will 31 - * return an empty string. 32 - */ 33 - $(document).on('click', '.kanbanSpaceSelector', function () { 34 - // We remove the modal again 35 - selectedSpace = $('.xtree .jstree-clicked:last').attr('id'); 36 - //Root element and we need to replace with an empty string so we can select all the tasks. 37 - if (selectedSpace === 'wiki:xwiki_anchor' || selectedSpace === 'document:xwiki:Main.WebHome_anchor') { 38 - selectedSpace = ""; 39 - } 40 - else { 41 - selectedSpace = selectedSpace.replace('space:xwiki:', "").replace("_anchor", ""); 42 - 43 - } 44 - $('.space-picker-kanban-parameter').val(selectedSpace); 45 - $('.kanbanSpacePicker').modal('hide'); 46 - $('.modal.macro-editor-modal.in').show(); 47 - }) 48 -}); 49 -
- XWiki.WikiMacroClass[1]
-
- Code de la macro
-
... ... @@ -1,5 +1,4 @@ 1 1 {{velocity}} 2 -#set($discard = $xwiki.ssx.use('TaskManager.KanbanBoardMacro')) 3 3 ## The xwql variable is used by the awmkanban macro called from this one. 4 4 #set ($xwql = '') 5 5 #set($user = "$!{xcontext.macro.params.user}") ... ... @@ -11,7 +11,7 @@ 11 11 #if ($xwql.length() > 0) 12 12 #set ($xwql = "$xwql and") 13 13 #end 14 - #set($xwql = "${xwql} (doc.spacelike '$escapetool.sql($space).%' or doc.space= '$escapetool.sql($space)')")13 + #set($xwql = "${xwql} doc.space = '$escapetool.sql($space)'") 15 15 #end 16 16 #set($project = "$!{xcontext.macro.params.project}") 17 17 #if($project != '')
- XWiki.WikiMacroParameterClass[2]
-
- Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -org.xwiki.user.UserReference
- XWiki.WikiMacroParameterClass[3]
-
- Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -com.xwiki.task.SpaceReference
- XWiki.WikiMacroParameterClass[4]
-
- Type du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -com.xwiki.task.ProjectReference