<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Upload.aspx.cs" Inherits="Filebox_Upload" ValidateRequest="false" 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">
    <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 () {
        });

        function ApplyUpload() {
            var wnd = window.opener;
            window.setTimeout(function () {
                if (wnd.OnCompletedUpload != null) wnd.OnCompletedUpload();
                self.close();
            }, 100);
        }

        function Close() {
            window.close();
        }

        function GotoListLater() {
            window.setTimeout(function () {
                GotoList();
            }, 1000);
        }

        function GotoList() {
            location.href = "List.aspx?folder=<%=_folderId%>&type=<%=_type%>";
        }
    </script>

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </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="Button2" class="btn btn-primary" onclick="GotoList();"><span class="fa-solid fa-xmark"></span></button>
                </div>
            </div>
        </div>

        <div class="container-fluid" style="padding-top:40px">
            <asp:Panel ID="MsgBox" runat="server" Visible="false">
                <asp:Label ID="MsgBoxLabel" runat="server" Text="Label"></asp:Label>                
            </asp:Panel>

            <div class="panel panel-default">
                <div class="panel-heading"><asp:Localize ID="Localize1" runat="server" meta:resourcekey="L01">파일 업로드</asp:Localize></div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-xs-6"><asp:Localize ID="Localize2" runat="server" meta:resourcekey="L02">전체 용량</asp:Localize>:</div>
                        <div class="col-xs-6 text-right"><asp:Label ID="AllocSizeLabel" runat="server" Text=""></asp:Label></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-6"><asp:Localize ID="Localize3" runat="server" meta:resourcekey="L03">사용량</asp:Localize>:</div>
                        <div class="col-xs-6 text-right"><asp:Label ID="UsedSizeLabel" runat="server" Text=""></asp:Label></div>
                    </div>
                    <div class="row">
                        <div class="col-xs-6"><asp:Localize ID="Localize4" runat="server" meta:resourcekey="L04">업로드 가능 용량</asp:Localize>:</div>
                        <div class="col-xs-6 text-right"><asp:Label ID="AvailSizeLabel" runat="server" Text=""></asp:Label></div>
                    </div>
                    <div>&nbsp;</div>
                    <div class="form-group">
                        <label for="FileUpload1"><asp:Localize ID="Localize5" runat="server" meta:resourcekey="L05">파일 선택</asp:Localize>:</label>
                        <asp:FileUpload ID="FileUpload1" runat="server" CssClass="form-control" />
                    </div>
                    <div class="form-group">
                        <label for="DescTextBox"><asp:Localize ID="Localize6" runat="server" meta:resourcekey="L06">파일 설명</asp:Localize>:</label>
                        <input type="text" runat="server" id="DescTextBox" name="DescTextBox" class="form-control" maxlength="255" placeholder="" autocomplete="off" />
                    </div>
                    <asp:Button ID="UploadButton" runat="server" CssClass="btn btn-primary btn-block" Text="업로드" OnClick="UploadButton_Click" meta:resourcekey="UploadButton" />
                </div>
            </div>
        </div>
    </form>
</body>
</html>
