Bugzilla – Attachment 122754 Details for
Bug 28675
QOTD broken in 20.11 and below
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28675: (bug 27942 follow-up) Fix QOTD - add new quote
Bug-28675-bug-27942-follow-up-Fix-QOTD---add-new-q.patch (text/plain), 3.44 KB, created by
Victor Grousset/tuxayo
on 2021-07-09 17:37:16 UTC
(
hide
)
Description:
Bug 28675: (bug 27942 follow-up) Fix QOTD - add new quote
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2021-07-09 17:37:16 UTC
Size:
3.44 KB
patch
obsolete
>From 4f03b58b7ab354b08d2a3b057600e9b3dffda5d6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 9 Jul 2021 10:34:31 +0200 >Subject: [PATCH] Bug 28675: (bug 27942 follow-up) Fix QOTD - add new quote > >Bug 27942 has been written for master on top of bug 27251, and the code >differ a lot from what we have in <= 20.11. > >This patch is quite ugly but it works, and is certainly the less painful >solution to fix stable branches. >Feel free to provide an alternative patch. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > .../intranet-tmpl/prog/en/modules/tools/quotes.tt | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >index c42f41d83a..402e203b98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >@@ -74,6 +74,9 @@ > <script> > var oTable; /* oTable needs to be global */ > var sEmptyTable = _("No quotes available. Please use the 'Add quote' button to add a quote."); /* override the default message in datatables.inc */ >+ >+ var quoteSource = '<input id="quoteSource" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>'; >+ var quoteText = '<input id="quoteText" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>'; > $(document).ready(function() { > /* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */ > /* See the datatable docs if you don't understand this difference. */ >@@ -89,12 +92,18 @@ > { > "sWidth": "11%", > "render": function(data, type, row, meta){ >+ if ( data == quoteSource ) { >+ return data; >+ } > return escape_str(data); > } > }, > { > "sWidth": "75%", > "render": function(data, type, row, meta){ >+ if ( data == quoteText ) { >+ return data; >+ } > return escape_str(data); > } > }, >@@ -199,8 +208,8 @@ > var aRow = oTable.fnAddData( > [ > 'NA', // this is hackish to fool the datatable sort routine into placing this row at the end of the list... >- '<input id="quoteSource" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>', >- '<input id="quoteText" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>', >+ quoteSource, >+ quoteText, > '0000-00-00 00:00:00', > ], > false >-- >2.32.0
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 28675
:
122697
|
122754
|
122760