<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="operate.aspx.cs" Inherits="WebApp.Wpdcc.ShareBackup.operate" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>共享模板包</title>
    <meta name="description" content="共享模板包" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <!--#include file = "../assets/head.htm" -->
    <style type="text/css">
    .ace-thumbnails > li
    {
    	margin:20px;
    	border:1px solid #22bfce;
    	}
    </style>
</head>
<body class="no-skin">
    <form id="form1" runat="server">

            <div class="main-content-inner">
                <!-- #section:basics/content.breadcrumbs -->
                <div class="breadcrumbs" id="breadcrumbs">
                    <script type="text/javascript">
                        try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
                    </script>

                    <ul class="breadcrumb">
                        <li>
                            <i class="ace-icon fa fa-home home-icon"></i>
                            主页
                        </li>
                        
                        <li class="active">共享模板包</li>
                    </ul>
                    <!-- /.breadcrumb -->
                    <!-- /section:basics/content.searchbox -->
                </div>
                <!-- /section:basics/content.breadcrumbs -->
                <div class="page-content">
                    <!-- /section:settings.box -->
                    <!-- PAGE CONTENT BEGINS -->
                    <div class="page-header">
                        <div class="row form-horizontal">
                            <div id="trManage" runat="server" class="col-xs-12">
                              <div class="col-xs-5">
                                <asp:Panel ID="Panel1" runat="server" CssClass="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1">备份名称：</label>
                                    <div class="col-sm-9">
                                        <asp:TextBox ID="uploadName" runat="server" CssClass="col-xs-10 col-sm-7"></asp:TextBox>
                                        &nbsp;
                                        <asp:Button ID="EditButton" runat="server" Text="修改" Visible="false" CssClass="btn btn-sm btn-primary" OnClick="EditButton_Click"></asp:Button>
                                    </div>
                                </asp:Panel>

                                <asp:Panel ID="Panel2" runat="server" CssClass="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1">上传备份文件：</label>
                                    <div class="col-sm-5">
                                        <input id="uploadfile" type="file" runat="server" style="display: inline-block;" class="col-xs-10 col-sm-4">
                                    </div>
                                    <asp:Button ID="upload" runat="server" Text="开始上传" OnClick="upload_Click" CssClass="btn btn-sm btn-primary"></asp:Button>
                                    
                                </asp:Panel>
                              </div>
                              <div class="col-xs-7">  
                                <asp:Panel ID="Panel3" runat="server" CssClass="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1">本地备份目录检测：</label>
                                    <div class="col-sm-9">
                                        <asp:Label ID="explain" runat="server" CssClass="col-xs-10 col-sm-7 control-label">暂未检测到备份文件</asp:Label>
                                        <asp:Button ID="auto" runat="server" Text="自动添加" Visible="false" CssClass="btn btn-sm btn-primary" OnClick="auto_Click"></asp:Button>
                                    </div>
                                </asp:Panel>
                              </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <ul class="ace-thumbnails clearfix">
                                <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                                    <ItemTemplate>
                                        <li>
                                            <a href='<%# PathPrefix + "wpdcc/ShareBackup/showtemplatepreview.aspx?pkId="+ Eval("pkId") %>' data-rel="colorbox" class="cboxElement" target="_blank">
                                                <img width="320" height="240" alt="320x240" src="<%# Eval("remark") %>">
                                                <div class="text">
                                                    <div class="inner">
                                                        <span><%# Eval("name") %></span>
                                                    </div>
                                                </div>
                                            </a>
                                            <div class="tools tools-bottom">
                                                <asp:HyperLink ID="previewTemplate" runat="server" NavigateUrl='<%# PathPrefix + "wpdcc/ShareBackup/showinfo.aspx?pkId="+ Eval("pkId") %>' Target="_blank"><i class="ace-icon fa fa-search-plus" title="查看信息"></i></asp:HyperLink>
                                                <asp:HyperLink ID="downBackup" runat="server" Target="_blank" NavigateUrl='<%# PathPrefix + "wpdcc/ShareBackup/down.aspx?pkId="+Eval("pkId") %>'><i class="ace-icon fa fa-download" title="下载"></i></asp:HyperLink>                                           
                                                <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="edit" CommandArgument='<%# Eval("pkId") + "&" + Eval("type") %>'><i class="ace-icon fa fa-pencil" title="编辑"></i></asp:LinkButton>
                                                <asp:LinkButton ID="dell" runat="server" CommandName="del1" CommandArgument='<%# Eval("pkId") %>'><i class="ace-icon fa fa-trash-o red" title="删除"></i></asp:LinkButton>
                                                <asp:HyperLink ID="hyDownToServer" runat="server" NavigateUrl='<%# "./DownToServer.aspx?pkId="+Eval("pkId")+"&name=" + Eval("name") %>' Target="_blank"><i class="ace-icon fa fa-cloud-download" title="下载到本地"></i></asp:HyperLink>
                                                
                                            </div>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

    </form>
    <!--#include file = "../assets/foot.htm" -->
    <script type="text/javascript">

        jQuery(function ($) {
            
            $('#uploadfile').ace_file_input({
                no_file: '没有文件 ...',
                btn_choose: '请选择',
                btn_change: '选好了',
                droppable: false,
                onchange: null,
                thumbnail: false //| true | large
                //whitelist:'gif|png|jpg|jpeg'
                //blacklist:'exe|php'
                //onchange:''
                //
            });


        });
    </script>
</body>
</html>
