Quantcast
Channel: Zimbra :: Forums - Zimlets
Viewing all articles
Browse latest Browse all 171

Open an email in a popup arbitrarily

$
0
0
Hi,
I'm trying to open an email in a popup, just like "Launch in a separate window" option we found right clicking on an email.

After a long search in the code, I've found that the action is registered in ZmOperation.js file as DETACH_WIN operation, but I can't find how to launch them.
Am I in the right direction? Anyone can write me how these operations works?

I've also found the detachMsgInNewWindow function that seems what I need. I can open the popup with the email with this code
Code:

ZmMailMsgView.detachMsgInNewWindow(appCtxt.getById(370));
where 370 is the msgId of my email, but it works only if I've previously opened the email in the MailApp (seems that this loads the email in the js client).
So I've tried to load the email before the detachMsgInNewWindow call with something like
Code:

ZmMailMsg.fetchMsg({msgId:370,sender:appCtxt.getAppController(),getHtml:appCtxt.get(ZmSetting.VIEW_AS_HTML)});
or
Code:

ZmMailMsg.load({getHtml:appCtxt.get(ZmSetting.VIEW_AS_HTML),needExp:true,noTruncate:true,forceLoad:true});
but no success...

No error appears with the loading, but the email is not available as appCtxt.getById(370), maybe because I've not secified a callback in the load, and that's basically for putting the email loaded in the right js object... but I can't find the right way to do that.


Anyone knows if the correct way is the operation way or the second manner with load and detachMsgInNewWindow function?


Any help would be appreciated.
Thanks in advance for any reply.

Viewing all articles
Browse latest Browse all 171

Trending Articles