Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1356

Přidáno uživatelem Ondřej Fibich před více než 12 roky(ů)

Oprava #145 (Chyba pri samo-registraci u vyplneni GPS) a pridruzenych chyb.

Zobrazit rozdíly:

freenetis/branches/testing/application/controllers/streets.php
{
$street = NULL;
}
$this->redirect('streets/show_all');
echo $street->id;
$this->redirect('streets/show_all', $street->id);
}
else
{
freenetis/branches/testing/application/libraries/MY_Controller.php
'address_points/get_gps_by_street_street_number_town_country',
'address_points/get_gps_by_address_from_google',
'json/get_streets_by_town',
'address_points/get_gps_by_address',
);
/** @var unknown_type */
freenetis/branches/testing/application/views/js/__pieces/gps.php
{
"street_id": $("#street_id").val(),
"street_number": $("#street_number").val(),
"town_id": $("#town_id").val(),
"town_id": $("#town_id").val(),
"country_id": $("#country_id").val()
}, function(data)
{
......
// triggers find of GPS
$("#street_id, #street_number, #town_id, #country_id").change(function ()
{
$("#street_id, #street_number, #town_id, #country_id").trigger('keyup');
$(this).trigger('keyup');
});
// try to find GPS for domicile address point and set it (used at members)
......
{
$.get("<?php echo url_lang::base() ?>address_points/get_gps_by_address/",
{
"street_id": $("#domicile_street_id").val(),
"street_number": $("#domicile_street_number").val(),
"town_id": $("#domicile_town_id").val(),
"country_id": $("#domicile_country_id").val()
}, function(data){
"street_id": $("#domicile_street_id").val(),
"street_number": $("#domicile_street_number").val(),
"town_id": $("#domicile_town_id").val(),
"country_id": $("#domicile_country_id").val()
}, function(data)
{
var s = data.split(" ");
$("#domicile_gpsx").val(s[0]);
$("#domicile_gpsy").val(s[1]);
......
// triggers find of GPS
$("#domicile_street_id, #domicile_street_number, #domicile_town_id, #domicile_country_id").change(function ()
{
$("#domicile_street_id, #domicile_street_number, #domicile_town_id, #domicile_country_id").trigger('keyup');
$(this).trigger('keyup');
});
freenetis/branches/testing/application/views/js/__pieces/address_point_street.php
});
$street.show();
$street.next().show();
var url_pieces = explode("?", street_add_url);
url_pieces[0] += '/'+$(this).val()
$street.next().attr('href', implode("?", url_pieces));
if (street_add_url)
{
$street.next().show();
var url_pieces = explode('?', street_add_url);
url_pieces[0] += '/' + $(this).val();
$street.next().attr('href', implode("?", url_pieces));
}
}
else
{
$street.hide();
$street.next().hide();
if (street_add_url)
{
$street.next().hide();
}
}
});
$('#town_id, #domicile_town_id').trigger('change');
$('#street_id').live('change', function(){
$('#street_id').live('change', function()
{
$('#town_id').trigger('change');
});
$('#domicile_street_id').live('change', function(){
$('#domicile_street_id').live('change', function()
{
$('#domicile_town_id').trigger('change');
});

Také k dispozici: Unified diff