mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-16 20:35:09 +00:00
Fix share tabs
The share/embed tab bar used some hacks to disable MenuSelectWidget's normal behavior of disappearing once a selection has been made; after the last OOUI update this doesn't work anymore. This commit makes some small changes to make it work again: * replace .show() with .toggle() as the widget uses a custom show/hide mechanism now * reorder some calls - .toggle() has no effect as long as the menu has no options * disable autoHide which would hide the menu when the user clicks outside (didn't test if it is really needed but seemed reasonable) Also undoes some CSS changes that came with the update. Bug: T89531 Change-Id: I3688ec21250bf2eb8dbfd67e306e857028d71fc7
This commit is contained in:
parent
4abcc2e13c
commit
194876ba58
|
@ -61,12 +61,10 @@
|
|||
}
|
||||
|
||||
this.reuseTabs = new oo.ui.MenuSelectWidget( {
|
||||
autoHide: false,
|
||||
classes: [ 'mw-mmv-reuse-tabs' ]
|
||||
} );
|
||||
|
||||
// MenuSelectWidget has a nasty tendency to hide itself, maybe we're not using it right?
|
||||
this.reuseTabs.hide = $.noop;
|
||||
this.reuseTabs.$element.show().appendTo( this.$dialog );
|
||||
this.reuseTabs.$element.appendTo( this.$dialog );
|
||||
|
||||
this.tabs = {
|
||||
share: new mw.mmv.ui.reuse.Share( this.$dialog ),
|
||||
|
@ -83,6 +81,10 @@
|
|||
this.ooTabs.embed
|
||||
] );
|
||||
|
||||
// MenuSelectWidget has a nasty tendency to hide itself, maybe we're not using it right?
|
||||
this.reuseTabs.toggle( true );
|
||||
this.reuseTabs.toggle = $.noop;
|
||||
|
||||
this.selectedTab = this.getLastUsedTab();
|
||||
|
||||
// In case nothing is saved in localStorage or it contains junk
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
position: static;
|
||||
box-shadow: none;
|
||||
padding-bottom: 0; // OOUI override
|
||||
border: none; // OOUI override
|
||||
border-bottom: @divider-border-height solid @divider-color;
|
||||
.box-round(@border-radius @border-radius 0 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue