Changes for page Administration

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

From version 7.1
edited by Leon Poon
on 2023/05/16 13:31
Change comment: Install extension [org.xwiki.platform:xwiki-platform-administration-ui/14.10.10]
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

XWiki.JavaScriptExtension[0]
Code
... ... @@ -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;
29 + 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;
53 + var hasVisibleCategories = panelGroup.find('a.panel-heading').filter(':visible').size() > 0;
54 54   panelGroup.find('.noitems').toggleClass('hidden', hasVisibleCategories);
55 55   };
56 56  
... ... @@ -61,7 +61,7 @@
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);
64 + timeoutId = setTimeout($.proxy(filterPanelGroup, panelGroup, text), 500);
65 65  
66 66   // Finally, enable the search input.
67 67   }).prop('disabled', false);