datatables management in TT
Hie, Looking at datatables in templates, I notices there are two ways it is managed. In some pages of acquisition and in OPAC, the include datatables.inc (containing JS links and translatable strings) is used + the css : <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> [% INCLUDE 'datatables.inc' %] In more cases, this include is not used and datatables-strings.inc is used for translatable strings : <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> [% INCLUDE 'datatables-strings.inc' %] <script type="text/javascript" src="[% themelang %]/js/datatables.js"> Wouldn't it be better to always use one include containing everything ? I think adding the CSS to existing datatables.inc can make the point. -- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com
Fridolyn, Take a look at bugs 10651 and bug 10868, I QAed 1 hour ago :) Jonathan 2013/9/20 Fridolyn SOMERS <fridolyn.somers@biblibre.com>:
Hie,
Looking at datatables in templates, I notices there are two ways it is managed.
In some pages of acquisition and in OPAC, the include datatables.inc (containing JS links and translatable strings) is used + the css :
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> [% INCLUDE 'datatables.inc' %]
In more cases, this include is not used and datatables-strings.inc is used for translatable strings : <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> [% INCLUDE 'datatables-strings.inc' %] <script type="text/javascript" src="[% themelang %]/js/datatables.js">
Wouldn't it be better to always use one include containing everything ? I think adding the CSS to existing datatables.inc can make the point.
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com _______________________________________________ Koha-devel mailing list Koha-devel@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/
Ok, perfect. But why not include [% themelang %]/css/datatables.css into datatables.inc ? Le 20/09/2013 11:41, Jonathan Druart a écrit :
Fridolyn,
Take a look at bugs 10651 and bug 10868, I QAed 1 hour ago :)
Jonathan
2013/9/20 Fridolyn SOMERS <fridolyn.somers@biblibre.com>:
Hie,
Looking at datatables in templates, I notices there are two ways it is managed.
In some pages of acquisition and in OPAC, the include datatables.inc (containing JS links and translatable strings) is used + the css :
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> [% INCLUDE 'datatables.inc' %]
In more cases, this include is not used and datatables-strings.inc is used for translatable strings : <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> [% INCLUDE 'datatables-strings.inc' %] <script type="text/javascript" src="[% themelang %]/js/datatables.js">
Wouldn't it be better to always use one include containing everything ? I think adding the CSS to existing datatables.inc can make the point.
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com _______________________________________________ Koha-devel mailing list Koha-devel@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/
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com
See my comment 5 (bug 10651). I asked the same thing to Owen :) 2013/9/20 Fridolyn SOMERS <fridolyn.somers@biblibre.com>:
Ok, perfect.
But why not include [% themelang %]/css/datatables.css into datatables.inc ?
Le 20/09/2013 11:41, Jonathan Druart a écrit :
Fridolyn,
Take a look at bugs 10651 and bug 10868, I QAed 1 hour ago :)
Jonathan
2013/9/20 Fridolyn SOMERS <fridolyn.somers@biblibre.com>:
Hie,
Looking at datatables in templates, I notices there are two ways it is managed.
In some pages of acquisition and in OPAC, the include datatables.inc (containing JS links and translatable strings) is used + the css :
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> [% INCLUDE 'datatables.inc' %]
In more cases, this include is not used and datatables-strings.inc is used for translatable strings : <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> [% INCLUDE 'datatables-strings.inc' %] <script type="text/javascript" src="[% themelang %]/js/datatables.js">
Wouldn't it be better to always use one include containing everything ? I think adding the CSS to existing datatables.inc can make the point.
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com _______________________________________________ Koha-devel mailing list Koha-devel@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/
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com _______________________________________________ Koha-devel mailing list Koha-devel@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/
Wouldn't it be better to always use one include containing everything ? I think adding the CSS to existing datatables.inc can make the point.
Perhaps it would have been better to do it that way. I was thinking of a time in the future when I would like to move all JavaScript to the end of each page instead of the beginning, and CSS would need to stay at the top. -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org
An HTML page build with a template can not be perfect I'd say. I prefer a more comprehensive template. But no big deal. Le 20/09/2013 14:45, Owen Leonard a écrit :
Wouldn't it be better to always use one include containing everything ? I think adding the CSS to existing datatables.inc can make the point.
Perhaps it would have been better to do it that way. I was thinking of a time in the future when I would like to move all JavaScript to the end of each page instead of the beginning, and CSS would need to stay at the top.
-- Owen
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com
participants (3)
-
Fridolyn SOMERS -
Jonathan Druart -
Owen Leonard