Bugzilla – Attachment 47047 Details for
Bug 14647
When exporting records, the file name extension should match the selected export format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
14647 - Make the file name extension dynamic on exporting records
14647---Make-the-file-name-extension-dynamic-on-ex.patch (text/plain), 2.68 KB, created by
Gus Ellerm
on 2016-01-20 20:17:13 UTC
(
hide
)
Description:
14647 - Make the file name extension dynamic on exporting records
Filename:
MIME Type:
Creator:
Gus Ellerm
Created:
2016-01-20 20:17:13 UTC
Size:
2.68 KB
patch
obsolete
>From 106dab85fc6844a4eb1964871693a54b7ba0cf92 Mon Sep 17 00:00:00 2001 >From: Gus <gel1163@stacmail.net> >Date: Tue, 19 Jan 2016 23:33:14 +0000 >Subject: [PATCH] 14647 - Make the file name extension dynamic on exporting > records > >Test - >1. go to cgi-bin/koha/tools/export.pl >2. Check that both tabs ("Export bibliographic records & Rxport authority records") do the following >3. In Output format >4. When changing "File format" from dropdown it update "file name" >5. Still works with user inputted names >--- > .../intranet-tmpl/prog/en/modules/tools/export.tt | 29 ++++++++++++++++++-- > 1 file changed, 26 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >index 83bc50a..f3c41fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >@@ -17,6 +17,29 @@ $(document).ready(function() { > $("#bibs li.csv_profiles").hide(); > } > }); >+ >+ >+ $('#output_format').change(function(){ >+ var filename = $('#filename').val(); >+ var file_name = filename.split("."); >+ var extension = $(this).val(); >+ if (extension == "iso2709") { >+ extension = "mrc"; >+ } >+ $('#filename').val(file_name[0] + "." + extension); >+ }); >+ >+ $('#output_format_auth').change(function(){ >+ var filename_auth = $('#filename_auth').val(); >+ var file_name_auth = filename_auth.split("."); >+ var extension = $(this).val(); >+ if (extension == "iso2709") { >+ extension = "mrc"; >+ } >+ $('#filename_auth').val(file_name_auth[0] + "." + extension); >+ }); >+ >+ > }); > //]]> > </script> >@@ -130,8 +153,8 @@ $(document).ready(function() { > Output format > </legend> > <ol><li> >- <label for="output_format">File format: </label> >- <select id="output_format" name="output_format"> >+ <label for="output_format_auth">File format: </label> >+ <select id="output_format_auth" name="output_format_auth"> > <option value="iso2709">marc</option> > <option value="xml">xml</option> > <option value="csv">csv</option> >@@ -146,7 +169,7 @@ $(document).ready(function() { > </select> > </li> > <li> >- <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" /> >+ <label for="filename_auth">File name:</label><input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" /> > </li></ol> > </fieldset> > <input type="hidden" name="op" value="export" /> >-- >1.7.10.4
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 14647
:
46956
|
46963
|
47047
|
47048
|
47275
|
64943
|
98541
|
98542
|
98627
|
98631
|
98632
|
98633
|
99287
|
99288
|
99289
|
99290