Changeset 522
- Timestamp:
- 02/10/11 20:10:48 (2 years ago)
- Location:
- raptor-web/trunk/src/main
- Files:
-
- 4 edited
-
java/uk/ac/cardiff/raptorweb/engine/ChartProcessor.java (modified) (2 diffs)
-
webapp/WEB-INF/flows/reports/graphicalReports.xhtml (modified) (2 diffs)
-
webapp/templates/raptor/css/common.css (modified) (1 diff)
-
webapp/templates/raptor/full.xhtml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/engine/ChartProcessor.java
r521 r522 190 190 File chartLocation = new File(getRootDirectory(user) + "/raptor-graphs-main.svg"); 191 191 File chartLocationPNG = new File(getRootDirectory(user) + "/raptor-graphs-main.png"); 192 try {193 exportChartAsSVG(chart, new Rectangle(800, 600), chartLocation);194 } catch (IOException e) {195 log.error("Could not save SVG File {}", e.getMessage());196 }197 192 198 193 // png is used for screen output … … 212 207 } 213 208 209 try { 210 exportChartAsSVG(chart, new Rectangle(800, 600), chartLocation); 211 } catch (IOException e) { 212 log.error("Could not save SVG File {}", e.getMessage()); 213 } 214 214 215 chartmodel.setChartLocation(chartLocationPNG); 215 216 chartmodel.setRelativeChartLocation(getRelativePath(chartLocationPNG)); -
raptor-web/trunk/src/main/webapp/WEB-INF/flows/reports/graphicalReports.xhtml
r521 r522 15 15 16 16 <rich:layoutPanel position="top"> 17 <a4j:form id="showForm">18 <h:panelGrid columns="4">19 <h:outputText value="Control Panel Visible" />20 <rich:spacer width="3px" />21 <a4j:commandLink reRender="showForm,ControlPanelForm,chartForm,tablePanelForm"22 value="#{flowScope.websession.graphmodel.showControlPanel}"23 action="#{flowScope.websession.graphmodel.toggleShowControlPanel}" />24 17 25 </h:panelGrid> 18 <a4j:form id="ControlPanelForm"> 19 <rich:simpleTogglePanel switchType="client" label="Control Panel" 20 opened="true"> 21 22 <rich:layout> 23 <rich:layoutPanel position="left" width="40%"> 24 25 <rich:dataTable value="#{graphService.statisticalUnits}" 26 bandingInterval="2" banding="row" var="unit" width="100%" 27 labelWidth="0%" inlineStyle="border-style: hidden;" 28 rendered="#{not empty graphService.statisticalUnits}"> 29 30 <f:facet name="header"> 31 <h:outputText 32 value="#{graphService.attachedCapabilities.muaMetadata.muaName}" /> 33 </f:facet> 34 35 36 <rich:column> 37 <f:facet name="header"> 38 <h:outputText value="Statistic" /> 39 </f:facet> 40 <a4j:commandLink value="#{unit.statisticParameters.unitName}" 41 action="invokeStatisticalUnit" 42 reRender="chartForm,graphImage"> 43 <f:setPropertyActionListener value="#{unit}" 44 target="#{flowScope.websession.graphmodel.selectedStatisticalUnit}" /> 45 </a4j:commandLink> 46 47 </rich:column> 48 49 <rich:column> 50 <f:facet name="header"> 51 <h:outputText value="Modifying" /> 52 </f:facet> 53 54 </rich:column> 55 </rich:dataTable> 56 </rich:layoutPanel> 57 58 59 60 <rich:layoutPanel position="right"> 61 <rich:panel width="100%"> 62 <f:facet name="header"> 63 Options 64 </f:facet> 65 66 </rich:panel> 67 </rich:layoutPanel> 68 69 70 </rich:layout> 71 72 </rich:simpleTogglePanel> 26 73 </a4j:form> 27 74 </rich:layoutPanel> 28 75 29 <rich:layoutPanel position="left" width="30%" > 30 31 <a4j:form id="ControlPanelForm"> 32 <rich:panel header="ControlPanel" style="width: 95%" 33 id="controlPanelPanel" 76 <!--<rich:layoutPanel position="right" width="70%"> 77 <a4j:form id="tablePanelForm"> 78 <rich:panel header="Table" style="width:100%" id="tablePanel" 34 79 rendered="#{flowScope.websession.graphmodel.showControlPanel}"> 35 80 36 <h:panelGrid border="0" columns="1" 37 rendered="#{flowScope.websession.graphmodel.showControlPanel}"> 81 </rich:panel> 38 82 39 <rich:dataTable value="#{graphService.statisticalUnits}" 40 bandingInterval="2" banding="row" var="unit" width="100%" 41 labelWidth="0%" inlineStyle="border-style: hidden;" 42 rendered="#{not empty graphService.statisticalUnits}"> 43 44 <f:facet name="header"> 45 <h:outputText 46 value="#{graphService.attachedCapabilities.muaMetadata.muaName}" /> 47 </f:facet> 83 </a4j:form> 84 </rich:layoutPanel> 48 85 86 --> 87 <rich:layoutPanel position="bottom"> 88 89 <a4j:form id="chartForm"> 90 91 <rich:tabPanel id="chartTabPanel" height="450" 92 selectedTab="#{indexAction.selectedOpleidingTab}" 93 switchType="client"> 94 <rich:tab name="graph" label="Graph"> 95 <h:graphicImage id="graphImage" 96 rendered="#{not empty flowScope.websession.graphmodel.currentJFreeGraph.relativeChartLocationPath}" 97 value="#{flowScope.websession.graphmodel.currentJFreeGraph.relativeChartLocationPath}" 98 width="100%" /> 99 100 <rich:simpleTogglePanel switchType="client" label="Graph Options" 101 opened="false"> 102 103 104 </rich:simpleTogglePanel> 105 </rich:tab> 106 107 108 <rich:tab name="table" label="Table"> 109 110 111 </rich:tab> 112 113 <rich:tab name="Download" label="Download"> 114 115 <h:panelGrid id="reportTypePanel" columns="2"> 116 <a4j:commandLink id="generateExcelReport" 117 action="generateExcelReport"> 118 <h:graphicImage value="/image/excel-icon.gif" style="border:0"> 119 </h:graphicImage> 120 121 </a4j:commandLink> 122 123 <a4j:commandLink action="generateCSVReport"> 124 <h:graphicImage value="/image/csv-icon.png" style="border:0"> 125 </h:graphicImage> 126 </a4j:commandLink> 127 </h:panelGrid> 128 129 130 131 <rich:dataTable id="reportDownloadTable" 132 value="#{flowScope.websession.reportmodel.reportsForDownload}" 133 bandingInterval="2" banding="row" var="row" 134 rendered="#{not empty flowScope.websession.reportmodel.reportsForDownload}" 135 width="100%"> 49 136 50 137 <rich:column> 51 138 <f:facet name="header"> 52 <h:outputText value=" Statistic" />139 <h:outputText value="Report Name" /> 53 140 </f:facet> 54 <a4j:commandLink value="#{unit.statisticParameters.unitName}" 55 action="invokeStatisticalUnit" reRender="chartForm"> 56 <f:setPropertyActionListener value="#{unit}" 57 target="#{flowScope.websession.graphmodel.selectedStatisticalUnit}" /> 141 <h:outputText value="#{row.friendlyName} " /> 142 </rich:column> 143 <rich:column align="center"> 144 <f:facet name="header"> 145 <h:outputText value="Download" /> 146 </f:facet> 147 <a href="#{row.downloadPath}">download</a> 148 </rich:column> 149 <rich:column align="center"> 150 <f:facet name="header"> 151 <h:outputText value="Remove" /> 152 </f:facet> 153 <a4j:commandLink id="removeReportCommandLink" text="x" 154 action="removeReport" partialSubmit="true"> 155 <f:setPropertyActionListener value="#{row}" 156 target="#{flowScope.websession.reportmodel.selectedDownloadFile}" /> 58 157 </a4j:commandLink> 59 158 … … 61 160 </rich:dataTable> 62 161 63 <rich:simpleTogglePanel switchType="client"64 label="Download Options" opened="false">65 162 66 <h:panelGrid id="reportTypePanel" columns="2"> 67 <a4j:commandLink id="generateExcelReport" 68 action="generateExcelReport"> 69 <!-- need to get the partialSubmit="true"> working for this action --> 70 <h:graphicImage value="/image/excel-icon.gif" style="border:0"> 71 </h:graphicImage> 163 </rich:tab> 72 164 73 </a4j:commandLink> 74 75 <a4j:commandLink action="generateCSVReport"> 76 <h:graphicImage value="/image/csv-icon.png" style="border:0"> 77 </h:graphicImage> 78 </a4j:commandLink> 79 </h:panelGrid> 165 </rich:tabPanel> 80 166 81 167 82 83 <rich:dataTable id="reportDownloadTable"84 value="#{flowScope.websession.reportmodel.reportsForDownload}"85 bandingInterval="2" banding="row" var="row"86 rendered="#{not empty flowScope.websession.reportmodel.reportsForDownload}"87 width="100%">88 89 <rich:column>90 <f:facet name="header">91 <h:outputText value="Report Name" />92 </f:facet>93 <h:outputText value="#{row.friendlyName} " />94 </rich:column>95 <rich:column align="center">96 <f:facet name="header">97 <h:outputText value="Download" />98 </f:facet>99 <a href="#{row.downloadPath}">download</a>100 </rich:column>101 <rich:column align="center">102 <f:facet name="header">103 <h:outputText value="Remove" />104 </f:facet>105 <a4j:commandLink id="removeReportCommandLink" text="x"106 action="removeReport" partialSubmit="true">107 <f:setPropertyActionListener value="#{row}"108 target="#{flowScope.websession.reportmodel.selectedDownloadFile}" />109 </a4j:commandLink>110 111 </rich:column>112 </rich:dataTable>113 114 115 116 </rich:simpleTogglePanel>117 118 119 </h:panelGrid>120 </rich:panel>121 </a4j:form>122 </rich:layoutPanel>123 124 <rich:layoutPanel position="right" width="70%" >125 <a4j:form id="tablePanelForm">126 <rich:panel header="Table" style="width:100%"127 id="tablePanel" rendered="#{flowScope.websession.graphmodel.showControlPanel}">128 129 </rich:panel>130 131 </a4j:form>132 </rich:layoutPanel>133 134 <rich:layoutPanel position="bottom">135 136 <a4j:form id="chartForm">137 <rich:panel header="Graph" style="width: 100%"138 id="chartPanel" rendered="#{flowScope.websession.graphmodel.showControlPanel}">139 140 <h:graphicImage141 rendered="#{not empty flowScope.websession.graphmodel.currentJFreeGraph.relativeChartLocationPath}"142 value="#{flowScope.websession.graphmodel.currentJFreeGraph.relativeChartLocationPath}"143 width="100%" />144 </rich:panel>145 168 </a4j:form> 146 169 -
raptor-web/trunk/src/main/webapp/templates/raptor/css/common.css
r407 r522 53 53 #content #col_2 { width:100%; float:left; } 54 54 55 #footer { border-width:1px; border-top-style:solid; display:block; width: 100%; padding: 10px 40px; margin:0 auto; background:#FFF; -moz-border-radius:6px; }55 #footer { border-width:1px; border-top-style:solid; display:block; width:90%; padding: 5px 5px; margin:0 auto; background:#FFF; -moz-border-radius:6px; } 56 56 #footer small { } 57 57 -
raptor-web/trunk/src/main/webapp/templates/raptor/full.xhtml
r521 r522 10 10 xmlns:form="http://www.springframework.org/tags/form" 11 11 xmlns:a4j="http://richfaces.org/a4j" 12 xmlns:rich="http://richfaces.org/rich" 12 13 xmlns:h="http://java.sun.com/jsf/html" 13 14 contentType="text/html" encoding="UTF-8"> … … 46 47 <h:panelGrid id="grid" columns="5"> 47 48 <h:graphicImage value="/image/cu-logo.jpg"/> 49 <rich:spacer width="40%"/> 48 50 <h:outputText value="Cardiff University" style="font-size:80%"/> 51 <rich:spacer width="40%"/> 49 52 <h:graphicImage value="/image/jisc-logo.png"/> 50 53 </h:panelGrid>
Note: See TracChangeset
for help on using the changeset viewer.
