mediawiki-extensions-Visual.../modules/ve/ui/ve.ui.Tool.js
Catrope 6afed5e5cc Move ve2/ back to ve/
Change-Id: Ie51d8e48171fb1f84045d1560ee603cee62b91f6
2012-06-19 18:20:28 -07:00

29 lines
614 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;
};
ve.ui.Tool.prototype.clearState = function() {
this.$.removeClass( 'es-toolbarButtonTool-down' );
};