Handlebars.registerHelper('BreakLines', function(text) {
text = Handlebars.Utils.escapeExpression(text);
text = text.replace(/(\r\n|\n|\r)/gm, '
');
return new Handlebars.SafeString(text);
});
function Helper_Cst_Ad(vw_tp, parsed_JSON_DATA)
{
// ====================================== ÄÁ¼³Æà ÀüÈÇϱâ ű׻ý¼º
Handlebars.registerHelper('CST_TEL_ACTION', function (from_where, cst_nm, tel_no, act_tp, fc, cc, sn, rn, mid, is_solomon) {
var r_html;
if( fc == 'kyg'
|| fc == '°æ¸Å'
|| fc == 'pre'
|| fc == '¿¹Á¤'
)
cst_rlty_key_url = "&court_code="+cc+"&sa_num="+sn+"&realty_num="+rn;
else
cst_rlty_key_url = "";
if( act_tp == 'tel' || is_solomon == '1' )
{
r_html = "onclick=\"";
r_html += "window.open('tel:" + tel_no + "');";
r_html += "ajax_client_main('app_tel_hist', '','"+from_where+"!_!"+tel_no+"!_!"+cst_nm+"!_!"+fc+"!_!"+cc+"!_!"+sn+"!_!"+rn+"!_!tel!_!"+mid+"!_!!_!!_!');";
r_html += "\"";
}
else if( act_tp == 'brd' )
{
r_html = "onclick=\"";
r_html += "location.href='/workdir/mobile/upcate_lf/cst/cst_frm.php?from_where=m_w_cst_frm&BOARD_ID=consult&fcate=cst&csttp=consulting"+cst_rlty_key_url+"';";
r_html += "ajax_client_main('app_tel_hist', '','"+from_where+"!_!"+tel_no+"!_!"+cst_nm+"!_!"+fc+"!_!"+cc+"!_!"+sn+"!_!"+rn+"!_!brd!_!"+mid+"!_!!_!!_!');";
r_html += "\"";
}
else if( act_tp == 'tel_to_brd' )
{
r_html = "onclick=\"";
r_html += "Tel_To_Brd_Confirm('" + from_where + "', '" + tel_no + "','" + cst_nm + "','" + fc + "','" + cc + "','" + sn + "','" + rn + "','brd','" + mid + "','" + cst_rlty_key_url + "','','');";
r_html += "\"";
}
return new Handlebars.SafeString(r_html);
});
// ====================================== ¼Ö·Î¸ó cst ±Û¾²±â view ó¸®
Handlebars.registerHelper('CST_AD_SOLOMON', function (is_solomon) {
var r_html;
if( is_solomon == '1' ) r_html = "display:none;";
return new Handlebars.SafeString(r_html);
});
if( vw_tp == 'dview' )
{
$("#dview_cst_ad").prepend(cst_ad_temp(parsed_JSON_DATA));
}
else
{
$("#top_cst_ad").prepend(cst_ad_temp(parsed_JSON_DATA));
}
$("#cont").prepend(cst_contact_temp(parsed_JSON_DATA));
}
// ========================================
function Helper_Dview(parsed_JSON_DATA)
{
$("#dview_cont").append(template(parsed_JSON_DATA));
}
// ========================================
function Helper_Npl_C_Btn(parsed_JSON_DATA)
{
Handlebars.registerHelper('HELPER_NPL_CORPS_BTN', function (Npl_Corps_Nm) {
var class_nm;
var selected_corps_list = $("#npl_corp_input").val();
var selected_corps_A = selected_corps_list.split(";");
for( i = 0; i < selected_corps_A.length; i++ )
{
if( selected_corps_A[i] == Npl_Corps_Nm )
class_nm = "usage_btn_on";
}
return class_nm;
});
$("#rPanel_npl_c").append(npl_btn_template(parsed_JSON_DATA));
}
// ===================================== °ü½É¹°°Ç view »ý¼º
function Helper_Map_Fvrt_List(data_A)
{
Handlebars.registerHelper('FVRT_FRM_TYPE', function (form_name) {
var r_html = "";
if( form_name == 'map_favorite' ) r_html = '';
else r_html = '
'
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('FVRT_URL', function (form_name, opt_list) {
var r_html = "";
if( form_name == 'map_favorite' ) r_html = "map_fvr_srch('"+opt_list+"');";
else r_html = "location.href='/workdir/upcate/kyg/kyg_srch.php?"+opt_list+"';";
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('FORM_NAME_TXT', function (form_name) {
var r_html = "";
if( form_name == 'map_favorite' ) r_html = "Áöµµ";
else r_html = "°Ë»öÁ¶°Ç";
return new Handlebars.SafeString(r_html);
});
$("#fvrt_list").html("");
$("#fvrt_list").append(fvrt_list_temp(data_A));
}
// ===================================== ¹°°Ç¸ñ·Ï view »ý¼º
function Helper_RltyList(data_A)
{
Handlebars.registerHelper('RLTY_SERIAL_NO', function (fc, cc, sn, rn, p01, p02, p03) {
var r_html = "";
var cc_txt = "";
if( fc == '05' ) r_html = '[°æ¸Å]' ;
else if( fc == '04' ) r_html = '[¿¹Á¤]' ;
else if( fc == '03' ) r_html = '[¸Å¹°]' ;
else if( fc == '02' ) r_html = '[°ø¸Å]' ;
else if( fc == '01' ) r_html = '[ºÐ¾ç]' ;
else if( fc == '06' ) r_html = '[½Ç°Å·¡°¡]';
// ------------------------------------------
if( fc == '05' || fc == '04' )
{
cc_txt = CourtName(cc);
sa_year = sn.substring(0, 4);
sa_num = parseInt(sn.substring(sn.length, sn.length-6));
if( cc_txt ) r_html += cc_txt;
if( sa_year && sa_num ) r_html += sa_year+"Ÿ°æ"+sa_num;
if( rn ) r_html += "["+rn+"]";
}
else if( fc == '03' ) r_html += "["+sn+"]";
else if( fc == '02' ) r_html += "";
else if( fc == '01' ) r_html += "";
else if( fc == '06' ) r_html += "";
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('FC_TP', function (fc) {
var r_html = "";
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('RLTY_DVIEW', function (fc, cc, sn, rn, p01, p02, p03, p04, p05, p06, p07, p08, lat, lng) {
var r_html = "";
if( fc == '05' ) fc_txt = 'kyg';
else if( fc == '04' ) fc_txt = 'pre';
else if( fc == '03' ) fc_txt = 'gen';
else if( fc == '02' ) fc_txt = 'gng';
else if( fc == '01' ) fc_txt = 'bun';
else if( fc == '06' ) fc_txt = 'rp_v2';
if( fc == '06' )
{
dview_url = "&sido_s="+p04+"&sgg="+p05+"&umd="+p06+"&bon="+p07+"&bu="+p08+"&a_place=&d_area=&bldg_cate="+p01+"&year=";
dview_url += "&lat="+lat+"&lng="+lng;
r_html = "detail_vw( '"+fc_txt+"', '', '', '', dview_url );";
}
else
r_html = "detail_vw( '"+fc+"', '"+cc+"', '"+sn+"', '"+rn+"', '' );";
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('RLTY_LIST_BUBUN', function (bu) {
var r_html = "";
if( bu == '0' ) r_html = "";
else if( bu != '' ) r_html = "_"+bu;
else r_html = "";
return new Handlebars.SafeString(r_html);
});
$("#rlty_list").html("");
$("#rlty_list").append(rlty_list_temp(data_A));
}
function Helper_Facility_Info(info_cate, data_A)
{
Handlebars.registerHelper('CHK_DATA_TAB_BTN', function (data) {
if( data == 'undefined')
{
r_html = "display:none;";
}
else
{
r_html = "display:;";
}
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('SCHOOL_TOT_EVA', function (data) {
if( data == '-' || data == '' )
r_html = "-";
else
r_html = data+"Á¡";
return new Handlebars.SafeString(r_html);
});
Handlebars.registerHelper('DATA_CHECK', function (data_01, data_02, data_03, data_cate) {
var r_html = "";
if( data_01 == null ) return new Handlebars.SafeString("display:none;");
// ----------------------
if( data_cate == '' )
{
if( data_01.length > 0 )
r_html = "";
else
r_html = "display:none;";
}
else if( data_cate == 'dangi_kyg_pic' )
{
if( data_01.indexOf('rf_rlty_no_image_thumb_2_20180419.jpg') != -1 ) r_html = "display:none;";
else r_html = "";
}
else if( data_cate == 'dangi_info' )
{
if( data_01.length == 0 )
r_html = "display:none;";
else
r_html = "";
}
else if( data_cate == 'pre_school' )
{
if( data_01.length == 0 && data_02.length == 0 )
r_html = "display:none;";
else
r_html = "";
}
else if( data_cate == 'school' )
{
if( data_01.length == 0 && data_02.length == 0 && data_03.length == 0 )
r_html = "display:none;";
else
r_html = "";
}
return new Handlebars.SafeString(r_html);
});
if( info_cate == 'preschool' ) $(".preschool_container").html(preschool_temp(data_A));
else if( info_cate == 'school' ) $(".school_container").html(school_temp(data_A));
else if( info_cate == 'dangi' ) $(".dangi_container").html(dangi_temp(data_A));
else if( info_cate == 'hospital' ) $(".hospital_container").html(hospital_temp(data_A));
else if( info_cate == 'traffic' ) $(".traffic_container").html(traffic_temp(data_A));
$(".tab_mn_btn").click(function(){
if( $(this).attr("btn_tp").indexOf('preschool') != -1 )
{
btn_grp_nm = "preschool";
}
else if( $(this).attr("btn_tp").indexOf('school') != -1 ){
btn_grp_nm = "school";
}
$(".tab_mn_btn[btn_tp='"+btn_grp_nm+"']").removeClass("tab_mn_btn_on");
$(this).addClass("tab_mn_btn_on");
});
}
function Helper_Loan_List(JSON_f_SERVER)
{
loan_list_compiled = Handlebars.compile($("#other_loan_list_template").html());
$("#loan_list_tbl").html("");
$("#loan_list_tbl").html("