Skip to content

Commit

Permalink
Merge pull request #16 from binfalse/master
Browse files Browse the repository at this point in the history
fix layouting for more-infos buttons
  • Loading branch information
binfalse authored Aug 19, 2017
2 parents 4e458c3 + cb08053 commit 677aa5a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/quiz/quiz.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@ th small {

}

.myQuestions .q-text button {
text-decoration: underline;
}


2 changes: 1 addition & 1 deletion src/app/quiz/quiz.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h3>{{question.titel}}</h3>
<strong class="q-question" [innerHTML]="question.fragen[q].frage"></strong><br>
<button class="w3-button w3-light-grey w3-hover-grey" (click)="toggleMoreInfos (q)" *ngIf="!moreInfos[q]">Mehr Informationen</button>
<button class="w3-button w3-grey" (click)="toggleMoreInfos (q)" *ngIf="moreInfos[q]">Weniger Informationen</button>
<div class="q-supplemental w3-white w3-border-black w3-leftbar w3-padding" *ngIf="moreInfos[q]">
<div class="q-supplemental w3-white w3-border-black w3-leftbar w3-padding w3-margin-bottom" *ngIf="moreInfos[q]">
<ul>
<ng-container *ngFor="let mi of question.fragen[q].moreInfos">
<li>
Expand Down
5 changes: 5 additions & 0 deletions src/app/quiz/quiz.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ export class QuizComponent implements OnInit, AfterContentInit, AfterViewInit, A
//console.log ("showing question " + n);
this.app.questionIndex = n;
window.scrollTo(0,0);

// alle more-infos wieder einklappen
for (const q in this.moreInfos) {
this.moreInfos[q] = false;
}

// there is no question with negative index...
if (this.app.questionIndex < 0) {
Expand Down

0 comments on commit 677aa5a

Please sign in to comment.