Update OOjs UI to v0.12.12
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 13 Oct 2015 20:40:33 +0000 (13:40 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 13 Oct 2015 20:40:33 +0000 (13:40 -0700)
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.12/History.md

Change-Id: If241c883b8c079ea9f1d73c8eb6f51c99dd615ac

composer.json
resources/lib/oojs-ui/i18n/nb.json
resources/lib/oojs-ui/i18n/pa.json
resources/lib/oojs-ui/oojs-ui-apex-noimages.css
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui.js

index 46ff59c..6209017 100644 (file)
@@ -21,7 +21,7 @@
                "ext-iconv": "*",
                "liuggio/statsd-php-client": "1.0.16",
                "mediawiki/at-ease": "1.1.0",
-               "oojs/oojs-ui": "0.12.11",
+               "oojs/oojs-ui": "0.12.12",
                "oyejorge/less.php": "1.7.0.9",
                "php": ">=5.3.3",
                "psr/log": "1.0.0",
index 4efb02a..d3fad8d 100644 (file)
@@ -22,6 +22,8 @@
        "ooui-dialog-process-dismiss": "Lukk",
        "ooui-dialog-process-retry": "Prøv igjen",
        "ooui-dialog-process-continue": "Fortsett",
+       "ooui-selectfile-button-select": "Velg en fil",
        "ooui-selectfile-not-supported": "Filvalg er ikke støttet",
-       "ooui-selectfile-placeholder": "Ingen fil er valgt"
+       "ooui-selectfile-placeholder": "Ingen fil er valgt",
+       "ooui-selectfile-dragdrop-placeholder": "Slipp fil her"
 }
index 0661b3f..a69d76f 100644 (file)
@@ -10,6 +10,7 @@
        },
        "ooui-outline-control-move-down": "ਨੀਚੇ ਲੈਕੇ ਜਾਓ",
        "ooui-outline-control-move-up": "ਉੱਤੇ ਲੈਕੇ ਜਾਓ",
+       "ooui-outline-control-remove": "ਆਈਟਮ ਹਟਾਓ",
        "ooui-toolbar-more": "ਹੋਰ",
        "ooui-toolgroup-expand": "ਹੋਰ",
        "ooui-toolgroup-collapse": "ਥੋੜ੍ਹੇ",
@@ -18,5 +19,9 @@
        "ooui-dialog-process-error": "ਕੁਝ ਗਲਤ ਹੋ ਗਿਆ",
        "ooui-dialog-process-dismiss": "ਰੱਦ ਕਰੋ",
        "ooui-dialog-process-retry": "ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ",
-       "ooui-dialog-process-continue": "ਜਾਰੀ ਰੱਖੋ"
+       "ooui-dialog-process-continue": "ਜਾਰੀ ਰੱਖੋ",
+       "ooui-selectfile-button-select": "ਫ਼ਾਈਲ ਚੁਣੋ",
+       "ooui-selectfile-not-supported": "ਚੁਣੀ ਗਈ ਫ਼ਾਈਲ ਖੋਲੀ ਨਹੀਂ ਜਾ ਸਕਦੀ",
+       "ooui-selectfile-placeholder": "ਕੋਈ ਫ਼ਾਈਲ ਚੁਣੀ ਨਹੀਂ ਗਈ",
+       "ooui-selectfile-dragdrop-placeholder": "ਫ਼ਾਈਲ ਇੱਥੇ ਸਿੱਟੋ"
 }
index 6fb7be6..5012934 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.12.11
+ * OOjs UI v0.12.12
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-10-07T20:48:23Z
+ * Date: 2015-10-13T20:38:26Z
  */
 @-webkit-keyframes oo-ui-progressBarWidget-slide {
        from {
        width: 100%;
 }
 .oo-ui-capsuleMultiSelectWidget-handle {
-       background: #ffffff;
+       background-color: #ffffff;
        cursor: text;
        min-height: 2.4em;
        margin-right: 0.5em;
index d0c8e51..dab3c78 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.12.11
+ * OOjs UI v0.12.12
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-10-07T20:48:15Z
+ * Date: 2015-10-13T20:38:18Z
  */
 /**
  * @class
index 08edbc6..a19ebea 100644 (file)
@@ -1,20 +1,12 @@
-/*
- * Local backports:
- *
- * - aadaa8a187d36ded603eebbdff47efe133908f6c
- *   CapsuleMultiSelectWidget: Set 'background-color' rather than 'background'
- *   Required for mw.widgets.CategorySelector's pending state to display.
- */
-
 /*!
- * OOjs UI v0.12.11
+ * OOjs UI v0.12.12
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-10-07T20:48:23Z
+ * Date: 2015-10-13T20:38:26Z
  */
 @-webkit-keyframes oo-ui-progressBarWidget-slide {
        from {
        min-width: 1em;
        border-radius: 2px;
        position: relative;
-       -webkit-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease;
-          -moz-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease;
-           -ms-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease;
-            -o-transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease;
-               transition: background 100ms ease, color 100ms ease, box-shadow 100ms ease;
+       -webkit-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
+          -moz-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
+           -ms-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
+            -o-transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
+               transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
 }
 .oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:hover,
 .oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:focus {
        opacity: 0;
        z-index: 1;
        position: relative;
+       cursor: pointer;
        margin: 0;
        width: 1.6em;
        height: 1.6em;
        max-width: none;
 }
 .oo-ui-checkboxInputWidget input[type="checkbox"] + span {
-       cursor: pointer;
        -webkit-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
           -moz-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
            -ms-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
        opacity: 0;
        z-index: 1;
        position: relative;
+       cursor: pointer;
        margin: 0;
        width: 1.6em;
        height: 1.6em;
        max-width: none;
 }
 .oo-ui-radioInputWidget input[type="radio"] + span {
-       cursor: pointer;
        -webkit-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
           -moz-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
            -ms-transition: background-size 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
        margin-right: 0;
 }
 .oo-ui-dropdownWidget-handle {
-       padding: 0.3em 0;
+       padding: 0.5em 0;
        height: 2.275em;
        border: 1px solid #cccccc;
        border-radius: 0.1em;
index 60acdd2..e6344f2 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.12.11
+ * OOjs UI v0.12.12
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-10-07T20:48:15Z
+ * Date: 2015-10-13T20:38:18Z
  */
 /**
  * @class
@@ -30,7 +30,7 @@ OO.inheritClass( OO.ui.MediaWikiTheme, OO.ui.Theme );
  */
 OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) {
        // Parent method
-       var variant,
+       var variant, isFramed, isActive,
                variants = {
                        warning: false,
                        invert: false,
@@ -39,13 +39,13 @@ OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) {
                        destructive: false
                },
                // Parent method
-               classes = OO.ui.MediaWikiTheme.parent.prototype.getElementClasses.call( this, element ),
-               isFramed;
+               classes = OO.ui.MediaWikiTheme.parent.prototype.getElementClasses.call( this, element );
 
        if ( element.supports( [ 'hasFlag' ] ) ) {
                isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed();
+               isActive = element.supports( [ 'isActive' ] ) && element.isActive();
                if (
-                       ( isFramed && ( element.isDisabled() || element.hasFlag( 'primary' ) ) ) ||
+                       ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) ||
                        ( !isFramed && element.hasFlag( 'primary' ) )
                ) {
                        variants.invert = true;
index 951acc7..aeff69e 100644 (file)
@@ -1,20 +1,12 @@
-/*
- * Local backports:
- *
- * - 9aba218a882ff45b07410a3ce9d5cdfd8e567e26
- *   CapsuleMultiSelectWidget: When 'allowArbitrary' is true, don't require 'Enter' to confirm
- *   Required for more intuitive behavior of mw.widgets.CategorySelector.
- */
-
 /*!
- * OOjs UI v0.12.11
+ * OOjs UI v0.12.12
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2015 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2015-10-07T20:48:15Z
+ * Date: 2015-10-13T20:38:18Z
  */
 ( function ( OO ) {
 
@@ -1113,7 +1105,8 @@ OO.ui.ActionSet.prototype.organize = function () {
  * @cfg {Array} [content] An array of content elements to append (after #text).
  *  Strings will be html-escaped; use an OO.ui.HtmlSnippet to append raw HTML.
  *  Instances of OO.ui.Element will have their $element appended.
- * @cfg {jQuery} [$content] Content elements to append (after #text)
+ * @cfg {jQuery} [$content] Content elements to append (after #text).
+ * @cfg {jQuery} [$element] Wrapper element. Defaults to a new element with #getTagName.
  * @cfg {Mixed} [data] Custom data of any type or combination of types (e.g., string, number, array, object).
  *  Data can also be specified with the #setData method.
  */
@@ -4241,7 +4234,7 @@ OO.initClass( OO.ui.Theme );
  * @param {OO.ui.Element} element Element for which to get classes
  * @return {Object.<string,string[]>} Categorized class names with `on` and `off` lists
  */
-OO.ui.Theme.prototype.getElementClasses = function ( /* element */ ) {
+OO.ui.Theme.prototype.getElementClasses = function () {
        return { on: [], off: [] };
 };
 
@@ -4633,20 +4626,30 @@ OO.ui.mixin.ButtonElement.prototype.toggleFramed = function ( framed ) {
 };
 
 /**
- * Set the button to its 'active' state.
+ * Set the button's active state.
  *
  * The active state occurs when a {@link OO.ui.ButtonOptionWidget ButtonOptionWidget} or
  * a {@link OO.ui.ToggleButtonWidget ToggleButtonWidget} is pressed. This method does nothing
  * for other button types.
  *
- * @param {boolean} [value] Make button active
+ * @param {boolean} value Make button active
  * @chainable
  */
 OO.ui.mixin.ButtonElement.prototype.setActive = function ( value ) {
-       this.$element.toggleClass( 'oo-ui-buttonElement-active', !!value );
+       this.active = !!value;
+       this.$element.toggleClass( 'oo-ui-buttonElement-active', this.active );
        return this;
 };
 
+/**
+ * Check if the button is active
+ *
+ * @return {boolean} The button is active
+ */
+OO.ui.mixin.ButtonElement.prototype.isActive = function () {
+       return this.active;
+};
+
 /**
  * Any OOjs UI widget that contains other widgets (such as {@link OO.ui.ButtonWidget buttons} or
  * {@link OO.ui.OptionWidget options}) mixes in GroupElement. Adding, removing, and clearing
@@ -14109,6 +14112,18 @@ OO.ui.SelectFileWidget.prototype.setValue = function ( file ) {
        }
 };
 
+/**
+ * Focus the widget.
+ *
+ * Focusses the select file button.
+ *
+ * @chainable
+ */
+OO.ui.SelectFileWidget.prototype.focus = function () {
+       this.selectButton.$button[ 0 ].focus();
+       return this;
+};
+
 /**
  * Update the user interface when a file is selected or unselected
  *