Changeset 2054

Show
Ignore:
Timestamp:
02/11/09 11:02:01
Author:
johnsa
Message:

UI updates:
- change xsl output method to xml from xhtml (required due to xalan upgrade)
- update clock javascript to correct for IE bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webadmin/portlet/resources/resources/bwClock.js

    r1105 r2054  
    55 
    66function bwClockLaunch(type) { 
    7   if ((document.getElementById("clock").className == "shown") && (bwClockCurrentType == type)) { 
    8     changeClass("clock","invisible"); // if the clock with the same type is showing, toggle it off 
    9   } else { // otherwise, turn it on and display the correct type 
     7  // type: type of clock "eventStartDate" or "eventEndDate" 
     8  if ((document.getElementById("clock").className == "visible") && (bwClockCurrentType == type)) { 
     9    // if the clock with the same type is visible, toggle it off 
     10    changeClass("clock","invisible"); 
     11  } else { 
     12    // otherwise, turn it on and display the correct type 
     13    changeClass("clock","visible"); 
    1014    bwClockRequestedType = type; 
    1115    bwClockCurrentType = type; 
    12     changeClass("clock","shown"); 
    13     // the following is for Internet Explorer.  IE draws "windowed" objects 
    14     // and unwindowed objects on seperate "planes"; windowed objects are always 
    15     // drawn obove unwindowed objects and select boxes are "windowed"; 
    16     // this is required to make IE not overwrite the clock div with 
    17     // the select boxes that fall below it on the page.  Note: we set them 
    18     // to display:hidden (not none) so their space is still occupied (and the 
    19     // browser window doesn't shift around) 
    20    changeClass("eventFormPrefLocationList","hidden"); 
    21    changeClass("eventFormLocationList","hidden"); 
    22    changeClass("eventFormSponsorList","hidden"); 
    23    changeClass("eventFormPrefSponsorList","hidden"); 
    24     bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); 
     16    // reset hours and minutes to null 
     17    bwClockHour = null; 
     18    bwClockMinute = null; 
     19    var bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); 
     20    var bwClockSwitch = document.getElementById("bwClockSwitch"); 
     21    document.getElementById("bwClockTime").innerHTML = "select time"; 
    2522    if (type == 'eventStartDate') { 
    26       bwClockIndicator.innerHTML = "Start Time" 
     23      bwClockIndicator.innerHTML = "Start Time"; 
     24      bwClockSwitch.innerHTML = '<a href="javascript:bwClockLaunch(\'eventEndDate\');">switch to end</a>'; 
    2725    } else { 
    28       bwClockIndicator.innerHTML = "End Time" 
     26      bwClockIndicator.innerHTML = "End Time"; 
     27      bwClockSwitch.innerHTML = '<a href="javascript:bwClockLaunch(\'eventStartDate\');">switch to start</a>'; 
    2928    } 
    3029  } 
     
    3332function bwClockClose() { 
    3433  changeClass("clock","invisible"); 
    35   changeClass("eventFormPrefLocationList","shown"); 
    36   changeClass("eventFormLocationList","shown"); 
    37   changeClass("eventFormSponsorList","shown"); 
    38   changeClass("eventFormPrefSponsorList","shown"); 
    3934} 
    4035 
    41 function bwClockUpdateDateTimeForm(type,val) { 
     36function bwClockUpdateDateTimeForm(valType,val,hour24) { 
     37  // valType: "hour" or "minute" 
     38  // val: hour or minute value as integer 
     39  // hour24: true (24hr clock) or false (12hr clock + am/pm) 
    4240  if (bwClockRequestedType) { 
    4341    try { 
    44       if (type == 'minute') { 
     42      if (valType == 'minute') { 
    4543        var fieldName = bwClockRequestedType + ".minute" 
    46         window.document.peForm[fieldName].value = val; 
     44        window.document.eventForm[fieldName].value = val; 
     45        if (val < 10) { 
     46          val = "0" + val; // pad the value for display 
     47        } 
    4748        bwClockMinute = val; 
    4849      } else { 
    4950        var fieldName = bwClockRequestedType + ".hour" 
    50         window.document.peForm[fieldName].value = val; 
    51         bwClockHour = val; 
     51        if (hour24) { 
     52          window.document.eventForm[fieldName].value = val; 
     53          if (val < 10) { 
     54            val = "0" + val; // pad the value for display 
     55          } 
     56          bwClockHour = val; 
     57        } else { 
     58          var hour12 = val; 
     59          if (hour12 > 12) { 
     60            hour12 -= 12; 
     61          } else if (hour12 == 12) { 
     62            hour12 = 0; // noon and midnight are both represented by '0' in 12hr mode 
     63          } 
     64          window.document.eventForm[fieldName].value = hour12; 
     65          if (val < 10) { 
     66            val = "0" + val; // pad the value for display 
     67          } 
     68          bwClockHour = val; 
     69          // now set the am/pm field 
     70          fieldName = bwClockRequestedType + ".ampm"; 
     71          window.document.eventForm[fieldName].value = bwClockGetAmPm(bwClockHour); 
     72        } 
    5273      } 
    5374      if (bwClockHour && bwClockMinute) { 
     
    80101  hour24 = parseInt(hour24,10); 
    81102  if (hour24 < 12) { 
    82     return 'a.m.'; 
     103    return 'am'; 
    83104  } else { 
    84     return 'p.m.'; 
     105    return 'pm'; 
    85106  } 
    86107} 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r2042 r2054  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33<xsl:output 
    4      method="html" 
     4     method="xml" 
    55     indent="no" 
    66     media-type="text/html" 
     
    27922792      </tr> 
    27932793 
     2794      <!-- Submitter --> 
     2795      <xsl:if test="xproperties/X-BEDEWORK-SUBMITTEDBY"> 
     2796        <tr> 
     2797          <th> 
     2798            Submitter: 
     2799          </th> 
     2800          <td> 
     2801            <strong><xsl:value-of select="xproperties/X-BEDEWORK-SUBMITTEDBY/values/text"/></strong> 
     2802          </td> 
     2803        </tr> 
     2804      </xsl:if> 
     2805 
    27942806      <!--  Categories  --> 
    27952807      <tr> 
  • trunk/deployment/webadmin/webapp/resources/resources/bwClock.js

    r1309 r2054  
    1717    bwClockHour = null; 
    1818    bwClockMinute = null; 
    19     bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); 
    20     bwClockSwitch = document.getElementById("bwClockSwitch"); 
     19    var bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); 
     20    var bwClockSwitch = document.getElementById("bwClockSwitch"); 
    2121    document.getElementById("bwClockTime").innerHTML = "select time"; 
    2222    if (type == 'eventStartDate') { 
     
    3737  // valType: "hour" or "minute" 
    3838  // val: hour or minute value as integer 
    39   // hour24: true (24hr clock) or false (12hr clock + am/pm)  
     39  // hour24: true (24hr clock) or false (12hr clock + am/pm) 
    4040  if (bwClockRequestedType) { 
    4141    try { 
  • trunk/deployment/webconfig/webapp/resources/default/default/default.xsl

    r1687 r2054  
    66  <!-- ==================================================================== --> 
    77  <!-- ==================================================================== --> 
    8   <xsl:output method="xhtml" indent="yes" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" standalone="yes" omit-xml-declaration="yes"/> 
     8  <xsl:output method="xml" indent="yes" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" standalone="yes" omit-xml-declaration="yes"/> 
    99  <xsl:variable name="resourcesRoot" select="/bedework/appRoot"/> 
    1010  <xsl:variable name="urlPrefix" select="/bedework/urlPrefix"/> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/PDA/default.xsl

    r1999 r2054  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    3 <xsl:output method="xhtml" 
     3<xsl:output method="xml" 
    44    indent="yes" 
    55    media-type="text/html" 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r2050 r2054  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33<xsl:output 
    4   method="xhtml" 
     4  method="xml" 
    55  indent="no" 
    66  media-type="text/html" 
  • trunk/deployment/webpublic/webapp/resources/demoskins/SoEDepartmental/default/default/default.xsl

    r1999 r2054  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33<xsl:output 
    4   method="xhtml" 
     4  method="xml" 
    55  indent="no" 
    66  media-type="text/html" 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1979 r2054  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33<xsl:output 
    4   method="xhtml" 
     4  method="xml" 
    55  indent="no" 
    66  media-type="text/html" 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r2050 r2054  
    66  exclude-result-prefixes="url"> 
    77<xsl:output 
    8   method="xhtml" 
     8  method="xml" 
    99  indent="no" 
    1010  media-type="text/html"