Uploaded image for project: 'Click'
  1. Click
  2. CLK-57

Table Control - Mouseover Row Highlight

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      Please add a "row highlight" function to the Table Control.
      At the moment it's not possible to hack it, without changing the table control.
      What changes would be required to enable the table to have such a feature:
      1. Field:
      <code> protected boolean highlightRow;</code>
      in Table.java:64
      2. getter/setter for the above field
      3. in the toString() method, the following lines:
      <code>buffer.append("<tr class=\"even\">\n");</code>
      and
      <code>buffer.append("<tr class=\"odd\">\n");</code>
      with:
      <code>
      buffer.append("<tr class=\"even\"\n");
      if(getHighlightRow()) {
      buffer.append(" onmouseover=\"this.className='highlight'\" onmouseout=\"this.className='even'\"\n");
      }
      buffer.append(">\n");
      </code>
      and the same for the odd line.
      4. add in the table.css the style or something 'theme' dependent:
      <code>
      tr.highlight {
      background-color:yellow;
      }
      </code>

      Thanks in advance,

      Ahmed.

        Attachments

          Activity

            People

            • Assignee:
              click_christian Christian Essl
              Reporter:
              amohombe Ahmed Mohombe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: