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.

        Activity

        Hide
        medgar Malcolm Edgar added a comment -

        Hi Ahmend,

        sounds like a good feature could you provide a patch for this.

        thanks Malcolm

        Show
        medgar Malcolm Edgar added a comment - Hi Ahmend, sounds like a good feature could you provide a patch for this. thanks Malcolm
        Hide
        amohombe Ahmed Mohombe added a comment -

        > could you provide a patch for this.
        Unfortunately not .
        If I would have a patch, I would have checked it in myself.
        My dev environement doesn't have the last version or Click, as some API changes were made to click and I can't take them, as in that dev environement Click is a "module" and the application depends on it. First I must check what effect do those changes have and only after can I use again the latest.

        This is really only a very few lines of code and it's nothing more than I mentioned in my initial post.

        Ahmed.
        P.S. IMHO you should release 0.18 cause there are too many API canges since 0.17, and for those who follow Click it will be a too big change if they need to migrate all the time the API to be compatible.

        Show
        amohombe Ahmed Mohombe added a comment - > could you provide a patch for this. Unfortunately not . If I would have a patch, I would have checked it in myself. My dev environement doesn't have the last version or Click, as some API changes were made to click and I can't take them, as in that dev environement Click is a "module" and the application depends on it. First I must check what effect do those changes have and only after can I use again the latest. This is really only a very few lines of code and it's nothing more than I mentioned in my initial post. Ahmed. P.S. IMHO you should release 0.18 cause there are too many API canges since 0.17, and for those who follow Click it will be a too big change if they need to migrate all the time the API to be compatible.
        Hide
        medgar Malcolm Edgar added a comment -

        Ok no problem, we can put this into the 0.19 release.

        regards malcolm

        Show
        medgar Malcolm Edgar added a comment - Ok no problem, we can put this into the 0.19 release. regards malcolm
        Hide
        click_christian Christian Essl added a comment -

        Hi,

        While I was at applying Stephens patch (CLK83) I also added this feature to Table. Enclosed is the patch.

        Christian

        Show
        click_christian Christian Essl added a comment - Hi, While I was at applying Stephens patch (CLK83) I also added this feature to Table. Enclosed is the patch. Christian
        Hide
        medgar Malcolm Edgar added a comment -

        Hi Christian,

        would you mind applying your patch.

        Thanks for your help.

        regards Malcolm Edgar

        Show
        medgar Malcolm Edgar added a comment - Hi Christian, would you mind applying your patch. Thanks for your help. regards Malcolm Edgar
        Hide
        click_christian Christian Essl added a comment -

        Hi Malcolm,

        Commited the patch.

        Christian

        Show
        click_christian Christian Essl added a comment - Hi Malcolm, Commited the patch. Christian

          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:

              Development