More work trying to understand util.js and get my ajax working right

This commit is contained in:
Zach Copley
2011-04-18 02:27:56 -07:00
parent d1443a6bd9
commit 583b903559
7 changed files with 136 additions and 71 deletions

View File

@@ -217,6 +217,14 @@ class QnA_Question extends Managed_DataObject
$out = new XMLStringer();
$cls = array('qna_question');
if (!empty($question->closed)) {
$cls[] = 'closed';
}
$out->elementStart('p', array('class' => implode(' ', $cls)));
if (!empty($question->description)) {
$out->elementStart('span', 'question-description');
$out->raw(QnAPlugin::shorten($question->description, $notice));
@@ -237,6 +245,8 @@ class QnA_Question extends Managed_DataObject
$out->elementEnd('span');
}
$out->elementEnd('p');
return $out->getString();
}