Index: trunk/deployment/webadmin/portlet/resources/resources/bwClock.js =================================================================== --- trunk/deployment/webadmin/portlet/resources/resources/bwClock.js (revision 1105) +++ trunk/deployment/webadmin/portlet/resources/resources/bwClock.js (revision 2054) @@ -5,26 +5,25 @@ function bwClockLaunch(type) { - if ((document.getElementById("clock").className == "shown") && (bwClockCurrentType == type)) { - changeClass("clock","invisible"); // if the clock with the same type is showing, toggle it off - } else { // otherwise, turn it on and display the correct type + // type: type of clock "eventStartDate" or "eventEndDate" + if ((document.getElementById("clock").className == "visible") && (bwClockCurrentType == type)) { + // if the clock with the same type is visible, toggle it off + changeClass("clock","invisible"); + } else { + // otherwise, turn it on and display the correct type + changeClass("clock","visible"); bwClockRequestedType = type; bwClockCurrentType = type; - changeClass("clock","shown"); - // the following is for Internet Explorer. IE draws "windowed" objects - // and unwindowed objects on seperate "planes"; windowed objects are always - // drawn obove unwindowed objects and select boxes are "windowed"; - // this is required to make IE not overwrite the clock div with - // the select boxes that fall below it on the page. Note: we set them - // to display:hidden (not none) so their space is still occupied (and the - // browser window doesn't shift around) - changeClass("eventFormPrefLocationList","hidden"); - changeClass("eventFormLocationList","hidden"); - changeClass("eventFormSponsorList","hidden"); - changeClass("eventFormPrefSponsorList","hidden"); - bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); + // reset hours and minutes to null + bwClockHour = null; + bwClockMinute = null; + var bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); + var bwClockSwitch = document.getElementById("bwClockSwitch"); + document.getElementById("bwClockTime").innerHTML = "select time"; if (type == 'eventStartDate') { - bwClockIndicator.innerHTML = "Start Time" + bwClockIndicator.innerHTML = "Start Time"; + bwClockSwitch.innerHTML = 'switch to end'; } else { - bwClockIndicator.innerHTML = "End Time" + bwClockIndicator.innerHTML = "End Time"; + bwClockSwitch.innerHTML = 'switch to start'; } } @@ -33,21 +32,43 @@ function bwClockClose() { changeClass("clock","invisible"); - changeClass("eventFormPrefLocationList","shown"); - changeClass("eventFormLocationList","shown"); - changeClass("eventFormSponsorList","shown"); - changeClass("eventFormPrefSponsorList","shown"); } -function bwClockUpdateDateTimeForm(type,val) { +function bwClockUpdateDateTimeForm(valType,val,hour24) { + // valType: "hour" or "minute" + // val: hour or minute value as integer + // hour24: true (24hr clock) or false (12hr clock + am/pm) if (bwClockRequestedType) { try { - if (type == 'minute') { + if (valType == 'minute') { var fieldName = bwClockRequestedType + ".minute" - window.document.peForm[fieldName].value = val; + window.document.eventForm[fieldName].value = val; + if (val < 10) { + val = "0" + val; // pad the value for display + } bwClockMinute = val; } else { var fieldName = bwClockRequestedType + ".hour" - window.document.peForm[fieldName].value = val; - bwClockHour = val; + if (hour24) { + window.document.eventForm[fieldName].value = val; + if (val < 10) { + val = "0" + val; // pad the value for display + } + bwClockHour = val; + } else { + var hour12 = val; + if (hour12 > 12) { + hour12 -= 12; + } else if (hour12 == 12) { + hour12 = 0; // noon and midnight are both represented by '0' in 12hr mode + } + window.document.eventForm[fieldName].value = hour12; + if (val < 10) { + val = "0" + val; // pad the value for display + } + bwClockHour = val; + // now set the am/pm field + fieldName = bwClockRequestedType + ".ampm"; + window.document.eventForm[fieldName].value = bwClockGetAmPm(bwClockHour); + } } if (bwClockHour && bwClockMinute) { @@ -80,7 +101,7 @@ hour24 = parseInt(hour24,10); if (hour24 < 12) { - return 'a.m.'; + return 'am'; } else { - return 'p.m.'; + return 'pm'; } } Index: trunk/deployment/webadmin/webapp/resources/default/default/default.xsl =================================================================== --- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl (revision 2042) +++ trunk/deployment/webadmin/webapp/resources/default/default/default.xsl (revision 2054) @@ -2,5 +2,5 @@ + + + + + Submitter: + + + + + + + Index: trunk/deployment/webadmin/webapp/resources/resources/bwClock.js =================================================================== --- trunk/deployment/webadmin/webapp/resources/resources/bwClock.js (revision 1309) +++ trunk/deployment/webadmin/webapp/resources/resources/bwClock.js (revision 2054) @@ -17,6 +17,6 @@ bwClockHour = null; bwClockMinute = null; - bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); - bwClockSwitch = document.getElementById("bwClockSwitch"); + var bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); + var bwClockSwitch = document.getElementById("bwClockSwitch"); document.getElementById("bwClockTime").innerHTML = "select time"; if (type == 'eventStartDate') { @@ -37,5 +37,5 @@ // valType: "hour" or "minute" // val: hour or minute value as integer - // hour24: true (24hr clock) or false (12hr clock + am/pm) + // hour24: true (24hr clock) or false (12hr clock + am/pm) if (bwClockRequestedType) { try { Index: trunk/deployment/webconfig/webapp/resources/default/default/default.xsl =================================================================== --- trunk/deployment/webconfig/webapp/resources/default/default/default.xsl (revision 1687) +++ trunk/deployment/webconfig/webapp/resources/default/default/default.xsl (revision 2054) @@ -6,5 +6,5 @@ - + Index: trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/PDA/default.xsl =================================================================== --- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/PDA/default.xsl (revision 1999) +++ trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/PDA/default.xsl (revision 2054) @@ -1,5 +1,5 @@ -