Merge commit '79678332549e3343c53fb585e670f600f3f00503' into releases

This commit is contained in:
RedocBot 2016-07-17 16:53:44 +00:00 committed by travis@localhost
commit 68b466e034
6 changed files with 27 additions and 8 deletions

View File

@ -7,7 +7,7 @@
<tab *ngFor="let sample of data.samples" [tabTitle]="sample.lang">
<div class="code-sample">
<div class="action-buttons">
<span copy-button [copyText]="sample.source" class="hint--top hint--inversed"> <a>Copy</a> </span>
<span copy-button [copyText]="sample.source" class="hint--top-left hint--inversed"><a>Copy</a></span>
</div>
<pre [innerHtml]="sample.source | prism:sample.lang"></pre>
</div>

View File

@ -1,5 +1,9 @@
@import '../../shared/styles/variables';
:host {
overflow: hidden;
}
.action-buttons {
display: block;
opacity: 0;

View File

@ -1,5 +1,9 @@
@import '../../shared/styles/variables';
:host {
overflow: hidden;
}
tab, tabs {
display: block;
}

View File

@ -5,6 +5,12 @@ pre {
padding: 0;
margin: 0;
clear: both;
position: relative;
}
// hide top-level collapser
.redoc-json > .collapser {
display: none;
}
.action-buttons {
@ -12,9 +18,15 @@ pre {
opacity: 0;
transition: opacity 0.3s ease;
transform: translateY(100%);
z-index: 1;
position: relative;
> span {
float: right;
&:last-child > a:before {
display: none;
}
}
> span > a {
@ -28,11 +40,6 @@ pre {
transform: translateX(-10px);
}
&:last-child:before {
display: none;
margin-left: 0;
}
&:first-child {
margin-right: 0;
}

View File

@ -63,6 +63,7 @@ export class SchemaSample extends BaseComponent {
}
}
if (this.fromCache()) {
this.initButtons();
return;
}
try {
@ -78,8 +79,11 @@ export class SchemaSample extends BaseComponent {
}
this.cache(sample);
this.data.sample = sample;
this.initButtons();
}
if (typeof sample === 'object') {
initButtons() {
if (typeof this.data.sample === 'object') {
this.enableButtons = true;
}
}

View File

@ -1,7 +1,7 @@
{
"name": "redoc",
"description": "Swagger-generated API Reference Documentation",
"version": "0.16.0",
"version": "0.16.1",
"repository": {
"type": "git",
"url": "git://github.com/Rebilly/ReDoc"