Quantcast
Channel: Zimbra :: Forums - Zimlets
Viewing all articles
Browse latest Browse all 171

Create button in off state

$
0
0
Am trying to fix the StickyNotes Zimlet, and almost there, but one bit that is bugging me is when the button is initially added it is in the "On" state; where as others like Delete or Spam are in the "Off" state.
Code:

ZmMsg.stickyNotesLabel = this.getMessage("sn_label");
        ZmMsg.stickyNotesTip = this.getMessage("sn_tooltip");
        var buttonArgs = {
            text    : ZmMsg.stickyNotesLabel,
            tooltip: ZmMsg.stickyNotesTip,
            index: buttonIndex,
            image: "stickynotes-panelIcon"
        };
        if(!toolbar.getOp(StickyNotesZimlet.stickyNotes)) {
            var button = toolbar.createOp(StickyNotesZimlet.stickyNotes, buttonArgs);
            button.addSelectionListener(new AjxListener(this, this._stickyTBListener, [controller]));
        }

What do I need to add to the buttonArgs to change its default state please ?

Viewing all articles
Browse latest Browse all 171

Trending Articles