<%@ page language="C#" autoeventwireup="true" inherits="ims.web.dir, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="dir">
<head runat="server">
    <title></title><meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body class="waiting">
    <div class="hide"><img src="images/loading.gif" />处理中，请稍候 …</div>
    <form id="form1" runat="server">
    <asp:HiddenField ID="curId" runat="server" /><asp:HiddenField ID="curObjItem" runat="server" /><asp:HiddenField ID="pasteSource" runat="server" />
    <asp:ScriptManager ID="s1" runat="server" EnablePageMethods="true" OnAsyncPostBackError="AsyncError" />
    <div id="conArea" class="conArea">
        <asp:UpdatePanel ID="upDirs" runat="server" ChildrenAsTriggers="false" OnPreRender="AttMouseEvent" UpdateMode="conditional" />
        <asp:UpdatePanel ID="upFiles" runat="server" ChildrenAsTriggers="false" OnPreRender="AttMouseEvent" UpdateMode="conditional" />
        <div id="line" class="area">
            <div class="title"><span></span><div>&nbsp;</div></div>
        </div>
        <asp:UpdatePanel ID="upObjs" runat="server" ChildrenAsTriggers="false" OnPreRender="AttMouseEvent" UpdateMode="conditional" />
   </div>
    <div class="menu" id="objMenu">
        <a accesskey="O" href="#" onclick="return openObj()"><b>打开</b> 　　　Alt+O</a>
        <a accesskey="Z" href="#" onclick="return openObj(true)" title="按住Ctrl键单击缩略图可就地打开">就地打开 　Alt+Z</a>
        <a accesskey="X" href="#" onclick="return setSource('cut')" id="cutObj">剪切 　　　Alt+X</a>
        <a accesskey="C" href="#" onclick="return setSource('clone')" id="copy">复制 　　　Alt+C</a>
        <a accesskey="D" href="#" onclick="return delConfirm()" runat="server" id="delObjItem" onserverclick="DelObjItem">删除 　　　Alt+D</a>
        <a accesskey="E" href="#" onclick="return editObj()" id="edit">编辑　　　 Alt+E</a>
        <a accesskey="N" href="#" onclick="return renameObj()">重命名　　 Alt+N</a>
        <a accesskey="F" href="#" onclick="return toFav()" runat="server" id="addFavorite">收藏　　　 Alt+F</a>
        <a accesskey="B" href="#" onclick="return toCart()" runat="server" id="cart">加入购物车 Alt+B</a>
        <div></div>
        <a href="#" onclick="return openTemplet()">打开所属模板</a>
        <a accesskey="A" href="#" runat="server" onserverclick="ShowObjAttributes" id="objAttr">属性　 　　Alt+A</a>
    </div>
    <div class="menu" id="dirMenu">
        <a accesskey="O" href="#" onclick="return openDir()"><b>打开</b> 　　　Alt+O</a>
        <a accesskey="X" href="#" onclick="return setSource('cut','dir')" id="cutDir">剪切 　　　Alt+X</a>
        <a accesskey="D" href="#" onclick="return delConfirm()" id="delDir" runat="server" onserverclick="DelDir">删除 　　　Alt+D</a>
        <a accesskey="N" href="#" onclick="return renameDir()" runat="server" id="renameDir">重命名　　 Alt+N</a>
        <a accesskey="F" href="#" onclick="return Search()" id="dirSearch">搜索　　　 Alt+F</a>
        <a href="#" id="shortcut" runat="server" onserverclick="AddShortcut" onclick="shortcutAdded()">添加快捷方式</a>
        <div id="sep"></div>
        <a accesskey="P" href="#" runat="server" onserverclick="ShowPower" id="dirPower">权限 　　　Alt+P</a>
        <a accesskey="R" href="#" runat="server" onserverclick="ShowAttributes" id="dirAttr">属性 　　　Alt+R</a>
    </div>
    <div class="menu" id="fileMenu">
        <a accesskey="O" href="#" onclick="return tryOpenFile()"><b>打开</b> 　　　Alt+O</a>
        <a accesskey="C" href="#" onclick="return setSource('cut','file')" id="cutFile">剪切 　　　Alt+C</a>
        <a accesskey="X" href="#" onclick="return toDelFile()" id="delFile" runat="server" onserverclick="DelFile">删除 　　　Alt+X</a>
        <a accesskey="N" href="#" onclick="return renameFile()" runat="server" id="renameFile">重命名　　 Alt+N</a>
        <div id="sep"></div>
        <a accesskey="D" href="#" onclick="return toDown();" id="dl">下载 　　　Alt+D</a>
    </div>
    <div class="menu" id="bodyMenu">
        <a href="#" class="hasSubMenus" runat="server" id="types" onclick="return CanelEvent();" visible="false" onserverclick="ShowOnly" onmouseover="showSubMenu('classify')" onmouseout="hideSubMenu('classify')">仅查看</a>
        <a href="#" class="hasSubMenus" runat="server" id="addData" onmouseover="showSubMenu('addMenus')" onmouseout="hideSubMenu('addMenus')">新建</a>
        <span runat="server" id="upload">
            <a accesskey="U" href="#" onclick="return false;" runat="server" id="aReload" onserverclick="aReload_ServerClick">上传文件 　Alt+U</a><span id="fuArea"><input id="fileToUpload" runat="server" multiple="multiple" type="file" contenteditable="false" title="上传文件" class="fu" name="fileToUpload" /></span>
        </span>
        <a accesskey="N" href="#" onclick="return add();" runat="server" id="addDir">新建目录 　Alt+N</a>
        <a href="#" onclick="return CanelEvent();" onmouseover="showSubMenu('sub_sort')" onmouseout="hideSubMenu('sub_sort')" class="hasSubMenus">排序</a>
        <a href="#" id="filesort" runat="server" onserverclick="SortFiles" onclick="return CanelEvent();" onmouseover="showSubMenu('file_sort')" onmouseout="hideSubMenu('file_sort')" class="hasSubMenus">文件排序</a>
        <a accesskey="P" href="#" runat="server" id="paste" onserverclick="Paste">粘贴 　　　Alt+P</a>
        <a accesskey="P" href="#" runat="server" id="curDirPower" onserverclick="ShowPower">权限 　　　Alt+P</a>
        <a accesskey="A" href="#" runat="server" onserverclick="ShowAttributes" id="bodyAttr">属性 　　　Alt+A</a>
        <a accesskey="F" href="#" id="search" onclick="return Search(true);">搜索　　　 Alt+F</a>
        <div></div>
        <a accesskey="B" href="#" onclick="return back();">返回　　　 Alt+B</a>
    </div>
    <div class="menu" id="addMenus" runat="server" onmouseout="hideSubMenu(this)"></div>
    <div class="menu" id="classify" runat="server" visible="false" onmouseout="hideSubMenu(this)"></div>
    <asp:UpdatePanel ID="upSortMenus" runat="server" RenderMode="inline" UpdateMode="conditional">
    <ContentTemplate>
        <div class="menu" id="sub_sort" runat="server" onmouseout="hideSubMenu(this)"></div>
     </ContentTemplate>
    </asp:UpdatePanel>
    <div class="menu" id="file_sort" onmouseout="hideSubMenu(this)">
        <a href="#" onclick="return sortFiles('Name');">名称</a>
        <a href="#" onclick="return sortFiles('FileType');">类型</a>
        <a href="#" onclick="return sortFiles('Size');">大小</a>
        <a href="#" onclick="return sortFiles('CreateTime');">上传时间</a>
    </div>
    <ims:Pop ID="p1" runat="server" ShowOkButton="false" CanelButtonText="确定" ShowProgress="false">
    <ContentTemplate>
        <ul>
            <li>名称：　<asp:Literal runat="server" ID="lDirName"></asp:Literal></li>
            <li>位置：　<asp:HyperLink ID="hlParentDir" runat="server"></asp:HyperLink></li>
            <li>包含：　<asp:Literal runat="server" ID="dirsCount"></asp:Literal> 个子目录</li>
            <li><div class="sepline"></div></li>
            <li>创建于：<asp:Literal runat="server" ID="buildTime"></asp:Literal></li>
            <li>创建人：<asp:Literal runat="server" ID="builder"></asp:Literal></li>
            <li runat="server" id="mender"></li>
        </ul>
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop ID="p2" runat="server" OnOkClick="savePowers" CustomCss="noline" ShowProgress="false">
    <ContentTemplate>
        <asp:ListBox ID="roles" CssClass="fixedBox" Rows="5" runat="server" AutoPostBack="true" SelectionMode="single" OnSelectedIndexChanged="RoleChanged" Height="100"></asp:ListBox>
        <div class="mtop_s mbottom_l">
        <asp:RadioButtonList ID="rblPowers" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PowerChanged" RepeatLayout="Flow" RepeatDirection="horizontal">
            <asp:ListItem Value="None">无</asp:ListItem>
            <asp:ListItem Value="Read">浏览</asp:ListItem>
            <asp:ListItem Value="Write">写入</asp:ListItem>
            <asp:ListItem Value="All">完全控制</asp:ListItem>
        </asp:RadioButtonList>
        </div>
        <div class="sepline"></div>
        <asp:CheckBox ID="applyToChildren" runat="server" Text="应用于所有下级目录" />
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop ID="p3" ShowOkButton="false" CanelButtonText="确定" runat="server" ShowProgress="false">
    <ContentTemplate>
        <ul>
            <li>名称： <asp:Literal runat="server" ID="lIden"></asp:Literal></li>
            <li>类型： <asp:HyperLink ID="hlTemplet" runat="server"></asp:HyperLink></li>
            <li runat="server" id="liDir">目录： <asp:HyperLink ID="hlDir" runat="server"></asp:HyperLink></li>
            <li><div class="sepline"></div></li>
            <li>保密级别： <asp:Image ID="imgSeclevel" runat="server" ImageAlign="AbsMiddle" /></li>
            <li>创建人： 　<asp:Literal runat="server" ID="lBuilder"></asp:Literal></li>
            <li>最后更新： <asp:Literal runat="server" ID="lModified"></asp:Literal></li>
        </ul>
    </ContentTemplate>
    </ims:Pop>
   <asp:UpdatePanel ID="upPager" runat="server" ChildrenAsTriggers="true" UpdateMode="conditional" RenderMode="Inline">
    <ContentTemplate>
        <table runat="server" id="PagerBar" class="PagerBar" oncontextmenu="return CanelEvent();"><tr><td>
            <asp:LinkButton ID="btnFirst" Text="首页" runat="server" ToolTip="快捷键：Home" AccessKey="F" OnClick="ToPage" />
            <asp:LinkButton ID="btnPrevious" Text="< 上一页" runat="server" ToolTip="快捷键：←或PageUp" AccessKey="P" OnClick="ToPage" />
            <asp:Label ID="lblCount" CssClass="count" runat="server"></asp:Label>
            <asp:LinkButton ID="btnNext" Text="下一页 >" runat="server" ToolTip="快捷键：→或PageDown" AccessKey="N" OnClick="ToPage" />
            <asp:LinkButton ID="btnLast" Text="末页" runat="server" ToolTip="快捷键：End" AccessKey="L" OnClick="ToPage" />
        </td><td class="right">
            <asp:DropDownList runat="server" id="ddlPagesize" AutoPostBack="True" OnSelectedIndexChanged="PageSizeChanged">
                <asp:ListItem Value="5">5项/页</asp:ListItem>
                <asp:ListItem Value="10">10项/页</asp:ListItem>
                <asp:ListItem Value="15">15项/页</asp:ListItem>
                <asp:ListItem Value="20">20项/页</asp:ListItem>
                <asp:ListItem Value="30">30项/页</asp:ListItem>
                <asp:ListItem Value="50" Selected="true">50项/页</asp:ListItem>
                <asp:ListItem Value="100">100项/页</asp:ListItem>
                <asp:ListItem Value="300">300项/页</asp:ListItem>
                <asp:ListItem Value="500">500项/页</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="ddlPager" AutoPostBack="true" OnSelectedIndexChanged="ToPage" runat="server"></asp:DropDownList>
        </td></tr></table>
    </ContentTemplate>
   </asp:UpdatePanel>
    <div class="hide">
        <ul id="AttributeInfo">
            <li runat="server" id="liLocation">位置：<asp:PlaceHolder runat="server" ID="phLocation"></asp:PlaceHolder></li>
            <li>
                <asp:UpdatePanel ID="upStat" runat="server" UpdateMode="conditional" RenderMode="Inline">
                <ContentTemplate>包含<asp:Label ID="countFile" runat="server"></asp:Label><asp:Label ID="countDir" runat="server"></asp:Label>个目录，<asp:Label ID="countObj" runat="server"></asp:Label>个项目</ContentTemplate>
                </asp:UpdatePanel>
            </li>
        </ul>
    </div>
    <script src="js/comm.js"></script><script src="js/dir.js"></script>
    </form>
</body>
</html>