]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/javascript/tiny_mce/classes/ui/Separator.js
Release 6.5.0
[Github/sugarcrm.git] / include / javascript / tiny_mce / classes / ui / Separator.js
1 /**
2  * Separator.js
3  *
4  * Copyright 2009, Moxiecode Systems AB
5  * Released under LGPL License.
6  *
7  * License: http://tinymce.moxiecode.com/license
8  * Contributing: http://tinymce.moxiecode.com/contributing
9  */
10
11 /**
12  * This class is used to create vertical separator between other controls.
13  *
14  * @class tinymce.ui.Separator
15  * @extends tinymce.ui.Control
16  */
17 tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
18         /**
19          * Separator constructor.
20          *
21          * @constructor
22          * @method Separator
23          * @param {String} id Control id to use for the Separator.
24          * @param {Object} s Optional name/value settings object.
25          */
26         Separator : function(id, s) {
27                 this.parent(id, s);
28                 this.classPrefix = 'mceSeparator';
29                 this.setDisabled(true);
30         },
31
32         /**
33          * Renders the separator as a HTML string. This method is much faster than using the DOM and when
34          * creating a whole toolbar with buttons it does make a lot of difference.
35          *
36          * @method renderHTML
37          * @return {String} HTML for the separator control element.
38          */
39         renderHTML : function() {
40                 return tinymce.DOM.createHTML('span', {'class' : this.classPrefix, role : 'separator', 'aria-orientation' : 'vertical', tabindex : '-1'});
41         }
42 });