DWZ刷新dialog:ajax
1,在刪除按鈕上添加callback屬性;如:(callback="dialogAjax")json
<a class="delImg" href="/admin/adminDelProductImage.action?productImg.imageId=${ image.imageId }" target="ajaxTodo" callback="dialogAjax" title="肯定刪除該圖片嗎?" >刪除</a>
而後再添加回調函數(能夠寫在頁面中)函數
function dialogAjax(json){ $.pdialog.reloadDialog("upload"); }
注:upload是dialog的ID;即:rel屬性url
<li><a class="icon" href="/admin/adminToProductImageUpload.action?productId={productId}" target="dialog" rel="upload" mask="true" warn="請選擇一條信息" width="900" height="650"><span>上傳商品圖片</span></a></li>
2,在dwz.dialog.js中添加以下擴展代碼:spa
reloadDialog:function(dialogId){
var dialog = $("body").data(dialogId);
if(dialog){
$.pdialog.reload(dialog.data("url"),{dialogId:dialogId});
}
}
注:若是放在dwz.dialog.js最後的話,注意添加,號;code