Changes for page Administration
Last modified by Leon Poon on 2025/05/12 14:26
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -$services.localization.render("administration.title#if ($doc. documentReference.name == 'WebPreferences').page#elseif ($doc.fullName == 'XWiki.XWikiPreferences')#if ($xcontext.isMainWiki()).global#{else}.wiki#end#end")1 +$services.localization.render("administration.title#if ($doc.name == 'WebPreferences').page#elseif ($doc.fullName == 'XWiki.XWikiPreferences')#if ($xcontext.isMainWiki()).global#{else}.wiki#end#end") - Content
-
... ... @@ -9,7 +9,7 @@ 9 9 #set ($adminAction = 'admin') 10 10 #set ($crtCategoryId = "$!{request.category}") 11 11 #if ($crtCategoryId != '') 12 - #set ($crtCategoryId = $ numbertool.toNumber($crtCategoryId).intValue())12 + #set ($crtCategoryId = $mathtool.toInteger($crtCategoryId)) 13 13 #end 14 14 #set ($crtSectionId = "$!{request.section}") 15 15 ... ... @@ -16,9 +16,6 @@ 16 16 ## 17 17 ## Admin menu map 18 18 ## 19 -## displayInSection: menu.name | sectionOrder: 200 | page: Menu.MenuConfigurationSection 20 -## displayInSection: panels.applications | sectionOrder: 400 | page: PanelsCode.ApplicationsPanelConfigurable 21 -## displayInSection: panels.navigation | sectionOrder: 500 | page: PanelsCode.NavigationConfigurationSection 22 22 #set($adminMenu = [ 23 23 { 24 24 'id' : 'lf', ... ... @@ -26,8 +26,8 @@ 26 26 'displayBeforeCategory': 'content', 27 27 'children': [ 28 28 {'id' : 'Themes', 'perSpace' : true, 'order' : 100}, 29 - {'id' : 'Panels.PanelWizard', 'perSpace' : true, 'order' : 300},30 - {'id' : 'Presentation', 'perSpace' : true, 'order' : 600}26 + {'id' : 'Panels.PanelWizard', 'perSpace' : true, 'order' : 200}, 27 + {'id' : 'Presentation', 'perSpace' : true, 'order' : 300} 31 31 ] 32 32 }, 33 33 { ... ... @@ -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($ foreach.count, 1)}"))87 + #set ($category.url = $xwiki.getURL($currentDoc, $adminAction, "category=${mathtool.sub($velocityCount, 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}" != '' && $ foreach.count == $mathtool.add($crtCategoryId, 1))96 + #if ("$!{crtCategoryId}" != '' && $velocityCount == $mathtool.add($crtCategoryId, 1)) 100 100 #set ($crtCategory = $category) 101 101 #end 102 102 ## ... ... @@ -232,14 +232,10 @@ 232 232 233 233 #macro (verticalNavigation $menu $options) 234 234 {{html clean="false"}} 235 - <nav id="$!options.id" class="panel-group $!options.cssClass" 236 - aria-label="$escapetool.xml($services.localization.render('administration.menu.label'))"> 232 + <div id="$!options.id" class="panel-group $!options.cssClass" role="tablist" aria-multiselectable="true"> 237 237 <div class="panel xform"> 238 - <label for="adminsearchmenu" class="hidden">$services.localization.render('search')</label> 239 - <input type="text" class="form-control panel-group-filter" autocomplete="off" id="adminsearchmenu" 240 - placeholder="$escapetool.xml($services.localization.render('administration.menu.search.hint'))" 241 - ## Disable the search input initially until the JavaScript code that handles the search is ready. 242 - disabled="disabled" /> 234 + <input type="text" class="form-control panel-group-filter" autocomplete="off" 235 + placeholder="$escapetool.xml($services.localization.render('administration.menu.search.hint'))" /> 243 243 </div> 244 244 #foreach ($item in $menu) 245 245 #verticalNavigationItem($item $options) ... ... @@ -249,7 +249,7 @@ 249 249 $escapetool.xml($services.localization.render('administration.menu.search.noResults')) 250 250 </div> 251 251 </div> 252 - </ nav>245 + </div> 253 253 {{/html}} 254 254 #end 255 255 ... ... @@ -265,14 +265,11 @@ 265 265 #set ($children = []) 266 266 #sortCollectionOfMapsByField($item.children, 'order', 99999, 'asc', $children) 267 267 <div class="panel panel-default"> 268 - <a class="panel-heading#if (!$isActive) collapsed#end" id="panel-heading-$escapedId" 269 - href="$!item.url" data-toggle="collapse"#if ("$!options.id" != '') data-parent="#$options.id" #end 270 - data-target="#panel-body-$escapedId" aria-expanded="$isActive" aria-controls="panel-body-$escapedId" 271 - title="$!escapetool.xml($item.description)"> 272 - <span>$!services.icon.renderHTML($item.icon)$escapetool.xml($name)</span> 273 - <div>$services.icon.renderHTML('caret-down')</div> 274 - </a> 275 - <section class="panel-collapse collapse#if ($isActive) in#end" id="panel-body-$escapedId" 261 + <a class="panel-heading#if (!$isActive) collapsed#end" role="tab" id="panel-heading-$escapedId" 262 + href="$!item.url" data-toggle="collapse"#if ("$!options.id" != '') data-parent="#$options.id" #end 263 + data-target="#panel-body-$escapedId" aria-expanded="$isActive" aria-controls="panel-body-$escapedId" 264 + title="$!escapetool.xml($item.description)">$!services.icon.renderHTML($item.icon)$escapetool.xml($name)</a> 265 + <div class="panel-collapse collapse#if ($isActive) in#end" role="tabpanel" id="panel-body-$escapedId" 276 276 aria-labelledby="panel-heading-$escapedId"> 277 277 <div class="list-group"> 278 278 #foreach ($child in $children) ... ... @@ -279,7 +279,7 @@ 279 279 #verticalNavigationItem($child $options) 280 280 #end 281 281 </div> 282 - </ section>272 + </div> 283 283 </div> 284 284 #else 285 285 <a class="list-group-item#if ($isActive) active#end" data-id="$escapedId" ... ... @@ -294,7 +294,7 @@ 294 294 ## Administration Sheet, used to display a common UI for some wiki features (presentation, users, 295 295 ## groups, rights etc.) at global / space level and also for several applications. 296 296 ##************************************************************************************************** 297 -#if($xcontext.action == 'view' && "$!request.viewer" == '')287 +#if($xcontext.action == 'view') 298 298 $response.sendRedirect($xwiki.getURL($doc.getFullName(), 'admin', $request.getQueryString()))## 299 299 #else 300 300 $xwiki.jsx.use('XWiki.AdminSheet')## ... ... @@ -327,7 +327,7 @@ 327 327 328 328 ## Determine the administration level. 329 329 #set ($level = '') 330 -#if ($doc. documentReference.name == 'WebPreferences')320 +#if ($doc.name == 'WebPreferences') 331 331 #set ($level = '.page') 332 332 #elseif ($doc.fullName == 'XWiki.XWikiPreferences') 333 333 #if ($xcontext.isMainWiki()) ... ... @@ -337,7 +337,7 @@ 337 337 #end 338 338 #end 339 339 (% id="document-title" %)((( 340 - = $services.localization.render("administration.sectionTitle$level", 'xwiki/2.1',[$sectionName]) =330 + = $services.localization.render("administration.sectionTitle$level", [$sectionName]) = 341 341 ## Display the category/section description below the title. 342 342 #set ($categoryOrSectionId = $crtCategory.id) 343 343 #if ("$!crtSection.id" != '') ... ... @@ -371,8 +371,11 @@ 371 371 ##------------------------------------------------------------------------------------------------------------ 372 372 ## The Administration allows editing other pages from different applications inside the admin context (UI) 373 373 ##------------------------------------------------------------------------------------------------------------ 374 - #if ($xwiki.exists("XWiki.Admin${section}Sheet")) 375 - ## Handle known XWiki administration sections 364 + #if ("$!{request.editmode}" == 'inline' && $xwiki.exists($section)) 365 + #set ($discard = $xcontext.setDisplayMode('edit')) 366 + {{html clean="false"}}{{include reference="XWiki.AdminInlineSheet" /}}{{/html}} 367 + #elseif ($xwiki.exists("XWiki.Admin${section}Sheet")) 368 + ## Custom XE administration section 376 376 {{include reference="XWiki.Admin${section}Sheet" /}} 377 377 #elseif ($xwiki.exists($section)) 378 378 {{html clean="false"}}#includeForm($section){{/html}}
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -3,8 +3,6 @@ 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); 8 8 }); 9 9 10 10 /** ... ... @@ -26,7 +26,7 @@ 26 26 // Filter the categories. 27 27 panelGroup.find('a.panel-heading').each(function() { 28 28 var panel = $(this).closest('.panel'); 29 - var hasVisibleSections = panel.find('.list-group-item').not('.hidden'). length> 0;27 + var hasVisibleSections = panel.find('.list-group-item').not('.hidden').size() > 0; 30 30 var matchesFilterQuery = !filterItem.call($(this), text); 31 31 panel.toggle(hasVisibleSections || matchesFilterQuery); 32 32 if (!hasVisibleSections && matchesFilterQuery) { ... ... @@ -50,7 +50,7 @@ 50 50 .next('.panel-collapse').addClass('in').css('height', ''); 51 51 } 52 52 // Show/Hide the "No results." message. 53 - var hasVisibleCategories = panelGroup.find('a.panel-heading').filter(':visible'). length> 0;51 + var hasVisibleCategories = panelGroup.find('a.panel-heading').filter(':visible').size() > 0; 54 54 panelGroup.find('.noitems').toggleClass('hidden', hasVisibleCategories); 55 55 }; 56 56 ... ... @@ -61,8 +61,6 @@ 61 61 var panelGroup = $(this).closest('.panel-group'); 62 62 var text = $(this).val().toLowerCase(); 63 63 // Schedule a new filter operation. 64 - timeoutId = setTimeout(filterPanelGroup.bind(panelGroup, text), 500); 65 - 66 - // Finally, enable the search input. 67 - }).prop('disabled', false); 62 + timeoutId = setTimeout($.proxy(filterPanelGroup, panelGroup, text), 500); 63 + }); 68 68 });
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -13,17 +13,10 @@ 13 13 margin-top: 0; 14 14 } 15 15 16 -#admin-page-content label > input[type="checkbox"] { 17 - vertical-align: middle; 18 -} 19 - 16 +#admin-page-content label > input[type="checkbox"], 20 20 #admin-page-content label > input[type="radio"] { 21 - vertical-align: b aseline;18 + vertical-align: bottom; 22 22 } 23 - 24 -#admin-page-content .usersorgroupsnames label > input[type="radio"] { 25 - vertical-align: unset; 26 -} 27 27 28 28 /** 29 29 * Category Overview ... ... @@ -64,23 +64,10 @@ 64 64 /* Override general table styles. */ 65 65 /* TODO: Move to livetable.css */ 66 66 67 -#usersandgroupstable td, #alldocstable td { 60 +#userstable td, #groupstable td, #usersandgroupstable td, #alldocstable td { 68 68 border-color: transparent; 69 69 } 70 70 71 -#admin-page-content .usersorgroupsnames { 72 - white-space: nowrap; 73 - /* Triple of the value for the .right column. This is useful to make sure the columns are somewhat balanced when 74 - there is only one right (e.g., extension rights with a default flavor). 75 - Keeping them balanced is useful to make sure the filters are displayed properly, which is especially important 76 - on a subwiki where we have to find a place to display the scope selector. */ 77 - width: 27%; 78 -} 79 - 80 -#usersandgroupstable-filters-scope { 81 - white-space: nowrap; 82 -} 83 - 84 84 #usersandgroupstable-filters #name { 85 85 width: 65%; 86 86 } ... ... @@ -99,10 +99,6 @@ 99 99 vertical-align: top; 100 100 } 101 101 102 -.xform #usersandgroupstable select { 103 - width: unset; 104 -} 105 - 106 106 /** 107 107 * Bootstrap's Accordion Menu 108 108 */ ... ... @@ -113,33 +113,18 @@ 113 113 } 114 114 115 115 .admin-menu .panel-heading.collapsed { 116 - border-bottom-left-radius: 5px;117 - border-bottom-right-radius: 5px;92 + border-bottom-left-radius: 3px; 93 + border-bottom-right-radius: 3px; 118 118 } 119 119 120 120 .admin-menu a.panel-heading { 121 - display: flex;97 + display: block; 122 122 font-size: 100%; 123 123 } 124 - 125 -.admin-menu a.panel-heading span { 126 - flex-grow: 1; 127 -} 128 - 129 129 .admin-menu a.panel-heading:not(.collapsed) { 130 130 background-color: $theme.menuBackgroundColor; 131 131 color: $theme.menuLinkColor; 132 132 } 133 - 134 -/* Rotate the carret on collapse. */ 135 -.admin-menu a.panel-heading.collapsed > *:last-child { 136 - transform: rotate(90deg); 137 -} 138 - 139 -.admin-menu a.panel-heading > *:last-child { 140 - transition: transform 200ms ease-in-out; 141 -} 142 - 143 143 .admin-menu a.panel-heading:active, 144 144 .admin-menu a.panel-heading:focus, 145 145 .admin-menu a.panel-heading:hover { ... ... @@ -146,13 +146,13 @@ 146 146 text-decoration: none; 147 147 } 148 148 149 -.admin-menu .panel-heading > span >*:first-child {110 +.admin-menu .panel-heading > *:first-child { 150 150 margin-right: .8em; 151 151 } 152 152 153 153 .admin-menu .panel-collapse > .list-group:last-child .list-group-item.last { 154 - border-bottom-right-radius: 5px;155 - border-bottom-left-radius: 5px;115 + border-bottom-right-radius: 3px; 116 + border-bottom-left-radius: 3px; 156 156 } 157 157 158 158 .admin-menu .panel.noitems > .panel-heading {