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