This commit is contained in:
Tony Tam
2016-02-08 21:37:22 -08:00
7 changed files with 28 additions and 6 deletions

2
dist/css/print.css vendored
View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

2
dist/css/screen.css vendored
View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

11
dist/swagger-ui.js vendored
View File

@@ -25158,6 +25158,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
this.router = opts.router; this.router = opts.router;
document.addEventListener('click', this.onLinkClick, true);
// Sort APIs // Sort APIs
if (opts.swaggerOptions.apisSorter) { if (opts.swaggerOptions.apisSorter) {
sorterOption = opts.swaggerOptions.apisSorter; sorterOption = opts.swaggerOptions.apisSorter;
@@ -25292,6 +25293,16 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
clear: function(){ clear: function(){
$(this.el).html(''); $(this.el).html('');
},
onLinkClick: function (e) {
var el = e.target;
if (el.tagName === 'A') {
if (location.hostname !== el.hostname || location.port !== el.port) {
e.preventDefault();
window.open(el.href, '_blank');
}
}
} }
}); });

File diff suppressed because one or more lines are too long

View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

View File

@@ -14,6 +14,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
this.router = opts.router; this.router = opts.router;
document.addEventListener('click', this.onLinkClick, true);
// Sort APIs // Sort APIs
if (opts.swaggerOptions.apisSorter) { if (opts.swaggerOptions.apisSorter) {
sorterOption = opts.swaggerOptions.apisSorter; sorterOption = opts.swaggerOptions.apisSorter;
@@ -148,5 +149,15 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
clear: function(){ clear: function(){
$(this.el).html(''); $(this.el).html('');
},
onLinkClick: function (e) {
var el = e.target;
if (el.tagName === 'A') {
if (location.hostname !== el.hostname || location.port !== el.port) {
e.preventDefault();
window.open(el.href, '_blank');
}
}
} }
}); });