mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-12 09:27:36 +00:00
Clear interface before opening again
Bug: 56055 Change-Id: I1a36617ea7b141e0d695ff44ef3b05a2e327b4c4
This commit is contained in:
parent
4dd724838d
commit
ab2949e95f
|
@ -238,6 +238,11 @@
|
|||
this.$imageMetadata.show();
|
||||
}
|
||||
} );
|
||||
|
||||
lightboxHooks.register( 'clearInterface', function () {
|
||||
this.$imageDesc.empty();
|
||||
this.$title.empty();
|
||||
} );
|
||||
}
|
||||
|
||||
MultimediaViewer.prototype.fetchRepoInfo = function ( cb ) {
|
||||
|
|
|
@ -72,3 +72,8 @@ defullscreen
|
|||
Arguments: None
|
||||
ThisArg: LightboxInterface
|
||||
Called: From LightboxInterface fullscreen method when user is leaving fullscreen interface.
|
||||
|
||||
clearInterface
|
||||
Arguments: None
|
||||
ThisArg: LightboxInterface
|
||||
Called: From LightboxInterface empty method when the interface is being cleared.
|
||||
|
|
|
@ -76,6 +76,12 @@
|
|||
|
||||
LIP = LightboxInterface.prototype;
|
||||
|
||||
LIP.empty = function () {
|
||||
this.$imageDiv.empty();
|
||||
|
||||
lightboxHooks.callAll( 'clearInterface', this );
|
||||
};
|
||||
|
||||
LIP.attach = function () {
|
||||
$( document.body )
|
||||
.append(
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
};
|
||||
|
||||
MLBP.open = function () {
|
||||
this.iface.empty();
|
||||
this.iface.attach();
|
||||
this.iface.load( this.images[this.currentIndex] );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue