Changeset 240 for trunk/install
- Timestamp:
- 06/15/2011 09:07:03 PM (11 months ago)
- Location:
- trunk/install
- Files:
-
- 1 added
- 4 edited
-
index.php (modified) (3 diffs)
-
js/keydragzoom_packed.js (added)
-
steps/step_dbinit.php (modified) (1 diff)
-
steps/step_dbsetup.php (modified) (1 diff)
-
steps/step_mapbounds.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/install/index.php
r239 r240 23 23 header('Content-Type: text/html;charset=utf-8;'); 24 24 25 25 26 installation_session(); 26 27 ob_start(); 27 28 /* 28 29 * Step initialization and calculation … … 57 58 <title>WiND - Installation</title> 58 59 <link rel="stylesheet" href="<?php echo surl('/../templates/basic/css/styles_packed.css')?>" > 59 <link rel="stylesheet" href="install.css"> 60 <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false" ></script> 61 <script src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/keydragzoom/2.0.5/src/keydragzoom_packed.js" type="text/javascript"></script> 60 <link rel="stylesheet" href="install.css"> 62 61 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> 63 62 </head> … … 99 98 </body> 100 99 </html> 100 101 <?php 102 ob_end_flush(); 103 ?> -
trunk/install/steps/step_dbinit.php
r239 r240 38 38 if (!isset($row[0][0])) { 39 39 show_error('Error getting data from database.' . mysql_error($link)); 40 exit;40 return false; 41 41 } 42 42 if ($row[0][0] > 0) { -
trunk/install/steps/step_dbsetup.php
r239 r240 34 34 $def_values = array_merge($def_values, $_POST); 35 35 36 // Validation37 if (empty($def_values['server'])) {38 show_error('You need to define a <strong>server</strong> to connect.');39 $step_result = false;40 }41 36 if (empty($def_values['database'])) { 42 37 show_error('You need to define a <strong>database</strong> to connect.'); -
trunk/install/steps/step_mapbounds.php
r239 r240 45 45 $step_result = false; 46 46 ?> 47 48 47 <p class="description">Hold down <strong>shift</strong> and select the area of all wireless networks that this installation will handle. 49 48 </p> … … 59 58 </form> 60 59 61 <script> 62 63 // Render selection box on map 64 function selection_box(bounds) { 65 // Remove previous 66 if (typeof(rect) != 'undefined') { 67 rect.setMap(null); 60 <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false" ></script> 61 <script type="text/javascript" src="js/keydragzoom_packed.js" ></script> 62 <script type="text/javascript"> 63 $(document).ready(function(){ 64 // Render selection box on map 65 function selection_box(bounds) { 66 // Remove previous 67 if (typeof(rect) != 'undefined') { 68 rect.setMap(null); 69 } 70 rect = new google.maps.Rectangle({ 71 bounds : bounds, 72 clickable: false, 73 map: map, 74 strokeColor: 'red' 75 }); 68 76 } 69 rect = new google.maps.Rectangle({ 70 bounds : bounds, 71 clickable: false, 72 map: map, 73 strokeColor: 'red' 74 }); 75 } 76 77 var myLatlng = new google.maps.LatLng(-34.397, 150.644); 78 var myOptions = { 79 zoom: 8, 80 center: myLatlng, 81 mapTypeId: google.maps.MapTypeId.ROADMAP 82 }; 83 var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); 84 var initial_bounds = new google.maps.LatLngBounds( 85 new google.maps.LatLng( 86 parseInt(document.getElementsByName('min_latitude')[0].value), 87 parseInt(document.getElementsByName('min_longitude')[0].value) 88 ), 89 new google.maps.LatLng( 90 parseInt(document.getElementsByName('max_latitude')[0].value), 91 parseInt(document.getElementsByName('max_longitude')[0].value) 92 )); 93 selection_box(initial_bounds); 94 map.fitBounds(initial_bounds); 95 96 // simple drag zoom 97 map.enableKeyDragZoom( 98 99 { key: "shift", 77 78 var myLatlng = new google.maps.LatLng(-34.397, 150.644); 79 var myOptions = { 80 zoom: 8, 81 center: myLatlng, 82 mapTypeId: google.maps.MapTypeId.ROADMAP 83 }; 84 var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); 85 var initial_bounds = new google.maps.LatLngBounds( 86 new google.maps.LatLng( 87 parseInt(document.getElementsByName('min_latitude')[0].value), 88 parseInt(document.getElementsByName('min_longitude')[0].value) 89 ), 90 new google.maps.LatLng( 91 parseInt(document.getElementsByName('max_latitude')[0].value), 92 parseInt(document.getElementsByName('max_longitude')[0].value) 93 )); 94 selection_box(initial_bounds); 95 map.fitBounds(initial_bounds); 96 97 // simple drag zoom 98 map.enableKeyDragZoom({ 99 key: "shift", 100 100 boxStyle: { border: "thin solid black", backgroundColor: "transparent", opacity: 1}, 101 101 paneStyle: { backgroundColor: "gray", opacity: 0.4 } 102 } 103 ); 102 }); 104 103 105 // Handle selection event 106 google.maps.event.addListener(map.getDragZoomObject(), 'dragend', function (bnds) { 107 document.getElementsByName('min_latitude')[0].value = bnds.getSouthWest().lat(); 108 document.getElementsByName('min_longitude')[0].value = bnds.getSouthWest().lng(); 109 document.getElementsByName('max_latitude')[0].value = bnds.getNorthEast().lat(); 110 document.getElementsByName('max_longitude')[0].value = bnds.getNorthEast().lng(); 111 selection_box(bnds); 104 // Handle selection event 105 google.maps.event.addListener(map.getDragZoomObject(), 'dragend', function (bnds) { 106 document.getElementsByName('min_latitude')[0].value = bnds.getSouthWest().lat(); 107 document.getElementsByName('min_longitude')[0].value = bnds.getSouthWest().lng(); 108 document.getElementsByName('max_latitude')[0].value = bnds.getNorthEast().lat(); 109 document.getElementsByName('max_longitude')[0].value = bnds.getNorthEast().lng(); 110 selection_box(bnds); 111 }); 112 112 }); 113 113
Note: See TracChangeset
for help on using the changeset viewer.
