<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_Admin_PageFileList, HoWaveVGO" enableviewstate="false" enableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>模板文件列表</title>
<style type="text/css">
body{
   font-size:12px;
}
a{
    color: #000000;
    text-decoration: none;
}
a:active{
    color: #000000;
    text-decoration: none;
    color:#FFFFFF;
    background-color:#27004F;
}
.upbt{
    cursor: pointer;
    width:18px;
    height:18px;
}
.upbt2{
    cursor: pointer;
    border: thin outset #FFFFFF;
    width:18px;
    height:18px;
}
.floer {
    cursor: pointer;
}
.floer2 a{
    cursor: pointer;
    background-color:#919191;
}
.filel{
    cursor: pointer;
}
</style>
<script type="text/javascript" language="javascript">
var DefaultPath = "<%=DefaultPath %>";
var DefaultFiler = "";
var style = "<%=style %>";

function Clickfile(fnamepath){
    if(fnamepath!=""){
        document.getElementById("filename").value = fnamepath;
        document.getElementById("OK").value = "选 择";
        ClearDefaultFiler();
    }
}
function ClearDefaultFiler(){
    DefaultFiler = "";
}
function dbClickfile(fnamepath){
    if(fnamepath!=""){
        Clickfile(fnamepath);
        selectFile();
    }
}
function Clickfiler(fnamepath){
    if(fnamepath!=""){
        document.getElementById("OK").value = "打 开";
        DefaultFiler = fnamepath;       
    }
}
function infiler(fnamepath){
    if(fnamepath!=""){       
        window.location.href="?style="+style+"&obj=<%=bojText %>&path=" +fnamepath+"&rnd="+Math.random();
    }else{
        document.location.href="?style="+style+"&obj=<%=bojText %>";
    }
}
function selectFile(){
    if(DefaultFiler!=""){
        document.location.href="?style="+style+"&obj=<%=bojText %>&path=" + DefaultPath + "\\" + DefaultFiler;
    }else if(document.getElementById("filename").value!=""){
        opener.document.getElementById("<%=bojText %>").value = DefaultPath + "\\" + document.getElementById("filename").value;
        window.close();
    }else{
        alert("请选择文件！");
        return false;
    }
}

function showhidden(){
    if(document.getElementById("file_leftdiv").style.display=="none"){
        document.getElementById("file_leftdiv").style.display="";
        document.getElementById("file_maindiv").style.width = "280px";
        document.getElementById("file_topdiv").style.display="none";
        document.getElementById("file_bar").innerHTML = "&lt;";
        style = "1";
    }else{
        document.getElementById("file_leftdiv").style.display="none";
        document.getElementById("file_maindiv").style.width = "420px";
        document.getElementById("file_topdiv").style.display="";
        document.getElementById("file_bar").innerHTML = "&gt;";
        style = "0";
    }
}

function selectshow(){
if(style=="0"){
    document.getElementById("file_leftdiv").style.display="none";
    document.getElementById("file_topdiv").style.display="";
    document.getElementById("file_maindiv").style.width = "420px";
}else{
    document.getElementById("file_leftdiv").style.display="";
    document.getElementById("file_topdiv").style.display="none";
    document.getElementById("file_maindiv").style.width = "280px";
}
}
</script>
</head>
<body style="background-color:Menu;">
    <form id="form1" runat="server">
    <div style="padding:5px 5px 5px 0;">
        <div id="file_topdiv" style="width:100%;">
           <div style="float:left; height:25px; width:70px; text-align:right; line-height:25px;">查找范围：</div>
           <div style="float:left;">
               <asp:DropDownList ID="FileList" runat="server">
               <asp:ListItem Text="当前方案路径" Value=""></asp:ListItem>
               </asp:DropDownList>
           </div>
           <div style="float:left;">&nbsp;&nbsp;<asp:Label ID="conlist" runat="server"></asp:Label></div>
        </div>
        <div style="width:100%;">
            <div id="file_leftdiv" style="float:left; width:150px;">
                <div style="overflow:auto; padding:5px; width:90%; height:290px; border: thin inset #ffffff; background-color:#FFFFFF;">
                <asp:Literal ID="RootList" runat="server"></asp:Literal>
                </div>
            </div>
            <div style="float:left; width:10px;"><br/><br/><br/><br/><br/><br/><br/><br/><br/><a id="file_bar" href="javascript:void(0)" onclick="return showhidden()">&lt;</a></div>
            <div style="float:left; width:auto;">
                <div id="file_maindiv" style="overflow:auto; padding:5px; width:280px; height:250px; border: thin inset #ffffff; background-color:White;">
                    <asp:Literal ID="FileNamelist" runat="server"></asp:Literal>
                </div>
                <div style="height:25px; padding:5px 0 0 0px;">
                    文件名：<input name="filename" id="filename" type="text" />&nbsp;
                    <input type="button" id="OK" value="确 定" onclick="return selectFile()" />&nbsp;
                    <input type="button" value="取 消" onclick="window.close();" />
                </div>
            </div>
        </div>
    </div>
    </form>
    <script language="javascript">
    selectshow();
    </script>
</body>
</html>
