Changeset 551 in tmcsimulator for trunk/webapps/einotebook
- Timestamp:
- 12/26/2019 03:14:52 PM (6 years ago)
- Location:
- trunk/webapps/einotebook
- Files:
-
- 6 edited
-
roles/index.html (modified) (2 diffs)
-
roles/roles.js (modified) (4 diffs)
-
script/index.html (modified) (1 diff)
-
script/scrollframe.js (modified) (3 diffs)
-
scripts/Evaluation.js (modified) (3 diffs)
-
scripts/Event.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/einotebook/roles/index.html
r548 r551 9 9 <script type="text/javascript" src="roles.js"></script> 10 10 <script type="text/javascript" src="../scripts/cookies.js"></script> 11 <title> Script</title>11 <title>Roles</title> 12 12 </head> 13 13 <body> 14 14 15 < button class="jumpToCurrentEvent"16 onclick="jumpToLastExecutedEvent()">Jump to Current Event</button >15 <!--button class="jumpToCurrentEvent" 16 onclick="jumpToLastExecutedEvent()">Jump to Current Event</button--> 17 17 <!-- A combo box for which role is to be displayed on the page --> 18 18 <select id="desiredRole" onchange="changeRole()"> … … 22 22 <option value="CHP RADIO">CHP RADIO</option> 23 23 </select> 24 <iframe id=' view' src='../script/scrollframe.html' frameborder='0' scrolling='yes'24 <iframe id='rolesview' src='../script/scrollframe.html' frameborder='0' scrolling='yes' 25 25 width='100%'></iframe> 26 26 -
trunk/webapps/einotebook/roles/roles.js
r540 r551 49 49 function highlightLatestEvent() 50 50 { 51 // workaround for defect #212 is disable this function 52 return; 53 51 54 Roles.events.setEmphasis(); // Set text colors on all events 52 55 … … 69 72 Roles.incidents = theIncidents; 70 73 Roles.events = theEvents; 71 Roles.events.win = document.getElementById("view").contentWindow; 72 Roles.events.doc = getDocumentFromFrame('view'); 74 // workaround for defect #212 is delete these two lines so they don't conflict 75 // with the Scripts.events.win 76 //Roles.events.win = document.getElementById("view").contentWindow; 77 //Roles.events.doc = getDocumentFromFrame('view'); 73 78 // reset SELECT box to default value 74 79 document.getElementById("desiredRole").value = "TELEPHONE CONVERSATION"; … … 108 113 109 114 // display events in iframe 110 getDocumentFromFrame(' view').body.innerHTML = html;115 getDocumentFromFrame('rolesview').body.innerHTML = html; 111 116 112 117 // resize iframe to appropriate height … … 150 155 { 151 156 var height = document.documentElement.clientHeight; 152 height -= pageY(document.getElementById(' view'));157 height -= pageY(document.getElementById('rolesview')); 153 158 height = (height < 0) ? 0 : height - 10; 154 document.getElementById(' view').style.height = height + 'px';159 document.getElementById('rolesview').style.height = height + 'px'; 155 160 } 156 161 -
trunk/webapps/einotebook/script/index.html
r548 r551 20 20 width='100%'></iframe> 21 21 22 </form>22 23 23 24 24 </body> -
trunk/webapps/einotebook/script/scrollframe.js
r548 r551 12 12 } 13 13 14 // Collect all the ratings from the events 14 15 function collectRatings() 15 16 { 17 var output = "" 18 var ratingCount = 0 16 19 // Consider each event in the incident script 17 20 for (var evtidx = 0; evtidx < events.length; evtidx++) … … 27 30 // If it not the default value we want to save it 28 31 if (item.rating > 0) 29 { 30 console.log("collecting event"+evtidx + " at " + events[evtidx].time.format() +" "+item.type + " " + item.rating) 32 { // Build a string for the log in this format: 33 //03:01:00, Evaluation, CMS, Poor 34 output += events[evtidx].time.format() +", Evaluation, "+item.type + ", " + item.ratingQualities[item.rating] + "\n" 35 ratingCount += 1; 31 36 } 32 37 } 33 38 } 34 39 } 40 submitRatings(output); 41 alert(ratingCount + " rating were saved.") 35 42 } 36 43 … … 55 62 */ 56 63 57 // TODO58 function submitRatings( )64 // Send the string of ratings to the server 65 function submitRatings(logString) 59 66 { 60 67 // Using POST to send the data 61 68 var xhr = new XMLHttpRequest(); 62 xhr.open("POST", " ../../cgi-bin/saveRatings.py", true);69 xhr.open("POST", "/cgi-bin/saveRatingsToLog.py", true); 63 70 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); 64 71 // send the collected data 65 xhr.send("msg="+ outString);72 xhr.send("msg="+logString); 66 73 } -
trunk/webapps/einotebook/scripts/Evaluation.js
r548 r551 10 10 11 11 //========== public constants ==========// 12 this.ratingQualities = ["", "Worst","Poor","Average","Good","Best"]; 12 13 this.id = Evaluation.id; 13 14 this.ratingGroupName = "evaluationGroup" + this.id; … … 75 76 76 77 this.rating = givenRating; 77 78 console.log(this.ratingGroupName + " recordRating of " + this.rating ) 78 //console.log(this.ratingGroupName + " recordRating of " + this.rating ) 79 79 } 80 80 … … 103 103 "<table align='right' class='evaluationScale'>" + 104 104 "<tr>" + 105 "<td class='eventRadioButtonSmallScale'> Best</td>" +106 "<td class='eventRadioButtonSmallScale'> Good</td>" +107 "<td class='eventRadioButtonSmallScale'> Average</td>" +108 "<td class='eventRadioButtonSmallScale'> Poor</td>" +109 "<td class='eventRadioButtonSmallScale'> Worst</td>" +105 "<td class='eventRadioButtonSmallScale'>"+this.ratingQualities[5]+"</td>" + 106 "<td class='eventRadioButtonSmallScale'>"+this.ratingQualities[4]+"</td>" + 107 "<td class='eventRadioButtonSmallScale'>"+this.ratingQualities[3]+"</td>" + 108 "<td class='eventRadioButtonSmallScale'>"+this.ratingQualities[2]+"</td>" + 109 "<td class='eventRadioButtonSmallScale'>"+this.ratingQualities[1]+"</td>" + 110 110 "</tr>" + 111 111 "<tr>" + -
trunk/webapps/einotebook/scripts/Event.js
r540 r551 178 178 function focus() 179 179 { 180 /* This method wasdiscarded because it moved the scroll bar of the parent of180 /* This next 3 lines were discarded because it moved the scroll bar of the parent of 181 181 * the given window in addition to the scroll bar of the given window.. 182 182 var positionOfPound = window.location.indexOf("#"); … … 184 184 window.location = rootLocation + "#" + eventAnchorName; 185 185 */ 186 events.win.scrollTo(0, absoluteTop(events.doc.getElementById(this.eventHeaderID)));186 events.win.scrollTo(0, absoluteTop(events.doc.getElementById(this.eventHeaderID))); 187 187 } 188 188 … … 195 195 if (events.doc.getElementById(this.eventHeaderID) != null) 196 196 { 197 events.doc.getElementById(this.eventHeaderID).style.borderColor = "blue";197 events.doc.getElementById(this.eventHeaderID).style.borderColor = "blue"; 198 198 events.doc.getElementById(this.eventHeaderID).style.backgroundColor = "yellow"; 199 199 events.doc.getElementById(this.eventHeaderID).style.color = "black";
Note: See TracChangeset
for help on using the changeset viewer.
