Changeset 16203

Show
Ignore:
Timestamp:
14/07/08 13:36:54 (1 month ago)
Author:
julie
Message:

undo change [16029] for now. Internet Explorer doesn't support base64-encoding. We can hack around this (for IE7 & 8, anyway), but for tomorrow's release we'll just display the widgets like we did before.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/intermine/web/main/src/org/intermine/web/logic/widget/GraphWidget.java

    r16029 r16203  
    294294     */ 
    295295    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=\"" 
    306319                                           + ((GraphWidgetConfig) config).getHEIGHT() 
    307320                                           + "\" usemap=\"#chart" + fileName + "\">"); 
     
    309322        return sb.toString(); 
    310323    } 
    311  
    312324} 
  • trunk/intermine/webapp/main/resources/webapp/WEB-INF/struts-config.xml

    r16029 r16203  
    106106    <action path="/dataCategories" forward="dataCategories.page"> 
    107107    </action> 
     108    <action path="/loadTmpImg" type="org.intermine.web.struts.TempImageLoader"> 
     109    </action> 
    108110    <action path="/customQuery" forward="customQuery.page"> 
    109111    </action> 
     
    114116    <action path="/linkPreview" forward="/linkPreview.jsp"> 
    115117    </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> 
    118120 
    119121    <action path="/modifyQueryChange" type="org.intermine.web.struts.ModifyQueryChangeAction" parameter="method"> 
     
    348350    </action> 
    349351    <action path="/tip" type="org.intermine.web.struts.TipAction"> 
    350        <forward name="display" path="tip.page"/> 
     352      <forward name="display" path="tip.page"/> 
    351353    </action> 
    352354 
  • trunk/intermine/webapp/main/resources/webapp/bagDetails.jsp

    r16198 r16203  
    8181<div id="tool_bar_item_edit" style="visibility:hidden;width:300px" class="tool_bar_item"> 
    8282  <%-- add selected to bag --%> 
    83   <fmt:message key="bagDetails.addRecords"/>:&nbsp;&nbsp; 
     83  <fmt:message key="bagDetails.addRecords"/>:<br/> 
    8484   <c:choose> 
    8585   <c:when test="${!empty PROFILE.savedBags && fn:length(PROFILE.savedBags) > 1}"> 
     
    102102  <br/> 
    103103    <%-- remove selected from bag --%> 
    104     <fmt:message key="bagDetails.deleteRecords"/>&nbsp;&nbsp; 
     104    <fmt:message key="bagDetails.deleteRecords"/>:<br> 
    105105    <input type="submit" name="removeFromBag" id="removeFromBag" value="Remove" disabled="true" /> 
    106  
    107106    <hr> 
    108107  <a href="javascript:hideMenu('tool_bar_item_edit')" ><fmt:message key="confirm.cancel"/></a>