Skip to content

Commit b5cd8ee

Browse files
abhinavk96niranjan94
authored andcommitted
fix broken scheduler due, use window.$ for global jquery instance
1 parent b7f838a commit b5cd8ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/controllers/events/view/scheduler.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Controller from '@ember/controller';
2-
import $ from 'jquery';
32
import { computed } from '@ember/object';
43
import moment from 'moment';
54

@@ -57,7 +56,7 @@ export default Controller.extend({
5756
});
5857
},
5958
unscheduleSession(session) {
60-
$('.full-calendar').fullCalendar('removeEvents', session._id);
59+
window.$('.full-calendar').fullCalendar('removeEvents', session._id);
6160
this.updateSession(null, null, session.resourceId, session.serverId);
6261
this.target.send('refresh');
6362

@@ -67,8 +66,8 @@ export default Controller.extend({
6766
let start = date;
6867
let duration = this.get('model.defaultDuration').split(':');
6968
let end = start.clone().add(duration[0], 'hours').add(duration[1], 'minutes');
70-
this.updateSession(start, end, resourceId, $(ui.helper).data('serverId'));
71-
$(ui.helper).remove();
69+
this.updateSession(start, end, resourceId, window.$(ui.helper).data('serverId'));
70+
window.$(ui.helper).remove();
7271
},
7372
eventDrop(session) {
7473
this.updateSession(session.start, session.end, session.resourceId, session.serverId);

0 commit comments

Comments
 (0)