diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index ddcfd5e01..3d34ba2ff 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -202,6 +202,8 @@ this.canvas.unattach(); + this.buttons.unattach(); + this.panel.fileReuse.closeDialog(); this.clearEvents(); diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js b/resources/mmv/ui/mmv.ui.canvasButtons.js index 8750fd7d5..48769eeaf 100644 --- a/resources/mmv/ui/mmv.ui.canvasButtons.js +++ b/resources/mmv/ui/mmv.ui.canvasButtons.js @@ -192,5 +192,14 @@ } }; + /** + * Removes all UI things from the DOM, or hides them + */ + CBP.unattach = function () { + this.$viewFile.tipsy( 'hide' ); + this.$close.tipsy( 'hide' ); + this.$fullscreen.tipsy( 'hide' ); + }; + mw.mmv.ui.CanvasButtons = CanvasButtons; }( mediaWiki, jQuery, OO ) ); diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index f2ce95fd4..b04cbdfcb 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -60,6 +60,11 @@ }; MPP.unattach = function() { + this.$title.tipsy( 'hide' ); + this.$mmvOptOutLink.tipsy( 'hide' ); + this.$titleAndCredit.find( '.mw-mmv-author' ).tipsy( 'hide' ); + this.$titleAndCredit.find( '.mw-mmv-source' ).tipsy( 'hide' ); + this.scroller.unattach(); this.buttons.unattach(); this.fileReuse.unattach(); diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js b/resources/mmv/ui/mmv.ui.stripeButtons.js index f0ad23b54..7bd51c806 100644 --- a/resources/mmv/ui/mmv.ui.stripeButtons.js +++ b/resources/mmv/ui/mmv.ui.stripeButtons.js @@ -417,6 +417,10 @@ this.buttons.$reuse.off( 'click.mmv-stripeButtons' ); this.clearTimer( 'feedbackTooltip.show' ); + + $.each( this.buttons, function ( name, $button ) { + $button.tipsy( 'hide' ); + } ); }; mw.mmv.ui.StripeButtons = StripeButtons;