[Koha-devel] DataTables - using class names in aTargets

Tomas Cohen Arazi tomascohen at gmail.com
Thu Feb 27 15:14:33 CET 2014


+1


On Wed, Feb 26, 2014 at 7:35 PM, David Cook <dcook at prosentient.com.au>wrote:

> +1
>
> -----Original Message-----
> Date: Tue, 25 Feb 2014 09:34:55 -0800
> From: Galen Charlton <gmc at esilibrary.com>
> To: "koha-devel at lists.koha-community.org"
>         <koha-devel at lists.koha-community.org>
> Subject: [Koha-devel] DataTables - using class names in aTargets
> Message-ID:
>         <CAPLnt64r5EfNogfH2Q=_RWux=
> f3E9BuALOS5Ggnft_FkrqQH_g at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> There have been a fair number of bugs filed for fixing table sorting as
> columns get added to or removed from tables.  At root, they stem from our
> current habit of referring to columns by numeric position in aoColumns and
> aoColumnDefs/aTargets, e.g.,
>
> { "aTargets": [ 1, 2 ], "sType": "natural"  }
>
> and
>
>             "aoColumns": [
>                 { "sType": "title-string" },{ "sType": "html" },null,{
> "sType": "title-string" },null,null,null,null,null,null[% IF (
> exports_enabled ) %],null[% END %]
>             ],
>
> However, the documentation for DataTables says that aTargets doesn't have
> to
> be just an array of integers; it can also be "a string - class name will be
> matched on the TH for the column".
>
> To reduce the risk of silly columns-sorting bugs, I suggest that we adopt a
> practice of using descriptive CSS class names for table headers and using
> the class names in aoColumnsDefs/aTarget specifications, and dropping the
> use of aoColumns.
>
> Thoughts?
>
> Regards,
>
> Galen
> --
> Galen Charlton
> Manager of Implementation
> Equinox Software, Inc. / The Open Source Experts
> email:  gmc at esilibrary.com
> direct: +1 770-709-5581
> cell:   +1 404-984-4366
> skype:  gmcharlt
> web:    http://www.esilibrary.com/
> Supporting Koha and Evergreen: http://koha-community.org &
> http://evergreen-ils.org
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>



-- 
Tomás Cohen Arazi
Prosecretaría de Informática
Universidad Nacional de Córdoba
✆ +54 351 4333190 ext 13168
GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140227/07f26235/attachment.html>


More information about the Koha-devel mailing list