Task.html

(开头部分) 22KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<script type="text/javascript">
    function Load() {
        $('.body').find('.search').button({ icons: { primary: "ui-icon-search" } });
        $('.body').find('.add').button({ icons: { primary: "ui-icon-plusthick" } });
        ClearNoRight();

        AJAX('Server/_Tag.asmx/getTags', {}, function (d) {
            var tag_html = '';
            $(d).each(function () {
                tag_html += '<a href="javascript:;" tagId="' + this.ID + '" title="' + (this.Desc || '') + '">' + this.Name + '</a>';
            });
            $('.tags').html(tag_html).find('a').click(function () {
                $(this).toggleClass('active');
            });
        });

        var html = '<option value="">全部</option>';
        $(_config.taskType).each(function () {
            html += '<option value="' + this.id + '">' + this.name + '</option>';
        });
        $('#Type').html(html);
        html = '<option value="">全部</option>';
        $(_config.taskStatus).each(function () {
            html += '<option value="' + this.id + '">' + this.name + '</option>';
        });
        $('#Status').html(html);

        $('#list').jqGrid({
            postData: { title: '', type: '', status: '', tags: [], onlyMy: false },
            datatype: function (pdata) {
                AJAX('Server/_Task.asmx/search', pdata, function (d) {
                    if (d.rows.length == 0 && pdata.page > 1) {
                        $("#list").setGridParam({ page: pdata.page -= 1 }).trigger("reloadGrid");
                        return;
                    }
                    $("#list")[0].addJSONData(d);
                    ClearNoRight();
                });
            },
            jsonReader: { repeatitems: false },
            height: 'auto',
            width: maxFrameWidth(),
            colNames: ['ID', '标题', '类别', '负责用户', '状态', '创建时间', '操作'],
            colModel: [
               { name: 'ID', index: 'ID', width: 2, key: true },
               { name: 'Title', index: 'Title', width: 6, formatter: function (i, o, row) { return '<a href="javascript:;" class="view" onclick="View(' + row.ID + ')">' + (row.Status == '3' ? ('<del>' + row.Title + '<del>') : row.Title) + '</a>' } },
               { name: 'Type', index: 'Type', align: 'center', width: 3 },
               { name: 'User.FullName', sortable: false, align: 'center', width: 3 },
               { name: 'StatusName', index: 'Status', align: 'center', width: 3 },
               { name: 'CreateDate', index: 'CreateDate', align: 'center', width: 3 },
               { name: 'ID', sortable: false, width: 3, align: 'center', formatter: function (i, o, row) { return '<a href="javascript:;" class="view" onclick="View(' + row.ID + ')">查看</a>&nbsp;&nbsp;<a href="javascript:;" class="edit" onclick="editorWindow(' + row.ID + ')">编辑</a>&nbsp;&nbsp;<a href="javascript:;" class="delete" onclick="Delete(' + row.ID + ')">删除</a>'; } }
            ],
            sortname: 'ID',
            sortorder: 'desc',
            rowNum: 10,
            rowList: [10, 20, 30],
            rownumbers: true,
            viewrecords: true,
            pager: $('#pager')
        });
后面还有 457 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。