From 2524d563d60a79516a5c1c24fb4d636d6552f5ed Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Nov 2014 15:29:48 +0100 Subject: [PATCH] [PASSED QA] 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. Signed-off-by: Owen Leonard Works to fix the problem. The code is definitely an improvement. Signed-off-by: Katrin Fischer Works as described, fixes critical problem. Passes tests and QA script. --- 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 %] -- 1.9.1