Changeset 6616


Ignore:
Timestamp:
Nov 24, 2014, 8:25:26 AM (8 years ago)
Author:
Nicklas Nordborg
Message:

References #1890: Improve skinnability of BASE

Adding more tags to navigator so that it should be possible to style different sections more easily.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Navigator.java

    r6183 r6616  
    253253    sb.append(" data-table-id=\"").append(table.getId()).append("\"");
    254254    addDynamicAttributes(sb);
    255     sb.append(">\n");
    256 
     255    sb.append(">");
     256    sb.append("<span class=\"flowcontrol\">");
    257257    int numPages = (int)Math.ceil((double)totalRows / (double)rowsPerPage);
    258258    if (currentPage > 0)
     
    266266      sb.append("<img src=\"").append(root).append("images/previous.png\" class=\"disabled\" alt=\"\">");
    267267    }
    268     sb.append("&nbsp;&nbsp;");
     268    sb.append("</span><span class=\"flowcontrol\">");
    269269    if ((currentPage+1)*rowsPerPage < totalRows )
    270270    {
     
    277277      sb.append("<img src=\"").append(root).append("images/last.png\" class=\"disabled\" alt=\"\">");
    278278    }
    279     sb.append("&nbsp;&nbsp;&nbsp;");
     279    sb.append("</span>");
    280280
    281281    int offset = 1;
     
    304304    pages.add(currentPage);
    305305    if (numPages > 0) pages.add(numPages - 1);
    306    
     306    sb.append("<span class=\"pages\">");
    307307    for (int page : pages)
    308308    {
     
    316316      }
    317317    }
    318     sb.append(" (").append(totalRows).append(totalRows == 1 ? " hit" : " hits");
     318    sb.append("</span>");
     319    sb.append("<span class=\"rows-per-page\">");
     320    sb.append("(").append(totalRows).append(totalRows == 1 ? " hit" : " hits");
    319321    sb.append(", <input name=\"rowsperpage\" class=\"text\" type=\"text\" value=\"").append(rowsPerPage).append("\"");
    320     sb.append(" maxlength=\"3\"> per page");
    321     sb.append(")</div>");
     322    sb.append(" maxlength=\"3\"> per page)");
     323    sb.append("</span></div>");
    322324    try
    323325    {
  • trunk/www/include/styles/table.css

    r6610 r6616  
    3939{
    4040  padding: 0 2px 0 2px;
    41  
    42   xheight: 1.6em;
    43   xmax-height: 1.75em;
    44   xbackground: #E8E8E8;
     41  white-space: nowrap;
    4542}
    4643
     
    5148
    5249
    53 /* Float <div>:s to left */
     50/* <div>:s behave as inline elements */
    5451.itemlist div.panelgroup div.panel > div
    5552{
    56   float: left;
     53  display: inline-block;
    5754  border-right-width: 1px;
    5855  padding: 2px 4px 2px 4px;
     
    6966}
    7067
     68.itemlist div.navigator > span
     69{
     70  padding-right: 0.75em;
     71}
     72
    7173/* Current page number should be highlighted */
    7274.itemlist div.navigator .currentpage
     
    7678
    7779/* Page number input field */
    78 .itemlist div.navigator > input
     80.itemlist div.navigator .rows-per-page > input
    7981{
    8082  width: 3em;
    8183}
    8284
    83 /* Separate page numbers */
    84 .itemlist div.navigator span:after
    85 {
    86   content: "∙";
    87   color: #999999;
     85 /* Separate page numbers */
     86.itemlist div.navigator .pages span:after
     87{
     88  display: inline-block;
     89  content: "∙";
     90  color: #999999;
    8891  padding-right: 1px;
    8992  padding-left: 1px;
    90   text-decoration: none;
     93  text-decoration: none;
     94}
     95
     96
     97/* No 'dot' after last page */
     98.itemlist div.navigator .pages span:last-child:after
     99{
     100  content: '';
     101  padding: 0;
    91102}
    92103
Note: See TracChangeset for help on using the changeset viewer.