| 930 | | <xsl:template name="clock"> |
|---|
| 931 | | <div id="bwClock"> |
|---|
| 932 | | <!-- Bedework 24-Hour Clock time selection widget |
|---|
| 933 | | used with resources/bwClock.js and resources/bwClock.css --> |
|---|
| 934 | | <xsl:variable name="hour24" select="/bedework/hour24"/><!-- true or false --> |
|---|
| 935 | | <div id="bwClockClock"> |
|---|
| 936 | | <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="bwClock" usemap="#bwClockMap" /> |
|---|
| 937 | | </div> |
|---|
| 938 | | <div id="bwClockCover"> |
|---|
| 939 | |   |
|---|
| 940 | | <!-- this is a special effect div used simply to cover the pixelated edge |
|---|
| 941 | | where the clock meets the clock box title --> |
|---|
| 942 | | </div> |
|---|
| 943 | | <div id="bwClockBox"> |
|---|
| 944 | | <h2> |
|---|
| 945 | | Bedework 24-Hour Clock |
|---|
| 946 | | </h2> |
|---|
| 947 | | <div id="bwClockDateTypeIndicator"> |
|---|
| 948 | | type |
|---|
| 949 | | </div> |
|---|
| 950 | | <div id="bwClockTime"> |
|---|
| 951 | | select time |
|---|
| 952 | | </div> |
|---|
| 953 | | <div id="bwClockSwitch"> |
|---|
| 954 | | switch |
|---|
| 955 | | </div> |
|---|
| 956 | | <div id="bwClockCloseText"> |
|---|
| 957 | | close |
|---|
| 958 | | </div> |
|---|
| 959 | | <div id="bwClockCloseButton"> |
|---|
| 960 | | <a href="javascript:bwClockClose();">X</a> |
|---|
| 961 | | </div> |
|---|
| 962 | | </div> |
|---|
| 963 | | <map name="bwClockMap" id="bwClockMap"> |
|---|
| 964 | | <area shape="rect" alt="close clock" title="close clock" coords="160,167, 200,200" href="javascript:bwClockClose()"/> |
|---|
| 965 | | <area shape="poly" alt="minute 00:55" title="minute 00:55" coords="156,164, 169,155, 156,107, 123,128" href="javascript:bwClockUpdateDateTimeForm('minute','55')" /> |
|---|
| 966 | | <area shape="poly" alt="minute 00:50" title="minute 00:50" coords="150,175, 156,164, 123,128, 103,161" href="javascript:bwClockUpdateDateTimeForm('minute','50')" /> |
|---|
| 967 | | <area shape="poly" alt="minute 00:45" title="minute 00:45" coords="150,191, 150,175, 103,161, 103,206" href="javascript:bwClockUpdateDateTimeForm('minute','45')" /> |
|---|
| 968 | | <area shape="poly" alt="minute 00:40" title="minute 00:40" coords="158,208, 150,191, 105,206, 123,237" href="javascript:bwClockUpdateDateTimeForm('minute','40')" /> |
|---|
| 969 | | <area shape="poly" alt="minute 00:35" title="minute 00:35" coords="171,218, 158,208, 123,238, 158,261" href="javascript:bwClockUpdateDateTimeForm('minute','35')" /> |
|---|
| 970 | | <area shape="poly" alt="minute 00:30" title="minute 00:30" coords="193,218, 172,218, 158,263, 209,263" href="javascript:bwClockUpdateDateTimeForm('minute','30')" /> |
|---|
| 971 | | <area shape="poly" alt="minute 00:25" title="minute 00:25" coords="209,210, 193,218, 209,261, 241,240" href="javascript:bwClockUpdateDateTimeForm('minute','25')" /> |
|---|
| 972 | | <area shape="poly" alt="minute 00:20" title="minute 00:20" coords="216,196, 209,210, 241,240, 261,206" href="javascript:bwClockUpdateDateTimeForm('minute','20')" /> |
|---|
| 973 | | <area shape="poly" alt="minute 00:15" title="minute 00:15" coords="216,178, 216,196, 261,206, 261,159" href="javascript:bwClockUpdateDateTimeForm('minute','15')" /> |
|---|
| 974 | | <area shape="poly" alt="minute 00:10" title="minute 00:10" coords="209,164, 216,178, 261,159, 240,126" href="javascript:bwClockUpdateDateTimeForm('minute','10')" /> |
|---|
| 975 | | <area shape="poly" alt="minute 00:05" title="minute 00:05" coords="196,155, 209,164, 238,126, 206,107" href="javascript:bwClockUpdateDateTimeForm('minute','5')" /> |
|---|
| 976 | | <area shape="poly" alt="minute 00:00" title="minute 00:00" coords="169,155, 196,155, 206,105, 156,105" href="javascript:bwClockUpdateDateTimeForm('minute','0')" /> |
|---|
| 977 | | <area shape="poly" alt="11 PM, 2300 hour" title="11 PM, 2300 hour" coords="150,102, 172,96, 158,1, 114,14" href="javascript:bwClockUpdateDateTimeForm('hour','23',{$hour24})" /> |
|---|
| 978 | | <area shape="poly" alt="10 PM, 2200 hour" title="10 PM, 2200 hour" coords="131,114, 150,102, 114,14, 74,36" href="javascript:bwClockUpdateDateTimeForm('hour','22',{$hour24})" /> |
|---|
| 979 | | <area shape="poly" alt="9 PM, 2100 hour" title="9 PM, 2100 hour" coords="111,132, 131,114, 74,36, 40,69" href="javascript:bwClockUpdateDateTimeForm('hour','21',{$hour24})" /> |
|---|
| 980 | | <area shape="poly" alt="8 PM, 2000 hour" title="8 PM, 2000 hour" coords="101,149, 111,132, 40,69, 15,113" href="javascript:bwClockUpdateDateTimeForm('hour','20',{$hour24})" /> |
|---|
| 981 | | <area shape="poly" alt="7 PM, 1900 hour" title="7 PM, 1900 hour" coords="95,170, 101,149, 15,113, 1,159" href="javascript:bwClockUpdateDateTimeForm('hour','19',{$hour24})" /> |
|---|
| 982 | | <area shape="poly" alt="6 PM, 1800 hour" title="6 PM, 1800 hour" coords="95,196, 95,170, 0,159, 0,204" href="javascript:bwClockUpdateDateTimeForm('hour','18',{$hour24})" /> |
|---|
| 983 | | <area shape="poly" alt="5 PM, 1700 hour" title="5 PM, 1700 hour" coords="103,225, 95,196, 1,205, 16,256" href="javascript:bwClockUpdateDateTimeForm('hour','17',{$hour24})" /> |
|---|
| 984 | | <area shape="poly" alt="4 PM, 1600 hour" title="4 PM, 1600 hour" coords="116,245, 103,225, 16,256, 41,298" href="javascript:bwClockUpdateDateTimeForm('hour','16',{$hour24})" /> |
|---|
| 985 | | <area shape="poly" alt="3 PM, 1500 hour" title="3 PM, 1500 hour" coords="134,259, 117,245, 41,298, 76,332" href="javascript:bwClockUpdateDateTimeForm('hour','15',{$hour24})" /> |
|---|
| 986 | | <area shape="poly" alt="2 PM, 1400 hour" title="2 PM, 1400 hour" coords="150,268, 134,259, 76,333, 121,355" href="javascript:bwClockUpdateDateTimeForm('hour','14',{$hour24})" /> |
|---|
| 987 | | <area shape="poly" alt="1 PM, 1300 hour" title="1 PM, 1300 hour" coords="169,273, 150,268, 120,356, 165,365" href="javascript:bwClockUpdateDateTimeForm('hour','13',{$hour24})" /> |
|---|
| 988 | | <area shape="poly" alt="Noon, 1200 hour" title="Noon, 1200 hour" coords="193,273, 169,273, 165,365, 210,364" href="javascript:bwClockUpdateDateTimeForm('hour','12',{$hour24})" /> |
|---|
| 989 | | <area shape="poly" alt="11 AM, 1100 hour" title="11 AM, 1100 hour" coords="214,270, 193,273, 210,363, 252,352" href="javascript:bwClockUpdateDateTimeForm('hour','11',{$hour24})" /> |
|---|
| 990 | | <area shape="poly" alt="10 AM, 1000 hour" title="10 AM, 1000 hour" coords="232,259, 214,270, 252,352, 291,330" href="javascript:bwClockUpdateDateTimeForm('hour','10',{$hour24})" /> |
|---|
| 991 | | <area shape="poly" alt="9 AM, 0900 hour" title="9 AM, 0900 hour" coords="251,240, 232,258, 291,330, 323,301" href="javascript:bwClockUpdateDateTimeForm('hour','9',{$hour24})" /> |
|---|
| 992 | | <area shape="poly" alt="8 AM, 0800 hour" title="8 AM, 0800 hour" coords="263,219, 251,239, 323,301, 349,261" href="javascript:bwClockUpdateDateTimeForm('hour','8',{$hour24})" /> |
|---|
| 993 | | <area shape="poly" alt="7 AM, 0700 hour" title="7 AM, 0700 hour" coords="269,194, 263,219, 349,261, 363,212" href="javascript:bwClockUpdateDateTimeForm('hour','7',{$hour24})" /> |
|---|
| 994 | | <area shape="poly" alt="6 AM, 0600 hour" title="6 AM, 0600 hour" coords="269,172, 269,193, 363,212, 363,155" href="javascript:bwClockUpdateDateTimeForm('hour','6',{$hour24})" /> |
|---|
| 995 | | <area shape="poly" alt="5 AM, 0500 hour" title="5 AM, 0500 hour" coords="263,150, 269,172, 363,155, 351,109" href="javascript:bwClockUpdateDateTimeForm('hour','5',{$hour24})" /> |
|---|
| 996 | | <area shape="poly" alt="4 AM, 0400 hour" title="4 AM, 0400 hour" coords="251,130, 263,150, 351,109, 325,68" href="javascript:bwClockUpdateDateTimeForm('hour','4',{$hour24})" /> |
|---|
| 997 | | <area shape="poly" alt="3 AM, 0300 hour" title="3 AM, 0300 hour" coords="234,112, 251,130, 325,67, 295,37" href="javascript:bwClockUpdateDateTimeForm('hour','3',{$hour24})" /> |
|---|
| 998 | | <area shape="poly" alt="2 AM, 0200 hour" title="2 AM, 0200 hour" coords="221,102, 234,112, 295,37, 247,11" href="javascript:bwClockUpdateDateTimeForm('hour','2',{$hour24})" /> |
|---|
| 999 | | <area shape="poly" alt="1 AM, 0100 hour" title="1 AM, 0100 hour" coords="196,96, 221,102, 247,10, 209,-1, 201,61, 206,64, 205,74, 199,75" href="javascript:bwClockUpdateDateTimeForm('hour','1',{$hour24})" /> |
|---|
| 1000 | | <area shape="poly" alt="Midnight, 0000 hour" title="Midnight, 0000 hour" coords="172,96, 169,74, 161,73, 161,65, 168,63, 158,-1, 209,-1, 201,61, 200,62, 206,64, 205,74, 198,75, 196,96, 183,95" href="javascript:bwClockUpdateDateTimeForm('hour','0',{$hour24})" /> |
|---|
| 1001 | | </map> |
|---|
| 1002 | | </div> |
|---|
| 1003 | | </xsl:template> |
|---|
| 1004 | | |
|---|
| 1005 | | <xsl:template match="freebusy" mode="freeBusyGrid"> |
|---|
| 1006 | | <xsl:param name="aggregation">false</xsl:param> |
|---|
| 1007 | | <xsl:param name="type">normal</xsl:param> |
|---|
| 1008 | | <table id="freeBusy"> |
|---|
| 1009 | | <tr> |
|---|
| 1010 | | <td></td> |
|---|
| 1011 | | <th colspan="24" class="left"> |
|---|
| 1012 | | Freebusy for |
|---|
| 1013 | | <span class="who"> |
|---|
| 1014 | | <xsl:choose> |
|---|
| 1015 | | <xsl:when test="$aggregation = 'true'"> |
|---|
| 1016 | | all attendees |
|---|
| 1017 | | </xsl:when> |
|---|
| 1018 | | <xsl:when test="starts-with(fbattendee/recipient,'mailto:')"> |
|---|
| 1019 | | <xsl:value-of select="substring-after(fbattendee/recipient,'mailto:')"/> |
|---|
| 1020 | | </xsl:when> |
|---|
| 1021 | | <xsl:otherwise> |
|---|
| 1022 | | <xsl:value-of select="fbattendee/recipient"/> |
|---|
| 1023 | | </xsl:otherwise> |
|---|
| 1024 | | </xsl:choose> |
|---|
| 1025 | | </span> |
|---|
| 1026 | | </th> |
|---|
| 1027 | | <!-- at some point allow switching of timezones: |
|---|
| 1028 | | <th colspan="32" class="right"> |
|---|
| 1029 | | <xsl:variable name="currentTimezone">America/Los_Angeles</xsl:variable> |
|---|
| 1030 | | <xsl:value-of select="$formattedStartDate"/> to <xsl:value-of select="$formattedEndDate"/> |
|---|
| 1031 | | <select name="timezone" id="timezonesDropDown" onchange="submit()"> |
|---|
| 1032 | | <xsl:for-each select="/bedework-fbaggregator/timezones/tzid"> |
|---|
| 1033 | | <option> |
|---|
| 1034 | | <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute> |
|---|
| 1035 | | <xsl:if test="node() = $currentTimezone"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| 1036 | | <xsl:value-of select="."/> |
|---|
| 1037 | | </option> |
|---|
| 1038 | | </xsl:for-each> |
|---|
| 1039 | | </select> |
|---|
| 1040 | | </th>--> |
|---|
| 1041 | | </tr> |
|---|
| 1042 | | <tr> |
|---|
| 1043 | | <td> </td> |
|---|
| 1044 | | <td colspan="12" class="morning">AM</td> |
|---|
| 1045 | | <td colspan="12" class="evening">PM</td> |
|---|
| 1046 | | </tr> |
|---|
| 1047 | | <tr> |
|---|
| 1048 | | <td> </td> |
|---|
| 1049 | | <xsl:for-each select="day[position()=1]/period"> |
|---|
| 1050 | | <td class="timeLabels"> |
|---|
| 1051 | | <xsl:choose> |
|---|
| 1052 | | <xsl:when test="number(start) mod 200 = 0"> |
|---|
| 1053 | | <xsl:call-template name="timeFormatter"> |
|---|
| 1054 | | <xsl:with-param name="timeString" select="start"/> |
|---|
| 1055 | | <xsl:with-param name="showMinutes">no</xsl:with-param> |
|---|
| 1056 | | <xsl:with-param name="showAmPm">no</xsl:with-param> |
|---|
| 1057 | | </xsl:call-template> |
|---|
| 1058 | | </xsl:when> |
|---|
| 1059 | | <xsl:otherwise> |
|---|
| 1060 | |   |
|---|
| 1061 | | </xsl:otherwise> |
|---|
| 1062 | | </xsl:choose> |
|---|
| 1063 | | </td> |
|---|
| 1064 | | </xsl:for-each> |
|---|
| 1065 | | </tr> |
|---|
| 1066 | | <xsl:for-each select="day"> |
|---|
| 1067 | | <tr> |
|---|
| 1068 | | <td class="dayDate"><xsl:value-of select="number(substring(dateString,5,2))"/>-<xsl:value-of select="number(substring(dateString,7,2))"/></td> |
|---|
| 1069 | | <xsl:for-each select="period"> |
|---|
| 1070 | | <xsl:variable name="startTime" select="start"/> |
|---|
| 1071 | | <!-- the start date for the add event link is a concat of the day's date plus the period's time (+ seconds)--> |
|---|
| 1072 | | <xsl:variable name="startDate"><xsl:value-of select="../dateString"/>T<xsl:value-of select="start"/>00</xsl:variable> |
|---|
| 1073 | | <xsl:variable name="meetingDuration" select="length"/> |
|---|
| 1074 | | <td> |
|---|
| 1075 | | <xsl:attribute name="class"> |
|---|
| 1076 | | <xsl:choose> |
|---|
| 1077 | | <xsl:when test="fbtype = '0'">busy</xsl:when> |
|---|
| 1078 | | <xsl:when test="fbtype = '3'">tentative</xsl:when> |
|---|
| 1079 | | <xsl:otherwise>free</xsl:otherwise> |
|---|
| 1080 | | </xsl:choose> |
|---|
| 1081 | | </xsl:attribute> |
|---|
| 1082 | | <xsl:variable name="action"> |
|---|
| 1083 | | <xsl:choose> |
|---|
| 1084 | | <xsl:when test="$aggregation = 'true'"><xsl:value-of select="$updateEvent"/></xsl:when> |
|---|
| 1085 | | <xsl:otherwise><xsl:value-of select="$initEvent"/></xsl:otherwise> |
|---|
| 1086 | | </xsl:choose> |
|---|
| 1087 | | </xsl:variable> |
|---|
| 1088 | | <xsl:variable name="urlString"> |
|---|
| 1089 | | <xsl:choose> |
|---|
| 1090 | | <xsl:when test="$type='meeting'"><xsl:value-of select="$action"/>&meetingStartdt=<xsl:value-of select="$startDate"/>&meetingDuration=<xsl:value-of select="$meetingDuration"/>&initDates=yes</xsl:when> |
|---|
| 1091 | | <xsl:otherwise><xsl:value-of select="$action"/>&startdate=<xsl:value-of select="$startDate"/>&minutes=<xsl:value-of select="$meetingDuration"/></xsl:otherwise> |
|---|
| 1092 | | </xsl:choose> |
|---|
| 1093 | | </xsl:variable> |
|---|
| 1094 | | <a href="{$urlString}"> |
|---|
| 1095 | | <xsl:choose> |
|---|
| 1096 | | <xsl:when test="((numBusy > 0) and (numBusy < 9)) or ((numTentative > 0) and (numTentative < 9)) and (number(numBusy) + number(numTentative) < 9)"> |
|---|
| 1097 | | <xsl:value-of select="number(numBusy) + number(numTentative)"/> |
|---|
| 1098 | | </xsl:when> |
|---|
| 1099 | | <xsl:otherwise><img src="{$resourcesRoot}/resources/spacer.gif" width="10" height="20" border="0" alt="f"/></xsl:otherwise> |
|---|
| 1100 | | </xsl:choose> |
|---|
| 1101 | | <span class="eventTip"> |
|---|
| 1102 | | <xsl:value-of select="substring(../dateString,1,4)"/>-<xsl:value-of select="number(substring(../dateString,5,2))"/>-<xsl:value-of select="number(substring(../dateString,7,2))"/> |
|---|
| 1103 | | <br/> |
|---|
| 1104 | | <strong> |
|---|
| 1105 | | <xsl:call-template name="timeFormatter"> |
|---|
| 1106 | | <xsl:with-param name="timeString" select="$startTime"/> |
|---|
| 1107 | | </xsl:call-template> |
|---|
| 1108 | | </strong> |
|---|
| 1109 | | <xsl:if test="numBusy > 0"> |
|---|
| 1110 | | <br/><xsl:value-of select="numBusy"/> busy |
|---|
| 1111 | | </xsl:if> |
|---|
| 1112 | | <xsl:if test="numTentative > 0"> |
|---|
| 1113 | | <br/><xsl:value-of select="numTentative"/> tentative |
|---|
| 1114 | | </xsl:if> |
|---|
| 1115 | | <xsl:if test="numBusy = 0 and numTentative = 0"> |
|---|
| 1116 | | <br/><em>all free</em> |
|---|
| 1117 | | </xsl:if> |
|---|
| 1118 | | </span> |
|---|
| 1119 | | </a> |
|---|
| 1120 | | </td> |
|---|
| 1121 | | </xsl:for-each> |
|---|
| 1122 | | </tr> |
|---|
| 1123 | | </xsl:for-each> |
|---|
| 1124 | | </table> |
|---|
| 1125 | | |
|---|
| 1126 | | <table id="freeBusyKey"> |
|---|
| 1127 | | <tr> |
|---|
| 1128 | | <td class="free">*</td> |
|---|
| 1129 | | <td>free</td> |
|---|
| 1130 | | <td> </td> |
|---|
| 1131 | | <td class="busy">*</td> |
|---|
| 1132 | | <td>busy</td> |
|---|
| 1133 | | <td> </td> |
|---|
| 1134 | | <td class="tentative">*</td> |
|---|
| 1135 | | <td>tentative</td> |
|---|
| 1136 | | </tr> |
|---|
| 1137 | | </table> |
|---|
| 1138 | | </xsl:template> |
|---|
| 1139 | | |
|---|