Changeset 450

Show
Ignore:
Timestamp:
05/04/06 17:29:15
Author:
johnsa
Message:

Updates to user preferences in user client

Files:

Legend:

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

    r449 r450  
    241241                  /bedework/page='editEvent' or 
    242242                  /bedework/page='selectCalForEvent' or 
    243                   /bedework/page='upload'"> 
     243                  /bedework/page='upload' or 
     244                  /bedework/page='modPrefs'"> 
    244245      <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
    245246    </xsl:if> 
    246247    <xsl:if test="/bedework/page='addEvent' or 
    247                   /bedework/page='editEvent' or 
    248                   /bedework/page='modPrefs'"> 
     248                  /bedework/page='editEvent'"> 
    249249      <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js"></script> 
    250250      <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
     
    13351335              </xsl:choose> 
    13361336            </span> 
    1337             <a href="javascript:launchSimpleWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
     1337            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
    13381338          </td> 
    13391339        </tr> 
     
    17241724              </xsl:choose> 
    17251725            </span> 
    1726             <a href="javascript:launchSimpleWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
     1726            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
    17271727          </td> 
    17281728        </tr> 
     
    20452045 
    20462046  <xsl:template match="event" mode="addEventRef"> 
     2047  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
     2048    change it without modifying includes.js --> 
    20472049    <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    20482050      <xsl:variable name="subscriptionId" select="subscription/id"/> 
     
    20762078              <em>default calendar</em> 
    20772079            </span> 
    2078             <a href="javascript:launchSimpleWindow('{$event-selectCalForEvent}')" class="small">[change]</a> (does not yet work) 
     2080            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> (does not yet work) 
    20792081          </td> 
    20802082        </tr> 
     
    31843186  <!--==== UPLOAD ====--> 
    31853187  <xsl:template name="upload"> 
     3188  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
     3189    change it without modifying includes.js --> 
    31863190    <form name="eventForm" method="post" action="{$upload}" id="standardForm"  enctype="multipart/form-data"> 
    31873191      <h2>Upload iCAL File</h2> 
     
    32043208              <em>default calendar</em> 
    32053209            </span> 
    3206             <a href="javascript:launchSimpleWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
     3210            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
    32073211          </td> 
    32083212        </tr> 
     
    33843388  <xsl:template match="prefs"> 
    33853389    <h2>Manage Preferences</h2> 
    3386     <form name="userPrefsForm" method="post" action="{$prefs-update}"> 
     3390    <!-- The name "eventForm" is referenced by several javascript functions. Do not 
     3391    change it without modifying includes.js --> 
     3392    <form name="eventForm" method="post" action="{$prefs-update}"> 
    33873393      <table class="common"> 
    33883394        <tr><td colspan="2" class="fill">User settings:</td></tr> 
     
    34133419          </td> 
    34143420          <td> 
    3415             <xsl:variable name="defaultCalendar" select="defaultCalendar"/> 
    3416             <select name="defaultCalendar"
    3417               <xsl:for-each select="/bedework/myCalendars/calendars//calendar[currentAccess/current-user-privilege-set/privilege/write-content and calendarCollection = 'true']"
    3418                 <xsl:variable name="calPath" select="path"/
    3419                 <xsl:choose> 
    3420                   <xsl:when test="path = $defaultCalendar"> 
    3421                     <option value="{$calPath}" selected="selected"><xsl:value-of select="path"/></option
    3422                   </xsl:when> 
    3423                   <xsl:otherwise> 
    3424                     <option value="{$calPath}"><xsl:value-of select="path"/></option
    3425                   </xsl:otherwise> 
    3426                 </xsl:choose> 
    3427               </xsl:for-each
    3428             </select
     3421            <xsl:variable name="calPath" select="defaultCalendar"/> 
     3422            <input type="hidden" name="calPath" value="{$calPath}"/
     3423            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable
     3424            <span id="bwEventCalDisplay"
     3425              <xsl:choose> 
     3426                <xsl:when test="contains(defaultCalendar,$userPath)"> 
     3427                  <xsl:value-of select="substring-after(defaultCalendar,$userPath)"/
     3428                </xsl:when> 
     3429                <xsl:otherwise> 
     3430                  <xsl:value-of select="defaultCalendar"/
     3431                </xsl:otherwise> 
     3432              </xsl:choose> 
     3433            </span
     3434            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a
    34293435          </td> 
    34303436        </tr> 
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/resources/dynCalendarWidget.js

    r393 r450  
    77* 
    88* 
    9 * Modifications for inclusion in Bedework calendar system  
    10 * by Arlen Johnson 2006  
     9* Modifications for inclusion in Bedework calendar system 
     10* by Arlen Johnson 2006 
    1111*/ 
    1212 
     
    4141                // this.month          = this.today.getMonth(); 
    4242                // this.year           = this.today.getFullYear(); 
    43      
    44     // In Bedework we will always pass the start date explicitly to the  
     43 
     44    // In Bedework we will always pass the start date explicitly to the 
    4545    // calendar widget. 
    4646                this.year           = yr; //this.today.getFullYear(); 
     
    116116                var nextMonth, nextYear, prevImgHTML, prevLinkHTML, nextImgHTML, nextLinkHTML; 
    117117                var monthComboOptions, monthCombo, yearComboOptions, yearCombo, html; 
    118                  
     118 
    119119                this.currentMonth = month = arguments[0] != null ? arguments[0] : this.currentMonth; 
    120120                this.currentYear  = year  = arguments[1] != null ? arguments[1] : this.currentYear; 
     
    159159                        previousYear--; 
    160160                } 
    161                  
     161 
    162162                nextYear  = thisMonth.getFullYear(); 
    163163                nextMonth = thisMonth.getMonth() + 1; 
     
    187187                        monthCombo = monthnames[thisMonth.getMonth()]; 
    188188                } 
    189                  
     189 
    190190                /** 
    191191        * Build year combo 
     
    276276                this.offsetY = Yoffset; 
    277277        } 
    278          
     278 
    279279/** 
    280280* Sets the images path 
     
    370370        { 
    371371                this._getLayer().style.visibility = 'hidden'; 
    372      
     372 
    373373    // for Bedework event editing; reveal time fields when cal widget is hidden 
    374374    changeClass('calWidgetStartTimeHider','shown'); 
     
    384384        { 
    385385                this._getLayer().style.visibility = 'visible'; 
    386      
     386 
    387387    // for Bedework event editing; hide time fields when cal widget is visible 
    388388    // to avoid IE rendering oddities (IE always displays the "windowed" layer 
     
    459459                                arguments[0] = null; 
    460460                        } 
    461          
     461 
    462462                        dynCalendar_oldOnmousemove(); 
    463463                } 
     
    477477                                } 
    478478                        } 
    479          
     479 
    480480                        dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null); 
    481481                } 
  • trunk/calendar3/webclient/war/docs/prefs/modPrefs.jsp

    r447 r450  
    1313  <email><bean:write name="userPrefs" property="email"/></email> 
    1414  <!-- default calendar into which events will be placed --> 
    15   <defaultCalendar><bean:write name="userPrefs" property="defaultCalendar"/></defaultCalendar> 
     15  <defaultCalendar> 
     16    <path><bean:write name="userPrefs" property="defaultCalendar.path"/></path> 
     17    <subName></subName> 
     18  </defaultCalendar> 
    1619  <!-- name of default view (collection of subscriptions) that will appear upon login --> 
    1720  <preferredView><bean:write name="userPrefs" property="preferredView"/></preferredView>