Bugzilla – Attachment 86936 Details for
Bug 21049
Rancor 007 field does not retain value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21049: Set 007/00 when selecting material type (Rancor)
Bug-21049-Set-00700-when-selecting-material-type-R.patch (text/plain), 2.78 KB, created by
Josef Moravec
on 2019-03-23 08:27:43 UTC
(
hide
)
Description:
Bug 21049: Set 007/00 when selecting material type (Rancor)
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-03-23 08:27:43 UTC
Size:
2.78 KB
patch
obsolete
>From 4bfc9574cdd15ce090eb7d5cd91fb7e072567572 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 8 Mar 2019 10:12:50 +0100 >Subject: [PATCH] Bug 21049: Set 007/00 when selecting material type (Rancor) > >There is a 1-1 relationship between the material type values and the >position 00 of 007 field. Selecting a material type should set this >position's value. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js | 2 +- > .../prog/en/includes/cateditor-widgets-marc21.inc | 13 ++++++++++++- > 2 files changed, 13 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 be0623699c..2f60856aac 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js >@@ -109,7 +109,7 @@ define( [ 'resources' ], function( Resources ) { > createFromXML: function( resourceId ) { > var widget = this; > >- Resources[resourceId].done( function( xml ) { >+ return Resources[resourceId].done( function( xml ) { > $(widget.node).find('.widget-loading').remove(); > var $matSelect = $('<select class="material-select"></select>').appendTo(widget.node); > var $contents = $('<span class="material-contents"/>').appendTo(widget.node); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >index fae0baa4b3..3c4594f7ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >@@ -243,7 +243,18 @@ require( [ 'koha-backend', 'widget', 'text-marc' ], function( KohaBackend, Widge > return this.materialTypeMapping[this.text.substring(0, 1)]; > }, > postCreate: function( node, mark ) { >- this.createFromXML( 'marc21/xml/007' ); >+ this.createFromXML( 'marc21/xml/007' ).then(() => { >+ $(this.node).find('.material-select').on('change', (e) => { >+ const keys = Object.keys(this.materialTypeMapping); >+ const k = keys.filter(k => this.materialTypeMapping[k] === $(e.target).val()); >+ this.setFixed(0, 1, k, '+input'); >+ >+ // FIXME There must be a better way to update display >+ const n = $(this.node).find('[name="f00"]'); >+ n.triggerHandler('focus'); >+ n.triggerHandler('blur'); >+ }); >+ }); > } > } ); > >-- >2.11.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 21049
:
86131
|
86218
|
86351
|
86352
|
86848
|
86849
|
86935
| 86936