2013-02-20 19:44:44 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor Initialization Target class.
|
|
|
|
*
|
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generic Initialization target.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
2013-05-01 22:21:32 +00:00
|
|
|
* @mixins ve.EventEmitter
|
2013-02-20 19:44:44 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {jQuery} $container Conainter to render target into
|
|
|
|
*/
|
|
|
|
ve.init.Target = function VeInitTarget( $container ) {
|
2013-05-01 22:21:32 +00:00
|
|
|
// Mixin constructors
|
2013-02-20 19:44:44 +00:00
|
|
|
ve.EventEmitter.call( this );
|
|
|
|
|
|
|
|
// Properties
|
|
|
|
this.$ = $container;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2013-05-01 22:21:32 +00:00
|
|
|
ve.mixinClass( ve.init.Target, ve.EventEmitter );
|
2013-05-10 00:17:51 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
/* Static Properties */
|
2013-05-10 00:17:51 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
ve.init.Target.static.toolbarTools = [
|
2013-05-24 15:17:07 +00:00
|
|
|
{ 'items': ['undo', 'redo'] },
|
|
|
|
{ 'items': ['format'] },
|
2013-08-15 19:33:31 +00:00
|
|
|
{ 'items': ['bold', 'italic', 'strikethrough', 'subscript', 'superscript',
|
|
|
|
'underline', 'link', 'code', 'language', 'clear'] },
|
2013-05-24 15:17:07 +00:00
|
|
|
{ 'items': ['number', 'bullet', 'outdent', 'indent'] }
|
2013-05-14 23:45:42 +00:00
|
|
|
];
|
2013-05-10 00:17:51 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
ve.init.Target.static.surfaceCommands = [
|
2013-07-08 21:20:31 +00:00
|
|
|
'bold',
|
|
|
|
'italic',
|
2013-08-15 19:25:56 +00:00
|
|
|
//'strikethrough',
|
2013-08-15 19:33:31 +00:00
|
|
|
//'subscript',
|
2013-08-15 19:25:56 +00:00
|
|
|
//'superscript',
|
|
|
|
//'underline',
|
2013-07-08 21:20:31 +00:00
|
|
|
'link',
|
|
|
|
//'language',
|
|
|
|
'undo',
|
|
|
|
'redo',
|
|
|
|
'indent',
|
|
|
|
'outdent'
|
2013-05-14 23:45:42 +00:00
|
|
|
];
|