mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-23 15:56:47 +00:00
MMV options dialog: remove leftover code
Follow-Up: I707ef2c0b6b8d4d13c05182078b82ddc99e32d12 Bug: T77349 Change-Id: I2693cd36ec390e0ca059030d264276492ed0a2fe
This commit is contained in:
parent
d882ec8a93
commit
fe5687b6ef
|
@ -18,7 +18,7 @@
|
|||
},
|
||||
{
|
||||
"resourceModule": "mmv.bootstrap",
|
||||
"maxSize": "5.6 kB"
|
||||
"maxSize": "5.3 kB"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -380,7 +380,7 @@ class MultimediaViewerBootstrap {
|
|||
// remove the buttons (and the clearing element) if they are already there
|
||||
// this should not happen (at least until we support paged media) but just in case
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '.mw-mmv-filepage-buttons' ).next().addBack().remove();
|
||||
$( '.mw-mmv-view-expanded' ).remove();
|
||||
|
||||
const $mmvButton = $( '<button>' )
|
||||
.addClass( 'mw-mmv-view-expanded cdx-button' )
|
||||
|
@ -388,16 +388,8 @@ class MultimediaViewerBootstrap {
|
|||
.append( ' ' )
|
||||
.append( mw.msg( 'multimediaviewer-view-expanded' ) );
|
||||
|
||||
const $filepageButtons = $( '<div>' )
|
||||
.addClass( 'cdx-button-group mw-mmv-filepage-buttons' )
|
||||
.append( $mmvButton );
|
||||
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '.fullMedia' ).append(
|
||||
$filepageButtons,
|
||||
$( '<div>' )
|
||||
.css( 'clear', 'both' )
|
||||
);
|
||||
$( '.fullMedia' ).append( $mmvButton );
|
||||
|
||||
const image = new LightboxImage(
|
||||
$thumb.prop( 'src' ),
|
||||
|
@ -409,10 +401,7 @@ class MultimediaViewerBootstrap {
|
|||
);
|
||||
this.thumbs.push( image );
|
||||
|
||||
$mmvButton.on( 'click', () => {
|
||||
this.openImage( image );
|
||||
return false;
|
||||
} );
|
||||
$mmvButton.on( 'click', () => this.openImage( image ) );
|
||||
|
||||
if ( Config.shouldShowStatusInfo() ) {
|
||||
Config.disableStatusInfo();
|
||||
|
|
|
@ -42,20 +42,9 @@ body.mw-mmv-lightbox-open {
|
|||
}
|
||||
}
|
||||
|
||||
.mw-mmv-filepage-buttons {
|
||||
margin-top: 5px;
|
||||
|
||||
.cdx-button:nth-child(n + 2) {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.mw-mmv-view-expanded .cdx-button__icon {
|
||||
.mw-mmv-view-expanded {
|
||||
.cdx-button__icon {
|
||||
.cdx-mixin-css-icon( @cdx-icon-image-gallery, @param-is-button-icon: true,
|
||||
@param-size-icon: @size-icon-small );
|
||||
}
|
||||
|
||||
.mw-mmv-view-config .cdx-button__icon {
|
||||
.cdx-mixin-css-icon( @cdx-icon-settings, @param-is-button-icon: true,
|
||||
@param-size-icon: @size-icon-small );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,9 +235,6 @@ const { asyncMethod, waitForAsync, getMultimediaViewer } = require( './mmv.testh
|
|||
const $link4 = $( '.fullMedia .mw-mmv-view-expanded' );
|
||||
assert.ok( $link4.length, 'Link for viewing expanded file was set up.' );
|
||||
|
||||
const $link5 = $( '.fullMedia .mw-mmv-view-config' );
|
||||
assert.ok( $link5.length, 'Link for opening enable/disable configuration was set up.' );
|
||||
|
||||
// Click on valid link
|
||||
$link.trigger( { type: 'click', which: 1 } );
|
||||
clock.tick( 10 );
|
||||
|
|
Loading…
Reference in a new issue