DWZ (JUI) dwzPageBreak切换显示页数失效
经过firebug调试,这是一个bug,传到后台的参数没有得到及时替换,具体bug修复如下:修改dwz.ajax.js中代码:
/** * 处理navTab中的分页和排序 * targetType: navTab 或 dialog * rel: 可选 用于局部刷新div id号 * data: pagerForm参数 {pageNum:"n", numPerPage:"n", orderField:"xxx", orderDirection:""} * callback: 加载完成回调函数 */// 存在一个bug,没有替换options中的numPerPage大小// by ketayaofunction dwzPageBreak(options){ var op = $.extend({ targetType:"navTab", rel:"", data:{pageNum:"", numPerPage:"", orderField:"", orderDirection:""}, callback:null}, options); var $parent = op.targetType == "dialog" ? $.pdialog.getCurrent() : navTab.getCurrentPanel(); if (op.rel) { var $box = $parent.find("#" + op.rel); var form = _getPagerForm($box, op.data); // by ketayao,替换form中的numPerPage值 var params = $(form).serializeArray(); if (op.numPerPage) { params[1].value = op.numPerPage; } if (form) { $box.ajaxUrl({ type:"POST", url:$(form).attr("action"), data: params, callback:function(){ $box.find("[layoutH]").layoutH(); } }); } } else { var form = _getPagerForm($parent, op.data); var params = $(form).serializeArray(); // by ketayao,替换form中的numPerPage值 if (op.numPerPage) { params[1].value = op.numPerPage; } if (op.targetType == "dialog") { if (form) $.pdialog.reload($(form).attr("action"), {data: params, callback: op.callback}); } else { if (form) navTab.reload($(form).attr("action"), {data: params, callback: op.callback}); } }}