<%@ page language="C#" autoeventwireup="true" inherits="ims.web.selectDir, ims.web" enableviewstatemac="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" id="selectDir">
<head runat="server">
    <title>选择目录</title>
    <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>