|
[HepData-svn] r1733 - in trunk/hepdata-webapp/src/main: java/cedar/hepdata/webapp/components resources/cedar/hepdata/webapp/pages webappblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Jan 16 14:13:33 GMT 2014
Author: whalley Date: Thu Jan 16 14:13:33 2014 New Revision: 1733 Log: rearranging the table header positions Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml trunk/hepdata-webapp/src/main/webapp/hepdata.css Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Mon Jan 13 15:20:08 2014 (r1732) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Thu Jan 16 14:13:33 2014 (r1733) @@ -247,17 +247,24 @@ writer.element("tr"); writer.element("td"); writer.attributes("colspan", nx); - if(store[0][i].startsWith("RE")){ - writer.element("a"); - writer.attributes("href","/h3test/ReactionHelp"); - writer.attributes("onClick","return popitup(this)"); - writer.attributes("title","click for more help on this reaction"); - writer.writeRaw("?=>"); - writer.end(); + writer.attributes("class","xqualifier"); + if(store[0][i].indexOf(" : ")>-1){ + writer.write(store[0][i].substring(0,store[0][i].indexOf(" : "))); } else{ - writer.writeRaw(" "); + // writer.write(store[0][i]); } +// if(store[0][i].startsWith("RE")){ +// writer.element("a"); +// writer.attributes("href","/h3test/ReactionHelp"); +// writer.attributes("onClick","return popitup(this)"); +// writer.attributes("title","click for more help on this reaction"); +// writer.writeRaw("?=>"); +// writer.end(); +// } +// else{ +// writer.writeRaw(" "); +// } writer.end(); // this is the actual output @@ -278,7 +285,12 @@ writer.element("th"); writer.attributes("colspan",ny); writer.attributes("class","multiple qualifier_class"); - writer.write(store[0][i]); + if(store[0][i].indexOf(" : ")>-1) { + writer.write(store[0][i].substring(store[0][i].indexOf(" : ")+2)); + } + else{ + writer.write(store[0][i]); + } writer.end(); } else { int ii=0; @@ -289,7 +301,14 @@ if(store[nmy][i] != null) { if(nmy>0){ writer.write( store[nmy][i].substring(ii+1)); } // if(nmy<0){ writer.write( store[nmy][i].substring(ii+1)); } - else { writer.write( store[nmy][i]); } + else { + if(store[nmy][i].indexOf(" : ")>-1) { + writer.write( store[nmy][i].substring(store[nmy][i].indexOf(" : ")+2)); + } + else{ + writer.write( store[nmy][i]); + } + } } writer.end(); } 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 Mon Jan 13 15:20:08 2014 (r1732) +++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml Thu Jan 16 14:13:33 2014 (r1733) @@ -9,6 +9,15 @@ } </style> +<script> +function docwrite(x) +{ + document.write(x); +} +</script> +<!-- +<script type="text/javascript" src="http://hepdata.cedar.ac.uk/resource/HEPjax_test.js"></script> +--> <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"> Modified: trunk/hepdata-webapp/src/main/webapp/hepdata.css ============================================================================== --- trunk/hepdata-webapp/src/main/webapp/hepdata.css Mon Jan 13 15:20:08 2014 (r1732) +++ trunk/hepdata-webapp/src/main/webapp/hepdata.css Thu Jan 16 14:13:33 2014 (r1733) @@ -194,7 +194,7 @@ table.dataset tr.xyheaders th { border-bottom: 1.5px solid #ccc; - text-align: left; + text-align: center; } table.dataset tr.axisproperties th @@ -204,11 +204,19 @@ table.dataset th.multiple { - text-align:center; + text-align:left; background: #eee; border-bottom: 1.5px solid #ccc; } +table.dataset td.xqualifier +{ + text-align:right; + font-weight:bold; + background: #ddd; + border-bottom: 1.5px solid #ccc; +} + table.dataset td.multiple { text-align:center;
More information about the HepData-svn mailing list |