This repository was archived by the owner on Sep 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ function CalendarCtrl($scope) {
87
87
} ;
88
88
/* Change View */
89
89
$scope . renderCalender = function ( calendar ) {
90
- calendar . fullCalendar ( 'render' ) ;
90
+ if ( calendar ) {
91
+ calendar . fullCalendar ( 'render' ) ;
92
+ }
91
93
} ;
92
94
/* config object */
93
95
$scope . uiConfig = {
Original file line number Diff line number Diff line change 7
7
< link rel ="stylesheet " href ="../bower_components/fullcalendar/fullcalendar.css ">
8
8
< link rel ="stylesheet " href ="calendarDemo.css " />
9
9
10
- < script src ="../bower_components/jquery/jquery.js "> </ script >
10
+ < script src ="../bower_components/jquery/dist/ jquery.js "> </ script >
11
11
< script src ="../bower_components/jquery-ui/ui/jquery-ui.js "> </ script >
12
12
13
13
< script src ="../bower_components/angular/angular.js "> </ script >
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ angular.module('ui.calendar', [])
237
237
} ;
238
238
239
239
eventsWatcher . onAdded = function ( event ) {
240
- scope . calendar . fullCalendar ( 'renderEvent' , event ) ;
240
+ scope . calendar . fullCalendar ( 'renderEvent' , event , true ) ;
241
241
} ;
242
242
243
243
eventsWatcher . onRemoved = function ( event ) {
@@ -248,9 +248,6 @@ angular.module('ui.calendar', [])
248
248
scope . calendar . fullCalendar ( 'updateEvent' , event ) ;
249
249
} ;
250
250
251
- scope . destroy ( ) ;
252
- getOptions ( ) ;
253
- scope . init ( ) ;
254
251
eventSourcesWatcher . subscribe ( scope ) ;
255
252
eventsWatcher . subscribe ( scope , function ( newTokens , oldTokens ) {
256
253
if ( sourcesChanged === true ) {
@@ -261,10 +258,8 @@ angular.module('ui.calendar', [])
261
258
} ) ;
262
259
263
260
scope . $watch ( getOptions , function ( newO , oldO ) {
264
- if ( newO !== oldO ) {
265
261
scope . destroy ( ) ;
266
262
scope . init ( ) ;
267
- }
268
263
} ) ;
269
264
}
270
265
} ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module.exports = function (config) {
3
3
config . set ( {
4
4
basePath : '..' ,
5
5
files : [
6
- 'bower_components/jquery/jquery.js' ,
6
+ 'bower_components/jquery/dist/ jquery.js' ,
7
7
'bower_components/jquery-ui/ui/*.js' ,
8
8
'bower_components/angular/angular.js' ,
9
9
'bower_components/angular-mocks/angular-mocks.js' ,
You can’t perform that action at this time.
0 commit comments