View previous topic :: View next topic |
Author |
Message |
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Mon Mar 05, 2007 4:15 pm Post subject: Tool tip modifications |
|
|
Hello!
How do we make the tooltip stay up when hovering on the date. Right now it stays up for about 5 seconds then disappears. I would like to adjust it so that it remains up until I move the pointer off the date.
Thanks!
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Mon Mar 05, 2007 6:03 pm Post subject: |
|
|
You need some 3rd party scripts for that purpose. We do have one FAQ for how to integrate overlib with the calendar -
http://www.calendarxp.net/forum/viewtopic.php?t=72
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Tue Mar 06, 2007 8:36 am Post subject: Tool tip with overlib |
|
|
Thanks for your response,
I don't seem to be able to get it to work. I have loaded and ran overlib on just a plain page and works no problem. But when I try to load it to the calendar I am getting an javascript error - (Unterminated string constant - URL ../iflateng.htm) - also the tooltip msg is in the date box just like a hyperlink (not hidden) explorer only - firefox links don't show but calendar size is offset.
I have added - fLoadScript("overlib.js"); to plugins.js file and verified that the overlib.js file did infact load.
I have added "<div><a href='javascript:void(0);' onmouseover=overlib('This is a overlib tip.') onmouseout=nd()>over here</a></div>" to the html part of the fAddEvent in the agenda file.
I also checked the new addition and the top = left = -10000 + (!olNs4) ? 'px' : 0; appears to have been corrected in the newest version.
I have the html mask set to -1
Any Ideas as to what else I might try. Your previous write up seems pretty straight forward. But for some reason it dosn't seem to want to work for me.
Any Ideas?
Cheers!
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Mar 06, 2007 1:40 pm Post subject: |
|
|
Could you please run it in FireFox and post the details of the error? Also, please attach the agenda.js you were using.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Tue Mar 06, 2007 5:25 pm Post subject: overlib tooltip |
|
|
Hello,
Here is the error in firefox:
Error: unterminated string literal
Source Code:
overlib('This
Attached is the agenda file
Cheers,
Joe
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Mar 06, 2007 7:10 pm Post subject: |
|
|
Hi, we found the problem - it's because in our sample we forgot to embrace the javascript function with double quotes. Simply change the code from:
Code: | onmouseover=overlib('This is a overlib tip.') | to
Code: | onmouseover=\"overlib('This is a overlib tip.')\" | should fix it.
Note that you have to escape the double quote with back-slash since the whole thing is in a javascript string.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Wed Mar 07, 2007 9:08 am Post subject: fAddEvent 12th param |
|
|
Thanks for the info on the escape string works now!
I saw your update on function fOverLib and adding 12th parameter to fAddEvent is just what I need for another calendar usage.
However I can't seem to get it to work. Works fine if I call index [0], but of course then it also shows default tooltip, also works with [7] but I am already using etc for somethings else. So your new update seems perfect but no overlib tooltip when I add 12th param and set fOverLib/fGetAgenda to array index 8. Is there something else that needs to be changed to add in this 12 param. I have the following.
Also, can we still get the date with agenda to bold if we set 4th one to empty string?
fAddEvent(<?=$year?>,<?=$month?>,<?=$day?>,"<?=$msg?>",<?=$action?>,
"<?=$bgcolor?>","<?=$fgcolor?>",<?=$bgimg?>,<?=$boxit?>,<?=$html?>,<?=$etc?>,"tip");
function fOverLib(y,m,d) {
var ag=fGetAgenda(y,m,d);
if(ag&&ag[8])overlib(ag[8]);
}
gsDays="'<div onmouseover=fOverLib('+sCellDate+') onmouseout=nd()>'+dayNo+'</div>'";
One other thing, when (overlib) tooltips do show, they only show in the calendar area (iframe), if the tooltip message is longer than the calendar box(iframe), they are cut off. This is probably something that can be adjusted with in the overlib script, but if you know off hand what causes this or the correction, maybe you could post it here.
Thanks so much for your time!
Cheers,
Joseph
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Wed Mar 07, 2007 1:41 pm Post subject: |
|
|
Oh, we forgot to mention that you need to override the fAddEvent() in order to add an additional param. Please add the following code to your plugins.js:
Code: | function fAddEvent(y,m,d,message,action,bgcolor,fgcolor,bgimg,boxit,html,etc, etc2) {
var ag=gbShareAgenda?eval(gsAgShared):__agenda;
ag[y+"-"+m+"-"+d]=[message,fFilterNull(action),fFilterNull(bgcolor),fFilterNull(fgcolor), fFilterNull(bgimg),fFilterNull(boxit),fFilterNull(html), etc, etc2];
}
|
As for overlib, we really can't help more as it's not our domain.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Wed Mar 07, 2007 4:36 pm Post subject: Thanks |
|
|
Thank you Very Much!
Cheers,
Joseph
|
|
Back to top |
|
|
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Thu Mar 08, 2007 9:59 am Post subject: One more thing |
|
|
Hello,
Sorry to continue on with this but there is just one more issue (I hope).
In order to display the tooltip outside of the iframe (so that it dosn't get cut off) we need to load a plug-in. So I added an additional fLoadScript
fLoadScript("overlib.js");
fLoadScript("overlib_crossframe.js");
The problem is that the plug-in is being loaded first and in order for it to work the core(overlib.js) must be loaded first. How can we get it to load the core first?
Cheers,
Joseph
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Fri Mar 09, 2007 12:23 am Post subject: |
|
|
I guess the simplest way is to open the overlib.js in an editor and paste all content of overlib_crossframe.js to the bottom of it, then save the file and load the combined one with fLoadScript().
fLoadScript() is asynchronous loading, 2 calls will load both files in paralell.
The other choice may be set one of the fLoadScript() in the fOnLoad() plugin.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
jackb
Joined: 11 Sep 2006 Posts: 27
|
Posted: Fri Mar 09, 2007 1:08 am Post subject: Thanks |
|
|
Yes that is what I concluded. And it works absolutly great!
Anyone looking to do this may also want to add in the overlib_anchor.js plugin. This way you can target the tooltip to land right outside of the calendar (or wherever you want it). Works and looks perfect!
Thanks a Bunch!!!
Cheers,
Joseph
|
|
Back to top |
|
|
|