Results 1 to 6 of 6

Thread: problem with ifame zimlet

Hybrid View

  1. #1
    Join Date
    Oct 2013
    Location
    Denmark
    Posts
    30
    Rep Power
    1

    Default problem with ifame zimlet

    Hi all,

    so long ago i too poste a problem i had with the iframe zimlet

    https://www.zimbra.com/forums/zimlet...me-zimlet.html

    in the last of this post i posted a new problem i got after g41n helped me...

    no one has answered there so i figured it was more proper to make a new post.. the thread was not mine to begin with ..

    so here is my problem

    Ok so i finally got a setup running where i could give this another go WITH https as you suggested.. and the results are better but i still have problems.

    In this setup i have a zimbra server and a owncloud server. I want the owncloud web interface to be avalible in zimbra as a tap..

    currently I have made sure that zimbra can ping owncloud server which it can.

    Also i added this line to the zimbra hosts file

    192.168.253.4 5owncloud01.dingit.dk 5owncloud01

    so that my zimbra server can ping 5owncloud01.dingit.dk and get a local ip response which is working.

    I have my dingit.dk wildcard cert on the owncloud server and i have varified that its the one that is presented when you visit the https site

    as for the zimlet

    here is the data of the jar file:

    Code:
    /*
     * ***** BEGIN LICENSE BLOCK *****
     * Zimbra Collaboration Suite Zimlets
     * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
     * 
     * The contents of this file are subject to the Zimbra Public License
     * Version 1.3 ("License"); you may not use this file except in
     * compliance with the License.  You may obtain a copy of the License at
     * http://www.zimbra.com/license.
     * 
     * Software distributed under the License is distributed on an "AS IS"
     * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
     * ***** END LICENSE BLOCK *****
     */
    
    /**
     * Defines the Zimlet handler class.
     *   
     */
    function com_zimbra_example_tabiframe_HandlerObject() {
    }
    
    /**
     * Makes the Zimlet class a subclass of ZmZimletBase.
     *
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype = new ZmZimletBase();
    com_zimbra_example_tabiframe_HandlerObject.prototype.constructor = com_zimbra_example_tabiframe_HandlerObject;
    
    /**
     * This method gets called by the Zimlet framework when the zimlet loads.
     *  
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype.init =
    function() {
    
    	this._simpleAppName = this.createApp("Tab iFrame App", "zimbraIcon", "An app in a new tab");
    
    };
    
    /**
     * This method gets called by the Zimlet framework each time the application is opened or closed.
     *  
     * @param	{String}	appName		the application name
     * @param	{Boolean}	active		if true, the application status is open; otherwise, false
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype.appActive =
    function(appName, active) {
    	
    	switch (appName) {
    		case this._simpleAppName: {
    		
    			var app = appCtxt.getApp(appName); // get access to ZmZimletApp
    
    			break;
    		}
    	}
    	
    	// do something
    };
    
    /**
     * This method gets called by the Zimlet framework when the application is opened for the first time.
     *  
     * @param	{String}	appName		the application name		
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype.appLaunch =
    function(appName) {
    
    	switch (appName) {
    		case this._simpleAppName: {
    			// do something
    		
    			var app = appCtxt.getApp(appName); // get access to ZmZimletApp
    
    			app.setContent("<iframe id=\"tabiframe-app\" name=\"tabiframe-app\" src=\"https://5owncloud01.dingit.dk/owncloud\" width=\"100%\" height=\"100%\" /></iframe>"); // write HTML to app
    
    			break;
    		}
    	}
    
    };
    as you can see the only thing i have changed is the url which is https://5owncloud01.dingit.dk/owncloud\

    I upload the zimlet and it start just find. But when i go to the tap I just get a sad smily and its not working - please see attached file

    Udklip.PNG

    Any suggestions to solve it or further troubleshoot would gladly appreciated..

    Also is there a way to remove the calendar and the zimlet list from the tap view so that its only the webpage linked that is showed?

    THANKS

    Casper

  2. #2
    Join Date
    Oct 2013
    Location
    Denmark
    Posts
    30
    Rep Power
    1

    Default

    Am i asking the wrong way or does no one know why?

  3. #3
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    Hi,

    For iframe, you don't need to modify your server host file, it's the browser that will load the page, not the server.

    Did you investigated what happens with firebug on firefox or the equivalent if you are using another browser.
    The problem may not come from zimbra but from iframe and owncloud. Or simply from browser's security.

    For removing the left part of the UI when you are on your app, you can modify the zimlet appActive function with this:
    Code:
    com_zimbra_example_tabiframe_HandlerObject.prototype.appActive =
    function(appName, active) {
            switch(appName) {
                     case this._simpleAppName: {
                            if (active) {
                                    skin.show("fullScreen", true);
                            }
                            else {
                                    skin.show("fullScreen", false);
                            }
                            break;
                     }
            }
    };

  4. #4
    Join Date
    Oct 2013
    Location
    Denmark
    Posts
    30
    Rep Power
    1

    Default

    THANK YOU tdesorbaix!!!! for answering

    ah ok ... maybe im using it wrong though... what I was hoping was that the zimlet points to 5owncloud01.dingit.dk. I was hoping the name 5owncloud01.dingit.dk would be resolved from the zimbra server perspektiv and not the browser IE user.. The thing is for the URL to work i have added it in the zimbra servers hosts file resolving to the local IP og the owncloud server on the local lan.. but if this is open from the browser/local PC than it would resolve from the PC dns which will not know 5owncloud01.dingit.dk .. could that be the case?

    about removing the left pane..

    is the true false statement i have to change.. so that i would look like this

    Code:
    com_zimbra_example_tabiframe_HandlerObject.prototype.appActive =
    function(appName, active) {
            switch(appName) {
                     case this._simpleAppName: {
                            if (active) {
                                    skin.show("fullScreen", false);
                            }
                            else {
                                    skin.show("fullScreen", false);
                            }
                            break;
                     }
            }
    };
    again.. THANKS for answering!

    Casper

  5. #5
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    Indeed, it will not work if your local PC can't access 5owncloud01.dingit.dk.

    You should not need to change the code example i gave you.
    The code simply set fullscreen (with the second paramater to true) when the app is active (you clicked on the tab), and desactivate it when you leave the app (like mail or calendar).

  6. #6
    Join Date
    Oct 2013
    Location
    Denmark
    Posts
    30
    Rep Power
    1

    Default

    Quote Originally Posted by tdesorbaix View Post
    Indeed, it will not work if your local PC can't access 5owncloud01.dingit.dk.

    You should not need to change the code example i gave you.
    The code simply set fullscreen (with the second paramater to true) when the app is active (you clicked on the tab), and desactivate it when you leave the app (like mail or calendar).
    Hi tdesorbaix

    ok so i correct my jar file so it looks like this.. im having some problem with your if stament but i one problem at a time..

    Code:
    /*
     * ***** BEGIN LICENSE BLOCK *****
     * Zimbra Collaboration Suite Zimlets
     * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
     * 
     * The contents of this file are subject to the Zimbra Public License
     * Version 1.3 ("License"); you may not use this file except in
     * compliance with the License.  You may obtain a copy of the License at
     * http://www.zimbra.com/license.
     * 
     * Software distributed under the License is distributed on an "AS IS"
     * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
     * ***** END LICENSE BLOCK *****
     */
    
    /**
     * Defines the Zimlet handler class.
     *   
     */
    function com_zimbra_example_tabiframe_HandlerObject() {
    }
    
    /**
     * Makes the Zimlet class a subclass of ZmZimletBase.
     *
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype = new ZmZimletBase();
    com_zimbra_example_tabiframe_HandlerObject.prototype.constructor = com_zimbra_example_tabiframe_HandlerObject;
    
    /**
     * This method gets called by the Zimlet framework when the zimlet loads.
     *  
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype.init =
    function() {
    
    	this._simpleAppName = this.createApp("Tab iFrame App", "zimbraIcon", "An app in a new tab");
    
    };
    
    /**
     * This method gets called by the Zimlet framework each time the application is opened or closed.
     *  
     * @param	{String}	appName		the application name
     * @param	{Boolean}	active		if true, the application status is open; otherwise, false
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype.appActive =
    function(appName, active) {
    	
    	switch (appName) {
    		case this._simpleAppName: {
    			
    			var app = appCtxt.getApp(appName); // get access to ZmZimletApp
    
    			break;
    		}
    	}
    	
    	// do something
    };
    
    /**
     * This method gets called by the Zimlet framework when the application is opened for the first time.
     *  
     * @param	{String}	appName		the application name		
     */
    com_zimbra_example_tabiframe_HandlerObject.prototype.appLaunch =
    function(appName) {
    
    	switch (appName) {
    		case this._simpleAppName: {
    			// do something
    		
    			var app = appCtxt.getApp(appName); // get access to ZmZimletApp
    
    			app.setContent("<iframe id=\"tabiframe-app\" name=\"tabiframe-app\" src=\"https://5owncloud01.dingit.dk/owncloud/" width=\"100%\" height=\"100%\" /></iframe>"); // write HTML to app
    
    			break;
    		}
    	}
    
    };
    so now the webpage being opend is https://5owncloud01.dingit.dk

    I also created a A record within the dingit.dk dns for 5owncloud01 and gave it a ip

    Code:
    C:\Users\offerlam.OFFERNET>ping 5owncloud01.dingit.dk
    
    Pinger 5owncloud01.dingit.dk [77.66.32.122] med 32 byte data:
    and did the firewall dance...

    but now the tap doesn't even appear.. in the admin tap i have applied the zimlet and made it mandatory for both the domain and COS..

    this is how it looks like for the users

    the zimlet windows in the lower left connor.. notise the msg for the other zimlets.. that not normal

    zimlet.PNG

    No tap

    notap.PNG

    and finally the zimlet tap in options..

    zimlet preference.PNG

    do you have any suggestion

    Thanks

    Casper

Similar Threads

  1. Problem SalesForce Zimlet
    By tvone in forum Zimlets
    Replies: 5
    Last Post: 06-20-2013, 01:06 PM
  2. Problem im add zimlet extra
    By rodrigofariat in forum Administrators
    Replies: 1
    Last Post: 06-04-2012, 09:39 AM
  3. StickyNotes Zimlet problem
    By MattHelm in forum Administrators
    Replies: 8
    Last Post: 12-04-2010, 02:18 AM
  4. problem using social zimlet on 6.0.1
    By maxxer in forum Zimlets
    Replies: 0
    Last Post: 10-17-2009, 03:23 AM
  5. Zimlet Problem
    By ragheb.adel in forum Zimlets
    Replies: 0
    Last Post: 11-27-2008, 06:32 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •