click here for details... Sakai Executive Director Position Search now open
Issue Details (XML | Word | Printable)

Key: SAK-13798
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Gonzalo Silverio
Reporter: Erica Ackerman
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Sakai

Add semantic markup to matrix html and provide default values in the stylesheet

Created: 18-Jun-2008 09:09   Updated: 05-Feb-2010 06:59
Component/s: OSP: Wizards - Matrix
Affects Version/s: 2.5.2
Fix Version/s: 2.7.0

Time Tracking:
Not Specified

Issue Links:
Relate
 

2.7.x Status: Closed
2.6.x Status: None
2.5.x Status: None
2.4.x Status: None


 Description  « Hide
Adding semantic markup to the HTML for the matrix give users more control of the matrix' appearance using a custom stylesheet. Also, several hard-coded values should be moved to the default stylesheet. Gonzalo suggested the following additions:

1. Give the table an id and move the hard-coded width="100%" to the stylesheet.
2. Make it possible to address each column and each row by adding classes to each <td> and <th>. For example,
     <td class="col0 row2">
3. Make it possible to address each cell by providing and id:
     <td id="col0-row2">
4. Provide the static column headers and footers for large matrices by moving the first <tr> into a <thead> and moving the <tbody> down to the second row (the first non-header row). In large matrices, the header could be duplicated in a footer dynamically by adding a <tfoot> when there are more than a certain number of rows in the table.
5. The default css should provide settings for color, background, border, display, width, and height.
6. Where there is no style defined, style="" should not appear.
7. Hard-coded styles such as "pointer: cursor" should be moved into the stylesheet. If possible, the tooltip style should be moved into the stylesheet.

 All   Comments   Work Log   Change History   Subversion Commits   git Commits      Sort Order: Ascending order - Click to sort in descending order
Erica Ackerman added a comment - 18-Jun-2008 11:31
Two other things:
1. For the tooltip, when the tooltip is empty, neither the <div> nor the script should be rendered. Here is an example cell with both present:
   <th class="matrix-row-heading matrixRowDefault" bgcolor="" style="color: " scope="row">
<div id="tooltip" style="position:absolute;visibility:hidden; border:1px solid black; font-size: 10px; layer-background-color: lightyellow; background-color: lightyellow; padding:1px">
        </div>
        <script type="text/javascript" src="/osp-common-tool/js/eport.js"></script>
                           Row 1
    </th>
2. When a cell is locked, it is still possible to click on it, enter the cell, and see instructions, etc. Gonzalo suggested a way to make the cell un-visitable by means of a stylesheet. The technique would be to wrap the link in a div, make the div the same height and width as the cell, and set the display to none, as shown below (the problem with the internationalization string is being reported in a separate Jira):

<td id="col1-row1" class="matrix-cell-border matrix-LOCKED col1 row1" style="cursor: pointer;">
        <div style="height: 100%; width: 100%; display: none;" > <a href="#" class="skip">
        ???table_cell_link_title???</a> &nbsp; </div></td>

Erica Ackerman added a comment - 19-Jun-2008 08:06
We don't really have a summary for the <table>'s summary attribute, so it should probably say something like "Read the description of this table".

Beth Kirschner added a comment - 04-Sep-2008 08:47
This would also help with automated QA testing using Selenium -- which works best if the cells in the matrix had IDs

Beth Kirschner added a comment - 20-Nov-2008 07:24
This has been implemented with the following notes and/or exceptions:

- Each cell now has a unique id (row-X_col-Y) that may be referenced from a stylesheet. Adding class-identifiers for each row would be trivial and can be done if needed.

- Matrix footers will be displayed if more than 10 rows are defined. This can be configured in sakai.properties by setting "osp.matrixRowFooter". If this is set to -1, the footer will never be displayed.

- Unnecessary tooltip markup is ugly, but the underlying code is even uglier -- unless this is causing a problem, it will remain.

Gonzalo Silverio added a comment - 20-Nov-2008 13:05
Looks good. Should I reopen to add the row and col identifiers?

   - Gonzalo

Noah Botimer added a comment - 24-Nov-2008 09:24
The footers were discussed on today's call. Both Chris and Lynn voiced concern over a global setting. Lynn's perspective is that we should more readily accept matrix author complexity when it could help the end user. Hugo made a popular suggestion of allowing dividing headers at locations other than above and below all rows. Sean had previously commented via email that a fixed header and scrolling body may be desirable.

A new ticket should be created if we wish to pursue these variations.

Clay Fenlason added a comment - 30-Jul-2009 12:09
This is now being reviewed for inclusion in 2.7. Are there test cases for this work, and who should be the point of contact if issues are unearthed during QA?

Erica Ackerman added a comment - 30-Jul-2009 13:56
Clay, there isn't really a test case for this. You just make a matrix with a couple columns and a couple rows, then view the frame source and look to see that the ids and classes are there as prescribed in the jira. The new markup allows for things like scrolling matrices, hiding columns, etc.

Beth Kirschner added a comment - 05-Feb-2010 06:59
Included in 2.7 release (prior to svn 2.7.x branch on Nov 13 r68877)