Changeset 515 in tmcsimulator for trunk/webapps/einotebook/scripts/Event.js


Ignore:
Timestamp:
11/08/2019 11:49:12 AM (6 years ago)
Author:
jdalbey
Message:

Event.js, Incident.js, Incidents.js, LoadEvents?.js modified to implement ticket #158: color coding incidents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/einotebook/scripts/Event.js

    r418 r515  
    146146        function html() 
    147147        { 
    148         //console.log("building html for event: ", this.eventHeaderID, incidentColor[this.incident.number]); 
     148        //console.log("building html for event: ", this.eventHeaderID, this.incident.color); //incidentColor[this.incident.number]); 
    149149 
    150150                return "<table class='event'>" + 
    151151                           "<tr>" + 
    152                            "<td class='eventHeader' style='background-color:" + incidentColor[this.incident.number] + "'" + 
     152                           "<td class='eventHeader' style='background-color:" + this.incident.color + "'" + 
    153153               "id='" + this.eventHeaderID + "'>" +  
    154154                              this.headerHTML() + "</td>" + 
    155155                           "</tr>" + 
    156156                           "<tr>" +  
    157                            "<td class='eventData' style='background-color:" + incidentColor[this.incident.number] + "' id='" + this.dataID + "'>" +  
     157                           "<td class='eventData' style='background-color:" + this.incident.color + "' id='" + this.dataID + "'>" +  
    158158                           (this.expanded ? this.dataHTML() : "") +  
    159159                           "</td>" + 
     
    187187                events.doc.getElementById(this.eventHeaderID).style.color = "black"; 
    188188                events.doc.getElementById(this.dataID).style.color = "black"; 
    189         events.doc.getElementById(this.dataID).style.backgroundColor = incidentColor[this.incident.number]; 
     189        events.doc.getElementById(this.dataID).style.backgroundColor = this.incident.color; 
    190190                 
    191191                // IF this event is expanded THEN 
     
    220220        function normalize() 
    221221        { 
    222         var myColor = incidentColor[this.incident.number]; 
     222        var myColor = this.incident.color; 
    223223                events.doc.getElementById(this.eventHeaderID).style.backgroundColor = "white"; 
    224224                events.doc.getElementById(this.eventHeaderID).style.borderColor = "black"; 
Note: See TracChangeset for help on using the changeset viewer.