|
[HepData-svn] r1734 - in trunk/hepdata-webapp/src/main: java/cedar/hepdata/webapp/components webappblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Jan 16 15:28:20 GMT 2014
Author: whalley Date: Thu Jan 16 15:28:20 2014 New Revision: 1734 Log: more tweaks for display format Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java 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 Thu Jan 16 14:13:33 2014 (r1733) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Thu Jan 16 15:28:20 2014 (r1734) @@ -247,7 +247,8 @@ writer.element("tr"); writer.element("td"); writer.attributes("colspan", nx); - writer.attributes("class","xqualifier"); + if(i==nprop+ncomm-1) { writer.attributes("class","xqualifier_last");} + else { writer.attributes("class","xqualifier"); } if(store[0][i].indexOf(" : ")>-1){ writer.write(store[0][i].substring(0,store[0][i].indexOf(" : "))); } @@ -284,6 +285,8 @@ if(same) { writer.element("th"); writer.attributes("colspan",ny); + if(i==nprop+ncomm-1) { writer.attributes("class","multiple qualifier_class"); } + else { writer.attributes("class","multiple_not_last qualifier_class"); } writer.attributes("class","multiple qualifier_class"); if(store[0][i].indexOf(" : ")>-1) { writer.write(store[0][i].substring(store[0][i].indexOf(" : ")+2)); @@ -297,7 +300,8 @@ if(store[0][i].indexOf(":")>0) { ii = store[0][i].indexOf(":"); } for (int nmy=0; nmy<ny; nmy++){ writer.element("th"); - writer.attributes("class","multiple qualifier_class"); + if(i==nprop+ncomm-1) { writer.attributes("class","multiple qualifier_class"); } + else { writer.attributes("class","multiple_not_last qualifier_class"); } 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)); } @@ -361,19 +365,17 @@ writer.write("No data is encoded for this table"); writer.end(); } - writer.element("tr"); - writer.element("td"); - writer.attributes("colspan",nx+ny); - writer.end(); - writer.element("img"); -// writer.attributes("src","/assets/ctx/7c9b7bf73fa713d8/new.gif"); - writer.attributes("src",button_hide.toClientURL()); -// writer.attributes("onclick","ExpandClicked(this,'/assets/ctx/7c9b7bf73fa713d8/bullet.gif','/assets/ctx/7c9b7bf73fa713d8/bullet.gif');"); - String hide = button_hide.toClientURL(); - String expand = button_expand.toClientURL(); - writer.attributes("onclick","ExpandClicked(this,'"+expand+"','"+hide+"');"); - writer.end(); - writer.end(); + // writer.element("tr"); + // writer.element("td"); + // writer.attributes("colspan",nx+ny); + // writer.end(); + // writer.element("img"); + // writer.attributes("src",button_hide.toClientURL()); + // String hide = button_hide.toClientURL(); + // String expand = button_expand.toClientURL(); + // writer.attributes("onclick","ExpandClicked(this,'"+expand+"','"+hide+"');"); + // writer.end(); + // writer.end(); // if (getFormat().equals("full") && _dataset.getNumPoints() != 0) { if ( _dataset.getNumPoints() != 0) { @@ -428,7 +430,8 @@ Double low = null; Bin b = x.getBin(ip); writer.element("td"); - writer.attributes("class", "xval"); + if(ip == npoints) { writer.attributes("class", "xval_last"); } + else { writer.attributes("class", "xval"); } if (b != null) { if (b.getDescription() == null){ if (b.getRelation() == Relation.EQUALS) { @@ -534,7 +537,8 @@ YAxis y = _dataset.getYAxis(iy); Point pt2 = y.getPoint(ip); writer.element("td"); - writer.attributes("class", "yval"); + if(ip == npoints) { writer.attributes("class", "yval_last"); } + else { writer.attributes("class", "yval"); } try { /// DON'T MODIFY ANY OF THIS AT THE MOMENT: I'M MOVING THE FORMATTING TO AN EXTERNAL CLASS! if (pt2.getRelation() != Relation.EQUALS) { Modified: trunk/hepdata-webapp/src/main/webapp/hepdata.css ============================================================================== --- trunk/hepdata-webapp/src/main/webapp/hepdata.css Thu Jan 16 14:13:33 2014 (r1733) +++ trunk/hepdata-webapp/src/main/webapp/hepdata.css Thu Jan 16 15:28:20 2014 (r1734) @@ -190,11 +190,29 @@ { text-align: left; } +table.dataset td.yval_last +{ + text-align: left; + border-bottom: 1.5px solid #ccc; +} + +table.dataset td.xval +{ + text-align: right; + border-right: 1.5px solid #ccc; +} +table.dataset td.xval_last +{ + text-align: right; + border-right: 1.5px solid #ccc; + border-bottom: 1.5px solid #ccc; +} table.dataset tr.xyheaders th { border-bottom: 1.5px solid #ccc; - text-align: center; + border-right: 1.5px solid #ccc; + text-align: center; } table.dataset tr.axisproperties th @@ -209,13 +227,25 @@ border-bottom: 1.5px solid #ccc; } -table.dataset td.xqualifier +table.dataset th.multiple_not_last +{ + text-align:left; + background: #eee; +} + +table.dataset td.xqualifier_last { text-align:right; font-weight:bold; background: #ddd; border-bottom: 1.5px solid #ccc; } +table.dataset td.xqualifier +{ + text-align:right; + font-weight:bold; + background: #ddd; +} table.dataset td.multiple { @@ -224,6 +254,12 @@ border-bottom: 1.5px solid #ccc; } +table.dataset td.multiple_not_last +{ + text-align:center; + background: #eee; +} + .credits {
More information about the HepData-svn mailing list |