nach meinem update von 4.0.7 auf die 4.0.8 funktioniert mein Lightbox nicht mehr. Ich habe folgende Dateien wieder ergänzt:
/Kernel/Output/HTML/ArticleAttachmentDownload.pm
Code: Select all
# --
# Kernel/Output/HTML/ArticleAttachmentDownload.pm
# Copyright (C) 2001-2015 xxx, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
package Kernel::Output::HTML::ArticleAttachmentDownload;
use strict;
use warnings;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
# get needed objects
for (qw(ConfigObject LogObject DBObject LayoutObject UserID TicketObject ArticleID)) {
$Self->{$_} = $Param{$_} || die "Got no $_!";
}
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
# check needed stuff
for (qw(File Article)) {
if ( !$Param{$_} ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Need $_!"
);
return;
}
}
# download type
my $Type = $Self->{ConfigObject}->Get('AttachmentDownloadType') || 'attachment';
# if attachment will be forced to download, don't open a new download window!
my $Target = 'target="AttachmentWindow" ';
if ( $Type =~ /inline/i ) {
$Target = 'target="attachment" ';
}
my $rel = '';
if (lc $Param{File}->{Filename} =~ /\.(tif|jpg|png|gif|jpeg|tiff)$/i) {
$rel = '" rel="lightbox';
$Target = '';
}
return (
%{ $Param{File} },
Action => 'Download',
Link => $Self->{LayoutObject}->{Baselink} .
"Action=AgentTicketAttachment;ArticleID=$Param{Article}->{ArticleID};FileID=$Param{File}->{FileID}" . $rel,
Image => 'disk-s.png',
Target => $Target,
);
}
1;
Code: Select all
[% INCLUDE "HTMLHeadBlockEvents.tt" %]
<script src ="[% Config("Frontend::WebPath") | html %]js/thirdparty/lightbox-2.7.1/js/jquery-1.11.0.min.js"></script>
<script src ="[% Config("Frontend::WebPath") | html %]js/thirdparty/lightbox-2.7.1/js/lightbox.js"></script>
<link href="[% Config("Frontend::WebPath") | html %]js/thirdparty/lightbox-2.7.1/css/lightbox.css" rel="stylesheet" />
</head>