mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
25 lines
512 B
JavaScript
25 lines
512 B
JavaScript
/**
|
|
* Creates an ve.ui.Tool object.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
* @param {String} name
|
|
*/
|
|
ve.ui.Tool = function( toolbar, name, title ) {
|
|
this.toolbar = toolbar;
|
|
this.name = name;
|
|
this.title = title;
|
|
this.$ = $( '<div class="es-tool"></div>' ).attr( 'title', this.title );
|
|
};
|
|
|
|
/* Static Members */
|
|
|
|
ve.ui.Tool.tools = {};
|
|
|
|
/* Methods */
|
|
|
|
ve.ui.Tool.prototype.updateState = function() {
|
|
throw 'Tool.updateState not implemented in this subclass:' + this.constructor;
|
|
};
|