Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F6352
CatLinks.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:55 PM
2014-11-21 22:55:40 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
CatLinks.patch
View Options
Index: includes/Skin.php
===================================================================
--- includes/Skin.php (revision 114548)
+++ includes/Skin.php (working copy)
@@ -441,11 +441,12 @@
} else {
$class = ' mw-hidden-cats-hidden';
}
-
+ $s.='<a id="mw-toggle-cat" href="javascript:void(0)"><i>Show hidden categories</i></a>';
$s .= "<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
$this->msg( 'hidden-categories', count( $allCats['hidden'] ) )->escaped() .
$colon . '<ul>' . $embed . implode( "{$pop}{$embed}" , $allCats['hidden'] ) . $pop . '</ul>' .
'</div>';
+
}
# optional 'dmoz-like' category browser. Will be shown under the list
Index: resources/mediawiki.page/mediawiki.page.ready.js
===================================================================
--- resources/mediawiki.page/mediawiki.page.ready.js (revision 114548)
+++ resources/mediawiki.page/mediawiki.page.ready.js (working copy)
@@ -17,7 +17,17 @@
/* Enable CheckboxShiftClick */
$( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick();
-
+ var toggleCatBool = true;
+ $("#mw-toggle-cat").click(function(event){
+ $("#mw-hidden-catlinks").toggle();
+ var text='';
+ if(toggleCatBool)
+ text='Hide Hidden Category Links';
+ else
+ text='Show Hidden Category Links';
+ document.getElementById("mw-toggle-cat").innerHTML='<i>'+text+'</i>';
+ toggleCatBool=!toggleCatBool;
+ });
/* Add accesskey hints to the tooltips */
mw.util.updateTooltipAccessKeys();
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5896
Default Alt Text
CatLinks.patch (1 KB)
Attached To
Mode
T23119: A button on the page to toggle hidden categories
Attached
Detach File
Event Timeline
Log In to Comment