// ========================================================================================
function ajax_callback_func(ajax_nm, frm_nm, data, input_A)
{
try { data = JSON.parse(data); }
catch (e) { }
// ------------------------------------------------------------------------------------------------
if( data == 'error' ) { }
// ------------------------------------------------------------------------------------------------ rlty
else if( ajax_nm == 'get_blog_dvw_html' )
{
$("#blog_ctn_html").html(data);
}
else if( ajax_nm == 'get_blog_ctn' )
{
$('#blog_clipboard .modal-footer .blog_tt').html(data.DATA_4_CALLBACK_FUNC.title);
$('#blog_clipboard .modal-footer .blog_bs_pic').html(data.DATA_4_CALLBACK_FUNC.bs_pic_loc);
$('#blog_clipboard .modal-title').html(data.DATA_4_CALLBACK_FUNC.kyg_rlty_key_han);
// ---
$("#blog_bs_frm input[name=Cc]").val(data.DATA_4_CALLBACK_FUNC.Cc);
$("#blog_bs_frm input[name=Sn]").val(data.DATA_4_CALLBACK_FUNC.Sn);
$("#blog_bs_frm input[name=Rn]").val(data.DATA_4_CALLBACK_FUNC.Rn);
$("#blog_bs_frm input[name=bttm_img_1]").val(data.DATA_4_CALLBACK_FUNC.bl_overwrite_img);
$("#blog_bs_frm input[name=bttm_img_2]").val(data.DATA_4_CALLBACK_FUNC.br_overwrite_img);
if(typeof data.DATA_4_CALLBACK_FUNC.pic_list.length != 'undefined')
$("#blog_bs_frm input[name=rlty_img]").val(data.DATA_4_CALLBACK_FUNC.pic_list[0]);
// ---
$("#blog_wtm_frm input[name=preview_wtr_font]").val(data.DATA_4_CALLBACK_FUNC.preview_wtr_font);
$("#blog_wtm_frm input[name=preview_wtr_font_size]").val(data.DATA_4_CALLBACK_FUNC.preview_wtr_font_size);
$("#blog_wtm_frm input[name=preview_wtr_color]").val(data.DATA_4_CALLBACK_FUNC.preview_wtr_color);
$("#blog_wtm_frm input[name=preview_wtr_alpha]").val(data.DATA_4_CALLBACK_FUNC.preview_wtr_alpha);
$("#blog_wtm_frm textarea[name=preview_wtr_text]").val(data.DATA_4_CALLBACK_FUNC.wtr_mark_txt);
$("#blog_wtm_frm input[name=preview_wtr_position]").val(data.DATA_4_CALLBACK_FUNC.preview_wtr_position);
$("#blog_wtm_frm input[name=preview_rb_img]").val(data.DATA_4_CALLBACK_FUNC.preview_rb_img);
// ---
var blog_kyg_pic_A = '';
$("#blog_clipboard .blog_pic_list").html('');
if(data.DATA_4_CALLBACK_FUNC.pic_list.length > 0)
{
blog_kyg_pic_A = data.DATA_4_CALLBACK_FUNC.pic_list;
for(var blog_p_iii = 0; blog_p_iii < blog_kyg_pic_A.length; blog_p_iii++)
{
blog_kyg_pic = "
![](\""+blog_kyg_pic_A[blog_p_iii]+"\")
";
$("#blog_clipboard .blog_pic_list").append(blog_kyg_pic);
if(blog_p_iii == 15) break;
}
}
}
else if( ajax_nm == 'del_gen_pic' )
{
if( data == 'done' )
{
alert('Á¤»óÀûÀ¸·Î »èÁ¦ µÇ¾ú½À´Ï´Ù.');
If_Exists_Then_Visibilty("gen_rlty_pic_"+input_A.p02, 'none');
location.reload();
}
else if( data == 'nothing' ) alert('»çÁø Á¤º¸°¡ ¾ø½À´Ï´Ù.');
else alert('¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.');
If_Exists_Then_Visibilty('ajax-brd-loader', 'none');
}
else if( ajax_nm == 'del_attach_file' )
{
Mod_File_Ext_Value(input_A.p01, input_A.p02, input_A.p04);
}
else if( ajax_nm == 'myz_alarm' || ajax_nm == 'myz_sa_log' || ajax_nm == 'kyg_neighbor_statistic' )
{
If_Exists_Then_Visibilty('progress_place_holder', 'none');
if( data == 'no_result' || data == '' ) re_msg = "´õ °¡Á®¿Ã ¸ñ·ÏÀÌ ¾ø½À´Ï´Ù.";
else if( data == 'need_login' ) re_msg = "·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.";
if( data == 'no_result' || data == '' || data == 'need_login' )
{
if( ajax_nm == 'kyg_neighbor_statistic' ) return false;
swal({
title: "",
text: re_msg,
timer: 1000,
showConfirmButton: false
});
data = "°Ë»öµÈ ³»¿ëÀÌ ¾ø½À´Ï´Ù.";
$('#rlty_list').append(data);
}
else if( data != '' )
{
if( ajax_nm == 'kyg_neighbor_statistic' ) $('#kyg_neighbor_stat_box').append(data);
else
{
$('#rlty_list').append(data);
$('#rlty_list').attr("prcs_step", 0);
}
}
}
else if( ajax_nm == 'stop_share_gen' ) location.reload();
else if( ajax_nm == 'set_concern' )
{
if( data == 'need_login' ) return false;
var rst_DATA = data.split("|_|");
var concern_rst = rst_DATA[0];
var memo_rst = rst_DATA[1];
// ======================================================================================= °ü½É »óÅ ó¸®
if( concern_rst == 'concern_set_ok' )
{
$("#concern_btn").attr('class', 'mobile_img my_concern_on_1');
$("#concern_btn").attr("onclick","ajax_client_main('set_concern', 'frm_concern', 'del')");
}
else if( concern_rst == 'concern_del_ok' )
{
$("#concern_btn").attr('class', 'mobile_img my_concern_off');
}
// ======================================================================================= ¸Þ¸ð »óÅ ó¸®
if( memo_rst == 'memo_ok' )
{
ajax_client_main('memo','frm_memo','get');
$("#memo_btn").attr('class', 'mobile_img my_memo_on');
}
// ======================================================================================= °á°ú ó¸®
if( frm_nm == 'frm_memo' )
{
$("#frm_memo #BRD_TITLE").val('');
$("#frm_memo #BRD_CONTENT").val('');
open_memo_frm('close');
return false;
}
else if( input_A.p01 == 'set' )
{
$("#frm_concern #folder").val('');
$("#frm_concern #etc_folder_nm").val('');
$("#frm_concern #BRD_TITLE").val('');
$("#frm_concern #BRD_CONTENT").val('');
$(".usage_btn").attr('class', 'usage_btn');
Right_Panel_Ctrl('1', 'concern_frm', 'close');
}
}
else if( ajax_nm == 'save_srch_opt' )
{
if( data == 'need_log_in' )
{
Cjs_setCookie('TEMP_MAP_FV_PARAMS', $("#map_fv_frm").serialize(), 1);
swal({
title: "",
text: "·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ±â´ÉÀÔ´Ï´Ù.",
timer: 1000,
showConfirmButton: false
});
setTimeout(function(){
togo_url = window.location.pathname + location.search;
location.href='/workdir/mobile/upcate_lf/mem/login.php?togo=' + togo_url;
}, 1500);
}
else if( data == 'done' )
{
Cjs_setCookie('TEMP_MAP_FV_PARAMS', '', 1);
//$("#map_fv_frm").reset();
$("form").each(function() {
if(this.id == "map_fv_frm") this.reset();
});
if( frm_nm == 'map_fv_frm' )
open_map_fvrt( 'save_frm', 'close');
swal({
title: "",
text: "ÀúÀåµÇ¾ú½À´Ï´Ù.",
timer: 1000,
showConfirmButton: false
});
}
}
else if( ajax_nm == 'reg_brokerage' )
{
if( data == 0 ) { }
else if( data == 1 ) cjs_alert( 'ÀúÀåµÇ¾ú½À´Ï´Ù.');
else if( data == 2 ) cjs_alert( 'ÃÖÃÊ ¼³Á¤Çß´ø Áß°³¼ö¼ö·áÀ² º¸´Ù ³ôÀº °ªÀ» ¼³Á¤ÇÒ ¼ö ¾ø½À´Ï´Ù.');
}
else if( ajax_nm == 'change_gen_stat' )
{
document.getElementById("ajax-brd-loader").style.display = "none";
if( data == 'reload' )
{
if( input_A.p03 == 'delete' && input_A.p05 == 'gen_dview' )
{
alert('»èÁ¦µÇ¾ú½À´Ï´Ù.');
opener.location.reload();
self.close();
}
else
location.reload();
}
else if( input_A.p05 == 'gen_list' ) location.reload();
else if( data == 'cancellation_only' ) alert('ÇãÀ§ ¹°°ÇÀº µî·Ï ½ÂÀÎÇØÁ¦¸¸ ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
else if( data == 'need_agency_info' ) alert('¸Å¹°À» 300°³ ÀÌ»ó ¿Ã¸®½Ã°Å³ª,\n\nÁß°³¼ö¼ö·á°¡ ¹ß»ýÇÏ´Â ¹°°ÇÀ» ¿Ã¸®½Ã·Á¸é,\n\nÁß°³»ç¹«¼Òȸ¿ø °¡ÀÔÀÌ ÇÊ¿äÇÕ´Ï´Ù.');
else if( data == 'no_right' ) alert('±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');
else if( data == 'agree_to_reg' )
{
var confirm_msg_4_reg = "°³ÀÎÁ¤º¸ Á¦°ø¿¡ µ¿ÀÇÇÏÁö ¾ÊÀ¸¼Ì½À´Ï´Ù.\n°³ÀÎÁ¤º¸ Á¦°ø¿¡ µ¿ÀÇ ÇϽðڽÀ´Ï±î?";
if( confirm(confirm_msg_4_reg) )
{
ex_p02 = input_A.p02.split('|_|');
rlty_key_one = ex_p02[1];
Mem_Change_Gen_Status(for_put_get, 'agree_to_reg', rlty_key_one);
}
return false;
}
}
// ------------------------------------------------------------------------------------------------ ied_search
else if( ajax_nm == 'ied_srch' )
{
If_Exists_Then_Visibilty('progress_place_holder', 'none');
$("#progress_place_holder").css('position', 'static');
//console.log(data);
//if( html == '' ) return false;
///$('.load-more').remove();
///$('#postList').append(html);
// console.log('test11');
var source = $("#"+input_A.template_nm).html();
//console.log('test22');
//console.log(input_A);
//console.log('test33');
//console.log(input_A.template_nm);
template = Handlebars.compile(source);
//console.log('test44');
if( data == '' ){
$('#rlty_list').attr("nextpg", 0);
//$('#rlty_list').append("°Ë»öµÈ ³»¿ëÀÌ ¾ø½À´Ï´Ù.");
//$('#end_of_list').css("display","block");
If_Exists_Then_Visibilty('end_of_list', 'block');
//if( $('#rlty_list').html() == '' )
return false;
}
if( $("#fsubcate").val() == 'npl'
|| $("#fsubcate").val() == 'kyg_gn_npl'
|| $("#fsubcate").val() == 'pre_gn_npl'
){
var source_1 = $("#npl_corps_template").html();
npl_btn_template = Handlebars.compile(source_1);
Helper_Npl_C_Btn(data);
}
if( input_A.p01 == 'kyg' && data.TOTAL_CNT < 5 ) $("#more_kyg_btn").html('');
else if( input_A.p01 == 'pre' && data.TOTAL_CNT < 5 ) $("#more_pre_btn").html('');
else if( input_A.p01 == 'gen' && data.TOTAL_CNT < 5 ) $("#more_gen_btn").html('');
else if( input_A.p01 == 'gng' && data.TOTAL_CNT < 5 ) $("#more_gng_btn").html('');
else if( input_A.p01 == 'bun' && data.TOTAL_CNT < 5 ) $("#more_bun_btn").html('');
else if( input_A.p01 == 'rp' && data.TOTAL_CNT < 5 ) $("#more_rp_btn").html('');
else if( data.TOTAL_CNT == 0 ||
data.TOTAL_CNT == '0' ||
data.LIST_CNT == '0' ||
data.LIST_CNT == 0
){
$('#rlty_list').attr("nextpg", 0);
//$('#rlty_list').append("°Ë»öµÈ ³»¿ëÀÌ ¾ø½À´Ï´Ù.");
//$('#end_of_list').css("display","block");
if( $('#rlty_list').html() == '' ) $('#rlty_list').css('min-height','20px');
If_Exists_Then_Visibilty('end_of_list', 'block');
return false;
}
// ---
if( $("#"+frm_nm+" #from_where").val() == 'rlty_srch_list' )
{
//console.log(data);
if( frm_nm == 'smart_all_srch' ||
input_A.p01 == 'smart_all_srch' ) Helper_All_Srch_List(data, input_A.p01);
else Helper_Rlty_List(data);
}
else if( $("#"+frm_nm+" #from_where").val() == 'detail_vw' ) Helper_Dview(data.DATA[1]);
// ---
var smt_srch_txt_value = $("#frm_detail_srch #search_txt").val()
// ---
if( typeof smt_srch_txt_value === "undefined" ||
smt_srch_txt_value == '' ) { }
else if( frm_nm == 'frm_detail_srch' && next_pg == 1 )
{
// smart °Ë»ö log ÀúÀå
Fill_Psd_A_Frm_N_Save(data);
}
// ---
$('#rlty_list').attr("prcs_step", 0);
}
// ------------------------------------------------------------------------------------------------ common
else if( ajax_nm == 'area_combobox' )
{
if( input_A.p01 == 'sido' )
{
document.getElementById('dong').options.length = 0;
document.getElementById('dong').options[0] = new Option("À¾¸éµ¿","");
}
for (gubun in data.DATA_4_CALLBACK_FUNC) {
var combo = document.getElementById( gubun );
combo.options.length = 0;
var items = data.DATA_4_CALLBACK_FUNC[gubun].split(";");
for (var area_iii = 0; area_iii < items.length; area_iii++)
{
var options = items[area_iii].split("-");
combo.options[area_iii] = new Option(options[0],options[1]);
if( input_A.p04 && input_A.p05 )
{
if( ( gubun == 'gugun' && input_A.p04 == options[0] )
|| ( gubun == 'dong' && input_A.p05 == options[0] ) ) combo.options[area_iii].selected = true;
}
else if( input_A.p04 == options[0] )
combo.options[area_iii].selected = true;
}
}
if( document.getElementById("Open_Next_Selectbox")
&& document.getElementById("Open_Next_Selectbox").value == 1
){
if( input_A.p02 == 'gugun' && document.getElementById("sido").value == '' ) return false;
else if( input_A.p02 == 'dong' && document.getElementById("gugun").value == '' ) return false;
}
// ---
if(input_A.p01 == 'all')
{
// $("#frm_detail_srch select[id=sido]").val(input_A.p03);
////console.log($("#frm_detail_srch select[id=sido]").val());
// $("#frm_detail_srch select[id=gugun]").val(input_A.p04);
////console.log($("#frm_detail_srch select[id=gugun]").val());
// $("#frm_detail_srch select[id=dong]").val(input_A.p05);
}
}
else if( ajax_nm == 'send_sms' )
{
alert('¼º°øÀûÀ¸·Î ¹ß¼ÛµÇ¾ú½À´Ï´Ù.');
document.getElementById("strData").value = "";
document.getElementById("writer_name").value = "";
document.getElementById("strCallBack").value = "";
}
// ------------------------------------------------------------------------------------------------ myzone
else if( ajax_nm == 'memo' )
{
If_Exists_Then_Visibilty('progress_place_holder', 'none');
if( data.DATA_4_CALLBACK_FUNC.length == 0 )
{
if( document.getElementById("dview_memo_box") )
document.getElementById("dview_memo_box").style.display = "none";
$("#memo_btn").attr('class', 'mobile_img my_memo_off');
If_Exists_Then_Visibilty('end_of_list', 'block');
return false;
}
var source1;
source1 = $("#memo_dview_template").html();
memo_temp = Handlebars.compile(source1);
if( $("#frm_memo #TBL_IDX").val() == '' ) $("#dview_memo_list").html('');
if( document.getElementById("dview_memo_box") )
document.getElementById("dview_memo_box").style.display = "block";
Helper_Memo_List(data);
$('#myz_memo_list').attr("prcs_step", 0);
}
else if(ajax_nm == 'get_saved_srch_opt' )
{
if( data == 'need_login' )
{
location.href='/workdir/mobile/upcate_lf/mem/login.php?togo='+location.href;
return false;
}
else
{
if( data.DATA_4_CALLBACK_FUNC.length == 0 )
return false;
var source1;
source1 = $("#fvrt_list_template").html();
fvrt_list_temp = Handlebars.compile(source1);
Helper_Map_Fvrt_List(data);
}
}
else if( ajax_nm == 'get_balloon_help' )
{
Balloon_Help_Trigger = 1;
$("#balloon_help_div").html(data);
document.getElementById("balloon_help_div").style.display = '';
}
else if( ajax_nm == 'evalate_rlty' )
{
alert(input_A.p05);
if( input_A.p01 == 'appeal_bad_grlty' )
{
document.getElementById("bad_grlty_cate").selectedIndex = 0;
document.getElementById("bad_grlty_cont").value = "";
display_ctrl('appeal_bad_rlty_div','hide');
}
}
else if( ajax_nm == 'get_session_id' )
{
//if( data.includes('Could not connect')
// || data.includes('1111111111111122222222') ) { }
//else
{
//console.log('cookie_id - '+data);
Cjs_setCookie('cookie_id', data, 100);
ajax_client_main('bg_catch_action', '', '!_!!_!!_!', 'cookie_set', '','');
}
}
else if( ajax_nm == 'check_concern_by_me' )
{
return data;
//ajax_client_main('check_concern_by_me', '', '', '','','','');
// °ü½É¹°°ÇÀ¸·Î µî·ÏÀÌ µÇ¾îÀÖÀ»¶§ ¹öÆ° À̸§ º¯°æ
//if( data == '1' )
//{
// if( $("#dview_fvrt_btn").length )
// concern_btn_txt_ctrl('dview_fvrt_btn', device_tp, alert_tp, mid, fcate, cc, sn, rn, '1');
// if( $("#concern_btn_img").length )
// concern_btn_txt_ctrl('concern_btn_img', device_tp, alert_tp, mid, fcate, cc, sn, rn, '1');
//}
//else
//{
// if( $("#dview_fvrt_btn").length )
// concern_btn_txt_ctrl('dview_fvrt_btn', device_tp, alert_tp, mid, fcate, cc, sn, rn, '0');
// if( $("#concern_btn_img").length )
// concern_btn_txt_ctrl('concern_btn_img', device_tp, alert_tp, mid, fcate, cc, sn, rn, '0');
//}
}
else if( ajax_nm == 'add_fvr_rlty' )
{
ex_p01 = input_A.p01.split('!_!');
aft_add_fvr_rlty(data, ex_p01[8], ex_p01[3], ex_p01[4], ex_p01[5]); // status, fc, cc, sn, rn
}
else if( ajax_nm == 'set_alarm' )
{
if( input_A.p02 == 'get' && document.getElementById("alarm_setting_div") )
{
document.getElementById("alarm_setting_div").innerHTML = data;
}
else if( input_A.p02 == 'reg' )
{
try
{
ajax_client_main('get_my_dview_data','frm_view_cnt');
}
catch(err)
{
}
if(typeof cjs_alert === 'function') cjs_alert( 'ÀúÀåµÇ¾ú½À´Ï´Ù.');
else alert('ÀúÀåµÇ¾ú½À´Ï´Ù.');
}
}
// ------------------------------------------------------------------------------------------------ member
else if( ajax_nm == 'mem_join' )
{
if( input_A.p01 == 'other' )
{
if( data == 'dup_mem_id' )
{
If_Exists_Then_Visibilty('ajax-brd-loader','none');
alert('»ç¿ëÀÌ ºÒ°¡´ÉÇÑ ¾ÆÀ̵ðÀÔ´Ï´Ù.');
return false;
}
else if( data == 'mem_join_ok' )
{
If_Exists_Then_Visibilty('ajax-brd-loader','none');
location.href = '/';
}
}
else
{
if( data == 'dup_mem_id' )
{
If_Exists_Then_Visibilty('ajax-brd-loader','none');
swal({
title: "",
text: "»ç¿ëÀÌ ºÒ°¡´ÉÇÑ ¾ÆÀ̵ðÀÔ´Ï´Ù.",
timer: 1000,
showConfirmButton: false
});
return false;
}
else if( data == 'mem_join_ok' )
{
If_Exists_Then_Visibilty('ajax-brd-loader','none');
var login_id = $("#mem_join_frm #MEM_ID").val();
var login_pw = $("#mem_join_frm #MEM_PASS1").val();
try { AndroidFunction.webview_to_app( 'log_in', login_id, login_pw, '', '', '' ); }
catch(err) { }
location.href = '/workdir/mobile/mw_index.php';
}
}
}
else if( ajax_nm == 'check_mem_auth' )
{
if( data == '0' )
alert('·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.');
else if( data == '1' )
ajax_client_main('evalate_rlty', '', report_ct);
}
else if( ajax_nm == 'member_auth_data_ctrl' )
{
if( input_A.p01 == 'get' )
{
if( input_A.p02 == 'check_last_biz_brd_date' && data ) // ¿¶÷ÇÏÁö ¾ÊÀº ¾÷¹«°Ô½ÃÆÇÀÇ ±Û¸ñ·Ï ½ºÅ¸ÀÏ º¯°æ
Change_Biz_Brd_Style( data );
}
else if( input_A.p01 == 'mod' ) { }
}
else if( ajax_nm == 'get_app_review' )
{
if( document.getElementById('from_where_in_edu') )
{
if( data == 'reload' ) location.reload();
}
}
else if( ajax_nm == 'sms_mem_auth' )
{
if( data == '0' )
alert('ÀÔ·ÂÇϽŠÀÎÁõ¹øÈ£°¡ À߸øµÇ¾ú½À´Ï´Ù.');
else if( data == '1' )
{
document.getElementById("SMS_AUTH").value = "Y";
document.getElementById("confirm_phone_number_tr").style.display = "none";
document.getElementById("sms_auth_finish_tr").style.display = "";
}
else if( data == 'SMS_AUTH_STEP_2' )
{
document.getElementById("inst_phone_number_tr").style.display = "none";
document.getElementById("confirm_phone_number_tr").style.display = "";
document.getElementById("SMS_AUTH_STEP").value = 2;
}
else if( data == 'STOP_REQ_SMS' )
alert('3ȸ ÀÌ»ó ¿¬¼ÓÀ¸·Î ÀÎÁõ¹øÈ£ ¹ß¼Û¸¦ ¿äû ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
}
// ------------------------------------------------------------------------------------------------ MIS
else if( ajax_nm == 'get_team_brd' )
{
var loop_cnt = data.DATA_4_CALLBACK_FUNC.length;
var tt_cnt = 0;
var tt_pg = 0;
var pg_no = 0;
tt_cnt = data.DATA_4_CALLBACK_FUNC[0].TOTAL_CNT;
tt_pg = data.DATA_4_CALLBACK_FUNC[0].NPAGE;
pg_no = data.DATA_4_CALLBACK_FUNC[0].PG;
Insert_T_Brd_Html(input_A.p04, data.DATA_4_CALLBACK_FUNC[1], pg_no, tt_pg );
Team_Brd_Page_List( '', input_A.p02, input_A.p03, input_A.p04, pg_no, tt_pg );
}
else if( ajax_nm == 'rlty_sent_to_sns' )
{
location.reload();
}
else if( ajax_nm == 'get_rlty_4_sns_post' )
{
// Empty_Rlty_Info(area_nm, rlty_i)
if( data == '°Ë»öµÇ¾îÁø ³»¿ëÀÌ ¾ø½À´Ï´Ù.' ) Empty_Rlty_Info(input_A.p03, input_A.p04);
else
{
DrawRpGraph(data.DATA_4_CALLBACK_FUNC.REALTY_CATE, data.DATA_4_CALLBACK_FUNC.SNS_MAIN_PIC_URL, data.DATA_4_CALLBACK_FUNC.RP_CHART_PARAMS);
pic_A_start_iii = 1;
// ======================================================= sns º°(Áö¿ª ¿ëµµ) short url
var default_s_url = $("#default_url" ).val();
var kakao_story_s_url = $("#kakao_story_url" ).val();
var kakao_channel_s_url = $("#kakao_channel_url").val();
var facebook_s_url = $("#facebook_url" ).val();
var googleplus_s_url = $("#google_plus_url" ).val();
var band_s_url = $("#band_url" ).val();
var tw_s_url = $("#twitter_url" ).val();
var naver_blog_s_url = $("#naver_blog_url" ).val();
var naver_cafe_s_url = $("#naver_blog_url" ).val(); // ÃßÈÄ cafe sURL Ãß°¡
var tistory_blog_s_url = $("#tistory_blog_url").val();
document.getElementById("Short_Txt_text" ).value = data.DATA_4_CALLBACK_FUNC.TWITTER_HTML.replace(default_s_url, googleplus_s_url);
document.getElementById("Long_Txt_text" ).value = data.DATA_4_CALLBACK_FUNC.TEXT_CONT.replace(default_s_url, googleplus_s_url);
document.getElementById("Link_Txt_text" ).value = data.DATA_4_CALLBACK_FUNC.LINK_CONT.replace(default_s_url, googleplus_s_url);
document.getElementById("GGAD_text" ).value = data.DATA_4_CALLBACK_FUNC.GGAD_CONT.replace(default_s_url, googleplus_s_url);
document.getElementById("LnkGGAD_text" ).value = data.DATA_4_CALLBACK_FUNC.LINK_GGAD_CONT.replace(default_s_url, googleplus_s_url)+data.DATA_4_CALLBACK_FUNC.GOOGLE_AD_HTML;
document.getElementById("sns_short_title_text" ).value = data.DATA_4_CALLBACK_FUNC.SNS_SHORT_TITLE;
document.getElementById("Short_Txt_Tags_text" ).value = data.DATA_4_CALLBACK_FUNC.TWITTER_HTML.replace(default_s_url, googleplus_s_url)+"\n"+data.DATA_4_CALLBACK_FUNC.HASH_TAGS_S;
document.getElementById("Long_Txt_Tags_text" ).value = data.DATA_4_CALLBACK_FUNC.TEXT_CONT.replace(default_s_url, googleplus_s_url)+"\n"+data.DATA_4_CALLBACK_FUNC.HASH_TAGS_L;
document.getElementById("Link_Txt_Tags_text" ).value = data.DATA_4_CALLBACK_FUNC.LINK_CONT.replace(default_s_url, googleplus_s_url)+"\n"+data.DATA_4_CALLBACK_FUNC.HASH_TAGS_L;
document.getElementById("GGAD_Tags_text" ).value = data.DATA_4_CALLBACK_FUNC.GGAD_CONT.replace(default_s_url, googleplus_s_url)+"\n"+data.DATA_4_CALLBACK_FUNC.HASH_TAGS_L;
document.getElementById("LnkGGAD_Tags_text" ).value = data.DATA_4_CALLBACK_FUNC.LINK_GGAD_CONT.replace(default_s_url, googleplus_s_url)+"\n"+data.DATA_4_CALLBACK_FUNC.HASH_TAGS_L;
document.getElementById("instagram_Tags_text" ).value = data.DATA_4_CALLBACK_FUNC.INSTAGRAM_CONT.replace(default_s_url, googleplus_s_url)+""+data.DATA_4_CALLBACK_FUNC.HASH_TAGS_L;
document.getElementById("sns_title").value = data.DATA_4_CALLBACK_FUNC.SNS_TITLE;
document.getElementById("tags_short").value = data.DATA_4_CALLBACK_FUNC.HASH_TAGS_S;
document.getElementById("tags_long").value = data.DATA_4_CALLBACK_FUNC.HASH_TAGS_L;
if( input_A.p02 == 'rp' )
{
// ½Ç°Å·¡°¡ »èÁ¦Ã³¸®ÇÒ key Á¤º¸ input »ý¼º
if( data.DATA_4_CALLBACK_FUNC.RP_DEL_LIST.length > 0 )
{
var rp_del_A = data.DATA_4_CALLBACK_FUNC.RP_DEL_LIST
var tmp_rp_del_data = "";
var tmp_html = "";
for( var rp_i = 0; rp_i < rp_del_A.length; rp_i++ )
{
tmp_rp_del_data = rp_del_A[rp_i].Cc;
tmp_rp_del_data += "|_|" + rp_del_A[rp_i].Sn;
tmp_rp_del_data += "|_|" + rp_del_A[rp_i].Rn;
tmp_rp_del_data += "|_|" + rp_del_A[rp_i].apptd_date;
tmp_rp_del_data += "|_|" + rp_del_A[rp_i].apptd_status;
tmp_html = "";
$("#del_rp_frm").append(tmp_html);
}
}
}
// ======================================================= ¹°°Ç¿ëµµ, ¸Å°¢±âÀÏ, ÁøÇà»óÅÂ
document.getElementById("rlty_usage_txt" ).innerHTML = data.DATA_4_CALLBACK_FUNC.REALTY_CATE;
document.getElementById("apptd_date").value = data.DATA_4_CALLBACK_FUNC.APPTD_DATE;
document.getElementById("apptd_status").value = data.DATA_4_CALLBACK_FUNC.APPTD_STATUS;
// ======================================================= »çÁø ó¸®
var pic_html = "";
rlty_pic_A = data.DATA_4_CALLBACK_FUNC.PIC_A;
for( var pic_i = pic_A_start_iii; ( pic_i < data.DATA_4_CALLBACK_FUNC.PIC_A.length && pic_i < 10 ); pic_i++ )
{
pic_html += "
";
}
$("#sns_pic").append(pic_html);
}
}
// ------------------------------------------------------------------------------------------------ rp
else if( ajax_nm == 'get_rp_data' )
{
Rp_Lists_Onload_Flag = true;
Check_Basic_Ajax_Status();
rp_DATA = data.DATA_4_CALLBACK_FUNC;
var source;
source = $("#rp_list_template").html();
rp_list_temp = Handlebars.compile(source);
//console.log(rp_DATA);
if( rp_DATA.DATA.length > 0 )
{
if( input_A.p01 == 'rp_list' && rp_DATA.DATA.length > 0 )
$("#recent_rp_list_tbl").html("");
$("#rp_list_bttm_border").css("display","block");
$("#rp_list_box").css("display","block");
Helper_Rp_List(rp_DATA);
}
else
{
if( input_A.p01 == 'more_rp_list' && rp_DATA.DATA.length == 0 ) { }
else
{
$("#rp_list_bttm_border").css("display","none");
$("#rp_list_box").css("display","none");
$("#recent_rp_list_tbl").html('');
// alert('1');
}
}
if( $("#recent_rp_list_tbl").html() != '' )
{
$("#rp_list_box").css("display","block");
if( rp_DATA.DATA.length >= 5 ) $(".more_rp_btn").css("display","block");
else if( rp_DATA.DATA.length < 5 ) $(".more_rp_btn").css("display","none");
}
else if( rp_DATA.DATA.length > 0 )
{
$("#rp_list_box").css("display","block");
if( rp_DATA.DATA.length >= 5 ) $(".more_rp_btn").css("display","block");
}
if( $("#rpform #bldg_tp").val() == 'store' || $("#rpform #bldg_tp").val() == 'bun' || $("#rpform #bldg_tp").val() == 'brgt' || $("#rpform #bldg_tp").val() == 'land' )
{
$(".rp_tp_selecbox_td").css("display","none");
$(".rp_area_selectbox_td").css("display","none");
$(".rp_usage_selectbox_td").css("width","100%");
}
else
{
$(".rp_tp_selecbox_td").css("display","");
$(".rp_area_selectbox_td").css("display","");
$(".rp_usage_selectbox_td").css("width","33%");
}
// --------------
if( input_A.p01 == 'more_rp_list' || input_A.p01 == 'rp_list' )
{
}
else
{
if( rp_DATA.DG_INFO != null )
{
$(".dg_hcnt_movein").css("display","block");
if( rp_DATA.DG_INFO.a_place != 'undefined' && rp_DATA.DG_INFO.a_place != '' )
{
$(".basic_dview_tt").html(rp_DATA.DG_INFO.a_place);
}
else
{
basic_tt_txt = $("#rpform #umd").val()+" ";
basic_tt_txt += $("#rpform #bon").val();
if( $("#rpform #bu").val() != '' )
basic_tt_txt += "-"+$("#rpform #bu").val();
$(".basic_dview_tt").html(basic_tt_txt);
}
if( rp_DATA.DG_INFO.household != 'undefined' ) $(".dg_household_txt").html(rp_DATA.DG_INFO.household);
if( rp_DATA.DG_INFO.year_f_movein != 'undefined' ) $(".dg_year_f_movein").html("ÀÔÁÖ"+rp_DATA.DG_INFO.year_f_movein+"³âÂ÷");
if( rp_DATA.DG_INFO.approval_date != 'undefined' ) $(".dg_movein_txt").html("("+rp_DATA.DG_INFO.approval_date+")");
}
else
{
basic_tt_txt = $("#rpform #umd").val()+" ";
basic_tt_txt += $("#rpform #bon").val();
if( $("#rpform #bu").val() != '' )
basic_tt_txt += "-"+$("#rpform #bu").val();
$(".basic_dview_tt").html(basic_tt_txt);
}
// -----------------
if( rp_DATA.DG_AREAS != null )
{
if( rp_DATA.DG_AREAS.length > 0 )
{
$("#d_area").html('');
for( var i = 0; i < rp_DATA.DG_AREAS.length; i++ )
{
if( rp_area == rp_DATA.DG_AREAS[i] || (i==0 && rp_area == '') ) mark_selected = "selected";
else mark_selected = "";
$("#d_area").append("")
}
//$("#rp_list_box").css("display","block");
$(".rp_tp_selecbox_td").css("width","33%");
$(".rp_area_selectbox_td").css("width","33%");
$(".rp_area_selectbox_td").css("display","");
//$(".rp_usage_selectbox_td").css("width","33%");
}
}
else
{
//$("#rp_list_box").css("display","none");
$(".rp_tp_selecbox_td").css("width","33%");
//$(".rp_usage_selectbox_td").css("width","50%");
$(".rp_area_selectbox_td").css("display","none");
}
}
//if( input_A.p01 == 'onload' )
// DrawRpGraph('');
if( input_A.p01 == 'onload' )
ajax_client_main('draw_real_price_chart', 'rpform', '');
}
else if( ajax_nm == 'draw_real_price_chart' )
{
$(".rpChart_container").html(data);
}
// ------------------------------------------------------------------------------------------------ dview
else if( ajax_nm == 'get_rp_list' )
{
if( data == 'no_result' )
{
swal({
title: "",
text: "´õ °¡Á®¿Ã ¸ñ·ÏÀÌ ¾ø½À´Ï´Ù.",
timer: 1000,
showConfirmButton: false
});
}
else if( data != '' )
{
//alert('1');
//console.log('123');
$('#recent_rp_list_tbl tr:last').after(data);
}
}
else if( ajax_nm == 'get_area_list' )
{
var area_A = data.split(";");
if( area_A.length > 0 )
{
var btn_html = "";
for( var i = 0; i < area_A.length; i++ )
{
if( sgg_prcs_done == 0 && param_A.p01 == 'sido' && area_A[i] == sgg ) {btn_on = "area_btn_on";}
else if( umd_prcs_done == 0 && param_A.p01 == 'sgg' && area_A[i] == umd_wo ) {btn_on = "area_btn_on";umd_prcs_done = 1;}
else {btn_on = ""; }
btn_html += '';
}
$('#'+list_box_nm).append(btn_html);
if( sido != '' && sgg_prcs_done == 0 )
{
sgg_prcs_done = 1;
ajax_client_main( 'get_area_list', '', 'sgg', sgg );
}
}
}
else if(ajax_nm == 'rlty_in_basic_info' )
{
if( data == '' )
{
$("#rlty_box" ).css("display","none");
$("#rlty_box_bttm_line" ).css("display","none");
return false;
}
var source = $("#rlty_list_template").html();
rlty_list_temp = Handlebars.compile(source);
if( data.DATA.length == 0 )
{
$("#rlty_box").css("display","none");
$("#rlty_box_bttm_line").css("display","none");
return false;
}
else
{
$("#rlty_box").css("display","block");
$("#rlty_box_bttm_line").css("display","block");
}
Helper_RltyList(data);
}
else if(ajax_nm == 'get_facility_list' )
{
var DANGI_DATA = {DANGI:data.DATA_4_CALLBACK_FUNC.DANGI, DANGI_DETAIL:data.DATA_4_CALLBACK_FUNC.DANGI_DETAIL, KYG_PIC:data.DATA_4_CALLBACK_FUNC.KYG_PIC};
var dangi_src = $("#dangi_info_template").html();
dangi_temp = Handlebars.compile(dangi_src);
Helper_Facility_Info('dangi', DANGI_DATA);
var PRESCHOOL_DATA = {PRESCHOOL_1:data.DATA_4_CALLBACK_FUNC.PRESCHOOL_1,PRESCHOOL_2:data.DATA_4_CALLBACK_FUNC.PRESCHOOL_2};
var preschool_src = $("#preschool_template").html();
preschool_temp = Handlebars.compile(preschool_src);
Helper_Facility_Info('preschool', PRESCHOOL_DATA);
var SCHOOL_DATA = {PRI_SCHOOL:data.DATA_4_CALLBACK_FUNC.PRI_SCHOOL, MID_SCHOOL:data.DATA_4_CALLBACK_FUNC.MID_SCHOOL,HIGH_SCHOOL:data.DATA_4_CALLBACK_FUNC.HIGH_SCHOOL};
var school_src = $("#school_template").html();
school_temp = Handlebars.compile(school_src);
Helper_Facility_Info('school', SCHOOL_DATA);
var HOSPITAL_DATA = {HOSPITAL:data.DATA_4_CALLBACK_FUNC.HOSPITAL};
var hospital_src = $("#hospital_template").html();
hospital_temp = Handlebars.compile(hospital_src);
Helper_Facility_Info('hospital', HOSPITAL_DATA);
var TRAFFIC_DATA = {SUBWAY:data.DATA_4_CALLBACK_FUNC.SUBWAY, BUS_STOP:data.DATA_4_CALLBACK_FUNC.BUS_STOP};
var traffic_src = $("#traffic_template").html();
traffic_temp = Handlebars.compile(traffic_src);
Helper_Facility_Info('traffic', TRAFFIC_DATA);
}
else if( ajax_nm == 'facility_detail_view' )
{
Local_Info_Onload_Flag = true;
Check_Basic_Ajax_Status();
if( frm_nm == 'preschool_frm' ) facility_tp = 'preschool';
else if( frm_nm == 'school_frm' ) facility_tp = 'school';
else if( frm_nm == 'hospital_frm' ) facility_tp = 'hospital';
var source = $("#"+facility_tp+"_detail_template").html();
local_detail_temp = Handlebars.compile(source);
Helper_Facility_Detail(facility_tp, data, input_A.p02);
}
else if( ajax_nm == 'get_my_dview_data' )
{
if( data == '' ) return false;
var rst_DATA = data.split("|_|");
var memo_rst = rst_DATA[0];
var alarm_rst = rst_DATA[1];
var concern_rst = rst_DATA[2];
if( memo_rst == 'memo' )
{
$("#memo_btn").attr('class', 'mobile_img my_memo_on');
}
if( alarm_rst == 'alarm' ) $("#alarm_btn").attr('class', 'mobile_img my_alarm_on_1');
else if( alarm_rst == '' ) $("#alarm_btn").attr('class', 'mobile_img my_alarm_off');
if( concern_rst == 'concern' )
{
$("#concern_btn").attr('class', 'mobile_img my_concern_on_1');
$("#concern_btn").attr("onclick","ajax_client_main('set_concern', 'frm_concern', 'del')");
}
}
else if( ajax_nm == 'get_loan_data' )
{
Loan_Onload_Flag = true;
org_loan_data_A = data;
loan_data_A = data;
if( data.DATA_4_CALLBACK_FUNC.length == 0 )
return false;
var source;
source = $("#other_loan_list_template").html();
loan_list_temp = Handlebars.compile(source);
loan_data_A.DATA_4_CALLBACK_FUNC.shift();
Helper_Loan_List(loan_data_A);
}
// ------------------------------------------------------------------------------------------------ map
else if( ajax_nm == 'map_srch' )
{
console.log(data);
if(typeof setMarker !== "undefined")
setMarker(data);
}
else if( ajax_nm == 'map_bttm_rlty_list' )
{
$("#Map_Srch_Rlty_List_Container").scrollTop( 0 );
document.getElementById("Map_Srch_Rlty_List_Container").innerHTML = data;
var pattern = /id=\"map_v2_bttm_rlty_cnt\" value=\"([0-9]+)\"/g;
var array_matches = pattern.exec(data);
$(".map_bttm_rlty_cnt").html(array_matches[1]);
}
// ------------------------------------------------------------------------------------------------ auto complete list
else if( ajax_nm == 'station_auto_complete'
|| ajax_nm == 'academy_auto_complete'
|| ajax_nm == 'school_auto_complete' ) { AUTO_C_LIST_DATA = AUTO_C_LIST_DATA.concat(data.DATA); }
else if( ajax_nm == 'car_auto_complete' ) { AUTO_C_LIST_DATA = data.DATA; }
else if( ajax_nm == 'get_auto_complete' ) { Smart_Auto_Complete_List(data); }
// ------------------------------------------------------------------------------------------------ brd
else if( ajax_nm == 'brd_rating' )
{
if( data == 'error' ) alert('·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.');
else
{
var obj_name = document.getElementsByName("Do_Brd_Rating_Cnt[]");
var Current_Cnt = obj_name[input_A.p01].innerHTML;
obj_name[input_A.p01].innerHTML = parseInt(Current_Cnt)+1;
obj_name[input_A.p01].style.color = "#f00";
obj_name[input_A.p01].style.fontWeight = "bold";
obj_name[input_A.p01].style.fontSize = "12px";
}
}
else if( ajax_nm == 'get_memo' )
{
$("#memo_"+input_A.p02).html(data);
document.getElementById("memo_"+input_A.p02).style.display = '';
}
else if( ajax_nm == 'check_mem_brd_pass' )
{
if( data == 'Show_Brd' )
{
document.getElementById("pwd_confirm_error_msg").style.display = "none";
document.getElementById("BRD_PASS").value = input_A.p01;
document.PUB_OR_NOT_CHECK.submit();
}
else
{
document.getElementById("pwd_confirm_error_msg").innerHTML = "
¾ÆÀ̵ð ¶Ç´Â ºñ¹Ð¹øÈ£°¡ À߸ø ÀԷµǾú½À´Ï´Ù.";
document.getElementById("pwd_confirm_error_msg").style.display = "";
document.getElementById("AJX_BRD_PASS").focus();
}
}
else if( ajax_nm == 'get_related_brd' )
{
if( data != 'error' )
$("#rlty_brd_list").append(data);
}
// ------------------------------------------------------------------------------------------------ etc
else if( ajax_nm == 'change_agency_confirm' )
{
ajax_progress_indicator();
}
else if( ajax_nm == 'addr_to_latlng' )
{
centerLatLng = new google.maps.LatLng(data.DATA_4_CALLBACK_FUNC.lat, data.DATA_4_CALLBACK_FUNC.lng);
if( input_A.p01 == 'map_srch_other' || input_A.p01 == 'map_v1_srch' )
{
Dt_Srch_Frm_Lat = parseFloat(data.DATA_4_CALLBACK_FUNC.lat);
Dt_Srch_Frm_Lng = parseFloat(data.DATA_4_CALLBACK_FUNC.lng);
initMap();
}
else if( input_A.p01 == 'map_search' )
{
map.setCenter(centerLatLng);
Map_Search_Btn_Click();
}
else if( input_A.p01 == 'gen_inst' )
{
map.setCenter(centerLatLng);
marker.setPosition(centerLatLng);
}
if( typeof(document.grlty_insert_form) !== 'undefined' )
{
if( typeof(document.grlty_insert_form.lat ) !== 'undefined' ) document.grlty_insert_form.lat.value = data.DATA_4_CALLBACK_FUNC.lat;
if( typeof(document.grlty_insert_form.lng) !== 'undefined' ) document.grlty_insert_form.lng.value = data.DATA_4_CALLBACK_FUNC.lng;
}
}
else if( ajax_nm == 'cst_ad' )
{
//console.log(data);
var source1;
if( input_A.p01 == 'dview' )
{
//source1 = $("#cst_ad_dview_template").html();
source1 = $("#cst_ad_template_2").html();
}
else
source1 = $("#cst_ad_template").html();
var source2 = $("#cst_contact_template").html();
cst_ad_temp = Handlebars.compile(source1);
cst_contact_temp = Handlebars.compile(source2);
Helper_Cst_Ad(input_A.p01, data);
}
else if( ajax_nm == 'evaluate_app' )
{
app_review_date = data.DATA[1].APP_REVIEW_DATE;
if( app_review_date == 'undefined' || app_review_date == '' ) { }
else
{
if( document.getElementById("evaluate_app_box")
&& document.getElementById("evaluate_app_box").style.display == "block") history.go(-1);
}
}
else if( ajax_nm == 'get_a_place' )
{
if( data == 'get_local_graph' )
{
$("#dg_box").css('display','none');
var dview_url = "/workdir/mobile/upcate_lf/dview.php?MAIN_CATE=mobile&SUB_CATE=mobile_web&fc=pc_rp_v2&bon=&bu=&a_place=&d_area=&bldg_cate=&year=&lat=&lng=&";
dview_url += "&sido=" + encodeURIComponent($("#sido").val());
dview_url += "&sgg=" + encodeURIComponent($("#gugun").val());
dview_url += "&umd_wo=" + encodeURIComponent($("#dong").val());
dview_url += "&Jun2Wol_Input=" + $("#Jun2Wol_Input").val();
dview_url += "&rp_usage=";
if( $('input[name="rlty_cate_sise"][type="radio"]:checked').val() == 'rlty_cate_sise_brgt_tp' ) dview_url += "2";
else if( $('input[name="rlty_cate_sise"][type="radio"]:checked').val() == 'rlty_cate_sise_sole_tp' ) dview_url += "3";
else if( $('input[name="rlty_cate_sise"][type="radio"]:checked').val() == 'rlty_cate_sise_land_tp' ) dview_url += "6";
else if( $('input[name="rlty_cate_sise"][type="radio"]:checked').val() == 'rlty_cate_sise_store_tp' ) dview_url += "7";
document.getElementById('rp_dview_frame').src = dview_url;
}
// that chart
else
{
var html = data;
$("#dg_box").css('display','block');
$(".dg_list").append(html);
if( input_A.p05 == 1 )
{
input_A.p05 = 0;
document.getElementById('rp_dview_frame').src='/workdir/mobile/upcate_lf/dview.php?MAIN_CATE=mobile&SUB_CATE=mobile_web&fc=pc_rp_v2&rp_usage=1&sido=¼¿ïƯº°½Ã&sgg=°³²±¸&umd_wo=°³Æ÷µ¿&bon=12&bu=2&a_place=%B0%B3%C6%F7%C0%DA%C0%CC%28%31%32%2D%32%29&d_area=&bldg_cate=&year=&lat=37.4962989648627&lng=127.076622183043&Jun2Wol_Input=0.08';
}
}
}
//else if( ajax_nm == 'bg_catch_action' )
// console.log(data);
}
// ========================================================================================
function ajax_progress_indicator()
{
if($("#progress_indicator").length)
setTimeout(function(){ $("#progress_indicator").remove();}, 1000);
else
$("
ó¸®ÁßÀÔ´Ï´Ù. ").appendTo( "body" );
}