Changeset 738 for trunk/Modules/Map/Map.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Map/Map.php
r721 r738 15 15 if(count($this->System->PathItems) > 1) 16 16 { 17 if($this->System->PathItems[1] == 'show-position') return($this->ShowPosition()); 17 if($this->System->PathItems[1] == 'show-position') return($this->ShowPosition()); 18 18 else return(PAGE_NOT_FOUND); 19 19 } else return($this->ShowMain()); 20 20 } 21 21 22 22 function ShowPosition() 23 23 { … … 37 37 } else return('Položka nenalezena'); 38 38 } 39 39 40 40 function ShowMain() 41 41 { … … 49 49 var tinyIcon; 50 50 51 function initialize() 52 { 53 if (GBrowserIsCompatible()) 51 function initialize() 52 { 53 if (GBrowserIsCompatible()) 54 54 { 55 55 map = new GMap2(document.getElementById("map_canvas")); … … 58 58 map.setUIToDefault(); 59 59 map.addControl(new GOverviewMapControl(new GSize(128, 96))); 60 60 61 61 62 62 // Create our "tiny" marker icon … … 68 68 tinyIcon.iconAnchor = new GPoint(5, 5); 69 69 tinyIcon.infoWindowAnchor = new GPoint(5, 1); 70 71 72 73 74 $Output .= ' 75 } 76 } 77 78 function toggleLabel(id) 79 { 80 81 82 83 } 84 85 function UpdateNetworkLinks() 86 { 87 if ((document.getElementById("NetworkLinks")).checked == true) 88 { 89 70 71 toggleLabel(\'NetworkLinks\'); 72 toggleLabel(\'NetworkDevices\');'; 73 74 $Output .= ' 75 } 76 } 77 78 function toggleLabel(id) 79 { 80 var ele = document.getElementById(id); 81 ele.checked = !ele.checked; 82 ele.onclick( ); 83 } 84 85 function UpdateNetworkLinks() 86 { 87 if ((document.getElementById("NetworkLinks")).checked == true) 88 { 89 NetworkLinks = ['; 90 90 $DbResult = $this->Database->query('SELECT * FROM NetworkLink WHERE Interface1 <> 0 AND Interface2 <> 0'); 91 91 while($Link = $DbResult->fetch_assoc()) … … 114 114 } 115 115 116 117 118 { 119 120 121 122 123 } 124 125 function toggleLabel(id) 126 { 127 128 129 130 } 131 132 function UpdateNetworkDevices() 133 { 134 if ((document.getElementById("NetworkDevices")).checked == true) 135 { 136 116 } else { //checkbox turned off 117 for (var i in NetworkLinks) 118 { 119 map.removeOverlay(NetworkLinks[i]); 120 NetworkLinks[i] = null; 121 } 122 } 123 } 124 125 function toggleLabel(id) 126 { 127 var ele = document.getElementById(id); 128 ele.checked = !ele.checked; 129 ele.onclick( ); 130 } 131 132 function UpdateNetworkDevices() 133 { 134 if ((document.getElementById("NetworkDevices")).checked == true) 135 { 136 NetworkDevices = ['; 137 137 138 138 $DbResult = $this->Database->query('SELECT GROUP_CONCAT(NetworkDevice.Name SEPARATOR ",") AS Name, '. … … 153 153 } 154 154 155 156 157 { 158 159 160 161 } 155 } else { //checkbox turned off 156 for (var i in NetworkDevices) 157 { 158 map.removeOverlay(NetworkDevices[i]); 159 NetworkDevices[i] = null; 160 } 161 } 162 162 } 163 163 … … 165 165 $Output .= '<table style="margin-left: auto; margin-right: auto; width: 100%; height: 80%;"> 166 166 <tr> 167 <td style="width: 80%; height: 100%;"> 167 <td style="width: 80%; height: 100%;"> 168 168 <div id="map_canvas" style="width: 100%; height: 100%;"></div></td> 169 169 <td style="width: 20%"> … … 208 208 $this->SupportedModels = array(); 209 209 } 210 210 211 211 function DoStart() 212 212 { … … 225 225 )); 226 226 $this->System->FormManager->RegisterFormType('TMapPosition', array( 227 228 229 230 231 227 'Type' => 'Reference', 228 'Table' => 'MapPosition', 229 'Id' => 'Id', 230 'Name' => 'Name', 231 'Filter' => '1', 232 232 )); 233 234 } 235 } 233 234 } 235 }
Note:
See TracChangeset
for help on using the changeset viewer.