Changeset 386 in tmcsimulator for trunk/webapps/einotebook


Ignore:
Timestamp:
04/20/2019 12:11:46 PM (7 years ago)
Author:
jdalbey
Message:

Updated LoadEvents?.js to parse all event types except CMS_EVALUATION. Modified build.xml to write svn revision number to webapps/common/js so the revision number can be included in the web page title of our apps. Write ShowRevision? function in displayutils.js to do that.

Location:
trunk/webapps/einotebook
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/einotebook/index.html

    r372 r386  
    11<html> 
    22  <head> 
    3     <title>Electronic Instructor Notebook v0.3</title> 
     3    <title>Electronic Instructor Notebook v</title> 
    44    <meta name="apple-mobile-web-app-capable" content="yes"> 
    55    <meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=0;"> 
     
    99    <link rel="stylesheet" type="text/css" href="ipadapp.css"> 
    1010    <script type="text/javascript" src="../common/js/fileutils.js"></script>  
     11    <script type="text/javascript" src="../common/js/displayutils.js"></script>  
     12    <script type="text/javascript" src="../common/js/revision.js"></script> 
    1113    <script type="text/javascript" src="scripts/cookies.js"></script> 
    1214    <script type="text/javascript" src="scripts/Events.js"></script> 
     
    2527    <script type="text/javascript" src="notebook.js"></script>  
    2628  </head> 
    27   <body onLoad="setupNotebook(); run();"> 
     29  <body onLoad="showRevision(); setupNotebook(); run();"> 
    2830     
    2931    <table class="notebook"> 
  • trunk/webapps/einotebook/maps/index.html

    r372 r386  
    3131         
    3232            <!-- The Map --> 
    33             <div id="googleMapContent" style="display:none;"><iframe frameborder=0 width=740 height=600  
    34                 scrolling=no src=googleMap.html marginheight=0 marginwidth=0></iframe></div> 
     33            <div id="googleMapContent" style="display:none;"> 
     34<iframe src="https://www.google.com/maps/d/embed?mid=11RLV4iMbnXW7HlZCATvTa9z1Y01gngzR&zoom=9" width="640" height="480"></iframe> 
     35        <div> 
     36<!-- 
     37<iframe frameborder=0 width=740 height=600  
     38                scrolling=no src="https://drive.google.com/open?id=11RLV4iMbnXW7HlZCATvTa9z1Y01gngzR&usp=sharing" marginheight=0 marginwidth=0></iframe>  --> 
    3539 
    3640        <div id="atmsMapContent" style="display:inline;"><iframe frameborder=0 width=740 height=600  
  • trunk/webapps/einotebook/scripts/Evaluation.js

    r359 r386  
    3737                var text = "<table class='evaluation'>" + 
    3838                                   "<tr>" + 
    39                                    "<th class='evaluationType' colspan='2'>" + type + " Evalution</th>" + 
     39                                   "<th class='evaluationType' colspan='2'>" + type + " Evaluation</th>" + 
    4040                                   "</tr>" + 
    4141                                   "<tr>" + 
  • trunk/webapps/einotebook/scripts/LoadEvents.js

    r374 r386  
    2424            if (currEvt.childNodes[child].localName != undefined) 
    2525            { 
     26                var tagName = currEvt.childNodes[child].localName.toUpperCase(); 
    2627                // Determine the tag type and dispatch it for further processing 
    27                 switch(currEvt.childNodes[child].localName) 
     28                switch(tagName) 
    2829                { 
    2930                    case "TIME_INDEX":  
     
    5455                        break; 
    5556                    case "TELEPHONE":  
    56                         telProp = new Evaluation("Telephone Conversation",  
     57                        telProp = new Evaluation("TELEPHONE CONVERSATION",  
    5758                                 parseTelephone(currEvt.childNodes[child]) );   
    5859                        evalarray.push(telProp); 
     
    6667                        } 
    6768                        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; 
    72100                } 
    73101            } 
     
    134162                result.push(dialog[line].attributes["Role"].value); 
    135163                result.push(dialog[line].textContent); 
     164            } 
     165        } 
     166    } 
     167    return result; 
     168} 
     169function 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()); 
    136181            } 
    137182        } 
Note: See TracChangeset for help on using the changeset viewer.