Changes for page KanbanMacro
Last modified by superadmin on 2026/08/31 18:18
From version 3.1
edited by superadmin
on 2026/08/31 18:18
on 2026/08/31 18:18
Change comment:
Install extension [org.xwiki.contrib:macro-kanban/1.4.5]
To version 1.1
edited by Admin NAJU Bayern
on 2026/03/08 14:38
on 2026/03/08 14:38
Change comment:
Install extension [org.xwiki.contrib:macro-kanban/1.4.2]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. superadmin1 +xwiki:XWiki.AdminNAJUBayern
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -27,7 +27,7 @@ 27 27 * jKanban 28 28 * Vanilla Javascript plugin for manage kanban boards 29 29 * 30 - * @ url: http://www.riccardotartaglia.it/jkanban/30 + * @site: http://www.riccardotartaglia.it/jkanban/ 31 31 * @author: Riccardo Tartaglia 32 32 */ 33 33 ... ... @@ -334,12 +334,14 @@ 334 334 nodeItem.dropfn = itemKanban.drop; 335 335 nodeItem.dataset.eid = itemKanban.id; 336 336 337 - var nodeItemTitle = document.createElement( itemKanban.url ?'a' : 'div');337 + var nodeItemTitle = document.createElement('div'); 338 338 nodeItemTitle.classList.add('kanban-item-title'); 339 339 nodeItemTitle.innerHTML = itemKanban.title; 340 340 nodeItemTitle.clickfn = itemKanban.click; 341 341 if (itemKanban.url) { 342 - nodeItemTitle.href = itemKanban.url; 342 + nodeItemTitle.addEventListener('click', function (e) { 343 + location = this.url; 344 + }.bindAsEventListener(itemKanban)); 343 343 } else { 344 344 // add click handler of item 345 345 __onclickHandler(nodeItemTitle);
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -16,7 +16,7 @@ 16 16 <script type="text/javascript"> 17 17 require.config({ 18 18 paths: { 19 - jkanban: '$xwiki.getURL("Macros.KanbanMacro", "jsx", "language=${xcontext.l ocale}")'19 + jkanban: '$xwiki.getURL("Macros.KanbanMacro", "jsx", "language=${xcontext.language}")' 20 20 } 21 21 }); 22 22 require(['jquery','jkanban'], function(jQuery) { ... ... @@ -25,7 +25,7 @@ 25 25 var kanban = window.kanban = new jKanban({ 26 26 element: '#cp-app-kanban-content-${kanbanCounter}', 27 27 gutter: '15px', 28 - widthBoard: $ jsontool.serialize($xcontext.macro.params.width),28 + widthBoard: '${xcontext.macro.params.width}', 29 29 onChange: function () { 30 30 if (updateService && updateService!="") { 31 31 var newBoards = JSON.stringify(this.boards); ... ... @@ -149,7 +149,7 @@ 149 149 #if($xcontext.macro.params.awmupdatepath) 150 150 onBoardChange: function(itemId, boardId) { 151 151 var currentdoc = new XWiki.Document(XWiki.Model.resolve(itemId, XWiki.EntityType.DOCUMENT)); 152 - var restURL = currentdoc.getRestURL() + $ jsontool.serialize(${xcontext.macro.params.awmupdatepath});152 + var restURL = currentdoc.getRestURL() + "${xcontext.macro.params.awmupdatepath}"; 153 153 var data = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><property xmlns="http://www.xwiki.org" name="defaultEditMode" type="String"><value>' 154 154 + boardId + '</value></property>' 155 155 jQuery.ajax({ url: restURL, type: 'PUT', data: data, contentType: "application/xml", ... ... @@ -190,17 +190,17 @@ 190 190 }, 191 191 #end 192 192 #if($xcontext.macro.params.addItemButton) 193 - addItemButton: ('true' === $jsontool.serialize($xcontext.macro.params.addItemButton)), 193 + addItemButton: ${xcontext.macro.params.addItemButton}, 194 +#end 195 +#if($xcontext.macro.params.addBoardButton) 196 + addBoardButton: ${xcontext.macro.params.addBoardButton}, 194 194 #end 195 -#if($xcontext.macro.params. addBoardButton)196 - addBoardButton:('true' ===$jsontool.serialize($xcontext.macro.params.addBoardButton)),198 +#if($xcontext.macro.params.removeBoardButton) 199 + removeBoardButton: ${xcontext.macro.params.removeBoardButton}, 197 197 #end 198 -#if($xcontext.macro.params. removeBoardButton)199 - removeBoardButton:('true' ===$jsontool.serialize($xcontext.macro.params.removeBoardButton)),201 +#if($xcontext.macro.params.addRemoveButton) 202 + addRemoveButton: ${xcontext.macro.params.addRemoveButton}, 200 200 #end 201 -#if($xcontext.macro.params.addRemoveButton) 202 - addRemoveButton: ('true' === $jsontool.serialize($xcontext.macro.params.addRemoveButton)), 203 -#end 204 204 boards: boards 205 205 }); 206 206 }; ... ... @@ -209,18 +209,18 @@ 209 209 var counter = ${kanbanCounter}; 210 210 var updateService = "${xwiki.getURL("Macros.KanbanService")}?xpage=plain&outputSyntax=plain"; 211 211 #if($xcontext.macro.params.updateService) 212 - updateService = $ jsontool.serialize(${xcontext.macro.params.updateService});212 + updateService = "${xcontext.macro.params.updateService}"; 213 213 #end 214 214 #if($xcontext.macro.params.source) 215 215 var getdata = jQuery.getJSON("${xcontext.macro.params.source}", function(data) { 216 216 initKanban(data, updateService); 217 217 }); 218 - getdata. fail(function(xhr,status,error) {218 + getdata.error(function(xhr,status,error) { 219 219 #set($error = $escapetool.javascript($services.localization.render("kanban.load.error"))) 220 220 new XWiki.widgets.Notification('$error', 'error', '20'); 221 221 }); 222 222 #elseif($xcontext.macro.content) 223 - var boards = $ jsontool.parse($jsontool.serialize("$!xcontext.macro.content"));223 + var boards = ${xcontext.macro.content}; 224 224 initKanban(boards, updateService); 225 225 #else 226 226 var boards = [];