- if(this.enableFont && !Ext.isSafari2){
- var fontSelectItem = new Ext.Toolbar.Item({
- autoEl: {
- tag:'select',
- cls:'x-font-select',
- html: this.createFontOptions()
- }
+ if (me.enableFont && !Ext.isSafari2) {
+ fontSelectItem = Ext.widget('component', {
+ renderTpl: [
+ '<select class="{cls}">',
+ '<tpl for="fonts">',
+ '<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',
+ '</tpl>',
+ '</select>'
+ ],
+ renderData: {
+ cls: baseCSSPrefix + 'font-select',
+ fonts: me.fontFamilies,
+ defaultFont: me.defaultFont
+ },
+ renderSelectors: {
+ selectEl: 'select'
+ },
+ onDisable: function() {
+ var selectEl = this.selectEl;
+ if (selectEl) {
+ selectEl.dom.disabled = true;
+ }
+ Ext.Component.superclass.onDisable.apply(this, arguments);
+ },
+ onEnable: function() {
+ var selectEl = this.selectEl;
+ if (selectEl) {
+ selectEl.dom.disabled = false;
+ }
+ Ext.Component.superclass.onEnable.apply(this, arguments);
+ }