mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 17:36:35 +00:00
61ba07d409
Objectives: * Merge reference insert and edit dialogs * Change workflow to put editing/creating a new reference first * Add secondary page in dialog for selecting an existing reference Changes: *.php * Cleanup unused files/messages ve.ui.Dialog.css * In the footer; make primary, constructive and destructive buttons appear on the right; all others on the left ve.ui.MWReferenceSearchWidget.js * Fix documentation * Remove create option and reuse section header items ve.ui.MWReferenceInsertButtonTool.js, ve.ui.MWReferenceEditButtonTool.js, ve.ui.MWReferenceButtonTool.js * Merge reference button tools ve.ui.MWDialog.css * Remove body styles, use padded option of layout instead * Update selectors as per merging of dialogs ve.ui.MWReferenceInsertDialog.js ve.ui.MWReferenceEditDialog.js ve.ui.MWReferenceDialog.js * Merge reference dialogs * Add buttons to switch between edit and select mode ve.init.mw.ViewPageTarget.js * Update reference button name as per merging of tools ve.ui.SurfaceWidget.js * New widget! * Encapsulates a "sub-surface" Bug: 51152 Bug: 50458 Change-Id: I8265febf4fd8f64d2ac40470ff033bac68b24d99
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MWReferenceButtonTool class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* MediaWiki reference button tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.DialogButtonTool
|
|
*
|
|
* @constructor
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
* @param {Object} [config] Config options
|
|
*/
|
|
ve.ui.MWReferenceButtonTool = function VeUiMWReferenceButtonTool( toolbar, config ) {
|
|
// Parent constructor
|
|
ve.ui.DialogButtonTool.call( this, toolbar, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.MWReferenceButtonTool, ve.ui.DialogButtonTool );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.MWReferenceButtonTool.static.name = 'mwReference';
|
|
|
|
ve.ui.MWReferenceButtonTool.static.icon = 'reference';
|
|
|
|
ve.ui.MWReferenceButtonTool.static.titleMessage = 'visualeditor-dialogbutton-reference-tooltip';
|
|
|
|
ve.ui.MWReferenceButtonTool.static.dialog = 'mwReference';
|
|
|
|
ve.ui.MWReferenceButtonTool.static.modelClasses = [ ve.dm.MWReferenceNode ];
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.toolFactory.register( 'mwReference', ve.ui.MWReferenceButtonTool );
|