expand collapse buttons
This commit is contained in:
6
dist/css/screen.css
vendored
6
dist/css/screen.css
vendored
@@ -1254,3 +1254,9 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-collapse:before {
|
||||||
|
content: "-";
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-expand:before {
|
||||||
|
content: "+";
|
||||||
|
}
|
||||||
|
|||||||
BIN
dist/images/collapse.gif
vendored
Normal file
BIN
dist/images/collapse.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
BIN
dist/images/expand.gif
vendored
Normal file
BIN
dist/images/expand.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 B |
16
dist/swagger-ui.js
vendored
16
dist/swagger-ui.js
vendored
@@ -65,6 +65,16 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
this.headerView.on('update-swagger-ui', function(data) {
|
this.headerView.on('update-swagger-ui', function(data) {
|
||||||
return that.updateSwaggerUi(data);
|
return that.updateSwaggerUi(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// JSon Editor custom theming
|
||||||
|
JSONEditor.defaults.iconlibs.swagger = JSONEditor.AbstractIconLib.extend({
|
||||||
|
mapping: {
|
||||||
|
collapse: 'collapse',
|
||||||
|
expand: 'expand'
|
||||||
|
},
|
||||||
|
icon_prefix: 'swagger-'
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Set an option after initializing
|
// Set an option after initializing
|
||||||
@@ -21567,7 +21577,11 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
|||||||
this.model.jsonEditor =
|
this.model.jsonEditor =
|
||||||
/* global JSONEditor */
|
/* global JSONEditor */
|
||||||
new JSONEditor($('.editor_holder', $self)[0],
|
new JSONEditor($('.editor_holder', $self)[0],
|
||||||
{schema: this.model.schema, startval : this.model.default, ajax:true, disable_properties:true, disable_edit_json:true });
|
{schema: this.model.schema, startval : this.model.default,
|
||||||
|
ajax:true,
|
||||||
|
disable_properties:true,
|
||||||
|
disable_edit_json:true,
|
||||||
|
iconlib: 'swagger' });
|
||||||
// This is so that the signature can send back the sample to the json editor
|
// This is so that the signature can send back the sample to the json editor
|
||||||
// TODO: SignatureView should expose an event "onSampleClicked" instead
|
// TODO: SignatureView should expose an event "onSampleClicked" instead
|
||||||
signatureModel.jsonEditor = this.model.jsonEditor;
|
signatureModel.jsonEditor = this.model.jsonEditor;
|
||||||
|
|||||||
17
dist/swagger-ui.min.js
vendored
17
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1254,3 +1254,9 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-collapse:before {
|
||||||
|
content: "-";
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-expand:before {
|
||||||
|
content: "+";
|
||||||
|
}
|
||||||
|
|||||||
BIN
src/main/html/images/collapse.gif
Normal file
BIN
src/main/html/images/collapse.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
BIN
src/main/html/images/expand.gif
Normal file
BIN
src/main/html/images/expand.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 B |
@@ -59,6 +59,16 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
this.headerView.on('update-swagger-ui', function(data) {
|
this.headerView.on('update-swagger-ui', function(data) {
|
||||||
return that.updateSwaggerUi(data);
|
return that.updateSwaggerUi(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// JSon Editor custom theming
|
||||||
|
JSONEditor.defaults.iconlibs.swagger = JSONEditor.AbstractIconLib.extend({
|
||||||
|
mapping: {
|
||||||
|
collapse: 'collapse',
|
||||||
|
expand: 'expand'
|
||||||
|
},
|
||||||
|
icon_prefix: 'swagger-'
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Set an option after initializing
|
// Set an option after initializing
|
||||||
|
|||||||
@@ -60,7 +60,11 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
|||||||
this.model.jsonEditor =
|
this.model.jsonEditor =
|
||||||
/* global JSONEditor */
|
/* global JSONEditor */
|
||||||
new JSONEditor($('.editor_holder', $self)[0],
|
new JSONEditor($('.editor_holder', $self)[0],
|
||||||
{schema: this.model.schema, startval : this.model.default, ajax:true, disable_properties:true, disable_edit_json:true });
|
{schema: this.model.schema, startval : this.model.default,
|
||||||
|
ajax:true,
|
||||||
|
disable_properties:true,
|
||||||
|
disable_edit_json:true,
|
||||||
|
iconlib: 'swagger' });
|
||||||
// This is so that the signature can send back the sample to the json editor
|
// This is so that the signature can send back the sample to the json editor
|
||||||
// TODO: SignatureView should expose an event "onSampleClicked" instead
|
// TODO: SignatureView should expose an event "onSampleClicked" instead
|
||||||
signatureModel.jsonEditor = this.model.jsonEditor;
|
signatureModel.jsonEditor = this.model.jsonEditor;
|
||||||
|
|||||||
@@ -136,4 +136,14 @@
|
|||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.swagger-collapse:before {
|
||||||
|
content: "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-expand:before {
|
||||||
|
content: "+";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user