mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 09:26:37 +00:00
a48d2a5787
* Added title attributes for tools
25 lines
501 B
JavaScript
25 lines
501 B
JavaScript
/**
|
|
* Creates an es.Tool object.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @param {es.ToolbarView} toolbar
|
|
* @param {String} name
|
|
*/
|
|
es.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 */
|
|
|
|
es.Tool.tools = {};
|
|
|
|
/* Methods */
|
|
|
|
es.Tool.prototype.updateState = function() {
|
|
throw 'Tool.updateState not implemented in this subclass:' + this.constructor;
|
|
};
|