View Single Post
  #14 (permalink)  
Old 05-20-2008, 09:28 AM
tdesorbaix tdesorbaix is offline
Zimlet Guru & Moderator
 
Posts: 265
Default

Good job.
It is just a bit sad that it doesn't handle multiple emails and conversation.
I know, it is because REST API don't handle it yet.

Just 2 things that i noticed :
-In your readme.txt :
Quote:
The exported file name, due to a ZCS bug, is always items.zip.
This is not a bug, it is just implemented this way for now in the zip formatter :
Code:
            // TODO: get name from folder/search/query/etc
            String filename = context.hasPart() ? "attachments.zip" : "items.zip";
            String cd = Part.ATTACHMENT + "; filename=" + HttpUtil.encodeFilename(context.req, filename);
            context.resp.addHeader("Content-Disposition", cd.toString());
            context.resp.setContentType("application/x-zip-compressed");
-Correct me if I'm wrong but you could use a more simple REST URL in your js file :
Intead of :
Code:
var bckRestUrl = "/zimbra/user/" + user + "/?fmt=zip&query=in:(" + this.buildBackupString(folderPath) + "\)";
You could use :
Code:
var bckRestUrl = "service/home/~/?fmt=zip&id=" + obj.id ;
Reply With Quote