Bugzilla – Attachment 134727 Details for
Bug 30709
'Insert' button in notices editor not adding selected placeholders to notice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30709: 'Insert' button in notices editor not adding selected placeholders to notice
Bug-30709-Insert-button-in-notices-editor-not-addi.patch (text/plain), 1.54 KB, created by
Owen Leonard
on 2022-05-06 12:08:13 UTC
(
hide
)
Description:
Bug 30709: 'Insert' button in notices editor not adding selected placeholders to notice
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-05-06 12:08:13 UTC
Size:
1.54 KB
patch
obsolete
>From daae6a3d94c8a3b82f7b2bc102d1a4f07e8bd0f9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 6 May 2022 12:05:12 +0000 >Subject: [PATCH] Bug 30709: 'Insert' button in notices editor not adding > selected placeholders to notice > >This patch updates letter.js so that it uses .prop("selected") to look >for selected <option>s instead of .attr("selected"). This is necessary >because of the jQuery upgrade. > >To test, apply the patch and edit any notice. Test that you can select >one or more database columns and insert them into the body of a notice >by clicking "Insert." Confirm that your selections are inserted where >you left the cursor in the message textarea. > >Test with multiple message transports and with multiple languages >installed (with TranslateNotices enabled). >--- > koha-tmpl/intranet-tmpl/prog/js/letter.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/letter.js b/koha-tmpl/intranet-tmpl/prog/js/letter.js >index 76b2d497fe..53ac7b120e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/letter.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/letter.js >@@ -197,7 +197,7 @@ $(document).ready(function() { > > if($(myListBox).find('option').length > 0) { > $(myListBox).find('option').each( function (){ >- if ( $(this).attr('selected') && $(this).val().length > 0 ) { >+ if ( $(this).prop('selected') && $(this).val().length > 0 ) { > $(myQuery).insertAtCaret("<<" + $(this).val() + ">>"); > } > }); >-- >2.20.1
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 30709
:
134727
|
134728