日期:2014-05-16  浏览次数:20336 次

jquery的导航页面14(nodeDocPage.jsp续)
    //复选框的全选/反选事件 
    $("#allcheck").click(allCheck);

    function allCheck(){
        if ($("#allcheck").attr("checked")) {
            $("tbody[id=product_doc_table_body] input").each(
            function() {  
                $(this).attr("checked", "checked");  
            });
        }else{
            $("tbody[id=product_doc_table_body] input").each( function() {  
                $(this).attr("checked", "");  
            });
        }
    }

// 文档类型下拉框选择之后的事件处理  
function selectDocTypeChange(obj) {
    //每页显示的记录数
    var pageSize = $("#pageSize").val();
    if ($("#level_id").val() > 1 ) {
        var divTitle = $("#navi_corn_middle_div").text();
        var node=$("<a href='#' id='"+ $("#itemId").val() +"' level='"+ $("#level_id").val() +"'>"+ divTitle +"</a>");
   
        $("#materialType").val($(obj).val());
        selected_doc_type = $(obj).val();
                
        $.getJSON(
            root_url + "pages/navigation/gotoKBNavi.do?actionFlag=getCurPageDocs&pageSize="+pageSize+"&d=" + (new Date()).getTime() + "&colID=<%=colID%>&"
             + $("#selectDictForm").serialize(),
             function(data) {updatePageDocs(node, data, true);});
    } else {
        $("#materialType").val("");
    }
}

//点击download按钮的事件处理
$(function(){$("#download").click(confirmDown);});
//download提交函数
function confirmDown() {
        if(docRow==0)return;
        if(!isChecked("kBNavtreeForm","doc_id")){alert("<bean:message key='support.common.download.select'/>");return;}
        ooo('',800,600);
    }    
   
    function isChecked(form,field) {
        var obj;
        eval("obj=document."+form+"."+field);
        var flag = false;
        if (isNaN(obj.length)==true&&obj.checked==true) {
            flag = true;
        } else if (isNaN(obj.length)==false) {
            var len = obj.length;
            for(var i = 0 ; i < len ; i ++ ) {
 &