<%@ page language="C#" autoeventwireup="true" inherits="ims.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"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="browsermode" content="application"><meta name="format-detection" content="telephone=no">
</head>
<body class="waiting">
    <div class="hide"><div class="loadbar"><div></div><div></div><div></div><div></div><div></div></div></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">
        <CompositeScript Path="js/msajax.js" ScriptMode="Release">
            <Scripts>
                <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" /><asp:ScriptReference Name="MicrosoftAjax.js" /><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />
            </Scripts>
        </CompositeScript>
    </asp:ScriptManager>
    <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 class="menu" id="objMenu">
        <a href="#" onclick="return openObj()"><b>打开</b></a>
        <a href="#" onclick="return openObj(true)" class="pconly" title="按住Ctrl键单击缩略图可就地打开">就地打开</a>
        <a href="#" onclick="return setSource('cut')" id="cutObj">剪切</a>
        <a href="#" onclick="return setSource('clone')" id="copy">复制</a>
        <a href="#" onclick="return confirm('确定删除吗？')" runat="server" id="delObjItem" onserverclick="DelObjItem">删除</a>
        <a href="#" onclick="return editObj()" id="edit">编辑</a>
        <a href="#" onclick="return renameObj()" id="rename">重命名</a>
        <a href="#" onclick="return toFav()" runat="server" id="addFavorite">收藏</a>
        <a href="#" onclick="return toCart()" runat="server" id="cart">加入购物车</a>
        <div class="pconly"></div>
        <a href="#" onclick="return openTemplet()" class="pconly">打开所属模板</a>
        <a href="#" runat="server" onserverclick="ShowObjAttributes" class="pconly" id="objAttr">属性</a>
    </div>
    <div class="menu" id="dirMenu">
        <a href="#" onclick="return openDir()"><b>打开</b></a>
        <a href="#" onclick="return setSource('cut','dir')" id="cutDir">剪切</a>
        <a href="#" onclick="return confirm('确定删除吗？')" id="delDir" runat="server" onserverclick="DelDir">删除</a>
        <a href="#" onclick="return renameDir()" runat="server" id="renameDir">重命名</a>
        <a href="#" onclick="return Search()" id="dirSearch">搜索</a>
        <a href="#" id="shortcut" runat="server" onserverclick="AddShortcut" class="pconly" onclick="shortcutAdded()">添加快捷方式</a>
        <div id="sep" class="pconly"></div>
        <a href="#" runat="server" onserverclick="ShowPower" id="dirPower">权限</a>
        <a href="#" runat="server" onserverclick="ShowAttributes" class="pconly" id="dirAttr">属性</a>
    </div>
    <div class="menu" id="fileMenu">
        <a href="#" onclick="return tryOpenFile()"><b>打开</b></a>
        <a href="#" onclick="return setSource('cut','file')" id="cutFile">剪切</a>
        <a href="#" onclick="return toDelFile()" id="delFile" runat="server" onserverclick="DelFile">删除</a>
        <a href="#" onclick="return renameFile()" runat="server" id="renameFile">重命名</a>
        <div></div>
        <a href="#" onclick="return copyUrl(this);">复制链接地址</a>
        <a href="#" onclick="return toDown();" id="dl">下载</a>
    </div>
    <div class="menu" id="bodyMenu">
        <a href="#" class="hasSubMenus pconly" runat="server" id="types" onclick="return false;" visible="false" onserverclick="ShowOnly" onmouseover="showSubMenu(event,'classify')" onmouseout="hideSubMenu(event,'classify')">只看</a>
        <a href="#" class="hasSubMenus pconly" runat="server" id="addData" onmouseover="showSubMenu(event,'addMenus')" onmouseout="hideSubMenu(event,'addMenus')">新建</a>
        <label runat="server" id="upload">上传文件<input id="fileToUpload" runat="server" multiple="multiple" type="file" name="fileToUpload" /><a runat="server" id="aReload" class="hide" onserverclick="BindFiles"></a></label>
        <a href="#" onclick="return add();" runat="server" id="addDir">新建目录</a>
        <a href="#" onclick="return false;" onmouseover="showSubMenu(event,'sub_sort')" onmouseout="hideSubMenu(event,'sub_sort')" class="hasSubMenus">排序</a>
        <a href="#" id="filesort" runat="server" onserverclick="SortFiles" onclick="return false;" onmouseover="showSubMenu(event,'file_sort')" onmouseout="hideSubMenu(event,'file_sort')" class="hasSubMenus">文件排序</a>
        <a href="#" runat="server" id="paste" onserverclick="Paste">粘贴</a>
        <a href="#" runat="server" id="curDirPower" onserverclick="ShowPower">权限</a>
        <a href="#" id="search" onclick="return Search(true);">搜索</a>
        <a href="#" runat="server" onserverclick="ShowAttributes" id="bodyAttr" class="pconly">属性</a>
        <div></div>
        <a href="#" onclick="return back();">返回</a>
    </div>
    <div class="menu" id="addMenus" runat="server" onmouseout="hideSubMenu(event,this)"></div>
    <div class="menu" id="classify" runat="server" visible="false" onmouseout="hideSubMenu(event,this)"></div>
    <asp:UpdatePanel ID="upSortMenus" runat="server" RenderMode="inline" UpdateMode="conditional">
    <ContentTemplate>
        <div class="menu" id="sub_sort" runat="server" onmouseout="hideSubMenu(event,this)"></div>
     </ContentTemplate>
    </asp:UpdatePanel>
    <div class="menu" id="file_sort" onmouseout="hideSubMenu(event,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="确定">
    <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">
    <ContentTemplate>
        <asp:ListBox ID="roles" CssClass="fixedBox" Rows="5" runat="server" AutoPostBack="true" SelectionMode="single" OnSelectedIndexChanged="RoleChanged"></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="sepline2"></div>
        <asp:CheckBox ID="applyToChildren" runat="server" Text="应用于所有下级目录" />
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop ID="p3" ShowOkButton="false" CanelButtonText="确定" runat="server">
    <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" class="btmPager" UpdateMode="conditional" RenderMode="Block">
    <ContentTemplate>
        <table runat="server" id="PagerBar" class="PagerBar" oncontextmenu="return CanelEvent(event);"><tr><td class="nowrap">
            <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>
    <ul id="curInfo">
        <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>
    <script src="js/comm.js"></script><script src="js/dir.js"></script>
    </form>
</body>
</html>