Changeset 2117

Show
Ignore:
Timestamp:
04/05/09 02:00:20
Author:
johnsa
Message:

user client:

- upgraded jquery
- created color widget dialog
public client:
- put "all calendars" listing in order on dept calsuite

Files:

Legend:

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

    r2057 r2117  
    12691269  <!-- list of available calendars --> 
    12701270  <xsl:template match="calendars"> 
    1271     <xsl:variable name="topLevelCalCount" select="count(calendar/calendar)"/> 
     1271    <xsl:variable name="topLevelCalCount" select="count(calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3])"/> 
    12721272    <table id="calPageTable" border="0" cellpadding="0" cellspacing="0"> 
    12731273      <tr> 
     
    12811281            Select a calendar from the list below to see only that calendar's events. 
    12821282          </p> 
    1283           <!-- Uncomment this block, and change the links on the download calendar 
    1284                icon (in the following template) to use a dojo floating 
    1285                widget instead of a separate page 
    1286                for downloading whole calendars (this method does not work 
    1287                portal-agnostically: it is not intended for use in portals). 
    1288  
    1289           <div dojoType="FloatingPane" id="bwCalendarExportWidget" 
    1290                title="Export Calendar as iCal" toggle="plain" 
    1291                windowState="minimized" hasShadow="true" 
    1292                displayMinimizeAction="true" resizable="false"> 
    1293              <p> 
    1294               <strong>Calendar to export:</strong> 
    1295               <span id="bwCalendarExportWidgetCalName"></span> 
    1296             </p> 
    1297             <strong>Event date limits:</strong> 
    1298             <form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post"> 
    1299               <input type="hidden" name="calPath" value=""/> 
    1300               <input type="hidden" name="eventStartDate.year" value=""/> 
    1301               <input type="hidden" name="eventStartDate.month" value=""/> 
    1302               <input type="hidden" name="eventStartDate.day" value=""/> 
    1303               <input type="hidden" name="eventEndDate.year" value=""/> 
    1304               <input type="hidden" name="eventEndDate.month" value=""/> 
    1305               <input type="hidden" name="eventEndDate.day" value=""/> 
    1306               <input type="hidden" name="nocache" value="no"/> 
    1307               <input type="hidden" name="skinName" value="ical"/> 
    1308               <input type="hidden" name="contentName" value="calendar.ics"/> 
    1309               <input type="radio" name="dateLimits" value="active" checked="checked" onclick="changeClass('exportDateRange','invisible')"/> today forward 
    1310               <input type="radio" name="dateLimits" value="none" onclick="changeClass('exportDateRange','invisible')"/> all dates 
    1311               <input type="radio" name="dateLimits" value="limited" onclick="changeClass('exportDateRange','visible')"/> date range 
    1312               <div id="exportDateRange" class="invisible"> 
    1313                 Start: <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetStartDate"><xsl:text> </xsl:text></div> 
    1314                 End: <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetEndDate"><xsl:text> </xsl:text></div> 
    1315               </div> 
    1316               <p><input type="submit" value="export" class="bwWidgetSubmit" onclick="fillExportFields(this.form);hideWidget('bwCalendarExportWidget')"/></p> 
    1317             </form> 
    1318           </div>--> 
    13191283        </td> 
    13201284      </tr> 
     
    13221286        <td class="leftCell"> 
    13231287          <ul class="calendarTree"> 
    1324             <xsl:apply-templates select="calendar/calendar[position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
     1288            <xsl:apply-templates select="calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3 and position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
    13251289          </ul> 
    13261290        </td> 
    13271291        <td> 
    13281292          <ul class="calendarTree"> 
    1329             <xsl:apply-templates select="calendar/calendar[position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
     1293            <xsl:apply-templates select="calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3 and position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
    13301294          </ul> 
    13311295        </td> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css

    r2110 r2117  
    10011001  visibility: hidden; 
    10021002} 
     1003#bedework .clear  { 
     1004  clear: both; 
     1005} 
    10031006#bedework .bwEventImage { 
    10041007  float: right; 
     
    10591062  margin: 0; 
    10601063  padding: 0; 
     1064} 
     1065#bwColorPickerButton { 
     1066  width: 28px; 
    10611067} 
    10621068#bedework table.widget { 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r2115 r2117  
    402402         losing the script closing tags (which avoids browser problems) --> 
    403403    <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    404     <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.2.6.min.js">&#160;</script> 
    405     <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.5.2.min.js">&#160;</script> 
    406     <link rel="stylesheet" href="/bedework-common/javascript/jquery/bedeworkJqueryThemes.css"/> 
     404    <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.3.2.min.js">&#160;</script> 
     405    <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.7.1.custom.min.js">&#160;</script> 
     406    <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/> 
    407407 
    408408    <xsl:if test="/bedework/page='modSchedulingPrefs' or 
     
    19281928                </xsl:when> 
    19291929                <xsl:otherwise> 
    1930                   Local time 
     1930                  <xsl:value-of select="/bedework/now/defaultTzid"/> 
    19311931                </xsl:otherwise> 
    19321932              </xsl:choose> 
     
    45294529        <xsl:choose> 
    45304530          <xsl:when test="/bedework/selectionState/selectionType = 'collections' 
    4531                           and name = /bedework/selectionState/collection/name">selected</xsl:when> 
     4531                          and path = /bedework/selectionState/collection/path">selected</xsl:when> 
    45324532          <xsl:when test="isSubscription = 'true'"> 
    45334533            <xsl:choose> 
     
    48844884          <th>Color:</th> 
    48854885          <td> 
    4886             <input type="text" name="calendar.color" value="" size="40"/> 
     4886            <input type="text" name="calendar.color" id="bwCalColor" value="" size="7"/> 
     4887            <xsl:call-template name="colorPicker"> 
     4888              <xsl:with-param name="colorFieldId">bwCalColor</xsl:with-param> 
     4889            </xsl:call-template> 
    48874890            <!-- select name="calendar.color"> 
    48884891              <option value="">default</option> 
     
    51035106          <th>Color:</th> 
    51045107          <td> 
    5105             <input type="text" name="calendar.color" size="7"> 
     5108            <input type="text" name="calendar.color" id="bwCalColor" size="7"> 
    51065109              <xsl:attribute name="value"><xsl:value-of select="color"/></xsl:attribute> 
    51075110              <xsl:attribute name="style">background-color: <xsl:value-of select="color"/>;color: black;</xsl:attribute> 
    51085111            </input> 
     5112            <xsl:call-template name="colorPicker"> 
     5113              <xsl:with-param name="colorFieldId">bwCalColor</xsl:with-param> 
     5114            </xsl:call-template> 
    51095115          </td> 
    51105116        </tr> 
     
    52525258      </form> 
    52535259    </div --> 
     5260  </xsl:template> 
     5261 
     5262  <xsl:template name="colorPicker"> 
     5263    <xsl:param name="colorFieldId"/><!-- required: id of text field to be updated --> 
     5264    <script type="text/javascript"> 
     5265      $.ui.dialog.defaults.bgiframe = true; 
     5266      $(function() { 
     5267        $("#bwColorPicker").dialog({ autoOpen: false, width: 214 }); 
     5268      }); 
     5269      $(function() { 
     5270        $('#bwColorPickerButton').click(function() { 
     5271          $('#bwColorPicker').dialog('open'); 
     5272        }); 
     5273      }); 
     5274    </script> 
     5275    <button type="button" id="bwColorPickerButton" value="pick"><img src="{$resourcesRoot}/resources/colorIcon.gif" width="16" height="13" alt="pick a color"/></button> 
     5276 
     5277    <div id="bwColorPicker" title="Select a color"> 
     5278      <xsl:for-each select="document('../../../bedework-common/default/default/subColors.xml')/subscriptionColors/color"> 
     5279        <xsl:variable name="color" select="."/> 
     5280        <xsl:variable name="colorName" select="@name"/> 
     5281        <a href="javascript:bwUpdateColor('{$color}','{$colorFieldId}')" 
     5282           style="display:block;float:left;background-color:{$color};color:black;width=25px;height=25px;margin:0;padding:0;" 
     5283           title="{$colorName}" 
     5284           onclick="$('#bwColorPicker').dialog('close');"> 
     5285          <img src="{$resourcesRoot}/resources/spacer.gif" width="25" height="25" style="border:1px solid #333;margin:0;padding:0;" alt="{$colorName}"/> 
     5286        </a> 
     5287        <xsl:if test="position() mod 6 = 0"><br style="clear:both;"/></xsl:if> 
     5288      </xsl:for-each> 
     5289      <p><a href="javascript:bwUpdateColor('','{$colorFieldId}')" onclick="$('#bwColorPicker').dialog('close');">use default colors</a></p> 
     5290    </div> 
    52545291  </xsl:template> 
    52555292 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js

    r2112 r2117  
    287287  calDisplayFlag.value = val; 
    288288} 
     289function launchBwColorPicker() { 
     290  $.ui.dialog.defaults.bgiframe = true; 
     291  $(function() { 
     292    $("#bwColorPicker").dialog(); 
     293  }); 
     294} 
     295function bwUpdateColor(color,colorFieldId) { 
     296  var colorField = document.getElementById(colorFieldId); 
     297  colorField.value = color; 
     298  colorField.style.backgroundColor = color; 
     299}