Changeset 301 in tmcsimulator for trunk/src/cptms/cms_demo.html
- Timestamp:
- 03/10/2019 01:20:33 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/cptms/cms_demo.html (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cptms/cms_demo.html
r300 r301 17 17 } 18 18 textarea { 19 height: 33px; 19 20 width: 272px; 20 21 resize: none; 21 22 font-family: Scoreboard; 22 23 font-size: xx-large; 23 background-color: black;24 background-color: #2F4F4F; 24 25 color: yellow; 25 26 } … … 40 41 width: 540px; 41 42 overflow: hidden; 42 background-color: # ECECFB;43 background-color: #A8C5FF; /*#ECECFB; */ 43 44 border: thin solid #BDBDBD; 44 45 padding: 5px; … … 55 56 height: 122px; 56 57 width: 135px; 57 background-color: # ECECFB;58 background-color: #729FFF; 58 59 float: left; 59 60 … … 62 63 height: 122px; 63 64 width: 100px; 64 background-color: # ECECFB;65 background-color: #729FFF; 65 66 border-left: none; 66 67 float: left; … … 74 75 top: 10%; 75 76 right: 20%; 76 background-color: # ECECFB;77 background-color: #729FFF; /* #ECECFB; */ 77 78 margin: auto; 78 79 padding: 20px; … … 81 82 display: none; 82 83 } 83 #hideButton { 84 font-size: 40px; 85 margin-right: 9px; 86 background-color: #fff; 87 color: #47476b; 84 .unstyled-button { 85 border: 0 none; 86 padding: 0; 87 background: none; 88 88 cursor: pointer; 89 89 } 90 90 91 91 92 /* The Close Button */ … … 106 107 </head> 107 108 <body> 108 <!-- <div id="cms-name" style="display: none;"></div>109 <div id="cms-message" style="display: none;">110 111 <input id="msgcontent1" size="16" maxlength="16"/>112 <input id="msgcontent2" size="16" maxlength="16"/>113 <input id="msgcontent3" size="16" maxlength="16"/>114 </div>115 <input id='cmsID' value="" type='hidden'/>116 <div id="userinput" style="display: none;">117 <button onclick="handleClear();">Clear</button>118 <button onclick="handleSubmit();">OK</button>119 <button onclick="handleCancel();">Cancel</button>120 </div>121 -->122 109 <div id="map"></div> 123 110 <!--The div element where the show/hide button appears --> 124 <div id="hideButton">👁</div> 111 <!-- div id="hideButton">👁</div --> 112 <button id="cmsButton" class="unstyled-button"><img id="cmsBtnImg" src="images/btnDepressed_CMS.png"></button> 113 <button id="vdsButton" class="unstyled-button"><img id="vdsBtnImg" src="images/btnDepressed_VDS.png"></button> 125 114 <div id="map" class = "wrapper"></div> 126 115 <!-- The div element for the popup dialog --> … … 156 145 var map; 157 146 var kMapStartupFile = "cmsStatusD12.json"; 158 var blueFlag = "i con_cmsBlue.png";159 var yellowFlag = "i con_cmsYellow.png";147 var blueFlag = "images/icon_cmsBlue.png"; 148 var yellowFlag = "images/icon_cmsYellow.png"; 160 149 var messageList; 161 150 var cms_info; 162 151 var markerList = []; 163 var showing = true; 152 var cms_showing = true; 153 var vds_showing = true; 164 154 165 155 function initMap() … … 176 166 setMarkers(); 177 167 } 178 // Initialize the view/hide button 168 // Initialize the view/hide buttons 179 169 function initButton() 180 170 { 181 var hideBtnDiv = document.getElementById('hideButton');182 map.controls[google.maps.ControlPosition. RIGHT_CENTER].push(hideBtnDiv)183 hideBtnDiv.title = 'Click to toggle cms view';171 var cmsBtnDiv = document.getElementById('cmsButton'); 172 map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(cmsBtnDiv) 173 cmsBtnDiv.title = 'Click to toggle cms view'; 184 174 185 175 // Setup the click event listeners to toggle icon display 186 hideBtnDiv.addEventListener('click', function() { 187 showing = !showing; 176 cmsBtnDiv.addEventListener('click', function() { 177 cms_showing = !cms_showing; 178 // reveal or hide all the icons 188 179 for (var i = 0; i < markerList.length; i++) 189 180 { 190 markerList[i].setVisible(showing); 191 } 181 markerList[i].setVisible(cms_showing); 182 } 183 // Determine which button image to show 184 if (cms_showing) 185 { 186 pic = "images/btnDepressed_CMS.png" 187 } 188 else 189 { 190 pic = "images/btnReady_CMS.png" 191 } 192 document.getElementById('cmsBtnImg').src=pic; 193 }); 194 var vdsBtnDiv = document.getElementById('vdsButton'); 195 map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(vdsBtnDiv) 196 vdsBtnDiv.title = 'Click to toggle vds view'; 197 198 // Setup the click event listeners to toggle icon display 199 vdsBtnDiv.addEventListener('click', function() { 200 vds_showing = !vds_showing; 201 // reveal or hide all the icons 202 alert("Not implemented yet") 203 // Determine which button image to show 204 if (vds_showing) 205 { 206 pic = "btnDepressed_VDS.png" 207 } 208 else 209 { 210 pic = "btnReady_VDS.png" 211 } 212 document.getElementById('vdsBtnImg').src=pic; 192 213 }); 193 214 } … … 212 233 simpleImage = blueFlag; 213 234 var directionCode = cms.location.direction.charAt(0); 214 var rolloverText = " " +directionCode + " " + cms.location235 var locationInfo = directionCode + " " + cms.location 215 236 .route + " " + cms.location.postmile + " " + cms 216 237 .location.locationName … … 224 245 map: map, 225 246 icon: simpleImage, 226 title: rolloverText, 227 label: "" + i 247 title: "#"+i+" " +locationInfo, 248 cmsid: "" + i, 249 location: locationInfo 228 250 }); 229 251 google.maps.event.addListener(markerList[i], 'click', … … 233 255 dialog.style.display = 'block'; 234 256 // fetch the sequential msg # 235 cmsID = Number(this. getLabel());257 cmsID = Number(this.cmsid); 236 258 // Assign to the hidden field 237 259 document.getElementById('cmsID').value = cmsID; 238 260 getMessage(cmsID); // note: this is async 239 document.getElementById('cms-info-label').innerHTML = "CMS id: " +240 cmsID + " LOCATION: " + this. title;261 document.getElementById('cms-info-label').innerHTML = "CMS ID: " + 262 cmsID + " LOCATION: " + this.location; 241 263 // clear input fields 242 264 document.getElementById('msgcontent1').value = "";
Note: See TracChangeset
for help on using the changeset viewer.
