BBSWeb/Scripts/Bbs/Topics.js

(开头部分) 2KB

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

var _BbsId = siteTracker.q.BbsId;
var _ForumId = siteTracker.q.ForumId;
var _SubBbsId = siteTracker.q.SubBbsId;
siteTracker.page = 1;
siteTracker.pagesize = 20;

$("#mainList").jqGrid({
    url: "",
    datatype: "local",
    colNames: ['编号', '状态', '项目', '主题', '提问者', '提问日期', '最后回复', '回复时间', '回复数'],
    colModel: [
{ name: 'id', index: 'id', width: 50, align: "center", hidden: true },
{ name: 'stateInfo', index: 'stateInfo', width: 50, formatter: transDeskState, align: "center" },
{ name: 'sub3ForumTitle', index: 'sub3ForumTitle', width: 102, align: "center" },
{ name: 'title', index: 'title', width: 390, align: "left" },
{ name: 'userName', index: 'userName', width: 60, align: "center" },
{ name: 'createTime', index: 'createTime', formatter: transTime, width: 115, align: "center" },
{ name: 'lastReplyUser', index: 'lastReplyUser', width: 70, align: "center" },
{ name: 'lastReplyTime', index: 'lastReplyTime', formatter: transTime, width: 115, align: "center" },
{ name: 'orders', index: 'orders', width: 50, align: "center", search: false }
],
    rowNum: 20,
    hoverrows: true,
    rownumbers: true,
    rownumWidth: 50,
    rowList: [15, 20, 25, 30, 35, 40, 45, 50],
    pager: '#pager2',
    sortname: 'lastReplyTime',
    viewrecords: true,
    sortorder: "desc",
    //    caption: siteTracker.title,
    height: "100%", emptyrecords: "没有记录", forceFit: true, gridview: true, pginput: true,
    prmNames: { page: "page", rows: "rows", sort: "sidx", order: "sord", search: "_search", nd: "nd", npage: null },
    viewsortcols: [false, 'vertical', true],
    onSelectRow: function (rowid, status) {
        location.href = "/Bbs/_Topic.aspx?TopicId=" + rowid;
    }
});
$("#mainList").jqGrid('navGrid', '#pager2', { edit: false, add: false, del: false, search: true });
if (_SubBbsId != 0) {
    $("#mainList").jqGrid("refresh", { url: "/Services/CommonData.aspx?action=Topics&SubBbsId=" + _SubBbsId });
}
if (_SubBbsId == 0) {
    $("#mainList").jqGrid("refresh", { url: "/Services/CommonData.aspx?action=Topics" });
}

function transDeskState(cellvalue, options, rowObject) {
    switch (cellvalue) {
        case "待回复":
            return "<font color=red>待回复</font>";
            break;
        case "待审批":
            return "<font color=blue>待审批</font>";
            break;
        case "已审批":
            return "<font color=green>已审批</font>";
            break;
        default:
            return "已审批";
            break;
后面还有 2 行代码,购买后查看完整代码

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

AI 解读 AI

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

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