|
@@ -94,15 +94,13 @@ Calendar.mixin({
|
|
|
|
|
|
|
|
|
|
|
|
|
destroy: function() {
|
|
destroy: function() {
|
|
|
- this.renderQueue.kill();
|
|
|
|
|
-
|
|
|
|
|
if (this.view) {
|
|
if (this.view) {
|
|
|
- this.view.removeElement();
|
|
|
|
|
-
|
|
|
|
|
- // NOTE: don't null-out this.view in case API methods are called after destroy.
|
|
|
|
|
- // It is still the "current" view, just not rendered.
|
|
|
|
|
|
|
+ this.clearView();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ this.renderQueue.kill();
|
|
|
|
|
+ // ^ TODO: should we let all rendering play out?
|
|
|
|
|
+
|
|
|
this.toolbarsManager.proxyCall('removeElement');
|
|
this.toolbarsManager.proxyCall('removeElement');
|
|
|
this.contentEl.remove();
|
|
this.contentEl.remove();
|
|
|
this.el.removeClass('fc fc-ltr fc-rtl');
|
|
this.el.removeClass('fc fc-ltr fc-rtl');
|
|
@@ -220,9 +218,10 @@ Calendar.mixin({
|
|
|
|
|
|
|
|
this.initBatchRenderingForView(newView);
|
|
this.initBatchRenderingForView(newView);
|
|
|
|
|
|
|
|
- newView.setElement($("<div class='fc-view fc-" + viewType + "-view' />"));
|
|
|
|
|
this.renderQueue.queue('_calendar', 'el', 'init', function() {
|
|
this.renderQueue.queue('_calendar', 'el', 'init', function() {
|
|
|
- newView.el.appendTo(_this.contentEl);
|
|
|
|
|
|
|
+ newView.setElement(
|
|
|
|
|
+ $("<div class='fc-view fc-" + viewType + "-view' />").appendTo(_this.contentEl)
|
|
|
|
|
+ );
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
this.toolbarsManager.proxyCall('activateButton', viewType);
|
|
this.toolbarsManager.proxyCall('activateButton', viewType);
|
|
@@ -358,6 +357,7 @@ Calendar.mixin({
|
|
|
windowResize: function(ev) {
|
|
windowResize: function(ev) {
|
|
|
if (
|
|
if (
|
|
|
ev.target === window && // so we don't process jqui "resize" events that have bubbled up
|
|
ev.target === window && // so we don't process jqui "resize" events that have bubbled up
|
|
|
|
|
+ this.view &&
|
|
|
this.view.isDatesRendered
|
|
this.view.isDatesRendered
|
|
|
) {
|
|
) {
|
|
|
if (this.updateViewSize(true)) { // isResize=true, returns true on success
|
|
if (this.updateViewSize(true)) { // isResize=true, returns true on success
|