Changeset 3043
- Timestamp:
- 11/10/10 13:59:34
- Files:
-
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bedeworkTheme.css (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bwClock-classic.css (added)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bwClock.css (modified) (6 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl (modified) (9 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/head.xsl (modified) (3 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkSetup.js (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bwClock.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bedeworkTheme.css
r3039 r3043 944 944 } 945 945 #bedework #startTimeFields img, 946 #bedework #endTimeFields img { 946 #bedework #endTimeFields img, 947 #bedework #rdateTimeFields img, 948 #bedework #schedTime img { 947 949 vertical-align: middle; 950 } 951 #bedework #calWidgetStartTimeHider, 952 #bedework #calWidgetEndTimeHider, 953 #bedework #rdateTimeFields, 954 #bedework #schedTime { 955 width: 350px; 948 956 } 949 957 #bedework #tztable { trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/css/bwClock.css
r3040 r3043 18 18 */ 19 19 20 /** Theme for the basic jQuery plug-in for building a time picker. 21 * With a little effort this could be generalized; 22 * at the moment, it is somewhat Bedework-centric. 23 * 24 * The plug-in is defined in bwClock.js 25 * 26 * Note that the containing block must be wide enough to accommodate the 27 * time picker or the time picker components will wrap (which is ugly). 28 * The picker needs about 350px of width. 29 * 30 * @author Arlen Johnson johnsa - rpi.edu 31 */ 32 20 33 .bwTimePicker { 21 34 position: absolute; 35 z-index: 1; 22 36 margin: 0; 23 37 padding: 10px; … … 25 39 background-color: white; 26 40 border: 1px solid #ccb; 27 overflow: visible;28 41 } 29 42 .bwTimePicker .bwTimePickerCloser { … … 31 44 top: 0; 32 45 right: 0; 33 padding: 0 0 2px 2px;46 padding: 4px; 34 47 font-weight: bold; 35 48 cursor: pointer; 36 49 color: #666; 37 50 background-color: #f5f5f5; 51 } 52 .bwTimePicker .bwTimePickerCloser:hover { 53 color: #666; 54 background-color: #eee; 38 55 } 39 56 .bwTimePickerLink { … … 42 59 .bwTimePicker h6 { 43 60 text-align: center; 44 margin: 0 0 4px 0; 45 padding: 0; 61 margin: 0; 62 padding: 2px; 63 background-color: #eee; 64 color: black; 65 border-bottom: 1px solid #ddd; 46 66 } 47 67 .bwTimePicker ul { … … 61 81 cursor: pointer; 62 82 } 83 .bwTimePicker li:hover { 84 color: #666; 85 background-color: #eee; 86 } 63 87 .bwTimePicker .bwTimePickerColumn { 64 88 float: left; … … 75 99 color: black; 76 100 } 77 78 /* Old Clock Styles */79 #bwClock {80 position: absolute;81 z-index: +1000;82 }83 #bwClockClock {84 position: absolute;85 width: 380px;86 height: 380px;87 padding: 2px;88 margin: 0 auto;89 }90 #bwClockCover {91 /* special effect - used to cover the pixelated edge where the h2 below meets92 the anti-aliased clock edge */93 position: absolute;94 top: 130px;95 left: 350px;96 height: 21px;97 width: 12px;98 color: white;99 background-color: black;100 }101 #bwClockBox {102 position: absolute;103 top: 130px;104 left: 340px;105 z-index: -1;106 width: 220px;107 text-align: center;108 color: black;109 background-color: #ffe;110 border: 2px solid black;111 }112 #bwClockBox h2 {113 font-size: 12px;114 text-align: center;115 margin: 0;116 padding: 2px 0;117 color: #eee;118 background-color: #000;119 }120 #bwClockDateTypeIndicator {121 font-weight: bold;122 font-style: italic;123 display: block;124 margin: 1em;125 padding:0 ;126 }127 #bwClockTime {128 display: block;129 width: 100%;130 font-size: 0.9em;131 font-weight: bold;132 margin: 0.5em 0 3em 0;133 padding: 0;134 }135 #bwClockSwitch {136 position: absolute;137 bottom: 5px;138 left: 25px;139 margin: 0;140 }141 #bwClockCloseText {142 position: absolute;143 bottom: 5px;144 right: 28px;145 margin: 0;146 }147 #bwClockCloseButton a {148 position: absolute;149 bottom: 5px;150 right: 5px;151 display: block;152 font-family: Arial, Helvetica, sans-serif;153 font-size: 10px;154 border: 1px solid #333;155 margin: 0;156 padding:0 4px ;157 text-decoration: none;158 color: #333;159 background-color: white;160 }161 #bwClockCloseButton a:hover {162 color: #eee;163 background-color: #333;164 }trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl
r3040 r3043 450 450 </xsl:when> 451 451 <xsl:otherwise> 452 <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/images/calIcon.gif">453 <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute>454 <xsl:text> </xsl:text>455 </span-->456 452 <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/> 457 <script type="text/javascript">458 <xsl:comment>459 /*$("#bwEventWidgetEndDate").datepicker({460 defaultDate: new Date(<xsl:value-of select="form/end/dateTime/yearText/input/@value"/>, <xsl:value-of select="number(form/end/dateTime/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/>)461 }).attr("readonly", "readonly");462 $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>');*/463 </xsl:comment>464 </script>465 453 <input type="hidden" name="eventEndDate.year"> 466 454 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> … … 477 465 <div class="{$timeFieldsClass}" id="endTimeFields"> 478 466 <span id="calWidgetEndTimeHider" class="show"> 479 <xsl:copy-of select="form/end/dateTime/hour/*"/> 480 <xsl:copy-of select="form/end/dateTime/minute/*"/> 481 <xsl:if test="form/end/dateTime/ampm"> 482 <xsl:copy-of select="form/end/dateTime/ampm/*"/> 483 </xsl:if> 467 <select name="eventEndDate.hour" id="eventEndDateHour"> 468 <xsl:copy-of select="form/end/dateTime/hour/select/*"/> 469 </select> 470 <select name="eventEndDate.minute" id="eventEndDateMinute"> 471 <xsl:copy-of select="form/end/dateTime/minute/select/*"/> 472 </select> 473 <xsl:if test="form/end/dateTime/ampm"> 474 <select name="eventEndDate.ampm" id="eventEndDateAmpm"> 475 <xsl:copy-of select="form/end/dateTime/ampm/select/*"/> 476 </select> 477 </xsl:if> 484 478 <xsl:text> </xsl:text> 485 < a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/images/clockIcon.gif" width="16" height="15" border="0" alt="bwClock" id="bwEndClock"/></a>479 <img src="{$resourcesRoot}/images/clockIcon.gif" width="16" height="15" border="0" alt="bwClock" id="bwEndClock"/> 486 480 487 481 <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 488 482 <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 489 483 <option value="-1"><xsl:copy-of select="$bwStr-AEEF-SelectTimezone"/></option> 490 <!-- deprecated: now calling timezone server. See bedeworkEventForm.js --> 491 <!-- 492 <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 493 <xsl:for-each select="/bedework/timezones/timezone"> 494 <option> 495 <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 496 <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 497 <xsl:value-of select="name"/> 498 </option> 499 </xsl:for-each> 500 --> 484 <!-- Timezone options come from the timezone server. See bedeworkEventForm.js --> 501 485 </select> 502 486 </span> … … 1042 1026 <xsl:copy-of select="$bwStr-AEEF-Until"/> 1043 1027 <span id="untilHolder"> 1044 <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetUntilDate" iconURL="{$resourcesRoot}/images/calIcon.gif">1045 <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute>1046 <xsl:text> </xsl:text>1047 </span -->1048 1028 <input type="hidden" name="bwEventUntilDate" id="bwEventUntilDate" size="10"/> 1049 1029 <input type="text" name="bwEventWidgetUntilDate" id="bwEventWidgetUntilDate" size="10" onfocus="selectRecurCountUntil('recurUntil')"/> 1050 <script type="text/javascript">1051 <xsl:comment>1052 /*$("#bwEventWidgetUntilDate").datepicker({1053 <xsl:choose>1054 <xsl:when test="form/recurrence/until">1055 defaultDate: new Date(<xsl:value-of select="substring(form/recurrence/until,1,4)"/>, <xsl:value-of select="number(substring(form/recurrence/until,5,2)) - 1"/>, <xsl:value-of select="substring(form/recurrence/until,7,2)"/>),1056 </xsl:when>1057 <xsl:otherwise>1058 defaultDate: new Date(<xsl:value-of select="form/start/yearText/input/@value"/>, <xsl:value-of select="number(form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/>),1059 </xsl:otherwise>1060 </xsl:choose>1061 altField: "#bwEventUntilDate",1062 altFormat: "yymmdd"1063 }).attr("readonly", "readonly");1064 $("#bwEventWidgetUntilDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');*/1065 </xsl:comment>1066 </script>1067 1030 </span> 1068 1031 </p> … … 1289 1252 <div id="raContent"> 1290 1253 <div class="dateStartEndBox" id="rdatesFormFields"> 1291 <!--1292 <input type="checkbox" name="dateOnly" id="rdateDateOnly" onclick="swapRdateAllDay(this)" value="true"/>1293 all day1294 <input type="checkbox" name="floating" id="rdateFloating" onclick="swapRdateFloatingTime(this)" value="true"/>1295 floating1296 <input type="checkbox" name="storeUTC" id="rdateStoreUTC" onclick="swapRdateStoreUTC(this)" value="true"/>1297 store as UTC<br/>-->1298 1254 <div class="dateFields"> 1299 <!-- input name="eventRdate.date"1300 dojoType="dropdowndatepicker"1301 formatLength="medium"1302 value="today"1303 saveFormat="yyyyMMdd"1304 id="bwEventWidgetRdate"1305 iconURL="{$resourcesRoot}/images/calIcon.gif"/-->1306 1255 <input type="text" name="eventRdate.date" id="bwEventWidgetRdate" size="10"/> 1307 <script type="text/javascript">1308 <xsl:comment>1309 /* $("#bwEventWidgetRdate").datepicker({1310 defaultDate: new Date(<xsl:value-of select="form/start/yearText/input/@value"/>, <xsl:value-of select="number(form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/>),1311 dateFormat: "yymmdd"1312 }).attr("readonly", "readonly");1313 $("#bwEventWidgetRdate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');*/1314 </xsl:comment>1315 </script>1316 1256 </div> 1317 1257 <div id="rdateTimeFields" class="timeFields"> 1318 <select name="eventRdate.hour" >1258 <select name="eventRdate.hour" id="eventRdateHour"> 1319 1259 <option value="00">00</option> 1320 1260 <option value="01">01</option> … … 1342 1282 <option value="23">23</option> 1343 1283 </select> 1344 <select name="eventRdate.minute" >1284 <select name="eventRdate.minute" id="eventRdateMinute"> 1345 1285 <option value="00" selected="selected">00</option> 1346 1286 <option value="05">05</option> … … 1356 1296 <option value="55">55</option> 1357 1297 </select> 1358 <xsl:text> </xsl:text> 1298 <xsl:text> </xsl:text> 1299 <img src="{$resourcesRoot}/images/clockIcon.gif" width="16" height="15" border="0" alt="bwClock" id="bwRecExcClock"/> 1359 1300 1360 1301 <select name="tzid" id="rdateTzid" class="timezones"> 1361 1302 <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 1362 1303 <option value=""><xsl:copy-of select="$bwStr-AEEF-SelectTimezone"/></option> 1363 <!-- deprecated: now calling timezone server. See bedeworkEventForm.js --> 1364 <!-- 1365 <option value="">select timezone...</option> 1366 <xsl:variable name="rdateTzId" select="/bedework/now/defaultTzid"/> 1367 <xsl:for-each select="/bedework/timezones/timezone"> 1368 <option> 1369 <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 1370 <xsl:if test="$rdateTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 1371 <xsl:value-of select="name"/> 1372 </option> 1373 </xsl:for-each> 1374 --> 1304 <!-- Timezone options are called from the timezone server. See bedeworkEventForm.js --> 1375 1305 </select> 1376 1306 </div> … … 1497 1427 <input type="text" name="bwEventWidgetStartDateSched" id="bwEventWidgetStartDateSched" size="10"/> 1498 1428 <xsl:text> </xsl:text> 1499 <span class="schedTime" >1429 <span class="schedTime" id="schedTime"> 1500 1430 <select name="eventStartDateSched.hour" id="eventStartDateSchedHour"> 1501 1431 <xsl:copy-of select="form/start/hour/select/*"/> … … 1509 1439 </select> 1510 1440 </xsl:if> 1441 <xsl:text> </xsl:text> 1442 <img src="{$resourcesRoot}/images/clockIcon.gif" width="16" height="15" border="0" alt="bwClock" id="bwSchedClock"/> 1511 1443 </span> 1512 1444 </td> … … 1571 1503 <xsl:copy-of select="$bwStr-AEEF-Minutes"/> 1572 1504 </span> 1505 1573 1506 </td> 1574 1507 </tr> 1575 1508 </table> 1576 1509 1577 <!-- input type="button" id="getJson" onclick="bwGrid.requestFreeBusy('{$requestFreeBusy}');" value="development: get freebusy"/-->1578 1510 </div> 1579 1511 </div> trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/head.xsl
r3040 r3043 139 139 $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(/bedework/formElements/form/end/rfc3339DateTime,'T')"/>'); 140 140 141 // endtime 142 $("#bwEndClock").bwTimePicker({ 143 hour24: <xsl:value-of select="/bedework/hour24"/>, 144 attachToId: "calWidgetEndTimeHider", 145 hourId: "eventEndDateHour", 146 minuteId: "eventEndDateMinute", 147 ampmId: "eventEndDateAmpm" 148 }); 149 141 150 // recurrence until 142 151 $("#bwEventWidgetUntilDate").datepicker({ … … 154 163 $("#bwEventWidgetUntilDate").val('<xsl:value-of select="substring-before(/bedework/formElements/form/start/rfc3339DateTime,'T')"/>'); 155 164 156 // rdates and xdates 165 // rdates and xdates date picker 157 166 $("#bwEventWidgetRdate").datepicker({ 158 167 defaultDate: new Date(<xsl:value-of select="/bedework/formElements/form/start/yearText/input/@value"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="/bedework/formElements/form/start/day/select/option[@selected = 'selected']/@value"/>), 159 168 dateFormat: "yymmdd" 160 169 }).attr("readonly", "readonly"); 161 $("#bwEventWidgetRdate").val('<xsl:value-of select="substring-before(/bedework/formElements/form/start/rfc3339DateTime,'T')"/>'); 170 $("#bwEventWidgetRdate").val('<xsl:value-of select="substring(/bedework/formElements/form/start/rfc3339DateTime,1,4)"/><xsl:value-of select="substring(/bedework/formElements/form/start/rfc3339DateTime,6,2)"/><xsl:value-of select="substring(/bedework/formElements/form/start/rfc3339DateTime,9,2)"/>'); 171 172 // redates and xdates times 173 $("#bwRecExcClock").bwTimePicker({ 174 hour24: true, 175 withPadding: true, 176 attachToId: "rdateTimeFields", 177 hourId: "eventRdateHour", 178 minuteId: "eventRdateMinute" 179 }); 162 180 163 181 // meeting startdate widget … … 167 185 $("#bwEventWidgetStartDateSched").val('<xsl:value-of select="substring-before(/bedework/formElements/form/start/rfc3339DateTime,'T')"/>'); 168 186 187 // meeting starttime 188 $("#bwSchedClock").bwTimePicker({ 189 hour24: <xsl:value-of select="/bedework/hour24"/>, 190 attachToId: "schedTime", 191 hourId: "eventStartDateSchedHour", 192 minuteId: "eventStartDateSchedMinute", 193 ampmId: "eventStartDateSchedAmpm" 194 }); 169 195 } 170 196 </xsl:comment> trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkSetup.js
r2893 r3043 30 30 $("#bwAddButton").click ( 31 31 function () { 32 $("#bwActionIcons-0").toggle( "fast");32 $("#bwActionIcons-0").toggle(); 33 33 } 34 34 ); trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bwClock.js
r3040 r3043 18 18 */ 19 19 20 var bwClockHour = null; 21 var bwClockMinute = null; 22 var bwClockRequestedType = null; 23 var bwClockCurrentType = null; 20 21 /** A basic jQuery plug-in for building a time picker. 22 * With a little effort this could be generalized; 23 * at the moment, it is somewhat Bedework-centric. 24 * 25 * Styles are defined in bwClock.css 26 * 27 * @author Arlen Johnson johnsa - rpi.edu 28 */ 24 29 25 30 (function($){ … … 28 33 var defaults = { 29 34 hour24: false, 35 withPadding: false, 30 36 attachToId: null, 31 37 hourId: null, … … 57 63 bwTimePickerContent += '<div class="bwTimePickerColumn bwTimePickerAmPm"><ul><li>am</li><li>pm</li></ul></div>'; 58 64 } 65 bwTimePickerContent += '</div>'; 59 66 return this.each(function() { 60 obj = $(this);67 var obj = $(this); 61 68 62 69 obj.addClass('bwTimePickerLink'); 63 70 $("#" + options.attachToId).css("position","relative"); 71 $("#" + options.attachToId).css("display","inline-block"); 64 72 65 73 obj.toggle( … … 75 83 if (hours == '12' && !options.hour24) { 76 84 hours = 0; 85 } 86 if (hours < 10 && options.withPadding) { 87 hours = "0" + hours; 77 88 } 78 89 $("#" + options.hourId).val(hours); … … 96 107 }; 97 108 })(jQuery); 98 99 function bwClockLaunch(type,hour24) {100 var clockContent = "";101 clockContent += '<div id="bwNewClock">';102 clockContent += '<div class="clockColumn"><h6>Hour</h6><div class="clockVals">';103 clockContent += '<ul><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li></ul>';104 clockContent += '<ul><li>7</li><li>8</li><li>9</li><li>10</li><li>11</li><li>12</li></ul>';105 clockContent += '</div>';106 if (hour24) {107 108 }109 clockContent += '<div class="clockColumn"><h6>Minute</h6><div class="clockVals">';110 clockContent += '<ul><li>00</li><li>10</li><li>20</li><li>30</li><li>40</li><li>50</li></ul>';111 clockContent += '<ul><li>05</li><li>15</li><li>25</li><li>35</li><li>45</li><li>55</li></ul>';112 clockContent += '</div>';113 if (!hour24) {114 clockContent += '<div class="clockVals"><ul><li>AM</li><li>PM</li></ul></div>';115 }116 117 var $clockWidget = $('<div></div>')118 .html(clockContent)119 .dialog({120 autoOpen: false121 });122 $clockWidget.dialog('open');123 }124 125 function bwClockUpdateDateTimeForm(valType,val,hour24) {126 // valType: "hour" or "minute"127 // val: hour or minute value as integer128 // hour24: true (24hr clock) or false (12hr clock + am/pm)129 if (bwClockRequestedType) {130 try {131 if (valType == 'minute') {132 var fieldName = bwClockRequestedType + ".minute"133 window.document.eventForm[fieldName].value = val;134 if (val < 10) {135 val = "0" + val; // pad the value for display136 }137 bwClockMinute = val;138 } else {139 var fieldName = bwClockRequestedType + ".hour"140 if (hour24) {141 window.document.eventForm[fieldName].value = val;142 if (val < 10) {143 val = "0" + val; // pad the value for display144 }145 bwClockHour = val;146 } else {147 var hour12 = val;148 if (hour12 > 12) {149 hour12 -= 12;150 } else if (hour12 == 12) {151 hour12 = 0; // noon and midnight are both represented by '0' in 12hr mode152 }153 window.document.eventForm[fieldName].value = hour12;154 if (val < 10) {155 val = "0" + val; // pad the value for display156 }157 bwClockHour = val;158 // now set the am/pm field159 fieldName = bwClockRequestedType + ".ampm";160 window.document.eventForm[fieldName].value = bwClockGetAmPm(bwClockHour);161 }162 }163 if (bwClockHour && bwClockMinute) {164 document.getElementById("bwClockTime").innerHTML = bwClockHour + ":" + bwClockMinute + " , " + bwClockConvertAmPm(bwClockHour) + ":" + bwClockMinute + " " + bwClockGetAmPm(bwClockHour);165 } else if (bwClockMinute) {166 document.getElementById("bwClockTime").innerHTML = ":" + bwClockMinute;167 } else {168 document.getElementById("bwClockTime").innerHTML = bwClockHour + " , " + bwClockConvertAmPm(bwClockHour) + " " + bwClockGetAmPm(bwClockHour);169 }170 } catch(e) {171 alert("There was an error:\n" + e );172 }173 } else {174 alert("The date type is null.");175 }176 }177 178 function bwClockConvertAmPm(hour24) {179 hour24 = parseInt(hour24,10);180 if (hour24 == 0) {181 return 12;182 } else if (hour24 > 12) {183 return hour24 - 12;184 } else {185 return hour24;186 }187 }188 189 function bwClockGetAmPm(hour24) {190 hour24 = parseInt(hour24,10);191 if (hour24 < 12) {192 return 'am';193 } else {194 return 'pm';195 }196 }
