mediawiki-extensions-Visual.../modules/ve/ui/tools/buttons/ve.ui.MWReferenceButtonTool.js
Trevor Parscal 67a2613a12 Reference dialog
Objective:

Add a basic (empty) dialog for mediawiki references. Editor to follow.

Changes:

*.php
* Added file links and messages

ve.ui.MWMetaDialog.js
* Moved initialize method to the top (for consistent ordering)

ve.ui.MWReferenceDialog.js
* New class, basic empty dialog for references

ve.ui.LinkInspector.js, ve.ui.MWLinkInspector.js, ve.ui.MediaButtonTool.js
* Cleanup documentation
* Whitespace

icons.ai, reference.png, reference.svg
* Switch to reference icon being 3 books on a shelf

ve.ui.MWReferenceButtonTool.js
* New class, basic dialog button for references

Change-Id: Ia4e30e9239fa1e3b28c0a1ef1ca0a6515a8103ef
2013-05-13 13:10:59 -07:00

39 lines
1,018 B
JavaScript

/*!
* VisualEditor UserInterface MWReferenceButtonTool class.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* 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';
/* Registration */
ve.ui.toolFactory.register( 'mwReference', ve.ui.MWReferenceButtonTool );