Page 2 of 3

How can I get appointment list from zimlet?

Posted: Wed Jun 21, 2006 12:09 pm
by 14319KevinH
[quote user="dijichi2"]8080 is often blocked by overzealous isp's and it departments as it's the defacto proxy port and often used for nefarious means, including open proxies. i must say putting cvs on there is a strange thing to do.[/QUOTE]
CVS itself is on a the standard CVS port. 8080 is just the web based view of CVS, so not critical to getting at the CVS data. Time to complain to your network admin ;).

How can I get appointment list from zimlet?

Posted: Thu Jun 22, 2006 5:30 am
by Kenji
I watched data.js to know how to get appointment list.

But I couldn't understand how to use... :(
Can "_newApptListener" function in data.js get calendar controller to get appointment list?
Com_Zimbra_Date.prototype._newApptListener =

function() {

var cc = this._appCtxt.getApp(ZmZimbraMail.CALENDAR_APP).getCalController();

// TODO support ev

cc.newAppointmentHelper(Com_Zimbra_Date._actionContext.date, null, null/*. ev.shiftKey */);

};
It is my source as follows.
---------------------------------------------------------
Com_Zimbra_SForce.prototype.singleClicked = function() {

alert('singleClicked start');
Com_Zimbra_SForce._newApptListener();
alert('singleClicked end');

};
Com_Zimbra_SForce.prototype._newApptListener =

function() {

var cc = this._appCtxt.getApp(ZmZimbraMail.CALENDAR_APP).getCalController();

// TODO support ev

cc.newAppointmentHelper(Com_Zimbra_Date._actionContext.date, null, null/*. ev.shiftKey */);

};
---------------------------------------------
The error occurred by the "var cc = this._appCtxt.getApp..." line.
any ideas?
Thanks&Regards

How can I get appointment list from zimlet?

Posted: Thu Jun 22, 2006 10:09 am
by 14319KevinH
It's DATE.js not DATA.js right? Just want to be 100% sure your looking at the right file.
What is the exact error your getting from your JavaScript console?

How can I get appointment list from zimlet?

Posted: Fri Jun 23, 2006 2:14 am
by Kenji
I mistaked.

It is date.js.
I modified my source.
---------------------------------------------------------

/// Called by the Zimbra framework when the SForce panel item was clicked

Com_Zimbra_SForce.prototype.singleClicked = function() {

alert('singleClicked start');
//Com_Zimbra_SForce.prototype._newApptListener();
var cc = this._appCtxt.getApp(ZmZimbraMail.CALENDAR_APP).getCalController();

// TODO support ev

cc.newAppointmentHelper(Com_Zimbra_SForce._actionContext.date, null, null/*. ev.shiftKey */)
alert('singleClicked end');

};
---------------------------------------------------------
JavaScript Console show me error that is "Com_Zimbra_SForce._actionContext has no properties."

How can I get appointment list from zimlet?

Posted: Fri Jun 23, 2006 3:01 am
by Kenji
I create com_zimbra_date by using date.js.
The same error occur.
Please watche this zimlet.

com_zimbra_date.zip


How can I get appointment list from zimlet?

Posted: Fri Jun 23, 2006 5:22 pm
by 14319KevinH
Well you need to pass in the actual date. That function assumes you are hovering over a date, but your use case may be different.

How can I get appointment list from zimlet?

Posted: Tue Jun 27, 2006 1:46 am
by Kenji
Hello KevinH.
You said following message.
[quote user="14319KevinH"]

If you already in a Zimlet then you can use the native JS calls rather than trying to make another SOAP call. Take a look at the date zimlet. date.js it has code to get a handle to the calendar controller and get various lists of appointments.[/QUOTE]
What should I do?
Could you tell me about it?

How can I get appointment list from zimlet?

Posted: Tue Jun 27, 2006 10:08 am
by 14319KevinH
Kenji, The code is above. You need to pass in a valid date. The error you are getting is pretty clear the value you are passing in is null or has no value. You need to pass in a valid date object.

How can I get appointment list from zimlet?

Posted: Thu Jul 06, 2006 8:52 pm
by Kenji
Finally, I could got appointment list!!!
Thanks KevinH

How can I get appointment list from zimlet?

Posted: Mon Apr 14, 2008 1:58 pm
by krystian
Kenji,
Care to post the code that you came up with? I'm also learning zimbra and would love to see how you achieved this and how your code was refined.
-krystian