Project

General

Profile

« Previous | Next » 

Revision 5723

lookup the annotation details for each column in the data table

View differences:

lib/style/shared/eml-2/eml-attribute.xsl
35 35
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36 36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37 37
              indent="yes" />  
38
              
39
<xsl:param name="annotationId"/>              
38 40

  
39 41
<xsl:template name="attributelist">
40 42
   <xsl:param name="docid"/>
......
141 143
     </xsl:choose>
142 144
   </xsl:for-each>
143 145
  </tr>
144

  
146
  
147
  <!--another row for Semantics -->
148
  <xsl:if test="$annotationId != ''">
149
	  <tr><th class="rowodd">Measurement</th>
150
	  <xsl:for-each select="attribute">
151
	  	<xsl:variable name="stripes">
152
	              <xsl:choose>
153
	                <xsl:when test="position() mod 2 = 1"><xsl:value-of select="$coloddStyle"/></xsl:when>
154
	                <xsl:when test="position() mod 2 = 0"><xsl:value-of select="$colevenStyle"/></xsl:when>
155
	              </xsl:choose>
156
	      </xsl:variable>
157
	    <xsl:choose>
158
	         <xsl:when test="references!=''">
159
	          <xsl:variable name="ref_id" select="references"/>
160
	          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
161
	          <xsl:for-each select="$references">
162
	            <td class="{$stripes}">
163
	            	(Ref) Loading information for: <xsl:value-of select="attributeName"/>
164
	            </td>
165
	          </xsl:for-each>
166
	        </xsl:when>
167
	        <xsl:otherwise>
168
	          <td class="{$stripes}">
169
	          	<div>
170
	            		<xsl:attribute name="id">
171
	            			<xsl:value-of select="attributeName"/>
172
	            		</xsl:attribute>
173
	            		Loading information for: <xsl:value-of select="attributeName"/>
174
	            	</div>
175
	            	<script language="JavaScript">
176
            			var params = 
177
						{
178
							'action': 'read',
179
							'docid': '<xsl:value-of select="$annotationId" />',
180
							'qformat': '<xsl:value-of select="$qformat" />',
181
							'attributeLabel': '<xsl:value-of select="attributeName" />'
182
						};
183
						load(
184
							'<xsl:value-of select="$contextURL" />/metacat',
185
							params, 
186
							'<xsl:value-of select="attributeName" />');
187
					</script>
188
	          </td>
189
	        </xsl:otherwise>
190
	     </xsl:choose>
191
	  </xsl:for-each>
192
	  </tr>
193
	</xsl:if>
194
	
145 195
  <!-- Third row for attribute defination-->
146 196
  <tr><th class="rowodd">Definition</th>
147 197
    <xsl:for-each select="attribute">
lib/style/common/branding.js
289 289
* This uses jQuery to load access log information
290 290
**/
291 291
function loadStats(divId, docId, url, qformat) {
292
	var params = 
293
	{
294
		'action': "getlog",
295
		'docid': docId,
296
		'qformat': qformat
297
	};
298
	load(url, params, divId);
299
}
300
/**
301
* This uses jQuery to call any Metacat method with the given params
302
**/
303
function load(url, params, divId) {
292 304
	try {
293 305
		$("#" + divId).load(
294 306
			url, 
295
			{
296
				'action': "getlog",
297
				'docid': docId,
298
				'qformat': qformat
299
			},
307
			params,
300 308
			// call back function when loading finishes
301 309
			function(response, status, xhr) {
302 310
				//alert("callback for: " + divId + " selected node: " + selectedNodeId);

Also available in: Unified diff