Bugzilla – Attachment 3436 Details for
Bug 5955
Biblio::PrepareItemrecordDisplay value_builder (plugins) support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
adds value_builder (plugins) support to PrepareItemrecordDisplay
0001-Bug-5955-value_builder-support-for-PrepareItemrecord.patch (text/plain), 2.10 KB, created by
Dobrica Pavlinusic
on 2011-03-25 22:06:24 UTC
(
hide
)
Description:
adds value_builder (plugins) support to PrepareItemrecordDisplay
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2011-03-25 22:06:24 UTC
Size:
2.10 KB
patch
obsolete
>From 70604606f5d586a1d88ae07bf56bf764e4f95e54 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Fri, 25 Mar 2011 23:02:01 +0100 >Subject: [PATCH] Bug #5955 - value_builder support for PrepareItemrecordDisplay > >--- > C4/Biblio.pm | 25 +++++++++++++++++++++++++ > 1 files changed, 25 insertions(+), 0 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 1b378df..f9a19dd 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2376,6 +2376,31 @@ sub PrepareItemrecordDisplay { > -tabindex => '', > -multiple => 0, > ); >+ >+ } elsif ( $tagslib->{$tag}->{$subfield}->{value_builder} ) { >+ # opening plugin >+ my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; >+ my $id = "tag_".$tag."_subfield_".$subfield; >+ my $attributes = " id=\"$id\" type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" "; >+ if (do $plugin) { >+ my $temp; >+ my $loop_data; >+ my $random = int(rand(1000000)); >+ my $extended_param = plugin_parameters( $dbh, $temp, $tagslib, $id, $loop_data ); >+ my ( $function_name, $javascript ) = plugin_javascript( $dbh, $temp, $tagslib, $id, $loop_data ); >+ my $change = index($javascript, 'function Change') > -1 ? >+ "return Change$function_name($random, '$id');" : >+ 'return 1;'; >+ $subfield_data{marc_value} = qq[<input $attributes >+ onfocus="Focus$function_name($random, '$id');" >+ onchange=" $change" >+ onblur=" Blur$function_name($random, '$id');" /> >+ <a href="#" class="buttonDot" onclick="Clic$function_name('$id'); return false;" title="Tag Editor">...</a> >+ $javascript]; >+ } else { >+ warn "Plugin Failed: $plugin"; >+ $subfield_data{marc_value} = "<input $attributes />"; # supply default input form >+ } > } else { > $subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" />"; > } >-- >1.7.2.5 >
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 5955
: 3436