Home › Forums › Additional Help › Translations › Disabling ajax in month view
- This topic has 8 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
March 9, 2016 at 1:13 pm #1086850
3ejoueur
ParticipantWe had a problem when switching months in english it was switching to french.We found out it was because of ajax.
We tried to disable ajax in month view following this thread : https://theeventscalendar.com/support/forums/topic/disable-ajax-in-month-view/
It is working great but now the pop-up in the top right corner for choosing a date is not working. Is there a way to have a refresh page on the pop-up instead of ajax ?
Thanks in advance
March 10, 2016 at 7:29 pm #1087558Nico
MemberHowdy @3ejoueur,
Welcome to our support forums and thanks for reaching out to us.
Glad to see you could solve the first issue, not sure about the one you are trying to solve now. Can you clarify a bit on the following:
the pop-up in the top right corner for choosing a date is not working.
Not sure if you are referring to the dropdown to switch views? A screenshot will be of much help here. You can upload it to an image sharing service and share the link in your reply (http://cloudup.com, http://imgur.com, etc).
Is there a way to have a refresh page on the pop-up instead of ajax ?
Maybe when I know which element you are talking about the above will be obvious. If you can clarify though it would be great.
Plase let me know about it,
Best,
NicoMarch 11, 2016 at 5:44 am #10876663ejoueur
ParticipantHello Nico,
Thanks for the quick reply.
Here is the image: http://screencast.com/t/obLpQlgIq
Here is the url of the staging site : http://ayers.3ejoueur.com/en/events/
You will see that when you choose a month it is using ajax so it is switching to french. We would like that when you click on a month it does a refresh on the page, not ajax. This way it would stay in english.
Thanks in advance
Team 3ejoueurMarch 11, 2016 at 2:42 pm #1088018Nico
MemberHey,
Thanks so much for clarifying on this! On the top off my head I’m not sure how to do this. But I guess I can run some tests, to see if we can “alter” the link behaviour via JS, and prevent the ajax call.
I’ll dive into this and give you a heads-up soon,
Have a great weekend,
NicoMarch 15, 2016 at 6:17 am #10890193ejoueur
ParticipantThanks a lot Nico !
And if you have any questions do not hesitate to contact us.
March 15, 2016 at 5:23 pm #1089424Nico
MemberWelcome, just a quick note I’ve been trying to find a way around this but still didn’t nail it. I will ask for help from the dev team.
Hopefully tomorrow I’ll have a solution 🙂
Thanks for the patience,
Best,
NicoMarch 18, 2016 at 1:53 pm #1091193Nico
MemberHey folks,
Sorry I’m still working on this, I’ve spended a fair amount of time digging into this but still couldn’t find the solution. It seems to be a lot simpler tan it really is! This week the forums activity was a bit intense after the release, but just wanted you to know this is still in my radar!
Have a great weekend,
NicoMarch 21, 2016 at 11:47 am #1091943Nico
MemberHi,
Well, I could give this sometime and I came up with a simple way of re-loading the view when the date is changed in the picker. It’s not preventing the actual ajax call but it might work for you anyway. Just paste the snippet in your functions.php and replace the calendar_url with the site URL:
function tribe_switch_month() { ?>
<script>var calendar_url = 'http://site.com/events/';
var tribe_bar_date = tribe_ev.state.date;jQuery( document ).ready( function() {
jQuery( '#tribe-bar-date' ).on( 'change', function (){
if ( tribe_bar_date != tribe_ev.state.date ) location.href = calendar_url + tribe_ev.state.date;
} );
} );
</script>
<?php
}
add_action('wp_head', 'tribe_switch_month');
Please let me know if this works for you,
Best,
NicoApril 5, 2016 at 9:35 am #1098377Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Disabling ajax in month view’ is closed to new replies.
