Bugzilla – Attachment 138770 Details for
Bug 23111
Setting a custom framework as the default for cataloguing is not possible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23111: (follow-up) set default framework on advanced editor
Bug-23111-follow-up-set-default-framework-on-advan.patch (text/plain), 2.76 KB, created by
Aleisha Amohia
on 2022-08-08 03:55:18 UTC
(
hide
)
Description:
Bug 23111: (follow-up) set default framework on advanced editor
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2022-08-08 03:55:18 UTC
Size:
2.76 KB
patch
obsolete
>From 640678b3ae5817cee436daa7d769defa200dabc3 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 25 Oct 2020 16:35:50 +1300 >Subject: [PATCH] Bug 23111: (follow-up) set default framework on advanced > editor > >This patch ensures the advanced editor considers the default biblio >framework. > >Also fixing bug in atomic update >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt | 6 +++++- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >index 6d90176e0a1..cec64b67d89 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >@@ -686,8 +686,13 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], > displayRecord: function( record ) { > this.cm.setValue( TextMARC.RecordToText(record) ); > this.modified = false; >+ var fwcode = typeof record.frameworkcode !== 'undefined' ? record.frameworkcode : ''; >+ var defaultfw = $("a[data-default='Y']").data('frameworkcode'); >+ if ( typeof record.frameworkcode === 'undefined' && defaultfw ){ >+ fwcode = defaultfw; >+ } > this.setFrameworkCode( >- typeof record.frameworkcode !== 'undefined' ? record.frameworkcode : '', >+ fwcode, > false, > function ( error ) { > if ( typeof error !== 'undefined' ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >index ba6b88b95bc..c3dcd69120f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >@@ -70,7 +70,11 @@ > </li> > [% FOREACH framework IN frameworks %] > <li> >- <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]"> >+ [% IF framework.is_default %] >+ <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]" data-default="Y"> >+ [% ELSE %] >+ <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]"> >+ [% END %] > <i class="fa fa-fw fa-check selected"></i> > <i class="fa fa-fw unselected"> </i> > [% framework.frameworktext | html %] >-- >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 23111
:
90550
|
90587
|
90588
|
91039
|
91040
|
91791
|
92184
|
102602
|
102603
|
104058
|
104059
|
104060
|
104061
|
104062
|
106560
|
112354
|
112468
|
138766
|
138767
|
138768
|
138769
|
138770
|
141565
|
141566
|
141567
|
141568
|
141569
|
157717
|
157718
|
157719
|
157720
|
157721
|
157722
|
157723