Phi: distinguish between normal and abormal checklists
This commit is contained in:
parent
470ee7a80b
commit
7202e25099
2 changed files with 5 additions and 2 deletions
|
@ -9,9 +9,9 @@
|
|||
}
|
||||
</style>
|
||||
<div id='checklists' data-bind="foreach: checklists">
|
||||
<h4 data-bind="text: title"></h4>
|
||||
<h4 data-bind="text: title, css: { 'ui-state-error': abnormal }"></h4>
|
||||
<ul data-bind="foreach: items">
|
||||
<li><span class="phi-checklist-col1" data-bind="text: name"></span> <span class="phi-checklist-col2"
|
||||
data-bind="text: value"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,12 +15,15 @@ define([
|
|||
if (prop.name === 'checklist') {
|
||||
var checklist = {
|
||||
title : 'unnamed',
|
||||
abnormal: false,
|
||||
items : []
|
||||
};
|
||||
checklists.push(checklist);
|
||||
prop.children.forEach(function(prop) {
|
||||
if (prop.name === 'title') {
|
||||
checklist.title = prop.value;
|
||||
} else if (prop.name === 'type') {
|
||||
checklist.abnormal = ( "abnormal" == prop.value );
|
||||
} else if (prop.name == 'item') {
|
||||
var item = {
|
||||
name : 'unnamed',
|
||||
|
|
Loading…
Add table
Reference in a new issue