#1480 Frontent
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3473 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
8f7f2c03db
commit
6241856464
10 changed files with 160 additions and 25 deletions
|
|
@ -63,16 +63,40 @@ $(document).ready(function() {
|
|||
$('#no_flight_time').show();
|
||||
}
|
||||
});
|
||||
var toggle_first = false;
|
||||
var toggle_first= [];
|
||||
|
||||
function updateNationality(ele){
|
||||
var obj = ele.parents('.nationality_select').data('toggle');
|
||||
if(ele.val()){
|
||||
$(obj).show('slow');
|
||||
if(!toggle_first){
|
||||
$(obj).find('.accordion-toggle').click();
|
||||
toggle_first = true;
|
||||
}
|
||||
var values = $("input[name='travel_program_countries_id[]']").map(function(){return $(this).val();}).get();
|
||||
|
||||
var tmp = location.href.split('?');
|
||||
var tmp2 = tmp[0].split('/');
|
||||
tmp2.pop();
|
||||
var url = tmp2.join('/') + '/show_nationality_country_text';
|
||||
if (tmp[1])
|
||||
{
|
||||
url += '?'+ tmp[1];
|
||||
}
|
||||
|
||||
var data = {nationality_id : ele.val(), country_ids: values};
|
||||
|
||||
$.ajax({
|
||||
url:url,
|
||||
type: "POST",
|
||||
data: data,
|
||||
}).then(function(r) {
|
||||
$(obj).find('.set_nationality_country_text').html(r);
|
||||
$(obj).show('slow');
|
||||
if(!toggle_first[ele.val()]){
|
||||
$(obj).find('.accordion-toggle').click();
|
||||
toggle_first[ele.val()] = true;
|
||||
}
|
||||
|
||||
|
||||
}, function() {
|
||||
summary$.html('Aufgrund eines Fehlers konnte kein Angebot ermittelt werden.');
|
||||
});
|
||||
}else{
|
||||
$(obj).hide();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue