Revize c1bdc1c4
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
application/views/js/__pieces/domicile.php | ||
---|---|---|
if ($("#use_domicile:checked").val() != null)
|
||
{
|
||
$("[id^='domicile']").parent().parent().show();
|
||
$("#toggle_addresses_button").show();
|
||
}
|
||
else
|
||
{
|
||
$("[id^='domicile']").parent().parent().hide();
|
||
$("#toggle_addresses_button").hide();
|
||
}
|
||
}
|
||
|
||
// toggle address with domicile
|
||
$("#toggle_addresses_button").live('click', function (){
|
||
var town_id = $("#town_id").val();
|
||
var town = $("#town").val();
|
||
var district = $("#district").val();
|
||
var street_id = $("#street_id").val();
|
||
var street = $("#street").val();
|
||
var street_number = $("#street_number").val();
|
||
var zip = $("#zip").val();
|
||
var gpsx = $("#gpsx").val();
|
||
var gpsy = $("#gpsy").val();
|
||
var domicile_town_id = $("#domicile_town_id").val();
|
||
var domicile_town = $("#domicile_town").val();
|
||
var domicile_district = $("#domicile_district").val();
|
||
var domicile_street_id = $("#domicile_street_id").val();
|
||
var domicile_street = $("#domicile_street").val();
|
||
var domicile_street_number = $("#domicile_street_number").val();
|
||
var domicile_gpsx = $("#domicile_gpsx").val();
|
||
var domicile_gpsy = $("#domicile_gpsy").val();
|
||
var domicile_zip = $("#domicile_zip").val();
|
||
|
||
$("#town_id").val(domicile_town_id);
|
||
$("#town_id").trigger('change');
|
||
$("#domicile_town_id").val(town_id);
|
||
$("#domicile_town_id").trigger('change');
|
||
|
||
$("#town").val(domicile_town);
|
||
$("#domicile_town").val(town);
|
||
|
||
$("#district").val(domicile_district);
|
||
$("#domicile_district").val(district);
|
||
|
||
$("#street_id").val(domicile_street_id);
|
||
$("#street_id").trigger('change');
|
||
$("#domicile_street_id").val(street_id);
|
||
$("#domicile_street_id").trigger('change');
|
||
|
||
$("#street_number").val(domicile_street_number);
|
||
$("#street_number").trigger('change');
|
||
$("#domicile_street_number").val(street_number);
|
||
$("#domicile_street_number").trigger('change');
|
||
|
||
$("#street").val(domicile_street);
|
||
$("#street").trigger('change');
|
||
$("#domicile_street").val(street);
|
||
$("#domicile_street").trigger('change');
|
||
|
||
$("#zip").val(domicile_zip);
|
||
$("#domicile_zip").val(zip);
|
||
|
||
$("#gpsx").val(domicile_gpsx);
|
||
$("#gpsy").val(domicile_gpsy);
|
||
|
||
$("#domicile_gpsx").val(gpsx);
|
||
$("#domicile_gpsy").val(gpsy);
|
||
});
|
||
|
||
$("#use_domicile").parent().parent().append("<button id='toggle_addresses_button' type='button' class='submit' title='<?php echo __('Toggle address of connecting place with domicile') ?>'><img src='<?php echo url::base() ?>media/images/icons/reload.png'><?php echo __('Toggle addresses') ?></button>");
|
||
|
||
// toogle domicile
|
||
update_domicile_fields();
|
||
// toogle domical on use_domicile change
|
Také k dispozici: Unified diff
Release 1.1.0