From a7743725eb49ff93e1e0340e4027462b2afcdae0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Nov 2014 15:29:48 +0100 Subject: [PATCH] Bug 13289: document.write breaks DataTables The document.write in a td seems to brake the page with a new version of DataTables. This patch replaces a dirty piece of code with another one (but this one works...) Test plan: Create repeatable holidays and verify the page loads correctly. --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt index 57193a5..3fb10e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt @@ -157,6 +157,10 @@ $("#branch").change(function(){ changeBranch(); }); + $("#holidayweeklyrepeatable>tbody>tr").each(function(){ + var first_td = $(this).find('td').first(); + first_td.html(weekdays[first_td.html()]); + }); $("#holidayweeklyrepeatable").dataTable($.extend(true, {}, dataTablesDefaults, { "sDom": 't', "bPaginate": false @@ -463,10 +467,7 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %] - - + [% WEEK_DAYS_LOO.KEY %] [% WEEK_DAYS_LOO.TITLE %] [% WEEK_DAYS_LOO.DESCRIPTION %] -- 2.1.0