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


Ignore:
Timestamp:
06/20/2019 03:46:03 PM (7 years ago)
Author:
jdalbey
Message:

Fix #124

File:
1 edited

Legend:

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

    r364 r418  
    3333        this.highlight = highlight; 
    3434        this.unhighlight = unhighlight; 
     35    this.normalize = normalize; 
    3536        this.focus = focus; 
    3637         
     
    184185                events.doc.getElementById(this.eventHeaderID).style.borderColor = "blue"; 
    185186                events.doc.getElementById(this.eventHeaderID).style.backgroundColor = "yellow"; 
     187                events.doc.getElementById(this.eventHeaderID).style.color = "black"; 
     188                events.doc.getElementById(this.dataID).style.color = "black"; 
     189        events.doc.getElementById(this.dataID).style.backgroundColor = incidentColor[this.incident.number]; 
    186190                 
    187191                // IF this event is expanded THEN 
     
    194198                        events.doc.getElementById(this.dataID).style.border = "none"; 
    195199                } 
    196                  
     200         
    197201        } 
    198202         
     
    211215                events.doc.getElementById(this.dataID).style.color = "gray"; 
    212216        } 
     217        /** 
     218         * Normalize this Event: provide normal background and text colors. 
     219         */ 
     220        function normalize() 
     221        { 
     222        var myColor = incidentColor[this.incident.number]; 
     223                events.doc.getElementById(this.eventHeaderID).style.backgroundColor = "white"; 
     224                events.doc.getElementById(this.eventHeaderID).style.borderColor = "black"; 
     225                events.doc.getElementById(this.eventHeaderID).style.color = "black"; 
     226                events.doc.getElementById(this.dataID).style.color = "black"; 
     227        events.doc.getElementById(this.dataID).style.backgroundColor = myColor; 
     228                events.doc.getElementById(this.eventHeaderID).style.backgroundColor = myColor; 
     229    }            
     230 
    213231         
    214232        /** 
Note: See TracChangeset for help on using the changeset viewer.