//系统配置 var CMS_SystemConfig = { VirtualDirectoryPath: "", ReportPagePath: "/ReportViewer/Page.aspx", ScriptReportPagePath: "/Common/ReportViewer", GetConfig: function () { var configClass = $.ajax({ type: 'GET', url: CMS_SystemConfig.VirtualDirectoryPath + '/Site.xml', async: false, dataType: 'xml' }); return configClass.responseXML; } }; //2014-04-15 modified by pengbb 新增判断是否为null if (typeof(ZeroClipboard) != "undefined") { ZeroClipboard.setMoviePath(CMS_SystemConfig.VirtualDirectoryPath + "Scripts/Plugins/ZeroClipboard/ZeroClipboard.swf"); } //改变jQuery的AJAX默认属性和方法 $.ajaxSetup({ type: 'POST', error: function (XMLHttpRequest, textStatus, errorThrown) { $.messager.progress('close'); var reponseText = ""; if ($(XMLHttpRequest.responseText)) { for (var i = 0; i < $(XMLHttpRequest.responseText).length; i++) { if ($(XMLHttpRequest.responseText)[i] && $(XMLHttpRequest.responseText)[i].innerText) { var item = $(XMLHttpRequest.responseText)[i]; if (item.innerText.indexOf("HandleResult") != -1 && item.innerText.indexOf("DetailError") != -1) { var str = item.innerText; reponseText = str.substr(str.indexOf("{")); reponseText = reponseText.substr(0, reponseText.indexOf("}") + 1); break; } } } } var errorObj = $.parseJSON(reponseText); $.exceptionThrow(errorObj, null); } });