mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
1fd7e85846
Objective: * Allow inserting images from local wiki and commons Changes: ve.init.mw.ViewPageTarget.js * Add media insert button to toolbar ve.init.mw.Platform.js * Add getMediaSources method - defaults to local wiki and commons ve.ui.MWMediaInsertDialog.js * New dialog for inserting media * Uses a media select widget and inserts block images ve.ui.Dialog.css * Added styling for media select widget in media insert dialog ve.ui.Widget.css * Added styles for media select widget and media select item widget ve.ui.MWMediaInsertButtonTool.js * New tool for inserting media ve.ui.MediaSelectItemWidget.js * New item widget for media select widgets ve.ui.MediaSelectWidget.js * New widget for searching for and selecting media items ve.ui.TextInputWidget.js * Added isPending method VisualEditor.i18n.php * New messages for media insert dialog VisualEditor.php * Added links to new files and messages PhantomJS-- Change-Id: Ia803ff3ef518782ce76802d2dab7559686a1bb0a
40 lines
1 KiB
JavaScript
40 lines
1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MWMediaButtonTool class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* MediaWiki media insert button tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.DialogButtonTool
|
|
*
|
|
* @constructor
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
* @param {Object} [config] Config options
|
|
*/
|
|
ve.ui.MWMediaInsertButtonTool = function VeUiMWMediaButtonTool( toolbar, config ) {
|
|
// Parent constructor
|
|
ve.ui.DialogButtonTool.call( this, toolbar, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.MWMediaInsertButtonTool, ve.ui.DialogButtonTool );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.MWMediaInsertButtonTool.static.name = 'mwMediaInsert';
|
|
|
|
ve.ui.MWMediaInsertButtonTool.static.icon = 'picture';
|
|
|
|
ve.ui.MWMediaInsertButtonTool.static.titleMessage = 'visualeditor-dialogbutton-media-tooltip';
|
|
|
|
ve.ui.MWMediaInsertButtonTool.static.dialog = 'mwMediaInsert';
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.toolFactory.register( 'mwMediaInsert', ve.ui.MWMediaInsertButtonTool );
|