/*!
- * OOUI v0.32.0
+ * OOUI v0.33.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2019 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2019-05-29T00:38:42Z
+ * Date: 2019-07-03T21:05:08Z
*/
( function ( OO ) {
// Initialization
this.$element.addClass( 'oo-ui-processDialog' );
+ if ( OO.ui.isMobile() ) {
+ this.$element.addClass( 'oo-ui-isMobile' );
+ }
};
/* Setup */
* @inheritdoc
*/
OO.ui.ProcessDialog.prototype.getActionWidgetConfig = function ( config ) {
- var isMobile = OO.ui.isMobile();
-
- // Default to unframed on mobile
- config = $.extend( { framed: !isMobile }, config );
- // Change back buttons to icon only on mobile
- if (
- isMobile &&
- (
- config.flags === 'back' ||
- ( Array.isArray( config.flags ) && config.flags.indexOf( 'back' ) !== -1 )
- )
- ) {
+ function checkFlag( flag ) {
+ return config.flags === flag ||
+ ( Array.isArray( config.flags ) && config.flags.indexOf( flag ) !== -1 );
+ }
+
+ // Default to unframed.
+ config = $.extend( { framed: true }, config );
+ if ( checkFlag( 'close' ) ) {
+ // Change close buttons to icon only.
+ $.extend( config, {
+ icon: 'close',
+ invisibleLabel: true
+ } );
+ } else if ( OO.ui.isMobile() && checkFlag( 'back' ) ) {
+ // Change back buttons to icon only.
$.extend( config, {
icon: 'previous',
- label: ''
+ invisibleLabel: true
} );
}