2014-02-07 14:47:00 +00:00
|
|
|
/*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2014-04-11 14:58:37 +00:00
|
|
|
( function ( mw, $, oo ) {
|
2014-02-07 14:47:00 +00:00
|
|
|
// Shortcut for prototype later
|
|
|
|
var MPP;
|
|
|
|
|
|
|
|
/**
|
2014-02-19 02:27:30 +00:00
|
|
|
* Represents the metadata panel in the viewer
|
|
|
|
* @class mw.mmv.ui.MetadataPanel
|
2014-02-07 14:47:00 +00:00
|
|
|
* @extends mw.mmv.ui.Element
|
|
|
|
* @constructor
|
|
|
|
* @param {jQuery} $container The container for the panel.
|
|
|
|
* @param {jQuery} $controlBar The control bar element.
|
2014-05-01 10:00:31 +00:00
|
|
|
* @param {Object} localStorage the localStorage object, for dependency injection
|
2014-02-07 14:47:00 +00:00
|
|
|
*/
|
2014-05-01 10:00:31 +00:00
|
|
|
function MetadataPanel( $container, $controlBar, localStorage ) {
|
2014-02-07 14:47:00 +00:00
|
|
|
mw.mmv.ui.Element.call( this, $container );
|
2014-03-17 08:07:53 +00:00
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$controlBar = $controlBar;
|
2014-06-11 02:14:59 +00:00
|
|
|
|
|
|
|
/** @property {mw.mmv.Config} config - */
|
|
|
|
this.config = new mw.mmv.Config(
|
|
|
|
mw.config.get( 'wgMultimediaViewer', {} ),
|
|
|
|
mw.config,
|
|
|
|
mw.user,
|
|
|
|
new mw.Api(),
|
|
|
|
window.localStorage
|
|
|
|
);
|
|
|
|
|
2014-03-26 23:59:04 +00:00
|
|
|
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
|
|
|
|
this.htmlUtils = new mw.mmv.HtmlUtils();
|
|
|
|
|
2014-05-05 21:44:27 +00:00
|
|
|
this.initializeHeader( localStorage );
|
2014-02-07 14:47:00 +00:00
|
|
|
this.initializeImageMetadata();
|
|
|
|
this.initializeAboutLinks();
|
2014-06-11 02:14:59 +00:00
|
|
|
this.initializePreferenceLinks();
|
2014-02-07 14:47:00 +00:00
|
|
|
}
|
|
|
|
oo.inheritClass( MetadataPanel, mw.mmv.ui.Element );
|
|
|
|
MPP = MetadataPanel.prototype;
|
|
|
|
|
2014-02-13 20:50:05 +00:00
|
|
|
MPP.attach = function() {
|
2014-05-05 21:44:27 +00:00
|
|
|
this.scroller.attach();
|
2014-04-01 01:41:57 +00:00
|
|
|
this.buttons.attach();
|
2014-03-17 08:07:53 +00:00
|
|
|
this.fileReuse.attach();
|
2014-02-13 20:50:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
MPP.unattach = function() {
|
2014-05-05 21:44:27 +00:00
|
|
|
this.scroller.unattach();
|
2014-04-01 01:41:57 +00:00
|
|
|
this.buttons.unattach();
|
2014-03-17 08:07:53 +00:00
|
|
|
this.fileReuse.unattach();
|
|
|
|
this.fileReuse.closeDialog();
|
2014-02-13 20:50:05 +00:00
|
|
|
this.clearEvents();
|
|
|
|
};
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
MPP.empty = function () {
|
2014-05-05 21:44:27 +00:00
|
|
|
this.scroller.empty();
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$license.empty().addClass( 'empty' );
|
2014-02-14 00:36:10 +00:00
|
|
|
this.$permissionLink.hide();
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-04-01 01:41:57 +00:00
|
|
|
this.buttons.empty();
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.description.empty();
|
|
|
|
this.categories.empty();
|
|
|
|
this.fileUsage.empty();
|
2014-02-14 00:36:10 +00:00
|
|
|
this.permission.empty();
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-03-01 01:10:51 +00:00
|
|
|
this.$title.empty().removeClass( 'error' );
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$credit.empty().addClass( 'empty' );
|
|
|
|
|
|
|
|
this.$username.empty();
|
|
|
|
this.$usernameLi.addClass( 'empty' );
|
|
|
|
|
|
|
|
this.$repo.empty();
|
2014-04-08 22:43:54 +00:00
|
|
|
this.$repoSubtitle.empty();
|
|
|
|
this.$repoLi.addClass( 'empty' ).removeClass( 'remote local' );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.$datetime.empty();
|
|
|
|
this.$datetimeLi.addClass( 'empty' );
|
|
|
|
|
|
|
|
this.$location.empty();
|
|
|
|
this.$locationLi.addClass( 'empty' );
|
|
|
|
|
2014-04-21 21:48:40 +00:00
|
|
|
this.progressBar.empty();
|
2014-02-25 13:43:22 +00:00
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.fileReuse.empty();
|
|
|
|
};
|
|
|
|
|
|
|
|
// **********************************************
|
|
|
|
// *********** Initialization methods ***********
|
|
|
|
// **********************************************
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the header, which contains the title, credit, and license elements.
|
2014-05-05 21:44:27 +00:00
|
|
|
* @param {Object} localStorage the localStorage object, for dependency injection
|
2014-02-07 14:47:00 +00:00
|
|
|
*/
|
2014-05-05 21:44:27 +00:00
|
|
|
MPP.initializeHeader = function ( localStorage ) {
|
2014-04-21 21:48:40 +00:00
|
|
|
this.progressBar = new mw.mmv.ui.ProgressBar( this.$controlBar );
|
2014-02-25 13:43:22 +00:00
|
|
|
|
2014-05-05 21:44:27 +00:00
|
|
|
this.scroller = new mw.mmv.ui.MetadataPanelScroller( this.$container, this.$controlBar,
|
|
|
|
localStorage );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.$titleDiv = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-title-contain' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$controlBar );
|
|
|
|
|
|
|
|
this.$container.append( this.$controlBar );
|
|
|
|
|
2014-04-01 01:41:57 +00:00
|
|
|
this.initializeButtons(); // float, needs to be on top
|
2014-02-07 14:47:00 +00:00
|
|
|
this.initializeTitleAndCredit();
|
|
|
|
this.initializeLicense();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the title and credit elements.
|
|
|
|
*/
|
|
|
|
MPP.initializeTitleAndCredit = function () {
|
|
|
|
this.$titleAndCredit = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-title-credit' )
|
2014-04-15 16:14:06 +00:00
|
|
|
// Since these elements are created dynamically, we listen this way for logging purposes
|
|
|
|
.on( 'click', '.mw-mmv-author a', function () {
|
2014-05-19 09:24:54 +00:00
|
|
|
mw.mmv.actionLogger.log( 'author-page' );
|
2014-04-15 16:14:06 +00:00
|
|
|
} )
|
|
|
|
.on( 'click', '.mw-mmv-source a', function () {
|
2014-05-19 09:24:54 +00:00
|
|
|
mw.mmv.actionLogger.log( 'source-page' );
|
2014-04-15 16:14:06 +00:00
|
|
|
} )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$titleDiv );
|
|
|
|
|
|
|
|
this.initializeTitle();
|
|
|
|
this.initializeCredit();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the title elements.
|
|
|
|
*/
|
|
|
|
MPP.initializeTitle = function () {
|
|
|
|
this.$titlePara = $( '<p>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-title-para' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$titleAndCredit );
|
|
|
|
|
|
|
|
this.$title = $( '<span>' )
|
2014-05-31 00:18:12 +00:00
|
|
|
.prop( 'title', mw.message( 'multimediaviewer-title-popup-text' ) )
|
|
|
|
.tipsy( {
|
|
|
|
delayIn: mw.config.get( 'wgMultimediaViewer').tooltipDelay,
|
|
|
|
gravity: this.isRTL() ? 'se' : 'sw'
|
|
|
|
} )
|
2014-03-27 06:05:47 +00:00
|
|
|
.addClass( 'mw-mmv-title' );
|
|
|
|
|
|
|
|
this.title = new mw.mmv.ui.TruncatableTextField( this.$titlePara, this.$title );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the credit elements.
|
|
|
|
*/
|
|
|
|
MPP.initializeCredit = function () {
|
|
|
|
this.$credit = $( '<p>' )
|
2014-03-27 06:05:47 +00:00
|
|
|
.addClass( 'mw-mmv-credit empty' );
|
|
|
|
|
|
|
|
this.creditField = new mw.mmv.ui.TruncatableTextField(
|
|
|
|
this.$titleAndCredit,
|
|
|
|
this.$credit,
|
|
|
|
{ max: 200, small: 160 }
|
|
|
|
);
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the license elements.
|
|
|
|
*/
|
|
|
|
MPP.initializeLicense = function () {
|
2014-02-14 00:36:10 +00:00
|
|
|
var panel = this;
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$license = $( '<a>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-license empty' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.prop( 'href', '#' )
|
2014-04-15 16:14:06 +00:00
|
|
|
.appendTo( this.$titlePara )
|
|
|
|
.on( 'click', function() {
|
2014-05-19 09:24:54 +00:00
|
|
|
mw.mmv.actionLogger.log( 'license-page' );
|
2014-04-15 16:14:06 +00:00
|
|
|
} );
|
2014-02-14 00:36:10 +00:00
|
|
|
|
|
|
|
this.$permissionLink = $( '<span>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-permission-link mw-mmv-label' )
|
2014-02-14 00:36:10 +00:00
|
|
|
.text( mw.message( 'multimediaviewer-permission-link' ).text() )
|
|
|
|
.appendTo( this.$titlePara )
|
2014-02-26 01:20:34 +00:00
|
|
|
.hide()
|
2014-02-14 00:36:10 +00:00
|
|
|
.on( 'click', function() {
|
|
|
|
panel.permission.grow();
|
2014-05-05 21:44:27 +00:00
|
|
|
panel.scroller.scrollIntoView( panel.permission.$box, 500 );
|
2014-02-14 00:36:10 +00:00
|
|
|
} );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
2014-04-01 01:41:57 +00:00
|
|
|
MPP.initializeButtons = function () {
|
2014-05-01 10:00:31 +00:00
|
|
|
this.buttons = new mw.mmv.ui.StripeButtons( this.$titleDiv, this.localStorage );
|
2014-04-01 01:41:57 +00:00
|
|
|
};
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
/**
|
|
|
|
* Initializes the main body of metadata elements.
|
|
|
|
*/
|
|
|
|
MPP.initializeImageMetadata = function () {
|
|
|
|
this.$imageMetadata = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-image-metadata' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$container );
|
|
|
|
|
2014-02-14 00:36:10 +00:00
|
|
|
this.$imageMetadataLeft = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-image-metadata-column mw-mmv-image-metadata-desc-column' )
|
2014-02-14 00:36:10 +00:00
|
|
|
.appendTo( this.$imageMetadata );
|
|
|
|
|
|
|
|
this.$imageMetadataRight = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-image-metadata-column mw-mmv-image-metadata-links-column' )
|
2014-02-14 00:36:10 +00:00
|
|
|
.appendTo( this.$imageMetadata );
|
|
|
|
|
|
|
|
this.description = new mw.mmv.ui.Description( this.$imageMetadataLeft );
|
|
|
|
this.permission = new mw.mmv.ui.Permission( this.$imageMetadataLeft );
|
2014-02-07 14:47:00 +00:00
|
|
|
this.initializeImageLinks();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the list of image metadata on the right side of the panel.
|
|
|
|
*/
|
|
|
|
MPP.initializeImageLinks = function () {
|
|
|
|
this.$imageLinkDiv = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-image-links-div' )
|
2014-02-14 00:36:10 +00:00
|
|
|
.appendTo( this.$imageMetadataRight );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.$imageLinks = $( '<ul>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-image-links' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$imageLinkDiv );
|
|
|
|
|
|
|
|
this.initializeUploader();
|
2014-02-26 17:19:51 +00:00
|
|
|
this.initializeDatetime();
|
2014-02-07 14:47:00 +00:00
|
|
|
this.initializeLocation();
|
2014-04-08 19:36:35 +00:00
|
|
|
this.initializeCategories();
|
|
|
|
this.initializeRepoLink();
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-04-02 01:58:41 +00:00
|
|
|
this.fileReuse = new mw.mmv.ui.reuse.Dialog( this.$container, this.buttons.buttons.$reuse );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.fileUsage = new mw.mmv.ui.FileUsage(
|
2014-02-14 00:36:10 +00:00
|
|
|
$( '<div>' ).appendTo( this.$imageMetadataRight )
|
2014-02-07 14:47:00 +00:00
|
|
|
);
|
|
|
|
this.fileUsage.init();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the upload date/time element.
|
|
|
|
*/
|
|
|
|
MPP.initializeDatetime = function () {
|
|
|
|
this.$datetimeLi = $( '<li>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-datetime-li empty' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$imageLinks );
|
|
|
|
|
|
|
|
this.$datetime = $( '<span>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-datetime' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$datetimeLi );
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the link to the uploader's file page.
|
|
|
|
*/
|
|
|
|
MPP.initializeUploader = function () {
|
|
|
|
this.$usernameLi = $( '<li>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-username-li empty' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$imageLinks );
|
|
|
|
|
|
|
|
this.$username = $( '<a>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-username' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.prop( 'href', '#' )
|
|
|
|
.appendTo( this.$usernameLi );
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the geolocation element.
|
|
|
|
*/
|
|
|
|
MPP.initializeLocation = function () {
|
|
|
|
this.$locationLi = $( '<li>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-location-li empty' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$imageLinks );
|
|
|
|
|
|
|
|
this.$location = $( '<a>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-location' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.appendTo( this.$locationLi );
|
|
|
|
};
|
|
|
|
|
2014-04-08 19:36:35 +00:00
|
|
|
/**
|
|
|
|
* Initializes the list of categories of the image
|
|
|
|
*/
|
|
|
|
MPP.initializeCategories = function () {
|
|
|
|
this.categories = new mw.mmv.ui.Categories(
|
|
|
|
$( '<li>' )
|
|
|
|
.addClass( 'mw-mmv-image-category' )
|
|
|
|
.appendTo( this.$imageLinks )
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes the link to the file page on the (maybe remote) repository.
|
|
|
|
*/
|
|
|
|
MPP.initializeRepoLink = function () {
|
|
|
|
this.$repoLi = $( '<li>' )
|
|
|
|
.addClass( 'mw-mmv-repo-li empty' )
|
|
|
|
.appendTo( this.$imageLinks );
|
|
|
|
|
|
|
|
this.$repo = $( '<a>' )
|
|
|
|
.addClass( 'mw-mmv-repo' )
|
|
|
|
.prop( 'href', '#' )
|
|
|
|
.click( function ( e ) {
|
2014-05-05 20:26:17 +00:00
|
|
|
var $link = $( this );
|
2014-04-08 19:36:35 +00:00
|
|
|
|
|
|
|
if ( e.altKey || e.shiftKey || e.ctrlKey || e.metaKey || e.button === 1 ) {
|
|
|
|
// They are likely opening the link in a new window or tab
|
2014-05-19 09:24:54 +00:00
|
|
|
mw.mmv.actionLogger.log( 'file-description-page' );
|
2014-04-08 19:36:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If it's a plain click, we need to wait for the logging to
|
|
|
|
// be done before navigating to the desired page
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
// We want to redirect anyway, whether logging worked or not
|
2014-05-19 09:24:54 +00:00
|
|
|
mw.mmv.actionLogger.log( 'file-description-page' ).always( function () {
|
2014-05-05 20:26:17 +00:00
|
|
|
window.location.href = $link.prop( 'href' );
|
|
|
|
} );
|
2014-04-08 19:36:35 +00:00
|
|
|
} )
|
|
|
|
.appendTo( this.$repoLi );
|
2014-04-08 22:43:54 +00:00
|
|
|
|
|
|
|
this.$repoSubtitle = $( '<span>' )
|
|
|
|
.addClass( 'mw-mmv-repo-subtitle' )
|
|
|
|
.appendTo( this.$repoLi );
|
2014-04-08 19:36:35 +00:00
|
|
|
};
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
/**
|
|
|
|
* Initializes two about links at the bottom of the panel.
|
|
|
|
*/
|
|
|
|
MPP.initializeAboutLinks = function () {
|
2014-06-11 02:14:59 +00:00
|
|
|
var separator = ' | ';
|
2014-03-24 13:35:34 +00:00
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$mmvAboutLink = $( '<a>' )
|
|
|
|
.prop( 'href', mw.config.get( 'wgMultimediaViewer' ).infoLink )
|
|
|
|
.text( mw.message( 'multimediaviewer-about-mmv' ).text() )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-about-link' );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.$mmvDiscussLink = $( '<a>' )
|
|
|
|
.prop( 'href', mw.config.get( 'wgMultimediaViewer' ).discussionLink )
|
|
|
|
.text( mw.message( 'multimediaviewer-discuss-mmv' ).text() )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-discuss-link' );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-03-24 13:35:34 +00:00
|
|
|
this.$mmvHelpLink = $( '<a>' )
|
|
|
|
.prop( 'href', mw.config.get( 'wgMultimediaViewer' ).helpLink )
|
|
|
|
.text( mw.message( 'multimediaviewer-help-mmv' ).text() )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-help-link' );
|
2014-03-24 13:35:34 +00:00
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$mmvAboutLinks = $( '<div>' )
|
2014-03-31 21:33:12 +00:00
|
|
|
.addClass( 'mw-mmv-about-links' )
|
2014-02-07 14:47:00 +00:00
|
|
|
.append(
|
|
|
|
this.$mmvAboutLink,
|
2014-03-24 13:35:34 +00:00
|
|
|
separator,
|
|
|
|
this.$mmvDiscussLink,
|
|
|
|
separator,
|
|
|
|
this.$mmvHelpLink
|
2014-02-07 14:47:00 +00:00
|
|
|
)
|
|
|
|
.appendTo( this.$imageMetadata );
|
2014-06-11 02:14:59 +00:00
|
|
|
};
|
2014-04-23 20:31:43 +00:00
|
|
|
|
2014-06-11 02:14:59 +00:00
|
|
|
/**
|
|
|
|
* Initialize the link for enabling/disabling MediaViewer.
|
|
|
|
*/
|
|
|
|
MPP.initializePreferenceLinks = function () {
|
|
|
|
var target,
|
|
|
|
panel = this,
|
|
|
|
separator = ' | ',
|
|
|
|
optInStatus = this.config.isMediaViewerEnabledOnClick();
|
|
|
|
|
|
|
|
function setText( $link, status ) {
|
|
|
|
$link
|
|
|
|
.text( mw.message( status ? 'multimediaviewer-optout-mmv' : 'multimediaviewer-optin-mmv' ).text() )
|
|
|
|
.prop( 'title', mw.message( status ? 'multimediaviewer-optout-help' : 'multimediaviewer-optin-help' ).text() );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !mw.config.get( 'wgMediaViewerIsInBeta' ) && this.config.canSetMediaViewerEnabledOnClick() ) {
|
|
|
|
this.$mmvOptOutLink = $( '<a>' )
|
|
|
|
.prop( 'href', '#' )
|
|
|
|
.addClass( 'mw-mmv-optout-link' )
|
|
|
|
.tipsy( { gravity: 's' } )
|
|
|
|
.click( function ( e ) {
|
|
|
|
var newOptInStatus = !panel.config.isMediaViewerEnabledOnClick();
|
|
|
|
e.preventDefault();
|
|
|
|
panel.config.setMediaViewerEnabledOnClick( newOptInStatus).done( function () {
|
|
|
|
setText( panel.$mmvOptOutLink, newOptInStatus );
|
|
|
|
panel.$mmvOptOutLink.tipsy( 'hide' );
|
|
|
|
} ).fail( function () {
|
|
|
|
mw.notify( 'Error while trying to change preference' );
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
setText( this.$mmvOptOutLink, optInStatus );
|
2014-04-23 20:31:43 +00:00
|
|
|
|
2014-06-11 02:14:59 +00:00
|
|
|
this.$mmvAboutLinks.append(
|
|
|
|
separator,
|
|
|
|
this.$mmvOptOutLink
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !mw.user.isAnon() && mw.config.get( 'wgMediaViewerIsInBeta' ) ) {
|
|
|
|
target = mw.Title.newFromText( 'Special:Preferences' ).getUrl();
|
|
|
|
target += '#mw-prefsection-betafeatures';
|
2014-04-23 20:31:43 +00:00
|
|
|
|
|
|
|
this.$mmvPreferenceLink = $( '<a>' )
|
|
|
|
.prop( 'href', target )
|
|
|
|
.text( mw.message( 'mypreferences' ) )
|
|
|
|
.addClass( 'mw-mmv-preference-link' );
|
|
|
|
|
|
|
|
this.$mmvAboutLinks.append(
|
|
|
|
separator,
|
|
|
|
this.$mmvPreferenceLink
|
|
|
|
);
|
|
|
|
}
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// *********************************
|
|
|
|
// ******** Setting methods ********
|
|
|
|
// *********************************
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the URL for the File: page of the image
|
|
|
|
* @param {string} url
|
|
|
|
*/
|
|
|
|
MPP.setFilePageLink = function ( url ) {
|
|
|
|
this.$repo.prop( 'href', url );
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the display name of the repository
|
2014-04-08 22:43:54 +00:00
|
|
|
* @param {mw.mmv.model.Repo} repoInfo
|
2014-02-07 14:47:00 +00:00
|
|
|
*/
|
2014-04-08 22:43:54 +00:00
|
|
|
MPP.setRepoDisplay = function ( repoInfo ) {
|
|
|
|
var repositoryMessage,
|
|
|
|
displayName = repoInfo.displayName || mw.config.get( 'wgSiteName' ),
|
|
|
|
isCommons = repoInfo.isCommons();
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-04-08 22:43:54 +00:00
|
|
|
repositoryMessage = repoInfo.isLocal ?
|
|
|
|
mw.message( 'multimediaviewer-repository-local' ).text() :
|
|
|
|
mw.message( 'multimediaviewer-repository', displayName ).text();
|
|
|
|
this.$repo.text( repositoryMessage );
|
|
|
|
|
|
|
|
this.$repoLi.css( 'background-image',
|
2014-04-10 11:20:39 +00:00
|
|
|
( repoInfo.favIcon && !isCommons ) ? 'url("' + repoInfo.favIcon + '")' : '' );
|
2014-04-08 22:43:54 +00:00
|
|
|
|
|
|
|
this.$repoLi.toggleClass( 'commons', isCommons );
|
|
|
|
this.$repoSubtitle.text(
|
|
|
|
isCommons ? mw.message( 'multimediaviewer-commons-subtitle' ).text() : '' );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.$repoLi.removeClass( 'empty' );
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the link to the user page where possible
|
|
|
|
* @param {mw.mmv.model.Repo} repoData
|
|
|
|
* @param {string} username
|
|
|
|
* @param {string} gender
|
|
|
|
*/
|
|
|
|
MPP.setUserPageLink = function ( repoData, username, gender ) {
|
2014-02-19 19:12:22 +00:00
|
|
|
var userpage = 'User:' + username,
|
|
|
|
articlePath = repoData.getArticlePath(),
|
|
|
|
userlink = articlePath.replace( '$1', userpage );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-02-19 19:12:22 +00:00
|
|
|
this.$username
|
|
|
|
.text(
|
|
|
|
mw.message( 'multimediaviewer-userpage-link', username, gender ).text()
|
|
|
|
)
|
|
|
|
.prop( 'href', userlink );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-02-19 19:12:22 +00:00
|
|
|
this.$usernameLi.toggleClass( 'empty', !username );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the file title in the panel
|
|
|
|
* @param {string} title
|
|
|
|
*/
|
|
|
|
MPP.setFileTitle = function ( title ) {
|
2014-03-27 06:05:47 +00:00
|
|
|
this.title.set( title );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets up the file reuse data in the DOM
|
2014-03-17 08:07:53 +00:00
|
|
|
* @param {mw.mmv.model.Image} image
|
2014-03-21 20:29:55 +00:00
|
|
|
* @param {mw.mmv.model.Repo} repo
|
2014-03-19 02:00:26 +00:00
|
|
|
* @param {string} caption
|
2014-03-17 08:07:53 +00:00
|
|
|
*/
|
2014-03-21 20:29:55 +00:00
|
|
|
MPP.setFileReuseData = function ( image, repo, caption ) {
|
|
|
|
this.fileReuse.set( image, repo, caption );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the upload or creation date and time in the panel
|
|
|
|
* @param {string} date The formatted date to set.
|
|
|
|
* @param {boolean} created Whether this is the creation date
|
|
|
|
*/
|
|
|
|
MPP.setDateTime = function ( date, created ) {
|
|
|
|
this.$datetime.text(
|
|
|
|
mw.message(
|
|
|
|
'multimediaviewer-datetime-' + ( created ? 'created' : 'uploaded' ),
|
|
|
|
date
|
|
|
|
).text()
|
|
|
|
);
|
|
|
|
|
|
|
|
this.$datetimeLi.removeClass( 'empty' );
|
|
|
|
};
|
|
|
|
|
2014-03-27 06:05:47 +00:00
|
|
|
/**
|
|
|
|
* Bignasty function for setting source and author. Both #setAuthor and
|
|
|
|
* #setSource use this with some shortcuts.
|
|
|
|
* @param {string} source With unsafe HTML
|
|
|
|
* @param {string} author With unsafe HTML
|
|
|
|
*/
|
|
|
|
MPP.setCredit = function ( source, author ) {
|
2014-05-31 00:18:12 +00:00
|
|
|
var tooltipDelay = mw.config.get( 'wgMultimediaViewer').tooltipDelay;
|
|
|
|
|
2014-04-10 22:58:19 +00:00
|
|
|
this.source = source || null;
|
|
|
|
this.author = author || null;
|
2014-03-27 06:05:47 +00:00
|
|
|
|
|
|
|
if ( author && source ) {
|
|
|
|
this.creditField.set(
|
|
|
|
mw.message(
|
|
|
|
'multimediaviewer-credit',
|
|
|
|
this.author,
|
|
|
|
this.source
|
|
|
|
).plain()
|
|
|
|
);
|
|
|
|
} else if ( author ) {
|
2014-04-10 22:58:19 +00:00
|
|
|
this.creditField.set( this.author );
|
2014-03-27 06:05:47 +00:00
|
|
|
} else if ( source ) {
|
2014-04-10 22:58:19 +00:00
|
|
|
this.creditField.set( this.source );
|
2014-03-27 06:05:47 +00:00
|
|
|
}
|
2014-05-31 00:18:12 +00:00
|
|
|
|
|
|
|
this.$titleAndCredit.find( '.mw-mmv-author' )
|
|
|
|
.prop( 'title', mw.message( 'multimediaviewer-author-popup-text' ).text() )
|
|
|
|
.tipsy( {
|
|
|
|
delayIn: tooltipDelay,
|
|
|
|
gravity: this.isRTL() ? 'se' : 'sw'
|
|
|
|
} );
|
|
|
|
|
|
|
|
this.$titleAndCredit.find( '.mw-mmv-source' )
|
|
|
|
.prop( 'title', mw.message( 'multimediaviewer-source-popup-text' ).text() )
|
|
|
|
.tipsy( {
|
|
|
|
delayIn: tooltipDelay,
|
|
|
|
gravity: this.isRTL() ? 'se' : 'sw'
|
|
|
|
} );
|
2014-03-27 06:05:47 +00:00
|
|
|
};
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
/**
|
|
|
|
* Sets the source in the panel
|
|
|
|
* @param {string} source Warning - unsafe HTML sometimes goes here
|
|
|
|
*/
|
|
|
|
MPP.setSource = function ( source ) {
|
2014-04-10 22:58:19 +00:00
|
|
|
if ( source ) {
|
|
|
|
source = $( '<span>' )
|
|
|
|
.addClass( 'mw-mmv-source' )
|
|
|
|
.append( $.parseHTML( source ) )
|
|
|
|
.get( 0 ).outerHTML;
|
|
|
|
}
|
|
|
|
|
2014-03-27 06:05:47 +00:00
|
|
|
this.setCredit( source, this.author );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the author in the panel
|
|
|
|
* @param {string} author Warning - unsafe HTML sometimes goes here
|
|
|
|
*/
|
|
|
|
MPP.setAuthor = function ( author ) {
|
2014-04-10 22:58:19 +00:00
|
|
|
if ( author ) {
|
|
|
|
author = $( '<span>' )
|
|
|
|
.addClass( 'mw-mmv-author' )
|
|
|
|
.append( $.parseHTML( author ) )
|
|
|
|
.get( 0 ).outerHTML;
|
|
|
|
}
|
|
|
|
|
2014-03-27 06:05:47 +00:00
|
|
|
this.setCredit( this.source, author );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the license display in the panel
|
2014-04-19 00:25:12 +00:00
|
|
|
* @param {mw.mmv.model.License|null} license license data (could be missing)
|
|
|
|
* @param {string} filePageUrl URL of the file description page
|
2014-02-07 14:47:00 +00:00
|
|
|
*/
|
2014-04-19 00:25:12 +00:00
|
|
|
MPP.setLicense = function ( license, filePageUrl ) {
|
2014-04-19 00:26:55 +00:00
|
|
|
var shortName, url, isCc;
|
2014-04-19 00:25:12 +00:00
|
|
|
|
2014-04-19 00:39:46 +00:00
|
|
|
if ( license ) {
|
2014-04-19 00:26:55 +00:00
|
|
|
shortName = license.getShortName();
|
2014-04-19 00:39:46 +00:00
|
|
|
url = license.deedUrl || filePageUrl;
|
|
|
|
isCc = license.isCc();
|
2014-04-19 00:25:12 +00:00
|
|
|
} else {
|
|
|
|
shortName = mw.message( 'multimediaviewer-license-default' ).text();
|
2014-04-19 00:39:46 +00:00
|
|
|
url = filePageUrl;
|
|
|
|
isCc = false;
|
2014-04-19 00:25:12 +00:00
|
|
|
}
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.$license
|
2014-04-19 00:25:12 +00:00
|
|
|
.text( shortName )
|
2014-04-18 18:27:00 +00:00
|
|
|
.toggleClass( 'cc-license', isCc )
|
2014-04-19 00:29:04 +00:00
|
|
|
.prop( 'href', url )
|
|
|
|
.prop( 'target', license && license.deedUrl ? '_blank' : '' );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
this.$license.removeClass( 'empty' );
|
|
|
|
};
|
|
|
|
|
2014-02-14 00:36:10 +00:00
|
|
|
/**
|
|
|
|
* Set an extra permission text which should be displayed.
|
|
|
|
* @param {string} permission
|
|
|
|
*/
|
|
|
|
MPP.setPermission = function ( permission ) {
|
|
|
|
this.$permissionLink.show();
|
|
|
|
this.permission.set( permission );
|
|
|
|
};
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
/**
|
|
|
|
* Sets location data in the interface.
|
|
|
|
* @param {mw.mmv.model.Image} imageData
|
|
|
|
*/
|
|
|
|
MPP.setLocationData = function ( imageData ) {
|
|
|
|
var latsec, latitude, latmsg, latdeg, latremain, latmin,
|
|
|
|
longsec, longitude, longmsg, longdeg, longremain, longmin,
|
|
|
|
language;
|
|
|
|
|
|
|
|
if ( !imageData.hasCoords() ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
latitude = imageData.latitude >= 0 ? imageData.latitude : imageData.latitude * -1;
|
|
|
|
latmsg = 'multimediaviewer-geoloc-' + ( imageData.latitude >= 0 ? 'north' : 'south' );
|
|
|
|
latdeg = Math.floor( latitude );
|
|
|
|
latremain = latitude - latdeg;
|
|
|
|
latmin = Math.floor( ( latremain ) * 60 );
|
|
|
|
|
|
|
|
longitude = imageData.longitude >= 0 ? imageData.longitude : imageData.longitude * -1;
|
|
|
|
longmsg = 'multimediaviewer-geoloc-' + ( imageData.longitude >= 0 ? 'east' : 'west' );
|
|
|
|
longdeg = Math.floor( longitude );
|
|
|
|
longremain = longitude - longdeg;
|
|
|
|
longmin = Math.floor( ( longremain ) * 60 );
|
|
|
|
|
|
|
|
longremain -= longmin / 60;
|
|
|
|
latremain -= latmin / 60;
|
|
|
|
latsec = Math.round( latremain * 100 * 60 * 60 ) / 100;
|
|
|
|
longsec = Math.round( longremain * 100 * 60 * 60 ) / 100;
|
|
|
|
|
|
|
|
this.$location.text(
|
|
|
|
mw.message( 'multimediaviewer-geolocation',
|
|
|
|
mw.message(
|
|
|
|
'multimediaviewer-geoloc-coords',
|
|
|
|
|
|
|
|
mw.message(
|
|
|
|
'multimediaviewer-geoloc-coord',
|
|
|
|
mw.language.convertNumber( latdeg ),
|
|
|
|
mw.language.convertNumber( latmin ),
|
|
|
|
mw.language.convertNumber( latsec ),
|
|
|
|
mw.message( latmsg ).text()
|
|
|
|
).text(),
|
|
|
|
|
|
|
|
mw.message(
|
|
|
|
'multimediaviewer-geoloc-coord',
|
|
|
|
mw.language.convertNumber( longdeg ),
|
|
|
|
mw.language.convertNumber( longmin ),
|
|
|
|
mw.language.convertNumber( longsec ),
|
|
|
|
mw.message( longmsg ).text()
|
|
|
|
).text()
|
|
|
|
).text()
|
|
|
|
).text()
|
|
|
|
);
|
|
|
|
|
|
|
|
$.each( mw.language.data, function( key, value ) {
|
|
|
|
value = 'go away jshint';
|
|
|
|
language = key;
|
|
|
|
return false;
|
|
|
|
} );
|
|
|
|
|
|
|
|
this.$location.prop( 'href', (
|
|
|
|
'//tools.wmflabs.org/geohack/geohack.php?pagename=' +
|
|
|
|
'File:' + imageData.title.getMain() +
|
|
|
|
'¶ms=' +
|
|
|
|
Math.abs( imageData.latitude ) + ( imageData.latitude >= 0 ? '_N_' : '_S_' ) +
|
|
|
|
Math.abs( imageData.longitude ) + ( imageData.longitude >= 0 ? '_E_' : '_W_' ) +
|
|
|
|
'&language=' + language
|
|
|
|
) );
|
|
|
|
|
|
|
|
this.$locationLi.removeClass( 'empty' );
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set all the image information in the panel
|
2014-02-25 02:28:49 +00:00
|
|
|
* @param {mw.mmv.LightboxImage} image
|
2014-02-07 14:47:00 +00:00
|
|
|
* @param {mw.mmv.model.Image} imageData
|
|
|
|
* @param {mw.mmv.model.Repo} repoData
|
|
|
|
* @param {mw.mmv.model.FileUsage} localUsage
|
|
|
|
* @param {mw.mmv.model.FileUsage} globalUsage
|
2014-02-13 09:52:40 +00:00
|
|
|
* @param {mw.mmv.model.User} user
|
2014-02-07 14:47:00 +00:00
|
|
|
*/
|
2014-02-13 09:52:40 +00:00
|
|
|
MPP.setImageInfo = function ( image, imageData, repoData, localUsage, globalUsage, user ) {
|
2014-04-19 00:25:12 +00:00
|
|
|
var panel = this,
|
2014-02-07 14:47:00 +00:00
|
|
|
fileTitle = image.filePageTitle;
|
|
|
|
|
|
|
|
this.setFileTitle( fileTitle.getNameText() );
|
2014-04-08 22:43:54 +00:00
|
|
|
this.setRepoDisplay( repoData );
|
2014-02-07 14:47:00 +00:00
|
|
|
this.setFilePageLink( imageData.descriptionUrl );
|
|
|
|
|
|
|
|
if ( imageData.creationDateTime ) {
|
2014-04-11 14:58:37 +00:00
|
|
|
// Use the raw date until moment can try to interpret it
|
|
|
|
panel.setDateTime( imageData.creationDateTime );
|
|
|
|
|
|
|
|
this.formatDate( imageData.creationDateTime ).then( function ( formattedDate ) {
|
|
|
|
panel.setDateTime( formattedDate, true );
|
|
|
|
} );
|
2014-02-07 14:47:00 +00:00
|
|
|
} else if ( imageData.uploadDateTime ) {
|
2014-04-11 14:58:37 +00:00
|
|
|
// Use the raw date until moment can try to interpret it
|
|
|
|
panel.setDateTime( imageData.uploadDateTime );
|
|
|
|
|
|
|
|
this.formatDate( imageData.uploadDateTime ).then( function ( formattedDate ) {
|
|
|
|
panel.setDateTime( formattedDate );
|
|
|
|
} );
|
2014-02-07 14:47:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( imageData.source ) {
|
|
|
|
this.setSource( imageData.source );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( imageData.author ) {
|
|
|
|
this.setAuthor( imageData.author );
|
|
|
|
}
|
|
|
|
|
2014-04-02 00:07:51 +00:00
|
|
|
this.buttons.set( imageData, repoData );
|
2014-02-07 14:47:00 +00:00
|
|
|
this.description.set( imageData.description, image.caption );
|
|
|
|
this.categories.set( repoData.getArticlePath(), imageData.categories );
|
|
|
|
|
2014-04-19 00:39:46 +00:00
|
|
|
this.setLicense( imageData.license, imageData.descriptionUrl );
|
2014-02-07 14:47:00 +00:00
|
|
|
|
2014-02-14 00:36:10 +00:00
|
|
|
if ( imageData.permission ) {
|
|
|
|
this.setPermission( imageData.permission );
|
|
|
|
}
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
this.fileUsage.set( localUsage, globalUsage );
|
|
|
|
|
|
|
|
this.setLocationData( imageData );
|
|
|
|
|
2014-02-13 09:52:40 +00:00
|
|
|
if ( user ) {
|
|
|
|
this.setUserPageLink( repoData, imageData.lastUploader, user.gender );
|
2014-02-07 14:47:00 +00:00
|
|
|
}
|
2014-03-17 08:07:53 +00:00
|
|
|
|
|
|
|
// File reuse steals a bunch of information from the DOM, so do it last
|
2014-03-21 20:29:55 +00:00
|
|
|
this.setFileReuseData( imageData, repoData, image.caption );
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
2014-03-01 01:10:51 +00:00
|
|
|
/**
|
|
|
|
* Show an error message, in case the data could not be loaded
|
|
|
|
* @param {string} error
|
|
|
|
*/
|
|
|
|
MPP.showError = function ( error ) {
|
|
|
|
this.$title.addClass( 'error' )
|
|
|
|
.text( mw.message( 'multimediaviewer-metadata-error', error ).text() );
|
|
|
|
};
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
/**
|
|
|
|
* Transforms a date string into localized, human-readable format.
|
|
|
|
* Unrecognized strings are returned unchanged.
|
|
|
|
* @param {string} dateString
|
2014-04-11 14:58:37 +00:00
|
|
|
* @return {jQuery.Deferred}
|
2014-02-07 14:47:00 +00:00
|
|
|
*/
|
|
|
|
MPP.formatDate = function ( dateString ) {
|
2014-04-11 14:58:37 +00:00
|
|
|
var deferred = $.Deferred(),
|
|
|
|
date;
|
|
|
|
|
|
|
|
mw.loader.using( 'moment', function () {
|
|
|
|
date = moment( dateString );
|
|
|
|
|
|
|
|
if ( date.isValid() ) {
|
|
|
|
deferred.resolve( date.format( 'LL' ) );
|
|
|
|
} else {
|
|
|
|
deferred.resolve( dateString );
|
|
|
|
}
|
|
|
|
}, function ( error ) {
|
|
|
|
deferred.reject( error );
|
|
|
|
if ( window.console && window.console.error ) {
|
|
|
|
window.console.error( 'mw.loader.using error when trying to load moment', error );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
|
|
|
return deferred.promise();
|
2014-02-07 14:47:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
mw.mmv.ui.MetadataPanel = MetadataPanel;
|
2014-04-11 14:58:37 +00:00
|
|
|
}( mediaWiki, jQuery, OO ) );
|