CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tool tip modifications

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related
View previous topic :: View next topic  
Author Message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Mon Mar 05, 2007 4:15 pm    Post subject: Tool tip modifications Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Mon Mar 05, 2007 6:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Tue Mar 06, 2007 8:36 am    Post subject: Tool tip with overlib Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Tue Mar 06, 2007 1:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Tue Mar 06, 2007 5:25 pm    Post subject: overlib tooltip Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Tue Mar 06, 2007 7:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Wed Mar 07, 2007 9:08 am    Post subject: fAddEvent 12th param Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Wed Mar 07, 2007 1:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Wed Mar 07, 2007 4:36 pm    Post subject: Thanks Reply with quote

Thank you Very Much!

Cheers,
Joseph
Back to top
View user's profile Send private message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Thu Mar 08, 2007 9:59 am    Post subject: One more thing Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Fri Mar 09, 2007 12:23 am    Post subject: Reply with quote

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
View user's profile Send private message
jackb



Joined: 11 Sep 2006
Posts: 27

PostPosted: Fri Mar 09, 2007 1:08 am    Post subject: Thanks Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group