"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
- "oojs/oojs-ui": "0.18.4",
+ "oojs/oojs-ui": "0.19.0",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
"SnowedEarth",
"Jdforrester",
"Wladek92",
- "Harmonia Amanda"
+ "Harmonia Amanda",
+ "The RedBurn"
]
},
"ooui-outline-control-move-down": "Descendre l’élément",
"ooui-dialog-message-accept": "OK",
"ooui-dialog-message-reject": "Annuler",
"ooui-dialog-process-error": "Quelque chose s'est mal passé",
- "ooui-dialog-process-dismiss": "Rejeter",
+ "ooui-dialog-process-dismiss": "Fermer",
"ooui-dialog-process-retry": "Réessayer",
"ooui-dialog-process-continue": "Continuer",
"ooui-selectfile-button-select": "Sélectionner un fichier",
--- /dev/null
+{
+ "@metadata": {
+ "authors": [
+ "Idojc"
+ ]
+ },
+ "ooui-outline-control-move-down": "Movar elemento adsube",
+ "ooui-outline-control-move-up": "Movar elemento adsupere",
+ "ooui-outline-control-remove": "Forigar elemento",
+ "ooui-toolbar-more": "Plu multa",
+ "ooui-toolgroup-expand": "Plu multa",
+ "ooui-toolgroup-collapse": "Min multa",
+ "ooui-dialog-message-accept": "Aplikar",
+ "ooui-dialog-message-reject": "Anular",
+ "ooui-dialog-process-error": "Ulo faliis",
+ "ooui-dialog-process-dismiss": "Celar",
+ "ooui-dialog-process-retry": "Riprobar",
+ "ooui-dialog-process-continue": "Durar",
+ "ooui-selectfile-button-select": "Selektar dokumento",
+ "ooui-selectfile-not-supported": "Dokumento-selekto ne esas suportata",
+ "ooui-selectfile-placeholder": "Nula dokumento selektesis",
+ "ooui-selectfile-dragdrop-placeholder": "Pozar dokumento hike"
+}
"authors": [
"Milicevic01",
"Nikola Smolenski",
- "Милан Јелисавчић"
+ "Милан Јелисавчић",
+ "Zoranzoki21"
]
},
"ooui-outline-control-move-down": "Премести ставку на доле",
"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.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-01T23:04:40Z
*/
( function ( OO ) {
OO.ui.theme = new OO.ui.ApexTheme();
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-apex.js.map
\ No newline at end of file
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-element-hidden {
display: none !important;
.oo-ui-buttonElement > .oo-ui-buttonElement-button {
cursor: pointer;
display: inline-block;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
vertical-align: middle;
font-family: inherit;
font-size: inherit;
.oo-ui-fieldLayout .oo-ui-fieldLayout-help > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
z-index: 1;
}
-.oo-ui-fieldLayout .oo-ui-fieldLayout-help .oo-ui-fieldLayout-help-content {
- padding: 0.5em 0.75em;
- line-height: 1.5;
-}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-top .oo-ui-fieldLayout-help,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline .oo-ui-fieldLayout-help {
margin-top: -0.3em;
.oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-help > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
z-index: 1;
}
-.oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-help .oo-ui-fieldsetLayout-help-content {
- padding: 0.5em 0.75em;
- line-height: 1.4;
-}
.oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-header {
max-width: 50em;
}
padding: 1.25em;
}
.oo-ui-panelLayout-framed {
+ border: 1px solid #ccc;
border-radius: 0.5em;
+ box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.25);
}
.oo-ui-panelLayout-padded.oo-ui-panelLayout-framed {
margin: 1em 0;
}
.oo-ui-popupWidget-body {
clear: both;
- overflow: hidden;
+}
+.oo-ui-popupWidget-body.oo-ui-clippableElement-clippable {
+ min-height: 1em;
}
.oo-ui-popupWidget-popup {
background-color: #fff;
.oo-ui-popupWidget-head > .oo-ui-labelElement-label {
margin: 0.75em 1em;
}
+.oo-ui-popupWidget-body {
+ line-height: 1.4;
+}
.oo-ui-popupWidget-body-padded {
- padding: 0 1em;
+ margin: 0.75em 1em;
}
.oo-ui-popupButtonWidget {
position: relative;
.oo-ui-popupButtonWidget .oo-ui-popupWidget {
cursor: auto;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
+.oo-ui-popupWidget.oo-ui-popupButtonWidget-frameless-popup {
/* @noflip */
- left: 0.9375em;
+ margin-left: 0.9375em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
+.oo-ui-popupWidget.oo-ui-popupButtonWidget-framed-popup {
/* @noflip */
- left: 1.2375em;
+ margin-left: 1.2375em;
}
.oo-ui-inputWidget {
margin-right: 0.5em;
display: none;
}
.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator,
-.oo-ui-textInputWidget > .oo-ui-labelElement-label {
+.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
display: block;
position: absolute;
top: 0;
-}
-.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
height: 100%;
-webkit-touch-callout: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
-.oo-ui-textInputWidget > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label {
- left: 0;
-}
-.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator,
-.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label {
- right: 0;
-}
.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-indicatorElement-indicator,
-.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-labelElement-label {
+.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-indicatorElement-indicator {
cursor: text;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-textInputWidget-type-search > .oo-ui-indicatorElement-indicator {
cursor: pointer;
}
.oo-ui-textInputWidget.oo-ui-widget-disabled input,
-.oo-ui-textInputWidget.oo-ui-widget-disabled textarea,
+.oo-ui-textInputWidget.oo-ui-widget-disabled textarea {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label {
-webkit-touch-callout: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
+.oo-ui-textInputWidget.oo-ui-labelElement > .oo-ui-labelElement-label {
+ display: block;
+}
+.oo-ui-textInputWidget > .oo-ui-iconElement-icon,
+.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label {
+ left: 0;
+}
+.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator,
+.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label {
+ right: 0;
+}
+.oo-ui-textInputWidget > .oo-ui-labelElement-label {
+ position: absolute;
+ top: 0;
+}
.oo-ui-textInputWidget-php > .oo-ui-iconElement-icon,
.oo-ui-textInputWidget-php > .oo-ui-indicatorElement-indicator,
.oo-ui-textInputWidget-php > .oo-ui-labelElement-label {
overflow: hidden;
opacity: 0;
}
+.oo-ui-menuSelectWidget.oo-ui-clippableElement-clippable {
+ min-height: 2.6em;
+}
+.oo-ui-menuSelectWidget-invisible {
+ display: none;
+}
.oo-ui-menuOptionWidget {
position: relative;
}
}
.oo-ui-comboBoxInputWidget-dropdownButton > .oo-ui-buttonElement-button {
display: block;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
overflow: hidden;
}
.oo-ui-comboBoxInputWidget.oo-ui-comboBoxInputWidget-empty .oo-ui-comboBoxInputWidget-dropdownButton {
position: absolute;
right: 0;
top: 0;
- height: 2.5em;
width: 2.5em;
+ height: 2.5em;
padding: 0;
}
.oo-ui-comboBoxInputWidget-php > .oo-ui-indicatorElement-indicator {
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-element-hidden {
display: none !important;
.oo-ui-buttonElement > .oo-ui-buttonElement-button {
cursor: pointer;
display: inline-block;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
vertical-align: middle;
font-family: inherit;
font-size: inherit;
}
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
padding: 0.546875em 1em;
- min-height: 1.25em;
- min-width: 1em;
+ min-height: 2.5em;
+ min-width: 3.125em;
border-radius: 2px;
position: relative;
}
.oo-ui-fieldLayout .oo-ui-fieldLayout-help > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
z-index: 1;
}
-.oo-ui-fieldLayout .oo-ui-fieldLayout-help .oo-ui-fieldLayout-help-content {
- padding: 0.5em 0.75em;
- line-height: 1.5;
-}
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-top .oo-ui-fieldLayout-help,
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline .oo-ui-fieldLayout-help {
margin-top: -0.3em;
.oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-help > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
z-index: 1;
}
-.oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-help .oo-ui-fieldsetLayout-help-content {
- padding: 0.5em 0.75em;
- line-height: 1.4;
-}
.oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-header {
max-width: 50em;
}
}
.oo-ui-popupWidget-body {
clear: both;
- overflow: hidden;
+}
+.oo-ui-popupWidget-body.oo-ui-clippableElement-clippable {
+ min-height: 1em;
}
.oo-ui-popupWidget-popup {
background-color: #fff;
.oo-ui-popupWidget-head > .oo-ui-labelElement-label {
margin: 0.75em 1em;
}
+.oo-ui-popupWidget-body {
+ line-height: 1.4;
+}
.oo-ui-popupWidget-body-padded {
- padding: 0 1em;
+ margin: 0.75em 1em;
}
.oo-ui-popupButtonWidget {
position: relative;
.oo-ui-popupButtonWidget .oo-ui-popupWidget {
cursor: auto;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
+.oo-ui-popupWidget.oo-ui-popupButtonWidget-frameless-popup {
/* @noflip */
- left: 0.9375em;
+ margin-left: 0.9375em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
+.oo-ui-popupWidget.oo-ui-popupButtonWidget-framed-popup {
/* @noflip */
- left: 1.5em;
+ margin-left: 1.5em;
}
.oo-ui-inputWidget {
margin-right: 0.5em;
display: none;
}
.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator,
-.oo-ui-textInputWidget > .oo-ui-labelElement-label {
+.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
display: block;
position: absolute;
top: 0;
-}
-.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
height: 100%;
-webkit-touch-callout: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
-.oo-ui-textInputWidget > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label {
- left: 0;
-}
-.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator,
-.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label {
- right: 0;
-}
.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-indicatorElement-indicator,
-.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-labelElement-label {
+.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-indicatorElement-indicator {
cursor: text;
}
.oo-ui-textInputWidget.oo-ui-widget-enabled.oo-ui-textInputWidget-type-search > .oo-ui-indicatorElement-indicator {
cursor: pointer;
}
.oo-ui-textInputWidget.oo-ui-widget-disabled input,
-.oo-ui-textInputWidget.oo-ui-widget-disabled textarea,
+.oo-ui-textInputWidget.oo-ui-widget-disabled textarea {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label {
-webkit-touch-callout: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
+.oo-ui-textInputWidget.oo-ui-labelElement > .oo-ui-labelElement-label {
+ display: block;
+}
+.oo-ui-textInputWidget > .oo-ui-iconElement-icon,
+.oo-ui-textInputWidget-labelPosition-before > .oo-ui-labelElement-label {
+ left: 0;
+}
+.oo-ui-textInputWidget > .oo-ui-indicatorElement-indicator,
+.oo-ui-textInputWidget-labelPosition-after > .oo-ui-labelElement-label {
+ right: 0;
+}
+.oo-ui-textInputWidget > .oo-ui-labelElement-label {
+ position: absolute;
+ top: 0;
+}
.oo-ui-textInputWidget-php > .oo-ui-iconElement-icon,
.oo-ui-textInputWidget-php > .oo-ui-indicatorElement-indicator,
.oo-ui-textInputWidget-php > .oo-ui-labelElement-label {
}
.oo-ui-textInputWidget input,
.oo-ui-textInputWidget textarea {
+ margin: 0;
font-size: inherit;
font-family: inherit;
background-color: #fff;
color: #000;
border: 1px solid #a2a9b1;
border-radius: 2px;
+ padding: 0.625em 0.546875em 0.546875em;
}
.oo-ui-textInputWidget input {
- padding: 0.625em 0.546875em 0.546875em;
line-height: 1.172em;
}
.oo-ui-textInputWidget textarea {
- padding: 0.46875em 0.546875em 0.546875em;
- line-height: 1.4;
+ line-height: 1.275;
}
.oo-ui-textInputWidget .oo-ui-pendingElement-pending {
background-color: transparent;
border-color: #d33;
box-shadow: inset 0 0 0 1px #d33;
}
+.oo-ui-textInputWidget.oo-ui-widget-disabled input,
+.oo-ui-textInputWidget.oo-ui-widget-disabled textarea {
+ background-color: #eaecf0;
+ color: #72777d;
+ text-shadow: 0 1px 1px #fff;
+ border-color: #c8ccd1;
+}
+.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,
+.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
+ opacity: 0.51;
+}
+.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label {
+ color: #72777d;
+ text-shadow: 0 1px 1px #fff;
+}
.oo-ui-textInputWidget.oo-ui-iconElement input,
.oo-ui-textInputWidget.oo-ui-iconElement textarea {
- padding-left: 2.65625em;
+ padding-left: 2.875em;
}
.oo-ui-textInputWidget.oo-ui-iconElement .oo-ui-iconElement-icon {
- max-height: 2.5em;
- left: 0.46875em;
+ left: 0;
+ height: 100%;
+ max-height: 2.375em;
+ margin-left: 0.5em;
+ background-position: right center;
}
.oo-ui-textInputWidget.oo-ui-indicatorElement input,
.oo-ui-textInputWidget.oo-ui-indicatorElement textarea {
padding-right: 2.4875em;
}
.oo-ui-textInputWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
- max-height: 2.5em;
- right: 0.625em;
+ height: 100%;
+ max-height: 2.375em;
+ margin: 0 0.775em;
}
.oo-ui-textInputWidget > .oo-ui-labelElement-label {
color: #72777d;
- right: 0.625em;
- border: 1px solid transparent;
- border-width: 1px 0;
- padding: 0.625em 0 0.546875em;
- line-height: 1.172em;
+ padding: 0.4em;
+ line-height: 1.5;
}
.oo-ui-textInputWidget-labelPosition-after.oo-ui-indicatorElement > .oo-ui-labelElement-label {
- right: 2.1875em;
+ margin-right: 2.0875em;
}
.oo-ui-textInputWidget-labelPosition-before.oo-ui-iconElement > .oo-ui-labelElement-label {
- left: 2.65625em;
-}
-.oo-ui-textInputWidget.oo-ui-widget-disabled input,
-.oo-ui-textInputWidget.oo-ui-widget-disabled textarea {
- background-color: #eaecf0;
- color: #72777d;
- text-shadow: 0 1px 1px #fff;
- border-color: #c8ccd1;
-}
-.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
- opacity: 0.51;
-}
-.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-labelElement-label {
- color: #72777d;
- text-shadow: 0 1px 1px #fff;
+ margin-left: 2.475em;
}
.oo-ui-menuSelectWidget {
position: absolute;
overflow: hidden;
opacity: 0;
}
+.oo-ui-menuSelectWidget.oo-ui-clippableElement-clippable {
+ min-height: 2.6em;
+}
+.oo-ui-menuSelectWidget-invisible {
+ display: none;
+}
.oo-ui-menuOptionWidget {
position: relative;
padding: 0.5em 1em;
}
.oo-ui-comboBoxInputWidget-dropdownButton > .oo-ui-buttonElement-button {
display: block;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
overflow: hidden;
}
.oo-ui-comboBoxInputWidget.oo-ui-comboBoxInputWidget-empty .oo-ui-comboBoxInputWidget-dropdownButton {
position: absolute;
right: 0;
top: 0;
- height: 2.5em;
width: 2.5em;
+ height: 2.5em;
padding: 0;
}
.oo-ui-comboBoxInputWidget-php > .oo-ui-indicatorElement-indicator {
width: 2.5em;
}
.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button {
+ min-width: 2.5em;
min-height: 2.5em;
- padding: 0.546875em;
+ padding-left: 0;
+ padding-right: 0;
}
.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button,
.oo-ui-comboBoxInputWidget-dropdownButton .oo-ui-buttonElement-button:focus {
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-01T23:04:40Z
*/
( function ( OO ) {
return this.label;
};
-/**
- * Fit the label.
- *
- * @chainable
- * @deprecated since 0.16.0
- */
-OO.ui.mixin.LabelElement.prototype.fitLabel = function () {
- OO.ui.warnDeprecation( 'LabelElement#fitLabel: This is a deprecated no-op.' );
- return this;
-};
-
/**
* Set the content of the label.
*
return this;
};
+/**
+ * Element that will stick under a specified container, even when it is inserted elsewhere in the
+ * document (for example, in a OO.ui.Window's $overlay).
+ *
+ * The elements's position is automatically calculated and maintained when window is resized or the
+ * page is scrolled. If you reposition the container manually, you have to call #position to make
+ * sure the element is still placed correctly.
+ *
+ * As positioning is only possible when both the element and the container are attached to the DOM
+ * and visible, it's only done after you call #togglePositioning. You might want to do this inside
+ * the #toggle method to display a floating popup, for example.
+ *
+ * @abstract
+ * @class
+ *
+ * @constructor
+ * @param {Object} [config] Configuration options
+ * @cfg {jQuery} [$floatable] Node to position, assigned to #$floatable, omit to use #$element
+ * @cfg {jQuery} [$floatableContainer] Node to position below
+ */
+OO.ui.mixin.FloatableElement = function OoUiMixinFloatableElement( config ) {
+ // Configuration initialization
+ config = config || {};
+
+ // Properties
+ this.$floatable = null;
+ this.$floatableContainer = null;
+ this.$floatableWindow = null;
+ this.$floatableClosestScrollable = null;
+ this.onFloatableScrollHandler = this.position.bind( this );
+ this.onFloatableWindowResizeHandler = this.position.bind( this );
+
+ // Initialization
+ this.setFloatableContainer( config.$floatableContainer );
+ this.setFloatableElement( config.$floatable || this.$element );
+};
+
+/* Methods */
+
+/**
+ * Set floatable element.
+ *
+ * If an element is already set, it will be cleaned up before setting up the new element.
+ *
+ * @param {jQuery} $floatable Element to make floatable
+ */
+OO.ui.mixin.FloatableElement.prototype.setFloatableElement = function ( $floatable ) {
+ if ( this.$floatable ) {
+ this.$floatable.removeClass( 'oo-ui-floatableElement-floatable' );
+ this.$floatable.css( { left: '', top: '' } );
+ }
+
+ this.$floatable = $floatable.addClass( 'oo-ui-floatableElement-floatable' );
+ this.position();
+};
+
+/**
+ * Set floatable container.
+ *
+ * The element will be always positioned under the specified container.
+ *
+ * @param {jQuery|null} $floatableContainer Container to keep visible, or null to unset
+ */
+OO.ui.mixin.FloatableElement.prototype.setFloatableContainer = function ( $floatableContainer ) {
+ this.$floatableContainer = $floatableContainer;
+ if ( this.$floatable ) {
+ this.position();
+ }
+};
+
+/**
+ * Toggle positioning.
+ *
+ * Do not turn positioning on until after the element is attached to the DOM and visible.
+ *
+ * @param {boolean} [positioning] Enable positioning, omit to toggle
+ * @chainable
+ */
+OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positioning ) {
+ var closestScrollableOfContainer;
+
+ if ( !this.$floatable || !this.$floatableContainer ) {
+ return this;
+ }
+
+ positioning = positioning === undefined ? !this.positioning : !!positioning;
+
+ if ( this.positioning !== positioning ) {
+ this.positioning = positioning;
+
+ closestScrollableOfContainer = OO.ui.Element.static.getClosestScrollableContainer( this.$floatableContainer[ 0 ] );
+ this.needsCustomPosition = !OO.ui.contains( this.$floatableContainer[ 0 ], this.$floatable[ 0 ] );
+ // If the scrollable is the root, we have to listen to scroll events
+ // on the window because of browser inconsistencies.
+ if ( $( closestScrollableOfContainer ).is( 'html, body' ) ) {
+ closestScrollableOfContainer = OO.ui.Element.static.getWindow( closestScrollableOfContainer );
+ }
+
+ if ( positioning ) {
+ this.$floatableWindow = $( this.getElementWindow() );
+ this.$floatableWindow.on( 'resize', this.onFloatableWindowResizeHandler );
+
+ this.$floatableClosestScrollable = $( closestScrollableOfContainer );
+ this.$floatableClosestScrollable.on( 'scroll', this.onFloatableScrollHandler );
+
+ // Initial position after visible
+ this.position();
+ } else {
+ if ( this.$floatableWindow ) {
+ this.$floatableWindow.off( 'resize', this.onFloatableWindowResizeHandler );
+ this.$floatableWindow = null;
+ }
+
+ if ( this.$floatableClosestScrollable ) {
+ this.$floatableClosestScrollable.off( 'scroll', this.onFloatableScrollHandler );
+ this.$floatableClosestScrollable = null;
+ }
+
+ this.$floatable.css( { left: '', top: '' } );
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Check whether the bottom edge of the given element is within the viewport of the given container.
+ *
+ * @private
+ * @param {jQuery} $element
+ * @param {jQuery} $container
+ * @return {boolean}
+ */
+OO.ui.mixin.FloatableElement.prototype.isElementInViewport = function ( $element, $container ) {
+ var elemRect, contRect,
+ leftEdgeInBounds = false,
+ bottomEdgeInBounds = false,
+ rightEdgeInBounds = false;
+
+ elemRect = $element[ 0 ].getBoundingClientRect();
+ if ( $container[ 0 ] === window ) {
+ contRect = {
+ top: 0,
+ left: 0,
+ right: document.documentElement.clientWidth,
+ bottom: document.documentElement.clientHeight
+ };
+ } else {
+ contRect = $container[ 0 ].getBoundingClientRect();
+ }
+
+ // For completeness, if we still cared about topEdgeInBounds, that'd be:
+ // elemRect.top >= contRect.top && elemRect.top <= contRect.bottom
+ if ( elemRect.left >= contRect.left && elemRect.left <= contRect.right ) {
+ leftEdgeInBounds = true;
+ }
+ if ( elemRect.bottom >= contRect.top && elemRect.bottom <= contRect.bottom ) {
+ bottomEdgeInBounds = true;
+ }
+ if ( elemRect.right >= contRect.left && elemRect.right <= contRect.right ) {
+ rightEdgeInBounds = true;
+ }
+
+ // We only care that any part of the bottom edge is visible
+ return bottomEdgeInBounds && ( leftEdgeInBounds || rightEdgeInBounds );
+};
+
+/**
+ * Position the floatable below its container.
+ *
+ * This should only be done when both of them are attached to the DOM and visible.
+ *
+ * @chainable
+ */
+OO.ui.mixin.FloatableElement.prototype.position = function () {
+ var pos;
+
+ if ( !this.positioning ) {
+ return this;
+ }
+
+ if ( !this.isElementInViewport( this.$floatableContainer, this.$floatableClosestScrollable ) ) {
+ this.$floatable.addClass( 'oo-ui-element-hidden' );
+ return;
+ } else {
+ this.$floatable.removeClass( 'oo-ui-element-hidden' );
+ }
+
+ if ( !this.needsCustomPosition ) {
+ return;
+ }
+
+ pos = OO.ui.Element.static.getRelativePosition( this.$floatableContainer, this.$floatable.offsetParent() );
+
+ // Position under container
+ pos.top += this.$floatableContainer.height();
+ this.$floatable.css( pos );
+
+ // We updated the position, so re-evaluate the clipping state.
+ // (ClippableElement does not listen to 'scroll' events on $floatableContainer's parent, and so
+ // will not notice the need to update itself.)
+ // TODO: This is terrible, we shouldn't need to know about ClippableElement at all here. Why does
+ // it not listen to the right events in the right places?
+ if ( this.clip ) {
+ this.clip();
+ }
+
+ return this;
+};
+
/**
* Element that can be automatically clipped to visible boundaries.
*
* @extends OO.ui.Widget
* @mixins OO.ui.mixin.LabelElement
* @mixins OO.ui.mixin.ClippableElement
+ * @mixins OO.ui.mixin.FloatableElement
*
* @constructor
* @param {Object} [config] Configuration options
$clippable: this.$body,
$clippableContainer: this.$popup
} ) );
+ OO.ui.mixin.FloatableElement.call( this, config );
// Properties
this.$anchor = $( '<div>' );
OO.inheritClass( OO.ui.PopupWidget, OO.ui.Widget );
OO.mixinClass( OO.ui.PopupWidget, OO.ui.mixin.LabelElement );
OO.mixinClass( OO.ui.PopupWidget, OO.ui.mixin.ClippableElement );
+OO.mixinClass( OO.ui.PopupWidget, OO.ui.mixin.FloatableElement );
/* Methods */
OO.ui.PopupWidget.parent.prototype.toggle.call( this, show );
if ( change ) {
+ this.togglePositioning( show && !!this.$floatableContainer );
+
if ( show ) {
if ( this.autoClose ) {
this.bindMouseDownListener();
*
* @constructor
* @param {Object} [config] Configuration options
+ * @cfg {jQuery} [$overlay] Render the popup into a separate layer. This configuration is useful in cases where
+ * the expanded popup is larger than its containing `<div>`. The specified overlay layer is usually on top of the
+ * containing `<div>` and has a larger area. By default, the popup uses relative positioning.
*/
OO.ui.PopupButtonWidget = function OoUiPopupButtonWidget( config ) {
// Parent constructor
OO.ui.PopupButtonWidget.parent.call( this, config );
// Mixin constructors
- OO.ui.mixin.PopupElement.call( this, config );
+ OO.ui.mixin.PopupElement.call( this, $.extend( true, {}, config, {
+ popup: {
+ $floatableContainer: this.$element
+ }
+ } ) );
+
+ // Properties
+ this.$overlay = config.$overlay || this.$element;
// Events
this.connect( this, { click: 'onAction' } );
// Initialization
this.$element
.addClass( 'oo-ui-popupButtonWidget' )
- .attr( 'aria-haspopup', 'true' )
- .append( this.popup.$element );
+ .attr( 'aria-haspopup', 'true' );
+ this.popup.$element
+ .addClass( 'oo-ui-popupButtonWidget-popup' )
+ .toggleClass( 'oo-ui-popupButtonWidget-framed-popup', this.isFramed() )
+ .toggleClass( 'oo-ui-popupButtonWidget-frameless-popup', !this.isFramed() );
+ this.$overlay.append( this.popup.$element );
};
/* Setup */
return this;
};
+/**
+ * Get text to match search strings against.
+ *
+ * The default implementation returns the label text, but subclasses
+ * can override this to provide more complex behavior.
+ *
+ * @return {string|boolean} String to match search string against
+ */
+OO.ui.OptionWidget.prototype.getMatchText = function () {
+ var label = this.getLabel();
+ return typeof label === 'string' ? label : this.$label.text();
+};
+
/**
* A SelectWidget is of a generic selection of options. The OOjs UI library contains several types of
* select widgets, including {@link OO.ui.ButtonSelectWidget button selects},
* @protected
* @param {string} s String to match against items
* @param {boolean} [exact=false] Only accept exact matches
- * @return {Function} function ( OO.ui.OptionItem ) => boolean
+ * @return {Function} function ( OO.ui.OptionWidget ) => boolean
*/
OO.ui.SelectWidget.prototype.getItemMatcher = function ( s, exact ) {
var re;
}
re = new RegExp( re, 'i' );
return function ( item ) {
- var l = item.getLabel();
- if ( typeof l !== 'string' ) {
- l = item.$label.text();
+ var matchText = item.getMatchText();
+ if ( matchText.normalize ) {
+ matchText = matchText.normalize();
}
- if ( l.normalize ) {
- l = l.normalize();
- }
- return re.test( l );
+ return re.test( matchText );
};
};
* @protected
*/
OO.ui.MenuSelectWidget.prototype.updateItemVisibility = function () {
- var i, item,
+ var i, item, visible,
+ anyVisible = false,
len = this.items.length,
showAll = !this.isVisible(),
filter = showAll ? null : this.getItemMatcher( this.$input.val() );
for ( i = 0; i < len; i++ ) {
item = this.items[ i ];
if ( item instanceof OO.ui.OptionWidget ) {
- item.toggle( showAll || filter( item ) );
+ visible = showAll || filter( item );
+ anyVisible = anyVisible || visible;
+ item.toggle( visible );
}
}
+ this.$element.toggleClass( 'oo-ui-menuSelectWidget-invisible', !anyVisible );
+
// Reevaluate clipping
this.clip();
};
}
};
-/**
- * Element that will stick under a specified container, even when it is inserted elsewhere in the
- * document (for example, in a OO.ui.Window's $overlay).
- *
- * The elements's position is automatically calculated and maintained when window is resized or the
- * page is scrolled. If you reposition the container manually, you have to call #position to make
- * sure the element is still placed correctly.
- *
- * As positioning is only possible when both the element and the container are attached to the DOM
- * and visible, it's only done after you call #togglePositioning. You might want to do this inside
- * the #toggle method to display a floating popup, for example.
- *
- * @abstract
- * @class
- *
- * @constructor
- * @param {Object} [config] Configuration options
- * @cfg {jQuery} [$floatable] Node to position, assigned to #$floatable, omit to use #$element
- * @cfg {jQuery} [$floatableContainer] Node to position below
- */
-OO.ui.mixin.FloatableElement = function OoUiMixinFloatableElement( config ) {
- // Configuration initialization
- config = config || {};
-
- // Properties
- this.$floatable = null;
- this.$floatableContainer = null;
- this.$floatableWindow = null;
- this.$floatableClosestScrollable = null;
- this.onFloatableScrollHandler = this.position.bind( this );
- this.onFloatableWindowResizeHandler = this.position.bind( this );
-
- // Initialization
- this.setFloatableContainer( config.$floatableContainer );
- this.setFloatableElement( config.$floatable || this.$element );
-};
-
-/* Methods */
-
-/**
- * Set floatable element.
- *
- * If an element is already set, it will be cleaned up before setting up the new element.
- *
- * @param {jQuery} $floatable Element to make floatable
- */
-OO.ui.mixin.FloatableElement.prototype.setFloatableElement = function ( $floatable ) {
- if ( this.$floatable ) {
- this.$floatable.removeClass( 'oo-ui-floatableElement-floatable' );
- this.$floatable.css( { left: '', top: '' } );
- }
-
- this.$floatable = $floatable.addClass( 'oo-ui-floatableElement-floatable' );
- this.position();
-};
-
-/**
- * Set floatable container.
- *
- * The element will be always positioned under the specified container.
- *
- * @param {jQuery|null} $floatableContainer Container to keep visible, or null to unset
- */
-OO.ui.mixin.FloatableElement.prototype.setFloatableContainer = function ( $floatableContainer ) {
- this.$floatableContainer = $floatableContainer;
- if ( this.$floatable ) {
- this.position();
- }
-};
-
-/**
- * Toggle positioning.
- *
- * Do not turn positioning on until after the element is attached to the DOM and visible.
- *
- * @param {boolean} [positioning] Enable positioning, omit to toggle
- * @chainable
- */
-OO.ui.mixin.FloatableElement.prototype.togglePositioning = function ( positioning ) {
- var closestScrollableOfContainer, closestScrollableOfFloatable;
-
- positioning = positioning === undefined ? !this.positioning : !!positioning;
-
- if ( this.positioning !== positioning ) {
- this.positioning = positioning;
-
- closestScrollableOfContainer = OO.ui.Element.static.getClosestScrollableContainer( this.$floatableContainer[ 0 ] );
- closestScrollableOfFloatable = OO.ui.Element.static.getClosestScrollableContainer( this.$floatable[ 0 ] );
- this.needsCustomPosition = closestScrollableOfContainer !== closestScrollableOfFloatable;
- // If the scrollable is the root, we have to listen to scroll events
- // on the window because of browser inconsistencies.
- if ( $( closestScrollableOfContainer ).is( 'html, body' ) ) {
- closestScrollableOfContainer = OO.ui.Element.static.getWindow( closestScrollableOfContainer );
- }
-
- if ( positioning ) {
- this.$floatableWindow = $( this.getElementWindow() );
- this.$floatableWindow.on( 'resize', this.onFloatableWindowResizeHandler );
-
- this.$floatableClosestScrollable = $( closestScrollableOfContainer );
- this.$floatableClosestScrollable.on( 'scroll', this.onFloatableScrollHandler );
-
- // Initial position after visible
- this.position();
- } else {
- if ( this.$floatableWindow ) {
- this.$floatableWindow.off( 'resize', this.onFloatableWindowResizeHandler );
- this.$floatableWindow = null;
- }
-
- if ( this.$floatableClosestScrollable ) {
- this.$floatableClosestScrollable.off( 'scroll', this.onFloatableScrollHandler );
- this.$floatableClosestScrollable = null;
- }
-
- this.$floatable.css( { left: '', top: '' } );
- }
- }
-
- return this;
-};
-
-/**
- * Check whether the bottom edge of the given element is within the viewport of the given container.
- *
- * @private
- * @param {jQuery} $element
- * @param {jQuery} $container
- * @return {boolean}
- */
-OO.ui.mixin.FloatableElement.prototype.isElementInViewport = function ( $element, $container ) {
- var elemRect, contRect,
- leftEdgeInBounds = false,
- bottomEdgeInBounds = false,
- rightEdgeInBounds = false;
-
- elemRect = $element[ 0 ].getBoundingClientRect();
- if ( $container[ 0 ] === window ) {
- contRect = {
- top: 0,
- left: 0,
- right: document.documentElement.clientWidth,
- bottom: document.documentElement.clientHeight
- };
- } else {
- contRect = $container[ 0 ].getBoundingClientRect();
- }
-
- // For completeness, if we still cared about topEdgeInBounds, that'd be:
- // elemRect.top >= contRect.top && elemRect.top <= contRect.bottom
- if ( elemRect.left >= contRect.left && elemRect.left <= contRect.right ) {
- leftEdgeInBounds = true;
- }
- if ( elemRect.bottom >= contRect.top && elemRect.bottom <= contRect.bottom ) {
- bottomEdgeInBounds = true;
- }
- if ( elemRect.right >= contRect.left && elemRect.right <= contRect.right ) {
- rightEdgeInBounds = true;
- }
-
- // We only care that any part of the bottom edge is visible
- return bottomEdgeInBounds && ( leftEdgeInBounds || rightEdgeInBounds );
-};
-
-/**
- * Position the floatable below its container.
- *
- * This should only be done when both of them are attached to the DOM and visible.
- *
- * @chainable
- */
-OO.ui.mixin.FloatableElement.prototype.position = function () {
- var pos;
-
- if ( !this.positioning ) {
- return this;
- }
-
- if ( !this.isElementInViewport( this.$floatableContainer, this.$floatableClosestScrollable ) ) {
- this.$floatable.addClass( 'oo-ui-element-hidden' );
- return;
- } else {
- this.$floatable.removeClass( 'oo-ui-element-hidden' );
- }
-
- if ( !this.needsCustomPosition ) {
- return;
- }
-
- pos = OO.ui.Element.static.getRelativePosition( this.$floatableContainer, this.$floatable.offsetParent() );
-
- // Position under container
- pos.top += this.$floatableContainer.height();
- this.$floatable.css( pos );
-
- // We updated the position, so re-evaluate the clipping state.
- // (ClippableElement does not listen to 'scroll' events on $floatableContainer's parent, and so
- // will not notice the need to update itself.)
- // TODO: This is terrible, we shouldn't need to know about ClippableElement at all here. Why does
- // it not listen to the right events in the right places?
- if ( this.clip ) {
- this.clip();
- }
-
- return this;
-};
-
/**
* FloatingMenuSelectWidget is a menu that will stick under a specified
* container, even when it is inserted elsewhere in the document (for example,
* @throws {Error} An error is thrown if no widget is specified
*/
OO.ui.FieldLayout = function OoUiFieldLayout( fieldWidget, config ) {
- var hasInputWidget, $div;
+ var hasInputWidget;
// Allow passing positional parameters inside the config object
if ( OO.isPlainObject( fieldWidget ) && config === undefined ) {
this.align = null;
if ( config.help ) {
this.popupButtonWidget = new OO.ui.PopupButtonWidget( {
+ popup: {
+ padded: true
+ },
classes: [ 'oo-ui-fieldLayout-help' ],
framed: false,
icon: 'info'
} );
-
- $div = $( '<div>' );
if ( config.help instanceof OO.ui.HtmlSnippet ) {
- $div.html( config.help.toString() );
+ this.popupButtonWidget.getPopup().$body.html( config.help.toString() );
} else {
- $div.text( config.help );
+ this.popupButtonWidget.getPopup().$body.text( config.help );
}
- this.popupButtonWidget.getPopup().$body.append(
- $div.addClass( 'oo-ui-fieldLayout-help-content' )
- );
this.$help = this.popupButtonWidget.$element;
} else {
this.$help = $( [] );
* For important messages, you are advised to use `notices`, as they are always shown.
*/
OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) {
- var $div;
-
// Configuration initialization
config = config || {};
this.$header = $( '<div>' );
if ( config.help ) {
this.popupButtonWidget = new OO.ui.PopupButtonWidget( {
+ popup: {
+ padded: true
+ },
classes: [ 'oo-ui-fieldsetLayout-help' ],
framed: false,
icon: 'info'
} );
-
- $div = $( '<div>' );
if ( config.help instanceof OO.ui.HtmlSnippet ) {
- $div.html( config.help.toString() );
+ this.popupButtonWidget.getPopup().$body.html( config.help.toString() );
} else {
- $div.text( config.help );
+ this.popupButtonWidget.getPopup().$body.text( config.help );
}
- this.popupButtonWidget.getPopup().$body.append(
- $div.addClass( 'oo-ui-fieldsetLayout-help-content' )
- );
this.$help = this.popupButtonWidget.$element;
} else {
this.$help = $( [] );
OO.mixinClass( OO.ui.HorizontalLayout, OO.ui.mixin.GroupElement );
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-core.js.map
\ No newline at end of file
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-01T23:04:40Z
*/
( function ( OO ) {
OO.ui.theme = new OO.ui.MediaWikiTheme();
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-mediawiki.js.map
\ No newline at end of file
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
-ms-filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff1f7fb', endColorstr='#ffffffff' )";
}
.oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
- top: 2.5em;
margin: 0 -1px;
border: 1px solid #ccc;
background-color: #fff;
box-shadow: 0 0.3125em 1.25em rgba(0, 0, 0, 0.25);
}
+.oo-ui-toolbar-position-top .oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
+ top: 2.5em;
+}
+.oo-ui-toolbar-position-bottom .oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
+ bottom: 2.5em;
+}
.oo-ui-popupToolGroup .oo-ui-tool-link {
padding: 0.3125em 0 0.3125em 0.3125em;
}
pointer-events: none;
}
.oo-ui-toolbar-bar {
- border-bottom: 1px solid #ccc;
background-color: #f8fbfd;
background-image: -webkit-gradient(linear, right top, right bottom, color-stop(0, #fff), color-stop(100%, #F1F7FB));
background-image: -webkit-linear-gradient(top, #fff 0, #F1F7FB 100%);
background-image: linear-gradient(to bottom, #fff 0, #F1F7FB 100%);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffffff', endColorstr='#fff1f7fb' )";
}
+.oo-ui-toolbar-position-top .oo-ui-toolbar-bar {
+ border-bottom: 1px solid #ccc;
+}
+.oo-ui-toolbar-position-bottom .oo-ui-toolbar-bar {
+ border-top: 1px solid #ccc;
+}
.oo-ui-toolbar-bar .oo-ui-toolbar-bar {
border: 0;
background: none;
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-tool.oo-ui-widget-enabled {
-webkit-transition: background-color 100ms;
left: 0;
}
.oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
- top: 3.125em;
margin: 0 -1px;
border: 1px solid #c8ccd1;
background-color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.25);
min-width: 16em;
}
+.oo-ui-toolbar-position-top .oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
+ top: 3.125em;
+}
+.oo-ui-toolbar-position-bottom .oo-ui-popupToolGroup .oo-ui-toolGroup-tools {
+ bottom: 3.125em;
+}
.oo-ui-popupToolGroup .oo-ui-tool-link {
padding: 0.4em 0.625em;
-webkit-box-sizing: border-box;
.oo-ui-toolbar-bar {
background-color: #fff;
color: #222;
- border-bottom: 1px solid #c8ccd1;
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
font-weight: 500;
}
+.oo-ui-toolbar-position-top .oo-ui-toolbar-bar {
+ border-bottom: 1px solid #c8ccd1;
+}
+.oo-ui-toolbar-position-bottom .oo-ui-toolbar-bar {
+ border-top: 1px solid #c8ccd1;
+}
.oo-ui-toolbar-bar .oo-ui-toolbar-bar {
- border-bottom: 0;
+ border: 0;
background-color: transparent;
box-shadow: none;
}
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-01T23:04:40Z
*/
( function ( OO ) {
* in the toolbar, but are not configured as tools. By default, actions are displayed on the right side of
* the toolbar.
* @cfg {boolean} [shadow] Add a shadow below the toolbar.
+ * @cfg {string} [position='top'] Whether the toolbar is positioned above ('top') or below ('bottom') content.
*/
OO.ui.Toolbar = function OoUiToolbar( toolFactory, toolGroupFactory, config ) {
// Allow passing positional parameters inside the config object
this.toolGroupFactory = toolGroupFactory;
this.groups = [];
this.tools = {};
+ this.position = config.position || 'top';
this.$bar = $( '<div>' );
this.$actions = $( '<div>' );
this.initialized = false;
if ( config.shadow ) {
this.$bar.append( '<div class="oo-ui-toolbar-shadow"></div>' );
}
- this.$element.addClass( 'oo-ui-toolbar' ).append( this.$bar );
+ this.$element.addClass( 'oo-ui-toolbar oo-ui-toolbar-position-' + this.position ).append( this.$bar );
};
/* Setup */
}
// Configuration initialization
- config = config || {};
+ config = $.extend( {
+ indicator: toolbar.position === 'bottom' ? 'up' : 'down'
+ }, config );
// Parent constructor
OO.ui.PopupToolGroup.parent.call( this, toolbar, config );
* // Configurations for list toolgroup.
* type: 'list',
* label: 'ListToolGroup',
- * indicator: 'down',
* icon: 'ellipsis',
* title: 'This is the title, displayed when user moves the mouse over the list toolgroup',
* header: 'This is the header',
* type: 'menu',
* header: 'This is the (optional) header',
* title: 'This is the (optional) title',
- * indicator: 'down',
* include: [ 'settings', 'stuff' ]
* }
* ] );
};
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-toolbars.js.map
\ No newline at end of file
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-draggableElement-handle,
.oo-ui-draggableElement-handle.oo-ui-widget {
.oo-ui-capsuleMultiselectWidget-group {
display: inline;
}
+.oo-ui-capsuleMultiselectWidget-popup > .oo-ui-popupWidget-popup > .oo-ui-popupWidget-body > * {
+ display: block;
+}
+.oo-ui-capsuleMultiselectWidget-focusTrap {
+ display: inline-block;
+ height: 1px;
+ width: 1px;
+}
.oo-ui-capsuleMultiselectWidget-handle {
background-color: #fff;
cursor: text;
.oo-ui-capsuleMultiselectWidget.oo-ui-widget-disabled .oo-ui-capsuleMultiselectWidget-handle > .oo-ui-indicatorElement-indicator {
opacity: 0.2;
}
+.oo-ui-capsuleMultiselectWidget-popup > .oo-ui-popupWidget-popup {
+ border: 0;
+}
.oo-ui-capsuleItemWidget {
position: relative;
display: inline-block;
.oo-ui-numberInputWidget-buttoned .oo-ui-textInputWidget {
display: table-cell;
}
-.oo-ui-numberInputWidget-buttoned .oo-ui-buttonElement-button {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
.oo-ui-numberInputWidget-field {
display: table;
table-layout: fixed;
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-draggableElement-handle,
.oo-ui-draggableElement-handle.oo-ui-widget {
.oo-ui-capsuleMultiselectWidget-group {
display: inline;
}
+.oo-ui-capsuleMultiselectWidget-popup > .oo-ui-popupWidget-popup > .oo-ui-popupWidget-body > * {
+ display: block;
+}
+.oo-ui-capsuleMultiselectWidget-focusTrap {
+ display: inline-block;
+ height: 1px;
+ width: 1px;
+}
.oo-ui-capsuleMultiselectWidget-handle {
min-height: 2.4em;
margin-right: 0.5em;
top: 0;
margin: 0.3em;
}
-.oo-ui-capsuleMultiselectWidget .oo-ui-popupWidget {
- width: 100%;
+.oo-ui-capsuleMultiselectWidget-popup {
margin-top: -1px;
}
-.oo-ui-capsuleMultiselectWidget .oo-ui-popupWidget-popup {
- min-width: 100%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- border-width: 0 1px;
- border-radius: 0 0 2px 2px;
+.oo-ui-capsuleMultiselectWidget-popup > .oo-ui-popupWidget-popup {
+ border: 0;
}
.oo-ui-capsuleMultiselectWidget.oo-ui-widget-enabled .oo-ui-capsuleMultiselectWidget-handle {
background-color: #fff;
.oo-ui-numberInputWidget-buttoned .oo-ui-textInputWidget {
display: table-cell;
}
-.oo-ui-numberInputWidget-buttoned .oo-ui-buttonElement-button {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
.oo-ui-numberInputWidget-field {
display: table;
table-layout: fixed;
}
.oo-ui-numberInputWidget-buttoned .oo-ui-buttonElement-button {
display: block;
+ min-width: 2.5em;
min-height: 2.5em;
padding-left: 0;
padding-right: 0;
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-01T23:04:40Z
*/
( function ( OO ) {
OO.ui.BookletLayout.prototype.onStackLayoutSet = function ( page ) {
var layout = this;
if ( !this.scrolling && page ) {
- page.scrollElementIntoView( {
- complete: function () {
- if ( layout.autoFocus && !OO.ui.isMobile() ) {
- layout.focus();
- }
+ page.scrollElementIntoView().done( function () {
+ if ( layout.autoFocus && !OO.ui.isMobile() ) {
+ layout.focus();
}
} );
}
OO.ui.IndexLayout.prototype.onStackLayoutSet = function ( card ) {
var layout = this;
if ( card ) {
- card.scrollElementIntoView( {
- complete: function () {
- if ( layout.autoFocus && !OO.ui.isMobile() ) {
- layout.focus();
- }
+ card.scrollElementIntoView().done( function () {
+ if ( layout.autoFocus && !OO.ui.isMobile() ) {
+ layout.focus();
}
} );
}
align: 'forwards',
anchor: false
} );
- OO.ui.mixin.PopupElement.call( this, config );
+ OO.ui.mixin.PopupElement.call( this, $.extend( true, {}, config, {
+ popup: {
+ $floatableContainer: this.$element
+ }
+ } ) );
$tabFocus = $( '<span>' );
OO.ui.mixin.TabIndexedElement.call( this, $.extend( {}, config, { $tabIndexed: $tabFocus } ) );
} else {
this.$element.addClass( 'oo-ui-capsuleMultiselectWidget' )
.append( this.$handle );
if ( this.popup ) {
+ this.popup.$element.addClass( 'oo-ui-capsuleMultiselectWidget-popup' );
this.$content.append( $tabFocus );
this.$overlay.append( this.popup.$element );
} else {
this.$content.append( this.$input );
this.$overlay.append( this.menu.$element );
}
+ if ( $tabFocus ) {
+ $tabFocus.addClass( 'oo-ui-capsuleMultiselectWidget-focusTrap' );
+ }
// Input size needs to be calculated after everything else is rendered
setTimeout( function () {
OO.ui.CapsuleMultiselectWidget.prototype.focus = function () {
if ( !this.isDisabled() ) {
if ( this.popup ) {
- this.popup.setSize( this.$handle.width() );
+ this.popup.setSize( this.$handle.outerWidth() );
this.popup.toggle( true );
OO.ui.findFocusable( this.popup.$element ).focus();
} else {
};
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-widgets.js.map
\ No newline at end of file
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:32Z
+ * Date: 2017-02-01T23:04:44Z
*/
.oo-ui-window {
background: transparent;
/*!
- * OOjs UI v0.18.4-fix (d4045dee45)
+ * OOjs UI v0.19.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2017 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2017-01-19T20:22:26Z
+ * Date: 2017-02-01T23:04:40Z
*/
( function ( OO ) {
list = {};
for ( i = 0, len = windows.length; i < len; i++ ) {
name = windows[ i ].constructor.static.name;
- if ( typeof name !== 'string' ) {
- throw new Error( 'Cannot add window' );
- }
if ( !name ) {
- OO.ui.warnDeprecation( 'OO.ui.WindowManager#addWindows: Windows must have a `name` static property defined.' );
+ throw new Error( 'Windows must have a `name` static property defined.' );
}
list[ name ] = windows[ i ];
}
};
}( OO ) );
-
-//# sourceMappingURL=oojs-ui-windows.js.map
\ No newline at end of file