Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Event Calendar month previous and next arrows trigger my other jquery in page


Go to End


3 Posts   2318 Views

Avatar
TF-35Lightning

Community Member, 137 Posts

15 September 2010 at 3:53am

Hi all and UncleCheese,
Thanks for replying to my other post about removing the side arrows, figured that out which is great.

My other issue I am having is that when I click the previous or next arrows next to the Month dropdown box, they seem to trigger my jcarousel jquery component which I have also in the page.

Just wondering how I prevent that?
I also posted a question about uploadify file size issue in the Dataobject forum.

Any help would be great

Avatar
UncleCheese

Forum Moderator, 4102 Posts

15 September 2010 at 4:27am

There's probably a naming collision on the class names of those arrows. You can always copy LiveCalendarWidget.ss to your theme directory and make changes to the classnames.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
TF-35Lightning

Community Member, 137 Posts

16 September 2010 at 2:19am

Hi unlcecheese I chekced through and search for these class names in myjcarousel but couldnt find any duplicates.

I treid searching for "month-nav" and refreshLink"

Do you have any other suggestions? Remember that jcarousel is only refreshing on the click, I mean I could possible put up with it but its quite annoying.

live_calendar_widget.js below

(function($){
$(function(){
var refreshLink = function() {
$('#live-calendar-widget').load($(this).attr('href'),bind);
return false;
}
var refreshSelect = function() {
$t = $(this);
if($t.val().match('LiveCalendarWidget_Controller'))
$('#live-calendar-widget').load($t.val(),bind);
else
document.location = $t.val();
}
var bind = function() {
$('.month-nav').click(refreshLink);
$('#live-calendar-widget-navigator').change(refreshSelect);
}
bind();
});
})(jQuery);

Any other help would great