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

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 Display Modes
  #11 (permalink)  
Old 02-11-2009, 04:01 PM
Intermediate Member
 
Posts: 23
Default

Thanks for that, rrao! It worked mostly as advertised; the button is added to the toolbar when the view changes.

All is not well, however... the button is supposed to trigger a Dwt dialog. When I click the button added by onShowView, the dialog is never created; Firebug throws a "args[0] is undefined" error (Dwt.js line 1092 --- if (args.length > 1 || args[0]._eventMgr) { ) in response to
var view = new DwtComposite(this.getShell());


The button does still work normally in the view that was present at startup (e.g if the client starts in conversation view, it works in that view but not in traditional).

Any help or insight you can provide would be most appreciated. I can post the entire code if it helps.
Reply With Quote
  #12 (permalink)  
Old 02-11-2009, 04:47 PM
Zimbra Employee
 
Posts: 115
Default

These two are supposed to two different buttons so if you are using the same id, it might cause problem..
for example:
com_zimbra_discover.discover in the code is the id for that button, try using two different ids depending on the view..something like com_zimbra_discover.discoverConv and com_zimbra_discover.discoverTrad

Code:
		var btn = this._toolbar.createOp(
			com_zimbra_discover.discover,
		{
			text	: ZmMsg.discoverlabel,
			tooltip : ZmMsg.discovertip,
			index   :indx,
			image   : "dy-panelIcon"
		}
			);
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #13 (permalink)  
Old 02-11-2009, 05:56 PM
Intermediate Member
 
Posts: 23
Default

Nope -- still getting the same error. Here's a possible clue: I added a firebug console.log(this); right before I create the dialog with
Code:
var view = new DwtComposite(this.getShell());
When the dialog works, firebug prints ca_sfu_icat_resend (the namespace for the zimlet) to the console for the value of this. When it doesn't work, it just prints undefined.
Reply With Quote
  #14 (permalink)  
Old 02-11-2009, 06:00 PM
Zimbra Employee
 
Posts: 115
Default

ok upload or send me your zimlet to rrao@
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #15 (permalink)  
Old 02-16-2009, 08:28 AM
Active Member
 
Posts: 41
Default

can you upload the zimlet ^.^ thx
Reply With Quote
  #16 (permalink)  
Old 02-17-2009, 10:48 AM
Intermediate Member
 
Posts: 23
Default

Quote:
Originally Posted by rrao View Post
ok upload or send me your zimlet to rrao@
Thanks! I just got back from a vacation, so I'll clean up the code a bit and email it to you.
Reply With Quote
  #17 (permalink)  
Old 02-17-2009, 06:30 PM
Intermediate Member
 
Posts: 23
Default

Just a quick update -- rrao helped fix my problem and the button now functions properly on both toolbars.


gregor: We may submit the zimlet to the gallery but I need to clear that with some higher-ups here first as it contains some 'not-written-here' code.
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

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

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0