// 選択した条件で絞り込む function search_frm_submit(){ var win_con = ''; $('.sys_con_box :checked').each(function(){ win_con += (win_con != '' ? '_' : '') + $(this).val(); }); $('#win_con').val(win_con); var b_err = false; if(!b_err && $('#prl').val() != '' && $('#prh').val() != '' && parseFloat($('#prl').val()) > parseFloat($('#prh').val())){ alert('家賃を正しく入力してください。'); b_err = true; } if(!b_err && $('#arl').val() != '' && $('#arh').val() != '' && parseFloat($('#arl').val()) > parseFloat($('#arh').val())){ alert('専有面積を正しく入力してください。'); b_err = true; } if(b_err){ return false; } else { $('#search_frm').submit(); return true; } } // 一括お問い合わせ function submitContactBtn(prm_sp){ var sel_id = ''; var sel_id2 = ''; i_cnt = 0; $("[id^='chk_']:checked").each(function(){ if(i_cnt < 16){ sel_id = sel_id + (sel_id != '' ? '_' : '') + $(this).val(); } else { sel_id2 = sel_id2 + (sel_id2 != '' ? '_' : '') + $(this).val(); } i_cnt++; }); if(sel_id != ''){ if(prm_sp == 1){ location.href = "https://family.kyoto-life.jp/sp/inquiry/bukken/" + sel_id + (sel_id2 != '' ? '/sp/bukken2/' + sel_id2 : ''); } else { location.href = "https://family.kyoto-life.jp/inquiry/bukken/" + sel_id + (sel_id2 != '' ? '/bukken2/' + sel_id2 : ''); } } else { alert('物件を選択してください。'); } } // まとめてチェック function setSelectAll(prm_elm){ if($(prm_elm).prop('checked')){ $("[id^='chk_']").each(function(){ $(this).removeAttr('checked'); $(this).prop('checked', !$(this).is(':checked')); }); $("[name^='check_all']").each(function(){ if(!$(this).prop('checked')){ $(this).removeAttr('checked'); $(this).prop('checked', true); } }); } else { $("[id^='chk_']").each(function(){ $(this).removeAttr('checked'); }); $("[name^='check_all']").each(function(){ if($(this).prop('checked')){ $(this).removeAttr('checked'); } }); } } // 最近見た物件へ追加 function setHistory(prm_i_id){ // 最近見た物件 var sa_history = []; var s_item = prm_i_id; if($.cookie('history')){ sa_history = $.cookie('history').split(','); } var i_find = 0; jQuery.each(sa_history, function() { if(this == s_item){ i_find = 1; return; } }); if(i_find == 0){ sa_history.push(s_item); } if (sa_history.length >= 21){ sa_history.shift(); } $.cookie('history', sa_history, { expires: 30, path: '/' }); $('#head_history a').html(sa_history.length); } // この条件を保存する function setCondition(s_cond){ var s_item; var o_date = new Date(); var y = o_date.getYear(); if(y < 2000 ) y += 1900; s_item = y + '.' + (o_date.getMonth() + 1) + '.' + o_date.getDate() + ' ' + o_date.getHours() + ':' + o_date.getMinutes() + ' (' + $('#dmy_total').val() + '件)' + "\t" + s_cond; var sa_condition = []; if($.cookie('condition')){ sa_condition = $.cookie('condition').split(","); } var i_find = 0; jQuery.each(sa_condition, function() { var sa_tmp = this.split("\t"); if((sa_tmp.length == 2) && (sa_tmp[1] == s_cond)){ i_find = 1; return; } }); if(i_find == 0){ sa_condition.push(s_item); } if (sa_condition.length >= 6){ sa_condition.shift(); } $.cookie('condition', sa_condition, { expires: 30, path: '/' }); // $('#head_save a').html(sa_condition.length); // class="js-lightbox" href="/_parts/popup-save-status.php" }