Page 1 of 1

Zimlet Email Reminder in Zimbra 8

Posted: Mon Mar 17, 2014 4:58 am
by avea2003
Hi

Who can help to update this zimlet for Zimbra 8?
gallery.zimbra.com
I
like idea to how make reminder.
The system error when try resp:
EmailReminderZimlet.prototype._createEmailFollowupFolder =

function() {

var soapDoc = AjxSoapDoc.create("CreateFolderRequest", "urn:zimbraMail");

var folderNode = soapDoc.set("folder");

folderNode.setAttribute("name", EmailReminderZimlet.CALENDAR_EMAIL_REMINDERS);

folderNode.setAttribute("l", appCtxt.getFolderTree().root.id);

folderNode.setAttribute("view", EmailReminderZimlet.VIEW_CALENDAR);

var command = new ZmCsfeCommand();

var resp = command.invoke({soapDoc: soapDoc});

var id = resp.Body.CreateFolderResponse.folder[0].id;

if (!id) {

var errMsg = AjxMessageFormat.format(this.getMessage("EmailReminder_error_createcalendar"), EmailReminderZimlet.CALENDAR_EMAIL_REMINDERS);

throw new AjxException(errMsg, AjxException.INTERNAL_ERROR, "createEmailFollowupFolder");

}

this.emailFollowupFolderId = id;
soapDoc = AjxSoapDoc.create("FolderActionRequest", "urn:zimbraMail");

var actionNode = soapDoc.set("action");

actionNode.setAttribute("op", "color");

actionNode.setAttribute("id", id);

actionNode.setAttribute("color", "5");

command = new ZmCsfeCommand();

resp = command.invoke({soapDoc: soapDoc});

this._justCreatedCalendarFolder = true;

};

Zimlet Email Reminder in Zimbra 8

Posted: Sat Apr 05, 2014 11:10 am
by avea2003
After some day I return to resolve this problem. Very Thanks Zimbra 7.2 and posixaccount + samba - Page 3
Need change in js file

/**

* Gets the follow-up folder ID.

*

*/

EmailReminderZimlet.prototype._getEmailFollowupFolderId =

function() {

this._justCreatedCalendarFolder = false;

var soapDoc = AjxSoapDoc.create("GetFolderRequest", "urn:zimbraMail");

var folderNode = soapDoc.set("folder");

folderNode.setAttribute("l", appCtxt.getFolderTree().root.id);

var command = new ZmCsfeCommand();

var params = new Object();

params.noAuthToken = true;

params.soapDoc = soapDoc;

var top = command.invoke(params).Body.GetFolderResponse.folder[0];
var folders = top.folder;

if (folders) {

for (var i = 0; i
var f = folders;

if (f && f.name == EmailReminderZimlet.CALENDAR_EMAIL_REMINDERS && f.view == EmailReminderZimlet.VIEW_CALENDAR) {

this.emailFollowupFolderId = f.id;

return;

}

}

}



// there is no such folder, so create one.

this._createEmailFollowupFolder(top.id);

};
/**

* Creates the follow-up folder.

*

*/

EmailReminderZimlet.prototype._createEmailFollowupFolder =

function() {

var soapDoc = AjxSoapDoc.create("CreateFolderRequest", "urn:zimbraMail");

var folderNode = soapDoc.set("folder");

folderNode.setAttribute("name", EmailReminderZimlet.CALENDAR_EMAIL_REMINDERS);

folderNode.setAttribute("l", appCtxt.getFolderTree().root.id);

folderNode.setAttribute("view", EmailReminderZimlet.VIEW_CALENDAR);

var command = new ZmCsfeCommand();

var params = new Object();

params.noAuthToken = true;

params.soapDoc = soapDoc;

var resp = command.invoke(params);

var id = resp.Body.CreateFolderResponse.folder[0].id;

if (!id) {

var errMsg = AjxMessageFormat.format(this.getMessage("EmailReminder_error_createcalendar"), EmailReminderZimlet.CALENDAR_EMAIL_REMINDERS);

throw new AjxException(errMsg, AjxException.INTERNAL_ERROR, "createEmailFollowupFolder");

}

this.emailFollowupFolderId = id;
soapDoc = AjxSoapDoc.create("FolderActionRequest", "urn:zimbraMail");

var actionNode = soapDoc.set("action");

actionNode.setAttribute("op", "color");

actionNode.setAttribute("id", id);

actionNode.setAttribute("color", "5");

command = new ZmCsfeCommand();

var params = new Object();

params.noAuthToken = true;

params.soapDoc = soapDoc;

resp = command.invoke(params);

this._justCreatedCalendarFolder = true;

};
Now work in Web on Zimbra 8