mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-29 13:17:35 +00:00
Merge "Close tipsies when closing interface"
This commit is contained in:
commit
b79f3a8392
|
@ -202,6 +202,8 @@
|
||||||
|
|
||||||
this.canvas.unattach();
|
this.canvas.unattach();
|
||||||
|
|
||||||
|
this.buttons.unattach();
|
||||||
|
|
||||||
this.panel.fileReuse.closeDialog();
|
this.panel.fileReuse.closeDialog();
|
||||||
|
|
||||||
this.clearEvents();
|
this.clearEvents();
|
||||||
|
|
|
@ -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;
|
mw.mmv.ui.CanvasButtons = CanvasButtons;
|
||||||
}( mediaWiki, jQuery, OO ) );
|
}( mediaWiki, jQuery, OO ) );
|
||||||
|
|
|
@ -60,6 +60,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
MPP.unattach = function() {
|
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.scroller.unattach();
|
||||||
this.buttons.unattach();
|
this.buttons.unattach();
|
||||||
this.fileReuse.unattach();
|
this.fileReuse.unattach();
|
||||||
|
|
|
@ -417,6 +417,10 @@
|
||||||
this.buttons.$reuse.off( 'click.mmv-stripeButtons' );
|
this.buttons.$reuse.off( 'click.mmv-stripeButtons' );
|
||||||
|
|
||||||
this.clearTimer( 'feedbackTooltip.show' );
|
this.clearTimer( 'feedbackTooltip.show' );
|
||||||
|
|
||||||
|
$.each( this.buttons, function ( name, $button ) {
|
||||||
|
$button.tipsy( 'hide' );
|
||||||
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
mw.mmv.ui.StripeButtons = StripeButtons;
|
mw.mmv.ui.StripeButtons = StripeButtons;
|
||||||
|
|
Loading…
Reference in a new issue