jqGrid icon indicating copy to clipboard operation
jqGrid copied to clipboard

ColModel's cellattr function automatically turns values containing "Title" or "Style" to lowercase

Open saravanaj opened this issue 9 years ago • 3 comments

Title explains it all. Here is an example of the issue: http://jsfiddle.net/saravanaj/ozp8xygm/2/ In the status column model I have defined cellattr as:

cellattr: function() {
    return "data-some-cell-data='Title'";
}

But it is rendered as:

<td data-some-cell-data="title" role="gridcell">ENTERED</td>

Looking at the source I found that this line automatically lowercases any "Style" and "Title". Is there any reason for this?

saravanaj avatar Jun 22 '15 10:06 saravanaj

Hello,

Thanks for bug report. Yes there is reason for this. Will try to fix this ASAP

Regards

tonytomov avatar Jun 22 '15 13:06 tonytomov

Just curious. What is the reason?

saravanaj avatar Jun 22 '15 14:06 saravanaj

We need to know if the string contain title or/and style attribute. This is so, since we add a style and title internally in the code. If the style is set in cell attribute we need to extract this string and put it in the common style attribute. Since the style can contain expressin like

style = 'border-style:...' 

we need to extract the right string.

Hope this explain the reason.

Regards

tonytomov avatar Jun 22 '15 15:06 tonytomov