* Title::moveNoAuth() (deprecated in 1.25) was removed. Use MovePage class instead.
* Hook UnknownAction (deprecated in 1.19) was actually deprecated (it will now emit warnings).
Create a subclass of Action, and add it to $wgActions instead.
+* WikiRevision:getText() (deprecated since 1.21) is no longer marked deprecated.
== Compatibility ==
"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
- "oojs/oojs-ui": "0.18.2",
+ "oojs/oojs-ui": "0.18.3",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
throw new MWException( 'Invalid callback ' . $func . ' in hooks for ' . $event . "\n" );
}
- /*
- * Call the hook. The documentation of call_user_func_array says
- * false is returned on failure. However, if the function signature
- * does not match the call signature, PHP will issue an warning and
- * return null instead. The following code catches that warning and
- * provides better error message.
- */
- $retval = null;
- $badhookmsg = null;
- $hook_args = array_merge( $hook, $args );
-
// mark hook as deprecated, if deprecation version is specified
if ( $deprecatedVersion !== null ) {
wfDeprecated( "$event hook (used in $func)", $deprecatedVersion );
}
+ // Call the hook.
+ $hook_args = array_merge( $hook, $args );
$retval = call_user_func_array( $callback, $hook_args );
// Process the return value.
class ApiClearHasMsg extends ApiBase {
public function execute() {
$user = $this->getUser();
- if ( $this->getRequest()->wasPosted() ) {
- $user->setNewtalk( false );
- } else {
- DeferredUpdates::addCallableUpdate( function () use ( $user ) {
- $user->setNewtalk( false );
- } );
- }
+ $user->setNewtalk( false );
$this->getResult()->addValue( null, $this->getModuleName(), 'success' );
}
* @return StatusValue
*/
protected function handleStashException( $e ) {
- switch ( get_class( $exception ) ) {
+ switch ( get_class( $e ) ) {
case 'UploadStashFileNotFoundException':
$wrap = 'apierror-stashedfilenotfound';
break;
* @see https://www.percona.com/doc/percona-toolkit/2.1/pt-heartbeat.html
*/
protected function getHeartbeatData( array $conds ) {
- $whereSQL = $this->makeList( $conds, self::LIST_AND );
- // Use ORDER BY for channel based queries since that field might not be UNIQUE.
- // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the
- // percision field is not supported in MySQL <= 5.5.
- $res = $this->query(
- "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1"
- );
- $row = $res ? $res->fetchObject() : false;
+ // Do not bother starting implicit transactions here
+ $this->clearFlag( self::DBO_TRX, self::REMEMBER_PRIOR );
+ try {
+ $whereSQL = $this->makeList( $conds, self::LIST_AND );
+ // Use ORDER BY for channel based queries since that field might not be UNIQUE.
+ // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the
+ // percision field is not supported in MySQL <= 5.5.
+ $res = $this->query(
+ "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1"
+ );
+ $row = $res ? $res->fetchObject() : false;
+ } finally {
+ $this->restoreFlags();
+ }
return [ $row ? $row->ts : null, microtime( true ) ];
}
$host = $this->getServerName( $i );
if ( $lag === false && !is_infinite( $maxServerLag ) ) {
- $this->replLogger->error( "Server $host (#$i) is not replicating?" );
+ $this->replLogger->error(
+ "Server {host} (#$i) is not replicating?", [ 'host' => $host ] );
unset( $loads[$i] );
} elseif ( $lag > $maxServerLag ) {
- $this->replLogger->warning( "Server $host (#$i) has >= $lag seconds of lag" );
+ $this->replLogger->warning(
+ "Server {host} (#$i) has {lag} seconds of lag (>= {maxlag})",
+ [ 'host' => $host, 'lag' => $lag, 'maxlag' => $maxServerLag ]
+ );
unset( $loads[$i] );
}
}
if ( $result == -1 || is_null( $result ) ) {
// Timed out waiting for replica DB, use master instead
- $msg = __METHOD__ . ": Timed out waiting on $server pos {$this->mWaitForPos}";
- $this->replLogger->warning( "$msg" );
+ $this->replLogger->warning(
+ __METHOD__ . ": Timed out waiting on {host} pos {$this->mWaitForPos}",
+ [ 'host' => $server ]
+ );
$ok = false;
} else {
$this->replLogger->info( __METHOD__ . ": Done" );
$searchBase = "[{<\n"; # }
if ( !$wgDisableLangConversion ) {
- $searchBase .= '-';
+ // FIXME: disabled due to T153761
+ // $searchBase .= '-';
}
// For fast reverse searches
$searchBase = "[{<\n";
if ( !$wgDisableLangConversion ) {
- $searchBase .= '-';
+ // FIXME: disabled due to T153761
+ // $searchBase .= '-';
}
// For fast reverse searches
"apisandbox-sending-request": "Sending API request...",
"apisandbox-loading-results": "Receiving API results...",
"apisandbox-results-error": "An error occurred while loading the API query response: $1.",
+ "apisandbox-request-params-json": "JSON parameters:",
"apisandbox-request-url-label": "Request URL:",
"apisandbox-request-time": "Request time: {{PLURAL:$1|$1 ms}}",
"apisandbox-results-fixtoken": "Correct token and resubmit",
"apisandbox-sending-request": "JavaScript message displayed while the request is being sent.",
"apisandbox-loading-results": "JavaScript message displayed while the response is being read.",
"apisandbox-results-error": "Displayed as an error message from JavaScript when the request failed.\n\nParameters:\n* $1 - Error message",
+ "apisandbox-request-params-json": "Label for text field display the request parameters as JSON.",
"apisandbox-request-url-label": "Label for the text field displaying the URL used to make this request.",
"apisandbox-request-time": "Label and value for displaying the time taken by the request.\n\nParameters:\n* $1 - Time taken in milliseconds",
"apisandbox-results-fixtoken": "JavaScript button label",
*/
private $source;
- /**
- * @var BagOStuff
- */
- private $cache;
-
public function __construct() {
parent::__construct();
$force = $this->getOption( 'force', false );
$this->source = $this->getOption( 'source', 'https://en.wikipedia.org/w/api.php' );
- $this->cache = wfGetMainCache();
-
$data = $this->fetchLinks();
if ( $data === false ) {
);
}
- $this->clearCacheEntry( $prefix );
+ Interwiki::invalidateCache( $prefix );
}
$this->output( "Interwiki links are populated.\n" );
return true;
}
- /**
- * @param string $prefix
- */
- private function clearCacheEntry( $prefix ) {
- $key = wfMemcKey( 'interwiki', $prefix );
- $this->cache->delete( $key );
- }
-
}
$maintClass = PopulateInterwiki::class;
'apisandbox-sending-request',
'apisandbox-loading-results',
'apisandbox-results-error',
+ 'apisandbox-request-params-json',
'apisandbox-request-url-label',
'apisandbox-request-time',
'apisandbox-results-fixtoken',
"authors": [
"Чаховіч Уладзіслаў",
"Artificial123",
- "Goshaproject"
+ "Goshaproject",
+ "Mechanizatar"
]
},
"ooui-outline-control-move-down": "Перамясціць элемент ўніз",
"ooui-dialog-process-dismiss": "Прапусціць",
"ooui-dialog-process-retry": "Паспрабаваць яшчэ раз",
"ooui-dialog-process-continue": "Працягнуць",
+ "ooui-selectfile-button-select": "Выбраць файл",
"ooui-selectfile-not-supported": "Выбраны файл не падтрымліваецца",
"ooui-selectfile-placeholder": "Файл не выбраны"
}
--- /dev/null
+{
+ "@metadata": {
+ "authors": [
+ "Thakurji"
+ ]
+ },
+ "ooui-outline-control-move-down": "Item ke niche karo",
+ "ooui-outline-control-move-up": "Item ke uppar karo",
+ "ooui-outline-control-remove": "Item ke hatao",
+ "ooui-toolbar-more": "Aur",
+ "ooui-toolgroup-expand": "Aur",
+ "ooui-toolgroup-collapse": "Kamtii",
+ "ooui-dialog-message-accept": "OK",
+ "ooui-dialog-message-reject": "Cancel karo",
+ "ooui-dialog-process-error": "Koi chij wrong hoe gais",
+ "ooui-dialog-process-dismiss": "Dismiss karo",
+ "ooui-dialog-process-retry": "Fir se try karo",
+ "ooui-dialog-process-continue": "Continue",
+ "ooui-selectfile-button-select": "Ek file ke select karo",
+ "ooui-selectfile-not-supported": "File selection ke support nai karaa jaawe hai",
+ "ooui-selectfile-placeholder": "Koi file ke nai select karaa gais hai",
+ "ooui-selectfile-dragdrop-placeholder": "Hian pe file ke girao"
+}
"Sayginer",
"Meelo",
"McAang",
- "Uğurkent"
+ "Uğurkent",
+ "1917 Ekim Devrimi"
]
},
"ooui-outline-control-move-down": "Ögeyi aşağı taşı",
"ooui-dialog-process-continue": "Devam et",
"ooui-selectfile-button-select": "Dosya seç",
"ooui-selectfile-not-supported": "Dosya seçimi desteklenmiyor",
- "ooui-selectfile-placeholder": "Herhangi bir dosya seçilmedi"
+ "ooui-selectfile-placeholder": "Herhangi bir dosya seçilmedi",
+ "ooui-selectfile-dragdrop-placeholder": "Dosyayı buraya aç"
}
"ooui-dialog-process-retry": "Кабатлау",
"ooui-dialog-process-continue": "Дәвам итү",
"ooui-selectfile-button-select": "Файлны сайлагыз",
- "ooui-selectfile-placeholder": "Файл сайланмаган"
+ "ooui-selectfile-not-supported": "Файл сайлау хупланмый",
+ "ooui-selectfile-placeholder": "Файл сайланмаган",
+ "ooui-selectfile-dragdrop-placeholder": "Файлны монда куегыз"
}
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:53Z
+ * Date: 2017-01-04T00:22:40Z
*/
( function ( OO ) {
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-element-hidden {
display: none !important;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
-.oo-ui-floatableElement-hidden {
- display: none;
-}
.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-iconElement.oo-ui-iconElement-icon {
background-size: contain;
white-space: normal;
float: left;
}
+.oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label:empty {
+ display: none;
+}
.oo-ui-fieldsetLayout-group {
clear: both;
}
}
.oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help .oo-ui-fieldsetLayout-help-content {
padding: 0.5em 0.75em;
- line-height: 1.5;
+ line-height: 1.4;
}
.oo-ui-fieldsetLayout + .oo-ui-fieldsetLayout,
.oo-ui-fieldsetLayout + .oo-ui-formLayout {
}
.oo-ui-panelLayout-scrollable {
overflow-y: auto;
+ /* Make scrolling smooth */
+ -webkit-transform: translate3d(0, 0, 0);
}
.oo-ui-panelLayout-expanded {
position: absolute;
position: relative;
}
.oo-ui-popupButtonWidget .oo-ui-popupWidget {
- position: absolute;
cursor: auto;
}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
.oo-ui-progressBarWidget-bar {
height: 1em;
border-right: 1px solid #ccc;
- -webkit-transition: width 250ms ease, margin-left 250ms ease;
- -moz-transition: width 250ms ease, margin-left 250ms ease;
- transition: width 250ms ease, margin-left 250ms ease;
+ -webkit-transition: width 250ms ease;
+ -moz-transition: width 250ms ease;
+ transition: width 250ms ease;
background-color: #cde7f4;
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0, #eaf4fa), color-stop(100%, #b0d9ee));
background-image: -webkit-linear-gradient(top, #eaf4fa 0, #b0d9ee 100%);
-moz-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
animation: oo-ui-progressBarWidget-slide 2s infinite linear;
width: 40%;
- margin-left: -10%;
+ -webkit-transform: translate(-25%);
+ -moz-transform: translate(-25%);
+ -ms-transform: translate(-25%);
+ transform: translate(-25%);
border-left: 1px solid #a6cee1;
}
.oo-ui-progressBarWidget.oo-ui-widget-disabled {
}
@-webkit-keyframes oo-ui-progressBarWidget-slide {
from {
- margin-left: -40%;
+ -webkit-transform: translate(-100%);
+ -moz-transform: translate(-100%);
+ -ms-transform: translate(-100%);
+ transform: translate(-100%);
}
to {
- margin-left: 100%;
+ -webkit-transform: translate(350%);
+ -moz-transform: translate(350%);
+ -ms-transform: translate(350%);
+ transform: translate(350%);
}
}
@-moz-keyframes oo-ui-progressBarWidget-slide {
from {
- margin-left: -40%;
+ -webkit-transform: translate(-100%);
+ -moz-transform: translate(-100%);
+ -ms-transform: translate(-100%);
+ transform: translate(-100%);
}
to {
- margin-left: 100%;
+ -webkit-transform: translate(350%);
+ -moz-transform: translate(350%);
+ -ms-transform: translate(350%);
+ transform: translate(350%);
}
}
@keyframes oo-ui-progressBarWidget-slide {
from {
- margin-left: -40%;
+ -webkit-transform: translate(-100%);
+ -moz-transform: translate(-100%);
+ -ms-transform: translate(-100%);
+ transform: translate(-100%);
}
to {
- margin-left: 100%;
+ -webkit-transform: translate(350%);
+ -moz-transform: translate(350%);
+ -ms-transform: translate(350%);
+ transform: translate(350%);
}
}
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-element-hidden {
display: none !important;
color: #000;
box-shadow: none;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button {
color: #36c;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:hover {
color: #447ff5;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:active:focus > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:active,
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:active:focus,
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
color: #2a4b8d;
box-shadow: none;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button {
color: #36c;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover {
color: #447ff5;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:active:focus > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:active,
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:active:focus,
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
color: #2a4b8d;
box-shadow: none;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button {
color: #d33;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover {
color: #ff4242;
}
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active:focus > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active,
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active:focus,
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
color: #b32424;
box-shadow: none;
}
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:hover {
background-color: #fff;
- border-color: #859dcc;
+ border-color: #447ff5;
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:active,
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button:active:focus,
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:hover {
background-color: #fff;
- border-color: #859dcc;
+ border-color: #447ff5;
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:active,
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-constructive > .oo-ui-buttonElement-button:active:focus,
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover {
background-color: #fff;
- border-color: #b77c79;
+ border-color: #ff4242;
}
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active,
.oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active:focus,
-moz-box-sizing: border-box;
box-sizing: border-box;
}
-.oo-ui-floatableElement-hidden {
- display: none;
-}
.oo-ui-iconElement .oo-ui-iconElement-icon,
.oo-ui-iconElement.oo-ui-iconElement-icon {
background-size: contain;
}
.oo-ui-fieldLayout.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
padding-bottom: 0.3125em;
+ line-height: 1.4;
}
.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
padding: 0.3125em 0.46875em;
.oo-ui-fieldLayout-messages .oo-ui-labelWidget {
display: table-cell;
padding: 0.1em 0 0.1em 0.3125em;
- line-height: 1.5;
+ line-height: 1.4;
vertical-align: middle;
}
.oo-ui-actionFieldLayout {
white-space: normal;
float: left;
}
+.oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label:empty {
+ display: none;
+}
.oo-ui-fieldsetLayout-group {
clear: both;
}
}
.oo-ui-fieldsetLayout > .oo-ui-fieldsetLayout-help .oo-ui-fieldsetLayout-help-content {
padding: 0.5em 0.75em;
- line-height: 1.5;
+ line-height: 1.4;
}
.oo-ui-fieldsetLayout + .oo-ui-fieldsetLayout,
.oo-ui-fieldsetLayout + .oo-ui-formLayout {
margin-bottom: 0.56818em;
font-size: 1.1em;
font-weight: bold;
+ line-height: 1.4;
}
.oo-ui-fieldsetLayout.oo-ui-iconElement > .oo-ui-labelElement-label {
padding-left: 2em;
}
.oo-ui-panelLayout-scrollable {
overflow-y: auto;
+ /* Make scrolling smooth */
+ -webkit-transform: translate3d(0, 0, 0);
}
.oo-ui-panelLayout-expanded {
position: absolute;
overflow: hidden;
}
.oo-ui-optionWidget .oo-ui-labelElement-label {
- line-height: 1.5;
+ line-height: 1.6;
}
.oo-ui-optionWidget-selected .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
opacity: 1;
position: relative;
}
.oo-ui-popupButtonWidget .oo-ui-popupWidget {
- position: absolute;
cursor: auto;
}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
box-shadow: inset 0 0 0 1px #36c, inset 0 0 0 2px #fff;
}
.oo-ui-checkboxMultiselectInputWidget .oo-ui-fieldLayout {
- margin-bottom: 0;
+ margin-top: 0;
}
.oo-ui-checkboxMultiselectInputWidget .oo-ui-fieldLayout .oo-ui-fieldLayout-body {
padding: 0.25em 0;
left: -3px;
}
.oo-ui-radioSelectInputWidget .oo-ui-fieldLayout {
- margin-bottom: 0;
+ margin-top: 0;
}
.oo-ui-radioSelectInputWidget .oo-ui-fieldLayout .oo-ui-fieldLayout-body {
padding: 0.25em 0;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled input,
.oo-ui-textInputWidget.oo-ui-widget-enabled textarea {
- box-shadow: inset 0 0 0 0.1em #fff;
+ box-shadow: inset 0 0 0 1px #fff;
-webkit-transition: border-color 200ms cubic-bezier(0.39, 0.575, 0.565, 1), box-shadow 200ms cubic-bezier(0.39, 0.575, 0.565, 1);
-moz-transition: border-color 200ms cubic-bezier(0.39, 0.575, 0.565, 1), box-shadow 200ms cubic-bezier(0.39, 0.575, 0.565, 1);
transition: border-color 200ms cubic-bezier(0.39, 0.575, 0.565, 1), box-shadow 200ms cubic-bezier(0.39, 0.575, 0.565, 1);
}
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid input,
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid textarea {
- border-color: #f00;
+ border-color: #d33;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid input:hover,
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid textarea:hover {
- border-color: #f00;
+ border-color: #d33;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid input:focus,
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid textarea:focus {
- border-color: #f00;
- box-shadow: inset 0 0 0 0.1em #f00;
+ border-color: #d33;
+ box-shadow: inset 0 0 0 1px #d33;
}
.oo-ui-textInputWidget.oo-ui-iconElement input,
.oo-ui-textInputWidget.oo-ui-iconElement textarea {
text-overflow: ellipsis;
overflow: hidden;
}
-.oo-ui-multioptionWidget .oo-ui-labelElement-label {
- line-height: 1.5;
-}
.oo-ui-multioptionWidget.oo-ui-widget-disabled {
color: #72777d;
}
.oo-ui-progressBarWidget-bar {
background-color: #36c;
height: 1em;
- -webkit-transition: width 200ms, margin-left 200ms;
- -moz-transition: width 200ms, margin-left 200ms;
- transition: width 200ms, margin-left 200ms;
+ -webkit-transition: width 200ms;
+ -moz-transition: width 200ms;
+ transition: width 200ms;
}
.oo-ui-progressBarWidget-indeterminate .oo-ui-progressBarWidget-bar {
-webkit-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
-moz-animation: oo-ui-progressBarWidget-slide 2s infinite linear;
animation: oo-ui-progressBarWidget-slide 2s infinite linear;
width: 40%;
- margin-left: -10%;
+ -webkit-transform: translate(-25%);
+ -moz-transform: translate(-25%);
+ -ms-transform: translate(-25%);
+ transform: translate(-25%);
border-left-width: 1px;
}
.oo-ui-progressBarWidget.oo-ui-widget-disabled {
}
@-webkit-keyframes oo-ui-progressBarWidget-slide {
from {
- margin-left: -40%;
+ -webkit-transform: translate(-100%);
+ -moz-transform: translate(-100%);
+ -ms-transform: translate(-100%);
+ transform: translate(-100%);
}
to {
- margin-left: 100%;
+ -webkit-transform: translate(350%);
+ -moz-transform: translate(350%);
+ -ms-transform: translate(350%);
+ transform: translate(350%);
}
}
@-moz-keyframes oo-ui-progressBarWidget-slide {
from {
- margin-left: -40%;
+ -webkit-transform: translate(-100%);
+ -moz-transform: translate(-100%);
+ -ms-transform: translate(-100%);
+ transform: translate(-100%);
}
to {
- margin-left: 100%;
+ -webkit-transform: translate(350%);
+ -moz-transform: translate(350%);
+ -ms-transform: translate(350%);
+ transform: translate(350%);
}
}
@keyframes oo-ui-progressBarWidget-slide {
from {
- margin-left: -40%;
+ -webkit-transform: translate(-100%);
+ -moz-transform: translate(-100%);
+ -ms-transform: translate(-100%);
+ transform: translate(-100%);
}
to {
- margin-left: 100%;
+ -webkit-transform: translate(350%);
+ -moz-transform: translate(350%);
+ -ms-transform: translate(350%);
+ transform: translate(350%);
}
}
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:53Z
+ * Date: 2017-01-04T00:22:40Z
*/
( function ( OO ) {
return false;
};
+/**
+ * Check if the user has a 'mobile' device.
+ *
+ * For our purposes this means the user is primarily using an
+ * on-screen keyboard, touch input instead of a mouse and may
+ * have a physically small display.
+ *
+ * It is left up to implementors to decide how to compute this
+ * so the default implementation always returns false.
+ *
+ * @return {boolean} Use is on a mobile device
+ */
+OO.ui.isMobile = function () {
+ return false;
+};
+
/*!
* Mixin namespace.
*/
* @return {jQuery.Promise} Promise which resolves when the scroll is complete
*/
OO.ui.Element.prototype.scrollElementIntoView = function ( config ) {
+ if (
+ !this.isElementAttached() ||
+ !this.isVisible() ||
+ ( this.getElementGroup() && !this.getElementGroup().isVisible() )
+ ) {
+ return $.Deferred().resolve();
+ }
return OO.ui.Element.static.scrollIntoView( this.$element[ 0 ], config );
};
extraHeight = $container.outerHeight() - this.$clippable.outerHeight();
extraWidth = $container.outerWidth() - this.$clippable.outerWidth();
ccOffset = $container.offset();
- $scrollableContainer = this.$clippableScrollableContainer.is( 'html, body' ) ?
- this.$clippableWindow : this.$clippableScrollableContainer;
- scOffset = $scrollableContainer.offset() || { top: 0, left: 0 };
+ if ( this.$clippableScrollableContainer.is( 'html, body' ) ) {
+ $scrollableContainer = this.$clippableWindow;
+ scOffset = { top: 0, left: 0 };
+ } else {
+ $scrollableContainer = this.$clippableScrollableContainer;
+ scOffset = $scrollableContainer.offset();
+ }
scHeight = $scrollableContainer.innerHeight() - buffer;
scWidth = $scrollableContainer.innerWidth() - buffer;
ccWidth = $container.outerWidth() + buffer;
}
if ( !this.isElementInViewport( this.$floatableContainer, this.$floatableClosestScrollable ) ) {
- this.$floatable.addClass( 'oo-ui-floatableElement-hidden' );
+ this.$floatable.addClass( 'oo-ui-element-hidden' );
return;
} else {
- this.$floatable.removeClass( 'oo-ui-floatableElement-hidden' );
+ this.$floatable.removeClass( 'oo-ui-element-hidden' );
}
if ( !this.needsCustomPosition ) {
blur: this.onBlur.bind( this ),
focus: this.onFocus.bind( this )
} );
- this.$input.one( {
- focus: this.onElementAttach.bind( this )
- } );
this.$icon.on( 'mousedown', this.onIconMouseDown.bind( this ) );
this.$indicator.on( 'mousedown', this.onIndicatorMouseDown.bind( this ) );
this.on( 'labelChange', this.updatePosition.bind( this ) );
this.$input.attr( 'rows', config.rows );
}
if ( this.label || config.autosize ) {
+ this.isWaitingToBeAttached = true;
this.installParentChangeDetector();
}
};
* @param {jQuery.Event} e Focus event
*/
OO.ui.TextInputWidget.prototype.onFocus = function () {
+ if ( this.isWaitingToBeAttached ) {
+ // If we've received focus, then we must be attached to the document, and if
+ // isWaitingToBeAttached is still true, that means the handler never fired. Fire it now.
+ this.onElementAttach();
+ }
this.setValidityFlag( true );
};
* @param {jQuery.Event} e Element attach event
*/
OO.ui.TextInputWidget.prototype.onElementAttach = function () {
+ this.isWaitingToBeAttached = false;
// Any previously calculated size is now probably invalid if we reattached elsewhere
this.valCache = null;
this.adjustSize();
if ( MutationObserver ) {
// The new way. If only it wasn't so ugly.
- if ( this.$element.closest( 'html' ).length ) {
+ if ( this.isElementAttached() ) {
// Widget is attached already, do nothing. This breaks the functionality of this function when
// the widget is detached and reattached. Alas, doing this correctly with MutationObserver
// would require observation of the whole document, which would hurt performance of other,
onRemove = function () {
// If the node was attached somewhere else, report it
- if ( widget.$element.closest( 'html' ).length ) {
+ if ( widget.isElementAttached() ) {
widget.onElementAttach();
}
mutationObserver.disconnect();
var scrollHeight, innerHeight, outerHeight, maxInnerHeight, measurementError,
idealHeight, newHeight, scrollWidth, property;
+ if ( this.isWaitingToBeAttached ) {
+ // #onElementAttach will be called soon, which calls this method
+ return this;
+ }
+
if ( this.multiline && this.$input.val() !== this.valCache ) {
if ( this.autosize ) {
this.$clone
*/
OO.ui.TextInputWidget.prototype.positionLabel = function () {
var after, rtl, property;
+
+ if ( this.isWaitingToBeAttached ) {
+ // #onElementAttach will be called soon, which calls this method
+ return this;
+ }
+
// Clear old values
this.$input
// Clear old values if present
autocomplete: false
}, config );
+ // ComboBoxInputWidget shouldn't support multiline
+ config.multiline = false;
+
// Parent constructor
OO.ui.ComboBoxInputWidget.parent.call( this, config );
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:53Z
+ * Date: 2017-01-04T00:22:40Z
*/
( function ( OO ) {
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
.oo-ui-toolGroup.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-title {
color: #000;
}
-.oo-ui-barToolGroup > .oo-ui-iconElement-icon,
-.oo-ui-barToolGroup > .oo-ui-labelElement-label {
- display: none;
-}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool {
display: inline-block;
position: relative;
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-tool.oo-ui-widget-enabled {
-webkit-transition: background-color 100ms;
.oo-ui-toolbar-narrow .oo-ui-toolGroup + .oo-ui-toolGroup {
margin-left: 0;
}
-.oo-ui-barToolGroup > .oo-ui-iconElement-icon,
-.oo-ui-barToolGroup > .oo-ui-labelElement-label {
- display: none;
-}
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool {
display: inline-block;
position: relative;
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:53Z
+ * Date: 2017-01-04T00:22:40Z
*/
( function ( OO ) {
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-draggableElement-handle,
.oo-ui-draggableElement-handle.oo-ui-widget {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
- -webkit-transform: translateZ(0);
- -moz-transform: translateZ(0);
- -ms-transform: translateZ(0);
- transform: translateZ(0);
+ -webkit-transform: translate3d(0, 0, 0);
height: 2em;
width: 4em;
border-radius: 1em;
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-draggableElement-handle,
.oo-ui-draggableElement-handle.oo-ui-widget {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
- -webkit-transform: translateZ(0);
- -moz-transform: translateZ(0);
- -ms-transform: translateZ(0);
- transform: translateZ(0);
+ -webkit-transform: translate3d(0, 0, 0);
background-color: #f8f9fa;
width: 3.5em;
min-height: 26px;
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:53Z
+ * Date: 2017-01-04T00:22:40Z
*/
( function ( OO ) {
* @constructor
* @param {Object} [config] Configuration options
* @cfg {boolean} [continuous=false] Show all pages, one after another
- * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new page is displayed.
+ * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new page is displayed. Disabled on mobile.
* @cfg {boolean} [outlined=false] Show the outline. The outline is used to navigate through the pages of the booklet.
* @cfg {boolean} [editable=false] Show controls for adding, removing and reordering pages
*/
if ( !this.scrolling && page ) {
page.scrollElementIntoView( {
complete: function () {
- if ( layout.autoFocus ) {
+ if ( layout.autoFocus && !OO.ui.isMobile() ) {
layout.focus();
}
}
// meaningless because the next page is not visible yet and thus can't hold focus.
if (
this.autoFocus &&
+ !OO.ui.isMobile() &&
this.stackLayout.continuous &&
OO.ui.findFocusable( page.$element ).length !== 0
) {
* @param {Object} [config] Configuration options
* @cfg {boolean} [continuous=false] Show all cards, one after another
* @cfg {boolean} [expanded=true] Expand the content panel to fill the entire parent element.
- * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new card is displayed.
+ * @cfg {boolean} [autoFocus=true] Focus on the first focusable element when a new card is displayed. Disabled on mobile.
*/
OO.ui.IndexLayout = function OoUiIndexLayout( config ) {
// Configuration initialization
if ( card ) {
card.scrollElementIntoView( {
complete: function () {
- if ( layout.autoFocus ) {
+ if ( layout.autoFocus && !OO.ui.isMobile() ) {
layout.focus();
}
}
// meaningless because the next card is not visible yet and thus can't hold focus.
if (
this.autoFocus &&
+ !OO.ui.isMobile() &&
this.stackLayout.continuous &&
OO.ui.findFocusable( card.$element ).length !== 0
) {
return false;
}
- /* eslint-disable no-bitwise */
- if ( this.isInteger && ( n | 0 ) !== n ) {
+ if ( this.isInteger && Math.floor( n ) !== n ) {
return false;
}
- /* eslint-enable no-bitwise */
if ( n < this.min || n > this.max ) {
return false;
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:57Z
+ * Date: 2017-01-04T00:22:45Z
*/
.oo-ui-window {
background: transparent;
}
.oo-ui-messageDialog-message-verbose {
font-size: 1.1em;
- line-height: 1.5;
+ line-height: 1.4;
text-align: left;
}
.oo-ui-messageDialog-actions-horizontal .oo-ui-actionWidget {
text-align: left;
margin: 1em;
padding: 1em;
- border: 1px solid #ff9e9e;
+ border: 1px solid #d33;
background-color: #fff7f7;
border-radius: 2px;
}
/*!
- * OOjs UI v0.18.2
+ * OOjs UI v0.18.3
* https://www.mediawiki.org/wiki/OOjs_UI
*
- * Copyright 2011–2016 OOjs UI Team and other contributors.
+ * Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-12-06T23:32:53Z
+ * Date: 2017-01-04T00:22:40Z
*/
( function ( OO ) {
/**
* Get the 'hold' process.
*
- * The hold proccess is used to keep a window from being used in a particular context,
+ * The hold process is used to keep a window from being used in a particular context,
* based on the `data` argument. This method is called during the closing phase of the window’s
* lifecycle.
*
// Twiddle the overflow property, otherwise an unnecessary scrollbar will be produced.
// Need to do it after transition completes (250ms), add 50ms just in case.
setTimeout( function () {
- var oldOverflow = $scrollable[ 0 ].style.overflow;
+ var oldOverflow = $scrollable[ 0 ].style.overflow,
+ activeElement = document.activeElement;
+
$scrollable[ 0 ].style.overflow = 'hidden';
OO.ui.Element.static.reconsiderScrollbars( $scrollable[ 0 ] );
+ // Check reconsiderScrollbars didn't destroy our focus, as we
+ // are doing this after the ready process.
+ if ( activeElement && activeElement !== document.activeElement && activeElement.focus ) {
+ activeElement.focus();
+ }
+
$scrollable[ 0 ].style.overflow = oldOverflow;
}, 300 );
* @inheritdoc
*/
OO.ui.ProcessDialog.prototype.getActionWidgets = function ( actions ) {
- var i, len, widgets = [];
+ var i, len, config,
+ isMobile = OO.ui.isMobile(),
+ widgets = [];
+
for ( i = 0, len = actions.length; i < len; i++ ) {
+ config = $.extend( { framed: !OO.ui.isMobile() }, actions[ i ] );
+ if ( isMobile && ( config.flags === 'back' || config.flags.indexOf( 'back' ) !== -1 ) ) {
+ $.extend( config, {
+ icon: 'previous',
+ label: ''
+ } );
+ }
widgets.push(
- new OO.ui.ActionWidget( $.extend( { framed: true }, actions[ i ] ) )
+ new OO.ui.ActionWidget( config )
);
}
return widgets;
} );
};
+/**
+ * Display a quick modal prompt dialog, using a OO.ui.MessageDialog. While the dialog is open,
+ * the rest of the page will be dimmed out and the user won't be able to interact with it. The
+ * dialog has a text input widget and two action buttons, one to confirm an operation (labelled "OK")
+ * and one to cancel it (labelled "Cancel").
+ *
+ * A window manager is created automatically when this function is called for the first time.
+ *
+ * @example
+ * OO.ui.prompt( 'Choose a line to go to', { textInput: { placeholder: 'Line number' } } ).done( function ( result ) {
+ * if ( result !== null ) {
+ * console.log( 'User typed "' + result + '" then clicked "OK".' );
+ * } else {
+ * console.log( 'User clicked "Cancel" or closed the dialog.' );
+ * }
+ * } );
+ *
+ * @param {jQuery|string} text Message text to display
+ * @param {Object} [options] Additional options, see OO.ui.MessageDialog#getSetupProcess
+ * @cfg {Object} [textInput] Additional options for text input widget, see OO.ui.TextInputWidget
+ * @return {jQuery.Promise} Promise resolved when the user closes the dialog. If the user chose to
+ * confirm, the promise will resolve with the value of the text input widget; otherwise, it will
+ * resolve to `null`.
+ */
+OO.ui.prompt = function ( text, options ) {
+ var manager = OO.ui.getWindowManager(),
+ textInput = new OO.ui.TextInputWidget( ( options && options.textInput ) || {} ),
+ textField = new OO.ui.FieldLayout( textInput, {
+ align: 'top',
+ label: text
+ } );
+
+ // TODO: This is a little hacky, and could be done by extending MessageDialog instead.
+
+ return manager.openWindow( 'messageDialog', $.extend( {
+ message: textField.$element,
+ verbose: true
+ }, options ) ).then( function ( opened ) {
+ // After ready
+ textInput.on( 'enter', function () {
+ manager.getCurrentWindow().close( { action: 'accept' } );
+ } );
+ textInput.focus();
+ return opened.then( function ( closing ) {
+ return closing.then( function ( data ) {
+ return $.Deferred().resolve( data && data.action === 'accept' ? textInput.getValue() : null );
+ } );
+ } );
+ } );
+};
+
}( OO ) );
},
"images": {
"beta": { "file": "images/icons/beta.svg" },
- "betaLaunch": { "file": "images/icons/betaLaunch.svg" },
+ "betaLaunch": { "file": "images/icons/logo-wikimediaDiscovery.svg" },
"bookmark": { "file": {
"ltr": "images/icons/bookmark-ltr.svg",
"rtl": "images/icons/bookmark-rtl.svg"
"images": {
"block": { "file": "images/icons/block.svg" },
"blockUndo": { "file": {
- "ltr": "images/icons/blockUndo-ltr.svg",
- "rtl": "images/icons/blockUndo-rtl.svg"
+ "ltr": "images/icons/unBlock-ltr.svg",
+ "rtl": "images/icons/unBlock-rtl.svg"
+ } },
+ "unBlock": { "file": {
+ "ltr": "images/icons/unBlock-ltr.svg",
+ "rtl": "images/icons/unBlock-rtl.svg"
} },
"flag": { "file": {
"ltr": "images/icons/flag-ltr.svg",
"rtl": "images/icons/flag-rtl.svg"
} },
"flagUndo": { "file": {
- "ltr": "images/icons/flagUndo-ltr.svg",
- "rtl": "images/icons/flagUndo-rtl.svg"
+ "ltr": "images/icons/unFlag-ltr.svg",
+ "rtl": "images/icons/unFlag-rtl.svg"
} },
- "lock": { "file": "images/icons/lock.svg" },
- "star": { "file": "images/icons/star.svg" },
- "trash": { "file": "images/icons/trash.svg" },
- "trashUndo": { "file": {
- "ltr": "images/icons/trashUndo-ltr.svg",
- "rtl": "images/icons/trashUndo-rtl.svg"
+ "unFlag": { "file": {
+ "ltr": "images/icons/unFlag-ltr.svg",
+ "rtl": "images/icons/unFlag-rtl.svg"
} },
+ "lock": { "file": "images/icons/lock.svg" },
"unLock": { "file": {
"ltr": "images/icons/unLock-ltr.svg",
"rtl": "images/icons/unLock-rtl.svg"
} },
- "unStar": { "file": "images/icons/unStar.svg" }
-
-
+ "star": { "file": "images/icons/star.svg" },
+ "unStar": { "file": "images/icons/unStar.svg" },
+ "trash": { "file": "images/icons/trash.svg" },
+ "unTrash": { "file": {
+ "ltr": "images/icons/unTrash-ltr.svg",
+ "rtl": "images/icons/unTrash-rtl.svg"
+ } },
+ "trashUndo": { "file": {
+ "ltr": "images/icons/unTrash-ltr.svg",
+ "rtl": "images/icons/unTrash-rtl.svg"
+ } },
+ "ongoingConversation": {
+ "file": {
+ "ltr": "images/icons/ongoingConversation-ltr.svg",
+ "rtl": "images/icons/ongoingConversation-rtl.svg"
+ }
+ }
}
}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style>
- <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
-</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #FFFFFF }</style>
+ <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="M17.8 18.6H2.5l2.7-2.7V6h15.3v9.9c0 1.53-1.17 2.7-2.7 2.7zm-7.542-4.95c0 .405-.135.675-.405.945-.27.27-.607.405-.945.405-.405 0-.675-.135-.945-.405a1.332 1.332 0 0 1-.405-.945c0-.338.135-.675.405-.945.27-.27.608-.405.945-.405.338 0 .675.135.945.405.27.27.405.607.405.945zm4.05 0c0 .405-.135.675-.405.945-.27.27-.607.405-.945.405-.405 0-.675-.135-.945-.405a1.332 1.332 0 0 1-.405-.945c0-.338.135-.675.405-.945.27-.27.608-.405.945-.405.338 0 .675.135.945.405.27.27.405.607.405.945zm4.05 0c0 .405-.135.675-.405.945-.27.27-.607.405-.945.405-.405 0-.675-.135-.945-.405a1.332 1.332 0 0 1-.405-.945c0-.338.135-.675.405-.945.27-.27.608-.405.945-.405.338 0 .675.135.945.405.27.27.405.607.405.945z" id="ongoing-conversation" fill-rule="evenodd"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="M5.2 18.6h15.3l-2.7-2.7V6H2.5v9.9c0 1.53 1.17 2.7 2.7 2.7zm7.542-4.95c0 .405.135.675.405.945.27.27.607.405.945.405.405 0 .675-.135.945-.405.27-.27.405-.607.405-.945 0-.337-.135-.675-.405-.945a1.334 1.334 0 0 0-.945-.405c-.338 0-.675.135-.945.405-.27.27-.405.607-.405.945zm-4.05 0c0 .405.135.675.405.945.27.27.608.405.945.405.405 0 .675-.135.945-.405.27-.27.405-.607.405-.945 0-.337-.135-.675-.405-.945a1.334 1.334 0 0 0-.945-.405c-.338 0-.675.135-.945.405-.27.27-.405.608-.405.945zm-4.05 0c0 .405.135.675.405.945.27.27.608.405.945.405.405 0 .675-.135.945-.405.27-.27.405-.607.405-.945 0-.337-.135-.675-.405-.945a1.332 1.332 0 0 0-.945-.405c-.337 0-.675.135-.945.405-.27.27-.405.608-.405.945z" id="ongoing-conversation" fill-rule="evenodd"/>
+</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M4.5 3.5l-1 1L6 7v2h1v7.97L8 18h6.97l.03-.03 1-.97 2.5 2.5 1-1L16 15l-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1zM9 5v1l1 1h6v1h-5l1 1h3v3l1 1V9h1V6h-3V5zM8 9l1 1v6h1v-5l1 1v4h1v-3l1 1v2h1v-1l1 1v1H8zm5 1l1 1v-1z" id="trash-can-undo"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M18.5 3.5l1 1L17 7v2h-1v7.97L15 18H8.03L8 17.97 7 17l-2.5 2.5-1-1L7 15l1-1 1-1 1-1 1-1 1-1 1-1 1-1 1-1 1-1zM14 5v1l-1 1H7v1h5l-1 1H8v3l-1 1V9H6V6h3V5zm1 4l-1 1v6h-1v-5l-1 1v4h-1v-3l-1 1v2H9v-1l-1 1v1h7zm-5 1l-1 1v-1z" id="trash-can-undo"/>
-</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M4.5 3.5l-1 1L6 7v2h1v7.97L8 18h6.97l.03-.03 1-.97 2.5 2.5 1-1L16 15l-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1zM9 5v1l1 1h6v1h-5l1 1h3v3l1 1V9h1V6h-3V5zM8 9l1 1v6h1v-5l1 1v4h1v-3l1 1v2h1v-1l1 1v1H8zm5 1l1 1v-1z" id="trash-can-undo"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M18.5 3.5l1 1L17 7v2h-1v7.97L15 18H8.03L8 17.97 7 17l-2.5 2.5-1-1L7 15l1-1 1-1 1-1 1-1 1-1 1-1 1-1 1-1 1-1zM14 5v1l-1 1H7v1h5l-1 1H8v3l-1 1V9H6V6h3V5zm1 4l-1 1v6h-1v-5l-1 1v4h-1v-3l-1 1v2H9v-1l-1 1v1h7zm-5 1l-1 1v-1z" id="trash-can-undo"/>
+</svg>
},
"images": {
"beta": { "file": "images/icons/beta.svg" },
- "betaLaunch": { "file": "images/icons/betaLaunch.svg" },
+ "betaLaunch": { "file": "images/icons/logo-wikimediaDiscovery.svg" },
"bookmark": { "file": {
"ltr": "images/icons/bookmark-ltr.svg",
"rtl": "images/icons/bookmark-rtl.svg"
"images": {
"block": { "file": "images/icons/block.svg", "variants": [ "destructive" ] },
"blockUndo": { "file": {
- "ltr": "images/icons/blockUndo-ltr.svg",
- "rtl": "images/icons/blockUndo-rtl.svg"
+ "ltr": "images/icons/unBlock-ltr.svg",
+ "rtl": "images/icons/unBlock-rtl.svg"
+ } },
+ "unBlock": { "file": {
+ "ltr": "images/icons/unBlock-ltr.svg",
+ "rtl": "images/icons/unBlock-rtl.svg"
} },
"flag": { "file": {
"ltr": "images/icons/flag-ltr.svg",
"rtl": "images/icons/flag-rtl.svg"
} },
+ "unFlag": { "file": {
+ "ltr": "images/icons/unFlag-ltr.svg",
+ "rtl": "images/icons/unFlag-rtl.svg"
+ } },
"flagUndo": { "file": {
- "ltr": "images/icons/flagUndo-ltr.svg",
- "rtl": "images/icons/flagUndo-rtl.svg"
+ "ltr": "images/icons/unFlag-ltr.svg",
+ "rtl": "images/icons/unFlag-rtl.svg"
} },
"lock": { "file": {
"ltr": "images/icons/lock-ltr.svg",
"rtl": "images/icons/lock-rtl.svg"
}, "variants": [ "destructive" ] },
+ "unLock": { "file": {
+ "ltr": "images/icons/unLock-ltr.svg",
+ "rtl": "images/icons/unLock-rtl.svg"
+ }, "variants": [ "destructive" ] },
+ "star": { "file": "images/icons/star.svg", "variants": [ "constructive", "progressive" ] },
+ "unStar": { "file": "images/icons/unStar.svg", "variants": [ "constructive", "progressive" ] },
+ "trash": { "file": "images/icons/trash.svg" },
+ "unTrash": { "file": {
+ "ltr": "images/icons/unTrash-ltr.svg",
+ "rtl": "images/icons/unTrash-rtl.svg"
+ } },
+ "trashUndo": { "file": {
+ "ltr": "images/icons/unTrash-ltr.svg",
+ "rtl": "images/icons/unTrash-rtl.svg"
+ } },
"ongoingConversation": {
"file": {
"ltr": "images/icons/ongoingConversation-ltr.svg",
"rtl": "images/icons/ongoingConversation-rtl.svg"
},
"variants": [ "progressive" ]
- },
- "star": { "file": "images/icons/star.svg", "variants": [ "constructive", "progressive" ] },
- "trash": { "file": "images/icons/trash.svg" },
- "trashUndo": { "file": {
- "ltr": "images/icons/trashUndo-ltr.svg",
- "rtl": "images/icons/trashUndo-rtl.svg"
- } },
- "unLock": { "file": {
- "ltr": "images/icons/unLock-ltr.svg",
- "rtl": "images/icons/unLock-rtl.svg"
- }, "variants": [ "destructive" ] },
- "unStar": { "file": "images/icons/unStar.svg", "variants": [ "constructive", "progressive" ] }
+ }
}
}
"images": {
"logoCC": { "file": "images/icons/logo-cc.svg" },
"logoWikimediaCommons": { "file": "images/icons/logo-wikimediaCommons.svg" },
+ "logoWikimediaDiscovery": { "file": "images/icons/logo-wikimediaDiscovery.svg" },
"logoWikipedia": { "file": "images/icons/logo-wikipedia.svg" }
}
}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
-</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M15.3 14.7C16.1 10.9 14.7 4 12 4c-2.7 0-4.2 6.7-3.4 10.5L7 18h2.7l.3 1h4c.2-.3.1-.5.3-1H17l-1.7-3.3zM12 10c-.8 0-1.5-.7-1.5-1.5S11.2 7 12 7s1.5.7 1.5 1.5S12.8 10 12 10zm2 10c0 1.1-2 2-2 2s-2-.9-2-2"/>
+</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M20.5 20.5L5 5 4 6l3 3 1 11h8l.2-1.8 3.3 3.3zM17 9h-6l5.5 5.5zm1-1c0-1.1-.9-2-2-2h-2l-1-1h-2l-1 1H8l2 2h8z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M20.5 20.5L5 5 4 6l3 3 1 11h8l.2-1.8 3.3 3.3zM17 9h-6l5.5 5.5zm1-1c0-1.1-.9-2-2-2h-2l-1-1h-2l-1 1H8l2 2h8z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M20.5 20.5L5 5 4 6l3 3 1 11h8l.2-1.8 3.3 3.3zM17 9h-6l5.5 5.5zm1-1c0-1.1-.9-2-2-2h-2l-1-1h-2l-1 1H8l2 2h8z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
- <path d="M4 20.5L19.5 5l1 1-3 3-1 11h-8l-.2-1.8L5 21.5zM7.5 9h6L8 14.5zm-1-1c0-1.1.9-2 2-2h2l1-1h2l1 1h2l-2 2h-8z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
- <path d="M4 20.5L19.5 5l1 1-3 3-1 11h-8l-.2-1.8L5 21.5zM7.5 9h6L8 14.5zm-1-1c0-1.1.9-2 2-2h2l1-1h2l1 1h2l-2 2h-8z"/>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
- <path d="M4 20.5L19.5 5l1 1-3 3-1 11h-8l-.2-1.8L5 21.5zM7.5 9h6L8 14.5zm-1-1c0-1.1.9-2 2-2h2l1-1h2l1 1h2l-2 2h-8z"/>
-</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M17 11v2h-2l3.6 3.6c.9-1.3 1.4-2.9 1.4-4.6 0-4.4-3.6-8-8-8-1.7 0-3.3.5-4.6 1.4L13 11h4zM4 4L3 5l2.4 2.4C4.5 8.7 4 10.3 4 12c0 4.4 3.6 8 8 8 1.7 0 3.3-.5 4.6-1.4L19 21l1-1L4 4zm3 9v-2h2l2 2H7z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M7 11v2h2l-3.6 3.6C4.5 15.3 4 13.7 4 12c0-4.4 3.6-8 8-8 1.7 0 3.3.5 4.6 1.4L11 11H7zm13-7l1 1-2.4 2.4c.9 1.3 1.4 2.9 1.4 4.6 0 4.4-3.6 8-8 8-1.7 0-3.3-.5-4.6-1.4L5 21l-1-1L20 4zm-3 9v-2h-2l-2 2h4z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M19.9 19.6l-16-16-1.1 1.1L6 7.9V20h1v-7c.6-.6 2-.8 3.4-.7l8.4 8.4 1.1-1.1zM17 14V7c-.7.7-2.7.9-4 .5V6c-1.2-1.3-3.9-1.3-5.4-.5l8.9 9c.3-.2.4-.3.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M3.5 19.6l16-16 1.1 1.1-3.2 3.2V20h-1v-7c-.6-.6-2-.8-3.4-.7l-8.4 8.4-1.1-1.1zM6.3 14V7c.7.7 2.7.9 4 .5V6c1.2-1.3 3.9-1.3 5.4-.5l-8.9 9c-.3-.2-.4-.3-.5-.5z"/>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M20.5 20.5L5 5 4 6l3 3 1 11h8l.2-1.8 3.3 3.3zM17 9h-6l5.5 5.5zm1-1c0-1.1-.9-2-2-2h-2l-1-1h-2l-1 1H8l2 2h8z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M20.5 20.5L5 5 4 6l3 3 1 11h8l.2-1.8 3.3 3.3zM17 9h-6l5.5 5.5zm1-1c0-1.1-.9-2-2-2h-2l-1-1h-2l-1 1H8l2 2h8z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M20.5 20.5L5 5 4 6l3 3 1 11h8l.2-1.8 3.3 3.3zM17 9h-6l5.5 5.5zm1-1c0-1.1-.9-2-2-2h-2l-1-1h-2l-1 1H8l2 2h8z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #fff }</style>
+ <path d="M4 20.5L19.5 5l1 1-3 3-1 11h-8l-.2-1.8L5 21.5zM7.5 9h6L8 14.5zm-1-1c0-1.1.9-2 2-2h2l1-1h2l1 1h2l-2 2h-8z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #36c }</style>
+ <path d="M4 20.5L19.5 5l1 1-3 3-1 11h-8l-.2-1.8L5 21.5zM7.5 9h6L8 14.5zm-1-1c0-1.1.9-2 2-2h2l1-1h2l1 1h2l-2 2h-8z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path d="M4 20.5L19.5 5l1 1-3 3-1 11h-8l-.2-1.8L5 21.5zM7.5 9h6L8 14.5zm-1-1c0-1.1.9-2 2-2h2l1-1h2l1 1h2l-2 2h-8z"/>
+</svg>
div.mw-warning-with-logexcerpt {
padding: 3px;
margin-bottom: 3px;
- border: 2px solid #2f6fab;
+ border: 2px solid #2a4b8d;
clear: both;
}
/* Forms */
fieldset {
- border: 1px solid #2f6fab;
+ border: 1px solid #2a4b8d;
margin: 1em 0 1em 0;
padding: 0 1em 1em;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-indicatorElement-indicator.mw-apisandbox-clickable-indicator {
cursor: pointer;
}
+
+.mw-apisandbox-textInputCode .oo-ui-inputWidget-input {
+ font-family: monospace, 'Courier';
+ font-size: 0.8125em;
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+}
}
$.when.apply( $, deferreds ).done( function () {
+ var jsonInput;
+
if ( $.inArray( false, arguments ) !== -1 ) {
windowManager.openWindow( 'errorAlert', {
title: Util.parseMsg( 'apisandbox-submit-invalid-fields-title' ),
label: Util.parseMsg( 'apisandbox-request-url-label' )
}
).$element,
+ new OO.ui.FieldLayout(
+ jsonInput = new OO.ui.TextInputWidget( {
+ classes: [ 'mw-apisandbox-textInputCode' ],
+ readOnly: true,
+ multiline: true,
+ autosize: true,
+ maxRows: 6,
+ value: JSON.stringify( displayParams, null, '\t' )
+ } ), {
+ label: Util.parseMsg( 'apisandbox-request-params-json' )
+ }
+ ).$element,
$result
);
ApiSandbox.updateUI();
booklet.setPage( '|results|' );
+ // Resize the multiline input once visible
+ jsonInput.adjustSize();
+
location.href = oldhash = '#' + query;
api.post( params, {
* - 'boolean': The field is a boolean.
* - 'toggleLocal': The field represents {@link #getLocal this.getLocal()}.
* Editing should directly call {@link #toggleLocal this.toggleLocal()}.
+ * @return {boolean} return.calendarComponent Whether this field is part of a calendar, e.g.
+ * part of the date instead of the time.
* @return {number} return.size Maximum number of characters in the field (when
* the 'intercalary' component is falsey). If 0, the field should be hidden entirely.
* @return {Object.<string,number>} return.intercalarySize Map from
}
spec = {
component: null,
+ calendarComponent: false,
editable: false,
type: 'static',
value: params.slice( 1 ).join( '|' ),
c = params[ 0 ] === '#' ? '' : ':';
return {
component: 'zone',
+ calendarComponent: false,
editable: true,
type: 'toggleLocal',
size: 5 + c.length,
case 'full':
spec = {
component: 'zone',
+ calendarComponent: false,
editable: true,
type: 'toggleLocal',
values: params[ 0 ] === 'short' ? this.shortZones : this.fullZones,
$field = $( '<span>' )
.width( sz )
.data( 'mw-widgets-datetime-dateTimeInputWidget-placeholder', placeholder );
+ if ( spec.type !== 'static' ) {
+ $field.prop( 'tabIndex', -1 );
+ $field.on( 'focus', this.onFieldFocus.bind( this, $field ) );
+ }
if ( spec.type === 'static' ) {
$field.text( spec.value );
} else {
* @param {jQuery.Event} e Focus event
*/
mw.widgets.datetime.DateTimeInputWidget.prototype.onFieldFocus = function ( $field ) {
+ var spec = $field.data( 'mw-widgets-datetime-dateTimeInputWidget-fieldSpec' );
+
if ( !this.isDisabled() ) {
if ( this.getValueAsDate() === null ) {
this.setValue( this.formatter.getDefaultDate() );
}
if ( this.calendar ) {
- this.calendar.toggle( true );
+ this.calendar.toggle( !!spec.calendarComponent );
}
}
};
case 'year|#':
spec = {
component: 'Year',
+ calendarComponent: true,
type: 'number',
size: 4,
zeropad: false
case 'season|#':
spec = {
component: 'Season',
+ calendarComponent: true,
type: 'number',
size: 1,
intercalarySize: { 1: 0 },
case 'season|full':
spec = {
component: 'Season',
+ calendarComponent: true,
type: 'string',
intercalarySize: { 1: 0 },
values: {
case 'dow|full':
spec = {
component: 'DOW',
+ calendarComponent: true,
editable: false,
type: 'string',
intercalarySize: { 1: 0 },
case 'day|0':
spec = {
component: 'Day',
+ calendarComponent: true,
type: 'string',
size: 2,
intercalarySize: { 1: 13 },
case 'second|0':
spec = {
component: tag.charAt( 0 ).toUpperCase() + tag.slice( 1 ),
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '0'
case 'millisecond|0':
spec = {
component: 'Millisecond',
+ calendarComponent: false,
type: 'number',
size: 3,
zeropad: params[ 0 ] === '0'
/**
* Provides various methods needed for formatting dates and times. This
- * implementation implments the proleptic Gregorian calendar over years
+ * implementation implements the proleptic Gregorian calendar over years
* 0000–9999.
*
* @class
case 'year|0':
spec = {
component: 'year',
+ calendarComponent: true,
type: 'number',
size: 4,
zeropad: params[ 0 ] === '0'
case 'month|full':
spec = {
component: 'month',
+ calendarComponent: true,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortMonthNames : this.fullMonthNames
};
case 'dow|full':
spec = {
component: 'dow',
+ calendarComponent: true,
editable: false,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortDayNames : this.fullDayNames
case 'month|0':
case 'day|#':
case 'day|0':
+ spec = {
+ component: tag,
+ calendarComponent: true,
+ type: 'number',
+ size: 2,
+ zeropad: params[ 0 ] === '0'
+ };
+ break;
+
case 'hour|#':
case 'hour|0':
case 'minute|#':
case 'second|0':
spec = {
component: tag,
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '0'
case 'hour|012':
spec = {
component: 'hour12',
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '012'
case 'hour|period':
spec = {
component: 'hour12period',
+ calendarComponent: false,
type: 'boolean',
values: this.hour12Periods
};
case 'millisecond|0':
spec = {
component: 'millisecond',
+ calendarComponent: false,
type: 'number',
size: 3,
zeropad: params[ 0 ] === '0'
</p>
!! end
+# FIXME: This test is currently broken in the PHP parser T153761
!! test
T146304: Don't break template parsing if language converter markup is in the parameter.
!! options
language=sr variant=sr-ec
+disabled
!! wikitext
{{echo|-{R|foo}-}}
!! html/php
protected function getMocks() {
$dbMock = $this->getMockBuilder( 'DatabaseMysqli' )
+ ->disableOriginalClone()
->disableOriginalConstructor()
->getMock();
// We add 5 Revisions for this test. Their corresponding text id's
// are stored in the following 5 variables.
- private $textId1;
- private $textId2;
- private $textId3;
- private $textId4;
- private $textId5;
+ protected static $textId1;
+ protected static $textId2;
+ protected static $textId3;
+ protected static $textId4;
+ protected static $textId5;
/**
* @var Exception|null As the current MediaWikiTestCase::run is not
* we catch the exception and store it until we are in setUp and may
* finally rethrow the exception without crashing the test suite.
*/
- private $exceptionFromAddDBData;
+ protected static $exceptionFromAddDBDataOnce;
/**
* @var FetchText The (mocked) FetchText that is to test
throw new MWException( "Could not determine text id" );
}
- function addDBData() {
- $this->tablesUsed[] = 'page';
- $this->tablesUsed[] = 'revision';
- $this->tablesUsed[] = 'text';
-
+ function addDBDataOnce() {
$wikitextNamespace = $this->getDefaultWikitextNS();
try {
$title = Title::newFromText( 'FetchTextTestPage1', $wikitextNamespace );
$page = WikiPage::factory( $title );
- $this->textId1 = $this->addRevision(
+ self::$textId1 = $this->addRevision(
$page,
"FetchTextTestPage1Text1",
"FetchTextTestPage1Summary1"
$title = Title::newFromText( 'FetchTextTestPage2', $wikitextNamespace );
$page = WikiPage::factory( $title );
- $this->textId2 = $this->addRevision(
+ self::$textId2 = $this->addRevision(
$page,
"FetchTextTestPage2Text1",
"FetchTextTestPage2Summary1"
);
- $this->textId3 = $this->addRevision(
+ self::$textId3 = $this->addRevision(
$page,
"FetchTextTestPage2Text2",
"FetchTextTestPage2Summary2"
);
- $this->textId4 = $this->addRevision(
+ self::$textId4 = $this->addRevision(
$page,
"FetchTextTestPage2Text3",
"FetchTextTestPage2Summary3"
);
- $this->textId5 = $this->addRevision(
+ self::$textId5 = $this->addRevision(
$page,
"FetchTextTestPage2Text4 some additional Text ",
"FetchTextTestPage2Summary4 extra "
);
} catch ( Exception $e ) {
// We'd love to pass $e directly. However, ... see
- // documentation of exceptionFromAddDBData
- $this->exceptionFromAddDBData = $e;
+ // documentation of exceptionFromAddDBDataOnce
+ self::$exceptionFromAddDBDataOnce = $e;
}
}
parent::setUp();
// Check if any Exception is stored for rethrowing from addDBData
- if ( $this->exceptionFromAddDBData !== null ) {
- throw $this->exceptionFromAddDBData;
+ if ( self::$exceptionFromAddDBDataOnce !== null ) {
+ throw self::$exceptionFromAddDBDataOnce;
}
$this->fetchText = new SemiMockedFetchText();
// provider would not know the required ids.
function testExistingSimple() {
- $this->assertFilter( $this->textId2,
- $this->textId2 . "\n23\nFetchTextTestPage2Text1" );
+ $this->assertFilter( self::$textId2,
+ self::$textId2 . "\n23\nFetchTextTestPage2Text1" );
}
function testExistingSimpleWithNewline() {
- $this->assertFilter( $this->textId2 . "\n",
- $this->textId2 . "\n23\nFetchTextTestPage2Text1" );
+ $this->assertFilter( self::$textId2 . "\n",
+ self::$textId2 . "\n23\nFetchTextTestPage2Text1" );
}
function testExistingSeveral() {
- $this->assertFilter( "$this->textId1\n$this->textId5\n"
- . "$this->textId3\n$this->textId3",
- implode( "", [
- $this->textId1 . "\n23\nFetchTextTestPage1Text1",
- $this->textId5 . "\n44\nFetchTextTestPage2Text4 "
+ $this->assertFilter(
+ join( "\n", [
+ self::$textId1,
+ self::$textId5,
+ self::$textId3,
+ self::$textId3,
+ ] ),
+ implode( '', [
+ self::$textId1 . "\n23\nFetchTextTestPage1Text1",
+ self::$textId5 . "\n44\nFetchTextTestPage2Text4 "
. "some additional Text",
- $this->textId3 . "\n23\nFetchTextTestPage2Text2",
- $this->textId3 . "\n23\nFetchTextTestPage2Text2"
+ self::$textId3 . "\n23\nFetchTextTestPage2Text2",
+ self::$textId3 . "\n23\nFetchTextTestPage2Text2"
] ) );
}
}
function testNonExisting() {
- $this->assertFilter( $this->textId5 + 10, ( $this->textId5 + 10 ) . "\n-1\n" );
+ $this->assertFilter( self::$textId5 + 10, ( self::$textId5 + 10 ) . "\n-1\n" );
}
function testNegativeInteger() {
function testFloatingPointNumberExisting() {
// float -> int -> revision
- $this->assertFilter( $this->textId3 + 0.14159,
- $this->textId3 . "\n23\nFetchTextTestPage2Text2" );
+ $this->assertFilter( self::$textId3 + 0.14159,
+ self::$textId3 . "\n23\nFetchTextTestPage2Text2" );
}
function testFloatingPointNumberNonExisting() {
- $this->assertFilter( $this->textId5 + 3.14159,
- ( $this->textId5 + 3 ) . "\n-1\n" );
+ $this->assertFilter( self::$textId5 + 3.14159,
+ ( self::$textId5 + 3 ) . "\n-1\n" );
}
function testCharacters() {
}
function testMix() {
- $this->assertFilter( "ab\n" . $this->textId4 . ".5cd\n\nefg\n" . $this->textId2
- . "\n" . $this->textId3,
+ $this->assertFilter( "ab\n" . self::$textId4 . ".5cd\n\nefg\n" . self::$textId2
+ . "\n" . self::$textId3,
implode( "", [
"0\n-1\n",
- $this->textId4 . "\n23\nFetchTextTestPage2Text3",
+ self::$textId4 . "\n23\nFetchTextTestPage2Text3",
"0\n-1\n",
"0\n-1\n",
- $this->textId2 . "\n23\nFetchTextTestPage2Text1",
- $this->textId3 . "\n23\nFetchTextTestPage2Text2"
+ self::$textId2 . "\n23\nFetchTextTestPage2Text1",
+ self::$textId3 . "\n23\nFetchTextTestPage2Text2"
] ) );
}
}