RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Pop-up text box in wrong position
Posted:  02 Oct 2013 10:43
Hi Roel,

I have just upgraded to 3.1.2 and it has mostly gone well, although I have an annoying problem which I cannot make head or tail off... sad

The event pop-up box on the main calendar is fine and as before, however the side bar pop-up on http://www.plymouthivc.org/index.php is way above the event item.

It seems to be affected by /css/css_sbar.php and I can change the text size here but not the box position.

Any thoughts are very welcome.

PS While I am on biggrin at the back of my limited memory I seen to think that there was going to be some more fields available in the upgrade. I would like to add a 'Host' field onto the events. Sorry if I have misunderstood anything here..

Kind regards - John
Posted:  02 Oct 2013 13:07
I noticed the same thing on a site I did recently. You can see the effect here http://hnphockeylondon.ca/ It might take a number of seconds before the popup for the calendar works.

It would be nice to get it resolved. I tried removing the css for the menu, it didn't make a difference so it might be one of the other css files that is causing it.

Thanks
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  03 Oct 2013 23:23
Hi John,
I've seen this pop-up problem once before and I think it had something to do with the div(s) envelopping the sidebar, in your case the divs with id="contentwide" and class="page". I'm not sure however.
I will see if I can find out more.

What LuxCal version were you using when the sidebar pop-up worked ok?

You're right about the additional fields in version 3.2. There will be a couple (probably two) free format additional fields which can be (dis)abled by the admin.
Kind regards, Roel
Posted:  04 Oct 2013 09:01
Hi Roel,

I went from 2.7.3 to 3.1.2...

That's good news about the addition fields biggrin

Kind regards - John
Posted:  07 Oct 2013 23:54   Last Edited By: Roel B.
Hi John and Dan,
Concerning the pop up displacement problem I suggest to try the following:
Edit the file common/toolbox.js and . . .
. . . on lines 211, 215 and 218 replace clientX by pageX (4 replacements)
. . . on lines 211, 220, 221 and 223 replace clientY by pageY (4 replacements)

If it works, the next problem may be that the pop up box doesn't work correctly in older IE versions. JavaScript in IE, sigh!

Please let me know if it works.
Roel
Posted:  08 Oct 2013 10:19   Last Edited By: Roel B.
Hi Roel,

This has made the displacement better, but is still above the event listing & actually obscures it.

However I would not worry too much about this as it is a lot better than before. wink

Kind regards - John
Posted:  08 Oct 2013 11:56
Hi Roel,

I got something wrong somewhere, now I don't get any popup so I restored the original file.

@John, could you post the complete section of lines 211 to 223 so I can just copy and paste them into /common/toolbox.js?

Thanks
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  08 Oct 2013 17:32
Dan,

This is what I make it.... from line 210 - 223

if (!e) var e = window.event; //if ie
        //e.pageX, e.pageY: mouse coords relative to window
        var rightedge = (!window.innerWidth) ? document.documentElement.clientWidth : window.innerWidth-20; //window edge
        var bottomedge = (!window.innerHeight) ? document.documentElement.clientHeight : window.innerHeight-10;

        if (rightedge-e.pageX-offsetX < popobj.offsetWidth) { //if popup hits the right edge
            popobj.style.left = rightedge-popobj.offsetWidth-5+"px"; //don't move it
        } else {
            popobj.style.left = (e.pageX < (-offsetX)) ? "5px" : e.pageX+offsetX+"px"; //move it with mouse
        }
        if (bottomedge-e.pageY-offsetY < popobj.offsetHeight) { //if popup hits the bottom edge
            popobj.style.top = e.pageY-popobj.offsetHeight-(offsetY/2)+"px"; //flip it up
        } else {
            popobj.style.top = e.pageY+offsetY+"px"; //move it with mouse
Posted:  10 Oct 2013 06:18
John,

That worked perfectly.

Thanks
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html