2014-01-15 03:04:58 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWGalleryInspector class.
|
|
|
|
*
|
2015-01-08 23:54:03 +00:00
|
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
2014-01-15 03:04:58 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-07-14 21:32:49 +00:00
|
|
|
* Inspector for editing MediaWiki galleries.
|
2014-01-15 03:04:58 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ui.MWExtensionInspector
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
2015-03-23 15:09:49 +00:00
|
|
|
ve.ui.MWGalleryInspector = function VeUiMWGalleryInspector() {
|
2014-01-15 03:04:58 +00:00
|
|
|
// Parent constructor
|
2015-03-23 15:09:49 +00:00
|
|
|
ve.ui.MWGalleryInspector.super.apply( this, arguments );
|
2014-05-22 17:51:56 +00:00
|
|
|
|
2014-06-03 20:24:33 +00:00
|
|
|
this.$element.addClass( 've-ui-mwGalleryInspector' );
|
2014-01-15 03:04:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWGalleryInspector, ve.ui.MWExtensionInspector );
|
|
|
|
|
|
|
|
/* Static properties */
|
|
|
|
|
|
|
|
ve.ui.MWGalleryInspector.static.name = 'gallery';
|
|
|
|
|
|
|
|
ve.ui.MWGalleryInspector.static.icon = 'gallery';
|
|
|
|
|
2014-07-14 21:32:49 +00:00
|
|
|
ve.ui.MWGalleryInspector.static.size = 'large';
|
|
|
|
|
2014-02-12 21:45:37 +00:00
|
|
|
ve.ui.MWGalleryInspector.static.title =
|
|
|
|
OO.ui.deferMsg( 'visualeditor-mwgalleryinspector-title' );
|
2014-01-15 03:04:58 +00:00
|
|
|
|
2015-03-23 15:09:49 +00:00
|
|
|
ve.ui.MWGalleryInspector.static.modelClasses = [ ve.dm.MWGalleryNode ];
|
2014-01-15 03:04:58 +00:00
|
|
|
|
2014-02-04 12:28:46 +00:00
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/** */
|
|
|
|
ve.ui.MWGalleryInspector.prototype.getInputPlaceholder = function () {
|
|
|
|
// 'File:' is always in content language
|
|
|
|
return mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' +
|
|
|
|
ve.msg( 'visualeditor-mwgalleryinspector-placeholder' );
|
|
|
|
};
|
|
|
|
|
2014-01-15 03:04:58 +00:00
|
|
|
/* Registration */
|
|
|
|
|
2014-04-21 22:31:21 +00:00
|
|
|
ve.ui.windowFactory.register( ve.ui.MWGalleryInspector );
|