Changeset 3596

Show
Ignore:
Timestamp:
07/24/12 12:54:45
Author:
johnsa
Message:

web submit: add labels to form elements to improve ux
web admin: change cursor to pointer on labels

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webadmin/webapp/resources/default/default/default.css

    r3563 r3596  
    484484        margin: 0.5em 2em 1em 0; 
    485485} 
     486label { 
     487        cursor: pointer; 
     488} 
    486489label.interiorLabel { 
    487490  display: block; 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.css

    r3027 r3596  
    385385  color: black; 
    386386} 
     387#bedework label { 
     388  cursor: pointer; 
     389} 
    387390#bedework .subForm label { 
    388391  float: left; 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r3579 r3596  
    626626              </xsl:variable> 
    627627 
    628               <!-- date only event: anniversary event - often interpreted as "all day event" --> 
    629               <xsl:choose> 
    630                 <xsl:when test="form/allDay/input/@checked='checked'"> 
    631                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    632                   <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/> 
    633                   <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/> 
    634                 </xsl:when> 
    635                 <xsl:otherwise> 
    636                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    637                   <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/> 
    638                   <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/> 
    639                 </xsl:otherwise> 
    640               </xsl:choose> 
    641               <xsl:copy-of select="$bwStr-FoEl-AllDay"/> 
     628              <!-- All day flag --> 
     629                    <input type="checkbox" name="allDayFlag" id="allDayFlag" onclick="swapAllDayEvent(this)" value="off"> 
     630                      <xsl:if test="form/allDay/input/@checked='checked'"> 
     631                        <xsl:attribute name="checked">checked</xsl:attribute> 
     632                        <xsl:attribute name="value">on</xsl:attribute> 
     633                      </xsl:if> 
     634                    </input> 
     635                    <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"> 
     636                      <xsl:if test="form/allDay/input/@checked='checked'"> 
     637                        <xsl:attribute name="value">on</xsl:attribute> 
     638                      </xsl:if> 
     639                    </input> 
     640                    <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"> 
     641                      <xsl:if test="form/allDay/input/@checked='checked'"> 
     642                        <xsl:attribute name="value">on</xsl:attribute> 
     643                      </xsl:if> 
     644                    </input> 
     645                    <label for="allDayFlag"> 
     646                      <xsl:copy-of select="$bwStr-FoEl-AllDay"/> 
     647                    </label> 
    642648 
    643649              <!-- HIDE floating event: no timezone (and not UTC) 
     
    757763                <xsl:choose> 
    758764                  <xsl:when test="form/end/type='E'"> 
    759                     <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     765                    <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    760766                  </xsl:when> 
    761767                  <xsl:otherwise> 
    762                     <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     768                    <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    763769                  </xsl:otherwise> 
    764770                </xsl:choose> 
    765                 <xsl:copy-of select="$bwStr-FoEl-Date"/> 
     771                      <label for="bwEndDateTimeButton"> 
     772                        <xsl:copy-of select="$bwStr-FoEl-Date"/> 
     773                      </label> 
    766774                <xsl:variable name="endDateTimeClass"> 
    767775                  <xsl:choose> 
     
    850858                  <xsl:choose> 
    851859                    <xsl:when test="form/end/type='D'"> 
    852                       <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     860                      <input type="radio" name="eventEndType" id="bwEndDurationButton" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    853861                    </xsl:when> 
    854862                    <xsl:otherwise> 
    855                       <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     863                      <input type="radio" name="eventEndType" id="bwEndDurationButton" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    856864                    </xsl:otherwise> 
    857865                  </xsl:choose> 
    858                   <xsl:copy-of select="$bwStr-FoEl-Duration"/> 
     866                        <label for="bwEndDurationButton"> 
     867                          <xsl:copy-of select="$bwStr-FoEl-Duration"/> 
     868                        </label> 
    859869                  <xsl:variable name="endDurationClass"> 
    860870                    <xsl:choose> 
     
    918928                  <xsl:choose> 
    919929                    <xsl:when test="form/end/type='N'"> 
    920                       <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     930                      <input type="radio" name="eventEndType" id="bwEndNoneButton" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    921931                    </xsl:when> 
    922932                    <xsl:otherwise> 
    923                       <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     933                      <input type="radio" name="eventEndType" id="bwEndNoneButton" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    924934                    </xsl:otherwise> 
    925935                  </xsl:choose> 
    926                   <xsl:copy-of select="$bwStr-FoEl-This"/><xsl:text> </xsl:text> 
    927                   <xsl:choose> 
    928                     <xsl:when test="form/entityType = '2'"><xsl:copy-of select="$bwStr-FoEl-Task"/></xsl:when> 
    929                     <xsl:otherwise><xsl:copy-of select="$bwStr-FoEl-Event"/></xsl:otherwise> 
    930                   </xsl:choose> 
    931                   <xsl:text> </xsl:text><xsl:copy-of select="$bwStr-FoEl-HasNoDurationEndDate"/> 
     936                  <label for="bwEndNoneButton"> 
     937                          <xsl:copy-of select="$bwStr-FoEl-This"/><xsl:text> </xsl:text> 
     938                          <xsl:choose> 
     939                            <xsl:when test="form/entityType = '2'"><xsl:copy-of select="$bwStr-FoEl-Task"/></xsl:when> 
     940                            <xsl:otherwise><xsl:copy-of select="$bwStr-FoEl-Event"/></xsl:otherwise> 
     941                          </xsl:choose> 
     942                          <xsl:text> </xsl:text> 
     943                    <xsl:copy-of select="$bwStr-FoEl-HasNoDurationEndDate"/> 
     944                  </label> 
    932945                </div> 
    933946              </div> 
     
    10961109      </div> 
    10971110 
    1098       <!-- Categories tab (now Topical areas) --> 
    1099       <!-- ================================== --> 
     1111      <!-- Topical areas tab --> 
     1112      <!-- ================= --> 
    11001113      <div id="bwEventTab-Categories" class="invisible"> 
    11011114        <!-- Topical area  --> 
     
    13291342            <xsl:variable name="virtualPath"><xsl:for-each select="ancestor-or-self::calendar/name">/<xsl:value-of select="."/></xsl:for-each></xsl:variable> 
    13301343            <xsl:variable name="displayName" select="summary"/> 
    1331             <input type="checkbox" name="alias" onclick="toggleBedeworkXProperty('X-BEDEWORK-SUBMIT-ALIAS','{$displayName}','{$virtualPath}',this.checked)"> 
     1344            <input type="checkbox" name="alias" id="{generate-id(path)}" onclick="toggleBedeworkXProperty('X-BEDEWORK-SUBMIT-ALIAS','{$displayName}','{$virtualPath}',this.checked)"> 
    13321345              <xsl:attribute name="value"><xsl:value-of select="$virtualPath"/></xsl:attribute> 
    13331346              <xsl:if test="$virtualPath = /bedework/formElements/form/xproperties//X-BEDEWORK-SUBMIT-ALIAS/values/text"><xsl:attribute name="checked"><xsl:value-of select="checked"/></xsl:attribute></xsl:if> 
    13341347            </input> 
    1335             <xsl:choose> 
    1336               <xsl:when test="$virtualPath = /bedework/formElements/form/xproperties//X-BEDEWORK-SUBMIT-ALIAS/values/text"> 
    1337                 <strong><xsl:value-of select="summary"/></strong> 
    1338               </xsl:when> 
    1339               <xsl:otherwise> 
    1340                 <xsl:value-of select="summary"/> 
    1341               </xsl:otherwise> 
    1342             </xsl:choose> 
     1348            <label for="{generate-id(path)}"> 
     1349                    <xsl:choose> 
     1350                      <xsl:when test="$virtualPath = /bedework/formElements/form/xproperties//X-BEDEWORK-SUBMIT-ALIAS/values/text"> 
     1351                        <strong><xsl:value-of select="summary"/></strong> 
     1352                      </xsl:when> 
     1353                      <xsl:otherwise> 
     1354                        <xsl:value-of select="summary"/> 
     1355                      </xsl:otherwise> 
     1356                    </xsl:choose> 
     1357            </label> 
    13431358          </xsl:otherwise> 
    13441359        </xsl:choose>