<%@ page language="C#" autoeventwireup="true" inherits="disk__admin_manager_disk_main, App_Web_nrfe0pyq" %>


<!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>
    <title>操作</title>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.min.js?v=1.7.2")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.easyui.min.js?v=1.3")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/locale/easyui-lang-zh_CN.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.load.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.json.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/easy_ui/jquery.easyui.validtor.js?v=1.0")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/disk/control/js/PageDialog.js?v=1.0")%>"></script>
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/easy_ui/themes/gray/easyui.css?v=1.0")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/easy_ui/themes/icon.css?v=1.0")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/easy_ui/load.css?v=1.0")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/disk/control/css/main.css?v=1.0")%>" />
    <script language="javascript" type="text/javascript">
    
    var currentColumn = "";
   
    $(function(){
        $("body").css("visibility","visible");
        $("#dataview").datagrid({
            toolbar:"#toolbar",
            fit:true,
            idfield:"id",
            border:false,
            pageSize:<%=pagesize %>,
            resizable:true,
            pagination:true,
            rownumbers:true,
            url:"disk_ResourceFile/disk_ResourceFile_dataview.aspx?all=true",
            queryParams:{
                df_term:'<%=CurrentTerm %>'
            },
            onLoadSuccess:function(){ $('#dataview').datagrid("unselectAll"); }
          
        });
     
        
        $("#Catalog").tree({
                url:"disk_Catalog/disk_Catalog_Tree.aspx?hide=true",
                onSelect:function(node){
                    currentColumn = node.id;
                    $("#dataview").datagrid("load",{ 'df_dcid' :node.id});
                }
        });
    });
    		
																								             
    function nameFormat(value,row,index){
        return "<a href='disk_ResourceFile/disk_Down.aspx?id="+row.id+"'>"+value+"</a>";
    }
    
    function df_RecommendFormat(value,row,index){
      
        return $.trim(value)=="True"?"<span style='color:red'>是</span>":"否";
	}

       function query(){
	        $("#dataview").datagrid("load",{
                df_name:$("#txtQname").val(),
                df_code:$("#txtQcode").val(),
                df_user:$("#txtQUser").val(),
                df_Recommend:$("#txtQtj").get(0).checked,
                df_term:$("#ddlTerm").val()
	        });
   	   }
   	   function allData(){
   	       $("#dataview").datagrid("load",{});
   	   }
    </script>
   
   
</head>
<body class="easyui-layout" style="visibility:hidden">
    <div region="center" border="false">
        <table id="dataview">
            <thead>
                <tr>  
					<th field="ck" checkbox="true"></th>
                    <th field="ur_name" width="70" sortable="true">上传用户</th>
                    <th field="t_name" width="150" sortable="true">所属学期</th>
					<th field="dc_name" width="70" sortable="true">所属科目</th>
					<th field="df_name" width="270"  formatter='nameFormat' >教案名称</th>
					<th field="df_code" width="80" sortable="true">资源提取码</th>
					<th field="df_Recommend" width="30" formatter='df_RecommendFormat' >推荐</th>
					<th field="df_cdate" width="120" sortable="true">修改日期</th>

                </tr>
            </thead>
        </table>
    </div>
    
     <div  region="east" border="false" title="栏目" split="true" style="width: 200px;">
        <ul id="Catalog" class="easyui-tree">
        </ul>
     </div>
    <div id="toolbar" style="height: 55px">
        教案名称：
        <input id="txtQname" name="name" type="text" maxlength="255" onkeydown="if(event.keyCode==13)query()" style="width: 133px" />
        提取码：
        <input id="txtQcode" name="name" type="text" maxlength="255" onkeydown="if(event.keyCode==13)query()" style="width: 117px" />
        <br />
        上传用户：
        <input id="txtQUser" name="name" type="text" maxlength="255" onkeydown="if(event.keyCode==13)query()" style="width: 68px" />
        所属学期：
        <select id="ddlTerm">
            <%=bindTerm() %>
        </select>
        是否推荐：<input id="txtQtj" type="checkbox" />
        &nbsp;
      
        <a href="#" class="easyui-linkbutton"  iconcls="icon-search" plain="true" onclick="query()">查询</a>
        <a href="#" class="easyui-linkbutton"  iconcls="icon-search" plain="true" onclick="allData()">所有</a>
      
     
    </div>
    
</body>
</html>
