Lightbox nach update funktioniert nicht

Hilfe zu Znuny Problemen aller Art
Locked
shining01
Znuny expert
Posts: 270
Joined: 07 Apr 2011, 08:02
Znuny Version: 6.0.4
Real Name: Tom

Lightbox nach update funktioniert nicht

Post by shining01 »

Hallo,

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;
und /Kernel/Output/HTML/Standard/HTMLHead.tt ganz am Ende mit

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>
ergänzt. Eine jpg Datei wird z.B. immer herunter geladen statt in Lightbox geöffnet. Vielleicht kann mir jemand helfen. Danke!
Linux Debian Jessie
DB: postgres
shining01
Znuny expert
Posts: 270
Joined: 07 Apr 2011, 08:02
Znuny Version: 6.0.4
Real Name: Tom

[GELÖST] Re: Lightbox nach update funktioniert nicht

Post by shining01 »

Ich weiß nicht genau warum, aber nach ca. 6 Std. gehts nun plötzlich. Den Cache vom Browser hatte ich gelöscht. Apache hatte ich ebenfalls neu gestartet. Irgendwo war scheinbar noch etwas im Cache. ?????
Linux Debian Jessie
DB: postgres
Locked