Where i can change code to force opening page in same window (_self), when i click on event title.

Thank you.

Comments

aspilicious’s picture

Normally you should

 eventClick: function(calEvent, jsEvent, view) {
      if (Drupal.settings.fullcalendar.colorbox) {
      // Open in colorbox if exists, else open in new window.
        if ($.colorbox) {
          $.colorbox({href:calEvent.url, iframe:true, width:'80%', height:'80%'});
        } else {
          window.open(calEvent.url);
        }
      } else {
        window.open(calEvent.url);
      }
      return false;
    }

change to

 eventClick: function(calEvent, jsEvent, view) {
      if (Drupal.settings.fullcalendar.colorbox) {
      // Open in colorbox if exists, else open in new window.
        if ($.colorbox) {
          $.colorbox({href:calEvent.url, iframe:true, width:'80%', height:'80%'});
          return false;
        } else {
          window.open(calEvent.url);
        }
      } else {
        window.open(calEvent.url);
      }
    }

In the views.js code. The return false means the page will open in a new window. But it doesn't rly work yet cause it opens the event in a new tab and in the same window.

Investigating...

aspilicious’s picture

Status: Active » Needs review

It's even easier.

1) Open the fullcalendar.view.js file.
2) find all the instances of window.open(calEvent.url);
3) replace them by window.open(calEvent.url, _self);

Tested locally, works :)

Need more options? http://www.w3schools.com/jsref/met_win_open.asp

darsic’s picture

Thank you very much, it works :)
I spend a lot of time, trying to find this ... how could i miss this instance :))

Chears.

darsic’s picture

Status: Needs review » Closed (fixed)

Fixed.

tim.plunkett’s picture

Assigned: darsic » Unassigned
Priority: Critical » Normal
Status: Closed (fixed) » Fixed
TimelessDomain’s picture

#2 worked for me. If this feature is not going to be made into a setting on this page http://yoursite.com/admin/settings/fullcalendar . Then this should be mentioned in the module documentation

tim.plunkett’s picture

Oh, this got implemented over here: #1050530: target window.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.