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:
parent
3dcd1766aa
commit
e9f896d6a5
9 changed files with 27 additions and 23 deletions
|
|
@ -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' )
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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' => [
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ div#column-one,
|
|||
#footer-places,
|
||||
.mw-hidden-catlinks,
|
||||
.usermessage,
|
||||
.patrollink,
|
||||
.ns-0 .mw-redirectedfrom,
|
||||
div.magnify,
|
||||
#mw-navigation,
|
||||
|
|
|
|||
|
|
@ -289,11 +289,6 @@ table.small {
|
|||
font-style: italic;
|
||||
}
|
||||
|
||||
span.unpatrolled {
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
div.gallerybox {
|
||||
width: 150px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
13
resources/src/mediawiki/page/mediawiki.page.patrol.css
Normal file
13
resources/src/mediawiki/page/mediawiki.page.patrol.css
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.not-patrolled {
|
||||
background-color: #ffa;
|
||||
}
|
||||
|
||||
.unpatrolled {
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.patrollink {
|
||||
font-size: 75%;
|
||||
text-align: right;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
.patrollink {
|
||||
display: none;
|
||||
}
|
||||
Loading…
Reference in a new issue