Bugzilla – Attachment 172464 Details for
Bug 38089
Fix incorrect regular expression from bug 33478 and move styles to head
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38089: Move style to head and correct regular expression
Bug-38089-Move-style-to-head-and-correct-regular-e.patch (text/plain), 2.25 KB, created by
Martin Renvoize (ashimema)
on 2024-10-07 14:10:59 UTC
(
hide
)
Description:
Bug 38089: Move style to head and correct regular expression
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-07 14:10:59 UTC
Size:
2.25 KB
patch
obsolete
>From 19652eadf3256d66afa7c9904598f549d68cdbe7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 4 Oct 2024 09:26:49 +0100 >Subject: [PATCH] Bug 38089: Move style to head and correct regular expression > >This patch moves the local style sections from the body to the head >where they belong and it also updates the regular expression used to >prepend the slip_id id to css selectors rather than replace them > >To test: >1 - Create a new notice in the 'Patron (custom slips)' module called 'Testing' >2 - Set print content as: > Try the <span class="styled">styling</span> stuff. >3 - Set the 'Format' as: > .styled {color:red;font-weight: bold;} >4 - Set system preference IntrnaetSlipPrinterJS to "//test" > http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetSlipPrinterJS > This will prevent auto printing popup >5 - Go to a patron and click Print -> Print Testing >6 - Note incorrect styling >7 - Apply patch, restart all >8 - Print Testing again >9 - Confirm styling is correct > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >index 3f24b22223a..938c52f41e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >@@ -29,6 +29,9 @@ > [% IF ( Koha.Preference('SlipCSS') ) %] > <link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') | $raw %]" /> > [% END %] >+[% FOR slip IN slips %] >+[% IF slip.style %]<style>[% slip.style.replace('([^\{\}]+?)\s*\{', '#slip_' _ slip.id _ ' $1 {') | $raw %]</style>[% END %] >+[% END %] > > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >@@ -39,7 +42,6 @@ > [% SET slips = [{content => slip, is_html => !plain, style => style }] %] > [% END %] > [% FOR slip IN slips %] >-[% IF slip.style %]<style>[% slip.style.replace('[^{]+{', '#slip_' _ slip.id _ ' {') | $raw %]</style>[% END %] > <div id="slip_[% slip.id | html %]"> > [% UNLESS slip.is_html %] > <pre> >-- >2.46.2
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 38089
:
172380
|
172421
|
172422
| 172464 |
172465
|
172473