Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-2007, 04:55 AM
Member
 
Posts: 13
Default DwtDialog

Hello guys!

First of all I have to commend Zimbra programmers and designers because they have done a remarkable javascript library.

Ok, now I should get to the point? Does enybody have a working example for DwtDialog object? I tried to make a new DwtDialog object over DwtComposite object, but it doesn't work.

composite = new DwtComposite(composite, null, DwtControl.ABSOLUTE_STYLE);
composite .setBounds(1, 200, 1000, 700);
composite .zShow(false);

buttons = new Array();
buttons .push(DwtDialog.CANCEL_BUTTON);
buttons .push(DwtDialog.OK_BUTTON);

dialog = new DwtDialog(composite , null, "Add customer", buttons , null, null, null, null);


Can enybody help me please?

Last edited by sondor; 06-26-2007 at 11:41 AM..
Reply With Quote
  #2 (permalink)  
Old 06-26-2007, 11:33 AM
Member
 
Posts: 13
Default

basedialog = new DwtDialog(shell, null,"<b>Insert customer</b>", [DwtShell.CANCEL_BUTTON, DwtDialog.OK_BUTTON], null, null, DwtDialog.MODAL, null);
var html=["testing"].join("");
basedialog.setContent(html);
basedialog.popup();

I have manage to resolve this by myself. First off all you need a shell as your primary javascript object and then you just have to call popup function. Thaks for your noncooperation. Joke. Now I have a different kind of problem. The buttons that substitute standardbuttons variable when I'm creating basedialog object are never in visible mode! Any clues?

Last edited by sondor; 06-26-2007 at 02:09 PM..
Reply With Quote
  #3 (permalink)  
Old 06-26-2007, 02:07 PM
Member
 
Posts: 13
Default

Don't bother at all. I found the error. I'm using one of the first zimbra dwt library so there was an error in DwtDialog constructor where the buttons are made. The buttons are constructed just fine, but the label was newer shown.
There seems to be that I have some problems with DwtMsg(...) function so I have just transformed this line

"this._button[buttonId].setText(this._buttonDesc[buttonId].label); "

into

this._button[buttonId].setText(DwtDialog.MSG_KEY[this._buttonDesc[buttonId].id]);

Thats all from me! See you!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.