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 Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-2010, 10:43 AM
Junior Member
 
Posts: 4
Default [SOLVED] dragSource for uploaded document

Is there a way to specify a dragSource for a document in my briefcase?
Reply With Quote
  #2 (permalink)  
Old 01-20-2010, 11:08 AM
Zimbra Employee
 
Posts: 105
Default

You can indicate a briefcase item is a valid dragsource in your Zimlet Definition File XML with:

<dragSource type="ZmBriefcaseItem" />

In your zimlet, in the doDrop(obj) method, the ZmBriefcaseItem object will be passed in. You can check obj.type for "BRIEFCASE_ITEM".
Reply With Quote
  #3 (permalink)  
Old 01-20-2010, 01:38 PM
Junior Member
 
Posts: 4
Default

<dragSource type="ZmBriefcaseItem" /> worked
but, the object in the js file is undefined:

com_zimbra_fooHandlerObject.prototype.doDrop =
function(obj) {
var type = obj.TYPE;
alert(obj.TYPE);
...
}
Reply With Quote
  #4 (permalink)  
Old 01-20-2010, 01:41 PM
Zimbra Employee
 
Posts: 105
Default

I found with ZmBriefcaseItem, you have to check for obj.type (lowercase), not obj.TYPE.
Reply With Quote
  #5 (permalink)  
Old 01-20-2010, 02:00 PM
Junior Member
 
Posts: 4
Default

That worked. I am using the desktop client so I can't open a browser to do some js debugging (at least I don't think I can). How can I see what methods are available for this object? Do I need ot download the source code?

Thanks..
Reply With Quote
  #6 (permalink)  
Old 01-20-2010, 02:55 PM
Zimbra Employee
 
Posts: 105
Default

Here's a link to the Zimlet Developer's Guide:

ZCS 6.0:Zimlet Developers Guide:Introduction - Zimbra :: Wiki

There is a section on using Zimbra Desktop for development, accessing the interface via a browser, turning on logging, etc:

ZCS 6.0:Zimlet Developers Guideev Environment Setup - Zimbra :: Wiki

Last edited by sposetti; 01-20-2010 at 03:57 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.