Bugzilla – Attachment 53542 Details for
Bug 15974
Rancor - 942c is always displaying first in the list.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15974: Rancor: Correctly select existing authorized value
Bug-15974-Rancor-Correctly-select-existing-authori.patch (text/plain), 2.19 KB, created by
Jesse Weaver
on 2016-07-20 22:55:42 UTC
(
hide
)
Description:
Bug 15974: Rancor: Correctly select existing authorized value
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2016-07-20 22:55:42 UTC
Size:
2.19 KB
patch
obsolete
>From 7b81187d02d6f967d047806af3547e1f4483065e Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >Date: Wed, 20 Jul 2016 16:51:45 -0600 >Subject: [PATCH] Bug 15974: Rancor: Correctly select existing authorized value > >Test plan: > 1) Open up a record in Rancor with an itemtype besides the first in > the list ('BK' in the sample itemtypes). > 2) It will show "Book" instead of the correct itemtype. > 3) Apply patch, reload the page. > 4) The correct itemtype should now show. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index 2f2a1c2..0e4c279 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -77,12 +77,21 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > return $result[0]; > }, > postCreate: function() { >- this.setText( defaultvalue ); >+ var value = defaultvalue; >+ var widget = this; >+ >+ $.each( authvals, function() { >+ if ( this.value == widget.text ) { >+ value = this.value; >+ } >+ } ); >+ >+ this.setText( value ); > > $( '<select></select>' ).appendTo( this.node ); > var $node = $( this.node ).find( 'select' ); > $.each( authvals, function( undef, authval ) { >- $node.append( '<option value="' + authval.value + '"' + (authval.value == defaultvalue ? ' selected="selected"' : '') + '>' + authval.lib + '</option>' ); >+ $node.append( '<option value="' + authval.value + '"' + (authval.value == value ? ' selected="selected"' : '') + '>' + authval.lib + '</option>' ); > } ); > $node.val( this.text ); > >-- >2.8.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 15974
:
53542
|
53568
|
53601