Changeset 386 in tmcsimulator for trunk/webapps/einotebook/scripts/LoadEvents.js
- Timestamp:
- 04/20/2019 12:11:46 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/einotebook/scripts/LoadEvents.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/einotebook/scripts/LoadEvents.js
r374 r386 24 24 if (currEvt.childNodes[child].localName != undefined) 25 25 { 26 var tagName = currEvt.childNodes[child].localName.toUpperCase(); 26 27 // Determine the tag type and dispatch it for further processing 27 switch( currEvt.childNodes[child].localName)28 switch(tagName) 28 29 { 29 30 case "TIME_INDEX": … … 54 55 break; 55 56 case "TELEPHONE": 56 telProp = new Evaluation("T elephone Conversation",57 telProp = new Evaluation("TELEPHONE CONVERSATION", 57 58 parseTelephone(currEvt.childNodes[child]) ); 58 59 evalarray.push(telProp); … … 66 67 } 67 68 break; 68 case "TMT_RADIO": break; 69 case "MAINTENANCE_RADIO": break; 70 // case *_EVALUATION: break; 71 69 70 case "TMT_RADIO": 71 case "MAINTENANCE_RADIO": 72 var result = new Array(); 73 result.push("Details:"); 74 result.push(currEvt.childNodes[child].textContent.trim()); 75 var radProp = new Property(tagName, result ); 76 proparray.push(radProp); 77 break; 78 79 case "FACILITATOR_EVALUATION": 80 case "CAD_EVALUATION": 81 case "ATMS_EVALUATION": 82 case "ACTIVITY_LOG_EVALUATION": 83 case "RADIO_EVALUATION": 84 // remove the suffix 85 var evalType = tagName.replace("_EVALUATION",""); 86 // Build the evaluation item 87 var facEval = new Evaluation(evalType, 88 parseEvaluation(currEvt.childNodes[child]) ); 89 evalarray.push(facEval); 90 break; 91 92 case "CMS_EVALUATION": 93 // TODO: Complete this partial implementation 94 var result = new Array(); 95 result.push("Expected Action:"); 96 result.push("Action will appear here."); 97 var cmsEval = new Evaluation("CMS", result); 98 evalarray.push(cmsEval); 99 break; 72 100 } 73 101 } … … 134 162 result.push(dialog[line].attributes["Role"].value); 135 163 result.push(dialog[line].textContent); 164 } 165 } 166 } 167 return result; 168 } 169 function parseEvaluation(element) 170 { 171 var result = new Array(); 172 var details = element.getElementsByTagName("EXPECTED_ACTION"); 173 if (details.length > 0) 174 { 175 for (detail in details) 176 { 177 if (details[detail].textContent != undefined) 178 { 179 result.push("Expected Action:"); 180 result.push(details[detail].textContent.trim()); 136 181 } 137 182 }
Note: See TracChangeset
for help on using the changeset viewer.
