diff --git a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm index c2c8412..73d4a87 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm @@ -138,7 +138,7 @@ sub configure { print $template->output(); } else { - $self->update_opacuserjs($mapping); + $self->update_opacuserjs($mapping, $custom_image); $self->go_home(); } } @@ -270,6 +270,7 @@ sub update_opacuserjs { my $template = $self->get_template( { file => 'opacuserjs.tt' } ); $template->param( 'mapping' => $mapping ); + $template->param( 'custom_image' => $custom_image ); my $coverflow_js = $template->output(); diff --git a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/opacuserjs.tt b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/opacuserjs.tt index bb05d81..2e5ac5b 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/opacuserjs.tt +++ b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/opacuserjs.tt @@ -5,7 +5,7 @@ $(document).ready(function () { $('[% m.selector %]').load("/coverflow.pl?id=[% m.id %]", function () { $('.koha-coverflow img').on("load", function(){ if ( this.naturalHeight == 1 ) { - $(this).attr("src", [% IF (custom_image) %]"[% custom_image %][% ELSE %]"http://media.bywatersolutions.com/Model/NoImage.png")[% END%]; + $(this).attr("src", [% IF (custom_image) %]"[% custom_image %]")[% ELSE %]"http://media.bywatersolutions.com/Model/NoImage.png")[% END%]; } }); var opt = {