Изменения документа Document Tree Macros
Редактировал(а) Alexey Semenihin 23.10.2026, 15:12
От версии 2.1
отредактировано Dmitriy Rybakov
на 04.10.2024, 00:07
на 04.10.2024, 00:07
Изменить комментарий:
Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro/15.10.12]
К версии 1.1
отредактировано Admin xWiKi
на 15.10.2019, 13:19
на 15.10.2019, 13:19
Изменить комментарий:
Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro/11.8.1]
Сводка
-
Свойства страницы (2 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Автор документа
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. rybakovds1 +XWiki.admin - Содержимое
-
... ... @@ -94,7 +94,6 @@ 94 94 #getSuggestions($data) 95 95 #end 96 96 #if ($data) 97 - #postProcessDocumentTreeData($data) 98 98 #jsonResponse($data) 99 99 #else 100 100 $response.sendError(404) ... ... @@ -102,10 +102,6 @@ 102 102 #end 103 103 #end 104 104 105 -#macro (postProcessDocumentTreeData $data) 106 - ## This is just a hook to allow post processing the document tree data. 107 -#end 108 - 109 109 ##------------------------------------------------------------ 110 110 ## Children 111 111 ##------------------------------------------------------------ ... ... @@ -119,11 +119,11 @@ 119 119 ## Return the children of the specified node. 120 120 #set ($actualNodeId = $nodeId) 121 121 #end 122 - #set ($offset = $mathtool.max($ numbertool.toNumber($request.offset).intValue(), 0))117 + #set ($offset = $mathtool.max($mathtool.toInteger($request.offset), 0)) 123 123 #if ("$!offset" == '') 124 124 #set ($offset = 0) 125 125 #end 126 - #set ($limit = $mathtool.max($ numbertool.toNumber($request.limit).intValue(), 1))121 + #set ($limit = $mathtool.max($mathtool.toInteger($request.limit), 1)) 127 127 #if ("$!limit" == '') 128 128 #set ($limit = 15) 129 129 #end ... ... @@ -316,6 +316,10 @@ 316 316 #if ($canViewDoc && $docTreeConfig.showDocumentTitle) 317 317 ## Display the translated title. 318 318 #set ($translatedDocument = $xwiki.getDocument($documentReference).translatedDocument) 314 + ## Make sure the displayed title is not affected by the sheet request parameter (e.g. when $translatedDocument is 315 + ## the current document). By setting the title (even if we don't change it) the internal document instance is cloned 316 + ## so it's going to be different than the current document instance (which is the target of the sheet parameter). 317 + #set ($discard = $translatedDocument.setTitle($translatedDocument.title)) 319 319 #set ($plainTitle = $translatedDocument.plainTitle) 320 320 #if (!$stringtool.isBlank($plainTitle)) 321 321 #set ($label = $plainTitle) ... ... @@ -479,8 +479,7 @@ 479 479 'canDelete': $canEditDoc, 480 480 'canMove': $canEditDoc, 481 481 'canCopy': true, 482 - 'deleteURL': $attachment.document.getAttachmentURL($attachment.filename, 'delattachment'), 483 - 'mimetype': $attachment.mimeType 481 + 'deleteURL': $attachment.document.getAttachmentURL($attachment.filename, 'delattachment') 484 484 }, 485 485 'a_attr': { 486 486 'href': $attachment.document.getAttachmentURL($attachment.filename) ... ... @@ -674,8 +674,8 @@ 674 674 ## Object name is: Space.Class[index] 675 675 #set ($separatorIndex = $objectReference.name.lastIndexOf('[')) 676 676 #set ($classId = $objectReference.name.substring(0, $separatorIndex)) 677 - #set ($objectNumber = $ numbertool.toNumber($objectReference.name.substring($mathtool.add($separatorIndex, 1),678 - $mathtool.sub($objectReference.name.length(), 1))) .intValue())675 + #set ($objectNumber = $mathtool.toInteger($objectReference.name.substring($mathtool.add($separatorIndex, 1), 676 + $mathtool.sub($objectReference.name.length(), 1)))) 679 679 #set ($document = $xwiki.getDocument($objectReference)) 680 680 #set ($object = $document.getObject($classId, $objectNumber)) 681 681 #end ... ... @@ -1122,7 +1122,6 @@ 1122 1122 #macro (searchAttachmentsSolr $text $limit $return) 1123 1123 #set ($params = [ 1124 1124 'fq=type:ATTACHMENT', 1125 - 'fq=locale:*', 1126 1126 'qf=filename^4 attcontent', 1127 1127 'fl=type wiki spaces name filename' 1128 1128 ]) ... ... @@ -1267,7 +1267,7 @@ 1267 1267 #set ($input = []) 1268 1268 #foreach ($list in $lists) 1269 1269 ## We use queues to be able to easily remove items from the start. 1270 - #set ($queue = $collectiontool.queue) 1267 + #set ($queue = $collectionstool.queue) 1271 1271 #set ($discard = $queue.addAll($list)) 1272 1272 #set ($discard = $input.add($queue)) 1273 1273 ## We will add (part of) the items back later.