Changes for page Administration

Last modified by Leon Poon on 2025/05/12 14:26

From version 3.1
edited by Leon Poon
on 2019/06/16 14:44
Change comment: Install extension [org.xwiki.platform:xwiki-platform-administration-ui/11.4]
To version 6.1
edited by Leon Poon
on 2021/03/01 13:34
Change comment: Install extension [org.xwiki.platform:xwiki-platform-administration-ui/12.10.4]

Summary

Details

Page properties
Content
... ... @@ -9,7 +9,7 @@
9 9  #set ($adminAction = 'admin')
10 10  #set ($crtCategoryId = "$!{request.category}")
11 11  #if ($crtCategoryId != '')
12 - #set ($crtCategoryId = $mathtool.toInteger($crtCategoryId))
12 + #set ($crtCategoryId = $numbertool.toNumber($crtCategoryId).intValue())
13 13  #end
14 14  #set ($crtSectionId = "$!{request.section}")
15 15  
... ... @@ -87,7 +87,7 @@
87 87  #set ($crtCategory = $NULL)
88 88  #foreach ($category in $adminMenu)
89 89   ## "Standard" URLs and icons for categories
90 - #set ($category.url = $xwiki.getURL($currentDoc, $adminAction, "category=${mathtool.sub($velocityCount, 1)}"))
90 + #set ($category.url = $xwiki.getURL($currentDoc, $adminAction, "category=${mathtool.sub($foreach.count, 1)}"))
91 91   #if ($xwiki.getDocument('XWiki.AdminSheet').getAttachment("${category.id}.png"))
92 92   #set ($category.iconReference = "XWiki.AdminSheet@${category.id}.png")
93 93   #else
... ... @@ -96,7 +96,7 @@
96 96   #set ($category.description = $services.localization.render("admin.${category.id}.description").trim())
97 97   #set ($category.cssClass = "${category.id}Icon")
98 98   #set ($category.name = $services.localization.render("admin.${category.id}").trim())
99 - #if ("$!{crtCategoryId}" != '' && $velocityCount == $mathtool.add($crtCategoryId, 1))
99 + #if ("$!{crtCategoryId}" != '' && $foreach.count == $mathtool.add($crtCategoryId, 1))
100 100   #set ($crtCategory = $category)
101 101   #end
102 102   ##
... ... @@ -236,7 +236,9 @@
236 236   <div class="panel xform">
237 237   <label for="adminsearchmenu" class="hidden">$services.localization.render('search')</label>
238 238   <input type="text" class="form-control panel-group-filter" autocomplete="off" id="adminsearchmenu"
239 - placeholder="$escapetool.xml($services.localization.render('administration.menu.search.hint'))" />
239 + placeholder="$escapetool.xml($services.localization.render('administration.menu.search.hint'))"
240 + ## Disable the search input initially until the JavaScript code that handles the search is ready.
241 + disabled="disabled" />
240 240   </div>
241 241   #foreach ($item in $menu)
242 242   #verticalNavigationItem($item $options)
... ... @@ -288,7 +288,7 @@
288 288  ## Administration Sheet, used to display a common UI for some wiki features (presentation, users,
289 289  ## groups, rights etc.) at global / space level and also for several applications.
290 290  ##**************************************************************************************************
291 -#if($xcontext.action == 'view')
293 +#if($xcontext.action == 'view' && "$!request.viewer" == '')
292 292   $response.sendRedirect($xwiki.getURL($doc.getFullName(), 'admin', $request.getQueryString()))##
293 293  #else
294 294   $xwiki.jsx.use('XWiki.AdminSheet')##
... ... @@ -365,11 +365,8 @@
365 365   ##------------------------------------------------------------------------------------------------------------
366 366   ## The Administration allows editing other pages from different applications inside the admin context (UI)
367 367   ##------------------------------------------------------------------------------------------------------------
368 - #if ("$!{request.editmode}" == 'inline' && $xwiki.exists($section))
369 - #set ($discard = $xcontext.setDisplayMode('edit'))
370 - {{html clean="false"}}{{include reference="XWiki.AdminInlineSheet" /}}{{/html}}
371 - #elseif ($xwiki.exists("XWiki.Admin${section}Sheet"))
372 - ## Custom XE administration section
370 + #if ($xwiki.exists("XWiki.Admin${section}Sheet"))
371 + ## Handle known XWiki administration sections
373 373   {{include reference="XWiki.Admin${section}Sheet" /}}
374 374   #elseif ($xwiki.exists($section))
375 375   {{html clean="false"}}#includeForm($section){{/html}}
XWiki.JavaScriptExtension[0]
Code
... ... @@ -3,6 +3,8 @@
3 3   $(document).on('click', '.admin-menu a.panel-heading', function(event) {
4 4   event.preventDefault();
5 5   });
6 + // Mark the administration menu as ready for user interaction.
7 + $('.admin-menu').attr('data-ready', true);
6 6  });
7 7  
8 8  /**
... ... @@ -60,5 +60,7 @@
60 60   var text = $(this).val().toLowerCase();
61 61   // Schedule a new filter operation.
62 62   timeoutId = setTimeout($.proxy(filterPanelGroup, panelGroup, text), 500);
63 - });
65 +
66 + // Finally, enable the search input.
67 + }).prop('disabled', false);
64 64  });