Ticket #76: default_combo_labels.patch
File default_combo_labels.patch, 4.6 KB (added by , 18 years ago) |
---|
-
editor/_source/classes/fcktoolbarfontformatcombo.js
15 15 this.NormalLabel = 'Normal' ; 16 16 17 17 this.PanelWidth = 190 ; 18 19 this.DefaultLabel = FCKConfig.DefaultFontFormatLabel || '' ; 18 20 } 19 21 20 22 // Inherit from FCKToolbarSpecialCombo. … … 80 82 { 81 83 // FCKDebug.Output( 'FCKToolbarFontFormatCombo Value: ' + value ) ; 82 84 83 // IE returns normal for DIV and P, so to avoid confusion, we will not show it ifnormal.85 // IE returns normal for DIV and P, so to avoid confusion, we will not show it as normal. 84 86 if ( value == this.NormalLabel ) 85 87 { 86 88 if ( combo.Label != ' ' ) 87 89 combo.DeselectAll(true) ; 90 91 combo.SetLabel( this.DefaultLabel ) ; 88 92 } 89 93 else 90 94 { 91 95 if ( this._LastValue == value ) 92 96 return ; 93 97 98 if ( !value || value.length == 0 ) 99 { 100 combo.DeselectAll() ; 101 combo.SetLabel( this.DefaultLabel ) ; 102 } 103 94 104 combo.SelectItemByLabel( value, true ) ; 95 105 } 96 106 -
editor/_source/classes/fcktoolbarfontscombo.js
11 11 this.Label = this.GetLabel() ; 12 12 this.Tooltip = tooltip ? tooltip : this.Label ; 13 13 this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; 14 15 this.DefaultLabel = FCKConfig.DefaultFontLabel || '' ; 14 16 } 15 17 16 18 // Inherit from FCKToolbarSpecialCombo. -
editor/_source/classes/fcktoolbarfontsizecombo.js
11 11 this.Label = this.GetLabel() ; 12 12 this.Tooltip = tooltip ? tooltip : this.Label ; 13 13 this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; 14 15 this.DefaultLabel = FCKConfig.DefaultFontSizeLabel || '' ; 14 16 } 15 17 16 18 // Inherit from FCKToolbarSpecialCombo. -
editor/_source/classes/fcktoolbarspecialcombo.js
21 21 22 22 FCKToolbarSpecialCombo.prototype.TypeOf = 'FCKToolbarSpecialCombo' ; // @Packager.RemoveLine 23 23 24 FCKToolbarSpecialCombo.prototype.DefaultLabel = '' ; 25 24 26 function FCKToolbarSpecialCombo_OnSelect( itemId, item ) 25 27 { 26 28 FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).Execute( itemId, item ) ; … … 81 83 if ( this._LastValue != sValue ) 82 84 { 83 85 this._LastValue = sValue ; 84 FCKToolbarSpecialCombo_RefreshActiveItems( this._Combo, sValue ) ; 86 87 if ( !sValue || sValue.length == 0 ) 88 { 89 this._Combo.DeselectAll() ; 90 this._Combo.SetLabel( this.DefaultLabel ) ; 91 } 92 else 93 FCKToolbarSpecialCombo_RefreshActiveItems( this._Combo, sValue ) ; 85 94 } 86 95 } 87 96 } -
editor/_source/classes/fcktoolbarstylecombo.js
11 11 this.Label = this.GetLabel() ; 12 12 this.Tooltip = tooltip ? tooltip : this.Label ; 13 13 this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; 14 15 this.DefaultLabel = FCKConfig.DefaultStyleLabel || '' ; 14 16 } 15 17 16 18 // Inherit from FCKToolbarSpecialCombo. … … 77 79 targetSpecialCombo.SetLabelById( aStyles[0].Name ) ; 78 80 } 79 81 else 80 targetSpecialCombo.SetLabel( '') ;82 targetSpecialCombo.SetLabel(this.DefaultLabel) ; 81 83 } 82 84 83 85 FCKToolbarStyleCombo.prototype.RefreshVisibleItems = function( targetSpecialCombo ) -
fckconfig.js
152 152 FCKConfig.BodyId = '' ; 153 153 FCKConfig.BodyClass = '' ; 154 154 155 FCKConfig.DefaultStyleLabel = '' ; 156 FCKConfig.DefaultFontFormatLabel = '' ; 157 FCKConfig.DefaultFontLabel = '' ; 158 FCKConfig.DefaultFontSizeLabel = '' ; 159 155 160 // The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word 156 161 FCKConfig.CleanWordKeepsStructure = false ; 157 162