Show
Ignore:
Timestamp:
05/10/08 21:13:06 (7 months ago)
Author:
peller
Message:

Set custom label. Refs #6224

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/tests/_editor/test_CustomPlugin.html

    r13685 r13686  
    4747                                _initButton: function(){ 
    4848                                        this.command = "htmlToggle"; 
     49                                        this.editor.commands[this.command] = "View HTML source"; // note: should be localized 
    4950                                        this.iconClassPrefix = "customIcon"; 
    5051                                        this.inherited(arguments); 
    5152                                        delete this.command; // kludge so setEditor doesn't make the button invisible 
    52                                         this.connect(this.button, "onClick", this._toggleSource);                
     53                                        this.connect(this.button, "onClick", this._toggleSource);        
    5354                                }, 
    5455 
     
    7374                                        } 
    7475 
    75                                         this.editor.setDisabled(this.source); // conditionally disable toolbar 
     76                                        this.editor.setDisabled(this.source); // conditionally disable toolbar -- FIXME. Doesn't work. 
     77                                        this.button.setLabel(this.source ? "View WYSIWYG" : this.editor.commands[this.command]); // note: should be localized 
    7678                                } 
    7779                        }