Bugzilla – Attachment 33683 Details for
Bug 13289
Calendar with weekly repeating holidays completely broken by DataTables upgrade
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13289: document.write breaks DataTables
SIGNED-OFF-Bug-13289-documentwrite-breaks-DataTabl.patch (text/plain), 1.87 KB, created by
Owen Leonard
on 2014-11-19 14:53:59 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13289: document.write breaks DataTables
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-11-19 14:53:59 UTC
Size:
1.87 KB
patch
obsolete
>From c05629444c71d88893855283edf9bffe1315072b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 19 Nov 2014 15:29:48 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 13289: document.write breaks DataTables >Content-Type: text/plain; charset="utf-8" > >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 <oleonard@myacpl.org> > >Works to fix the problem. The code is definitely an improvement. >--- > .../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 > <tbody> > [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %] > <tr> >- <td> >-<script type="text/javascript"> >- document.write(weekdays[ [% WEEK_DAYS_LOO.KEY %]]); >-</script> >+ <td>[% WEEK_DAYS_LOO.KEY %]</td> > </td> > <td>[% WEEK_DAYS_LOO.TITLE %]</td> > <td>[% WEEK_DAYS_LOO.DESCRIPTION %]</td> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13289
:
33682
|
33683
|
33694