<div dir="ltr">Sounds like an excellent idea! If everyone is in agreement, I think it should be added to coding guidelines, and to <a href="http://koha-qa.pl">koha-qa.pl</a> if possible.<div><br></div><div>Kyle</div></div>
<div class="gmail_extra"><br clear="all"><div><a href="http://www.kylehall.info" target="_blank">http://www.kylehall.info</a><br>ByWater Solutions ( <a href="http://bywatersolutions.com" target="_blank">http://bywatersolutions.com</a> )<br>
Meadville Public Library ( <a href="http://www.meadvillelibrary.org" target="_blank">http://www.meadvillelibrary.org</a> )<br>Crawford County Federated Library System ( <a href="http://www.ccfls.org" target="_blank">http://www.ccfls.org</a> )<br>
Mill Run Technology Solutions ( <a href="http://millruntech.com" target="_blank">http://millruntech.com</a> )<br></div>
<br><br><div class="gmail_quote">On Tue, Feb 25, 2014 at 12:34 PM, Galen Charlton <span dir="ltr"><<a href="mailto:gmc@esilibrary.com" target="_blank">gmc@esilibrary.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
There have been a fair number of bugs filed for fixing table sorting<br>
as columns get added to or removed from tables.  At root, they stem<br>
from our current habit of referring to columns by numeric position in<br>
aoColumns and aoColumnDefs/aTargets, e.g.,<br>
<br>
{ "aTargets": [ 1, 2 ], "sType": "natural"  }<br>
<br>
and<br>
<br>
            "aoColumns": [<br>
                { "sType": "title-string" },{ "sType": "html" },null,{<br>
"sType": "title-string" },null,null,null,null,null,null[% IF (<br>
exports_enabled ) %],null[% END %]<br>
            ],<br>
<br>
However, the documentation for DataTables says that aTargets doesn't<br>
have to be just an array of integers; it can also be "a string - class<br>
name will be matched on the TH for the column".<br>
<br>
To reduce the risk of silly columns-sorting bugs, I suggest that we<br>
adopt a practice of using descriptive CSS class names for table<br>
headers and using the class names in aoColumnsDefs/aTarget<br>
specifications, and dropping the use of aoColumns.<br>
<br>
Thoughts?<br>
<br>
Regards,<br>
<br>
Galen<br>
--<br>
Galen Charlton<br>
Manager of Implementation<br>
Equinox Software, Inc. / The Open Source Experts<br>
email:  <a href="mailto:gmc@esilibrary.com">gmc@esilibrary.com</a><br>
direct: <a href="tel:%2B1%20770-709-5581" value="+17707095581">+1 770-709-5581</a><br>
cell:   <a href="tel:%2B1%20404-984-4366" value="+14049844366">+1 404-984-4366</a><br>
skype:  gmcharlt<br>
web:    <a href="http://www.esilibrary.com/" target="_blank">http://www.esilibrary.com/</a><br>
Supporting Koha and Evergreen: <a href="http://koha-community.org" target="_blank">http://koha-community.org</a> &<br>
<a href="http://evergreen-ils.org" target="_blank">http://evergreen-ils.org</a><br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div><br></div>