1$(document).ready(function () { 2 3 $( ".event_track" ).click(function() { 4 5 var category = $(this).data('eventcategory'); 6 var action = $(this).data('eventaction'); 7 var label = $(this).data('eventlabel'); 8 9 if (typeof gtag !== 'undefined') { 10 gtag('event', action, { 11 'event_category': category, 12 'event_label': label 13 }); 14 } 15 }); 16 17 $( ".email_form" ).submit(function( event ) { 18 19 event.preventDefault(); 20 21 $('.submit').text('Processing'); 22 $('.submit').attr("disabled","disabled"); 23 24 var form = $(this); 25 var valid = 1; 26 27 form.find("[req=1]").each(function() { 28 29 var elem = $(this); 30 if (elem.parents('.hide').length) return; 31 32 if (elem.val().length < 1) { 33 valid = 0; 34 $.alert({ 35 title: '', 36 content: 'Please fill in ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 37 onDestroy: function() { 38 elem.focus(); 39 }} 40 ); 41 42 return false; 43 } 44 if (elem.attr('eml') == "1" && !validateEmail(elem.val())) { 45 valid = 0; 46 $.alert({ 47 title: '', 48 content: 'Please enter a valid email address for ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 49 onDestroy: function() { 50 elem.focus(); 51 }} 52 ); 53 54 return false; 55 } 56 }); 57 58 if (valid == 0) { 59 $('.submit').text('submit'); 60 $('.submit').removeAttr("disabled"); 61 62 return false; 63 } 64 else { 65 66 $.ajax({ 67 type: 'POST', 68 url: '/emailform', 69 data: form.serialize(), 70 success: function (response) { 71 72 if (response.code == 101) { 73 $.alert({title: '',content: 'Your message has been sent. Thank you!'}); 74 } 75 else { 76 $.alert({title: '',content: 'Something went wrong, Please try again.'}); 77 } 78 79 form[0].reset(); 80 81 $('.submit').text('submit'); 82 $('.submit').removeAttr("disabled"); 83 84 }, 85 error:function(){ 86 $.alert({title: '',content: 'loading error.'}); 87 } 88 }); 89 } 90 91 return false; 92 }); 93 94 $( ".contact_form_appointnemt" ).submit(function( event ) { 95 96 event.preventDefault(); 97 98 $('.submit').text('Processing'); 99 $('.submit').attr("disabled","disabled"); 100 101 var form = $(this); 102 var valid = 1; 103 104 rd_url = form.find("input[name='rd_url']").val(); 105 106 form.find("[req=1]").each(function() { 107 108 var elem = $(this); 109 if (elem.parents('.hide').length) return; 110 111 if (elem.val().length < 1) { 112 valid = 0; 113 $.alert({ 114 title: '', 115 content: 'Please fill in ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 116 onDestroy: function() { 117 elem.focus(); 118 }} 119 ); 120 121 return false; 122 } 123 if (elem.attr('eml') == "1" && !validateEmail(elem.val())) { 124 valid = 0; 125 $.alert({ 126 title: '', 127 content: 'Please enter a valid email address for ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 128 onDestroy: function() { 129 elem.focus(); 130 }} 131 ); 132 133 return false; 134 } 135 }); 136 137 if (valid == 0) { 138 $('.submit').text('Request'); 139 $('.submit').removeAttr("disabled"); 140 141 return false;
142 } 143 else { 144 145 $.ajax({ 146 type: 'POST', 147 url: '/action/externallead/ajax', 148 data: form.serialize(), 149 success: function (response) { 150 151 if (response.code == 101) { 152 153 $(".close_cs").removeClass("close_cs").addClass("open_cs"); 154 $("#contactless_show").addClass("hide"); 155 156 $(".appointment_button").removeClass("hide").addClass("active").text("Change Appointment"); 157 $(".appointment_btn").text("+"); 158 159 $(".to_remove").remove(); 160 $(".thanks_note").removeClass("hide"); 161 162 // $.alert({title: '',content: 'Your message has been sent. Thank you!'}); 163 164 if (typeof gtag !== 'undefined') { 165 gtag('config', 'UA-890309-6', {'page_path': '/conversion/' + rd_url }); 166 } 167 } 168 else { 169 $.alert({title: '',content: 'Something went wrong, Please try again.'}); 170 } 171 172 $('.submit').text('Request'); 173 $('.submit').removeAttr("disabled"); 174 175 }, 176 error:function(){ 177 $.alert({title: '',content: 'loading error.'}); 178 } 179 }); 180 } 181 182 return false; 183 }); 184 185 $( ".register_form" ).submit(function( event ) { 186 187 event.preventDefault(); 188 189 $('.submit').text('Processing'); 190 $('.submit').attr("disabled","disabled"); 191 192 var form = $(this); 193 var valid = 1; 194 195 rd_url = form.find("input[name='rd_url']").val(); 196 docu_url = form.find("input[name='docu_url']").val(); 197 198 form.find("[req=1]").each(function() { 199 200 var elem = $(this); 201 if (elem.parents('.hide').length) return; 202 203 if (elem.val().length < 1) { 204 valid = 0; 205 $.alert({ 206 title: '', 207 content: 'Please fill in ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 208 onDestroy: function() { 209 elem.focus(); 210 }} 211 ); 212 213 return false; 214 } 215 if (elem.attr('eml') == "1" && !validateEmail(elem.val())) { 216 valid = 0; 217 $.alert({ 218 title: '', 219 content: 'Please enter a valid email address for ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 220 onDestroy: function() { 221 elem.focus(); 222 }} 223 ); 224 225 return false; 226 } 227 }); 228 229 if (valid == 0) { 230 $('.submit').text('Submit and continue to disclosures'); 231 $('.submit').removeAttr("disabled"); 232 233 return false; 234 } 235 else { 236 237 $.ajax({ 238 type: 'POST', 239 url: '/action/externallead/ajax', 240 data: form.serialize(), 241 success: function (response) { 242 243 if (response.code == 101) { 244 245 if (docu_url.includes('boldsign')) { 246 247 $('#form_id').html('<iframe style="width:100%;height:100vh;" src=' + docu_url + '></iframe>'); 248 } 249 else { 250 window.location.replace(docu_url); 251 } 252 } 253 else { 254 $.alert({title: '',content: 'Something went wrong, Please try again.'}); 255 } 256 257 form[0].reset(); 258 259 $('.submit').text('Submit and continue to disclosures'); 260 $('.submit').removeAttr("disabled"); 261 262 }, 263 error:function(){ 264 $.alert({title: '',content: 'loading error.'}); 265 } 266 }); 267 } 268 269 return false;
270 }); 271 272 $( ".contact_form" ).submit(function( event ) { 273 274 event.preventDefault(); 275 276 $('.submit').text('Processing'); 277 $('.submit').attr("disabled","disabled"); 278 279 var form = $(this); 280 var valid = 1; 281 282 rd_url = form.find("input[name='rd_url']").val(); 283 284 form.find("[req=1]").each(function() { 285 286 var elem = $(this); 287 if (elem.parents('.hide').length) return; 288 289 if (elem.val().length < 1) { 290 valid = 0; 291 $.alert({ 292 title: '', 293 content: 'Please fill in ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 294 onDestroy: function() { 295 elem.focus(); 296 }} 297 ); 298 299 return false; 300 } 301 if (elem.attr('eml') == "1" && !validateEmail(elem.val())) { 302 valid = 0; 303 $.alert({ 304 title: '', 305 content: 'Please enter a valid email address for ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(), 306 onDestroy: function() { 307 elem.focus(); 308 }} 309 ); 310 311 return false; 312 } 313 }); 314 315 if (valid == 0) { 316 $('.submit').text('submit'); 317 $('.submit').removeAttr("disabled"); 318 319 return false; 320 } 321 else { 322 323 $.ajax({ 324 type: 'POST', 325 url: '/action/externallead/ajax', 326 data: form.serialize(), 327 success: function (response) { 328 329 if (response.code == 101) { 330 331 if (rd_url == 'accessibility') { 332 $(".contact_modal").addClass('hide'); 333 $(".thank_you_message").removeClass('hide'); 334 } 335 else { 336 $.alert({title: '',content: 'Your message has been sent. Thank you!'}); 337 } 338 339 if (typeof gtag !== 'undefined') { 340 gtag('config', 'UA-890309-6', {'page_path': '/conversion/' + rd_url }); 341 } 342 } 343 else { 344 $.alert({title: '',content: 'Something went wrong, Please try again.'}); 345 } 346 347 form[0].reset(); 348 349 $('.submit').text('submit'); 350 $('.submit').removeAttr("disabled"); 351 352 }, 353 error:function(){ 354 $.alert({title: '',content: 'loading error.'}); 355 } 356 }); 357 } 358 359 return false; 360 }); 361 362 $( ".floorplan_form" ).submit(function( event ) { 363 364 $('.submit').text('Processing'); 365 $('.submit').attr("disabled","disabled"); 366 367 first_name = $(this).find("input[name='FirstName']").val(); 368 email = $(this).find("input[name='Email']").val(); 369 370 if ( first_name.length < 1 || !validateEmail(email) ) { 371 372 if (!validateEmail(email)) 373 374 $.alert({title: '',content: 'Please enter a valid email address.'}); 375 else 376 $.alert({title: '',content: 'Please fill in Name field.'}); 377 378 $('.submit').text('submit'); 379 $('.submit').removeAttr("disabled"); 380 381 return false; 382 } 383 else { 384 385 $.ajax({ 386 type: 'POST', 387 url: '/action/externallead/ajax', 388 data: $(this).serialize(), 389 success: function (response) { 390 391 if (response.code == 101) { 392 393 $('.fp_form').addClass('hide'); 394 $('.fp_link').removeClass('hide'); 395 396 if (typeof gtag !== 'undefined') { 397 gtag('config', 'UA-890309-6', {'page_path': '/conversion/floorplan' }); 398 } 399 } 400 else { 401 $.alert({title: '',content: 'Something went wrong, Please try again.'}); 402 } 403 404 $('.submit').text('submit'); 405 $('.submit').removeAttr("disabled"); 406 }, 407 error:function(){ 408 $.alert({title: '',content: 'loading error.'}); 409 } 410 }); 411 } 412 413 return false;
414 }); 415 416 $( ".blg_search_form" ).submit(function( event ) { 417 418 event.preventDefault(); 419 420 $('.submit').text('Processing'); 421 $('.submit').attr("disabled","disabled"); 422 423 var form = $(this); 424 425 $.ajax({ 426 type: 'POST', 427 url: '/blg_search', 428 data: form.serialize(), 429 success: function (response) { 430 431 if (response.code == 101) { 432 433 $("#blg_search_result").html(''); 434 435 var obj = jQuery.parseJSON(response.ret_arr); 436 $.each(obj, function (key, value) { 437 438 $("#blg_search_result").append('<div>Address: <b>'+value+'</b> <a href="/forms/toured/' + key + '">go to form</a></div>'); 439 440 $('.submit').text('Search again'); 441 }); 442 443 } 444 else { 445 $.alert({title: '',content: 'Something went wrong, Please try again.'}); 446 } 447 448 $('.submit').removeAttr("disabled"); 449 450 }, 451 error:function(){ 452 $.alert({title: '',content: 'loading error.'}); 453 } 454 }); 455 456 return false; 457 }); 458 459 $('.f_dwnFP').on("click", function (e) { 460 461 var floorPlanImage = $(this).attr('data-floorplanimage'); 462 var floorplandocument = $(this).attr('data-floorplandocument'); 463 var apartment = $(this).attr('data-aptid'); 464 var building = $(this).attr('data-blgid'); 465 var bedroom = $(this).attr('data-bedroom'); 466 var manager = $(this).attr('data-respmanager'); 467 468 if (floorPlanImage != '') { 469 $('#floorPlanImage').css('background-image', "url('" + media_url + floorPlanImage + "')"); 470 } 471 else { 472 $('#floorPlanImage').css('background-image', "url(/assets/images/fp_noimage.jpg)"); 473 } 474 $('#apt_id_1').attr('value', apartment); 475 $('#blg_id_1').attr('value', building); 476 $('#bedroom_1').attr('value', bedroom); 477 $('#resp_manager_1').attr('value', manager); 478 $('#floorPlanPDF').attr('href', floorplandocument); 479 480 }); 481 482 $('.f_viewTour').on("click", function (e) { 483 484 var tourUrl = $(this).attr('data-toururl'); 485 var apartment = $(this).attr('data-aptid'); 486 var building = $(this).attr('data-blgid'); 487 var bedroom = $(this).attr('data-bedroom'); 488 var manager = $(this).attr('data-respmanager'); 489 490 $('#apt_id_3').attr('value', apartment); 491 $('#blg_id_3').attr('value', building); 492 $('#bedroom_3').attr('value', bedroom); 493 $('#resp_manager_3').attr('value', manager); 494 $('#tourUrl').attr('href', tourUrl); 495 }); 496 497 $('.f_viewTour_4').on("click", function (e) { 498 499 var tourUrl = $(this).attr('data-toururl'); 500 var apartment = $(this).attr('data-aptid'); 501 var building = $(this).attr('data-blgid'); 502 var bedroom = $(this).attr('data-bedroom'); 503 var manager = $(this).attr('data-respmanager'); 504 505 $('#apt_id_4').attr('value', apartment); 506 $('#blg_id_4').attr('value', building); 507 $('#bedroom_4').attr('value', bedroom); 508 $('#resp_manager_4').attr('value', manager); 509 $('#tourUrl_4').attr('href', tourUrl); 510 }); 511 512 $('.f_contact').on("click", function (e) { 513 514 var apartment = $(this).attr('data-aptid'); 515 var building = $(this).attr('data-blgid'); 516 var bedroom = $(this).attr('data-bedroom'); 517 var manager = $(this).attr('data-respmanager'); 518 519 $('#apt_id_2').attr('value', apartment); 520 $('#blg_id_2').attr('value', building); 521 $('#bedroom_2').attr('value', bedroom); 522 $('#resp_manager_2').attr('value', manager); 523 }); 524 525 $('.no_oh_btn').on("click", function (e) { 526 527 var apartment = $(this).attr('data-aptid'); 528 var building = $(this).attr('data-blgid'); 529 var manager = $(this).attr('data-respmanager'); 530 531 $('#apt_id_1').attr('value', apartment); 532 $('#blg_id_1').attr('value', building); 533 $('#resp_manager_1').attr('value', manager); 534 535 }); 536 537 function validateEmail(elementValue) { 538 539 var emailPattern = /[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/; 540 return emailPattern.test(elementValue); 541 } 542 543});
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.