Update OOjs UI to v0.1.0-pre (fe4076af75)
authorJames D. Forrester <jforrester@wikimedia.org>
Thu, 13 Nov 2014 22:25:31 +0000 (22:25 +0000)
committerJames D. Forrester <jforrester@wikimedia.org>
Thu, 13 Nov 2014 22:26:06 +0000 (22:26 +0000)
New changes:
b758cff Localisation updates from https://translatewiki.net.
2584648 MenuWidget: Don't close menu when you click the scroll bar
16d057c Don't close PopupToolGroups when the scroll bar is clicked
fe4076a Localisation updates from https://translatewiki.net.

Change-Id: I1872d16e33e8ad8f4d0e13ce7533587ab3b0614a

resources/lib/oojs-ui/i18n/ka.json
resources/lib/oojs-ui/i18n/nl.json
resources/lib/oojs-ui/i18n/pl.json
resources/lib/oojs-ui/oojs-ui-apex.css
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-apex.svg.css
resources/lib/oojs-ui/oojs-ui-mediawiki.css
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css
resources/lib/oojs-ui/oojs-ui.js

index b79ab50..60ef661 100644 (file)
        },
        "ooui-outline-control-move-down": "ელემენტის ქვემოთ გადატანა",
        "ooui-outline-control-move-up": "ელემენტის ზემოთ გადატანა",
-       "ooui-toolbar-more": "მეტი"
+       "ooui-outline-control-remove": "წაშლა",
+       "ooui-toolbar-more": "მეტი",
+       "ooui-toolgroup-expand": "მეტი",
+       "ooui-toolgroup-collapse": "რამდენიმე",
+       "ooui-dialog-message-accept": "კარგი",
+       "ooui-dialog-message-reject": "გაუქმება",
+       "ooui-dialog-process-error": "მოხდა რაღაც შეცდომა",
+       "ooui-dialog-process-dismiss": "დამალვა",
+       "ooui-dialog-process-retry": "კიდევ სცადეთ",
+       "ooui-dialog-process-continue": "გაგრძელება"
 }
index a7b4c08..7c7b176 100644 (file)
        "ooui-outline-control-move-up": "Item omhoog verplaatsen",
        "ooui-outline-control-remove": "Item verwijderen",
        "ooui-toolbar-more": "Meer",
+       "ooui-toolgroup-expand": "Meer",
+       "ooui-toolgroup-collapse": "Minder",
        "ooui-dialog-message-accept": "OK",
        "ooui-dialog-message-reject": "Annuleren",
        "ooui-dialog-process-error": "Er is iets misgegaan",
        "ooui-dialog-process-dismiss": "Sluiten",
-       "ooui-dialog-process-retry": "Opnieuw proberen"
+       "ooui-dialog-process-retry": "Opnieuw proberen",
+       "ooui-dialog-process-continue": "Doorgaan"
 }
index dea65eb..fbd0c8c 100644 (file)
@@ -23,6 +23,8 @@
        "ooui-outline-control-move-up": "Przenieś wyżej",
        "ooui-outline-control-remove": "Usuń element",
        "ooui-toolbar-more": "Więcej",
+       "ooui-toolgroup-expand": "Więcej",
+       "ooui-toolgroup-collapse": "Mniej",
        "ooui-dialog-message-accept": "OK",
        "ooui-dialog-message-reject": "Anuluj",
        "ooui-dialog-process-error": "Coś poszło nie tak",
index b225b4b..f633de2 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:30:00Z
+ * Date: 2014-11-13T22:25:27Z
  */
 /* @noflip */
 .oo-ui-rtl {
index 8c4ddfc..c61b3b9 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:29:49Z
+ * Date: 2014-11-13T22:25:17Z
  */
 /* Instantiation */
 
index 14ad38f..23313e5 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:30:00Z
+ * Date: 2014-11-13T22:25:27Z
  */
 /* @noflip */
 .oo-ui-rtl {
index 34db397..f13404b 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:30:00Z
+ * Date: 2014-11-13T22:25:27Z
  */
 /* @noflip */
 .oo-ui-rtl {
index 1ef5bca..856be2a 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:29:49Z
+ * Date: 2014-11-13T22:25:17Z
  */
 /**
  * @class
index aa5605a..b901a4c 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:30:00Z
+ * Date: 2014-11-13T22:25:27Z
  */
 /* @noflip */
 .oo-ui-rtl {
index a8d0029..d781397 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (05f0fefc3f)
+ * OOjs UI v0.1.0-pre (fe4076af75)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-11T16:29:49Z
+ * Date: 2014-11-13T22:25:17Z
  */
 ( function ( OO ) {
 
@@ -93,6 +93,30 @@ OO.ui.getLocalValue = function ( obj, lang, fallback ) {
        return undefined;
 };
 
+/**
+ * Check if a node is contained within another node
+ *
+ * Similar to jQuery#contains except a list of containers can be supplied
+ * and a boolean argument allows you to include the container in the match list
+ *
+ * @param {HTMLElement|HTMLElement[]} containers Container node(s) to search in
+ * @param {HTMLElement} contained Node to find
+ * @param {boolean} [matchContainers] Include the container(s) in the list of nodes to match, otherwise only match descendents
+ * @returns {boolean} The node is in the list of target nodes
+ */
+OO.ui.contains = function ( containers, contained, matchContainers ) {
+       var i;
+       if ( !Array.isArray( containers ) ) {
+               containers = [ containers ];
+       }
+       for ( i = containers.length - 1; i >= 0; i-- ) {
+               if ( ( matchContainers && contained === containers[i] ) || $.contains( containers[i], contained ) ) {
+                       return true;
+               }
+       }
+       return false;
+};
+
 ( function () {
        /**
         * Message store for the default implementation of OO.ui.msg
@@ -7474,7 +7498,9 @@ OO.ui.PopupToolGroup.prototype.onBlur = function ( e ) {
  */
 OO.ui.PopupToolGroup.prototype.onPointerUp = function ( e ) {
        // e.which is 0 for touch events, 1 for left mouse button
-       if ( !this.isDisabled() && e.which <= 1 ) {
+       // Only close toolgroup when a tool was actually selected
+       // FIXME: this duplicates logic from the parent class
+       if ( !this.isDisabled() && e.which <= 1 && this.pressed && this.pressed === this.getTargetTool( e ) ) {
                this.setActive( false );
        }
        return OO.ui.PopupToolGroup.super.prototype.onPointerUp.call( this, e );
@@ -11488,7 +11514,10 @@ OO.mixinClass( OO.ui.MenuWidget, OO.ui.ClippableElement );
  * @param {jQuery.Event} e Key down event
  */
 OO.ui.MenuWidget.prototype.onDocumentMouseDown = function ( e ) {
-       if ( !$.contains( this.$element[0], e.target ) && ( !this.$widget || !$.contains( this.$widget[0], e.target ) ) ) {
+       if (
+               !OO.ui.contains( this.$element[0], e.target, true ) &&
+               ( !this.$widget || !OO.ui.contains( this.$widget[0], e.target, true ) )
+       ) {
                this.toggle( false );
        }
 };