Whitespace changes (these files use tabs, not spaces)
This commit is contained in:
parent
9d6ac396b3
commit
7a7999865e
|
@ -37,7 +37,6 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
add_filter( 'sm_tag-text', array( &$this, 'backwards_compat_tags_text' ) );
|
add_filter( 'sm_tag-text', array( &$this, 'backwards_compat_tags_text' ) );
|
||||||
add_filter( 'sm_day-text', array( &$this, 'backwards_compat_days_text' ) );
|
add_filter( 'sm_day-text', array( &$this, 'backwards_compat_days_text' ) );
|
||||||
add_filter( 'sm_time-text', array( &$this, 'backwards_compat_times_text' ) );
|
add_filter( 'sm_time-text', array( &$this, 'backwards_compat_times_text' ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function generates the code to display the map
|
// This function generates the code to display the map
|
||||||
|
@ -104,16 +103,16 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
lat = location.latitude;
|
lat = location.latitude;
|
||||||
lng = location.longitude;
|
lng = location.longitude;
|
||||||
|
|
||||||
if ( document.getElementById("location_search_city_field") ) {
|
if ( document.getElementById("location_search_city_field") ) {
|
||||||
document.getElementById("location_search_city_field").value = location.city;
|
document.getElementById("location_search_city_field").value = location.city;
|
||||||
}
|
}
|
||||||
if ( document.getElementById("location_search_country_field") ) {
|
if ( document.getElementById("location_search_country_field") ) {
|
||||||
document.getElementById("location_search_country_field").value = location.country_code;
|
document.getElementById("location_search_country_field").value = location.country_code;
|
||||||
}
|
}
|
||||||
if ( document.getElementById("location_search_state_field") ) {
|
if ( document.getElementById("location_search_state_field") ) {
|
||||||
document.getElementById("location_search_state_field").value = location.region_code;
|
document.getElementById("location_search_state_field").value = location.region_code;
|
||||||
}
|
}
|
||||||
if ( document.getElementById("location_search_zip_field") ) {
|
if ( document.getElementById("location_search_zip_field") ) {
|
||||||
document.getElementById("location_search_zip_field").value = location.zipcode;
|
document.getElementById("location_search_zip_field").value = location.zipcode;
|
||||||
}
|
}
|
||||||
if ( document.getElementById("location_search_default_lat" ) ) {
|
if ( document.getElementById("location_search_default_lat" ) ) {
|
||||||
|
@ -125,7 +124,7 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
' . $do_search_function . '
|
' . $do_search_function . '
|
||||||
searchLocations( 1 );
|
searchLocations( 1 );
|
||||||
}).error(function() {
|
}).error(function() {
|
||||||
' . $do_search_function . '
|
' . $do_search_function . '
|
||||||
searchLocations( ' . absint( $is_sm_search ) . ' );
|
searchLocations( ' . absint( $is_sm_search ) . ' );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -712,7 +711,7 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
function load_simplemap( lat, lng, aspid, ascid, asma, shortcode_zoom_level, map_type, shortcode_autoload ) {
|
function load_simplemap( lat, lng, aspid, ascid, asma, shortcode_zoom_level, map_type, shortcode_autoload ) {
|
||||||
|
|
||||||
zoom_level = shortcode_zoom_level;
|
zoom_level = shortcode_zoom_level;
|
||||||
autoload = shortcode_autoload;
|
autoload = shortcode_autoload;
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
if ( '' == $options['api_key'] ) {
|
if ( '' == $options['api_key'] ) {
|
||||||
|
@ -724,7 +723,7 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
|
|
||||||
do_action( 'sm-load-simplemap-js-top' );
|
do_action( 'sm-load-simplemap-js-top' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
if ( lat == 0 ) {
|
if ( lat == 0 ) {
|
||||||
lat = '<?php echo esc_js( $options['default_lat'] ); ?>';
|
lat = '<?php echo esc_js( $options['default_lat'] ); ?>';
|
||||||
}
|
}
|
||||||
|
@ -1087,7 +1086,7 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
results.innerHTML = '';
|
results.innerHTML = '';
|
||||||
|
|
||||||
// parse JSON from server
|
// parse JSON from server
|
||||||
var jsonData = jQuery( eval(data) )[0];
|
var jsonData = jQuery( eval(data) )[0];
|
||||||
|
|
||||||
var total_pages = jsonData.total_pages;
|
var total_pages = jsonData.total_pages;
|
||||||
var this_page = jsonData.this_page;
|
var this_page = jsonData.this_page;
|
||||||
|
@ -1095,15 +1094,15 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
// Create page links
|
// Create page links
|
||||||
page_links = "";
|
page_links = "";
|
||||||
for(i=1;i<=total_pages;i++){
|
for(i=1;i<=total_pages;i++){
|
||||||
page_links += '<a href="?location_search_page='+i+'"';
|
page_links += '<a href="?location_search_page='+i+'"';
|
||||||
if(i == this_page){
|
if(i == this_page){
|
||||||
page_links += ' class="active"';
|
page_links += ' class="active"';
|
||||||
}
|
}
|
||||||
page_links += '>'+i+'</a> ';
|
page_links += '>'+i+'</a> ';
|
||||||
}
|
}
|
||||||
jQuery( "#pagination" ).html( page_links );
|
jQuery( "#pagination" ).html( page_links );
|
||||||
|
|
||||||
// Create markers
|
// Create markers
|
||||||
var markers = jQuery( jsonData.locations );
|
var markers = jQuery( jsonData.locations );
|
||||||
|
|
||||||
if (markers.length == 0) {
|
if (markers.length == 0) {
|
||||||
|
@ -1170,7 +1169,7 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
// If initial load of map, zoom to default settings
|
// If initial load of map, zoom to default settings
|
||||||
map.setZoom(parseInt(zoom_level));
|
map.setZoom(parseInt(zoom_level));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paranoia - fix container sizing bug -- pdb
|
// Paranoia - fix container sizing bug -- pdb
|
||||||
google.maps.event.addListener(map, "idle", function(){
|
google.maps.event.addListener(map, "idle", function(){
|
||||||
google.maps.event.trigger(map, 'resize');
|
google.maps.event.trigger(map, 'resize');
|
||||||
|
@ -1405,7 +1404,7 @@ if ( !class_exists( 'Simple_Map' ) ) {
|
||||||
} else {
|
} else {
|
||||||
infowidth = 400;
|
infowidth = 400;
|
||||||
}
|
}
|
||||||
infowidth = infowidth * (maxbubblewidth / 100.0);
|
infowidth = infowidth * (maxbubblewidth / 100.0);
|
||||||
}
|
}
|
||||||
if ( infowidth < maxbubblewidth ) infowidth = maxbubblewidth;
|
if ( infowidth < maxbubblewidth ) infowidth = maxbubblewidth;
|
||||||
infowidth = parseInt(infowidth) + 'px';
|
infowidth = parseInt(infowidth) + 'px';
|
||||||
|
|
|
@ -46,11 +46,11 @@ if ( !class_exists( 'SM_XML_Search' ) ){
|
||||||
if ( !$input['limit'] || $input['limit'] > 250 || $input['limit'] == 0 ) {
|
if ( !$input['limit'] || $input['limit'] > 250 || $input['limit'] == 0 ) {
|
||||||
$limit_int = 250;
|
$limit_int = 250;
|
||||||
$limit = "LIMIT 250";
|
$limit = "LIMIT 250";
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$limit_int = absint( $input['limit'] );
|
$limit_int = absint( $input['limit'] );
|
||||||
$limit = 'LIMIT ' . $limit_int;
|
$limit = 'LIMIT ' . $limit_int;
|
||||||
|
}
|
||||||
$limit = apply_filters( 'sm-xml-search-limit', $limit );
|
$limit = apply_filters( 'sm-xml-search-limit', $limit );
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,10 +101,10 @@ if ( !class_exists( 'SM_XML_Search' ) ){
|
||||||
}
|
}
|
||||||
// Find out how many items are in the table
|
// Find out how many items are in the table
|
||||||
$total_locations_sql = $wpdb->get_var( "
|
$total_locations_sql = $wpdb->get_var( "
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
FROM
|
FROM
|
||||||
$wpdb->posts AS posts
|
$wpdb->posts AS posts
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
$wpdb->postmeta lat_tbl ON lat_tbl.post_id = posts.ID AND lat_tbl.meta_key = 'location_lat'
|
$wpdb->postmeta lat_tbl ON lat_tbl.post_id = posts.ID AND lat_tbl.meta_key = 'location_lat'
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
|
@ -113,11 +113,11 @@ if ( !class_exists( 'SM_XML_Search' ) ){
|
||||||
WHERE
|
WHERE
|
||||||
posts.post_type = 'sm-location'
|
posts.post_type = 'sm-location'
|
||||||
AND posts.post_status = 'publish'
|
AND posts.post_status = 'publish'
|
||||||
" );
|
" );
|
||||||
|
|
||||||
$total_locations = absint($total_locations_sql);
|
$total_locations = absint($total_locations_sql);
|
||||||
$total_pages = ceil($total_locations / $limit_int); // use ceiling to round up -- 0.01 is still "1 page"
|
$total_pages = ceil($total_locations / $limit_int); // use ceiling to round up -- 0.01 is still "1 page"
|
||||||
$this_page_number = absint($input['page']);
|
$this_page_number = absint($input['page']);
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
|
|
Loading…
Reference in New Issue
Block a user