Results 1 to 6 of 6

Thread: Admin Extension fail view

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Santiago - Chile
    Posts
    76
    Rep Power
    9

    Default Admin Extension fail view

    I'm writing an Admin Extension for a Domain view.

    I saw Admin Extension from wiki: Extending Admin UI - Zimbra :: Wiki

    I did deploy my new Extension successfully, but when i want to see my new "Devel" tab, is clear.

    I should see the DomainName and a TextArea.

    Can you help me with my Admin Extension?

    Thanks
    Attached Images Attached Images
    Attached Files Attached Files
    Daniel Eugenin
    http://www.it-linux.cl

  2. #2
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    10

    Default

    It looks like the problem is in the tab definition. You have

    var myTab = [
    {type:_SWITCH_, items:[
    {type:_CASE_, relevant: ("instance[ZaModel.currentTab] == " + myTabIndex),
    items:[
    { ref: ZaDomain.A_domainName, type:_OUTPUT_,
    label:ZaMsg.Domain_DomainName
    },
    { ref: ZaDomain.A_notes, type:_TEXTAREA_,
    label:"Texto Devel", labelCssStyle:"vertical-align:top", width:250
    }
    ]
    }
    ]
    }
    ];

    but you should have:

    var myTab = {type:_CASE_, relevant: ("instance[ZaModel.currentTab] == " + myTabIndex),
    items:[
    { ref: ZaDomain.A_domainName, type:_OUTPUT_,
    label:ZaMsg.Domain_DomainName
    },
    { ref: ZaDomain.A_notes, type:_TEXTAREA_,
    label:"Texto Devel", labelCssStyle:"vertical-align:top", width:250
    }
    ]
    };


    because items array and SWITCH element are already defined in the original form in ZaDomainXFormView, and your extension only needs to add one more tab.
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  3. #3
    Join Date
    Jun 2006
    Location
    Santiago - Chile
    Posts
    76
    Rep Power
    9

    Default

    Thanks for your reply Greg, but I still with the problem... :-(

    Mi new Tab its appears on Domain view, but OUTPUT and TEXTAREA it's not appears (the tab is clear)...


    Mi devel.js is:

    -------------------------------------------------------------------------------------------
    function DevelExtension() {}

    DevelExtension.DomainXFormModifier = function (xFormObject) {

    //find _TAB_BAR_ element
    var cnt = xFormObject.items.length;
    for(i = 0; i < cnt; i++) {
    if(xFormObject.items[i].type=="tab_bar") break;
    }
    //get a tab index
    var myTabIndex = ++ZaDomainXFormView.TAB_INDEX;

    //add a tab
    xFormObject.items[i].choices.push({value:myTabIndex, label:"Devel Tab"});

    //define a form for my new tab.
    var myTab = {type:_CASE_, relevant"instance[ZaModel.currentTab] == " + myTabIndex),
    items:[
    { ref:ZaDomain.A_domainName, type:_OUTPUT_,
    label:ZaMsg.Domain_DomainName
    },
    { ref:ZaDomain.A_notes, type:_TEXTAREA_,
    label:"Texto Devel", labelCssStyle:"vertical-align:top", width:250
    }
    ]
    };

    //find SWITCH element
    for(i = 0; i < cnt; i++) {
    if(xFormObject.items[i].type=="switch") break;
    }

    //add my tab to the form
    xFormObject.items[i].items.push(myTab);
    }

    ZaTabView.XFormModifiers["ZaDomainXFormView"].push(DevelExtension.DomainXFormModifier);

    -------------------------------------------------------------------------------------------
    Daniel Eugenin
    http://www.it-linux.cl

  4. #4
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    10

    Default

    I updated the guide to creating admin extensions on the wiki Extending Admin UI - Zimbra :: Wiki

    and added a general guide to the admin framework:

    Admin UI Framework Guide - Zimbra :: Wiki
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  5. #5
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    10

    Default

    Quote Originally Posted by deugenin View Post
    Thanks for your reply Greg, but I still with the problem... :-(

    Mi new Tab its appears on Domain view, but OUTPUT and TEXTAREA it's not appears (the tab is clear)...

    Ok, I figured it out. The problem is that in 4.5.7 ZaDomainXFormView.TAB_INDEX global variable is not defined, I added it only in 5.0 branch. Instead, we used hard-coded tab indexes. So, in order to make it work you need to change this line

    var myTabIndex = ++ZaDomainXFormView.TAB_INDEX;

    to this

    var myTabIndex = 6;
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  6. #6
    Join Date
    Jun 2006
    Location
    Santiago - Chile
    Posts
    76
    Rep Power
    9

    Default

    Thanks you very much Greg!, that solved my problem!
    Daniel Eugenin
    http://www.it-linux.cl

Similar Threads

  1. Disable Admin View Mail
    By percibal in forum Administrators
    Replies: 51
    Last Post: 05-24-2011, 12:12 PM
  2. [SOLVED] Problems with admin extension deploy
    By danny.sierra@omtech.net in forum Administrators
    Replies: 6
    Last Post: 11-06-2007, 07:35 PM
  3. Not able to view Admin Console....
    By worldwidenandhu in forum Installation
    Replies: 2
    Last Post: 11-01-2007, 08:47 AM
  4. Replies: 3
    Last Post: 08-20-2007, 07:34 PM
  5. View Mails in Admin Console
    By rajan in forum Administrators
    Replies: 1
    Last Post: 05-07-2007, 12:58 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
  •