Move CSS for patrol from mediawiki.legacy to new module mediawiki.page.patrol

Also change the selector from
	div.patrollink
to
	.patrollink

Bug: T89981
Change-Id: Ib79d17fab61b1a7b940b2acff6d19a58a3fe0bc9
This commit is contained in:
Fomafix 2016-08-06 13:46:47 +00:00 committed by [[mw:User:Fomafix]]
parent 3dcd1766aa
commit e9f896d6a5
9 changed files with 27 additions and 23 deletions

View file

@ -533,6 +533,7 @@ class DifferenceEngine extends ContextSource {
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
$this->getOutput()->addModuleStyles( 'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI
&& $user->isAllowed( 'writeapi' )
) {

View file

@ -1196,6 +1196,7 @@ class Article implements Page {
$token = $user->getEditToken( $rcid );
$outputPage->preventClickjacking();
$outputPage->addModuleStyles( 'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 'writeapi' ) ) {
$outputPage->addModules( 'mediawiki.page.patrol.ajax' );
}

View file

@ -349,6 +349,7 @@ class SpecialNewpages extends IncludableSpecialPage {
if ( $this->patrollable( $result ) ) {
$classes[] = 'not-patrolled';
$this->getOutput()->addModuleStyles( 'mediawiki.page.patrol' );
}
# Add a class for zero byte pages

View file

@ -1706,6 +1706,14 @@ return [
'position' => 'top',
'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.page.patrol' => [
'position' => 'top',
'styles' => [
'resources/src/mediawiki/page/mediawiki.page.patrol.css',
'resources/src/mediawiki/page/mediawiki.page.patrol.print.css'
=> [ 'media' => 'print' ],
]
],
'mediawiki.page.patrol.ajax' => [
'scripts' => 'resources/src/mediawiki/page/patrol.ajax.js',
'dependencies' => [

View file

@ -19,7 +19,6 @@ div#column-one,
#footer-places,
.mw-hidden-catlinks,
.usermessage,
.patrollink,
.ns-0 .mw-redirectedfrom,
div.magnify,
#mw-navigation,

View file

@ -289,11 +289,6 @@ table.small {
font-style: italic;
}
span.unpatrolled {
font-weight: bold;
color: #f00;
}
div.gallerybox {
width: 150px;
}

View file

@ -123,23 +123,6 @@ span.history-deleted {
font-style: italic;
}
/**
* Patrol stuff
*/
.not-patrolled {
background-color: #ffa;
}
.unpatrolled {
font-weight: bold;
color: #f00;
}
div.patrollink {
font-size: 75%;
text-align: right;
}
/**
* Forms
*/

View file

@ -0,0 +1,13 @@
.not-patrolled {
background-color: #ffa;
}
.unpatrolled {
font-weight: bold;
color: #f00;
}
.patrollink {
font-size: 75%;
text-align: right;
}

View file

@ -0,0 +1,3 @@
.patrollink {
display: none;
}