Created
August 12, 2014 02:07
-
-
Save ckahle33/d644d69acf89953bb77d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| success: function( json ) { | |
| window.sessions = json; | |
| for (var i = 0; i < window.sessions.objects.length; i++) { | |
| window.events = []; | |
| window.events.push({ | |
| start: window.sessions.objects[i].startDateTime, | |
| end: window.sessions.objects[i].endDateTime, | |
| }); | |
| console.log(window.events); | |
| } | |
| }, | |
| error: function( xhr, status, errorThrown ) { | |
| mlg_ajax_error_thrown( xhr, status, errorThrown ); | |
| return false; | |
| }, | |
| // code to run regardless of success or failure | |
| complete: function( xhr, status ) { | |
| } | |
| }); | |
| if ($(window).width() >= 768) { | |
| $('#calendar').fullCalendar({ | |
| defaultView: 'basicWeek', | |
| // aspectRatio: 5, | |
| height: 600, | |
| columnFormat: { | |
| week: 'ddd' | |
| }, | |
| header: { | |
| center: 'title', | |
| right: 'next', | |
| left: 'prev' | |
| }, | |
| events: [ | |
| window.events | |
| ] | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment