From c474b0f645fecb2c1663907904c6b9aa583e4513 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. 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. Signed-off-by: Tomas Cohen Arazi --- .../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 57193a507e..3fb10e47fc 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.39.5