<%@ page language="C#" autoeventwireup="true" inherits="ims.web.selectDir, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="selectDir">
<head runat="server">
    <title>选择目录</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <base target="_self" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="box" title="提示：可双击选定目录。">        
            <asp:TreeView ID="dirTree" CssClass="tree" LineImagesFolder="images/tree" SelectedNodeStyle-CssClass="selected" Font-Size="9pt" ExpandDepth="2" NodeStyle-HorizontalPadding="2" runat="server" ShowLines="true">
                <Nodes>
                    <asp:TreeNode Text="根目录" Selected="true" Value="0" NavigateUrl="javascript:s(0)"></asp:TreeNode>
                </Nodes>
            </asp:TreeView>
        </div>
        <div runat="server" id="ment" class="gray mtop_s"></div>
        <div class="footBtnArea"><input type="button" value="确定" class="btn" onclick="SelectOK()" /></div>
    <script src="js/comm.js"></script>
    <script>
        var dirid = 0, dirName = "　";
        $(function () {
            dirName = $("#dirTreet0").text();
            $("a[href^='javascript:s']").click(function () { dirName = $(this).text();}).dblclick(SelectOK);
        });
        function s(clickedid) {
            dirid = clickedid;
            $(".selected").removeClass("selected");
            $("a[href$='s(" + clickedid + ")']").addClass("selected");
        }
        function SelectOK() {
            var win = window.dialogArguments || opener;
            try {
                win.SelectedDir(dirid, dirName);
                top.close();
            } catch (e) { }
        }
    </script>
    </form>
</body>
</html>