DWZ(JUI)403状態拡張


1.まずdwz.core.jsに403が追加された状態.
statusCode: {ok:200, error:300, timeout:301, forbidden:403},

2.ajaxDone応答ロジックを追加します.
ajaxDone:function(json){
    if (json.statusCode === undefined && json.message === undefined) { // for iframeCallback
        if (alertMsg) return alertMsg.error(json);
        else return alert(json);
    } 
    if(json.statusCode == DWZ.statusCode.error) {
        if(json.message && alertMsg) alertMsg.error(json.message);
    } else if (json.statusCode == DWZ.statusCode.timeout) {
        if(alertMsg) alertMsg.error(json.message || DWZ.msg("sessionTimout"), {okCall:DWZ.loadLogin});
        else DWZ.loadLogin();
    } else if (json.statusCode == DWZ.statusCode.forbidden) {
        if(alertMsg) alertMsg.error(json.message || DWZ.msg("forbidden"));
        else navTab.closeCurrentTab();
    } else {
        if(json.message && alertMsg) alertMsg.correct(json.message);
    };
},

3.$を追加します.ajaxのsuccess応答ロジック.
if (json.statusCode==DWZ.statusCode.forbidden){
    alertMsg.error(json.message || DWZ.msg("forbidden"), {okCall:function(){
        if ($.pdialog) $.pdialog.checkTimeout();
        if (navTab) navTab.checkTimeout();
         
        //     Tab
        navTab.closeCurrentTab();
    }});
}

4.dwz.frag.xmlにデフォルトのステータス情報を追加します.
<_MSG_ id="forbidden"><![CDATA[    !]]></_MSG_>

DWZその他のリファレンスチュートリアル:http://blog.csdn.net/jiweigang1/article/category/890878