Results 1 to 4 of 4

Thread: what zimbra call function when click on folders list

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Location
    Thailand
    Posts
    65
    Rep Power
    6

    Default what zimbra call function when click on folders list

    when I click on folders list at the left side (ex : Indox,sent,draft,...)
    I want to create zimlet which alert folder name.

    I know I can call this function

    initializeToolbar ---> was called when init toolbar
    onMsgView ---> was called when click on message
    onShowView ---> was called when screen change

    but about function onclick I have no idea.

    Please let me know.
    How I do?

    Thank you for reply.

  2. #2
    Join Date
    Mar 2008
    Location
    Stanford, CA
    Posts
    15
    Rep Power
    7

    Default

    Attach a listener to the folder tree view, in your zimlet initialization:

    Code:
    FolderChange.prototype.init = function() {
        var treeView = appCtxt.getAppViewMgr().getCurrentViewComponent(ZmAppViewMgr.C_TREE).getTreeView(ZmId.ORG_FOLDER);
        if (treeView) {
            treeView.addSelectionListener(AjxCallback.simpleClosure(this.folderChangeAlert, this));
        }
    };
    then your listener function can extract the folder name from the event:

    Code:
    FolderChange.prototype.folderChangeAlert = function(ev) {
        if (ev.items.length == 1 && ev.detail == DwtTree.ITEM_SELECTED) {
            var treeItem = DwtControl.getTargetControl(ev, false);
            var folder = treeItem.getData(Dwt.KEY_OBJECT);
            this.displayStatusMessage("Switched to " + folder.name);
        }
    };

  3. #3
    Join Date
    Oct 2008
    Location
    Thailand
    Posts
    65
    Rep Power
    6

    Default

    Thank you very much...
    ^ ^

  4. #4
    Join Date
    Oct 2008
    Location
    Thailand
    Posts
    65
    Rep Power
    6

    Default

    Thank you very much
    ^ ^

Similar Threads

  1. Replies: 8
    Last Post: 01-12-2012, 01:20 AM
  2. [SOLVED] parts_decode_ext error
    By jsabater in forum Administrators
    Replies: 7
    Last Post: 10-13-2008, 07:24 AM
  3. admin consol blank after 5.0.3 upgarde
    By maumar in forum Administrators
    Replies: 6
    Last Post: 03-21-2008, 05:16 AM
  4. Replies: 12
    Last Post: 02-25-2008, 06:28 PM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 10:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •