Bugzilla – Attachment 176581 Details for
Bug 38895
In advanced editor, the fixed data helpers put '#' instead of space in record content
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38895: In advanced editor, the fixed data helpers put '#' instead of space in record content
Bug-38895-In-advanced-editor-the-fixed-data-helper.patch (text/plain), 2.89 KB, created by
Roman Dolny
on 2025-01-15 17:31:30 UTC
(
hide
)
Description:
Bug 38895: In advanced editor, the fixed data helpers put '#' instead of space in record content
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2025-01-15 17:31:30 UTC
Size:
2.89 KB
patch
obsolete
>From 43847b060d7f0adcb6be7f88015b46ccf127d264 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 15 Jan 2025 13:08:19 +0000 >Subject: [PATCH] Bug 38895: In advanced editor, the fixed data helpers put '#' > instead of space in record content > >When editing a bibliographic record in advanced editor, there are >helpers for fixed data coded fields (like 008). Like in the standard >editor, empty value (space) is represented by a hash sign. But unlike >in the standard editor, the hash sign is not converted into a space but >remains as '#' in the saved record. This is obviously wrong. > >Test plan: >========== >1. Ensure to have EnableAdvancedCatalogingEditor set to 'enable'. >2. Create of edit a record, choosing for one of one-letter codes > an empty value (represented by '#' in the helper). >3. Save the record, control in 'MARC preview' that you got a hash sign > in the 008 field instead of a space. >4. Apply the patch ; restart all. >5. Open a record in advanced editor, refresh the page to reload the java > script (Shift+Ctrl+R or another appropriate shortcut). Edit the 008 > field again choosing for one of one-letter codes an empty value. >6. Save the record, control in 'MARC preview' that there is a space > and not the hash sign. > >Sponsored-by: Ignatianum University in Cracow >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js >index 70981c183a..d545df26db 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js >@@ -69,7 +69,9 @@ define( [ 'resources' ], function( Resources ) { > > function show() { > $collapsed.hide(); >- $node.val( widget.getFixed( start, end ).replace(/\s+$/, '') ); >+ if ( end - start > 1 ) { >+ $node.val( widget.getFixed( start, end ).replace(/\s+$/, '') ); >+ } > $node.show(); > $node[0].focus(); > } >@@ -161,7 +163,7 @@ define( [ 'resources' ], function( Resources ) { > $input = $( '<select name="f' + Widget.PadNum(start, 2) + '" title="' + $(this).children('name').text() + '"></select>' ); > > $values.each( function() { >- $input.append( '<option value="' + $(this).attr('code') + '">' + $(this).attr('code') + ' - ' + $(this).children('description').text() + '</option>' ); >+ $input.append( '<option value="' + $(this).attr('code').replace('#', ' ') + '">' + $(this).attr('code') + ' - ' + $(this).children('description').text() + '</option>' ); > } ); > } > >-- >2.39.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 38895
:
176574
|
176581
|
176582
|
177373