Ticket #2531117 (closed enhancement)

Reporter


Satyam
Opened: 09/20/11
Last modified: 12/12/12
Status: closed
Type: enhancement
Resolution: fixed

Owner


Luke Smith
Target Release: 3.4.1
Priority: P3 (normal)
Summary: DataTable <td>s and <th>s should get a className based on the column key
Description:

Currently there is no way to apply a CSS style to particular columns without formatters, which is an overkill, and it doesn't apply to headers anyway. Cells do get a pointless className generated
dynamically which is of no use at all to anyone.

Type: enhancement Observed in Version: 3.4.0
Component: DataTable Severity: S3 (normal)
Assigned To: Luke Smith Target Release: 3.4.1
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Luke Smith

YUI Contributor

Posted: 09/20/11
  • milestone changed to 3.5.0
  • status changed from new to accepted

Luke Smith

YUI Contributor

Posted: 09/20/11
  • estimated changed from 0 to .25
  • remaining changed from 0 to .25

Satyam

YUI Contributor

Posted: 09/20/11

Found it! see:

https://github.com/yui/yui3/blob/master/src/datatable/js/column.js#L334

it should do this.get('key') not 'id'

Satyam

YUI Contributor

Posted: 09/20/11

Just in case something moves around, it is method _getClassnames: in Column.js and I would call it a bug, not an enhancement since it seems obvious someone got the attribute name wrong from the start and turned the whole thing pointless. Also, cleaning up the mess afterwards would be a good idea.

Actually, you should recover method getSanitizedKey to ensure classNames are valid since keys, in contrast to YUIDs, can have invalid characters

Satyam

YUI Contributor

Posted: 09/20/11

Luke Smith

YUI Contributor

Posted: 09/21/11
  • completed changed from 0 to 0.1
  • milestone changed from 3.5.0 to 3.4.1
  • remaining changed from 0.25 to 0
  • sprint changed to sprint 1
  • status changed from accepted to checkedin

Luke Smith

YUI Contributor

Posted: 09/21/11

Thanks for doing the leg work for me, Satyam. Because of your effort, this made it into 3.4.1.

Luke Smith

YUI Contributor

Posted: 09/21/11
  • resolution changed to fixed

Use 'key' attribute, not 'id' for column classname

Sanitize the key name per YUI2's method.
Thanks to @satyam for this patch. See
https://github.com/Satyam/yui3-1/commit/4f582607fed4ad366738cfaf454995b89630f5c3#diff-10

Fixes #2531117
View Commit: e1ea9f5125cee80f868bbc64f37949ccef9a982d

Jenny Donnelly

YUI Developer

Posted: 09/27/11
  • status changed from checkedin to closed

Luke Smith

YUI Contributor

Posted: 11/18/11
  • status changed from closed to checkedin

Luke Smith

YUI Contributor

Posted: 11/18/11

Use 'key' attribute, not 'id' for column classname

Sanitize the key name per YUI2's method.
Thanks to @satyam for this patch. See
https://github.com/Satyam/yui3-1/commit/4f582607fed4ad366738cfaf454995b89630f5c3#diff-10

Fixes #2531117
View Commit: e1ea9f5125cee80f868bbc64f37949ccef9a982d

Jenny Donnelly

YUI Developer

Posted: 12/12/12
  • status changed from checkedin to closed