1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //系统配置
- var CMS_SystemConfig = {
- VirtualDirectoryPath: "",
- ReportPagePath: "/ReportViewer/Page.aspx",
- ScriptReportPagePath: "/Common/ReportViewer",
- GetConfig: function () {
- var configClass = $.ajax({
- type: 'GET',
- url: CMS_SystemConfig.VirtualDirectoryPath + '/Site.js',
- async: false,
- dataType: 'xml'
- });
- return $.String2XML(configClass.responseText);
- },
- //1:sqlReport,2:PDF
- ReportType: 2,
- StudentChangeIsEnabled: true,
- };
- //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);
- }
- });
|