Ignore:
Timestamp:
Feb 21, 2012, 1:49:04 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #354: Changes related to new GUI in BASE 3.1

This should fix most of the issues related to the GUI differences between BASE 3.0 and 3.1. Reggie should display just fine in both versions. This is solved by:

  • Including all icons needed by Reggie in the Reggie distribution. We don't have to worry about the GIF vs. PNG issue.
  • Mainly designing Reggie for BASE 3.1 and then applying an extra stylesheet with a minial set of styles to make Reggie also work in BASE 3.0. The style sheet is only used if Reggie is installed on a BASE 3.0 server so it should not interfere with BASE 3.1 and up.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/refform.jsp

    r1342 r1538  
    1111  import="net.sf.basedb.clients.web.Base"
    1212  import="net.sf.basedb.clients.web.util.HTML"
     13  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
    1314  import="net.sf.basedb.util.Values"
    1415  import="java.util.List"
     
    2021final String ID = sc.getId();
    2122final float scale = Base.getScale(sc);
     23final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie");
    2224DbControl dc = null;
    2325try
     
    3840<base:page type="default" >
    3941<base:head scripts="ajax.js" styles="path.css">
    40   <link rel="stylesheet" type="text/css" href="reggie.css">
     42  <link rel="stylesheet" type="text/css" href="css/reggie.css">
     43  <%
     44  if (Application.getMajorVersion() == 3 && Application.getMinorVersion() == 0)
     45  {
     46    %>
     47    <link rel="stylesheet" type="text/css" href="css/base30.css">
     48    <%
     49  }
     50  %>
    4151  <script language="JavaScript" src="reggie.js" type="text/javascript" charset="UTF-8"></script>
    4252
     
    158168    {
    159169      html += '<tr><td colspan="2" class="summary" onclick="showHide(\'alreadyLinked\')" title="Click to show/hide details">';
    160       html += '<img src="../../images/show_section.gif" id="alreadyLinkedImg">';
     170      html += '<img src="images/show_section.png" id="alreadyLinkedImg">';
    161171      html += numAlreadyLinked + ' file(s) was already linked to a case</td></tr>\n';
    162172      html += '<tbody id="alreadyLinked" style="display: none;">' + htmlAlreadyLinked + "</tbody>";
     
    165175    {
    166176      html += '<tr><td colspan="2" class="summary" onclick="showHide(\'linkCreated\')" title="Click to show/hide details">';
    167       html += '<img src="../../images/hide_section.gif" id="linkCreatedImg">';
     177      html += '<img src="images/hide_section.png" id="linkCreatedImg">';
    168178      html += numLinkedNow + ' file(s) linked to a case</td></tr>\n';
    169179      html += '<tbody id="linkCreated">' + htmlLinkedNow + "</tbody>";
     
    172182    {
    173183      html += '<tr><td colspan="2" class="summary" onclick="showHide(\'notLinked\')" title="Click to show/hide details">';
    174       html += '<img src="../../images/hide_section.gif" id="notLinkedImg">';
     184      html += '<img src="images/hide_section.png" id="notLinkedImg">';
    175185      html += numNotLinked + ' file(s) could not be linked</td></tr>\n';
    176186      html += '<tbody id="notLinked">' + htmlNotLinked + "</tbody>";
     
    187197  Main.showHide(sectionId);
    188198  var img = document.getElementById(sectionId + 'Img');
    189   img.src = img.src.indexOf('show') > 0 ? '../../images/hide_section.gif' : '../../images/show_section.gif';
     199  img.src = img.src.indexOf('show') > 0 ? 'images/hide_section.png' : 'images/show_section.png';
    190200}
    191201</script>
     
    230240<base:body onload="init()">
    231241
    232   <p:path style="margin-top: 20px; margin-bottom: 10px;">
    233     <p:pathelement title="Reggie" href="<%="index.jsp?ID="+ID%>" />
    234     <p:pathelement title="Referral form registration" />
    235   </p:path>
    236 
     242  <p:path><p:pathelement
     243    title="Reggie" href="<%="index.jsp?ID="+ID%>"
     244    /><p:pathelement title="Referral form registration"
     245    /></p:path>
     246  <div class="content">
    237247  <%
    238248  if (sc.getActiveProjectId() == 0)
    239249  {
    240250    %>
    241     <base:note type="warning" style="width: 800px; margin-left: 20px; margin-bottom: 20px; margin-right: 0px; font-weight: bold; color: #cc0000;">
     251    <div class="messagecontainer note" style="width: 800px; margin-left: 20px; margin-bottom: 20px; margin-right: 0px; font-weight: bold; color: #cc0000;">
    242252      No project has been selected. You may proceed with the registration but
    243253      created items will not be shared.
    244     </base:note>
     254    </div>
    245255    <%
    246256  }
     
    302312  </div>
    303313
    304   <div class="error" id="errorMessage" style="display: none; width: 800px; margin-left: 20px; margin-bottom: 0px;"></div>
     314  <div class="messagecontainer error" id="errorMessage" style="display: none; width: 800px; margin-left: 20px; margin-bottom: 0px;"></div>
    305315
    306316  <div id="done" class="success" style="display: none; width: 800px; margin-left: 20px; margin-top: 20px;"></div>
     
    309319  <tr>
    310320    <td><base:button id="gocancel" title="Cancel" onclick="goRestart(false)" style="display: none;"/></td>
    311     <td><base:button id="goprocess" title="Process" image="gonext.gif" onclick="goProcess()"
     321    <td><base:button id="goprocess" title="Process" image="<%=home+"/images/gonext.png"%>" onclick="goProcess()"
    312322      tooltip="Process the files in the selected directory"/></td>
    313     <td><base:button id="gorestart" title="Restart" image="goback.gif" onclick="goRestart(true)" style="display: none;"/></td>
     323    <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" onclick="goRestart(true)" style="display: none;"/></td>
    314324    <td id="gonext.message" class="message"></td>
    315325  </tr>
    316326  </table>
    317327  </form>
     328  </div>
    318329 
    319330</base:body>
Note: See TracChangeset for help on using the changeset viewer.