Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172729
Change subject: Make room for arbitrary i18n text length in the options dialogs ...................................................................... Make room for arbitrary i18n text length in the options dialogs Change-Id: Id618a92e1502307612f289bfb4d071d88cc5b292 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/979 Bug: 72862 --- M resources/mmv/ui/mmv.ui.viewingOptions.js M resources/mmv/ui/mmv.ui.viewingOptions.less 2 files changed, 25 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/29/172729/1 diff --git a/resources/mmv/ui/mmv.ui.viewingOptions.js b/resources/mmv/ui/mmv.ui.viewingOptions.js index fe180a7..9bbc5d9 100644 --- a/resources/mmv/ui/mmv.ui.viewingOptions.js +++ b/resources/mmv/ui/mmv.ui.viewingOptions.js @@ -226,12 +226,7 @@ .appendTo( $div ); } - $( '<div>' ) - .html( ' ' ) - .addClass( 'mw-mmv-options-icon' ) - .appendTo( $div ); - - this.addText( $div, msgs ); + this.addText( $div, msgs, true ); this.addInfoLink( $div, ( enabled ? 'enable' : 'disable' ) + '-about-link' ); this.makeButtons( $div, smsg, enabled ); @@ -314,9 +309,10 @@ * Adds text to a dialog. * @param {jQuery} $container * @param {string[]} msgs The messages to be added. + * @param {boolean} icon Whether to display an icon next to the text or not */ - ODP.addText = function ( $container, msgs ) { - var i, $text, + ODP.addText = function ( $container, msgs, icon ) { + var i, $text, $subContainer, adders = [ function ( msg ) { $( '<h3>' ) @@ -341,12 +337,25 @@ ]; $text = $( '<div>' ) - .addClass( 'mw-mmv-options-text' ) - .appendTo( $container ); + .addClass( 'mw-mmv-options-text' ); for ( i = 0; i < msgs.length && i < adders.length; i++ ) { adders[i]( msgs[i] ); } + + if ( icon ) { + $subContainer = $( '<div>' ).addClass( 'mw-mmv-options-subcontainer' ); + + $( '<div>' ) + .html( ' ' ) + .addClass( 'mw-mmv-options-icon' ) + .appendTo( $subContainer ); + + $text.appendTo( $subContainer ); + $subContainer.appendTo( $container ); + } else { + $text.appendTo( $container ); + } }; /** diff --git a/resources/mmv/ui/mmv.ui.viewingOptions.less b/resources/mmv/ui/mmv.ui.viewingOptions.less index f857b39..0ebfc14 100644 --- a/resources/mmv/ui/mmv.ui.viewingOptions.less +++ b/resources/mmv/ui/mmv.ui.viewingOptions.less @@ -44,19 +44,6 @@ top: (@offset-top + (@arrow-size / 2 )); } - .mw-mmv-options-enable { - height: 180px; - } - - .mw-mmv-options-disable { - height: 160px; - } - - .mw-mmv-enable-confirmation, - .mw-mmv-disable-confirmation { - height: 100px; - } - .mw-mmv-enable-confirmation, .mw-mmv-disable-confirmation, .mw-mmv-options-enable, @@ -128,18 +115,13 @@ .mw-mmv-options-text, .mw-mmv-options-icon { - position: absolute; - top: 35px; - .mw-mmv-options-enable & { top: 70px; } } .mw-mmv-options-submit { - position: absolute; - bottom: 0; - right: 0; + margin-top: 10px; } .mw-mmv-options-text { @@ -147,8 +129,12 @@ right: 0; } +.mw-mmv-options-subcontainer .mw-mmv-options-text { + margin-left: 68px; +} + .mw-mmv-options-icon { - left: 0; + float: left; width: 58px; height: 52px; @@ -166,9 +152,6 @@ font-weight: normal; font-size: 1.25em; color: #333; - - position: absolute; - top: 0; .mw-mmv-options-enable & { top: 35px; -- To view, visit https://gerrit.wikimedia.org/r/172729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id618a92e1502307612f289bfb4d071d88cc5b292 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: wmf/1.25wmf7 Gerrit-Owner: Gilles <gdu...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits