page offset

More
1 year 8 months ago #153262 by Marc
page offset was created by Marc
Hi,
I have a problem with the msgDivInfoBox that goes to the top of the page when the OS_ADD_TO_CART button is clicked.
Since I have a fixed header, the msgDivInfoBox slides under it.
Is there an offset parameter somewhere?
Thanks

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #153265 by Mr. Dam
Replied by Mr. Dam on topic page offset
Hi Marc,
Could you please send me the link of your booking form here so we can see the problem?
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #153281 by Marc
Replied by Marc on topic page offset
Hi Dam,
the website is in local developpment, so no link.

the issue is with /media/com_osservicesbooking/assets/js/ajax.js
I can modify the offset myself but since it will be overwritten with a new update there is no point.
Code:
if(use_js_popup.value == 0)         {             var p = jQuery( "#msgDiv" );             //jQuery("#msgDiv").fadeIn();             document.getElementById('msgDiv').style.display = "block";             document.getElementById('msgDiv').innerHTML = str4;             var offset = p.offset();             jQuery('html, body').animate({ scrollTop: offset.top}, 800, 'swing');             setTimeout(function() { jQuery("#msgDiv").fadeOut(1500); }, 5000);         }         else         {             var p = jQuery( "#cartbox" );             var offset = p.offset();             jQuery('html, body').animate({ scrollTop: offset.top}, 800, 'swing');         }

any idea?

Thanks
Marc
 

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #153288 by Mr. Dam
Replied by Mr. Dam on topic page offset
Hi Marc,
Yes, you should modify that Javascript file, but it will be overridden in future. Therefore, whenever you upgrade OS Services Booking extension, you should re-do the change. Currently, we don't have option to override ajax.js, it is core Javascript file and will be updated in future versions
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #153301 by reilldesign
Replied by reilldesign on topic page offset
Hi,

what about a pure css solution?

developer.mozilla.org/de/docs/Web/CSS/z-index

z-index: 999999 (or higher) for the container class should resolve the problem.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago - 1 year 8 months ago #153302 by Marc
Replied by Marc on topic page offset
Hi,
@reilldesign: Thanks, but I can't position-it above with z-index in my template.
But, in the meantime I've implemented a (not so)satisfactory solution in pure CSS (position:absolute; top:45% )

@Dam: hacking the ajax.js is definitely not an option (I've been bitten by the hacking way a looong time ago, in the J1.5 times, and this is a maintaining nightmare)
Maybe you could add a configuration parameter to at least disable the line?
Code:
jQuery('html, body').animate({ scrollTop: offset.top}, 800, 'swing');
Wich is not ideal but better than a scrolling to top.
I can't think I'm the only one with a fixed header.

Thanks,
Marc
Last edit: 1 year 8 months ago by Marc.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #153307 by Mr. Dam
Replied by Mr. Dam on topic page offset
Hi Marc,
So you decided to use CSS customized solution?
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #153309 by Marc
Replied by Marc on topic page offset
Yes, for lack of a better solution.
If you could think about it in the future?
Thanks
Marc

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #153567 by Mr. Dam
Replied by Mr. Dam on topic page offset
Hi Marc,
I will think about it, but to be honest, i feel some customers will confused with that configure option
Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. Dam