DWZ打开dialog后页面再操作不刷新的问题,修改dwz.ajax.js文件中的dialogAjaxDone函数。
原函数:
function dialogAjaxDone(json) { DWZ.ajaxDone(json); if (json.statusCode == DWZ.statusCode.ok) { if (json.navTabId) { navTab.reload(json.forwardUrl, { navTabId: json.navTabId }); } else { var $pagerForm = $("#pagerForm", navTab.getCurrentPanel()); var args = $pagerForm.size() > 0 ? $pagerForm.serializeArray() : {} navTabPageBreak(args, json.rel); } switch(json.callbackType){ case "closeCurrent": $.pdialog.closeCurrent(); break; case "closeAndForward": $.pdialog.closeCurrent(); navTab.reload(json.forwardUrl, { navTabId: json.navTabId }); break; case "refreshAndForward": var dialog = $.pdialog.getCurrent(); $.pdialog.reload(dialog.data("url")); navTab.reload(json.forwardUrl, { navTabId: json.navTabId }); break; default : break; } } }
修改后的函数:
function dialogAjaxDoneDv(json) { DWZ.ajaxDone(json); if (json.statusCode == DWZ.statusCode.ok) { if (!json.navTabId) return; var $dialog = $("body").data(json.navTabId); var args = $dialog.size() > 0 ? $dialog.serializeArray() : {}; dialogPageBreak(args, json.rel); switch(json.callbackType){ case "closeCurrent": $.pdialog.closeCurrent(); break; case "closeAndForward": $.pdialog.closeCurrent(); $.pdialog.reload($dialog.data("url"), {data: {}, dialogId: json.navTabId, callback: null}); break; case "refreshAndForward": $.pdialog.reload($.pdialog.getCurrent().data("url")); $.pdialog.reload($dialog.data("url"), {data: {}, dialogId: json.navTabId, callback: null}); break; default : break; } } }