<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index_clist.aspx.cs" Inherits="Webdisk.index_clist" %>

<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="style/gray/style.css" rel="stylesheet" type="text/css" />
    <link href="css/BaseStyle.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="themes/default/easyui.css"/>
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/Common.js" type="text/javascript"></script>
    <%--<script src="js/easyloader.js" type="text/javascript"></script>--%>
    <script src="js/jquery.easyui.min.js" type="text/javascript"></script>
    <title></title>
</head>
<body class="easyui-layout">
    <form id="form1" runat="server">
    <div id="zydg" style="width:740px;"></div>
    </form>
</body>
</html>
<script type="text/javascript">

    $(function () {
        //        using('datagrid', function () {
        $(window).resize(function () {
            $("#zydg").datagrid("resize",{ width: $("body").width() });
        });
        setTimeout(function(){

            $("#zydg").css("height", $("body").height() + "px");
            $('#zydg').datagrid({
                title: '',
                loadMsg: "数据加载中，请稍后……",
                nowrap: false,
                striped: true,
                showFooter: true,
                url: 'FileSpaceHandler.ashx?cmd=GetZYAllpathPage&orderby=<% if(Request["orderby"]!=null)Response.Write(Request["orderby"].ToString()); %>&kind=<% if(Request["kind"]!=null)Response.Write(Request["kind"].ToString()); %><% if(Request["username"]!=null)Response.Write("&username="+Request["username"].ToString()); %>',
                pageList: [10, 15, 20, 25, 30, 40, 50],
                pageSize: 20,
                sortName: 'lasttime',
                sortOrder: 'desc',
                remoteSort: true,
                fitColumns: true,
                idField: 'id',
                columns: [[
                        { field: 'filename', title: '资源标题', width: 250, align: 'left', fixed: true, sortable: true },
                        { field: 'jcvar', title: '教材版本', width: 100, align: 'center', sortable: true },
                        { field: 'nj', title: '年级', width: 100, align: 'center', sortable: true },
                        { field: 'zytype', title: '资源类型', width: 100, align: 'center', sortable: true },
                        { field: 'km', title: '科目', width: 80, align: 'center', sortable: true },
                        { field: 'fileext', title: '文件格式', width: 70, align: 'center', sortable: true }
                    ]],
                pagination: true,
                rownumbers: true,
                onLoadSuccess: function () {
                }
            });
            $("#zydg").datagrid("getPager").pagination({
                beforePageText: '第', //页数文本框前显示的汉字  
                afterPageText: '页    共 {pages} 页',
                displayMsg: '当前显示从第{from}条到{to}条 共{total}条记录',
                onBeforeRefresh: function (pageNumber, pageSize) {
                    $(this).pagination('loading');
                    $(this).pagination('loaded');
                }
            });
        }, 100);
        // 
        //        }
    });

</script>