Bugzilla – Attachment 11638 Details for
Bug 8627
Fixing pipe values in MARC21 controlfield 008 of authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] 8627 Followup for removing tabs
SIGNED-OFF-8627-Followup-for-removing-tabs.patch (text/plain), 4.30 KB, created by
Julian Maurice
on 2012-08-16 12:17:07 UTC
(
hide
)
Description:
[SIGNED-OFF] 8627 Followup for removing tabs
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-08-16 12:17:07 UTC
Size:
4.30 KB
patch
obsolete
>From bcdad362f2ddd6f81253d00955b8567a6c4fe721 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 13 Aug 2012 10:57:36 +0200 >Subject: [PATCH] [SIGNED-OFF] 8627 Followup for removing tabs > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > .../value_builder/marc21_field_008_authorities.pl | 58 ++++++++++---------- > 1 file changed, 29 insertions(+), 29 deletions(-) > >diff --git a/cataloguing/value_builder/marc21_field_008_authorities.pl b/cataloguing/value_builder/marc21_field_008_authorities.pl >index 94366e6..d5b5484 100755 >--- a/cataloguing/value_builder/marc21_field_008_authorities.pl >+++ b/cataloguing/value_builder/marc21_field_008_authorities.pl >@@ -44,63 +44,63 @@ my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$md > my $defaultval = Field008(); > > sub plugin_parameters { >- my ($dbh,$record,$tagslib,$i,$tabloop) = @_; >- return ""; >+ my ($dbh,$record,$tagslib,$i,$tabloop) = @_; >+ return ""; > } > > sub plugin_javascript { >- my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; >- my $function_name= $field_number; >- my $res=" >+ my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; >+ my $function_name= $field_number; >+ my $res=" > <script type=\"text/javascript\"> > //<![CDATA[ > > function Focus$function_name(subfield_managed) { > if (!document.getElementById(\"$field_number\").value) { >- var authtype=document.forms['f'].elements['authtypecode'].value; >- var fieldval='$dateentered$defaultval'; >- if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { >- fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); >- } >+ var authtype=document.forms['f'].elements['authtypecode'].value; >+ var fieldval='$dateentered$defaultval'; >+ if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { >+ fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); >+ } > document.getElementById(\"$field_number\").value=fieldval; > } > return 1; > } > > function Blur$function_name(subfield_managed) { >- return 1; >+ return 1; > } > > function Clic$function_name(i) { >- var authtype=document.forms['f'].elements['authtypecode'].value; >- defaultvalue=document.getElementById(\"$field_number\").value; >- newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_authorities.pl&index=$field_number&result=\"+defaultvalue+\"&authtypecode=\"+authtype,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); >+ var authtype=document.forms['f'].elements['authtypecode'].value; >+ defaultvalue=document.getElementById(\"$field_number\").value; >+ newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_authorities.pl&index=$field_number&result=\"+defaultvalue+\"&authtypecode=\"+authtype,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); > > } > //]]> > </script> > "; > >- return ($function_name,$res); >+ return ($function_name,$res); > } > sub plugin { >- my ($input) = @_; >- my $index= $input->param('index'); >- my $result= $input->param('result'); >- my $authtype= $input->param('authtypecode')||''; >- substr($defaultval,14-6,1)='b' if $authtype=~ /TOPIC_TERM|GENRE.FORM|CHRON_TERM/; >+ my ($input) = @_; >+ my $index= $input->param('index'); >+ my $result= $input->param('result'); >+ my $authtype= $input->param('authtypecode')||''; >+ substr($defaultval,14-6,1)='b' if $authtype=~ /TOPIC_TERM|GENRE.FORM|CHRON_TERM/; > >- my $dbh = C4::Context->dbh; >+ my $dbh = C4::Context->dbh; > >- my ($template, $loggedinuser, $cookie) >+ my ($template, $loggedinuser, $cookie) > = get_template_and_user({template_name => "cataloguing/value_builder/marc21_field_008_authorities.tmpl", >- query => $input, >- type => "intranet", >- authnotrequired => 0, >- flagsrequired => {editcatalogue => '*'}, >- debug => 1, >- }); >- $result = "$dateentered$defaultval" unless $result; >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => {editcatalogue => '*'}, >+ debug => 1, >+ }); >+ $result = "$dateentered$defaultval" unless $result; > my @f; > for(0,6..17,28,29,31..33,38,39) { > $f[$_]=substr($result,$_,$_==0?6:1); >-- >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 8627
:
11572
|
11573
|
11637
| 11638