Changeset 3439

Show
Ignore:
Timestamp:
12/06/11 14:48:27
Author:
johnsa
Message:

public client: more work on subscriptions tree widget in the bedework theme (as set in the theme settings)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme/calendarList.xsl

    r2995 r3439  
    5858      <xsl:variable name="calPath" select="path"/> 
    5959      <xsl:variable name="displayName" select="summary"/> 
    60       <a href="{$setSelection}&amp;virtualPath={$virtualPath}&amp;setappvar=curCollection({$displayName})" title="view calendar"> 
     60      <a href="{$setSelection}&amp;virtualPath={$virtualPath}&amp;setappvar=curCollection({$displayName})&amp;setappvar=curPath({$calPath})" title="view calendar"> 
    6161        <xsl:value-of select="summary"/> 
    6262      </a> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme/css/bwTheme.css

    r3431 r3439  
    432432#subsTree { 
    433433        margin: 1em 0 0 1em; 
     434        font-size: 14px; 
    434435} 
    435436#subsTree ul li li { 
    436         margin: 0 0 0 2em; 
     437        margin: 0 0 0 20px; 
     438
     439#subsTree li.hasChildren { 
     440  margin: 0 0 0 10px; 
     441
     442#subsTree li.selected { 
     443  font-weight: bold; 
     444
     445#subsTree li.closed ul { 
     446  display: none; 
     447
     448#subsTree a { 
     449        color: #335080; 
     450
     451#subsTree a:hover { 
     452  color: #DDB500; 
     453
     454#subsTree .subsTreeToggle { 
     455        display: block; 
     456        float: left; 
     457        width: 10px; 
     458        height: 10px; 
     459        text-align: center; 
     460        vertical-align: middle; 
     461        cursor: pointer; 
    437462} 
    438463ul.sideLinksExpand { 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme/javascript/bedework.js

    r3431 r3439  
    5858// Using the subscriptions tree for navigation (as defined in themeSettings.xsl). 
    5959// Get them and load them onto the page. 
    60 function loadSubscriptions(containerId) { 
    61   $.getJSON('/feeder/calendar/fetchPublicCalendars.do?skinName=widget-json-cals', function(data) { 
    62     var subsTree = '<ul>' + buildSubsTree(data.bwCals.calendars) + '</ul>'; 
     60function loadSubscriptions(containerId,setSelectionAction,curPath) { 
     61  var feederUrl = '/feeder/calendar/fetchPublicCalendars.do?skinName=widget-json-cals&setappvar=setSelectionAction(' + setSelectionAction + ')';  
     62  $.getJSON(feederUrl, function(data) { 
     63    var subsTree = '<ul>' + buildSubsTree(data.bwCals.calendars,true,curPath) + '</ul>'; 
    6364    $(containerId).html(subsTree); 
     65    $("#subsTree .subsTreeToggle").click(function() { 
     66      $(this).parent("li").children("ul").toggle("fast"); 
     67    }); 
    6468  }); 
    6569} 
    66 function buildSubsTree(calObj) { 
     70function buildSubsTree(calObj,isRoot,curPath) { 
    6771  var subsTreeHtml = ""; 
     72   
    6873  $.each(calObj,function(i) { 
    6974    if (this.calType < 2) { // show only calendars and folders 
    70       subsTreeHtml += "<li>" + this.name; 
     75      if (isRoot) { 
     76        subsTreeHtml += '<li><a href="' + this.calendarLink + '">All</a>'; 
     77      } else { 
     78        // build the child tree 
     79        if(this.children != undefined) { 
     80          //alert(curPath + "\n" + decodeURI(this.virtualPath) + "\n" + curPath.indexOf(decodeURI(this.virtualPath))); 
     81          // see if we have the selected item 
     82          var itemClass = ""; 
     83          if (curPath == decodeURI(this.virtualPath)) { 
     84            itemClass = ' class="hasChildren selected open"'; 
     85          } else if (curPath.indexOf(decodeURI(this.virtualPath)) > -1) { 
     86            itemClass = ' class="hasChildren selectedPath open"'; 
     87          } else { 
     88            itemClass = ' class="hasChildren closed"'; 
     89          } 
     90          subsTreeHtml += '<li'+ itemClass +'><span class="subsTreeToggle">+</span>'; 
     91        } else { 
     92          var itemClass = ""; 
     93          if (curPath == decodeURI(this.virtualPath)) { 
     94            itemClass = ' class="selected"'; 
     95          } 
     96          subsTreeHtml += '<li'+ itemClass +'>'; 
     97        } 
     98        subsTreeHtml += '<a href="' + this.calendarLink + '">' + this.name + '</a>'; 
     99      } 
    71100      if(this.children != undefined) { 
    72101        subsTreeHtml += "<ul>"; 
    73         subsTreeHtml += buildSubsTree(this.children); 
     102        subsTreeHtml += buildSubsTree(this.children,false,curPath); 
    74103        subsTreeHtml += "</ul>"; 
    75104      } 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme/subscriptions.xsl

    r3431 r3439  
    3232            $(document).ready(function(){ 
    3333              // get the subscriptions/calendars and load them into the tree 
    34               loadSubscriptions("#subsTree"); 
     34              loadSubscriptions("#subsTree","<xsl:value-of select="$setSelection"/>","<xsl:value-of select="/bedework/selectionState/collection/virtualpath"/>"); 
    3535            }); 
    3636          </script> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme/themeSettings.xsl

    r3433 r3439  
    294294 
    295295  <!-- NOT YET ENABLED --> 
    296   <!-- the following features did not make the 3.6 release, and are here 
     296  <!-- the following features did not make the 3.8 release, and are here 
    297297       for reference --> 
    298298 
     
    308308   <!-- <xsl:variable name="deadlinesAlwaysDisplayed">true</xsl:variable> --> 
    309309 
    310  
    311   <!-- VIEW HIERARCHY --> 
    312   <!-- force views into a heirarchy? --> 
    313   <!-- <xsl:variable name="childViewsEnabled">true</xsl:variable> --> 
    314  
    315310  <!-- FOR ONGOING EVENTS --> 
    316   <!-- pull events longer than day range into ongoing list? --> 
     311  <!-- pull normal events that are longer than day range into ongoing list? --> 
     312  <!-- (this automates the use of ongoing - tagging not needed) --> 
    317313  <!-- <xsl:variable name="ongoingEventsUseDayRange">false</xsl:variable> --> 
    318314  <!-- <xsl:variable name="ongoingEventsDayRange">12</xsl:variable> -->