| 315 | | var newAttendee = new bwAttendee(att.name, att.uid, att.role, att.status, att.type); |
|---|
| | 315 | // strip off mailto: from uids to store locally |
|---|
| | 316 | var attUri = att.uid; |
|---|
| | 317 | if (attUri.indexOf("mailto:") != -1) { |
|---|
| | 318 | attUri = attUri.substr(7); |
|---|
| | 319 | } |
|---|
| | 320 | var newAttendee = new bwAttendee(att.name, attUri, att.role, att.status, att.type); |
|---|
| 399 | | $.getJSON(fbUrl, function(fb) { |
|---|
| 400 | | for (var i=0; i < fb.microformats["schedule-response"].length; i++) { |
|---|
| 401 | | var r = fb.microformats["schedule-response"][i]; // reference the current response |
|---|
| 402 | | |
|---|
| 403 | | if (r["calendar-data"] != undefined && r["calendar-data"].freebusy != undefined) { |
|---|
| 404 | | // find the attendee and pass in the freebusy object if the attendee has any |
|---|
| 405 | | for (var j=0; j < bwGrid.attendees.length; j++) { |
|---|
| 406 | | if (bwGrid.attendees[j].uid == r["calendar-data"].attendee[0].value.substr(r["calendar-data"].attendee[0].value.lastIndexOf(":") + 1)) { |
|---|
| 407 | | bwGrid.attendees[j].updateFreeBusy(r["calendar-data"].freebusy); |
|---|
| | 404 | $.ajax({ |
|---|
| | 405 | type: "POST", |
|---|
| | 406 | url: fbUrl, |
|---|
| | 407 | dataType: "json", |
|---|
| | 408 | success: function(fb){ |
|---|
| | 409 | for (var i=0; i < fb.microformats["schedule-response"].length; i++) { |
|---|
| | 410 | var r = fb.microformats["schedule-response"][i]; // reference the current response |
|---|
| | 411 | |
|---|
| | 412 | if (r["calendar-data"] != undefined && r["calendar-data"].freebusy != undefined) { |
|---|
| | 413 | // find the attendee and pass in the freebusy object if the attendee has any |
|---|
| | 414 | for (var j=0; j < bwGrid.attendees.length; j++) { |
|---|
| | 415 | if (bwGrid.attendees[j].uid == r["calendar-data"].attendee[0].value.substr(r["calendar-data"].attendee[0].value.lastIndexOf(":") + 1)) { |
|---|
| | 416 | bwGrid.attendees[j].updateFreeBusy(r["calendar-data"].freebusy); |
|---|
| | 417 | } |
|---|