Changeset 5960


Ignore:
Timestamp:
Feb 15, 2012, 11:00:03 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1655: GUI improvements

  • Icon sizes to 16x16
  • Catch 'missing image' event and display an error image instead for menu item and buttons.
  • Incorrectly wrapped <form> in plug-installation wizard (caused it to not display in IE).
  • Minor adjustments for displaying tables in different base font sizes.
Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarButtonRenderer.java

    r5918 r5960  
    122122      sb.append("<td><img src=\"").append(btn.getIcon()).append("\"");
    123123      if (btn.getId() != null) sb.append(" id=\"").append(btn.getId()).append(".icon").append("\"");
    124       sb.append("></td>");
     124      sb.append(" onerror=\"this.style.display='none'\"></td>");
    125125      sb.append("<td>");
    126126    }
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Button.java

    r5910 r5960  
    305305        theImage = page.getRoot() + "images/" + theImage;
    306306      }
    307       sb.append("<td class=\"icon\"><img src=\"").append(theImage).append("\"></td>");
     307      String errorImg = page.getRoot() + "images/error.png";
     308      sb.append("<td class=\"icon\"><img src=\"").append(theImage).append("\" onerror=\"this.src='" + errorImg + "'\"></td>");
    308309    }
    309310    if (getTitle() != null)
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Icon.java

    r5946 r5960  
    235235      theImage = page.getRoot() + "images/" + theImage;
    236236    }
     237    String errorImg = page.getRoot() + "images/error.png";
    237238
    238239    StringBuilder sb = new StringBuilder();
     
    242243    if (getOnclick() != null && isEnabled()) sb.append(" onclick=\"").append(getOnclick()).append("\"");
    243244    sb.append(">");
    244     sb.append("<img src=\"").append(theImage).append("\">");
     245    sb.append("<img src=\"").append(theImage).append("\" onerror=\"this.src='" + errorImg + "'\">");
    245246    try
    246247    {
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Menuitem.java

    r5918 r5960  
    259259    if (menu.isVertical())
    260260    {
    261       String theIcon = getIcon() == null ? "padding.gif" : getIcon();
    262       if (!theIcon.startsWith("/"))
     261      String defaultIcon = menu.getRoot() + "images/padding.gif";
     262      String theIcon = getIcon();
     263      if (theIcon != null && !theIcon.startsWith("/"))
    263264      {
    264265        // The icon is in the 'images' directory
    265266        theIcon = menu.getRoot() + "images/" + theIcon;
    266267      }
    267       sb.append("<img src=\"").append(theIcon).append("\" alt=\"\" class=\"menuicon\">");
     268      sb.append("<img src=\"").append(theIcon == null ? defaultIcon : theIcon).append("\" alt=\"\" class=\"menuicon\"");
     269      if (theIcon != null)
     270      {
     271        sb.append(" onerror=\"this.src='" + defaultIcon + "'\"");
     272      }
     273      sb.append(">");   
    268274    }
    269275    if (getTitle() != null) sb.append(getTitle());
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Submenu.java

    r5918 r5960  
    265265    {
    266266      sb.append("<table style=\"width: 100%;\"><tr><td>");
    267       String theIcon = getIcon() == null ? "padding.gif" : getIcon();
    268       if (!theIcon.startsWith("/"))
     267      String defaultIcon = menu.getRoot() + "images/padding.gif";
     268      String theIcon = getIcon();
     269      if (theIcon != null && !theIcon.startsWith("/"))
    269270      {
    270271        // The icon is in the 'images' directory
    271272        theIcon = menu.getRoot() + "images/" + theIcon;
    272273      }
    273       sb.append("<img src=\"").append(theIcon).append("\" alt=\"\" class=\"menuicon\">");
     274      sb.append("<img src=\"").append(theIcon == null ? defaultIcon : theIcon).append("\" alt=\"\" class=\"menuicon\"");
     275      if (theIcon != null)
     276      {
     277        sb.append(" onerror=\"this.src='" + defaultIcon + "'\"");
     278      }
     279      sb.append(">");
    274280    }
    275281    if (getTitle() != null) sb.append(getTitle());
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Table.java

    r5948 r5960  
    481481  String getDirectionImage()
    482482  {
    483     return "&nbsp;<img src=\""+getPage().getRoot()+"images/" +
     483    return "<img src=\""+getPage().getRoot()+"images/" +
    484484      (sortDirection == ItemContext.SortDirection.ASC ? "sort_asc.png" : "sort_desc.png") +
    485       "\" alt=\"\">&nbsp;";
     485      "\" alt=\"\">";
    486486  }
    487487
  • trunk/www/admin/extensions/wizard.jsp

    r5949 r5960  
    6666    {
    6767      var frm = document.forms['scan'];
     68      frm.cmd.value = 'DoManualScan';
    6869      frm.submit();
    6970    }
     
    9192  <h1>Extensions and plug-ins installation wizard <base:help helpid="extensions.install-wizard" /></h1>
    9293 
    93   <form action="index.jsp?ID=<%=ID%>" method="post" name="scan" onsubmit="return false;">
    94   <input type=hidden name="cmd" value="DoManualScan">
    95  
    96   <div class="content bottomborder">
    97   <tbl:table id="extensions" subclass="fulltable">
     94 
     95  <div class="content">
     96  <tbl:table id="scan" subclass="fulltable" action="index.jsp" >
    9897    <tbl:columndef id="file" title="File" />
    9998    <tbl:columndef id="status" title="Status" />
     
    213212  </tbl:table>
    214213  </div>
    215   </form>
    216214
    217215  <base:buttongroup subclass="dialogbuttons">
  • trunk/www/common/plugin/configure.jsp

    r5949 r5960  
    727727          <div class="absolutefull topborder" style="top: auto; bottom: 0px; height: 2em;">
    728728            <table style="height: 100%; margin:auto;"><tr><td>
    729             <base:icon image="hasvalues.gif" /> = has value(s), <base:icon image="required.png" /> = required
     729            <base:icon image="hasvalues.gif" />= has value(s), <base:icon image="required.png" />= required
    730730            </td></tr></table>
    731731          </div>
  • trunk/www/include/styles/menu.css

    r5919 r5960  
    4545  border-right: 1px solid #A0A0A0;
    4646}
    47 
     47.menu.horizontal > table > tbody > tr > td:last-child
     48{
     49  border-right: 0px;
     50  padding-right: 4px;
     51}
    4852.menu.horizontal .menuitem
    4953{
  • trunk/www/include/styles/size_l.css

    r5918 r5960  
    3636}
    3737
     38/* The fulltable need to adjust top toolbar space */
     39.itemlist div.panel
     40{
     41  height: 1.5em;
     42  max-height: 1.7em;
     43}
     44
     45.fulltable div.panelgroup
     46{
     47  height: 3.5em;
     48}
     49
     50.fulltable div.data
     51{
     52  top: 3.5em;
     53}
     54
  • trunk/www/include/styles/size_s.css

    r5918 r5960  
    3434  font-size: 67.5%;
    3535}
     36
     37/* The fulltable need to adjust top toolbar space */
     38.itemlist div.panel
     39{
     40  height: 1.7em;
     41  max-height: 1.8em;
     42}
     43
     44.fulltable div.panelgroup
     45{
     46  height: 4em;
     47}
     48
     49.fulltable div.data
     50{
     51  top: 4em;
     52}
     53
  • trunk/www/include/styles/size_xl.css

    r5918 r5960  
    3535}
    3636
     37/* The fulltable need to adjust top toolbar space */
     38.itemlist div.panel
     39{
     40  height: 1.4em;
     41  max-height: 1.6em;
     42}
     43
     44.fulltable div.panelgroup
     45{
     46  height: 3.25em;
     47}
     48
     49.fulltable div.data
     50{
     51  top: 3.25em;
     52}
  • trunk/www/include/styles/size_xs.css

    r5918 r5960  
    3535}
    3636
     37/* The fulltable need to adjust top toolbar space */
     38.itemlist div.panel
     39{
     40  height: 1.7em;
     41  max-height: 1.8em;
     42  xborder-bottom: 1px solid #0000ff;
     43}
     44
     45.fulltable div.panelgroup
     46{
     47  height: 4.35em;
     48}
     49
     50.fulltable div.data
     51{
     52  top: 4.35em;
     53}
  • trunk/www/include/styles/table.css

    r5959 r5960  
    6767}
    6868
     69/* Try to align images with text */
     70div.presetselector img, div.navigator img
     71{
     72  vertical-align: middle;
     73  padding-bottom: 2px;
     74}
     75
    6976/* Current page number should be highlighted */
    7077.itemlist div.navigator .currentpage
     
    113120  white-space: nowrap;
    114121  border-left: 1px dotted #A0A0A0;
    115   padding: 1px 3px 1px 3px;
     122  padding: 1px 2px 1px 2px;
    116123  vertical-align: middle;
    117124  text-align: left;
     
    154161{
    155162  content: url('../../images/unique.png');
    156   vertical-align: text-bottom;
     163  vertical-align: middle;
     164}
     165
     166/* Place property filters */
     167.itemlist div.data th.propertyfilter
     168{
     169  padding-left: 1px;
    157170}
    158171
     
    182195{
    183196  border-left: 1px dotted #A0A0A0;
    184   padding: 1px 3px 1px 3px;
    185   vertical-align: middle;
     197  padding: 1px 2px 1px 2px;
     198  vertical-align: middle;
     199}
     200
     201.itemlist div.data td.cell:first-child
     202{
     203  border-left: 0px;
    186204}
    187205
Note: See TracChangeset for help on using the changeset viewer.