Changeset 2465

Show
Ignore:
Timestamp:
12/11/09 18:33:15
Author:
bleibson
Message:

o Fixed some problems with the json produced by this skin. It needed more arrays and fewer sets.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/feeder/webapp/resources/demoskins/MainCampus/default/default/grid-json.xsl

    r2422 r2465  
    44   
    55  <!-- ********************************************************************** 
    6     Copyright 2008 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
     6    Copyright 2009 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
    77 
    88    Redistribution and use of this distribution in source and binary forms, 
     
    122122              "longname" : "<xsl:value-of select='longname'/>", 
    123123              "shortname" : "<xsl:value-of select='shortname'/>", 
     124              "weeks" : [ 
    124125          <xsl:apply-templates select="week" /> 
     126          ] 
    125127        }<xsl:if test="position() != last()">,</xsl:if> 
    126128  </xsl:template> 
    127129 
    128130  <xsl:template match="week"> 
    129               "week":
     131             
    130132                "value" : "<xsl:value-of select='value'/>", 
    131                 <xsl:apply-templates select="day" /> 
     133                "days" : [ 
     134                   <xsl:apply-templates select="day" /> 
     135                ] 
    132136              }<xsl:if test="position() != last()">,</xsl:if> 
    133137  </xsl:template> 
    134138   
    135   
    136  
    137139  <xsl:template match="day"> 
    138                 "day":
     140               
    139141                  <xsl:choose> 
    140142                        <xsl:when test="filler = 'true'"> 
     
    147149                  "date" : "<xsl:value-of select='date'/>", 
    148150                  "longdate" : "<xsl:value-of select='longdate'/>", 
    149                   "shortdate" : "<xsl:value-of select='shortdate'/>" 
     151                  "shortdate" : "<xsl:value-of select='shortdate'/>", 
     152                  "events" : [ 
    150153                      <xsl:choose> 
    151154                            <xsl:when test="/bedework/appvar/key = 'filter'"> 
     
    167170                            </xsl:otherwise> 
    168171                          </xsl:choose> 
     172                          ] 
    169173                        </xsl:otherwise> 
    170174                      </xsl:choose> 
     
    200204    <xsl:variable name="strippedLocAddress" select='translate($aposStrippedLocAddress,"&#xA;"," ")'/> 
    201205    <!-- finally, produce the JSON output --> 
    202                   , "event":
     206                 
    203207                    "summary" : "<xsl:value-of select="$strippedSummary"/>", 
    204208                    "subscriptionId" : "<xsl:value-of select="subscription/id"/>",