[HepData-svn] r1517 - trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Mar 13 16:31:03 GMT 2012


Author: whalley
Date: Tue Mar 13 16:31:03 2012
New Revision: 1517

Log:
adding expand/hide script/javascript

Modified:
   trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml

Modified: trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml
==============================================================================
--- trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml	Tue Mar 13 15:22:15 2012	(r1516)
+++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml	Tue Mar 13 16:31:03 2012	(r1517)
@@ -1,6 +1,41 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
 
+<head>
+
+<style type="text/css">
+.hidden{
+ display: none;
+}
+</style>
+
+<script type="text/javascript" src="http://hepdata.cedar.ac.uk/resource/HEPjax.js"></script>
+<script type="text/javascript"
+    src="http://hepdata.cedar.ac.uk/resource/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+
+<script type="text/javascript">
+function ExpandClicked(dom_element, expanded_url, expand_url){
+  var startingPoint = dom_element.parentNode.parentNode.nextSibling;
+ 
+  dom_element.src = (dom_element.src.indexOf(expanded_url) != -1) ? expand_url: expanded_url;
+
+  while (startingPoint){
+    if (startingPoint.className.indexOf("hidden") != -1){
+      startingPoint.className = "";
+    } else {
+      startingPoint.className += " hidden";
+    }
+    startingPoint = startingPoint.nextSibling;
+  }
+
+}
+</script>
+
+</head>
+
+<body onLoad="replaceHEP('qualifier_class','observable_class','http://hepdata.cedar.ac.uk/resource/dictionary');">
+
 <t:if test="longFormat">
     <h2> Reaction Database Full Record Display</h2>
     View
@@ -195,8 +230,11 @@
   <p class="permalinks">
     Permalinks: 
     <a href="#" t:type="pagelink" t:page="view" t:context="hdpaperContext">by HepData ID</a> |
-    <a href="#" t:type="pagelink" t:page="view" t:context="spiresContext">by Spires ID</a>
+    <a href="#" t:type="pagelink" t:page="view" t:context="spiresContext">by Spires ID</a> | 
+    <a href="#" t:type="pagelink" t:page="view" t:context="InspireContext">by Inspire ID</a>
     <br/>
    (Reaction db ID=${paper.id}, RED=${paper.redid})
   </p>
+
+</body>
 </html>


More information about the HepData-svn mailing list