1717 < script src ="http://fiddle.tinymce.com/tinymce/3.5.4.1/tiny_mce_jquery_src.js "> </ script >
1818 < script src ="http://maps.googleapis.com/maps/api/js?sensor=false "> </ script >
1919 < script src ="lib/calendar/fullcalendar.js "> </ script >
20+ < script src ="http://arshaw.com/js/fullcalendar-1.5.3/fullcalendar/gcal.js "> </ script >
2021 < script src ="js/app.js "> </ script >
2122
2223 < link rel ="stylesheet " href ="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css ">
@@ -347,7 +348,7 @@ <h3>Why?</h3>
347348 < p > For easy integration with scope objects.</ p >
348349 < h4 > Click to add an Event!</ h4 >
349350 </ b >
350- < button style ="margin-bottom: 3px; " class ="btn btn-primary " ng-click ="addChild () "> Add Child </ button >
351+ < button style ="margin-bottom: 3px; " class ="btn btn-primary " ng-click ="addEvent () "> Add Event </ button >
351352 < ul >
352353 < li ng-repeat ="e in events ">
353354 < p class ="alert alert-info ">
@@ -358,30 +359,37 @@ <h4>Click to add an Event!</h4>
358359 </ ul >
359360
360361 </ div >
361-
362- < div ui-calendar ="{height: 450,editable: true} " class ="span8 calendar " ng-model ="events "> </ div >
362+ < div ui-calendar ="{height: 450,editable: true} " class ="span8 calendar " ng-model ="eventSources "> </ div >
363363 </ div >
364364 </ div >
365365 < h3 > How?</ h3 >
366366 < pre class ="prettyprint linenums ">
367367<div ui-calendar="{height: 450,editable: true}" class="span8 calendar" ng-model="events"></div>
368368
369369function CalendarCtrl($scope) {
370- var date = new Date();
370+ var date = new Date();
371371 var d = date.getDate();
372372 var m = date.getMonth();
373373 var y = date.getFullYear();
374-
374+
375+ $scope.eventSource = {
376+ url: "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic",
377+ className: 'gcal-event', // an option!
378+ currentTimezone: 'America/Chicago' // an option!
379+ };
380+
375381 $scope.events = [
376382 {title: 'All Day Event',start: new Date(y, m, 1)},
377383 {title: 'Long Event',start: new Date(y, m, d - 5),end: new Date(y, m, d - 2)},
378384 {id: 999,title: 'Repeating Event',start: new Date(y, m, d - 3, 16, 0),allDay: false},
379385 {id: 999,title: 'Repeating Event',start: new Date(y, m, d + 4, 16, 0),allDay: false},
380386 {title: 'Birthday Party',start: new Date(y, m, d + 1, 19, 0),end: new Date(y, m, d + 1, 22, 30),allDay: false},
381387 {title: 'Click for Google',start: new Date(y, m, 28),end: new Date(y, m, 29),url: 'http://google.com/'}
382- ]
388+ ];
389+
390+ $scope.eventSources = [$scope.events, $scope.eventSource];
383391
384- $scope.addChild = function() {
392+ $scope.addEvent = function() {
385393 $scope.events.push({
386394 title: 'Open Sesame',
387395 start: new Date(y, m, 28),
0 commit comments