/* ---------------------------------------------------------------------- 27.10.2022 Добавление города обитания ---------------------------------------------------------------------- */ function addCityList(data, city){ if (data=='0'){ var cityText=$("#sel-children-city option:selected").text(); $("#cityList").append(' ' + cityText + ' ') } } $("#AddCityPerevozka").click(function(event) { var city=$("#sel-children-city option:selected").val(); $.ajax({ type: 'POST', url: '/act/lk-perevozka', data: 'act=AddCityPerevozka&city=' + city, success: function(data) {addCityList(data, city)} }); }) /* ---------------------------------------------------------------------- 30.10.2022 Удаление города обитания ---------------------------------------------------------------------- */ $(document).on("click", ".delCityWork", function(event){ var city_id=$(this).data('id'); $(this).parent().parent().hide('4000'); $.ajax({ type: 'POST', url: '/act/lk-perevozka', data: 'act=RemoveCityPerevozka&city_id=' + city_id, success: function(data) {} }); }); /* ---------------------------------------------------------------------- 30.10.2022 Включаем режим организации ---------------------------------------------------------------------- */ $('#onOrg').click(function(event) { if($(this).is(":checked")) { var org = 1; $('.a-' + tip).removeClass('hidden'); $('.a-' + tip).addClass('d-flex'); }else{ var org = 0; $('.a-' + tip).addClass('hidden'); $('.a-' + tip).removeClass('d-flex'); } $.ajax({ type: 'POST', url: '/act/lk', data: 'act=onOrg&do=' + org, success: function(data) {/*p006ResultLD(data)*/} }); //return false; }) /* ---------------------------------------------------------------------- 15.10.2022 Селект ---------------------------------------------------------------------- */ $("#sel-children-city").chained("#sel-parent-region");