# --
# AgentTicketActionPopupClose.dtl - provides HTML for closing a popup after a finished request
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AgentTicketActionPopupClose.dtl,v 1.4 2010/12/06 13:14:33 martin Exp $
# --
# 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.
# --

<!-- dtl:block:LoadParentURLAndClose -->
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
if (window.opener) {
    window.opener.Core.UI.Popup.FirePopupEvent('URL', { URL: '$Env{"Baselink"}$Data{"URL"}' });
    window.close();
}
else {
    window.location.href = '$Env{"Baselink"}$Data{"URL"}';
}
//]]></script>
<!--dtl:js_on_document_complete-->
<!-- dtl:block:LoadParentURLAndClose -->

<!-- dtl:block:ReloadParentAndClose -->
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
if (window.opener) {
    window.opener.Core.UI.Popup.FirePopupEvent('Reload');
    window.close();
}
//]]></script>
<!--dtl:js_on_document_complete-->
<!-- dtl:block:ReloadParentAndClose -->
