From be607d61d6e2bd7b2784045a2fe078c4cfc5a76b Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 24 Mar 2014 17:35:46 -0700 Subject: [PATCH] Update OOjs UI to v0.1.0 New changes: 4f4fc2c Localisation updates from https://translatewiki.net. ea88cce Localisation updates from https://translatewiki.net. 37af34f Add the ability to clear the SearchWidget 1cd4b32 Make PopupWidget clippable. 81f2edc Localisation updates from https://translatewiki.net. fa6e8e5 Make popup toolgroup labels a little closer to their icons Change-Id: I63fb1f9edb24a86cc882b204075540427ac4d11b --- resources/oojs-ui/i18n/frr.json | 1 + resources/oojs-ui/i18n/gu.json | 1 + resources/oojs-ui/i18n/pl.json | 2 +- resources/oojs-ui/i18n/sco.json | 6 +++++- resources/oojs-ui/oojs-ui.js | 18 +++++++++++++++--- resources/oojs-ui/oojs-ui.svg.css | 12 ++++++++---- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/resources/oojs-ui/i18n/frr.json b/resources/oojs-ui/i18n/frr.json index ee95b8a003..adf8ce813a 100644 --- a/resources/oojs-ui/i18n/frr.json +++ b/resources/oojs-ui/i18n/frr.json @@ -8,5 +8,6 @@ "ooui-dialog-action-close": "Slütj", "ooui-outline-control-move-down": "Element efter onern sküüw", "ooui-outline-control-move-up": "Element efter boowen sküüw", + "ooui-outline-control-remove": "Element wechnem", "ooui-toolbar-more": "Muar" } \ No newline at end of file diff --git a/resources/oojs-ui/i18n/gu.json b/resources/oojs-ui/i18n/gu.json index 65ec22b8bf..ccabf8d443 100644 --- a/resources/oojs-ui/i18n/gu.json +++ b/resources/oojs-ui/i18n/gu.json @@ -9,5 +9,6 @@ "ooui-dialog-action-close": "બંધ કરો", "ooui-outline-control-move-down": "વસ્તુ નીચે ખસેડો", "ooui-outline-control-move-up": "વસ્તુ ઉપર ખસેડો", + "ooui-outline-control-remove": "વસ્તુ હટાવો", "ooui-toolbar-more": "વધુ" } \ No newline at end of file diff --git a/resources/oojs-ui/i18n/pl.json b/resources/oojs-ui/i18n/pl.json index 8798603957..33ff886190 100644 --- a/resources/oojs-ui/i18n/pl.json +++ b/resources/oojs-ui/i18n/pl.json @@ -19,6 +19,6 @@ "ooui-dialog-action-close": "Zamknij", "ooui-outline-control-move-down": "Przenieś niżej", "ooui-outline-control-move-up": "Przenieś wyżej", - "ooui-outline-control-remove": "Usuń przedmiot", + "ooui-outline-control-remove": "Usuń element", "ooui-toolbar-more": "Więcej" } \ No newline at end of file diff --git a/resources/oojs-ui/i18n/sco.json b/resources/oojs-ui/i18n/sco.json index dc3f1f57f8..f8dc77c72a 100644 --- a/resources/oojs-ui/i18n/sco.json +++ b/resources/oojs-ui/i18n/sco.json @@ -4,5 +4,9 @@ "John Reid" ] }, - "ooui-outline-control-remove": "Remuiv eitem" + "ooui-dialog-action-close": "Claise", + "ooui-outline-control-move-down": "Muiv eetem doon", + "ooui-outline-control-move-up": "Muiv eetem up", + "ooui-outline-control-remove": "Remuiv eitem", + "ooui-toolbar-more": "Mair" } \ No newline at end of file diff --git a/resources/oojs-ui/oojs-ui.js b/resources/oojs-ui/oojs-ui.js index 8f3d980cd4..19bcdfe5e9 100644 --- a/resources/oojs-ui/oojs-ui.js +++ b/resources/oojs-ui/oojs-ui.js @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (3b434d5388) + * OOjs UI v0.1.0 * 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: Fri Mar 21 2014 11:06:28 GMT-0700 (PDT) + * Date: Mon Mar 24 2014 17:35:46 GMT-0700 (PDT) */ ( function () { @@ -7044,12 +7044,13 @@ OO.ui.PopupWidget = function OoUiPopupWidget( config ) { // Mixin constructors OO.ui.LabeledElement.call( this, this.$( '
' ), config ); + OO.ui.ClippableElement.call( this, this.$( '
' ), config ); // Properties this.visible = false; this.$popup = this.$( '
' ); this.$head = this.$( '
' ); - this.$body = this.$( '
' ); + this.$body = this.$clippable; this.$tail = this.$( '
' ); this.$container = config.$container || this.$( 'body' ); this.autoClose = !!config.autoClose; @@ -7087,6 +7088,8 @@ OO.inheritClass( OO.ui.PopupWidget, OO.ui.Widget ); OO.mixinClass( OO.ui.PopupWidget, OO.ui.LabeledElement ); +OO.mixinClass( OO.ui.PopupWidget, OO.ui.ClippableElement ); + /* Events */ /** @@ -7192,6 +7195,7 @@ OO.ui.PopupWidget.prototype.hasTail = function () { */ OO.ui.PopupWidget.prototype.show = function () { if ( !this.visible ) { + this.setClipping( true ); this.$element.show(); this.visible = true; this.emit( 'show' ); @@ -7211,6 +7215,7 @@ OO.ui.PopupWidget.prototype.show = function () { */ OO.ui.PopupWidget.prototype.hide = function () { if ( this.visible ) { + this.setClipping( false ); this.$element.hide(); this.visible = false; this.emit( 'hide' ); @@ -7476,6 +7481,13 @@ OO.ui.SearchWidget.prototype.getQuery = function () { return this.query; }; +/** + * Reset the widget to initial value. + */ +OO.ui.SearchWidget.prototype.clear = function () { + this.query.setValue( '' ); +}; + /** * Get the results list. * diff --git a/resources/oojs-ui/oojs-ui.svg.css b/resources/oojs-ui/oojs-ui.svg.css index dbce03deb6..b546253a12 100644 --- a/resources/oojs-ui/oojs-ui.svg.css +++ b/resources/oojs-ui/oojs-ui.svg.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.1.0-pre (3b434d5388) + * OOjs UI v0.1.0 * 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: Fri Mar 21 2014 11:06:28 GMT-0700 (PDT) + * Date: Mon Mar 24 2014 17:35:46 GMT-0700 (PDT) */ /* Textures */ @@ -625,7 +625,7 @@ } .oo-ui-popupToolGroup.oo-ui-iconedElement .oo-ui-popupToolGroup-handle .oo-ui-labeledElement-label { - margin-left: 3.25em; + margin-left: 3em; } .oo-ui-popupToolGroup.oo-ui-indicatedElement .oo-ui-popupToolGroup-handle .oo-ui-labeledElement-label { @@ -653,7 +653,7 @@ display: inline-block; width: 2em; height: 2em; - margin-right: 0.5em; + margin-right: 0.25em; vertical-align: middle; } @@ -805,6 +805,10 @@ cursor: default; } +.oo-ui-popupWidget-body { + clear: both; +} + .oo-ui-buttonGroupWidget { border-radius: 0.3em; } -- 2.20.1