jenkins-bot has submitted this change and it was merged.

Change subject: Update OOjs UI to v0.1.0-pre (531d497d3b)
......................................................................


Update OOjs UI to v0.1.0-pre (531d497d3b)

New changes:
3cd90ee TextInputWidget: Allow changing 'type' attribute
8bf9c29 FormLayout: Accept HTML form attributes as config options
fadc51d OOUI PHP: Unbreak ButtonWidget
50b926c build: Introduce 'quick-build' task
8e71673 Make padding between popup and container configurable
e432f9f Fix anchor positioning on popups
16ae17a PopupWidget: Remove references to 'show' and 'hide' events
cfe286f Localisation updates from https://translatewiki.net.
272476b GridLayout: Set dimensions.visibility = '' again if we have a height 
and a width

Change-Id: Ia2a6125e0da7659b08252b4ea2c2ddd9f6baa88a
---
M lib/oojs-ui/i18n/es.json
M lib/oojs-ui/i18n/et.json
M lib/oojs-ui/i18n/ro.json
M lib/oojs-ui/i18n/sv.json
M lib/oojs-ui/oojs-ui-apex.css
M lib/oojs-ui/oojs-ui-apex.js
M lib/oojs-ui/oojs-ui-apex.rtl.css
M lib/oojs-ui/oojs-ui-apex.svg.css
M lib/oojs-ui/oojs-ui-apex.svg.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki.css
M lib/oojs-ui/oojs-ui-mediawiki.js
M lib/oojs-ui/oojs-ui-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki.svg.css
M lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
M lib/oojs-ui/oojs-ui.js
15 files changed, 60 insertions(+), 47 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/oojs-ui/i18n/es.json b/lib/oojs-ui/i18n/es.json
index 7660d4a..82699a3 100644
--- a/lib/oojs-ui/i18n/es.json
+++ b/lib/oojs-ui/i18n/es.json
@@ -22,6 +22,8 @@
        "ooui-outline-control-move-up": "Subir elemento",
        "ooui-outline-control-remove": "Eliminar elemento",
        "ooui-toolbar-more": "Más",
+       "ooui-toolgroup-expand": "Más",
+       "ooui-toolgroup-collapse": "Menos",
        "ooui-dialog-message-accept": "Aceptar",
        "ooui-dialog-message-reject": "Cancelar",
        "ooui-dialog-process-error": "Algo salió mal",
diff --git a/lib/oojs-ui/i18n/et.json b/lib/oojs-ui/i18n/et.json
index ac3af74..7b33735 100644
--- a/lib/oojs-ui/i18n/et.json
+++ b/lib/oojs-ui/i18n/et.json
@@ -9,6 +9,8 @@
        "ooui-outline-control-move-up": "Liiguta üksust ülespoole",
        "ooui-outline-control-remove": "Eemalda üksus",
        "ooui-toolbar-more": "Veel",
+       "ooui-toolgroup-expand": "Veel",
+       "ooui-toolgroup-collapse": "Vähem",
        "ooui-dialog-message-accept": "Sobib",
        "ooui-dialog-message-reject": "Loobu",
        "ooui-dialog-process-error": "Midagi läks valesti",
diff --git a/lib/oojs-ui/i18n/ro.json b/lib/oojs-ui/i18n/ro.json
index 06e0f1d..17359bd 100644
--- a/lib/oojs-ui/i18n/ro.json
+++ b/lib/oojs-ui/i18n/ro.json
@@ -12,6 +12,8 @@
        "ooui-outline-control-move-up": "Mută elementul mai sus",
        "ooui-outline-control-remove": "Elimină elementul",
        "ooui-toolbar-more": "Mai mult",
+       "ooui-toolgroup-expand": "Mai multe",
+       "ooui-toolgroup-collapse": "Mai puține",
        "ooui-dialog-message-accept": "OK",
        "ooui-dialog-message-reject": "Revocare",
        "ooui-dialog-process-error": "Ceva nu a funcționat",
diff --git a/lib/oojs-ui/i18n/sv.json b/lib/oojs-ui/i18n/sv.json
index 40305d0..d61d951 100644
--- a/lib/oojs-ui/i18n/sv.json
+++ b/lib/oojs-ui/i18n/sv.json
@@ -18,6 +18,8 @@
        "ooui-outline-control-move-up": "Flytta upp objekt",
        "ooui-outline-control-remove": "Ta bort objekt",
        "ooui-toolbar-more": "Mer",
+       "ooui-toolgroup-expand": "Fler",
+       "ooui-toolgroup-collapse": "Färre",
        "ooui-dialog-message-accept": "OK",
        "ooui-dialog-message-reject": "Avbryt",
        "ooui-dialog-process-error": "Något gick fel",
diff --git a/lib/oojs-ui/oojs-ui-apex.css b/lib/oojs-ui/oojs-ui-apex.css
index 1714d2a..bc21945 100644
--- a/lib/oojs-ui/oojs-ui-apex.css
+++ b/lib/oojs-ui/oojs-ui-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-apex.js b/lib/oojs-ui/oojs-ui-apex.js
index 4f6a190..f725f72 100644
--- a/lib/oojs-ui/oojs-ui-apex.js
+++ b/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:47Z
+ * Date: 2014-10-21T23:52:11Z
  */
 /* Instantiation */
 
diff --git a/lib/oojs-ui/oojs-ui-apex.rtl.css b/lib/oojs-ui/oojs-ui-apex.rtl.css
index fe6f9f5..7203faf 100644
--- a/lib/oojs-ui/oojs-ui-apex.rtl.css
+++ b/lib/oojs-ui/oojs-ui-apex.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-apex.svg.css b/lib/oojs-ui/oojs-ui-apex.svg.css
index ec201b0..21f61c7 100644
--- a/lib/oojs-ui/oojs-ui-apex.svg.css
+++ b/lib/oojs-ui/oojs-ui-apex.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-apex.svg.rtl.css 
b/lib/oojs-ui/oojs-ui-apex.svg.rtl.css
index 3277e5c..4619dcc 100644
--- a/lib/oojs-ui/oojs-ui-apex.svg.rtl.css
+++ b/lib/oojs-ui/oojs-ui-apex.svg.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.css 
b/lib/oojs-ui/oojs-ui-mediawiki.css
index d63dc61..f8f99d7 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.js b/lib/oojs-ui/oojs-ui-mediawiki.js
index 66ac7f3..cf50bc4 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.js
+++ b/lib/oojs-ui/oojs-ui-mediawiki.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:47Z
+ * Date: 2014-10-21T23:52:11Z
  */
 /**
  * @class
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.rtl.css 
b/lib/oojs-ui/oojs-ui-mediawiki.rtl.css
index 65acc9e..33a67d9 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.rtl.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.svg.css 
b/lib/oojs-ui/oojs-ui-mediawiki.svg.css
index 77ad0dc..e962308 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.svg.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css 
b/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
index 3891f80..d351244 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:57Z
+ * Date: 2014-10-21T23:52:21Z
  */
 /* @noflip */
 .oo-ui-rtl {
diff --git a/lib/oojs-ui/oojs-ui.js b/lib/oojs-ui/oojs-ui.js
index e0d8999..d6bc61c 100644
--- a/lib/oojs-ui/oojs-ui.js
+++ b/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (44db8292bf)
+ * OOjs UI v0.1.0-pre (531d497d3b)
  * 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-10-21T18:30:47Z
+ * Date: 2014-10-21T23:52:11Z
  */
 ( function ( OO ) {
 
@@ -6782,6 +6782,9 @@
  *
  * @constructor
  * @param {Object} [config] Configuration options
+ * @cfg {string} [method] HTML form `method` attribute
+ * @cfg {string} [action] HTML form `action` attribute
+ * @cfg {string} [enctype] HTML form `enctype` attribute
  */
 OO.ui.FormLayout = function OoUiFormLayout( config ) {
        // Configuration initialization
@@ -6794,7 +6797,13 @@
        this.$element.on( 'submit', this.onFormSubmit.bind( this ) );
 
        // Initialization
-       this.$element.addClass( 'oo-ui-formLayout' );
+       this.$element
+               .addClass( 'oo-ui-formLayout' )
+               .attr( {
+                       method: config.method,
+                       action: config.action,
+                       enctype: config.enctype
+               } );
 };
 
 /* Setup */
@@ -6954,6 +6963,8 @@
                        // HACK: Work around IE bug by setting visibility: 
hidden; if width or height is zero
                        if ( width === 0 || height === 0 ) {
                                dimensions.visibility = 'hidden';
+                       } else {
+                               dimensions.visibility = '';
                        }
                        panel.$element.css( dimensions );
                        i++;
@@ -8379,7 +8390,7 @@
  */
 OO.ui.ButtonWidget.prototype.onKeyPress = function ( e ) {
        if ( !this.isDisabled() && ( e.which === OO.ui.Keys.SPACE || e.which 
=== OO.ui.Keys.ENTER ) ) {
-               this.onClick();
+               this.emit( 'click' );
                if ( this.isHyperlink ) {
                        return true;
                }
@@ -9321,6 +9332,7 @@
  *
  * @constructor
  * @param {Object} [config] Configuration options
+ * @cfg {string} [type='text'] HTML tag `type` attribute
  * @cfg {string} [placeholder] Placeholder text
  * @cfg {boolean} [multiline=false] Allow multiple lines of text
  * @cfg {boolean} [autosize=false] Automatically resize to fit content
@@ -9523,10 +9535,9 @@
  * @return {jQuery} Input element
  */
 OO.ui.TextInputWidget.prototype.getInputElement = function ( config ) {
-       return config.multiline ? this.$( '<textarea>' ) : this.$( '<input 
type="text" />' );
+       var type = config.type || 'text';
+       return config.multiline ? this.$( '<textarea>' ) : this.$( '<input 
type="' + type + '" />' );
 };
-
-/* Methods */
 
 /**
  * Check if input supports multiple lines.
@@ -10255,6 +10266,7 @@
  * @cfg {boolean} [anchor=true] Show anchor pointing to origin of popup
  * @cfg {string} [align='center'] Alignment of popup to origin
  * @cfg {jQuery} [$container] Container to prevent popup from rendering 
outside of
+ * @cfg {number} [containerPadding=10] How much padding to keep between popup 
and container
  * @cfg {jQuery} [$content] Content to append to the popup's body
  * @cfg {boolean} [autoClose=false] Popup auto-closes when it loses focus
  * @cfg {jQuery} [$autoCloseIgnore] Elements to not auto close when clicked
@@ -10278,7 +10290,9 @@
        this.$head = this.$( '<div>' );
        this.$body = this.$( '<div>' );
        this.$anchor = this.$( '<div>' );
-       this.$container = config.$container; // If undefined, will be computed 
lazily in updateDimensions()
+       // If undefined, will be computed lazily in updateDimensions()
+       this.$container = config.$container;
+       this.containerPadding = config.containerPadding !== undefined ? 
config.containerPadding : 10;
        this.autoClose = !!config.autoClose;
        this.$autoCloseIgnore = config.$autoCloseIgnore;
        this.transitionTimeout = null;
@@ -10324,16 +10338,6 @@
 OO.inheritClass( OO.ui.PopupWidget, OO.ui.Widget );
 OO.mixinClass( OO.ui.PopupWidget, OO.ui.LabelElement );
 OO.mixinClass( OO.ui.PopupWidget, OO.ui.ClippableElement );
-
-/* Events */
-
-/**
- * @event hide
- */
-
-/**
- * @event show
- */
 
 /* Methods */
 
@@ -10462,8 +10466,7 @@
 OO.ui.PopupWidget.prototype.updateDimensions = function ( transition ) {
        var popupOffset, originOffset, containerLeft, containerWidth, 
containerRight,
                popupLeft, popupRight, overlapLeft, overlapRight, anchorWidth,
-               widget = this,
-               padding = 10;
+               widget = this;
 
        if ( !this.$container ) {
                // Lazy-initialize $container if not specified in constructor
@@ -10485,8 +10488,8 @@
        containerLeft = Math.round( this.$container.offset().left );
        containerWidth = this.$container.innerWidth();
        containerRight = containerLeft + containerWidth;
-       popupLeft = popupOffset - padding;
-       popupRight = popupOffset + padding + this.width + padding;
+       popupLeft = popupOffset - this.containerPadding;
+       popupRight = popupOffset + this.containerPadding + this.width + 
this.containerPadding;
        overlapLeft = ( originOffset + popupLeft ) - containerLeft;
        overlapRight = containerRight - ( originOffset + popupRight );
 
@@ -10498,11 +10501,13 @@
        }
 
        // Adjust offset to avoid anchor being rendered too close to the edge
-       anchorWidth = this.$anchor.width();
-       if ( this.align === 'right' ) {
-               popupOffset += anchorWidth;
-       } else if ( this.align === 'left' ) {
-               popupOffset -= anchorWidth;
+       // $anchor.width() doesn't work with the pure CSS anchor (returns 0)
+       // TODO: Find a measurement that works for CSS anchors and image anchors
+       anchorWidth = this.$anchor[0].scrollWidth * 2;
+       if ( popupOffset + this.width < anchorWidth ) {
+               popupOffset = anchorWidth - this.width;
+       } else if ( -popupOffset < anchorWidth ) {
+               popupOffset = -anchorWidth;
        }
 
        // Prevent transition from being interrupted

-- 
To view, visit https://gerrit.wikimedia.org/r/167988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2a6125e0da7659b08252b4ea2c2ddd9f6baa88a
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to