当前位置: 代码迷 >> JavaScript >> jquery的导航页面9(nodeDocPage.jsp续)
  详细解决方案

jquery的导航页面9(nodeDocPage.jsp续)

热度:856   发布时间:2012-11-05 09:35:11.0
jquery的导航页面九(nodeDocPage.jsp续)
    // 显示文档区内容
    function showDocs(node, data, pageIndexReset) {
        var curLevel=parseInt($(node).attr("level"));
        var doc_total = data.doc_total;
        if ((curLevel > 1 || (curLevel >= 1 && $("#itemId0").val() == "29-44"))
        && doc_total > 0) {
            docRow = doc_total;
            var curPageDocs = data.curPageDocs;
           // var viewsingledocUrl="/support/pages/kbcenter/view/product.do?actionFlag=detailProductSimple&web_doc_id=";
            var viewsingledocUrl="";
            var downloadUrl = "/support/pages/kbcenter/view/product.do?actionFlag=downloadDocument&web_doc_id=";
            var viewUrl = "/support/pages/kbcenter/view/product.do?actionFlag=readHedexUrl&web_doc_id=";
            $("#navi_corn_middle_div").text($(node).text());
            pageListFun(node, doc_total, pageIndexReset);
            $("#allcheck").click(allCheck);
            $("#allcheck").attr("checked", false);
            $("#product_doc_table_body").html("");
            var viewImg = "<img src='/support/images/NavigationBar/view.gif'/>";
            var downloadImg = "<img src='/support/images/NavigationBar/download_doc.gif'/>";
            if (curPageDocs == null || curPageDocs.length == 0) {
                return false;
            }
            for(var i=0;i<curPageDocs.length;i++) {
                var lastUpdate = "&nbsp;";
                if (curPageDocs[i].LAST_UPDATE_TIME != null && curPageDocs[i].LAST_UPDATE_TIME.length >= 10) {
                    lastUpdate = (curPageDocs[i].LAST_UPDATE_TIME).substring(0,10);
                }
                var docType = curPageDocs[i].MATERIAL_TYPE;
                var needUnzip = curPageDocs[i].NEED_UNZIP;
                 //文档类型为:产品文档,且是解包状态
                if(docType=="ProductManual" && needUnzip=="0"){
                viewsingledocUrl = "/support/pages/kbcenter/view/product.do?actionFlag=searchManualTableOfContents&web_doc_id=";
                }
                else {//其他文档类型
                viewsingledocUrl = "/support/DocView.do?doc_id=";
                }
                $("#product_doc_table_body").append("<tr><td class='doc_body_td_checkbox'><input type='checkbox' name='doc_id' class='noBorder' value=\""+curPageDocs[i].WEB_DOC_ID+"$"+curPageDocs[i].DOC_NAME+"\"/></td>"
                +"<td class='doc_body_td_name'><a target='_blank' style='color:#333333;' href='"+viewsingledocUrl + curPageDocs[i].WEB_DOC_ID+"&doc_type="+curPageDocs[i].MATERIAL_TYPE + "'>"+curPageDocs[i].DOC_NAME+"</a></td>"
                +"<td class='doc_body_td_view'>"+(curPageDocs[i].ISHEDEXDOCTYPE==1 ? "<a target='_blank' href='"+viewUrl+curPageDocs[i].WEB_DOC_ID+"&need_unzip="+curPageDocs[i].NEED_UNZIP+"&material_type="+curPageDocs[i].MATERIAL_TYPE+"&original_source="+curPageDocs[i].ORIGINAL_SOURCE+"'>"+viewImg+"</a>" : "&nbsp;")+"</td>"
                +"<td class='doc_body_td_download'>"+"<a target='_blank' href='"+downloadUrl+curPageDocs[i].WEB_DOC_ID+"&material_type="+curPageDocs[i].MATERIAL_TYPE+"&original_source="+curPageDocs[i].ORIGINAL_SOURCE+"'>"+downloadImg+"</a></td>"
                +"<td class='doc_body_td_views'>"+curPageDocs[i].READ_COUNT+"</td>"
                +"<td class='doc_body_td_date'>"+lastUpdate+"</td></tr>");
            }
            $("#product_doc_table_body > tr:odd").addClass("doc_table_tr_odd");
            $("#product_doc_table").css("visibility", "visible");
            $("#navi_doc_download_div").css("visibility", "visible");
            $("#pageBarBottom").css("visibility", "visible");
            $("#pageBarTop").css("visibility", "visible");
            $(".navi_corn_main").css("visibility", "visible");
            $(".navi_boxcontent_main").css("visibility", "visible");
            return true;
        }
  相关解决方案