ie8 fixes
This commit is contained in:
15
dist/lib/swagger.js
vendored
15
dist/lib/swagger.js
vendored
@@ -1,5 +1,5 @@
|
||||
// swagger.js
|
||||
// version 2.0.21
|
||||
// version 2.0.22
|
||||
|
||||
var __bind = function(fn, me){
|
||||
return function(){
|
||||
@@ -15,6 +15,15 @@ log = function(){
|
||||
}
|
||||
};
|
||||
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function(obj, start) {
|
||||
for (var i = (start || 0), j = this.length; i < j; i++) {
|
||||
if (this[i] === obj) { return i; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
var SwaggerApi = function(url, options) {
|
||||
this.url = null;
|
||||
this.debug = false;
|
||||
@@ -949,7 +958,7 @@ var SwaggerRequest = function(type, url, params, opts, successCallback, errorCal
|
||||
}
|
||||
}
|
||||
|
||||
responseContentType = null;
|
||||
var responseContentType = null;
|
||||
if (this.opts.responseContentType) {
|
||||
responseContentType = this.opts.responseContentType;
|
||||
} else {
|
||||
@@ -1116,7 +1125,7 @@ JQueryHttpClient.prototype.execute = function(obj) {
|
||||
headers: headers
|
||||
};
|
||||
|
||||
var contentType = (response._headers["content-type"]||response._headers["Content-Type"]||null)
|
||||
var contentType = (headers["content-type"]||headers["Content-Type"]||null)
|
||||
|
||||
if(contentType != null) {
|
||||
if(contentType.indexOf("application/json") == 0 || contentType.indexOf("+json") > 0) {
|
||||
|
||||
9
dist/swagger-ui.js
vendored
9
dist/swagger-ui.js
vendored
@@ -62,9 +62,14 @@ function clippyCopiedCallback(a) {
|
||||
}
|
||||
|
||||
// Logging function that accounts for browsers that don't have window.console
|
||||
function log() {
|
||||
if (window.console) console.log.apply(console,arguments);
|
||||
log = function(){
|
||||
log.history = log.history || [];
|
||||
log.history.push(arguments);
|
||||
if(this.console){
|
||||
console.log( Array.prototype.slice.call(arguments) );
|
||||
}
|
||||
};
|
||||
|
||||
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
||||
if (Function.prototype.bind && console && typeof console.log == "object") {
|
||||
[
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// swagger.js
|
||||
// version 2.0.21
|
||||
// version 2.0.22
|
||||
|
||||
var __bind = function(fn, me){
|
||||
return function(){
|
||||
@@ -15,6 +15,15 @@ log = function(){
|
||||
}
|
||||
};
|
||||
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function(obj, start) {
|
||||
for (var i = (start || 0), j = this.length; i < j; i++) {
|
||||
if (this[i] === obj) { return i; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
var SwaggerApi = function(url, options) {
|
||||
this.url = null;
|
||||
this.debug = false;
|
||||
@@ -949,7 +958,7 @@ var SwaggerRequest = function(type, url, params, opts, successCallback, errorCal
|
||||
}
|
||||
}
|
||||
|
||||
responseContentType = null;
|
||||
var responseContentType = null;
|
||||
if (this.opts.responseContentType) {
|
||||
responseContentType = this.opts.responseContentType;
|
||||
} else {
|
||||
@@ -1116,7 +1125,7 @@ JQueryHttpClient.prototype.execute = function(obj) {
|
||||
headers: headers
|
||||
};
|
||||
|
||||
var contentType = (response._headers["content-type"]||response._headers["Content-Type"]||null)
|
||||
var contentType = (headers["content-type"]||headers["Content-Type"]||null)
|
||||
|
||||
if(contentType != null) {
|
||||
if(contentType.indexOf("application/json") == 0 || contentType.indexOf("+json") > 0) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"readmeFilename": "README.md",
|
||||
"dependencies": {
|
||||
"coffee-script": "~1.5.0",
|
||||
"swagger-client": "2.0.21",
|
||||
"swagger-client": "2.0.22",
|
||||
"handlebars": "~1.0.10",
|
||||
"less": "~1.4.2"
|
||||
}
|
||||
|
||||
@@ -62,9 +62,14 @@ function clippyCopiedCallback(a) {
|
||||
}
|
||||
|
||||
// Logging function that accounts for browsers that don't have window.console
|
||||
function log() {
|
||||
if (window.console) console.log.apply(console,arguments);
|
||||
log = function(){
|
||||
log.history = log.history || [];
|
||||
log.history.push(arguments);
|
||||
if(this.console){
|
||||
console.log( Array.prototype.slice.call(arguments) );
|
||||
}
|
||||
};
|
||||
|
||||
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
||||
if (Function.prototype.bind && console && typeof console.log == "object") {
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user