<div dir="ltr">+1</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 26, 2014 at 7:35 PM, David Cook <span dir="ltr"><<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+1<br>
<div class="im HOEnZb"><br>
-----Original Message-----<br>
Date: Tue, 25 Feb 2014 09:34:55 -0800<br>
From: Galen Charlton <<a href="mailto:gmc@esilibrary.com">gmc@esilibrary.com</a>><br>
To: "<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>"<br>
        <<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>><br>
Subject: [Koha-devel] DataTables - using class names in aTargets<br>
Message-ID:<br>
        <CAPLnt64r5EfNogfH2Q=_RWux=<a href="mailto:f3E9BuALOS5Ggnft_FkrqQH_g@mail.gmail.com">f3E9BuALOS5Ggnft_FkrqQH_g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Hi,<br>
<br>
There have been a fair number of bugs filed for fixing table sorting as<br>
columns get added to or removed from tables.  At root, they stem from our<br>
current habit of referring to columns by numeric position in aoColumns and<br>
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 have to<br>
be just an array of integers; it can also be "a string - class name will be<br>
matched on the TH for the column".<br>
<br>
</div><div class="im HOEnZb">To reduce the risk of silly columns-sorting bugs, I suggest that we adopt a<br>
practice of using descriptive CSS class names for table headers and using<br>
the class names in aoColumnsDefs/aTarget specifications, and dropping the<br>
use of aoColumns.<br>
<br>
</div><div class="im HOEnZb">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: +1 770-709-5581<br>
cell:   +1 404-984-4366<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>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Tomás Cohen Arazi</div><div>Prosecretaría de Informática</div><div>Universidad Nacional de Córdoba</div><div>✆ +54 351 4333190 ext 13168</div>

<div>GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F</div></div>
</div>