diff --git fullcalendar.module fullcalendar.module index 50b7a04..70fa486 100644 --- fullcalendar.module +++ fullcalendar.module @@ -200,6 +200,7 @@ 'firstDay' => $options['display']['fc_firstday'], 'weekMode' => $options['display']['fc_weekmode'], 'theme' => $options['modules']['fc_theme'], + 'sameWindow' => $options['modules']['fc_window'], 'colorbox' => $options['modules']['fc_url_colorbox'], 'colorboxClass' => $options['modules']['fc_url_colorbox_class'], 'colorboxWidth' => $options['modules']['fc_url_colorbox_width'], diff --git fullcalendar.views.js fullcalendar.views.js index 082f4cb..cd03b15 100644 --- fullcalendar.views.js +++ fullcalendar.views.js @@ -25,11 +25,15 @@ width: Drupal.settings.fullcalendar.colorboxWidth, height: Drupal.settings.fullcalendar.colorboxHeight }); - } else { + } + } + else { + if (Drupal.settings.fullcalendar.sameWindow) { + window.open(calEvent.url, _self); + } + else { window.open(calEvent.url); } - } else { - window.open(calEvent.url); } return false; }, diff --git views_plugin_style_fullcalendar.inc views_plugin_style_fullcalendar.inc index 51b7df9..bb09518 100644 --- views_plugin_style_fullcalendar.inc +++ views_plugin_style_fullcalendar.inc @@ -23,6 +23,7 @@ 'fc_url_colorbox_class' => array('default' => '#content'), 'fc_url_colorbox_width' => array('default' => '80%'), 'fc_url_colorbox_height' => array('default' => '80%'), + 'fc_window' => array('default' => FALSE), ), ); $options['header'] = array( @@ -199,6 +200,11 @@ '#dependency' => array('edit-style-options-modules-fc-url-colorbox' => array(1)), ); } + $form['modules']['fc_window'] = array( + '#type' => 'checkbox', + '#title' => t('Open events in same window'), + '#default_value' => $this->options['modules']['fc_window'], + ); } function validate() { $errors = parent::validate();