Skip to content

Commit

Permalink
call destroy callbacks when the calendar's destroy method is called. …
Browse files Browse the repository at this point in the history
…misc
  • Loading branch information
arshaw committed Aug 10, 2013
1 parent b47d895 commit e8ac9df
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Calendar.js
Expand Up @@ -119,7 +119,14 @@ function Calendar(element, options, eventSources) {


function destroy() {

if (currentView) {
trigger('viewDestroy', currentView, currentView, currentView.element);
currentView.triggerEventDestroy();
}

$(window).unbind('resize', windowResize);

header.destroy();
content.remove();
element.removeClass('fc fc-rtl ui-widget');
Expand Down Expand Up @@ -208,9 +215,9 @@ function Calendar(element, options, eventSources) {
trigger('viewRender', currentView, currentView, currentView.element);
currentView.trigger('viewDisplay', _element); // deprecated

getAndRenderEvents();

ignoreWindowResize--;

getAndRenderEvents();
}


Expand Down

0 comments on commit e8ac9df

Please sign in to comment.