var mnid = 3; var mtid = 0 var mcurrenttextpage = 1; var mtextpagecount = 10; var mcurrentvideopage = 1; var mvideopagecount = 6; var mcurrentaskpage = 1; var maskpagecount = 5; var mcurrentsearchpage = 1; var msearchpagecount = 10; var msearch = ""; var msearchcopy = ""; var msearchnid = 0; var defaultindex = 1007; var afxbool = false; var schoolvideodomainname = "null"; //$(document).ready(function () { // $("#iframevideo").hide(); // mnid = parseint($("#jb_xy_xxk a").attr("nid")); // mtid = parseint($("#jb_xy_xcdk a").attr("tid")); // school.leftmenuclick(mtid); //}); var school = { leftmenuclick: function (tid) { // if (tid == 1009 || tid == 1012 || tid == 1028 || tid == 1029) { // return; // } pagehelp.hideindex(); pagehelp.hidevideo(); pagehelp.hidesearch(); /***/ switch (mnid) { case 1: //$("#jb_xy_xcdk").find(".on").attr("vp", mcurrentvideopage); mcurrentvideopage = $("#idtypeli" + tid).attr("vp"); break; case 2: //$("#jb_xy_xcdk").find(".on").attr("tp", mcurrenttextpage); mcurrenttextpage = $("#idtypeli" + tid).attr("tp"); break; case 3: //$("#jb_xy_xcdk").find(".on").attr("ap", mcurrentaskpage); mcurrentaskpage = $("#idtypeli" + tid).attr("ap"); break; //default: alert("leftmenuclick select default mnid=" + mnid); } /***/ mtid = tid; pageedit.loadtypecss(); school.loadhtml(); school.loadpagenumber(); pageedit.loadpagechangecss(); /* * */ //alert($("#idtypeli" + tid).attr("leves")); //attr("leves") if ($("#idtypeli" + tid).attr("leves") == 2) { var temp = $("#jb_xy_tpk [id='jb_xy_tp_lbb']"); if (temp.length == 1) { temp.eq(0).find('a').trigger("click"); } } /* * */ }, navclick: function (nid) { pagehelp.hideindex(); pagehelp.hidevideo(); pagehelp.hidesearch(); /***/ switch (nid) { case 1: mcurrentvideopage = $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("vp"); break; case 2: mcurrenttextpage = $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("tp"); break; case 3: mcurrentaskpage = $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("ap"); break; // case 4: // $("#jb_xy_ym").show(); // $("#jb_xy_ym").html("1111"); // break; } /***/ mnid = nid; pageedit.loadnavcss(); school.loadhtml(); school.loadpagenumber(); pageedit.loadpagechangecss(); }, searchclick: function (nid) { pagehelp.hideindex(); if (mtid == defaultindex) { dt = helper_aspx.binddatalist(mcurrentaskpage, maskpagecount, mtid, 3, msearch).value; $("#jb_xy_xxk").hide(); $("#jb_xy_tpk").html(pageedit.loadhtmlask(dt)); } else { dt = helper_aspx.binddatalist(mcurrentsearchpage, msearchpagecount, -1, nid, msearch).value; $("#jb_xy_tpk").html(pageedit.loadhtmlsearch(dt)); } school.loadpagenumbersearch(nid); pageedit.loadpagechangecss(); }, indexclick: function () { pagehelp.showindex(); dt = helper_aspx.binddatalist(1, 6, defaultindex, 3, "").value; //pageedit.loadhtmlindex(dt); //wenchao 2014-09-11 首页去除课程建议模块 }, pageclick: function (pages) { //pagenumbers switch (mnid) { //mnid case 1: /***/ $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("vp", pages); //.on左侧菜单样式 /***/ mcurrentvideopage = pages; school.navclick(mnid); break; case 2: /***/ $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("tp", pages); /***/ mcurrenttextpage = pages; school.navclick(mnid); break; case 3: /***/ $("#jb_xy_xcdk").find(".jb_xy_xcdk_x").attr("ap", pages); /***/ mcurrentaskpage = pages; school.navclick(mnid); break; default: alert("pageclick select default"); } $("body,html").animate({ scrolltop: 0 }, 400); }, pageclicksearch: function (pages, nid) { mcurrentsearchpage = pages; school.searchclick(nid); $("body,html").animate({ scrolltop: 0 }, 400); }, pageclickleft: function () { var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var cupage = parseint(numberfirest) - 4; if (cupage <= 0) { cupage = 1; } school.pageclick(cupage); }, pageclickright: function () { afxbool = false; var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var length = 0; switch (mnid) { //mnid case 1: length = helper_aspx.pagechangelist(numberlast, mvideopagecount, mtid, mnid, msearch).value; break; case 2: length = helper_aspx.pagechangelist(numberlast, mtextpagecount, mtid, mnid, msearch).value; break; case 3: length = helper_aspx.pagechangelist(numberlast, maskpagecount, mtid, mnid, msearch).value; break; } if ((numberlast - numberfirest) == 6) { if (length <= 0) { school.pageclick(numberlast); afxbool = true; return; } //alert(length); if (length < 7) { school.pageclick(parseint(numberlast) + parseint(length) - 3) //school.pageclick(parseint(numberlast) + parseint(length)); } else { school.pageclick(parseint(numberfirest) + 9); } } }, pageclickleftsearch: function (nid) { var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var cupage = parseint(numberfirest) - 4; if (cupage <= 0) { cupage = 1; } school.pageclicksearch(cupage, nid); }, pageclickrightsearch: function (nid) { var numberfirest = $("#jb_xy_ym ul").find("a").first().text(); var numberlast = $("#jb_xy_ym ul").find("a").last().text(); var length = 0; length = helper_aspx.pagechangelist(numberlast, msearchpagecount, mtid, nid, msearch).value; if ((numberlast - numberfirest) == 6) { if (length <= 0) { school.pageclicksearch(numberlast, nid); afxbool = true; return; } if (length < 7) { school.pageclicksearch(parseint(numberlast) + parseint(length), nid); } else { school.pageclicksearch(parseint(numberfirest) + 9, nid); } } }, contentup: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.upcontentdefault(parseint($(obj).attr("cid")), newvalue).value); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 378, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("赞( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } }, contentdown: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.downcontent(parseint($(obj).attr("cid")), newvalue).value); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 378, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("踩( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } }, contentupvideo: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.upcontentdefault(parseint($(obj).attr("cid")), newvalue).value); if (result == 1) $(obj).html('' + newvalue + "赞").attr("count", newvalue); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 478, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("赞( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } }, contentdownvideo: function (obj) { var newvalue = parseint($(obj).attr("count")) + 1; var result = parseint(helper_aspx.downcontent(parseint($(obj).attr("cid")), newvalue).value); if (result == 1) $(obj).attr("count", newvalue); if (result == -3) { var url = '/subpage/login.aspx?isfromhelper=1'; dialog = art.dialog({ content: url, fixed: true, lock: true, padding: 0, height: 478, width: 590, iframe: true, scroll: false }); return; } if (result == 1) $(obj).text("赞( " + (newvalue) + " )").attr("count", newvalue); else { malert("系统提示", "已经踩或赞过", false, 2); } //$(obj).text((newvalue) + "踩").attr("count", newvalue).append(""); }, loadhtml: function () { var dt = null; // if (mtid == defaultindex) { mnid = 3; } if (mtid == defaultindex) { // dt = helper_aspx.binddatalist(mcurrenttextpage, mtextpagecount, mtid, 2, msearch).value; // pageedit.loadhtmltext(dt); dt = helper_aspx.binddatalist(mcurrentaskpage, maskpagecount, mtid, mnid, msearch).value; pageedit.loadhtmlask(dt); // $("#jb_xy_xxk").hide(); return; } switch (mnid) { case 1: dt = helper_aspx.binddatalist(mcurrentvideopage, mvideopagecount, mtid, mnid, msearch).value; pageedit.loadhtmlvideo(dt); //$("#jb_xy_tpk").html(pageedit.loadhtmlvideo(dt)); break; case 2: dt = helper_aspx.binddatalist(mcurrenttextpage, mtextpagecount, mtid, mnid, msearch).value; pageedit.loadhtmltext(dt); //$("#jb_xy_tpk").html(pageedit.loadhtmltext(dt)); break; case 3: dt = helper_aspx.binddatalist(mcurrentaskpage, maskpagecount, mtid, mnid, msearch).value; pageedit.loadhtmlask(dt); //$("#jb_xy_tpk").html(pageedit.loadhtmlask(dt)); break; default: $("#jb_xy_tpk").hide(); $("#jb_xy_ym").hide(); //$("#jb_xy_tpk").html("default"); } }, loadpagenumber: function () { if (mtid == defaultindex) { if (isnullorempty($("#jb_xy_tp_lbb").html())) { //$("#jb_xy_ym").html(''); return; // $("#jb_xy_ym").html('暂时没有' + $(".jb_xy_xcdk_x").text() + '文档').css({ "font-size": "18px", "text-align": "center", "padding-top": "35px" }); // $("#jb_xy_tpk").hide(); // return; } //无数据 var length = helper_aspx.pagechangelist(mcurrenttextpage, mtextpagecount, mtid, 2, msearch).value; var start = 1; var endindex = 7; var lastvalue = parseint(mcurrenttextpage) + parseint(length); if (mcurrenttextpage > 4) { start = mcurrenttextpage - 3; endindex = start + 6; if (endindex > lastvalue) { endindex = lastvalue; } } if (start < 7 && endindex > lastvalue) { endindex = lastvalue; } var strv = '
\ 浏览次数:' + _read_count + '
\' + _content + '
标题
\类型
\我想要学习的课程
查看全部课程建议
' + _ask + '
\' + _content + '