diff --git a/app/assets/javascripts/calendar_widget.js b/app/assets/javascripts/calendar_widget.js index 0f7c18c..c2de600 100644 --- a/app/assets/javascripts/calendar_widget.js +++ b/app/assets/javascripts/calendar_widget.js @@ -293,11 +293,12 @@ } function toggle_event(ele,type){ $(ele).parents('.month_template').find('td').removeClass('w-calendar-toggle') + var toggle_month if ($(ele).length==1){ $(ele).addClass('w-calendar-toggle') toggle_data = $(ele).data('date-node') + toggle_month = $(ele).data('date-node').split('-')[1] } - var toggle_month = $(ele).data('date-node').split('-')[1] if (toggle_month==month || $(ele).length!=1){ if (type=='show'){ show_event($(ele).data('date-node'),ele) diff --git a/app/assets/javascripts/calendar_widget2.js b/app/assets/javascripts/calendar_widget2.js index 2442ca4..dbd0c75 100644 --- a/app/assets/javascripts/calendar_widget2.js +++ b/app/assets/javascripts/calendar_widget2.js @@ -432,11 +432,12 @@ } function toggle_event(ele,type){ $(ele).parents('.month_template').find('td').removeClass('w-calendar-toggle') + var toggle_month if ($(ele).length==1){ $(ele).addClass('w-calendar-toggle') toggle_data = $(ele).data('date-node') + toggle_month = $(ele).data('date-node').split('-')[1] } - var toggle_month = $(ele).data('date-node').split('-')[1] if (toggle_month==month || $(ele).length!=1){ if (type=='show'){ show_event($(ele).data('date-node'),ele)