Changeset 16203
- Timestamp:
- 14/07/08 13:36:54 (1 month ago)
- Files:
-
- trunk/intermine/web/main/src/org/intermine/web/logic/widget/GraphWidget.java (modified) (2 diffs)
- trunk/intermine/web/main/src/org/intermine/web/struts/TempImageLoader.java (added)
- trunk/intermine/webapp/main/resources/webapp/WEB-INF/struts-config.xml (modified) (3 diffs)
- trunk/intermine/webapp/main/resources/webapp/bagDetails.jsp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/intermine/web/main/src/org/intermine/web/logic/widget/GraphWidget.java
r16029 r16203 294 294 */ 295 295 public String getHtml() throws Exception{ 296 File file = new File(System.getProperty("java.io.tmpdir"), fileName); 297 FileInputStream is = new FileInputStream(file); 298 // Create the byte array to hold the data 299 byte[] bytes = new byte[(int) file.length()]; 300 String h; 301 is.read(bytes); 302 h = Base64.encodeBytes(bytes); 303 StringBuffer sb = new StringBuffer("<img src=\"data:image/png;base64," + h + "\" width=\"" 304 + ((GraphWidgetConfig) config).getWIDTH() 305 + "\" height=\"" 296 // File file = new File(System.getProperty("java.io.tmpdir"), fileName); 297 // 298 // FileInputStream is = new FileInputStream(file); 299 // // Create the byte array to hold the data 300 // byte[] bytes = new byte[(int) file.length()]; 301 // String h; 302 // is.read(bytes); 303 // h = Base64.encodeBytes(bytes); 304 // StringBuffer sb = new StringBuffer("<img src=\"data:image/x-png;base64," + h + "\" width=\"" 305 // + ((GraphWidgetConfig) config).getWIDTH() 306 // + "\" height=\"" 307 // + ((GraphWidgetConfig) config).getHEIGHT() 308 // + "\" usemap=\"#chart" + fileName + "\">"); 309 // 310 // sb.append(imageMap); 311 // return sb.toString(); 312 313 // IE doesn't support base64, so for now we are just going to pass back location of png file 314 // see http://en.wikipedia.org/wiki/Data:_URI_scheme 315 316 317 StringBuffer sb = new StringBuffer("<img src=\"loadTmpImg.do?fileName=" + fileName 318 + "\" width=\"" + ((GraphWidgetConfig) config).getWIDTH() + "\" height=\"" 306 319 + ((GraphWidgetConfig) config).getHEIGHT() 307 320 + "\" usemap=\"#chart" + fileName + "\">"); … … 309 322 return sb.toString(); 310 323 } 311 312 324 } trunk/intermine/webapp/main/resources/webapp/WEB-INF/struts-config.xml
r16029 r16203 106 106 <action path="/dataCategories" forward="dataCategories.page"> 107 107 </action> 108 <action path="/loadTmpImg" type="org.intermine.web.struts.TempImageLoader"> 109 </action> 108 110 <action path="/customQuery" forward="customQuery.page"> 109 111 </action> … … 114 116 <action path="/linkPreview" forward="/linkPreview.jsp"> 115 117 </action> 116 <action path="/tabLinkPreview" type="org.intermine.web.struts.TabLinkPreviewAction">117 </action>118 <action path="/tabLinkPreview" type="org.intermine.web.struts.TabLinkPreviewAction"> 119 </action> 118 120 119 121 <action path="/modifyQueryChange" type="org.intermine.web.struts.ModifyQueryChangeAction" parameter="method"> … … 348 350 </action> 349 351 <action path="/tip" type="org.intermine.web.struts.TipAction"> 350 <forward name="display" path="tip.page"/>352 <forward name="display" path="tip.page"/> 351 353 </action> 352 354 trunk/intermine/webapp/main/resources/webapp/bagDetails.jsp
r16198 r16203 81 81 <div id="tool_bar_item_edit" style="visibility:hidden;width:300px" class="tool_bar_item"> 82 82 <%-- add selected to bag --%> 83 <fmt:message key="bagDetails.addRecords"/>: 83 <fmt:message key="bagDetails.addRecords"/>:<br/> 84 84 <c:choose> 85 85 <c:when test="${!empty PROFILE.savedBags && fn:length(PROFILE.savedBags) > 1}"> … … 102 102 <br/> 103 103 <%-- remove selected from bag --%> 104 <fmt:message key="bagDetails.deleteRecords"/> 104 <fmt:message key="bagDetails.deleteRecords"/>:<br> 105 105 <input type="submit" name="removeFromBag" id="removeFromBag" value="Remove" disabled="true" /> 106 107 106 <hr> 108 107 <a href="javascript:hideMenu('tool_bar_item_edit')" ><fmt:message key="confirm.cancel"/></a>
