problem with ifame zimlet

Interested in talking about Mash-up's? This is the place.
offerlam22
Posts: 43
Joined: Sat Sep 13, 2014 3:24 am

problem with ifame zimlet

Postby offerlam22 » Sun Feb 02, 2014 4:02 am

HI ALL,
SO LONG AGO I TOO POSTE A PROBLEM I HAD WITH THE IFRAME ZIMLET

IN">HTTPS://WWW.ZIMBRA.COM/FORUMS/ZIMLETS/62683-IFRAME-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:
/*

* ***** 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("HTTPS://5OWNCLOUD01.DINGIT.DK/OWNCLOUD" WIDTH="100%" HEIGHT="100%" />"); // 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

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

Udklip.PNG



offerlam22
Posts: 43
Joined: Sat Sep 13, 2014 3:24 am

problem with ifame zimlet

Postby offerlam22 » Mon Feb 03, 2014 9:52 pm

Am i asking the wrong way or does no one know why? :)
tdesorbaix
Outstanding Member
Outstanding Member
Posts: 366
Joined: Fri Sep 12, 2014 10:31 pm

problem with ifame zimlet

Postby tdesorbaix » Wed Feb 05, 2014 3:20 am

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:



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;

}

}

};
offerlam22
Posts: 43
Joined: Sat Sep 13, 2014 3:24 am

problem with ifame zimlet

Postby offerlam22 » Wed Feb 05, 2014 7:16 am

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
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
tdesorbaix
Outstanding Member
Outstanding Member
Posts: 366
Joined: Fri Sep 12, 2014 10:31 pm

problem with ifame zimlet

Postby tdesorbaix » Thu Feb 06, 2014 3:11 am

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).
offerlam22
Posts: 43
Joined: Sat Sep 13, 2014 3:24 am

problem with ifame zimlet

Postby offerlam22 » Thu Feb 06, 2014 10:51 am

[quote]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).[/QUOTE]
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.. :)
/*

* ***** 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(""HTTPS://5OWNCLOUD01.DINGIT.DK/OWNCLOUD/>" WIDTH="100%" HEIGHT="100%" />"); // WRITE HTML TO APP
BREAK;

}

}
};

SO NOW THE WEBPAGE BEING OPEND IS
I">HTTPS://5OWNCLOUD01.DINGIT.DK
I
ALSO CREATED A A RECORD WITHIN THE DINGIT.DK DNS FOR 5OWNCLOUD01 AND GAVE IT A IP
C:USERSOFFERLAM.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

NO TAP

AND FINALLY THE ZIMLET TAP IN OPTIONS..

DO YOU HAVE ANY SUGGESTION
THANKS
CASPER

notap.PNG


zimlet preference.PNG


zimlet.PNG


Return to “Zimlets”

Who is online

Users browsing this forum: No registered users and 11 guests