Changeset 2171


Ignore:
Timestamp:
Apr 20, 2006, 4:08:06 PM (16 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #43: New icons in web interface

Location:
trunk
Files:
15 added
3 deleted
66 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/3rd-party-components.txt

    r1928 r2171  
    165165Jar files : jfreechart-1.0.0.jar jcommon-1.0.0.jar
    166166
     167
     168Silk icon set
     169-------------
     170A very nice icon set containing 1000 icons. The entire icon set
     171is available in the "misc" directory. We have converted the icons
     172to GIF format (since we didn't want to scan through all web pages
     173and replace .gif with .png). We have also created some new icons which
     174are merely combinations of other icons, ie. taking an arrow on one icon
     175an putting it on another.
     176
     177More info : http://www.famfamfam.com/lab/icons/silk/
     178Version   : 1.3
     179License   : Creative Commons Attribution 2.5 License
     180            (http://creativecommons.org/licenses/by/2.5/)
     181
     182
     183
     184
     185
     186
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Button.java

    r1801 r2171  
    2424*/
    2525package net.sf.basedb.clients.web.taglib;
     26
     27import java.util.HashMap;
     28import java.util.Map;
    2629
    2730import javax.servlet.jsp.JspException;
     
    4952      title=...
    5053      tooltip=...
     54      image=...
    5155      visible=true|false
    5256      disabled=true|false
     
    120124  </tr>
    121125  <tr>
     126    <td>image</td>
     127    <td></td>
     128    <td>no</td>
     129    <td>
     130      An optional image to display. An image is automatically
     131      selected if the title is "Close", "Cancel", "Save", "Ok", "Yes" or "No".
     132    </td>
     133  </tr>
     134  <tr>
    122135    <td>visible</td>
    123136    <td>true</td>
     
    144157{
    145158
     159  private static final Map<String, String> defaultImages = new HashMap<String, String>();
     160  static
     161  {
     162    defaultImages.put("cancel", "cancel.gif");
     163    defaultImages.put("close", "close.gif");
     164    defaultImages.put("save", "save.gif");
     165    defaultImages.put("ok", "ok.gif");
     166    defaultImages.put("yes", "yes.gif");
     167    defaultImages.put("no", "no.gif");
     168  }
     169 
    146170  private ButtonGroup buttonGroup;
    147171
     
    181205  private boolean disabled = false;
    182206
     207  /**
     208    The image to display.
     209  */
     210  private String image = null;
    183211 
    184212  /*
     
    220248    return title;
    221249  }
     250 
     251  public void setImage(String image)
     252  {
     253    this.image = image;
     254  }
     255  public String getImage()
     256  {
     257    return image;
     258  }
    222259
    223260  public void setTooltip(String tooltip)
     
    251288    throws JspException
    252289  {
     290    if (!isVisible()) return SKIP_BODY;
    253291    if ((getParent() instanceof ButtonGroup)) buttonGroup = (ButtonGroup)getParent();
    254     if (!isVisible()) return SKIP_BODY;
     292    Page page = (Page)findAncestorWithClass(this, Page.class);
     293   
     294    String theImage = getImage();
     295    if (theImage == null && getTitle() != null)
     296    {
     297      theImage = defaultImages.get(getTitle().toLowerCase());
     298    }
     299   
    255300    StringBuilder sb = new StringBuilder();
    256301    sb.append("<div");
     
    270315    sb.append("><div");
    271316    if (getClazz() != null) sb.append(" class=\"").append(getClazz()).append("_inner\"");
    272     sb.append(">").append(getTitle()).append("</div></div>");
     317    sb.append(">");
     318    if (theImage != null)
     319    {
     320      sb.append("<img src=\"").append(page.getRoot()).append("images/").append(theImage).append("\"");
     321      sb.append(" border=\"0\">&nbsp;");
     322    }
     323    sb.append(getTitle()).append("</div></div>");
    273324    try
    274325    {
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Button.java

    r1801 r2171  
    283283    throws JspException
    284284  {
     285    if (!isVisible()) return SKIP_BODY;
    285286    if (!(getParent() instanceof Toolbar)) throw new JspTagException("Tag <tbl:button> must be inside a <tbl:toolbar> tag");
    286287    table = ((Toolbar)getParent()).getTable();
    287288    Page page = table != null ? table.getPage() : (Page)findAncestorWithClass(this, Page.class);
    288     if (!isVisible()) return SKIP_BODY;
    289289
    290290    StringBuilder sb = new StringBuilder();
     
    306306    if (getImage() != null)
    307307    {
    308       sb.append("<img src=\"").append(page.getRoot()).append("images/").append(image).append("\"");
    309       sb.append(" align=\"absmiddle\" border=\"0\">");
     308      sb.append("<img src=\"").append(page.getRoot()).append("images/").append(getImage()).append("\"");
     309      sb.append(" border=\"0\">");
    310310    }
    311311    if (getTitle() != null) sb.append("&nbsp;").append(getTitle()).append("&nbsp;");
  • trunk/www/WEB-INF/base.tld

    r2129 r2171  
    234234    </attribute>
    235235    <attribute>
     236      <name>image</name>
     237      <required>false</required>
     238      <rtexprvalue>true</rtexprvalue>
     239    </attribute>
     240    <attribute>
    236241      <name>visible</name>
    237242      <required>false</required>
  • trunk/www/filemanager/directories/list_directories.jsp

    r2158 r2171  
    192192        <tbl:toolbar>
    193193          <tbl:button
    194             image="new.gif"
     194            image="directory_new.gif"
    195195            onclick="newDirectory()"
    196196            title="New&hellip;"
     
    227227      <table align="center">
    228228      <tr>
    229         <td><base:button onclick="refresh()" title="Refresh" /></td>
     229        <td><base:button onclick="refresh()" title="Refresh" image="refresh.gif" /></td>
    230230      </tr>
    231231      </table>
  • trunk/www/filemanager/files/list_files.jsp

    r2041 r2171  
    452452        <tbl:button
    453453          disabled="<%=createDirectoryPermission ? false : true%>"
    454           image="<%=createDirectoryPermission ? "new.gif" : "new_disabled.gif"%>"
     454          image="<%=createDirectoryPermission ? "directory_new.gif" : "directory_new_disabled.gif"%>"
    455455          onclick="newDirectory()"
    456456          title="New directory&hellip;"
     
    459459        <tbl:button
    460460          disabled="<%=createFilePermission ? false : true%>"
    461           image="<%=createFilePermission ? "new.gif" : "new_disabled.gif"%>"
     461          image="<%=createFilePermission ? "upload.gif" : "upload_disabled.gif"%>"
    462462          onclick="uploadFile(0)"
    463463          title="Upload file&hellip;"
  • trunk/www/include/styles/main.css

    r2017 r2171  
    5757}
    5858
     59h3.light {
     60  color: #333377;
     61  background: #E0E0E0;
     62  font-weight: bold;
     63  margin-bottom: 0em;
     64  padding: 1px 4px 1px 4px;
     65  border: 1px solid #999999;
     66}
     67
    5968h3.docked {
    6069  border-bottom: 0px;
     
    7584
    7685img {
    77   vertical-align: baseline;
     86  vertical-align: middle;
    7887}
    7988
     
    239248  padding: 1px 5px 2px 5px;
    240249  text-align: center;
     250  white-space: nowrap;
    241251}
    242252
     
    250260}
    251261
     262.buttonclass_inner img
     263{
     264  float: left;
     265}
     266
    252267.fixedatbottom {
    253268  position: fixed;
  • trunk/www/info/about.jsp

    r2142 r2171  
    458458  </t:tab>
    459459  <t:tab id="3rdparty" title="3rd-party software">
    460   BASE is using other software developed by:
     460  BASE is using other software/material developed by:
    461461  <p>
    462462  <table border="0" cellpadding="0" cellspacing="0">
     
    484484    <td><b>The JDOM(TM) Project</b>&nbsp;</td>
    485485    <td><a href="http://www.jdom.org" target="_new">http://www.jdom.org</a></td>
     486  </tr>
     487  <tr>
     488    <td><b>Singular systems</b>&nbsp;</td>
     489    <td><a href="http://www.singularsys.com/jep/" target="_new">http://www.singularsys.com/jep/</a></td>
     490  </tr>
     491  <tr>
     492    <td><b>JFree software projects</b>&nbsp;</td>
     493    <td><a href="http://www.jfree.org/" target="_new">http://www.jfree.org/</a></td>
     494  </tr>
     495  <tr>
     496    <td><b>Mark James</b>&nbsp;</td>
     497    <td><a href=" http://www.famfamfam.com/lab/icons/silk/" target="_new"> http://www.famfamfam.com/lab/icons/silk/</a></td>
    486498  </tr>
    487499  </table>
  • trunk/www/info/news.jsp

    r2007 r2171  
    5858   
    5959    <table border=0 cellspacing=5 cellpadding=0 width="80%" align="center">
    60     <tr><td><base:icon image="left_arrow.gif" /><a href="<%=root%>/main.jsp?ID=<%=ID%>">Back to login</a></td></tr>
     60    <tr><td><base:icon image="back.gif" /><a href="<%=root%>/main.jsp?ID=<%=ID%>">Back to login</a></td></tr>
    6161    <tr>
    6262    <td>
  • trunk/www/main.jsp

    r1957 r2171  
    165165            {
    166166              %>
    167               <img src="images/bullet.gif" width=9 height=11 alt="*">
     167              <base:icon image="bullet.gif" />
    168168              <a href="javascript:Main.openPopup('info/forgot_password.jsp?ID=<%=ID%>', 'ForgotPassword', 500, 300)" title="Click here if you have forgotten your password">Forgot your password?</a>
    169169              <%
     
    172172            {
    173173              %>
    174               <img src="images/bullet.gif" width=9 height=11 alt="*">
     174              <base:icon image="bullet.gif" />
    175175              <a href="javascript:Main.openPopup('info/get_account.jsp?ID=<%=ID%>', 'GetAccount', 500, 300)" title="Click here if you want to get an account on this server">Get an account!</a>
    176176              <%
     
    197197        </p>
    198198        <base:icon image="bullet.gif" />
    199         <a href="javascript:Main.openPopup('info/about.jsp?ID=<%=ID%>&page=about', 'About', 500, 350)">more</a>
     199        <a href="javascript:Main.openPopup('info/about.jsp?ID=<%=ID%>&page=about', 'About', 500, 350)">More about this server</a>
    200200        <%
    201201      }
  • trunk/www/my_base/index.jsp

    r2077 r2171  
    137137  <td width="50%">
    138138 
    139   <h3 class="docked"><base:icon image="message.gif" />&nbsp;New messages</h3>
     139  <h3 class="light docked"><base:icon image="message.gif" />&nbsp;New messages</h3>
    140140    <div id="messages" class="news welcomesection">
    141141    <%
     
    167167    </div>
    168168 
    169   <h3 class="docked"><base:icon image="project.gif" />&nbsp;Projects</h3>
     169  <h3 class="light docked"><base:icon image="project.gif" />&nbsp;Projects</h3>
    170170    <div id="projects" class="welcomesection">
    171171    <%
     
    215215    </div>
    216216
    217   <h3 class="docked"><base:icon image="diskusage.gif" />&nbsp;Disk usage</h3>
     217  <h3 class="light docked"><base:icon image="diskusage.gif" />&nbsp;Disk usage</h3>
    218218    <div id="quota" class="welcomesection">
    219219    <%
     
    285285  {
    286286    %>
    287     <h3 class="docked"><base:icon image="help.gif" />&nbsp;Help</h3>
     287    <h3 class="light docked"><base:icon image="help.gif" />&nbsp;Help</h3>
    288288      <div id="help" class="welcomesection">
    289289      <%
     
    291291      {
    292292        %>
    293         &nbsp;<base:icon image="help.gif" />&nbsp;<a href="<%=help%>" target="Help">Help&hellip;</a><br>
     293        &nbsp;<base:icon image="bullet.gif" />&nbsp;<a href="<%=help%>" target="Help">Help&hellip;</a><br>
    294294        <%
    295295      }
     
    299299      {
    300300        %>
    301         &nbsp;<base:icon image="help.gif" />&nbsp;<a href="<%=faq%>" target="FAQ">Frequently asked questions&hellip;</a><br>
     301        &nbsp;<base:icon image="bullet.gif" />&nbsp;<a href="<%=faq%>" target="FAQ">Frequently asked questions&hellip;</a><br>
    302302        <%
    303303      }
     
    307307      {
    308308        %>
    309         &nbsp;<base:icon image="help.gif" />&nbsp;<a href="<%=reportBug%>" target="ReportBug">Report a bug&hellip;</a><br>
     309        &nbsp;<base:icon image="bullet.gif" />&nbsp;<a href="<%=reportBug%>" target="ReportBug">Report a bug&hellip;</a><br>
    310310        <%
    311311      }
     
    319319  <td width="50%">
    320320 
    321   <h3 class="docked"><base:icon image="news.gif" />&nbsp;News and announcements</h3>
     321  <h3 class="light docked"><base:icon image="news.gif" />&nbsp;News and announcements</h3>
    322322    <div id="news" class="news welcomesection">
    323323    <%
Note: See TracChangeset for help on using the changeset viewer.