1
0
Fork 0

Phi: distinguish between normal and abormal checklists

This commit is contained in:
Torsten Dreyer 2015-02-23 22:43:23 +01:00
parent 470ee7a80b
commit 7202e25099
2 changed files with 5 additions and 2 deletions

View file

@ -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>

View file

@ -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',