Drop MonoBook responsive preference
This was moved to a core preference as part of T285402 The migration was handled by a #user-notice Bug: T285402 Change-Id: I25fe3d32ad929924034db06b5a95bab6a3a3a727
This commit is contained in:
parent
2c01b1fa8c
commit
9b4186d863
5 changed files with 4 additions and 32 deletions
|
@ -13,6 +13,5 @@
|
||||||
"monobook-more-actions": "More",
|
"monobook-more-actions": "More",
|
||||||
"monobook-cactions-label": "Page actions",
|
"monobook-cactions-label": "Page actions",
|
||||||
"monobook-notifications-link": "Notifications ($1)",
|
"monobook-notifications-link": "Notifications ($1)",
|
||||||
"monobook-notifications-link-none": "Notifications",
|
"monobook-notifications-link-none": "Notifications"
|
||||||
"monobook-responsive-label": "Enable responsive MonoBook design"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,5 @@
|
||||||
"monobook-more-actions": "Label for the less-important or rarer actions that are hidden from the usual tabs on mobile interfaces (like moving the page, or for sysops deleting or protecting the page). {{Identical|More}}",
|
"monobook-more-actions": "Label for the less-important or rarer actions that are hidden from the usual tabs on mobile interfaces (like moving the page, or for sysops deleting or protecting the page). {{Identical|More}}",
|
||||||
"monobook-cactions-label": "Header for the content actions menu (tabs on the top of the page)",
|
"monobook-cactions-label": "Header for the content actions menu (tabs on the top of the page)",
|
||||||
"monobook-notifications-link": "Label for Extension:Notifications link in mobile personal toolbar\n\nParameters:\n* $1 - number of current alerts/notifications",
|
"monobook-notifications-link": "Label for Extension:Notifications link in mobile personal toolbar\n\nParameters:\n* $1 - number of current alerts/notifications",
|
||||||
"monobook-notifications-link-none": "Label for Extension:Notifications link in mobile personal toolbar when no notifications present\n{{Identical|Notification}}",
|
"monobook-notifications-link-none": "Label for Extension:Notifications link in mobile personal toolbar when no notifications present\n{{Identical|Notification}}"
|
||||||
"monobook-responsive-label": "Label for preference checkbox"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ namespace MonoBook;
|
||||||
|
|
||||||
use OutputPage;
|
use OutputPage;
|
||||||
use Skin;
|
use Skin;
|
||||||
use User;
|
|
||||||
|
|
||||||
class Hooks {
|
class Hooks {
|
||||||
/**
|
/**
|
||||||
|
@ -49,19 +48,4 @@ class Hooks {
|
||||||
$bodyAttrs['class'] .= ' monobook-capitalize-all-nouns';
|
$bodyAttrs['class'] .= ' monobook-capitalize-all-nouns';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param User $user
|
|
||||||
* @param array &$preferences
|
|
||||||
*/
|
|
||||||
public static function onGetPreferences( User $user, array &$preferences ) {
|
|
||||||
$preferences['monobook-responsive'] = [
|
|
||||||
'type' => 'toggle',
|
|
||||||
'label-message' => 'monobook-responsive-label',
|
|
||||||
'section' => 'rendering/skin/skin-prefs',
|
|
||||||
// Only show this section when the Monobook skin is checked. The JavaScript client also uses
|
|
||||||
// this state to determine whether to show or hide the whole section.
|
|
||||||
'hide-if' => [ '!==', 'wpskin', 'monobook' ],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,13 +34,6 @@ use SkinTemplate;
|
||||||
* @ingroup Skins
|
* @ingroup Skins
|
||||||
*/
|
*/
|
||||||
class SkinMonoBook extends SkinTemplate {
|
class SkinMonoBook extends SkinTemplate {
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function isResponsive() {
|
|
||||||
return parent::isResponsive() || $this->getUser()->getOption( 'monobook-responsive' );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
"args": [
|
"args": [
|
||||||
{
|
{
|
||||||
"name": "monobook",
|
"name": "monobook",
|
||||||
|
"responsive": true,
|
||||||
"template": "MonoBook\\MonoBookTemplate"
|
"template": "MonoBook\\MonoBookTemplate"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -27,15 +28,11 @@
|
||||||
"SkinOOUIThemes": {
|
"SkinOOUIThemes": {
|
||||||
"monobook": "Apex"
|
"monobook": "Apex"
|
||||||
},
|
},
|
||||||
"DefaultUserOptions": {
|
|
||||||
"monobook-responsive": true
|
|
||||||
},
|
|
||||||
"SkinLessImportPaths": {
|
"SkinLessImportPaths": {
|
||||||
"monobook": "resources/mediawiki.less"
|
"monobook": "resources/mediawiki.less"
|
||||||
},
|
},
|
||||||
"Hooks": {
|
"Hooks": {
|
||||||
"OutputPageBodyAttributes": "MonoBook\\Hooks::onOutputPageBodyAttributes",
|
"OutputPageBodyAttributes": "MonoBook\\Hooks::onOutputPageBodyAttributes"
|
||||||
"GetPreferences": "MonoBook\\Hooks::onGetPreferences"
|
|
||||||
},
|
},
|
||||||
"MessagesDirs": {
|
"MessagesDirs": {
|
||||||
"MonoBook": [
|
"MonoBook": [
|
||||||
|
|
Loading…
Reference in a new issue