/** * $Id: Toolbar.js 706 2008-03-11 20:38:31Z spocke $ * * @author Moxiecode * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. */ /**#@+ * @class This class is used to create toolbars a toolbar is a container for other controls like buttons etc. * @member tinymce.ui.Toolbar * @base tinymce.ui.Container */ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { /**#@+ * @method */ /** * Renders the toolbar as a HTML string. This method is much faster than using the DOM and when * creating a whole toolbar with buttons it does make a lot of difference. * * @return {String} HTML for the toolbar control. */ renderHTML : function() { var t = this, h = '', c, co, dom = tinymce.DOM, s = t.settings, i, pr, nx, cl; cl = t.controls; for (i=0; i')); } // Add toolbar end before list box and after the previous button // This is to fix the o2k7 editor skins if (pr && co.ListBox) { if (pr.Button || pr.SplitButton) h += dom.createHTML('td', {'class' : 'mceToolbarEnd'}, dom.createHTML('span', null, '')); } // Render control HTML // IE 8 quick fix, needed to propertly generate a hit area for anchors if (dom.stdMode) h += '' + co.renderHTML() + ''; else h += '' + co.renderHTML() + ''; // Add toolbar start after list box and before the next button // This is to fix the o2k7 editor skins if (nx && co.ListBox) { if (nx.Button || nx.SplitButton) h += dom.createHTML('td', {'class' : 'mceToolbarStart'}, dom.createHTML('span', null, '')); } } c = 'mceToolbarEnd'; if (co.Button) c += ' mceToolbarEndButton'; else if (co.SplitButton) c += ' mceToolbarEndSplitButton'; else if (co.ListBox) c += ' mceToolbarEndListBox'; h += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '')); return dom.createHTML('table', {id : t.id, 'class' : 'mceToolbar' + (s['class'] ? ' ' + s['class'] : ''), cellpadding : '0', cellspacing : '0', align : t.settings.align || ''}, '' + h + ''); } /**#@-*/ });