Changeset 554

Show
Ignore:
Timestamp:
06/08/06 15:12:03
Author:
johnsa
Message:

user client can now set subscription colors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.css

    r549 r554  
    657657  color: black; 
    658658} 
    659 #monthCalendarTable a.holiday:link, 
    660 #monthCalendarTable a.holiday:visited, 
    661 #monthCalendarTable a.holiday:active  { 
    662   display: block; 
    663   padding: 0.1em 0.2em 0.1em 0.2em; 
    664   text-decoration: none; 
    665   background-color: #fff; 
    666   color: black; 
    667   /*border-top: 1px solid black; 
    668   border-bottom: 1px solid black;*/ 
    669 
    670 #monthCalendarTable a.eventLinkA:hover, 
    671 #monthCalendarTable a.eventLinkB:hover, 
    672 #monthCalendarTable a.eventCancelled:hover, 
    673 #monthCalendarTable a.eventTentative:hover, 
    674 #monthCalendarTable a.holiday:hover   { 
    675   display: block; 
    676   padding: 0.1em 0.2em 0.1em 0.2em; 
    677   text-decoration: none; 
    678   color: black; 
    679   background-color: #ffa; 
     659#monthCalendarTable a:hover { 
     660  color: black; 
     661  background-color: #ffa !important; /* must be important to override subscription colors */ 
    680662} 
    681663#monthCalendarTable a.dayLink { 
     
    687669#monthCalendarTable a:hover.dayLink { 
    688670  text-decoration: none; 
    689   color: #eee; 
    690   background-color: black; 
     671  color: #eee !important; /* must be important to override a:hover selector above */ 
     672  background-color: black !important; /* must be important to override a:hover selector above */ 
    691673} 
    692674#monthCalendarTable a:hover { 
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r549 r554  
    237237    <meta name="robots" content="noindex,nofollow"/> 
    238238    <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
     239    <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    239240    <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    240241    <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
     
    882883              <xsl:variable name="dayDate" select="date"/> 
    883884              <a href="{$initEvent}?startdate={$dayDate}" class="gridAdd" title="add event"> 
    884                 <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add event"/> 
     885                <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="9" height="10" border="0" alt="add event"/> 
    885886              </a> 
    886887              <a href="{$setViewPeriod}?viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
     
    949950        <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
    950951        <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
    951         <xsl:when test="calendar/name='Holidays'">holiday</xsl:when> 
    952         <!-- Alternating colors for all standard events --> 
     952        <!-- Otherwise: Alternating colors for all standard events --> 
    953953        <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
    954954        <xsl:otherwise>eventLinkB</xsl:otherwise> 
    955955      </xsl:choose> 
    956956    </xsl:variable> 
     957    <!-- User defined subscription styles. 
     958         These are set in the add/modify subscription forms which 
     959         rely (in this stylesheet) on subColors.css; if present, these 
     960         override the background-color set by eventClass. User styles should 
     961         not be used for cancelled events (tentative is ok). --> 
     962    <xsl:variable name="subColor"> 
     963      <xsl:choose> 
     964         <xsl:when test="status != 'CANCELLED' and 
     965                        subscription/style != '' and 
     966                        subscription/style != 'default'"><xsl:value-of select="subscription/style"/></xsl:when> 
     967        <xsl:otherwise></xsl:otherwise> 
     968      </xsl:choose> 
     969    </xsl:variable> 
    957970    <li> 
    958       <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass}"> 
     971      <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass} {$subColor}"> 
    959972        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    960973        <xsl:value-of select="summary"/> 
     
    29963009          <td class="fieldname">Style:</td> 
    29973010          <td> 
    2998             <input type="text" value="" name="style" size="60"/> 
     3011            <select name="style"> 
     3012              <option value="default">default</option> 
     3013              <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
     3014                <xsl:variable name="subColor" select="."/> 
     3015                <option value="{$subColor}" class="{$subColor}"> 
     3016                  <xsl:value-of select="."/> 
     3017                </option> 
     3018              </xsl:for-each> 
     3019            </select> 
    29993020          </td> 
    30003021        </tr> 
     
    30293050          <td> 
    30303051            <xsl:variable name="subName" select="name"/> 
    3031             <input type="text" value="{$subName}" name="subscription.name" size="60"/> 
     3052            <input type="text" value="{$subName}" name="name" size="60"/> 
    30323053          </td> 
    30333054        </tr> 
     
    30363057            <td class="fieldname">Uri:</td> 
    30373058            <td> 
    3038               <xsl:variable name="subUri" select="uri"/> 
    3039               <input type="text" value="{$subUri}" name="subscription.uri" size="60"/> 
     3059              <xsl:variable name="calPath" select="uri"/> 
     3060              <input type="text" value="{$calPath}" name="calPath" size="60"/> 
    30403061            </td> 
    30413062          </tr> 
     
    30513072          <td class="fieldname">Affects Free/Busy:</td> 
    30523073          <td> 
    3053             <input type="radio" value="true" name="subscription.affectsFreeBusy" checked="checked"/> yes 
    3054             <input type="radio" value="false" name="subscription.affectsFreeBusy"/> no 
     3074            <input type="radio" value="true" name="subscription.affectsFreeBusy"/> yes 
     3075            <input type="radio" value="false" name="subscription.affectsFreeBusy" checked="checked"/> no 
    30553076          </td> 
    30563077        </tr> 
     
    30583079          <td class="fieldname">Style:</td> 
    30593080          <td> 
    3060             <xsl:variable name="subStyle" select="style"/> 
    3061             <input type="text" value="{$subStyle}" name="subscription.style" size="60"/> 
     3081            <select name="subscription.style"> 
     3082              <option value="default">default</option> 
     3083              <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
     3084                <xsl:variable name="subColor" select="."/> 
     3085                <option value="{$subColor}" class="{$subColor}"> 
     3086                  <xsl:value-of select="."/> 
     3087                </option> 
     3088              </xsl:for-each> 
     3089            </select> 
    30623090          </td> 
    30633091        </tr> 
     
    30653093          <td class="fieldname">Unremovable:</td> 
    30663094          <td> 
    3067             <input type="radio" value="true" name="unremoveable" size="60"/> true 
    3068             <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false 
     3095            <input type="radio" value="true" name="subscription.unremoveable" size="60"/> true 
     3096            <input type="radio" value="false" name="subscription.unremoveable" size="60" checked="checked"/> false 
    30693097          </td> 
    30703098        </tr>--> 
     
    31473175          <td> 
    31483176            <xsl:variable name="subStyle" select="style"/> 
    3149             <input type="text" value="{$subStyle}" name="subscription.style" size="60"/> 
     3177            <select name="subscription.style"> 
     3178              <option value="default">default</option> 
     3179              <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
     3180                <xsl:variable name="subColor" select="."/> 
     3181                <xsl:choose> 
     3182                  <xsl:when test="$subStyle = $subColor"> 
     3183                    <option value="{$subColor}" class="{$subColor}" selected="selected"> 
     3184                      <xsl:value-of select="."/> 
     3185                    </option> 
     3186                  </xsl:when> 
     3187                  <xsl:otherwise> 
     3188                    <option value="{$subColor}" class="{$subColor}"> 
     3189                      <xsl:value-of select="."/> 
     3190                    </option> 
     3191                  </xsl:otherwise> 
     3192                </xsl:choose> 
     3193              </xsl:for-each> 
     3194            </select> 
    31503195          </td> 
    31513196        </tr> 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/subs/InitSubscribeAction.java

    r553 r554  
    155155    } 
    156156 
    157     String style = getReqPar(request, "style"); 
    158     if (style != null) { 
    159       sub.setStyle(style); 
    160     } 
    161  
    162157    form.setSubscription(sub); 
    163158