1// If JavaScript is enabled remove 'no-js' class and give 'js' class 2jQuery('html').removeClass('no-js').addClass('js'); 3 4// When DOM is fully loaded 5jQuery(document).ready(function($) { 6 7 if($('.help').length > 0){ 8 /* ì¤ë°ê¿ 기ë¥ì ì¬ì©í기 ìí´ */ 9 $('.help').tooltip({ 10 content: function (callback) { 11 return $( this ).prop( 'title' ).replace( '|', '<br />' ); 12 } 13 } 14 ); 15 } 16 17 //ë¶ë§í¬ë²í¼ 18 $('.bookmarkMeLink').click(function() { 19 if (window.sidebar && window.sidebar.addPanel) { 20 // Mozilla Firefox Bookmark 21 window.sidebar.addPanel(document.title,window.location.href,''); 22 } 23 else if(window.sidebar && jQuery.browser.mozilla){ 24 //for other version of FF add rel="sidebar" to link like this: 25 //<a id="bookmarkme" href="#" rel="sidebar" title="bookmark this page">Bookmark This Page</a> 26 jQuery(this).attr('rel', 'sidebar'); 27 } 28 else if(window.external && ('AddFavorite' in window.external)) { 29 // IE Favorite 30 window.external.AddFavorite(location.href,document.title); 31 } else if(window.opera && window.print) { 32 // Opera Hotlist 33 this.title=document.title; 34 return true; 35 } else { 36 // webkit - safari/chrome 37 alert('Press ' + (navigator.userAgent.toLowerCase().indexOf('mac') != - 1 ? 'Command/Cmd' : 'CTRL') + ' + D to bookmark this page.'); 38 39 } 40 }); 41}); 42 43/** 44 * ì림창 45 */ 46function msg(type,msg){ 47 48 if(type=="success"){ 49 $.dreamAlert({ 50 'type' : 'success', 51 'message' : msg + "<div style='clear:both;'></div>" 52 }); 53 } else { 54 $.dreamAlert({ 55 'type' : 'error', 56 'message' : msg + "<div style='clear:both;'></div>" 57 }); 58 } 59} 60 61function number_format(x) { 62 return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 63} 64 65function loading_delay(display){ 66 if(display){ 67 //$(".loading_content" ).parent().css("overflow-y", "hidden"); 68 $(".loading_content" ).show(); 69 } 70 else{ 71 $(".loading_content" ).hide("fast", function(){ 72 //$(".loading_content" ).parent().css("overflow-y", "auto"); 73 }); 74 75 } 76} 77 78function loading(display){ 79 if(display){ 80 $(".loading_content" ).parent().css("overflow-y", "hidden"); 81 $(".loading_content" ).show(); 82 } 83 else{ 84 $(".loading_content" ).hide(); 85 $(".loading_content" ).parent().css("overflow-y", "auto"); 86 } 87} 88 89/** 90 * íë¦°í¸ ê¸°ë¥(íë¡ í¸) 91 * 92 */ 93function print(){ 94 var printWindow = window.open('', '', 'height=400,width=800,scrollbars=yes');
95 printWindow.document.write('<html><head><title></title>'); 96 printWindow.document.write('<link href="/assets/common/css/print.css" rel="stylesheet">'); 97 printWindow.document.write('<link href="/assets/plugin/bootstrap/css/bootstrap.min.css" rel="stylesheet">'); 98 printWindow.document.write('</head><body>'); 99 $(".not_print").hide(); 100 $(".is_print").show(); 101 printWindow.document.write($("#print_area").html()); 102 $(".not_print").show(); 103 $(".is_print").hide(); 104 printWindow.document.write('</body></html>'); 105 printWindow.document.close(); 106 setTimeout(function() { 107 printWindow.print(); 108 }, 1000); 109} 110 111function print_photo(id,photo){ 112 if(photo=="sell" || photo=="full_rent" || photo=="monthly_rent"){ 113 var printWindow = window.open('/product/view_structure_print/'+id+'/'+photo, 'print', 'height=860,width=1186,scrollbars=yes'); 114 } 115 else if(photo==2){ 116 var printWindow = window.open('/product/view_print/'+id+'/'+photo, 'print', 'height=860,width=1186,scrollbars=yes'); 117 } 118 else if(photo==3){ //ì§ëë§ 119 var printWindow = window.open('/product/view_print/'+id+'/'+photo, 'print', 'height=800,width=820,scrollbars=yes'); 120 } 121 else if(photo=='list'){ //목ë¡ë§ 122 var check_product = new Array(); 123 $("input[name='check_product[]']:checked").each(function() { 124 check_product.push($(this).val()); 125 }); 126 if(check_product.length>0){ 127 var printWindow = window.open('/product/view_print/'+0+'/'+photo+'?check_product='+check_product, 'print', 'height=800,width=1186,scrollbars=yes'); 128 } else { 129 msg('error','매물ì ì íí´ ì£¼ì¸ì'); 130 } 131 132 } 133 else{ 134 var printWindow = window.open('/product/view_print/'+id+'/'+photo, 'print', 'height=800,width=820,scrollbars=yes'); 135 } 136} 137 138function print_table(){ 139 $(".print_checkbox").fadeIn(); 140 var check_product = new Array(); 141 $("input[name='check_product[]']:checked").each(function() { 142 check_product.push($(this).val()); 143 }); 144 if(check_product.length>0){ 145 var printWindow = window.open('/product/view_print/0/list?front=1&check_product='+check_product, 'print', 'height=800,width=1186,scrollbars=yes'); 146 } else { 147 msg('error','매물ì ì íí´ ì£¼ì¸ì'); 148 } 149} 150 151 152campaign_id=''; 153$(document).ready(function(){ 154 $('#campaign_select').on('change',function(){ 155 campaign_id=$(this).val(); 156 if(campaign_id){ 157 $('#campaign_input_zone').hide(); 158 } else { 159 $('#campaign_input_zone').show(); 160 } 161 }) 162}) 163 164function mail_campaign_add(){ 165 var check_product = new Array(); 166 $("input[name='check_product[]']:checked").each(function() { 167 check_product.push($(this).val()); 168 }); 169 if(check_product.length>0){ 170 $("#mail_product").modal("show"); 171 // $('#campaign_name').val(''); 172 // $("#campaign_add").modal(); 173 // $('#campaign_name').focus(); 174 } else { 175 alert('매물ì ì íí´ ì£¼ì¸ì'); 176 } 177} 178 179 180function mail_campaign_save(){ 181 var check_product = new Array(); 182 $("input[name='check_product[]']:checked").each(function() { 183 check_product.push($(this).val()); 184 }); 185 if($('#campaign_name').val() || campaign_id){ 186 $.post('/adminmail/campaign_add_action',{product_ids:check_product,campaign_name:$('#campaign_name').val(),campaign_id:campaign_id},function(){ 187 alert('ì ì¥ëììµëë¤.'); 188 $('#campaign_add').modal('hide'); 189 location.href='/adminmail/campaign'; 190 }) 191 } else { 192 alert('ì 목ì ì ë ¥í´ ì£¼ì¸ì'); 193 $('#campaign_name').focus(); 194 } 195} 196 197function print_qrcode(id){ 198 var printWindow = window.open('/product/view_qrcode/'+id, 'print', 'height=800,width=820,scrollbars=yes'); 199} 200 201/** 202 * ë©´ì ëë¹ ê°ê²© íìí기 ìí í¨ì 203 */ 204function cal_unit_price(){ 205 206 /** í ì§ ë©´ì ëë¹ê°ê²© **/ 207 208 var sell_price = isNaN(parseInt($("#sell_price").val())) ? 0 : parseInt($("#sell_price").val()); 209 var full_rent_price = isNaN(parseInt($("#full_rent_price").val())) ? 0 : parseInt($("#full_rent_price").val()); 210 var monthly_rent_price = isNaN(parseInt($("#monthly_rent_price").val())) ? 0 : parseInt($("#monthly_rent_price").val()); 211 var land_area = isNaN(parseInt($("#land_area").val())) ? 0 : parseInt($("#land_area").val()); 212 var road_area = isNaN(parseInt($("#road_area").val())) ? 0 : parseInt($("#road_area").val()); 213 var law_area = isNaN(parseInt($("#law_area").val())) ? 0 : parseInt($("#law_area").val()); 214 215 216 if( land_area != 0 ) 217 { 218 219 if( sell_price != 0 ){ 220 221 var up_land_m = ( sell_price / ( land_area + road_area ) ).toFixed(0); 222 var up_land_p = ( up_land_m*3.305785 ).toFixed(0); 223 224 $("#land_info").html("<i class=\"fa fa-krw\"></i> ë©´ì ëë¹ê°ê²©:ê°ê²©/ì´ë©´ì (ëì§+ëë¡) => <b>"+number_format(up_land_m)+"</b>ë§ì/ã¡, <b>" + number_format(up_land_p) + "</b>ë§ì/í"); 225 } 226 227 if( road_area != 0 ){ 228 var road_rate = ( parseInt($("#road_area").val()) / (parseInt($("#land_area").val())+ parseInt($("#road_area").val()) )).toFixed(2) * 100; 229 $("#road_rate").html( "ëë¡ì§ë¶ì¨:" + road_rate +"%" ); 230 } 231 232 } 233 234 /** 매물 ë©´ì ëë¹ ê°ê²© : ê³ì½ë©´ì ëë ì°ë©´ì 기ì¤ì¼ë¡ ê°ê²©ì ì°ì **/ 235 var product_price = 0; 236 237 if( law_area != 0 ){ 238 if( $("#type").val() == "sell" || $("#type").val() == "installation" ){ 239 240 product_price = ( sell_price / law_area ).toFixed(0); 241 242 } else if( $("#type").val() == "full_rent" ){ 243 244 product_price = ( full_rent_price / law_area ).toFixed(0); 245 246 } else if( $("#type").val() == "monthly_rent" ){ 247 248 product_price = ( monthly_rent_price / law_area ).toFixed(0); 249 250 } 251 } 252 253 if(product_price!=0){ 254 255 $("#product_info").html("<i class=\"fa fa-krw\"></i> ë©´ì ëë¹ê°ê²©:ê°ê²©/ë©´ì (ê³ì½ ëë ì°ë©´ì ) => <b>"+number_format(product_price)+"</b>ë§ì/ã¡, <b>" + number_format((product_price*3.305785).toFixed(0)) + "</b>ë§ì/í"); 256 257 } 258 259} 260 261function closeWin(param){ 262 pop_setcookie("pop"+param,"done",1); 263 $("#notice_"+param).modal('hide'); 264 $("#notice_"+param).hide(); 265} 266 267function pop_setcookie(name,value,expire){ 268 var todayDate = new Date(); 269 todayDate.setDate(todayDate.getDate() + expire); 270 document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";" 271} 272 273function getCookieVal(offset) { 274 var endstr = document.cookie.indexOf(";", offset); 275 if (endstr == -1) endstr = document.cookie.length; 276 return unescape(document.cookie.substring(offset, endstr)); 277} 278 279function GetCookie(name) { 280 var arg = name + "="; 281 var alen = arg.length; 282 var clen = document.cookie.length; 283 var i = 0; 284 while (i < clen) { 285 var j = i + alen; 286 if (document.cookie.substring(i, j) == arg) return getCookieVal(j); 287 i = document.cookie.indexOf(" ", i) + 1; 288 if (i == 0) break; 289 } 290 return null; 291} 292 293function notice_show(id,form){ 294 $("#"+form).find("#profile_msg").html(''); 295 $.getJSON("/notice/get_json/"+id+"/"+Math.round(new Date().getTime()),function(data){ 296 $.each(data, function(key, val) { 297 if(key=="title") $("#notice_modal_title").html(val); 298 if(key=="content") $("#notice_modal_content").html(val); 299 $('#notice_modal').modal('show'); 300 }); 301 }); 302} 303 304/** 305 * ê¸ì¡ ë§ì ë¨ì íê¸ë¡ ë³í 306 */ 307function setWon(pWon) { 308 if(!pWon) return 0; 309 310 var won = (pWon+"").replace(/,/g, ""); 311 var arrWon = ["ì", "ë§", "ìµ ", "ì¡° ", "ê²½ ", "í´ "]; 312 var changeWon = ""; 313 var pattern = /(-?[0-9]+)([0-9]{4})/; 314 315 while(pattern.test(won)) { 316 won = won.replace(pattern,"$1,$2"); 317 } 318 319 var arrCnt = won.split(",").length-1; 320 321 for(var ii=0; ii<won.split(",").length; ii++) { 322 changeWon += won.split(",")[ii]+arrWon[arrCnt]; 323 arrCnt--; 324 } 325 326 if(won.length > 4){ 327 var split_won = changeWon.split("ë§"); 328 return split_won[0]+"ë§ì"; 329 } 330 else{ 331 return changeWon; 332 } 333} 334 335/** 336 * ë§¤ë¬¼ì¢ ë¥ë¥¼ ìë¨ë©ë´ë¡ ì¬ì©í ì ì¬ì©íë í¨ì 337 */ 338function set_category(obj,segment,id){ 339 if(segment=="map"){ 340 $('#search').val(''); 341 $("#category-navigation").find("a").css("cursor", "wait"); 342 $(obj).parent().find("li").removeClass("active"); 343 $(obj).addClass("active"); 344 $("#category").val(id); 345 $("#search_form").trigger("submit"); 346 } 347 else{ 348 location.href="/search/set_category/"+id; 349 } 350} 351 352function set_category_grid(obj,id){ 353 location.href="/search/set_category_grid/"+id; 354} 355 356function set_category_table(obj,id){ 357 location.href="/search/set_category_table/"+id; 358}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.