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
  #11 (permalink)  
Old 08-23-2009, 05:44 AM
Special Member
 
Posts: 100
Default

HI! I just want to say thanks for making this plugin! and also that I had the same issue as the original post. It wasn't until I used your example in this thread that you said "just worked" was I able to get this working. It seems the README file in the original zip I downloaded might contain some characters that don't work well when parsing the XML on the server. When I copied your example in post #4 here in this thread, and then pasted it into nano right on the server itself, modified it with my info, it worked perfect! Perhaps you could make a special config.xml or similar file and store it within the zimplet itself that can just be modified, instead of including the code in the readme file.. This way you know the file format is correct as long as they just modify and existing one that has been tested before. (EDIT: SCRATCH THIS - you already do this I noticed now - there is a config_template.xml that can be used in /opt/zimbra/jetty/webapps/service/zimlet/net_inova_gmaps/ - so anyone else having problems should modify this file and use it with the config command)

Thanks again!

Shane Menshik
D2 GLOBAL INC
__________________
- SLM -

Last edited by d2globalinc; 08-23-2009 at 05:48 AM..
Reply With Quote
  #12 (permalink)  
Old 02-08-2010, 05:05 PM
Senior Member
 
Posts: 58
Default

Running 6.0.2

I got the zimlet installed and it shows up for the user after restarting the mailbox daemon. But it only works for dropping contacts onto the zimlet in the left hand navigation tree rather.

Like the original poster, addresses in emails do not result in a pop-up map when mousing over. Mapping works manually so it seems the api must be working.
Reply With Quote
  #13 (permalink)  
Old 02-10-2010, 09:11 AM
Zimbra Employee
 
Posts: 105
Default

To support drag-n-drop for something other than contacts, make the following changes:

1. In the Zimlet Definition File (net_inova_gamps.xml), you have:

Code:
<dragSource type="ZmAppointment" >
This should be:

Code:
<dragSource type="ZmAppt" >
2. In your Zimlet Handler Object
Code:
Net_Inova_GMaps.prototype.doDrop()
method, you'll want to check for "type" to retrieve info from the contact or appointment (based on what is dropped). Here is an example of retrieving various properties from an appointment and from a contact:

Code:
Net_Inova_GMaps.prototype.doDrop = function(obj, canvas) {
	var type = obj.TYPE;
	switch(type) {
	case "ZmAppt": {
	// do something with ZmAppt
	var apt = obj.srcObj; // {ZmAppt}
			
	var aptName = apt.getName(); // get name (i.e. "subject") {String}
	var aptNotes = apt.getNotesPart(); // {String}
	var location = apt.getLocation(); // {String}
	var startTime = apt.getStartTime(); // {int} milliseconds
	var endTime = apt.getEndTime(); // {int} milliseconds
	var dateRange = apt.getDateRange(); // dateRange.startTime + dateRange.endTime {Date}

	var allDayEvent = apt.allDayEvent; // {String} "0" "1"
	var freeBusy = apt.freeBusy; // {String} "B" "T" "O" "F"
	var privacy = apt.privacy; // {String} "PRI" "PUB"

	if (isRecurring) {
		var recObj = apt._recurrence; // {ZmRecurrence}
		var blurb = apt.getRecurBlurb(); // {String}
		var type = apt.getRecurType(); // {String}
	}

	break;
	}
	case "ZmContact": {			
	// do something with ZmContact
	var contact = obj; // {ZmContact}
			
	var fn = contact.firstName; // {String}
	var ln = contact.lastName; // {String}
	var email = contact.email; // {String}
	var homePhone = contact.homePhone; // {String}
	var otherPhone = contact.otherPhone; // {String}
	var workPhone = contact.workPhone; // {String}

	break;
	}
}
Also, there are other types supported for drop. See this example and the JsDoc for that method:

ZCS 6.0:Zimlet Developers Guide:Examples:Panel Item Drag Source - Zimbra :: Wiki

Zimlet JavaScript API Reference - ZmZimletBase
Reply With Quote
  #14 (permalink)  
Old 02-10-2010, 09:19 AM
Senior Member
 
Posts: 58
Default

Thanks for the instructions.

I thought that this zimlet added mouse-over functionality. Drag-and-drop is not a particularly interesting application for us- we are more interested in mouse-over capabilities.
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.