Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 7c898b9

Browse files
jkurzjoshkurz
authored andcommitted
unHack(addEventSource): not checking for :isVisible when adding and removing event source
Signed-off-by: Josh Kurz <josh.kurz@turner.com>
1 parent bebe62b commit 7c898b9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/calendar.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,8 @@ angular.module('ui.calendar', [])
230230
};
231231

232232
eventSourcesWatcher.onAdded = function(source) {
233-
if(elm.is(':visible')){
234233
scope.calendar.fullCalendar('addEventSource', source);
235234
sourcesChanged = true;
236-
}
237235
};
238236

239237
eventSourcesWatcher.onRemoved = function(source) {

test/calendar.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ describe('uiCalendar', function () {
176176
expect($.fn.fullCalendar.mostRecentCall.args[0].weekends).toEqual(false);
177177
scope.uiConfig.calendar.weekends = true;
178178
scope.$apply();
179-
expect($.fn.fullCalendar.callCount).toEqual(2);
179+
//3 because we are destroying the calendar as well.
180+
expect($.fn.fullCalendar.callCount).toEqual(3);
180181
expect($.fn.fullCalendar.mostRecentCall.args[0].weekends).toEqual(true);
181182
});
182183

0 commit comments

Comments
 (0)