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
  #1 (permalink)  
Old 01-07-2010, 08:24 AM
Senior Member
 
Posts: 62
Default Zimlet Tab Inline HTML

Hello,

I need some help. I would like to create a zimlet that displays a tab (such as Mail, Address Book, Calendar, etc...) when the tab is clicked it loads a url to an external site.

Please point me in the right direction.

Thank you,

Parixit
Reply With Quote
  #2 (permalink)  
Old 01-07-2010, 08:50 AM
Zimbra Employee
 
Posts: 105
Default

You can have your zimlet create an app (i.e. a tab) in the zimbra web client. Check out this example:

ZCS 6.0:Zimlet Developers Guide:Examples:Simple Tab - Zimbra :: Wiki

The tab method hooks on the zimlet base JavaScript class are described in this JsDoc:

Zimlet JavaScript API Reference - ZmZimletBase

And here is an illustration of when those tab method hooks are called:

ZCS 6.0:Zimlet Developers Guideeveloping Zimlets - Zimbra :: Wiki
Reply With Quote
  #3 (permalink)  
Old 01-07-2010, 09:06 AM
Senior Member
 
Posts: 62
Default

Thanks sposetti.

I actually got the simpletab working. i am not sure how to implement an an inline external link.

Sorry i am not a programmer!
Reply With Quote
  #4 (permalink)  
Old 01-07-2010, 09:18 AM
Zimbra Employee
 
Posts: 105
Default

I just posted another example that shows writing content to the tab app. In this example, we write an <iframe> HTML tag that loads an external web page (www.yahoo.com):

ZCS 6.0:Zimlet Developers Guide:Examples:Tab iFrame - Zimbra :: Wiki

Let me know if that helps. I can post more examples (if needed) later today.
Reply With Quote
  #5 (permalink)  
Old 01-07-2010, 09:50 AM
Senior Member
 
Posts: 62
Default

sposetti! you are brilliant thanks for the help!

i seem to have an issue though.

I am trying to make a mailstore zimlet. so our users will be able to retrieve deleted mail through mailstore in ZWC.




As you can see the tab and html part work but mailstore's web interface uses frames and it breaks.

When I click on the folders (top left) the emails in that folder are suppose to display in the frame that is bottom left. After clicking nothing is displayed.

Any ideas?
Reply With Quote
  #6 (permalink)  
Old 01-07-2010, 12:19 PM
Zimbra Employee
 
Posts: 105
Default

An iframe just loads the page src specified. Once that page is loaded, it's really up to that embedded page to handle it's loading. Meaning: once we specify iframe and src to in our app tab, the processing of that embedded iframe page is handed over to that embedded page.

I am guessing MailStore Web Access is using an iframe as well, which should be fine since nested iframes are valid in HTML.

So one thing that came to mind: I just posted an update to the zimlet to make sure we are closing our iframe tag and giving it a name. That might be confusing the nested iframes. So please check out the latest zimlet code here:

ZCS 6.0:Zimlet Developers Guide:Examples:Tab iFrame - Zimbra :: Wiki

If this doesn't do the trick, you might want to check with the MailStore guys about running their Web Access client in an iframe.
Reply With Quote
  #7 (permalink)  
Old 01-07-2010, 12:52 PM
Senior Member
 
Posts: 62
Default

Maybe I missed something, but nothing has changed in update?

Or it hasn't updated yet? I compared the code and its still the same.
Reply With Quote
  #8 (permalink)  
Old 01-07-2010, 01:00 PM
Zimbra Employee
 
Posts: 105
Default

Ah...the newly updated file is still propagating on our servers.

In the meantime, you can just edit your local copy of the JS file. I posted the code change I made to the handler object directly in the example page. You can see the extra HTML markup and closing of the iframe tag:

app.setContent("<iframe name=\"tabiframe-app\" src=\"http://www.yahoo.com/\" width=\"100%\" height=\"100%\" /></iframe>"); // write HTML to app

ZCS 6.0:Zimlet Developers Guide:Examples:Tab iFrame - Zimbra :: Wiki

Last edited by sposetti; 01-07-2010 at 01:13 PM..
Reply With Quote
  #9 (permalink)  
Old 01-08-2010, 07:39 AM
Senior Member
 
Posts: 62
Default

sposetti thanks for your help! though it seems like its an issue for the mailstore guys.

I updated the zimlet with the new code and still having the same issue.

This would be a great zimlet if I could get it to work. Our users would then be able to retrieve any deleted mail by themselves.

Let me know if you have any ideas of what could be causing the problem. Or anything special I should let the mailstore guys know.

Thanks again!
Reply With Quote
  #10 (permalink)  
Old 01-08-2010, 08:35 AM
Zimbra Employee
 
Posts: 105
Default

You can try loading the MailStore app in an iframe just in a plain-old-HTML-page and confirm that works.

Just make a test.html page and in that page, put the <iframe> tag that loads the mailstore app and confirm everything works fine.

BTW, what browser/OS combination are you using? Have you tried both IE and FF?
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.