/*
* This file is part of the MediaWiki extension MultimediaViewer.
*
* MultimediaViewer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* MultimediaViewer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MultimediaViewer. If not, see
' )
.addClass( 'mw-mmv-title-para mw-parser-output' )
.appendTo( this.$aboveFold );
this.$title = $( '' )
.addClass( 'mw-mmv-title' );
this.title = new TruncatableTextField( this.$titlePara, this.$title, {
styles: [ 'mw-mmv-title-small', 'mw-mmv-title-smaller' ]
} );
this.title.setTitle(
mw.message( 'multimediaviewer-title-popup-text' ),
mw.message( 'multimediaviewer-title-popup-text-more' )
);
this.$title.add( this.title.$ellipsis );
}
initializeButtons() {
this.buttons = new StripeButtons( this.$titleDiv );
}
/**
* Initializes the main body of metadata elements.
*/
initializeImageMetadata() {
this.$container.addClass( 'mw-mmv-ttf-ellipsis-container' );
this.$imageMetadata = $( ' ' )
.addClass( 'mw-mmv-credit empty' )
.appendTo( this.$imageMetadataLeft );
// we need an inline container for tipsy, otherwise it would be centered weirdly
this.$authorAndSource = $( '' )
.addClass( 'mw-mmv-source-author' );
this.creditField = new TruncatableTextField(
this.$credit,
this.$authorAndSource,
{ styles: [] }
);
this.creditField.setTitle(
mw.message( 'multimediaviewer-credit-popup-text' ),
mw.message( 'multimediaviewer-credit-popup-text-more' )
);
this.$authorAndSource.add( this.creditField.$ellipsis );
}
/**
* Initializes the list of image metadata on the right side of the panel.
*/
initializeImageLinks() {
this.$imageLinkDiv = $( '' )
.addClass( 'mw-mmv-image-links' )
.appendTo( this.$imageLinkDiv );
this.initializeLicense();
this.initializeFilename();
this.initializeDatetime();
this.initializeLocation();
}
/**
* Initializes the license elements.
*/
initializeLicense() {
this.$licenseLi = $( '