Bugzilla – Attachment 4998 Details for
Bug 6715
xmlControlField.js always fetches the value_builder xml files in the "en" directory.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6715 - Fix xmlControlfield.js so the xml files are fetched in the correct language directory.
SIGNED-OFF-Bug-6715---Fix-xmlControlfieldjs-so-the.patch (text/plain), 4.82 KB, created by
Katrin Fischer
on 2011-08-14 14:56:26 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6715 - Fix xmlControlfield.js so the xml files are fetched in the correct language directory.
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-08-14 14:56:26 UTC
Size:
4.82 KB
patch
obsolete
>From 229e0105c3dea5e9dde10fea0ad921dba39796e0 Mon Sep 17 00:00:00 2001 >From: preprod34 <preprod34@koha.ccsr.qc.ca> >Date: Fri, 12 Aug 2011 11:44:33 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 6715 - Fix xmlControlfield.js so the xml files are fetched in the correct language directory. >Content-Type: text/plain; charset="utf-8" > >xmlControlfield.js was always fetching the "en" xml file, preventing the translations >from working. > >http://bugs.koha-community.org/show_bug.cgi?id=6715 > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >- Apply patch >- Install language files, example: perl translate install de-DE >- Edit .xml files for value builders 006 and 008 >- Test by creating a new record and using value builders >--- > .../intranet-tmpl/prog/en/js/xmlControlfield.js | 6 ++++-- > .../cataloguing/value_builder/marc21_field_006.tt | 2 +- > .../cataloguing/value_builder/marc21_field_008.tt | 2 +- > 3 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js >index 5acb5fd..608b79b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js >@@ -168,7 +168,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > (function() > { > >- xmlControlField = function(tagfield, form_id, select, table, h4_result, tr_result, idMaterial) >+ xmlControlField = function(tagfield, form_id, select, table, h4_result, tr_result, idMaterial, themelang) > { > this.tagfield = tagfield; > this.idMaterial = idMaterial; >@@ -178,6 +178,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > this.table = table; > this.h4_result = h4_result; > this.tr_result = tr_result; >+ this.themelang = themelang; > };//xmlControlField > > >@@ -192,6 +193,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > table: null, > h4_result: "", > tr_result: "", >+ themelang: "", > > > setIdMaterial: function(idMaterial) >@@ -203,7 +205,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) > { > this.xmlDoc = $.ajax({ > type: "GET", >- url: "/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_" + this.tagfield + ".xml", >+ url: this.themelang + "/modules/cataloguing/value_builder/marc21_field_" + this.tagfield + ".xml", > dataType: "xml", > async: false > }).responseXML; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt >index 3c2e02c..66a2a5a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt >@@ -16,7 +16,7 @@ > var form = document.f_pop; > h4_result = document.getElementById("h4_result"); > tr_result = document.getElementById("tr_result"); >- objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', ''); >+ objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang %]'); > objXmlControlField.loadXmlValues(); > renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result")); > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt >index 8083c0f..9561ae5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt >@@ -16,7 +16,7 @@ > var form = document.f_pop; > h4_result = document.getElementById("h4_result"); > tr_result = document.getElementById("tr_result"); >- objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', ''); >+ objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang %]'); > objXmlControlField.loadXmlValues(); > renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result")); > [% END %] >-- >1.7.4.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 6715
:
4986
| 4998