|
|
|
@ -12,6 +12,8 @@ import {DOCUMENT} from '@angular/common';
|
|
|
|
|
export class AnswersComponent extends BaseComponent implements OnInit, AfterViewInit {
|
|
|
|
|
|
|
|
|
|
private answerList = [];
|
|
|
|
|
private currentHeader: any = "";
|
|
|
|
|
private display: boolean;
|
|
|
|
|
|
|
|
|
|
constructor(public config: ConfigService,
|
|
|
|
|
@Inject(DOCUMENT) private document: any,
|
|
|
|
@ -36,7 +38,9 @@ export class AnswersComponent extends BaseComponent implements OnInit, AfterView
|
|
|
|
|
this.config.answers.push(
|
|
|
|
|
{
|
|
|
|
|
id: this.config.answers.length + 1,
|
|
|
|
|
text: ''
|
|
|
|
|
text: '',
|
|
|
|
|
file: '',
|
|
|
|
|
url: ''
|
|
|
|
|
});
|
|
|
|
|
this.cd.detectChanges(); // to refresh the view before focusing on the new input
|
|
|
|
|
this.focusOnAnswer(this.config.answers.length - 1)
|
|
|
|
@ -67,6 +71,8 @@ export class AnswersComponent extends BaseComponent implements OnInit, AfterView
|
|
|
|
|
|
|
|
|
|
showModalForPictureOfAnswer(answer) {
|
|
|
|
|
// TODO
|
|
|
|
|
this.config.todo();
|
|
|
|
|
this.currentHeader = answer;
|
|
|
|
|
this.display = true;
|
|
|
|
|
// this.config.todo();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|