Ticket #1227: fcktextcolorcommand.js.patch

File fcktextcolorcommand.js.patch, 1.2 KB (added by matthiasmiller, 3 years ago)
  • editor/_source/commandclasses/fcktextcolorcommand.js

     
    4848 
    4949FCKTextColorCommand.prototype.Execute = function( panelX, panelY, relElement ) 
    5050{ 
    51         // We must "cache" the actual panel type to be used in the SetColor method. 
    52         FCK._ActiveColorPanelType = this.Type ; 
    53  
    5451        // Show the Color Panel at the desired position. 
    5552        this._Panel.Show( panelX, panelY, relElement ) ; 
    5653} 
     
    5855FCKTextColorCommand.prototype.SetColor = function( color ) 
    5956{ 
    6057        var style = FCKStyles.GetStyle( '_FCK_' + 
    61                 ( FCK._ActiveColorPanelType == 'ForeColor' ? 'Color' : 'BackColor' ) ) ; 
     58                ( this.Type == 'ForeColor' ? 'Color' : 'BackColor' ) ) ; 
    6259 
    6360        if ( !color || color.length == 0 ) 
    6461                FCK.Styles.RemoveStyle( style ) ; 
     
    6764                style.SetVariable( 'Color', color ) ; 
    6865                FCKStyles.ApplyStyle( style ) ; 
    6966        } 
    70  
    71         // Delete the "cached" active panel type. 
    72         delete FCK._ActiveColorPanelType ; 
    7367} 
    7468 
    7569FCKTextColorCommand.prototype.GetState = function()