Merge "Add close button to settings dialog" into mpga

This commit is contained in:
jenkins-bot 2017-02-02 14:21:54 +00:00 committed by Gerrit Code Review
commit 8c96564915
4 changed files with 13 additions and 10 deletions

View file

@ -133,6 +133,7 @@
"popups-preview-footer-read"
],
"dependencies": [
"ext.popups.images",
"mediawiki.storage",
"mediawiki.Title",
"mediawiki.jqueryMsg",

View file

@ -177,15 +177,16 @@
* @param {Boolean} visible if the help should be visible, or the form
*/
function toggleHelp( $el, visible ) {
var formSelectors = '#mwe-popups-settings-form, #mwe-popups-settings .save',
helpSelectors = '#mwe-popups-settings-help, #mwe-popups-settings .okay';
var $dialog = $( '#mwe-popups-settings' ),
formSelectors = 'main, .save, .close',
helpSelectors = '.mwe-popups-settings-help, .okay';
if ( visible ) {
$( formSelectors ).hide();
$( helpSelectors ).show();
$dialog.find( formSelectors ).hide();
$dialog.find( helpSelectors ).show();
} else {
$( formSelectors ).show();
$( helpSelectors ).hide();
$dialog.find( formSelectors ).show();
$dialog.find( helpSelectors ).hide();
}
}

View file

@ -1,4 +1,5 @@
@import 'mediawiki.mixins.less';
@import 'mediawiki.ui/variables';
@dialog-margin: 50px;
@ -21,7 +22,7 @@
> div {
display: table-cell;
width: 3.35em;
width: @iconSize + ( 2 * @iconGutterWidth );
vertical-align: middle;
cursor: pointer;
}
@ -83,7 +84,7 @@
}
}
#mwe-popups-settings-help {
.mwe-popups-settings-help {
font-size: 18px;
font-weight: 800;
margin: @dialog-margin;
@ -107,7 +108,7 @@
}
}
.rtl #mwe-popups-settings-help div.mwe-popups-settings-help-image {
.rtl .mwe-popups-settings-help div.mwe-popups-settings-help-image {
.background-image-svg( '../images/footer-rtl.svg', '../images/footer-rtl.png' );
}

View file

@ -22,7 +22,7 @@
{{/choices}}
</form>
</main>
<div id="mwe-popups-settings-help" style="display:none;">
<div class="mwe-popups-settings-help" style="display:none;">
<p>{{helpText}}</p>
<div class="mwe-popups-settings-help-image"></div>
</div>