dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ebdd92f
)
Update OOjs UI to v0.15.4
author
James D. Forrester
<jforrester@wikimedia.org>
Wed, 17 Feb 2016 02:10:44 +0000
(18:10 -0800)
committer
James D. Forrester
<jforrester@wikimedia.org>
Wed, 17 Feb 2016 02:10:44 +0000
(18:10 -0800)
Release notes:
https://git.wikimedia.org/blob/oojs%2Fui.git/v0.15.4/History.md
Change-Id: I29c8db4c654ecf575113199ace1006d70ce29012
17 files changed:
composer.json
patch
|
blob
|
history
resources/lib/oojs-ui/i18n/nn.json
patch
|
blob
|
history
resources/lib/oojs-ui/i18n/tt-cyrl.json
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-apex.js
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-core-apex.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-core.js
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-mediawiki.js
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-toolbars.js
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-widgets.js
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-windows-apex.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
patch
|
blob
|
history
resources/lib/oojs-ui/oojs-ui-windows.js
patch
|
blob
|
history
diff --git
a/composer.json
b/composer.json
index
0b50c2a
..
5bec8e4
100644
(file)
--- a/
composer.json
+++ b/
composer.json
@@
-21,7
+21,7
@@
"ext-iconv": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
"ext-iconv": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
- "oojs/oojs-ui": "0.15.
3
",
+ "oojs/oojs-ui": "0.15.
4
",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
diff --git
a/resources/lib/oojs-ui/i18n/nn.json
b/resources/lib/oojs-ui/i18n/nn.json
index
943e6ad
..
c8fba3d
100644
(file)
--- a/
resources/lib/oojs-ui/i18n/nn.json
+++ b/
resources/lib/oojs-ui/i18n/nn.json
@@
-7,5
+7,7
@@
},
"ooui-outline-control-move-down": "Flytt element ned",
"ooui-outline-control-move-up": "Flytt element opp",
},
"ooui-outline-control-move-down": "Flytt element ned",
"ooui-outline-control-move-up": "Flytt element opp",
- "ooui-toolbar-more": "Fleire"
+ "ooui-toolbar-more": "Fleire",
+ "ooui-selectfile-button-select": "Vel ei fil",
+ "ooui-selectfile-placeholder": "Inga fil er vald"
}
}
diff --git
a/resources/lib/oojs-ui/i18n/tt-cyrl.json
b/resources/lib/oojs-ui/i18n/tt-cyrl.json
index
efe50bd
..
911b618
100644
(file)
--- a/
resources/lib/oojs-ui/i18n/tt-cyrl.json
+++ b/
resources/lib/oojs-ui/i18n/tt-cyrl.json
@@
-7,6
+7,15
@@
},
"ooui-outline-control-move-down": "Элементны аска күчерү",
"ooui-outline-control-move-up": "Элементны өскә күчерү",
},
"ooui-outline-control-move-down": "Элементны аска күчерү",
"ooui-outline-control-move-up": "Элементны өскә күчерү",
+ "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": "Дәвам итү",
"ooui-selectfile-button-select": "Файлны сайлагыз",
"ooui-selectfile-placeholder": "Файл сайланмаган"
"ooui-dialog-process-continue": "Дәвам итү",
"ooui-selectfile-button-select": "Файлны сайлагыз",
"ooui-selectfile-placeholder": "Файл сайланмаган"
diff --git
a/resources/lib/oojs-ui/oojs-ui-apex.js
b/resources/lib/oojs-ui/oojs-ui-apex.js
index
3637818
..
58b0ed0
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-apex.js
+++ b/
resources/lib/oojs-ui/oojs-ui-apex.js
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:16
Z
+ * Date: 2016-02-
17T02:03:23
Z
*/
( function ( OO ) {
*/
( function ( OO ) {
diff --git
a/resources/lib/oojs-ui/oojs-ui-core-apex.css
b/resources/lib/oojs-ui/oojs-ui-core-apex.css
index
734ff71
..
633c558
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-core-apex.css
+++ b/
resources/lib/oojs-ui/oojs-ui-core-apex.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-element-hidden {
display: none !important;
*/
.oo-ui-element-hidden {
display: none !important;
@@
-756,6
+756,12
@@
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 0.25em;
}
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 0.25em;
}
+.oo-ui-dropdownInputWidget option {
+ font-size: inherit;
+ font-family: inherit;
+ height: 1.5em;
+ padding: 0.5em 1em;
+}
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover,
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus {
border-color: rgba(0, 0, 0, 0.2);
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover,
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus {
border-color: rgba(0, 0, 0, 0.2);
diff --git
a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
index
51abc2d
..
2062ec6
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
+++ b/
resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-element-hidden {
display: none !important;
*/
.oo-ui-element-hidden {
display: none !important;
@@
-155,9
+155,9
@@
min-width: 1em;
border-radius: 2px;
position: relative;
min-width: 1em;
border-radius: 2px;
position: relative;
- -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
;
- transition: background 100ms
ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease
;
+ -webkit-transition: background 100ms
, color 100ms, border-color 100ms, box-shadow 100ms
;
+ -moz-transition: background 100ms
, color 100ms, border-color 100ms, box-shadow 100ms
;
+ transition: background 100ms
, color 100ms, border-color 100ms, box-shadow 100ms
;
}
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:focus {
}
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:hover,
.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button:focus {
@@
-778,9
+778,9
@@
border-width: 9px;
}
.oo-ui-popupWidget-transitioning .oo-ui-popupWidget-popup {
border-width: 9px;
}
.oo-ui-popupWidget-transitioning .oo-ui-popupWidget-popup {
- -webkit-transition: width 100ms
ease, height 100ms ease, left 100ms ease
;
- -moz-transition: width 100ms
ease, height 100ms ease, left 100ms ease
;
- transition: width 100ms
ease, height 100ms ease, left 100ms ease
;
+ -webkit-transition: width 100ms
, height 100ms, left 100ms
;
+ -moz-transition: width 100ms
, height 100ms, left 100ms
;
+ transition: width 100ms
, height 100ms, left 100ms
;
}
.oo-ui-popupWidget-head {
height: 2.5em;
}
.oo-ui-popupWidget-head {
height: 2.5em;
@@
-924,6
+924,12
@@
padding-left: 1em;
vertical-align: middle;
}
padding-left: 1em;
vertical-align: middle;
}
+.oo-ui-dropdownInputWidget option {
+ font-size: inherit;
+ font-family: inherit;
+ height: 1.5em;
+ padding: 0.5em 1em;
+}
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover,
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus {
border-color: #aaaaaa;
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:hover,
.oo-ui-dropdownInputWidget.oo-ui-widget-enabled select:focus {
border-color: #aaaaaa;
diff --git
a/resources/lib/oojs-ui/oojs-ui-core.js
b/resources/lib/oojs-ui/oojs-ui-core.js
index
5a43228
..
f0b96d5
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-core.js
+++ b/
resources/lib/oojs-ui/oojs-ui-core.js
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:16
Z
+ * Date: 2016-02-
17T02:03:23
Z
*/
( function ( OO ) {
*/
( function ( OO ) {
@@
-1055,71
+1055,77
@@
OO.ui.Element.static.getClosestScrollableContainer = function ( el, dimension )
* @static
* @param {HTMLElement} el Element to scroll into view
* @param {Object} [config] Configuration options
* @static
* @param {HTMLElement} el Element to scroll into view
* @param {Object} [config] Configuration options
- * @param {string} [config.duration] jQuery animation duration value
+ * @param {string} [config.duration
='fast'
] jQuery animation duration value
* @param {string} [config.direction] Scroll in only one direction, e.g. 'x' or 'y', omit
* to scroll in both directions
* @param {string} [config.direction] Scroll in only one direction, e.g. 'x' or 'y', omit
* to scroll in both directions
- * @param {Function} [config.complete] Function to call when scrolling completes
+ * @param {Function} [config.complete] Function to call when scrolling completes.
+ * Deprecated since 0.15.4, use the return promise instead.
+ * @return {jQuery.Promise} Promise which resolves when the scroll is complete
*/
OO.ui.Element.static.scrollIntoView = function ( el, config ) {
*/
OO.ui.Element.static.scrollIntoView = function ( el, config ) {
- var rel, anim, callback, sc, $sc, eld, scd, $win;
+ var position, animations, callback, container, $container, elementDimensions, containerDimensions, $window,
+ deferred = $.Deferred();
// Configuration initialization
config = config || {};
// Configuration initialization
config = config || {};
- anim = {};
+ anim
ations
= {};
callback = typeof config.complete === 'function' && config.complete;
callback = typeof config.complete === 'function' && config.complete;
-
sc
= this.getClosestScrollableContainer( el, config.direction );
- $
sc = $( sc
);
- el
d
= this.getDimensions( el );
-
scd = this.getDimensions( sc
);
- $win = $( this.getWindow( el ) );
-
- // Compute the
distances between the edges of el and the edges of the scroll viewport
- if ( $
sc
.is( 'html, body' ) ) {
+
container
= this.getClosestScrollableContainer( el, config.direction );
+ $
container = $( container
);
+ el
ementDimensions
= this.getDimensions( el );
+
containerDimensions = this.getDimensions( container
);
+ $win
dow
= $( this.getWindow( el ) );
+
+ // Compute the
element's position relative to the container
+ if ( $
container
.is( 'html, body' ) ) {
// If the scrollable container is the root, this is easy
// If the scrollable container is the root, this is easy
-
rel
= {
- top: el
d
.rect.top,
- bottom: $win
.innerHeight() - eld
.rect.bottom,
- left: el
d
.rect.left,
- right: $win
.innerWidth() - eld
.rect.right
+
position
= {
+ top: el
ementDimensions
.rect.top,
+ bottom: $win
dow.innerHeight() - elementDimensions
.rect.bottom,
+ left: el
ementDimensions
.rect.left,
+ right: $win
dow.innerWidth() - elementDimensions
.rect.right
};
} else {
};
} else {
- // Otherwise, we have to subtract el's coordinates from
sc
's coordinates
-
rel
= {
- top: el
d.rect.top - ( scd.rect.top + scd
.borders.top ),
- bottom:
scd.rect.bottom - scd.borders.bottom - scd.scrollbar.bottom - eld
.rect.bottom,
- left: el
d.rect.left - ( scd.rect.left + scd
.borders.left ),
- right:
scd.rect.right - scd.borders.right - scd.scrollbar.right - eld
.rect.right
+ // Otherwise, we have to subtract el's coordinates from
container
's coordinates
+
position
= {
+ top: el
ementDimensions.rect.top - ( containerDimensions.rect.top + containerDimensions
.borders.top ),
+ bottom:
containerDimensions.rect.bottom - containerDimensions.borders.bottom - containerDimensions.scrollbar.bottom - elementDimensions
.rect.bottom,
+ left: el
ementDimensions.rect.left - ( containerDimensions.rect.left + containerDimensions
.borders.left ),
+ right:
containerDimensions.rect.right - containerDimensions.borders.right - containerDimensions.scrollbar.right - elementDimensions
.rect.right
};
}
if ( !config.direction || config.direction === 'y' ) {
};
}
if ( !config.direction || config.direction === 'y' ) {
- if (
rel
.top < 0 ) {
- anim
.scrollTop = scd.scroll.top + rel
.top;
- } else if (
rel.top > 0 && rel
.bottom < 0 ) {
- anim
.scrollTop = scd.scroll.top + Math.min( rel.top, -rel
.bottom );
+ if (
position
.top < 0 ) {
+ anim
ations.scrollTop = containerDimensions.scroll.top + position
.top;
+ } else if (
position.top > 0 && position
.bottom < 0 ) {
+ anim
ations.scrollTop = containerDimensions.scroll.top + Math.min( position.top, -position
.bottom );
}
}
if ( !config.direction || config.direction === 'x' ) {
}
}
if ( !config.direction || config.direction === 'x' ) {
- if (
rel
.left < 0 ) {
- anim
.scrollLeft = scd.scroll.left + rel
.left;
- } else if (
rel.left > 0 && rel
.right < 0 ) {
- anim
.scrollLeft = scd.scroll.left + Math.min( rel.left, -rel
.right );
+ if (
position
.left < 0 ) {
+ anim
ations.scrollLeft = containerDimensions.scroll.left + position
.left;
+ } else if (
position.left > 0 && position
.right < 0 ) {
+ anim
ations.scrollLeft = containerDimensions.scroll.left + Math.min( position.left, -position
.right );
}
}
}
}
- if ( !$.isEmptyObject( anim ) ) {
- $
sc.stop( true ).animate( anim
, config.duration === undefined ? 'fast' : config.duration );
-
if ( callback
) {
-
$sc.queue( function ( next
) {
+ if ( !$.isEmptyObject( anim
ations
) ) {
+ $
container.stop( true ).animate( animations
, config.duration === undefined ? 'fast' : config.duration );
+
$container.queue( function ( next
) {
+
if ( callback
) {
callback();
callback();
- next();
- } );
- }
+ }
+ deferred.resolve();
+ next();
+ } );
} else {
if ( callback ) {
callback();
}
} else {
if ( callback ) {
callback();
}
+ deferred.resolve();
}
}
+ return deferred.promise();
};
/**
};
/**
@@
-1285,6
+1291,8
@@
OO.ui.Element.prototype.getElementWindow = function () {
/**
* Get closest scrollable container.
/**
* Get closest scrollable container.
+ *
+ * @return {HTMLElement} Closest scrollable container
*/
OO.ui.Element.prototype.getClosestScrollableElementContainer = function () {
return OO.ui.Element.static.getClosestScrollableContainer( this.$element[ 0 ] );
*/
OO.ui.Element.prototype.getClosestScrollableElementContainer = function () {
return OO.ui.Element.static.getClosestScrollableContainer( this.$element[ 0 ] );
@@
-1314,6
+1322,7
@@
OO.ui.Element.prototype.setElementGroup = function ( group ) {
* Scroll element into view.
*
* @param {Object} [config] Configuration options
* Scroll element into view.
*
* @param {Object} [config] Configuration options
+ * @return {jQuery.Promise} Promise which resolves when the scroll is complete
*/
OO.ui.Element.prototype.scrollElementIntoView = function ( config ) {
return OO.ui.Element.static.scrollIntoView( this.$element[ 0 ], config );
*/
OO.ui.Element.prototype.scrollElementIntoView = function ( config ) {
return OO.ui.Element.static.scrollIntoView( this.$element[ 0 ], config );
@@
-4082,9
+4091,9
@@
OO.ui.mixin.ClippableElement.prototype.clip = function () {
* This config option is only relevant if #autoClose is set to `true`. See the [OOjs UI docs on MediaWiki][2]
* for an example.
* [2]: https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Popups#autocloseExample
* This config option is only relevant if #autoClose is set to `true`. See the [OOjs UI docs on MediaWiki][2]
* for an example.
* [2]: https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Popups#autocloseExample
- * @cfg {boolean} [head] Show a popup header that contains a #label (if specified) and close
+ * @cfg {boolean} [head
=false
] Show a popup header that contains a #label (if specified) and close
* button.
* button.
- * @cfg {boolean} [padded] Add padding to the popup's body
+ * @cfg {boolean} [padded
=false
] Add padding to the popup's body
*/
OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
// Configuration initialization
*/
OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
// Configuration initialization
@@
-4105,8
+4114,6
@@
OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
} ) );
// Properties
} ) );
// Properties
- this.$head = $( '<div>' );
- this.$footer = $( '<div>' );
this.$anchor = $( '<div>' );
// If undefined, will be computed lazily in updateDimensions()
this.$container = config.$container;
this.$anchor = $( '<div>' );
// If undefined, will be computed lazily in updateDimensions()
this.$container = config.$container;
@@
-4118,44
+4125,45
@@
OO.ui.PopupWidget = function OoUiPopupWidget( config ) {
this.width = config.width !== undefined ? config.width : 320;
this.height = config.height !== undefined ? config.height : null;
this.setAlignment( config.align );
this.width = config.width !== undefined ? config.width : 320;
this.height = config.height !== undefined ? config.height : null;
this.setAlignment( config.align );
- this.closeButton = new OO.ui.ButtonWidget( { framed: false, icon: 'close' } );
this.onMouseDownHandler = this.onMouseDown.bind( this );
this.onDocumentKeyDownHandler = this.onDocumentKeyDown.bind( this );
this.onMouseDownHandler = this.onMouseDown.bind( this );
this.onDocumentKeyDownHandler = this.onDocumentKeyDown.bind( this );
- // Events
- this.closeButton.connect( this, { click: 'onCloseButtonClick' } );
-
// Initialization
this.toggleAnchor( config.anchor === undefined || config.anchor );
this.$body.addClass( 'oo-ui-popupWidget-body' );
this.$anchor.addClass( 'oo-ui-popupWidget-anchor' );
// Initialization
this.toggleAnchor( config.anchor === undefined || config.anchor );
this.$body.addClass( 'oo-ui-popupWidget-body' );
this.$anchor.addClass( 'oo-ui-popupWidget-anchor' );
- this.$head
- .addClass( 'oo-ui-popupWidget-head' )
- .append( this.$label, this.closeButton.$element );
- this.$footer.addClass( 'oo-ui-popupWidget-footer' );
- if ( !config.head ) {
- this.$head.addClass( 'oo-ui-element-hidden' );
- }
- if ( !config.$footer ) {
- this.$footer.addClass( 'oo-ui-element-hidden' );
- }
this.$popup
.addClass( 'oo-ui-popupWidget-popup' )
this.$popup
.addClass( 'oo-ui-popupWidget-popup' )
- .append( this.$
head, this.$body, this.$footer
);
+ .append( this.$
body
);
this.$element
.addClass( 'oo-ui-popupWidget' )
.append( this.$popup, this.$anchor );
// Move content, which was added to #$element by OO.ui.Widget, to the body
this.$element
.addClass( 'oo-ui-popupWidget' )
.append( this.$popup, this.$anchor );
// Move content, which was added to #$element by OO.ui.Widget, to the body
+ // FIXME This is gross, we should use '$body' or something for the config
if ( config.$content instanceof jQuery ) {
this.$body.append( config.$content );
}
if ( config.$content instanceof jQuery ) {
this.$body.append( config.$content );
}
- if ( config.$footer instanceof jQuery ) {
- this.$footer.append( config.$footer );
- }
+
if ( config.padded ) {
this.$body.addClass( 'oo-ui-popupWidget-body-padded' );
}
if ( config.padded ) {
this.$body.addClass( 'oo-ui-popupWidget-body-padded' );
}
+ if ( config.head ) {
+ this.closeButton = new OO.ui.ButtonWidget( { framed: false, icon: 'close' } );
+ this.closeButton.connect( this, { click: 'onCloseButtonClick' } );
+ this.$head = $( '<div>' )
+ .addClass( 'oo-ui-popupWidget-head' )
+ .append( this.$label, this.closeButton.$element );
+ this.$popup.prepend( this.$head );
+ }
+
+ if ( config.$footer ) {
+ this.$footer = $( '<div>' )
+ .addClass( 'oo-ui-popupWidget-footer' )
+ .append( config.$footer );
+ this.$popup.append( this.$footer );
+ }
+
// Initially hidden - using #toggle may cause errors if subclasses override toggle with methods
// that reference properties not initialized at that time of parent class construction
// TODO: Find a better way to handle post-constructor setup
// Initially hidden - using #toggle may cause errors if subclasses override toggle with methods
// that reference properties not initialized at that time of parent class construction
// TODO: Find a better way to handle post-constructor setup
@@
-4879,6
+4887,7
@@
OO.ui.SelectWidget = function OoUiSelectWidget( config ) {
this.onKeyPressHandler = this.onKeyPress.bind( this );
this.keyPressBuffer = '';
this.keyPressBufferTimer = null;
this.onKeyPressHandler = this.onKeyPress.bind( this );
this.keyPressBuffer = '';
this.keyPressBufferTimer = null;
+ this.blockMouseOverEvents = 0;
// Events
this.connect( this, {
// Events
this.connect( this, {
@@
-5041,7
+5050,9
@@
OO.ui.SelectWidget.prototype.onMouseMove = function ( e ) {
*/
OO.ui.SelectWidget.prototype.onMouseOver = function ( e ) {
var item;
*/
OO.ui.SelectWidget.prototype.onMouseOver = function ( e ) {
var item;
-
+ if ( this.blockMouseOverEvents ) {
+ return;
+ }
if ( !this.isDisabled() ) {
item = this.getTargetItem( e );
this.highlightItem( item && item.isHighlightable() ? item : null );
if ( !this.isDisabled() ) {
item = this.getTargetItem( e );
this.highlightItem( item && item.isHighlightable() ? item : null );
@@
-5112,7
+5123,7
@@
OO.ui.SelectWidget.prototype.onKeyDown = function ( e ) {
} else {
this.chooseItem( nextItem );
}
} else {
this.chooseItem( nextItem );
}
-
nextItem.scrollElementIntoView(
);
+
this.scrollItemIntoView( nextItem
);
}
if ( handled ) {
}
if ( handled ) {
@@
-5140,6
+5151,23
@@
OO.ui.SelectWidget.prototype.unbindKeyDownListener = function () {
this.getElementWindow().removeEventListener( 'keydown', this.onKeyDownHandler, true );
};
this.getElementWindow().removeEventListener( 'keydown', this.onKeyDownHandler, true );
};
+/**
+ * Scroll item into view, preventing spurious mouse highlight actions from happening.
+ *
+ * @return {OO.ui.OptionWidget} Item to scroll into view
+ */
+OO.ui.SelectWidget.prototype.scrollItemIntoView = function ( item ) {
+ var widget = this;
+ // Chromium's Blink engine will generate spurious 'mouseover' events during programmatic scrolling
+ // and around 100-150 ms after it is finished.
+ this.blockMouseOverEvents++;
+ item.scrollElementIntoView().done( function () {
+ setTimeout( function () {
+ widget.blockMouseOverEvents--;
+ }, 200 );
+ } );
+};
+
/**
* Clear the key-press buffer
*
/**
* Clear the key-press buffer
*
@@
-5202,7
+5230,7
@@
OO.ui.SelectWidget.prototype.onKeyPress = function ( e ) {
} else {
this.chooseItem( item );
}
} else {
this.chooseItem( item );
}
-
item.scrollElementIntoView(
);
+
this.scrollItemIntoView( item
);
}
e.preventDefault();
}
e.preventDefault();
diff --git
a/resources/lib/oojs-ui/oojs-ui-mediawiki.js
b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
index
27a4657
..
de585a7
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-mediawiki.js
+++ b/
resources/lib/oojs-ui/oojs-ui-mediawiki.js
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:16
Z
+ * Date: 2016-02-
17T02:03:23
Z
*/
( function ( OO ) {
*/
( function ( OO ) {
diff --git
a/resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
b/resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
index
0021721
..
4a37310
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
+++ b/
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
diff --git
a/resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
b/resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
index
7b1e5b7
..
a13af69
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
+++ b/
resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
*/
.oo-ui-popupTool .oo-ui-popupWidget-popup,
.oo-ui-popupTool .oo-ui-popupWidget-anchor {
diff --git
a/resources/lib/oojs-ui/oojs-ui-toolbars.js
b/resources/lib/oojs-ui/oojs-ui-toolbars.js
index
1d1ed87
..
b033276
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-toolbars.js
+++ b/
resources/lib/oojs-ui/oojs-ui-toolbars.js
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:16
Z
+ * Date: 2016-02-
17T02:03:23
Z
*/
( function ( OO ) {
*/
( function ( OO ) {
@@
-2093,6
+2093,11
@@
OO.ui.ListToolGroup.prototype.populate = function () {
this.updateCollapsibleState();
};
this.updateCollapsibleState();
};
+/**
+ * Get the expand/collapse tool for this group
+ *
+ * @return {OO.ui.Tool} Expand collapse tool
+ */
OO.ui.ListToolGroup.prototype.getExpandCollapseTool = function () {
var ExpandCollapseTool;
if ( this.expandCollapseTool === undefined ) {
OO.ui.ListToolGroup.prototype.getExpandCollapseTool = function () {
var ExpandCollapseTool;
if ( this.expandCollapseTool === undefined ) {
diff --git
a/resources/lib/oojs-ui/oojs-ui-widgets-apex.css
b/resources/lib/oojs-ui/oojs-ui-widgets-apex.css
index
071e33b
..
dff61e9
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
+++ b/
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-draggableElement {
cursor: -webkit-grab -moz-grab, url(images/grab.cur), move;
*/
.oo-ui-draggableElement {
cursor: -webkit-grab -moz-grab, url(images/grab.cur), move;
diff --git
a/resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
b/resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
index
8475dd1
..
cc12598
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
+++ b/
resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-draggableElement {
cursor: -webkit-grab -moz-grab, url(images/grab.cur), move;
*/
.oo-ui-draggableElement {
cursor: -webkit-grab -moz-grab, url(images/grab.cur), move;
@@
-238,9
+238,9
@@
border-radius: 1em;
background-color: #ffffff;
margin-right: 0.5em;
border-radius: 1em;
background-color: #ffffff;
margin-right: 0.5em;
- -webkit-transition: background-color 100ms
ease, border-color 100ms ease
;
- -moz-transition: background-color 100ms
ease, border-color 100ms ease
;
- transition: background-color 100ms
ease, border-color 100ms ease
;
+ -webkit-transition: background-color 100ms
, border-color 100ms
;
+ -moz-transition: background-color 100ms
, border-color 100ms
;
+ transition: background-color 100ms
, border-color 100ms
;
}
.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled {
cursor: pointer;
}
.oo-ui-toggleSwitchWidget.oo-ui-widget-enabled {
cursor: pointer;
@@
-288,9
+288,9
@@
height: 1.2em;
border-radius: 1.2em;
background-color: #555555;
height: 1.2em;
border-radius: 1.2em;
background-color: #555555;
- -webkit-transition: left 100ms
ease, margin-left 100ms ease
;
- -moz-transition: left 100ms
ease, margin-left 100ms ease
;
- transition: left 100ms
ease, margin-left 100ms ease
;
+ -webkit-transition: left 100ms
, margin-left 100ms
;
+ -moz-transition: left 100ms
, margin-left 100ms
;
+ transition: left 100ms
, margin-left 100ms
;
}
.oo-ui-toggleSwitchWidget-glow {
display: none;
}
.oo-ui-toggleSwitchWidget-glow {
display: none;
diff --git
a/resources/lib/oojs-ui/oojs-ui-widgets.js
b/resources/lib/oojs-ui/oojs-ui-widgets.js
index
521dfbb
..
4f5e0ed
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-widgets.js
+++ b/
resources/lib/oojs-ui/oojs-ui-widgets.js
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:16
Z
+ * Date: 2016-02-
17T02:03:23
Z
*/
( function ( OO ) {
*/
( function ( OO ) {
diff --git
a/resources/lib/oojs-ui/oojs-ui-windows-apex.css
b/resources/lib/oojs-ui/oojs-ui-windows-apex.css
index
adf3bfd
..
f122db5
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-windows-apex.css
+++ b/
resources/lib/oojs-ui/oojs-ui-windows-apex.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
*/
.oo-ui-actionWidget.oo-ui-pendingElement-pending {
background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
diff --git
a/resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
b/resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
index
101673c
..
ed0716a
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
+++ b/
resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:21
Z
+ * Date: 2016-02-
17T02:03:27
Z
*/
.oo-ui-window {
background: transparent;
*/
.oo-ui-window {
background: transparent;
@@
-350,9
+350,9
@@
.oo-ui-windowManager-modal > .oo-ui-dialog {
background-color: rgba(255, 255, 255, 0.5);
opacity: 0;
.oo-ui-windowManager-modal > .oo-ui-dialog {
background-color: rgba(255, 255, 255, 0.5);
opacity: 0;
- -webkit-transition: opacity 250ms
ease
;
- -moz-transition: opacity 250ms
ease
;
- transition: opacity 250ms
ease
;
+ -webkit-transition: opacity 250ms;
+ -moz-transition: opacity 250ms;
+ transition: opacity 250ms;
}
.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
background-color: #ffffff;
}
.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
background-color: #ffffff;
@@
-361,9
+361,9
@@
-moz-transform: scale(0.5);
-ms-transform: scale(0.5);
transform: scale(0.5);
-moz-transform: scale(0.5);
-ms-transform: scale(0.5);
transform: scale(0.5);
- -webkit-transition: all 250ms
ease
;
- -moz-transition: all 250ms
ease
;
- transition: all 250ms
ease
;
+ -webkit-transition: all 250ms;
+ -moz-transition: all 250ms;
+ transition: all 250ms;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
opacity: 1;
diff --git
a/resources/lib/oojs-ui/oojs-ui-windows.js
b/resources/lib/oojs-ui/oojs-ui-windows.js
index
1a56945
..
aa11142
100644
(file)
--- a/
resources/lib/oojs-ui/oojs-ui-windows.js
+++ b/
resources/lib/oojs-ui/oojs-ui-windows.js
@@
-1,12
+1,12
@@
/*!
/*!
- * OOjs UI v0.15.
3
+ * OOjs UI v0.15.
4
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2016 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2016-02-
09T21:21:16
Z
+ * Date: 2016-02-
17T02:03:23
Z
*/
( function ( OO ) {
*/
( function ( OO ) {