QnA - Better ajax response when making a new answer. Still not right. Needs to use threading.
This commit is contained in:
parent
6c0bb0f35b
commit
5267f3d649
@ -155,13 +155,39 @@ class QnanewanswerAction extends Action
|
|||||||
$answer = $this->question->getAnswer($profile);
|
$answer = $this->question->getAnswer($profile);
|
||||||
header('Content-Type: text/xml;charset=utf-8');
|
header('Content-Type: text/xml;charset=utf-8');
|
||||||
$this->xw->startDocument('1.0', 'UTF-8');
|
$this->xw->startDocument('1.0', 'UTF-8');
|
||||||
|
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
// TRANS: Page title after sending an answer.
|
// TRANS: Page title after sending an answer.
|
||||||
$this->element('title', null, _m('Answers'));
|
$this->element('title', null, _m('Answers'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
|
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->raw($answer->asHTML());
|
|
||||||
|
$nli = new NoticeListItem($notice, $this);
|
||||||
|
$nli->show();
|
||||||
|
//$this->raw($answer->asHTML());
|
||||||
|
|
||||||
|
/*
|
||||||
|
$question = $this->question;
|
||||||
|
|
||||||
|
$nli = new NoticeListItem($notice, $this);
|
||||||
|
$nli->showNotice();
|
||||||
|
|
||||||
|
$this->elementStart('div', array('class' => 'entry-content answer-content'));
|
||||||
|
|
||||||
|
if (!empty($answer)) {
|
||||||
|
$form = new QnashowanswerForm($this, $answer);
|
||||||
|
$form->show();
|
||||||
|
} else {
|
||||||
|
$this->text(_m('Answer data is missing.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->elementEnd('div');
|
||||||
|
|
||||||
|
// @fixme
|
||||||
|
//$this->elementStart('div', array('class' => 'entry-content'));
|
||||||
|
*/
|
||||||
$this->elementEnd('body');
|
$this->elementEnd('body');
|
||||||
$this->elementEnd('html');
|
$this->elementEnd('html');
|
||||||
} else {
|
} else {
|
||||||
|
@ -125,9 +125,7 @@ class QnashowanswerForm extends Form
|
|||||||
'answer-' . $this->answer->id
|
'answer-' . $this->answer->id
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->out->raw($this->answer->asHTML());
|
||||||
|
|
||||||
// $this->out->raw($this->answer->asHTML());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user