Changeset 1052

Show
Ignore:
Timestamp:
10/26/06 15:42:55
Author:
johnsa
Message:

adding better category support to admin UI

Files:

Legend:

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

    r1051 r1052  
    614614        <tr> 
    615615          <td class="fieldName"> 
    616             Calendar**: 
     616            Calendar:** 
    617617          </td> 
    618618          <td> 
     
    896896        <tr> 
    897897          <td class="fieldName"> 
    898             Location**: 
     898            Location:** 
    899899          </td> 
    900900          <td> 
     
    955955        <tr> 
    956956          <td class="fieldName"> 
    957             Contact**: 
     957            Contact:** 
    958958          </td> 
    959959          <td> 
     
    980980        <tr> 
    981981          <td class="fieldName"> 
    982             Categories**: 
     982            Categories:** 
    983983          </td> 
    984984          <td> 
     
    994994                        <input type="checkbox" name="categoryKey"> 
    995995                          <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     996                          <xsl:attribute name="id">pref-<xsl:value-of select="keyword"/></xsl:attribute> 
     997                          <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="keyword"/>','all-<xsl:value-of select="keyword"/>')</xsl:attribute> 
    996998                          <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    997999                          <xsl:value-of select="keyword"/> 
     
    10031005                        <input type="checkbox" name="categoryKey"> 
    10041006                          <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     1007                          <xsl:attribute name="id">pref-<xsl:value-of select="keyword"/></xsl:attribute> 
     1008                          <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="keyword"/>','all-<xsl:value-of select="keyword"/>')</xsl:attribute> 
    10051009                          <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    10061010                          <xsl:value-of select="keyword"/> 
     
    10281032                    <input type="checkbox" name="categoryKey"> 
    10291033                      <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     1034                      <xsl:attribute name="id">all-<xsl:value-of select="keyword"/></xsl:attribute> 
     1035                      <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="keyword"/>','pref-<xsl:value-of select="keyword"/>')</xsl:attribute> 
    10301036                      <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    10311037                      <xsl:value-of select="keyword"/> 
     
    10371043                    <input type="checkbox" name="categoryKey"> 
    10381044                      <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     1045                      <xsl:attribute name="id">all-<xsl:value-of select="keyword"/></xsl:attribute> 
     1046                      <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="keyword"/>','pref-<xsl:value-of select="keyword"/>')</xsl:attribute> 
    10391047                      <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    10401048                      <xsl:value-of select="keyword"/> 
  • trunk/deployment/webadmin/webapp/resources/resources/includes.js

    r1032 r1052  
    9999  window.close(); 
    100100} 
     101 
     102// checkboxes for all categories and preferred categories are on the page 
     103// simultaneously.  The use can toggle between which is shown and which is 
     104// hidden.  When a checkbox from one collection is changed, the corresponding 
     105// checkbox should be changed in the other set if it exists. 
     106function setCatChBx(thiscat,othercat) { 
     107  thisCatCheckBox = document.getElementById(thiscat); 
     108  if (document.getElementById(othercat)) { 
     109    otherCatCheckBox = document.getElementById(othercat); 
     110    otherCatCheckBox.checked =  thisCatCheckBox.checked; 
     111  } 
     112}