<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewEml.aspx.cs" Inherits="Mail_ViewEml" meta:resourcekey="Page" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="referrer" content="no-referrer">
    <link rel="stylesheet" href="../libs/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../libs/fontawesome/css/all.min.css" >
    <script type="text/javascript" src="../libs/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="../libs/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
    <script type="text/javascript">
        $(document).ready(function () {
            ShowMailBodyPanel();
        });

        function ShowMailBodyPanel() {
            ShowToShadowDom("mailBodyPanel", "mailTemplate", true, true);
        }

        function OpenViewEmlWindow(msgfile) {
            var url = "ViewEml.aspx?msgfile=" + msgfile;
            window.open(url, "");
        }

        function Close() {
            window.close();
        }
    </script>

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
            <CompositeScript>
            <Scripts>
                <asp:ScriptReference Path="~/libs/tabs/common.js" />
                <asp:ScriptReference Path="~/libs/tabs/dialog.js" />
            </Scripts>
        </CompositeScript>
        </asp:ScriptManager>

        <div class="container-fluid">
            <div class="row" id="toolBar" data-spy="affix">
                <div class="col-xs-12" style="padding-top:2px;padding-bottom:2px;">                    
                    <button type="button" id="closeToolButton" class="btn btn-primary" onclick="Close();"><span class="fa-solid fa-xmark"></span></button>
                </div>
            </div>
        </div>

        <div class="container-fluid" style="padding-top:40px">
            <div class="row">
                <div class="col-xs-12">
                    <asp:Literal ID="SubjectLabel" runat="server" Text="" Mode="Encode"></asp:Literal>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <small class="text-muted"><asp:Label ID="RecvDateLabel" runat="server" Text=""></asp:Label></small>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-8">
                    <small class="text-muted"><asp:Localize ID="Localize1" runat="server" meta:resourcekey="Localize1">보낸 사람</asp:Localize></small> <asp:Label ID="FromAddrLabel" runat="server" CssClass="label label-default" />
                </div>
                <div class="col-xs-4 text-right" >
                    <small class="mc-likeLink" data-toggle="collapse" data-target="#detailPanel"><asp:Localize ID="Localize2" runat="server" meta:resourcekey="Localize2">상세정보</asp:Localize></small>
                </div>
            </div>
            <div id="detailPanel" class="collapse">
                <div class="row">
                    <div class="col-xs-12">
                        <small class="text-muted"><asp:Localize ID="Localize3" runat="server" meta:resourcekey="Localize3">받는 사람</asp:Localize></small> <asp:Literal ID="ToAddrTag" runat="server" />
                    </div>
                </div>
                <div class="row <%=_ccCssClass%>">
                    <div class="col-xs-12">
                        <small class="text-muted"><asp:Localize ID="Localize4" runat="server" meta:resourcekey="Localize4">참조</asp:Localize></small> <asp:Literal ID="CcAddrTag" runat="server" />
                    </div>
                </div>
            </div>
            <div id="attachPanel" class="<%=_attachCssClass%>">
                <hr />
                <div class="mc-likeLink" data-toggle="collapse" data-target="#attachList">
                    <div class="row" style="padding-bottom:0.5em">
                        <div class="col-xs-12">
                            <i class="fa-solid fa-paperclip"></i> <asp:Label ID="AttachSummaryLabel" runat="server"></asp:Label>
                        </div>
                    </div>
                </div>
                <div id="attachList" class="list-group collapse">
                    <asp:Literal ID="AttachListTag" runat="server" />
                </div>
            </div>
            
            <hr />
            <div id="mailBodyPanel"></div>
        </div>

        <template id="mailTemplate">
            <asp:PlaceHolder ID="MsgBodyHolder" runat="server" EnableViewState="false"></asp:PlaceHolder>
        </template>
    </form>
    
</body>
</html>
