<%@ Page Language="C#" AutoEventWireup="true" CodeFile="View.aspx.cs" Inherits="Contact_View" 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="format-detection" content="telephone=no">
    <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 () {
            Dialog.setMessage('<asp:Literal runat="server" Text="<%$ Resources:Dialog, Title%>" />', '<asp:Literal runat="server" Text="<%$ Resources:Dialog, OK%>" />', '<asp:Literal runat="server" Text="<%$ Resources:Dialog, Cancel%>" />');
            Dialog.setUseBrowserConfirm(<%=AppSetting.UseBrowserConfirm%>);
        });

        function OpenNewMail(contactid, prefer) {
            location.href = "../Mail/New.aspx?action=new&contact=" + contactid + "&prefer=" + prefer;
        }

        function ModifyContact() {
            location.href = "Edit.aspx?folder=<%=_folderId%>&page=<%=_page%>&contact=<%=_contactId %>";
        }

        function ConfirmDelete() {
            Dialog.confirm({
                content: '<asp:Literal runat="server" Text="<%$ Resources:, Msg01%>" />',
                ok: function () {
                    __doPostBack("DeleteButton", "");
                }
            });
        }

        function CallPhone(number) {
            location.href = "tel:" + number;
        }

        function GotoList() {
            location.href = "List.aspx?folder=<%=_folderId%>&page=<%=_page%>";
        }
    </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="modifyToolButton" runat="server" class="btn btn-primary" onclick="ModifyContact()"><span class="fa-solid fa-pen"></span></button>
                    <button type="button" id="deleteToolButton" runat="server" class="btn btn-primary" onclick="ConfirmDelete()"><span class="fa-solid fa-trash-can"></span></button>                    
                    <span>&nbsp;</span>
                    <button type="button" id="closeToolButton" class="btn btn-primary" onclick="GotoList();"><span class="fa-solid fa-bars"></span></button>
                </div>
            </div>
        </div>

        <div class="container-fluid" style="padding-top:40px">
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="row">
                        <div class="col-xs-4">
                            <asp:Image ID="IDPhotoImage" runat="server" ImageUrl="~/Images/Contact/noimage.gif" style="width: 70px; height: 93px; border: 1px solid #aaaaaa;" />
                        </div>
                        <div class="col-xs-8">
                            <div>
                                <h4><asp:Literal runat="server" ID="DisplayNameLabel" Mode="Encode" /></h4>
                            </div>
                            <div>
                                <asp:Literal runat="server" ID="CompanyLabel" Mode="Encode" />
                            </div>
                            <div>
                                <asp:Literal runat="server" ID="DeptLabel" Mode="Encode" />
                            </div>
                            <div>
                                <asp:Literal runat="server" ID="JobTitleLabel" Mode="Encode" />
                            </div>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                                <ContentTemplate>
                                    <div class="checkbox">
                                        <label><asp:CheckBox ID="FavoriteCheckBox" runat="server" AutoPostBack="true" Text="" OnCheckedChanged="FavoriteCheckBox_CheckedChanged" /><asp:Localize ID="Localize1" runat="server" meta:resourcekey="Localize1">자주 사용하는 연락처에 등록</asp:Localize></label>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div id="MemoPanel" runat="server" class="row">
                        <div class="well well-sm" style="margin: 5px 5px 0px 5px;">
                            <asp:Label runat="server" ID="MemoLabel" />
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading"><asp:Localize ID="Localize2" runat="server" meta:resourcekey="Localize2">전화번호</asp:Localize></div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize3" runat="server" meta:resourcekey="Localize3">회사</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobPhoneLabel" runat="server"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize4" runat="server" meta:resourcekey="Localize4">휴대폰</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="MobileLabel" runat="server"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize5" runat="server" meta:resourcekey="Localize5">팩스</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobFaxLabel" runat="server"></asp:Literal></div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <asp:Localize ID="Localize6" runat="server" meta:resourcekey="Localize6">전자메일</asp:Localize>
                    <button type="button" class="btn btn-default btn-xs pull-right" data-toggle="collapse" data-target="#EmailPanel"><span class="fa-solid fa-chevron-down"></span></button>
                </div>
                <div class="panel-body collapse" id="EmailPanel" runat="server">
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize7" runat="server" meta:resourcekey="Localize7">전자메일1</asp:Localize></div>
                        <div class="col-xs-8"><asp:HyperLink ID="EmailLink1" runat="server" NavigateUrl="#"></asp:HyperLink></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize8" runat="server" meta:resourcekey="Localize8">전자메일2</asp:Localize></div>
                        <div class="col-xs-8"><asp:HyperLink ID="EmailLink2" runat="server"></asp:HyperLink></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize9" runat="server" meta:resourcekey="Localize9">전자메일3</asp:Localize></div>
                        <div class="col-xs-8"><asp:HyperLink ID="EmailLink3" runat="server"></asp:HyperLink></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize10" runat="server" meta:resourcekey="Localize10">홈페이지</asp:Localize></div>
                        <div class="col-xs-8"><asp:HyperLink ID="WebPageLink" runat="server" Target="_blank"></asp:HyperLink></div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <asp:Localize ID="Localize11" runat="server" meta:resourcekey="Localize11">회사 주소</asp:Localize>
                    <button type="button" class="btn btn-default btn-xs pull-right" data-toggle="collapse" data-target="#JobAddrPanel"><span class="fa-solid fa-chevron-down"></span></button>
                </div>
                <div class="panel-body collapse" id="JobAddrPanel">
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize12" runat="server" meta:resourcekey="Localize12">우편 번호</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobZipcodeLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize13" runat="server" meta:resourcekey="Localize13">시/도</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobCityLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize14" runat="server" meta:resourcekey="Localize14">구/군/시</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobStateLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize15" runat="server" meta:resourcekey="Localize15">주소</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobStreetLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize16" runat="server" meta:resourcekey="Localize16">국가</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="JobCountryLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <asp:Localize ID="Localize17" runat="server" meta:resourcekey="Localize17">집 주소</asp:Localize>
                    <button type="button" class="btn btn-default btn-xs pull-right" data-toggle="collapse" data-target="#HomeAddrPanel"><span class="fa-solid fa-chevron-down"></span></button>
                </div>
                <div class="panel-body collapse" id="HomeAddrPanel">
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize18" runat="server" meta:resourcekey="Localize12">우편 번호</asp:Localize></div>
                        <div class="col-xs-8"><asp:Label ID="HomeZipcodeLabel" runat="server"></asp:Label></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize19" runat="server" meta:resourcekey="Localize13">시/도</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="HomeCityLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize20" runat="server" meta:resourcekey="Localize14">구/군/시</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="HomeStateLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize21" runat="server" meta:resourcekey="Localize15">주소</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="HomeStreetLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4"><asp:Localize ID="Localize22" runat="server" meta:resourcekey="Localize16">국가</asp:Localize></div>
                        <div class="col-xs-8"><asp:Literal ID="HomeCountryLabel" runat="server" Mode="Encode"></asp:Literal></div>
                    </div>
                </div>
            </div>
        </div>

        <div style="display:none">
            <asp:LinkButton ID="DeleteButton" runat="server" OnClick="DeleteButton_Click" Text="" /> 
        </div>
    </form>
</body>
</html>
