Changeset 3442
- Timestamp:
- 12/08/11 18:11:37
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme/subscriptions.xsl
r3441 r3442 37 37 <script type="text/javascript"> 38 38 $(document).ready(function(){ 39 var openCals = new Array(); 40 <xsl:if test="/bedework/appvar[key='opencals']"> 41 var openCalsRaw = "<xsl:value-of select="/bedework/appvar[key='opencals']/value"/>"; 42 openCals = openCalsRaw.split(","); 43 </xsl:if> 39 44 $("#subsTree .subsTreeToggle").click(function() { 40 $(this).parent("li").children("ul").toggle("fast"); 45 var curItem = $(this).parent("li"); 46 $(curItem).children("ul").slideToggle("fast", function(){ 47 if ($(this).is(":visible")) { 48 $(this).parent("li").children("span.subsTreeToggle").html("-"); 49 openCals.push($(curItem).attr("id")); 50 } else { 51 var itemIndex = $.inArray($(curItem).attr("id"),openCals); 52 $(this).parent("li").children("span.subsTreeToggle").html("+"); 53 openCals.splice(itemIndex,1); 54 } 55 56 $.ajax({ 57 url: '/cal/misc/async.do', 58 data: 'setappvar=opencals(' + openCals.toString() + ')', 59 dataType: 'xml' 60 }); 61 }); 62 41 63 }); 42 64 }); … … 51 73 <xsl:variable name="summary" select="summary"/> 52 74 <xsl:variable name="itemId" select="generate-id(path)"/> 53 <xsl:variable name="folderState">closed</xsl:variable> 75 <xsl:variable name="folderState"> 76 <xsl:choose> 77 <xsl:when test="contains(/bedework/appvar[key='opencals']/value,$itemId)">open</xsl:when> 78 <xsl:otherwise>closed</xsl:otherwise> 79 </xsl:choose> 80 </xsl:variable> 54 81 <li id="{$itemId}"> 55 82 <xsl:if test="calendar and not($isRoot = 'true')"> … … 61 88 </xsl:choose> 62 89 </xsl:attribute> 63 <span class="subsTreeToggle">+</span> 90 <span class="subsTreeToggle"> 91 <xsl:choose> 92 <xsl:when test="$folderState = 'closed'">+</xsl:when> 93 <xsl:otherwise>-</xsl:otherwise> 94 </xsl:choose> 95 </span> 64 96 </xsl:if> 65 97 <xsl:if test="not(calendar) and $virtualPath = $curPath">
