Changeset 2953
- Timestamp:
- 07/13/10 19:44:19
- Files:
-
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bwScheduling.css (modified) (5 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/addrbookLocations.js (added)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/addrbookUsers.js (added)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkAttendees.js (modified) (2 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkScheduling.js (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bwScheduling.css
r2951 r2953 83 83 #bwScheduleTable #bwAddAttendee { 84 84 cursor: pointer; 85 padding: 4px 0;85 margin: 4px 0; 86 86 } 87 87 #bwScheduleTable #bwAddAttendee.pending { … … 93 93 color: black; 94 94 background-color: transparent; 95 border: none;95 border: 1px solid #ddd; 96 96 } 97 97 #bwScheduleTable #bwAddAttendeeAdvanced { … … 107 107 cursor: pointer; 108 108 } 109 #bwScheduleTable #bwAddAttendeeFields { 110 margin: auto; 111 width: 170px; 112 } 113 #bwScheduleTable .bwAddAttendeeSubField { 114 float: left; 115 font-size: 0.9em; 116 margin: 0.5em 0.25em; 117 } 118 #bwScheduleTable .bwAddAttendeeSubFieldHead { 119 text-align: center; 120 background-color: #eee; 121 color: black; 122 } 109 123 #bwScheduleTable #attType { 110 124 display: none; … … 117 131 } 118 132 #bwScheduleTable td.busy { 119 background-color: #b1cbfa ;133 background-color: #b1cbfa !important; 120 134 color: black; 121 135 } … … 125 139 } 126 140 #bwScheduleTable td.tentative { 127 background: #eef url("../images/tentativeLines.gif") ;141 background: #eef url("../images/tentativeLines.gif") !important; 128 142 color: black; 129 143 } trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl
r2928 r2953 1562 1562 <!-- the following test on the organizerSchedulingObject is not good - will need to fix --> 1563 1563 <xsl:when test="scheduleMethod = '2' and organizerSchedulingObject"> 1564 <input name="submitAndSend" type="submit" value="{$bwStr-AEEF-SaveAndSendInvites}" />1564 <input name="submitAndSend" type="submit" value="{$bwStr-AEEF-SaveAndSendInvites}" class="bwEventFormSubmit"/> 1565 1565 <!-- dissalow: at the moment there's no way to send invitations after the first save 1566 1566 <input name="submit" type="submit" value="{$bwStr-AEEF-SaveDraft}"/> --> 1567 1567 </xsl:when> 1568 1568 <xsl:otherwise> 1569 <input name="submit" type="submit" value="{$bwStr-AEEF-Save}" />1569 <input name="submit" type="submit" value="{$bwStr-AEEF-Save}" class="bwEventFormSubmit"/> 1570 1570 </xsl:otherwise> 1571 1571 </xsl:choose> trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkAttendees.js
r2950 r2953 27 27 format: 'json', 28 28 addrbook: '/public/locations' 29 //addrbook: '/user/johnsa/addressbook' 29 30 }, 30 31 … … 38 39 data = data.microformats.vcard; 39 40 for (var i = 0; i < data.length; i++) { 40 dataRow = { 41 fn: (data[i].fn.value)?data[i].fn.value:"", 42 email: (data[i].email[0].value)?data[i].email[0].value:"", 43 uri: (data[i].caladruri.value)?data[i].caladruri.value:"", 44 type: (data[i].kind.value)?data[i].kind.value:"" 45 }; 46 parsed[i] = { 47 data: dataRow, 48 value: data[i].fn.value, 49 result: data[i].email[0].value 50 }; 41 42 // pick out the best uri if one is available 43 // caladruri is first choice, email second 44 var cururi = ""; 45 if (data[i].caladruri != undefined && data[i].caladruri.value != undefined) { 46 cururi = data[i].caladruri.value; 47 } 48 if (cururi == "" && data[i].email[0] != undefined && data[i].email[0].value != undefined) { 49 var curEmail = data[i].email[0].value; 50 if (curEmail != "") { 51 cururi = "mailto:" + curEmail; 52 } 53 } 54 // check for the existence of fn 55 var curfn = ""; 56 if (data[i].fn != undefined && data[i].fn.value != undefined) { 57 curfn = data[i].fn.value; 58 } 59 60 // check for the existence of kind 61 var curkind = ""; 62 if (data[i].kind != undefined && data[i].kind.value != undefined) { 63 curkind = data[i].kind.value; 64 } 65 66 // skip if no uri 67 if (cururi != "") { 68 dataRow = { 69 fn: curfn, 70 uri: cururi, 71 type: curkind 72 }; 73 parsed[i] = { 74 data: dataRow, 75 value: curfn, 76 result: cururi 77 }; 78 } 51 79 } 52 80 return parsed; 53 81 }, 54 82 formatItem: function(item) { 55 return " \"" + item.fn + "\" [" + item. email+ "]";83 return " \"" + item.fn + "\" [" + item.uri.substring(7) + "]"; 56 84 }, 57 85 58 86 formatMatch: function(item) { 59 return " \"" + item.fn + "\" [" + item. email+ "]";87 return " \"" + item.fn + "\" [" + item.uri.substring(7) + "]"; 60 88 }, 61 89 formatResult: function(item) { 62 return item. email;90 return item.uri; 63 91 } 64 92 }; 65 66 // carddavUrl supplied in bedework.js67 jQuery(document).ready(function($) {68 $('#bwAddAttendee').autocomplete(carddavUrl, bwAutoCompleteOptions)69 });trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkScheduling.js
r2952 r2953 63 63 var bwAddDisp = "add"; 64 64 var bwAttendeeExistsDisp = "attendee exists"; 65 var bwAddAttendeeRoleDisp = "Role:"; 66 var bwAddAttendeeTypeDisp = "Type"; 67 var bwAddAttendeeBookDisp = "Book"; 68 var bwEventSubmitMeetingDisp = "send"; 65 69 66 70 var bwReqParticipantDisp = "required"; … … 220 224 // times to be displayed, e.g. hourDivision = 4 quantizes the 221 225 // display to 15 minute increments; hourDivision = 1 locks the events to the 222 // nearest hour ( not a good outcome)226 // nearest hour (which is likely not best) 223 227 // 4, 6, or 12 is preferred (and higher begins to slow down the display) 224 228 // If in doubt, leave this at 4 … … 228 232 var hourMils = 3600000; 229 233 var startMils = Number(this.startRange.getTime()) + Number(this.startHoursRange * hourMils); // the start of the grid 230 var durationMils = hourMils; // value used to calculate default endSelectionMils, defaults to 1 hour in milliseconds 234 var durationMils = hourMils; // value used to calculate default endSelectionMils, defaults to 1 hour in milliseconds 235 // - SHOULD DEFAULT TO DATE/TIME SETTINGS 231 236 var incrementMils = hourMils / this.hourDivision; // increment for the pick next/previous buttons 232 237 var startSelectionMils = startMils; // where a mouse selection begins, milliseconds parsed from the first half of a fbcell's ID, default to beginning of grid 238 // - SHOULD DEFAULT TO DATE/TIME SETTINGS 233 239 var endSelectionMils; // where a mouse selection ends, milliseconds parsed from the first half of a fbcell's ID 234 240 var selecting = false; // are we currently selecting? If true, we'll highlight as we hover … … 270 276 $("#bwSchedProcessingMsg").show(); 271 277 272 //var showAtts = "";273 278 // check to see if attendee already exists 274 279 for (var i=0; i < bwGrid.attendees.length; i++) { 275 //showAtts += bwGrid.attendees[i].uid + "\n"; 280 if (uid.indexOf("mailto:") != -1) { 281 uid = uid.substring(7); 282 } 276 283 if (uid == bwGrid.attendees[i].uid) { 277 284 attendeeIsNew = false; … … 282 289 } 283 290 } 284 //alert(showAtts);285 291 286 292 if (attendeeIsNew) { … … 289 295 type: "POST", 290 296 url: bwGrid.attUrlPrefix, 291 data: "uri=" + uid + "&role=" + role + "&partstat=" + status + "&attendee=true&submit=add ",297 data: "uri=" + uid + "&role=" + role + "&partstat=" + status + "&attendee=true&submit=add&list=yes", 292 298 success: function(){ 293 299 // add the attendee to the local array 294 300 // this data must be completed by the ajax call (coming) 301 302 // take off "mailto:" for local storage 303 if (uid.indexOf("mailto:") != -1) { 304 uid = uid.substring(7); 305 } 295 306 var newAttendee = new bwAttendee(name, uid, role, status, type); 296 307 bwGrid.attendees.push(newAttendee); 297 308 bwGrid.requestFreeBusy(); 309 310 // got attendees?? send the param that will trigger a 311 // scheduling request. For now, just set this every time 312 // (we'll trim back later) 313 if (bwGrid.attendees.length) { 314 $("input.bwEventFormSubmit").each(function(i) { 315 $(this).attr("name","submitAndSend"); 316 $(this).val(bwEventSubmitMeetingDisp); 317 }); 318 } 298 319 }, 299 320 error: function(msg) { … … 387 408 388 409 // now do the highlighting 410 bwGrid.highlight(curSelectionTime, endSelectionMils); 411 412 // we've clicked pickedNext - so set the pickNextClicked flag to true 413 // this flag lets us highlight the very first free time window on first click 414 pickNextClicked = true; 415 416 bwGrid.setDateTimeWidgets(curSelectionTime); 417 }; 418 419 this.pickPrevious = function() { 420 // clear highlighting 421 $("#bwScheduleTable .fbcell").removeClass("highlight"); 422 423 // go to the previous freeTime if available and highlight it 424 if (this.freeTimeIndex > 0) { 425 this.freeTimeIndex -= 1; 426 } 427 // set the start of the selection range using the freeTimeIndex 428 var curSelectionTime = Number(this.freeTime[this.freeTimeIndex]); 429 // set the end time by adding the duration 430 endSelectionMils = Number(curSelectionTime) + Number(durationMils); 431 432 // now do the highlighting 433 bwGrid.highlight(curSelectionTime, endSelectionMils); 434 435 bwGrid.setDateTimeWidgets(curSelectionTime); 436 }; 437 438 this.highlight = function (curSelectionTime, endSelectionMils) { 389 439 $("#bwScheduleTable .fbcell").each(function(index) { 390 440 var splId = $(this).attr("id").split("-"); … … 392 442 $(this).addClass("highlight"); 393 443 } 394 395 444 }); 396 397 // we've clicked pickedNext - so set the pickNextClicked flag to true398 // this flag lets us highlight the very first free time window on first click399 pickNextClicked = true;400 401 bwGrid.setDateTimeWidgets(curSelectionTime);402 };403 404 this.pickPrevious = function() {405 // clear highlighting406 $("#bwScheduleTable .fbcell").removeClass("highlight");407 408 // go to the previous freeTime if available and highlight it409 if (this.freeTimeIndex > 0) {410 this.freeTimeIndex -= 1;411 }412 // set the start of the selection range using the freeTimeIndex413 var curSelectionTime = Number(this.freeTime[this.freeTimeIndex]);414 // set the end time by adding the duration415 endSelectionMils = Number(curSelectionTime) + Number(durationMils);416 417 // now do the highlighting418 $("#bwScheduleTable .fbcell").each(function(index) {419 var splId = $(this).attr("id").split("-");420 if (splId[0] >= curSelectionTime && splId[0] < endSelectionMils) {421 $(this).addClass("highlight");422 }423 });424 425 bwGrid.setDateTimeWidgets(curSelectionTime);426 445 }; 427 446 … … 589 608 // this is where we could use zoom to increase or decrease tick marks and time labels on the grid 590 609 if (this.zoom == 100) { 591 $(fbDisplayTimesRow).append('<td class="hourBoundry " id="' + curDate.getTime() + '-TimeRow" colspan="' + this.hourDivision + '">' + curDate.getHours12() + ':' + curDate.getMinutesFull() + '</td>');610 $(fbDisplayTimesRow).append('<td class="hourBoundry timeCell" id="' + curDate.getTime() + '-TimeRow" colspan="' + this.hourDivision + '">' + curDate.getHours12() + ':' + curDate.getMinutesFull() + '</td>'); 592 611 curDate.addHours(1); 593 612 } … … 766 785 // create the add attendee form 767 786 var addAttendeeHtml = '<td class="addAttendee" colspan="4">'; 768 addAttendeeHtml += '<input type="text" value="' + bwAddAttendeeDisp +'" name=" attendee" id="bwAddAttendee" class="pending" size="30"/>';787 addAttendeeHtml += '<input type="text" value="' + bwAddAttendeeDisp +'" name="q" id="bwAddAttendee" class="pending" size="30"/>'; 769 788 addAttendeeHtml += '<span id="bwAddAttendeeAdd" class="invisible">' + bwAddDisp +'</span>'; 770 789 //addAttendeeHtml += '<span id="bwAddAttendeeAdvanced">advanced</span>'; 771 790 addAttendeeHtml += '<div id="bwAddAttendeeFields" class="invisible">'; 772 addAttendeeHtml += '<select name="role" id="bwAddAttendeeRole">'; 773 addAttendeeHtml += ' <option value="REQ-PARTICIPANT">' + bwReqParticipantDisp + '</option>'; 774 addAttendeeHtml += ' <option value="OPT-PARTICIPANT">' + bwOptParticipantDisp + '</option>'; 775 addAttendeeHtml += ' <option value="CHAIR">' + bwChairDisp + '</option>'; 776 addAttendeeHtml += ' <option value="NON-PARTICIPANT">' + bwNonParticipant + '</option>'; 777 addAttendeeHtml += '</select>'; 778 addAttendeeHtml += '<select name="partstat" id="bwAddAttendeePartstat">'; 779 addAttendeeHtml += ' <option value="NEEDS-ACTION">' + bwNeedsAction + '</option>'; 780 addAttendeeHtml += ' <option value="ACCEPTED">' + bwAccepted + '</option>'; 781 addAttendeeHtml += ' <option value="DECLINED">' + bwDeclined + '</option>'; 782 addAttendeeHtml += ' <option value="TENTATIVE">' + bwTentative + '</option>'; 783 addAttendeeHtml += ' <option value="DELEGATED">' + bwDelegated + '</option>'; 784 addAttendeeHtml += '</select>'; 785 //addAttendeeHtml += '<select><option>person</option><option>group</option><option>resource</option></select>'; 786 //addAttendeeHtml += '<input type="checkbox"/>personal <input type="checkbox"/>public'; 791 addAttendeeHtml += ' ' + bwAddAttendeeRoleDisp + ' '; 792 addAttendeeHtml += ' <select name="role" id="bwAddAttendeeRole">'; 793 addAttendeeHtml += ' <option value="REQ-PARTICIPANT">' + bwReqParticipantDisp + '</option>'; 794 addAttendeeHtml += ' <option value="OPT-PARTICIPANT">' + bwOptParticipantDisp + '</option>'; 795 addAttendeeHtml += ' <option value="CHAIR">' + bwChairDisp + '</option>'; 796 addAttendeeHtml += ' <option value="NON-PARTICIPANT">' + bwNonParticipant + '</option>'; 797 addAttendeeHtml += ' </select>'; 798 // DON'T include partstat except for testing. This value should be determined by actual participants. 799 //addAttendeeHtml += '<select name="partstat" id="bwAddAttendeePartstat">'; 800 //addAttendeeHtml += ' <option value="NEEDS-ACTION">' + bwNeedsAction + '</option>'; 801 //addAttendeeHtml += ' <option value="ACCEPTED">' + bwAccepted + '</option>'; 802 //addAttendeeHtml += ' <option value="DECLINED">' + bwDeclined + '</option>'; 803 //addAttendeeHtml += ' <option value="TENTATIVE">' + bwTentative + '</option>'; 804 //addAttendeeHtml += ' <option value="DELEGATED">' + bwDelegated + '</option>'; 805 //addAttendeeHtml += '</select>'; 806 addAttendeeHtml += ' <div class="bwAddAttendeeSubField">'; 807 addAttendeeHtml += ' <div class="bwAddAttendeeSubFieldHead">' + bwAddAttendeeTypeDisp + '</div>'; 808 addAttendeeHtml += ' <input type="radio" name="bwAddAttendeeType" value="person" checked="checked">person<br/>'; 809 addAttendeeHtml += ' <input type="radio" name="bwAddAttendeeType" value="group" disabled="disabled">group<br/>'; 810 addAttendeeHtml += ' <input type="radio" name="bwAddAttendeeType" value="location"/>location'; 811 addAttendeeHtml += ' </div>'; 812 addAttendeeHtml += ' <div class="bwAddAttendeeSubField">'; 813 addAttendeeHtml += ' <div class="bwAddAttendeeSubFieldHead">' + bwAddAttendeeBookDisp + '</div>'; 814 addAttendeeHtml += ' <input type="radio" name="bwAddAttendeeAddrBk" value="person" checked="checked">personal<br/>'; 815 addAttendeeHtml += ' <input type="radio" name="bwAddAttendeeAddrBk" value="group">public<br/>'; 816 addAttendeeHtml += ' </div>'; 787 817 addAttendeeHtml += '</div>'; 788 818 addAttendeeHtml += '</td><td class="fbBoundry"></td>'; … … 841 871 // write the table back to the display 842 872 $("#" + displayId).html(fbDisplay); 873 874 875 // highlight the time based on the current date/time settings 876 //var curSelectionTime = Number(startSelectionMils); 877 // set the end time by adding the duration 878 //endSelectionMils = Number(curSelectionTime) + Number(durationMils); 879 //bwGrid.highlight(curSelectionTime, endSelectionMils); 843 880 844 881 … … 1007 1044 ); 1008 1045 1046 // auto-completion for add attendee input field 1047 // carddavUrl supplied in bedework.js 1048 var carddavUrlTemp = "/ucalrsrc/themes/bedeworkTheme/javascript/addrbookUsers.js" 1049 //var carddavUrlTemp = "/ucalrsrc/themes/bedeworkTheme/javascript/addrbookLocations.js" 1050 $("#bwScheduleTable #bwAddAttendee").autocomplete(carddavUrlTemp, bwAutoCompleteOptions); 1051 1009 1052 // capture the enter key when entering an attendee; 1010 1053 // do not submit the form; add the attendee.
