ソースを参照

expand collapse buttons

bubble
Laurent Lepinay 9年前
コミット
dd5fab0b20
11個のファイルの変更60行の追加11行の削除
  1. +6
    -0
      dist/css/screen.css
  2. バイナリ
     
  3. バイナリ
     
  4. +15
    -1
      dist/swagger-ui.js
  5. +8
    -9
      dist/swagger-ui.min.js
  6. +6
    -0
      src/main/html/css/screen.css
  7. バイナリ
     
  8. バイナリ
     
  9. +10
    -0
      src/main/javascript/SwaggerUi.js
  10. +5
    -1
      src/main/javascript/view/ParameterView.js
  11. +10
    -0
      src/main/less/screen.less

+ 6
- 0
dist/css/screen.css ファイルの表示

@@ -1254,3 +1254,9 @@
text-align: center;
padding-top: 10px;
}
.swagger-section .swagger-collapse:before {
content: "-";
}
.swagger-section .swagger-expand:before {
content: "+";
}

バイナリ
ファイルの表示


バイナリ
ファイルの表示


+ 15
- 1
dist/swagger-ui.js ファイルの表示

@@ -65,6 +65,16 @@ window.SwaggerUi = Backbone.Router.extend({
this.headerView.on('update-swagger-ui', function(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
@@ -21567,7 +21577,11 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
this.model.jsonEditor =
/* global JSONEditor */
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
// TODO: SignatureView should expose an event "onSampleClicked" instead
signatureModel.jsonEditor = this.model.jsonEditor;


+ 8
- 9
dist/swagger-ui.min.js
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 6
- 0
src/main/html/css/screen.css ファイルの表示

@@ -1254,3 +1254,9 @@
text-align: center;
padding-top: 10px;
}
.swagger-section .swagger-collapse:before {
content: "-";
}
.swagger-section .swagger-expand:before {
content: "+";
}

バイナリ
ファイルの表示


バイナリ
ファイルの表示


+ 10
- 0
src/main/javascript/SwaggerUi.js ファイルの表示

@@ -59,6 +59,16 @@ window.SwaggerUi = Backbone.Router.extend({
this.headerView.on('update-swagger-ui', function(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


+ 5
- 1
src/main/javascript/view/ParameterView.js ファイルの表示

@@ -60,7 +60,11 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
this.model.jsonEditor =
/* global JSONEditor */
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
// TODO: SignatureView should expose an event "onSampleClicked" instead
signatureModel.jsonEditor = this.model.jsonEditor;


+ 10
- 0
src/main/less/screen.less ファイルの表示

@@ -136,4 +136,14 @@
padding-top: 10px;
}


.swagger-collapse:before {
content: "-";
}

.swagger-expand:before {
content: "+";
}


}

読み込み中…
キャンセル
保存