1//var myRadioValue; var domainName; var domainNameDB; 2//var isCompanyExits = 0; 3$(document).ready(function () { 4 //for single image upload 5 $("#btnUploadImage").unbind().click(function (e) { 6 7 var AjaxURL = $(this).attr("data-URL"); 8 var file = $(".fu").prop("files")[0]; 9 /*alert(file);*/ 10 var imagePath = $(this).attr("data-path"); 11 12 if (file != null) { 13 14 var formData = new FormData(); 15 formData.append(file.name, file); 16 17 $.ajax({ 18 type: "POST", 19 url: AjaxURL, 20 data: formData, 21 processData: false, 22 contentType: false, 23 success: function (data) { 24 /* alert()*/ 25 if (data == "") { 26 alert("Oops some error occured."); 27 } 28 else { 29 30 /*alert(data);*/ 31 32 $("#ImgUploadedImage").attr("src", imagePath + "/" + data); 33 $("#nominationThumbnail").val(data); 34 35 alert("Image Upload successfully"); 36 37 } 38 } 39 }); 40 } 41 else { 42 alert("Please select a file."); 43 } 44 45 }); 46 /*for single image upload end*/ 47 48 //for single resume upload 49 $("#btnUploadResume").unbind().click(function (e) { 50 51 var AjaxURL = $(this).attr("data-URL"); 52 var file = $(".fu").prop("files")[0]; 53 /*alert(file);*/ 54 var imagePath = $(this).attr("data-path"); 55 56 if (file != null) { 57 58 var formData = new FormData(); 59 formData.append(file.name, file); 60 61 $.ajax({
62 type: "POST", 63 url: AjaxURL, 64 data: formData, 65 processData: false, 66 contentType: false, 67 success: function (data) { 68 /* alert()*/ 69 if (data == "") { 70 alert("Oops some error occured."); 71 } 72 else { 73 74 /*alert(data);*/ 75 $("#Resume").val(data); 76 77 alert("Resume Upload successfully"); 78 79 } 80 } 81 }); 82 } 83 else { 84 alert("Please select a file."); 85 } 86 87 }); 88 /*for single resume upload end*/ 89 90 $(".btnMultipleUploadVariantImageWP").unbind().click(function () { 91 //alert("in js"); 92 var itemCount = 0; 93 var Path = "/Content/NominationDocument"; 94 var AjaxURL = "/Emma/MultiUploadFile"; 95 var file = $(".fuImage").prop("files")[0]; 96 var fileUpload = $("#fuCustMultiImage"); 97 98 //console.log("file" + file); 99 100 if (file != null) { 101 102 /* if (IsValidImage(fileUpload)) {*/ 103 104 //console.log(file); 105 var _URL = window.URL || window.webkitURL; 106 var file, img, width, height, size; 107 size = file.size; 108 109 var formData = new FormData(); 110 formData.append(file.name, file); 111 112 $.ajax({
113 type: "POST", 114 url: AjaxURL, 115 data: formData, 116 processData: false, 117 contentType: false, 118 beforeSend: function () { 119 $("#btnMultipleUploadVariantImageWP").attr({ 'value': 'Please wait..' }); 120 }, 121 success: function (data) { 122 123 //alert(data); 124 125 $("#btnMultipleUploadVariantImageWP").attr({ 'value': 'Upload' }); 126 if (data == "") { 127 alert("Oops some error occured."); 128 } 129 else { 130 131 itemCount = $("#hfMultiImageCount").val(); 132 133 itemCount++; 134 135 $("#hfMultiImageCount").val(itemCount); 136 137 appendVariantItem(data, itemCount, Path + data); 138 139 //console.log(Path + data); 140 141 fileUpload.val(''); 142 } 143 } 144 }); 145 146 //} 147 //else { 148 // alert("Please upload a valid image."); 149 //} 150 151 } 152 else { 153 alert("Please upload a file."); 154 } 155 }); 156 157 //for single image upload 158 $("#btnUploadNomineThumnail").unbind().click(function (e) { 159 160 var AjaxURL = $(this).attr("data-URL"); 161 var file = $(".fu").prop("files")[0]; 162 var imagePath = $(this).attr("data-path"); 163 164 if (file != null) { 165 166 var size; 167 168 size = file.size / 1024; 169 170 if (size < 200) { 171 var formData = new FormData(); 172 formData.append(file.name, file); 173 174 $.ajax({
175 type: "POST", 176 url: AjaxURL, 177 data: formData, 178 processData: false, 179 contentType: false, 180 beforeSend: function () { 181 $("#btnUploadNomineThumnail").attr({ 'value': 'Please wait..' }); 182 }, 183 success: function (data) { 184 /* alert()*/ 185 if (data == "") { 186 alert("Oops some error occured."); 187 188 $("#btnUploadNomineThumnail").attr({ 'value': 'Upload' }); 189 } 190 else { 191 192 /*alert(data);*/ 193 194 $("#ImgUploadedImage").attr("src", imagePath + "/" + data); 195 $("#nominationThumbnail").val(data); 196 197 $("#btnUploadNomineThumnail").attr({ 'value': 'Upload' }); 198 199 alert("Image Upload successfully"); 200 201 } 202 } 203 }); 204 205 } else { 206 alert("Please upload a valid image with less than 200KB."); 207 } 208 } 209 else { 210 alert("Please select a file."); 211 } 212 213 }); 214 /*for single image upload end*/ 215 216 /*file upload for nomintaion*/ 217 $(".btnMultipleUploadVariantImageNUP").unbind().click(function () { 218 //alert("in js"); 219 var itemCount = 0; 220 var AjaxURL = $(this).attr("data-URL"); 221 var imagePath = $(this).attr("data-path"); 222 var dataCount = $(this).attr("data-count"); 223 224 //var file = $(".fuFile").prop("files")[0]; 225 var file = $("#fuCustMultiImage_" + dataCount).prop("files")[0]; 226 227 //var Path = "/Content/NominationDocument"; 228 //var AjaxURL = "/Emma/MultiUploadFile"; 229 230 //console.log("file" + file); 231 232 if (file != null) { 233 234 var file, img, width, height, size; 235 size = file.size; 236 237 size = file.size / 1024; 238 239 //console.log(size); 240 //console.log(dataCount); 241 242 if (size < 5000) { 243 var formData = new FormData(); 244 formData.append(file.name, file); 245 246 if (dataCount > 0) { 247 $.ajax({
248 type: "POST", 249 url: AjaxURL, 250 data: formData, 251 processData: false, 252 contentType: false, 253 beforeSend: function () { 254 $("#btnUploadMultiFile_" + dataCount).attr({ 'value': 'Please wait..' }); 255 }, 256 success: function (data) { 257 258 //alert(data); 259 260 if (data == "") { 261 alert("Oops some error occured."); 262 263 $("#btnUploadMultiFile_" + dataCount).attr({ 'value': 'Upload' }); 264 } 265 else { 266 267 appendFileItem(data, imagePath, dataCount); 268 //$("#txtNominationFileLink_" + dataCount).val(data); 269 270 if (dataCount == 3) { 271 //alert("uploadFileOne"); 272 $("#uploadFileOne").val(data); 273 } else if (dataCount == 4) { 274 //alert("uploadFileTwo"); 275 $("#uploadFileTwo").val(data); 276 } else { 277 console.log("data-count Error"); 278 } 279 280 //console.log(Path + data); 281 282 $("#btnUploadMultiFile_" + dataCount).attr({ 'value': 'Upload' }); 283 284 alert("File Upload successfully"); 285 } 286 } 287 }); 288 } else { 289 console.log("dataCount not Provided.Check upload Btn.") 290 } 291 292 } else { 293 alert("Please upload a valid image with less than 5MB."); 294 } 295 296 297 298 299 //} 300 //else { 301 // alert("Please upload a valid image."); 302 //} 303 304 } 305 else { 306 alert("Please upload a file."); 307 } 308 }); 309 /*end file upload for nomintaion*/ 310 $(document).on("click", ".divDeleteImage", function () { 311 $(this).parent().remove(); 312 }); 313 314 var url = window.location.href; 315 316 /*console.log(url);*/ 317 318 var urlpath = window.location.pathname; 319 var urlparameter = urlpath.split("/"); 320 321 var controller = urlparameter[1] 322 var action = urlparameter[2] || "index";; 323 324 //console.log(controller); 325 326 //console.log(action); 327 328 if (controller == 'Profile') { 329 if (action == 'YourOrders') { 330 $("#activeYOrder").addClass("profile-lineDash"); 331 $("#YourOrders").css("color", "#005FAA"); 332 } 333 else if (action == 'Membership') { 334 $("#activeMembershipProfile").addClass("profile-lineDash"); 335 $("#Membership").css("color", "#005FAA"); 336 } 337 else if (action == 'Events') { 338 $("#activeEvents").addClass("profile-lineDash"); 339 $("#Events").css("color", "#005FAA"); 340 } 341 else if (action == 'ExclusiveDownloads') { 342 $("#activeExclDown").addClass("profile-lineDash"); 343 $("#ExclusiveDownloads").css("color", "#005FAA"); 344 } 345 else if (action == 'Payments') { 346 $("#activePayments").addClass("profile-lineDash"); 347 $("#Payments").css("color", "#005FAA"); 348 } 349 else if (action == 'MyProfile') { 350 $("#activeMyProfilet").addClass("profile-lineDash"); 351 $("#MyProfile").css("color", "#005FAA"); 352 } 353 else if (action == 'GoldBook') { 354 $("#activeGoldBook").addClass("profile-lineDash"); 355 $("#GoldBook").css("color", "#005FAA"); 356 } 357 else if (action == 'CompanyProfile') { 358 $("#activeCompanyProfile").addClass("profile-lineDash"); 359 $("#CompanyProfile").css("color", "#005FAA"); 360 } 361 else if (action == 'MyProfileChangePassword') { 362 $("#activeChangePassword").addClass("profile-lineDash"); 363 $("#ChangePassword").css("color", "#005FAA"); 364 } 365 else { 366 /*console.log(action);*/ 367 } 368 } 369 370 if (controller == 'profile') { 371 if (action == 'your-orders') { 372 $("#activeYOrder").addClass("profile-lineDash"); 373 $("#YourOrders").css("color", "#005FAA"); 374 } 375 else if (action == 'membership') { 376 $("#activeMembershipProfile").addClass("profile-lineDash"); 377 $("#Membership").css("color", "#005FAA"); 378 } 379 else if (action == 'events') { 380 $("#activeEvents").addClass("profile-lineDash"); 381 $("#Events").css("color", "#005FAA"); 382 } 383 else if (action == 'exclusive-downloads') { 384 $("#activeExclDown").addClass("profile-lineDash"); 385 $("#ExclusiveDownloads").css("color", "#005FAA"); 386 } 387 else if (action == 'payments') { 388 $("#activePayments").addClass("profile-lineDash"); 389 $("#Payments").css("color", "#005FAA"); 390 } 391 else if (action == 'my-profile') { 392 $("#activeMyProfilet").addClass("profile-lineDash"); 393 $("#MyProfile").css("color", "#005FAA"); 394 } 395 else if (action == 'gold-book') { 396 $("#activeGoldBook").addClass("profile-lineDash"); 397 $("#GoldBook").css("color", "#005FAA"); 398 } 399 else if (action == 'company-profile') { 400 $("#activeCompanyProfile").addClass("profile-lineDash"); 401 $("#CompanyProfile").css("color", "#005FAA"); 402 } 403 else if (action == 'change-password') { 404 $("#activeChangePassword").addClass("profile-lineDash"); 405 $("#ChangePassword").css("color", "#005FAA"); 406 } 407 else { 408 /*console.log(action);*/ 409 } 410 } 411 412 if (controller == 'Membership') { 413 $("#activeMembership").addClass("active"); 414 } 415 else if (controller == 'Gallery') { 416 $("#activeGallery").addClass("active"); 417 } 418 else if (controller == 'ContactUs') { 419 $("#activeContactUs").addClass("active"); 420 } 421 else if (controller == 'Events') { 422 $("#activeEvent").addClass("active"); 423 } 424 else if (controller == 'News') { 425 $("#activeNews").addClass("active"); 426 } 427 else if (controller == 'Emma') { 428 $("#activeEmma").addClass("active"); 429 } 430 else if (controller == 'Login') { 431 $("#activeLoginSignup").addClass("active"); 432 } 433 else if (controller == 'Registration') { 434 $("#activeLoginSignup").addClass("active"); 435 } 436 else { 437 /* $("#activeHome").addClass("active");*/ 438 } 439 440 if (controller == 'membership') { 441 $("#activeMembership").addClass("active"); 442 } 443 else if (controller == 'gallery') { 444 $("#activeGallery").addClass("active"); 445 } 446 else if (controller == 'contact-us') { 447 $("#activeContactUs").addClass("active"); 448 } 449 else if (controller == 'events') { 450 $("#activeEvent").addClass("active"); 451 } 452 else if (controller == 'news') { 453 $("#activeNews").addClass("active"); 454 } 455 else if (controller == 'emma') { 456 $("#activeEmma").addClass("active"); 457 } 458 else if (controller == 'Login') { 459 $("#activeLoginSignup").addClass("active"); 460 } 461 else if (controller == 'Registration') { 462 $("#activeLoginSignup").addClass("active"); 463 } 464 else { 465 $("#activeHome").addClass("active"); 466 } 467 468 469 $(".alert").fadeTo(3000, 1000).slideUp(3000, function () {
470 $("#success-alert").slideUp(1500); 471 }); 472 473 474 //$("#registerFormOne-submitBtn").hide(); 475 476 /*var personalPhoneNo = document.querySelector("#personalPhoneNo");*/ 477 478 //var companyContactNo = document.querySelector("#companyContactNo"); 479 480 //var iti; var itiTwo; 481 482 //iti = window.intlTelInput(personalPhoneNo, { 483 // initialCountry: "auto", 484 // separateDialCode: true, 485 // geoIpLookup: callback => { 486 // fetch("https://ipapi.co/json") 487 // .then(res => res.json()) 488 // .then(data => callback(data.country_code)) 489 // .catch(() => callback("us")); 490 // }, 491 // utilsScript: "/intl-tel-input/js/utils.js?1684676252775" // just for formatting/placeholders etc 492 //}); 493 494 //itiTwo = window.intlTelInput(companyContactNo, { 495 // initialCountry: "auto", 496 // formatOnDisplay: true, 497 // separateDialCode: true, 498 // autoHideDialCode: true, 499 // geoIpLookup: callback => { 500 // fetch("https://ipapi.co/json") 501 // .then(res => res.json()) 502 // .then(data => callback(data.country_code)) 503 // .catch(() => callback("us")); 504 // }, 505 // utilsScript: "/intl-tel-input/js/utils.js?1684676252775" // just for formatting/placeholders etc 506 //}); 507 508 //$("#registerFormOne-submitBtn").unbind().click(function (e) { 509 510 511 // e.preventDefault(); 512 513 // var firstName = $("#firstName").val(); 514 // var lastName = $("#lastName").val(); 515 // var email = $("#email").val(); 516 // var phoneNumber = $("#personalPhoneNo").val(); 517 // var registerAs = $('input[name="registerAsRadioOptions"]:checked').val(); 518 // var password = $("#personalpassword").val(); 519 // var confirmPassword = $("#txtConfirmPassword").val(); 520 // var CountryCode; 521 522 // if (firstName != null && firstName != '') { 523 // $("#span1").hide(); 524 // } 525 // else { 526 // $("#span1").show(); 527 // } 528 529 530 // if (lastName != null && lastName != '') { 531 // $("#span2").hide(); 532 // } 533 // else { 534 // $("#span2").show(); 535 // } 536 537 // if (email != null && email != '') { 538 // $("#span3").hide(); 539 // } 540 // else { 541 // $("#span3").show(); 542 // } 543 544 // if (phoneNumber != null && phoneNumber != '') { 545 // $("#span5").hide(); 546 // } 547 // else { 548 // $("#span5").show(); 549 // } 550 551 // if (registerAs != null && registerAs != '') { 552 // $("#span6").hide(); 553 // } 554 // else { 555 // $("#span6").show(); 556 // } 557 558 // var countryData = iti.getSelectedCountryData(); 559 560 // console.log(countryData); 561 562 // console.log(countryData.dialCode); 563 564 // if (countryData != null) { 565 566 // CountryCode = countryData.dialCode; 567 // var countryFlag = countryData.iso2; 568 569 // if (CountryCode !== undefined) { 570 // $("#countryCodePhoneNo").val(CountryCode); 571 // $("#countryFlagPhoneNo").val(countryFlag); 572 573 // $("#span20").hide(); 574 // } else { 575 // $("#span20").show(); 576 // } 577 578 // } else { 579 // console.log("country not get;") 580 // } 581 582 // if (password != null && password != '') { 583 584 // $("#span22").hide(); 585 586 // if (validatePasswordStrenth(password)) { 587 // //alert(); 588 // $("#span23").hide(); 589 // } 590 // else { 591 // $("#span23").show(); 592 // } 593 594 // } else { 595 // $("#span22").show(); 596 // } 597 598 // if (confirmPassword != null && confirmPassword != '') { 599 600 // $("#span24").hide(); 601 // } else { 602 // $("#span24").show(); 603 // } 604 605 606 607 // if (firstName != null && firstName != '' && lastName != null && lastName != '' && email != null && email != '' && phoneNumber != null && phoneNumber != '' && password != null && password != '' && confirmPassword != null && confirmPassword != '') { 608 // if (validateEmail(email)) { 609 // if (phoneNumber.length == 10) { 610 // if (CountryCode != undefined) { 611 // if (password == confirmPassword) { 612 // $("#registerForm").submit(); 613 // } 614 // else { 615 // // alert("password not match:") 616 // } 617 // } else { 618 // //country code 619 // //alert("county code not match:") 620 // } 621 // } else { 622 // //$("#span7").show(); 623 // //alert("phone no. alert:") 624 // } 625 // } else { 626 // $("#span4").show(); 627 // //alert("invalid email:") 628 // } 629 630 // } 631 632 633 //}); 634 635 //$(".registerFormThree-submit").unbind().click(function (e) { 636 637 // e.preventDefault(); 638 639 // var password = $("#companyUserPassword").val(); 640 // var confirmPassword = $("#companyUserConfirmPassword").val(); 641 642 // if (password != null && password != '') { 643 644 // $("#span25").hide(); 645 646 // if (validatePasswordStrenth(password)) { 647 // //alert(); 648 // $("#span26").hide(); 649 // } 650 // else { 651 // $("#span26").show(); 652 // } 653 654 // } else { 655 // $("#span25").show(); 656 // } 657 658 // if (confirmPassword != null && confirmPassword != '') { 659 660 // $("#span27").hide(); 661 // } else { 662 // $("#span27").show(); 663 // } 664 665 666 // if (password != null && password != '' && confirmPassword != null && confirmPassword != '') { 667 // if (password == confirmPassword) { 668 // $("#registerForm").submit(); 669 // } 670 // } 671 672 //}); 673 674 ////register form radio input 675 //$('input[name=registerAsRadioOptions]:radio').click(function () { 676 // // Will get the newly selected value 677 678 // radioValue($('input[name=registerAsRadioOptions]:radio:checked')); 679 680 // console.log("radio value:" + myRadioValue); 681 682 // if (myRadioValue == 'individual') { 683 // //console.log("indiv"); 684 // $('#individualPasswordContainer').css('display', 'block'); 685 686 // $("#customHeader-companydetail").css('display', 'none'); 687 // $("#customHeader-password").css('display', 'none'); 688 689 // $(".nomineFormTabShow").addClass("w-100"); 690 691 // $("#registerFormOne-submitBtn").show(); 692 // $("#registerFormOne-continuetBtn").hide(); 693 694 // $(".hide-divError").hide(); 695 696 697 // //$("#registerFormOne-submitBtn").prop('type', 'submit'); 698 // //$("#registerFormOne-submitBtn").html('Submit'); 699 700 // } 701 // else if (myRadioValue == 'company') { 702 // //console.log("comp"); 703 // //$("#registerFormOne-submitBtn").html('Continue'); 704 // $("#customHeader-companydetail").css('display', 'block'); 705 // $("#customHeader-password").css('display', 'block'); 706 707 // $(".nomineFormTabShow").removeClass("w-100"); 708 // $('#individualPasswordContainer').css('display', 'none'); 709 710 711 // $("#registerFormOne-continuetBtn").show(); 712 // $("#registerFormOne-submitBtn").hide(); 713 714 // $(".field-validation-error").hide(); 715 716 // //$("#registerFormOne-submitBtn").prop('type', false); 717 // } 718 //}); 719 720 //$(".btn-registerForm-continue").unbind().click(function (e) { 721 722 // //e.preventDefault(); 723 724 // //console.log(myRadioValue); 725 726 // var firstName = $("#firstName").val(); 727 // var lastName = $("#lastName").val(); 728 // var email = $("#email").val(); 729 // var phoneNumber = $("#personalPhoneNo").val(); 730 // var registerAs = $('input[name="registerAsRadioOptions"]:checked').val(); 731 // var CountryCode; 732 733 // if (firstName != null && firstName != '') { 734 // $("#span1").hide(); 735 // } 736 // else { 737 // $("#span1").show(); 738 // } 739 740 741 // if (lastName != null && lastName != '') { 742 // $("#span2").hide(); 743 // } 744 // else { 745 // $("#span2").show(); 746 // } 747 748 // if (email != null && email != '') { 749 // $("#span3").hide(); 750 // } 751 // else { 752 // $("#span3").show(); 753 // } 754 755 // if (phoneNumber != null && phoneNumber != '') { 756 // $("#span5").hide(); 757 // } 758 // else { 759 // $("#span5").show(); 760 // } 761 762 // if (registerAs != null && registerAs != '') { 763 // $("#span6").hide(); 764 // } 765 // else { 766 // $("#span6").show(); 767 // } 768 769 // //via class get country code 770 // //var child0 = document.getElementsByClassName("iti__selected-dial-code"); 771 // //var selectedDialCode = child0[0].innerText; 772 // //alert(selectedDialCode + phoneNumber); 773 774 // var countryData = iti.getSelectedCountryData(); 775 776 // console.log(countryData); 777 778 // console.log(countryData.dialCode); 779 780 // if (countryData != null) { 781 782 // CountryCode = countryData.dialCode; 783 // var countryFlag = countryData.iso2; 784 785 // console.log(countryFlag); 786 787 // if (CountryCode !== undefined) { 788 // $("#countryCodePhoneNo").val(CountryCode); 789 // $("#countryFlagPhoneNo").val(countryFlag); 790 // } else { 791 // $("#span20").show(); 792 // } 793 794 // } else { 795 // console.log("country not get;") 796 // } 797 798 // if (myRadioValue == 'company') { 799 800 // //alert(); 801 // $("#registerFormOne-continuetBtn").removeClass("div-hide"); 802 // $("#registerFormOne").addClass("div-hide"); 803 804 // var currentCard = $(this).attr("data-currentCard"); 805 // var nextCard = $(this).attr("data-nextCard"); 806 807 // console.log("currentCard:" + currentCard); 808 // //console.log("nextCard:"+nextCard); 809 810 // if (currentCard == 'registerFormOne') { 811 812 // //var firstName = $("#firstName").val(); 813 // //var lastName = $("#lastName").val(); 814 // //var email = $("#email").val(); 815 // //var phoneNumber = $("#personalPhoneNo").val(); 816 // //var registerAs = $("#registerAsRadioOptions").val(); 817 818 // //console.log("firstName:" + firstName); 819 820 // if (firstName != null && firstName != '') 821 // { 822 // $("#span1").hide(); 823 // } 824 // else 825 // { 826 // $("#span1").show(); 827 // } 828 829 830 // if (lastName != null && lastName != '') { 831 // $("#span2").hide(); 832 // } 833 // else { 834 // $("#span2").show(); 835 // } 836 837 // if (email != null && email != '') { 838 // $("#span3").hide(); 839 // } 840 // else { 841 // $("#span3").show(); 842 // } 843 844 // if (phoneNumber != null && phoneNumber != '') { 845 // $("#span5").hide(); 846 // } 847 // else { 848 // $("#span5").show(); 849 // } 850 851 // //if (registerAs != null && registerAs != '') { 852 // // $("#span6").hide(); 853 // //} 854 // //else { 855 // // $("#span6").show(); 856 // //} 857 858 859 860 // if (firstName != null && firstName != '' && lastName != null && lastName != '' && email != null && email != '' && phoneNumber != null && phoneNumber != '') { 861 // if (validateEmail(email)) { 862 // if (phoneNumber.length == 10) { 863 // if (CountryCode != undefined) { 864 // $('#' + currentCard).css('display', 'none'); 865 // $('#' + nextCard).css('display', 'block'); 866 // } 867 // } else { 868 // //$("#span7").show(); 869 // } 870 // } else { 871 // $("#span4").show(); 872 // } 873 874 // } 875 876 877 // //$('#' + currentCard).css('display', 'none'); 878 // //$('#' + nextCard).css('display', 'block'); 879 // } 880 881 // if (currentCard == 'registerFormTwo') 882 // { 883 // var isRegisteredCompany = $("#isRegisteredCompany").val(); 884 885 // console.log(isRegisteredCompany); 886
887 // //company not register 888 // if (isRegisteredCompany === 'false') { 889 890 // var companyName = $("#companyNameTextBox").val(); 891 // var country = $("#countryID").val(); 892 // //var companyEmail = $("#companyEmail").val(); 893 // //var companyPhoneNumber = $("#companyContactNo").val(); 894 // var website = $("#website").val(); 895 // var linkedIn = $("#linkedIn").val(); 896 // var companyInfo = $("#companyInfo").val(); 897 // var password = $("#companyUserPassword").val(); 898 // var confirmPassword = $("#companyUserConfirmPassword").val(); 899 900 // if (companyName != null && companyName != '') { 901 // $("#span8").hide(); 902 // } else { 903 // $("#span8").show(); 904 // } 905 906 // if (country > 0) { 907 // $("#span10").hide(); 908 // } else { 909 // $("#span10").show(); 910 // } 911 912 // //if (companyEmail != null && companyEmail != '') { 913 // // $("#span11").hide(); 914 // //} else { 915 // // $("#span11").show(); 916 // //} 917 918 // //if (companyPhoneNumber != null && companyPhoneNumber != '') { 919 // // $("#span13").hide(); 920 // //} else { 921 // // $("#span13").show(); 922 // //} 923 924 // if (website != null && website != '') { 925 // $("#span15").hide(); 926 // } else { 927 // $("#span15").show(); 928 // } 929 930 // //if (linkedIn != null && linkedIn != '') { 931 // // $("#span16").hide(); 932 // //} else { 933 // // $("#span16").show(); 934 // //} 935 936 937 // if (companyInfo != null && companyInfo != '') { 938 // $("#span17").hide(); 939 // } else { 940 // $("#span17").show(); 941 // } 942 943 // //$('#companyContactNo').keyup(function () { 944 // // if ($.trim($('#companyContactNo').val()).length) { 945 // // $('#span14').hide(); 946 // // } else { 947 // // $('#span14').show(); 948 // // } 949 // //}); 950 951 // //$('#companyEmail').keyup(function () { 952 // // if ($.trim($('#companyEmail').val()).length) { 953 // // $('#span11').hide(); 954 // // } else { 955 // // $('#span11').show(); 956 // // } 957 // //}); 958 959 // //$('#linkedIn').keyup(function () { 960 // // if ($.trim($('#linkedIn').val()).length) { 961 // // $('#span16').hide(); 962 // // } else { 963 // // $('#span16').show(); 964 // // } 965 // //}); 966 967 // $('#website').keyup(function () { 968 // if ($.trim($('#website').val()).length) { 969 // $('#span15').hide(); 970 // } else { 971 // $('#span15').show(); 972 // } 973 // }); 974 975 // /*var countryDataTwo = itiTwo.getSelectedCountryData();*/ 976 977 // //console.log(countryData); 978 // //console.log(countryData.dialCode); 979 980 // //if (countryDataTwo != null) { 981 982 // // var CountryCodeTwo = countryDataTwo.dialCode; 983 // // var countryFlagTwo = countryDataTwo.iso2; 984 985 // // if (CountryCode !== undefined) { 986 // // $("#countryCodecontactPerson1").val(CountryCodeTwo); 987 // // $("#countryFlagContactPerson1").val(countryFlagTwo); 988 989 // // } else { 990 991 // // $("#span21").show(); 992 // // } 993 994 // //} else { 995 // // console.log("country not get;") 996 // //} 997 998 // if (companyName != null && companyName != '' && country > 0 && website != null && website != '' && companyInfo != null && companyInfo != '') { 999 // //if (validateEmail(companyEmail)) 1000 // //{ 1001 1002 // if (validateUrl(website)) { 1003 1004 // $('#' + currentCard).css('display', 'none'); 1005 // $('#' + nextCard).css('display', 'block'); 1006 1007 // } else { 1008 // /*console.log("invalid url");*/ 1009 // } 1010 1011 // //} else { 1012 // // $("#span12").show(); 1013 // //} 1014 // } 1015 1016 // } 1017 // //company register 1018 // else { 1019 // var companyNameId = $("#companyNameDD").val(); 1020 1021 // if (companyNameId > 0) { 1022 // $("#span9").hide(); 1023 // } else { 1024 // $("#span9").show(); 1025 // } 1026 1027 // if (companyNameId > 0) { 1028 1029 // //console.log(domainName); 1030 // //console.log(domainNameDB); 1031 1032 // if (domainName == domainNameDB) { 1033 // $('#' + currentCard).css('display', 'none'); 1034 // $('#' + nextCard).css('display', 'block'); 1035 // } 1036 1037 1038 // } 1039 // } 1040 1041 1042 // } 1043 1044 1045 // //$('#' + currentCard).css('display', 'none'); 1046 // //$('#' + nextCard).css('display', 'block'); 1047 // } 1048 1049 //}); 1050 1051 1052 //$('#email').keyup(function () { 1053 // if ($.trim($('#email').val()).length) { 1054 // $('#span3').hide(); 1055 // } else { 1056 // $('#span3').show(); 1057 // } 1058 //}); 1059 1060 //$('#personalPhoneNo').keyup(function () { 1061 // if ($.trim($('#personalPhoneNo').val()).length) { 1062 // $('#span5').hide(); 1063 // } else { 1064 // $('#span5').show(); 1065 // } 1066 //}); 1067 1068 1069 //$("#txtConfirmPassword").keyup(isPasswordMatch);
1070 //$("#companyUserConfirmPassword").keyup(isPasswordMatchTwo); 1071 1072 1073 //$('#companyNameTextBox').css('display', 'block'); 1074 //$("#companyNameDD").css('display', 'none'); 1075 //$(".companyNameDDContainer").css('display', 'none'); 1076 1077 //$(".checkbox-slider-textNo").css("color", "#2A2522"); 1078 //$(".checkbox-slider-textYes").css("color", "#DADADA"); 1079 1080 //$("#isRegisteredCompany").val(false); 1081 1082 //var checked = $("#isRegisteredCompany").prop("checked"); 1083 1084 //$('#isRegisteredCompany').change(function () { 1085 // if (this.checked) { 1086 // $(this).val(true); 1087 1088 // $(".companyNameDDContainer").css('display', 'block'); 1089 // $(".companyNameTextBoxContainer").css('display', 'none'); 1090 1091 // $('#companyNameDD').css('display', 'block'); 1092 // $("#companyNameTextBox").css('display', 'none'); 1093 1094 // $(".countryIDContainer").css('display', 'none'); 1095 // $(".weblinkContainer").css('display', 'none'); 1096 // $(".companyinfoContainer").css('display', 'none'); 1097 1098 // var ddlCompany = $('#companyNameDD'); 1099 1100 // $.ajax({
1101 // type: "POST", 1102 // url: "/Ajax/GetCompanyList", 1103 // dataType: "json", 1104 // success: function (data) { 1105 // if (data != "") { 1106 // $.each(data, function (key, value) { 1107 // $(ddlCompany).append($("<option></option>").val(value.CompanyId).html(value.CompanyName)); 1108 // }); 1109 // } 1110 // else { 1111 // $(ddlCompany).empty().append('<option selected="selected" value="">Select Company</option>'); 1112 // } 1113 // } 1114 // }); 1115 1116 // //alert("true"); 1117 // } 1118 // else { 1119 // $(this).val(false); 1120 1121 // var ddlCompany = $('#companyNameDD'); 1122 1123 // $(ddlCompany).empty().append('<option selected="selected" value="">Select Company</option>'); 1124 1125 // $(".companyNameTextBoxContainer").css('display', 'block'); 1126 // $('#companyNameTextBox').css('display', 'block'); 1127 1128 // $(".companyNameDDContainer").css('display', 'none'); 1129 // $("#companyNameDD").css('display', 'none'); 1130 1131 // $(".countryIDContainer").css('display', 'block'); 1132 // $(".weblinkContainer").css('display', 'block'); 1133 // $(".companyinfoContainer").css('display', 'block'); 1134 1135 // //if company not exits 1136 // //if (isCompanyExits == 0) { 1137 // // $("#countryID").prop("disabled", false); 1138 // // $("#companyEmail").prop("disabled", false); 1139 // // $("#companyContactNo").prop("disabled", false);; 1140 // // $("#website").prop("disabled", false);; 1141 // // $("#linkedIn").prop("disabled", false);; 1142 // // $("#companyInfo").prop("disabled", false); 1143 // // $("#companyNameTextBox").prop("disabled", false); 1144 // //} 1145 1146 // //alert("false"); 1147 // } 1148 //}); 1149 1150 //$("#companyNameDD").change(function () { 1151 1152 // var selectedValue = $("#companyNameDD option:selected").val(); 1153 1154 // console.log("selected Value:" + selectedValue); 1155 1156 // if (selectedValue != '') { 1157 // $.ajax({
1158 // type: "POST", 1159 // url: "/Ajax/GetCompanyDetails", 1160 // dataType: "json", 1161 // data: { "CompanyId": selectedValue }, 1162 // success: function (data) { 1163 1164 // console.log(data); 1165 // //console.log("domain:" + data.Domain); 1166 // //console.log("domain Name:"+domainName); 1167 1168 // if (data != "") { 1169 1170 // if (domainName != null && domainName != "" && domainName != 'undefined') { 1171 1172 // if (data.Domain != domainName) { 1173 1174 // domainNameDB = data.Domain; 1175 1176 // $(".isCompanyExistMessage").html("The selected Company Does Not Match your email domain. Please select an appropriate one."); 1177 1178 // $("#companyEmail").val(""); 1179 // $("#companyContactNo").val(""); 1180 // $("#website").val(""); 1181 // $("#linkedIn").val(""); 1182 // $("#companyInfo").val(""); 1183 1184 // } 1185 // else { 1186 1187 // domainNameDB = data.Domain; 1188 1189 // $(".isCompanyExistMessage").html(""); 1190 1191 // $("#countryID option").filter(function () { 1192 // return $(this).attr('value') == data.CountryId; 1193 // }).attr('selected', true); 1194 1195 // //$("#countryID option:selected").val(data.CountryId); 1196 // $("#companyEmail").val(data.Email1); 1197 // $("#companyContactNo").val(data.ContactPerson1); 1198 // $("#website").val(data.Website); 1199 // $("#linkedIn").val(data.LinkedIn); 1200 // $("#companyInfo").val(data.CompanyInfo); 1201 1202 // var mobileNo = "+" + data.countryCodecontact1 + data.ContactPerson1 1203 // console.log(mobileNo); 1204 1205 // //itiTwo.setNumber(mobileNo); 1206 // if (data.countryFlagContact1 != null) { 1207 // itiTwo.setCountry(data.countryFlagContact1); 1208 // }else{ 1209 // itiTwo.setCountry("us"); 1210 // } 1211 1212 1213 // //$("#companyContactNo").val(itiTwo.setNumber(mobileNo)); 1214 1215 // //$(".iti__selected-dial-code").val(data.countryCodecontact1); 1216 1217 // //var child0 = document.getElementsByClassName("iti__selected-dial-code"); 1218 // //child0[0].innerText = data.countryCodecontact1; 1219 1220 1221 // $("#companyInfo").closest("div").find(".field-validation-error").empty(); 1222 // $("#companyInfo").removeClass("input-validation-error"); 1223 1224 // $("#companyEmail").closest("div").find(".field-validation-error").empty(); 1225 // $("#companyEmail").removeClass("input-validation-error"); 1226 1227 // $("#companyContactNo").closest("div").find(".field-validation-error").empty(); 1228 // $("#companyContactNo").removeClass("input-validation-error"); 1229 1230 // $("#website").closest("div").find(".field-validation-error").empty(); 1231 // $("#website").removeClass("input-validation-error"); 1232 1233 // $("#linkedIn").closest("div").find(".field-validation-error").empty(); 1234 // $("#linkedIn").removeClass("input-validation-error"); 1235 1236 // $("#companyInfo").closest("div").find(".field-validation-error").empty(); 1237 // $("#companyInfo").removeClass("input-validation-error"); 1238 1239 // $("#companyNameTextBox").closest("div").find(".field-validation-error").empty(); 1240 // $("#companyNameTextBox").removeClass("input-validation-error"); 1241 1242 // $("#countryID").closest("div").find(".field-validation-error").empty(); 1243 // $("#countryID").removeClass("input-validation-error"); 1244 1245 // $("#companyNameTextBox").prop("disabled", "true"); 1246 // $("#countryID").prop("disabled", "true"); 1247 // $("#companyEmail").prop("disabled", "true"); 1248 // $("#companyContactNo").prop("disabled", "true"); 1249 // $("#website").prop("disabled", "true"); 1250 // $("#linkedIn").prop("disabled", "true"); 1251 // $("#companyInfo").prop("disabled", "true"); 1252 // } 1253 1254 // } else { 1255 // $(".isCompanyExistMessage").html("Please fill the Company Email."); 1256 // //console.log("domain is undefined"); 1257 // } 1258 1259 // } 1260 // else { 1261 1262 // } 1263 // } 1264 // }); 1265 // } 1266 //}); 1267 1268 1269 //$("#companyNameTextBox").focusout(function () { 1270 // isCompanyMatch(); 1271 //}); 1272 1273 //$("#companyEmail").focusout(function () { 1274 // isCompanyMatch(); 1275 //}); 1276 1277 //$('.newsTeam-wrap').on('mouseover', function () { 1278 // $(this).find('img').attr('src="~/css/images/', 'arrow-right-circle-white.svg'); 1279 //}); 1280 1281 //$('.newsTeam-wrap').on('mouseout', function () { 1282 // $(this).find('img').attr('src', 'css/images/arrow-right-circle.svg'); 1283 //}); 1284 1285 $('.nav-tabar').slick({ 1286 dots: false, 1287 infinite: false, 1288 prevArrow: "<img class='a-left control-c prev slick-prev' src='/css/images/arrow-left-circle.svg' id='prv'>", 1289 nextArrow: "<img class='a-right control-c next slick-next' src='/css/images/arrow-right-circleTwo.svg' id='nxt'>", 1290 slidesToShow: 4, 1291 slidesToScroll: 1, 1292 responsive: [{ 1293 breakpoint: 479, 1294 settings: { 1295 slidesToShow: 2, 1296 slidesToScroll: 1,
1297 arrows: false, 1298 dots: true, 1299 } 1300 }] 1301 }); 1302 1303 $('.nav-profileTab .nav-item .nav-link').click(function () { 1304 //alert(); 1305 console.log("click to tab"); 1306 var $href = $(this).attr('href'); 1307 console.log($href); 1308 1309 $(".nav-link ").removeClass('active'); 1310 $(this).toggleClass('active'); 1311 1312 //$($href).tab('show'); 1313 //$(".tab-pane").removeClass('active'); 1314 //$(".tab-pane").removeClass('show'); 1315 1316 //$($href).toggleClass('active'); 1317 //$($href).toggleClass('show'); 1318 1319 }); 1320 1321 //$(document).on('submit', 'form#registerForm', function () { 1322 1323 // //console.log(myRadioValue); 1324 1325 // var countryData = iti.getSelectedCountryData(); 1326 1327 1328 1329 // if (myRadioValue == 'individual') { 1330 // var password = $("#personalpassword").val(); 1331 // var confirmPassword = $("#txtConfirmPassword").val(); 1332 1333 // if (password != confirmPassword) { 1334 // return false; 1335 // } 1336 // else { 1337 // return true; 1338 // } 1339 1340 // } 1341 // else if (myRadioValue == 'company') { 1342 // var password = $("#companyUserPassword").val(); 1343 // var confirmPassword = $("#companyUserConfirmPassword").val(); 1344 1345 // if (password != confirmPassword) { 1346 // return false; 1347 // } 1348 // else { 1349 // return true; 1350 // } 1351 // } 1352 1353 1354 //}); 1355}); 1356 1357function IsValidImage(file) { 1358 //alert($(file).val()); 1359 var FileExtension = $(file).val().split('.')[1]; 1360 if (FileExtension === "jpg" || FileExtension === "jpeg" || FileExtension === "png" || FileExtension === "JPG" || FileExtension === "JPEG" || FileExtension === "PNG") { return true; } 1361 else { return false; } 1362} 1363 1364function appendVariantItem(imageName, count) { 1365 1366 var imageHTML = '<div class="divImage">' + 1367 '<input type="hidden" name="hf_image_' + count + '" value="' + imageName + '" />' + 1368 '<img src = "/Content/NominationDocument/' + imageName + '" alt = "nominationDocument" id = "MultiUploadedImage" height = "150" width = "150" />' + 1369 '<div class="divDeleteImage">' + 1370 '<span class="fa fa-trash"></span>' + 1371 '</div>' + 1372 '</div >'; 1373 1374 $(".divUploadedItemContainer").append(imageHTML); 1375} 1376 1377//function radioValue(jqRadioButton) { 1378// if (jqRadioButton.length) { 1379// myRadioValue = jqRadioButton.val(); 1380// } 1381// else { 1382// myRadioValue = 0; 1383// } 1384//} 1385 1386function isPasswordMatch() { 1387 var password = $("#personalpassword").val(); 1388 var confirmPassword = $("#txtConfirmPassword").val(); 1389 1390 if (password != confirmPassword) { 1391 $("#divCheckPassword").html("Passwords do not match!"); 1392 $("#divCheckPassword").css('color', '#AE0303'); 1393 } 1394 else { 1395 $("#divCheckPassword").html("Passwords match."); 1396 $("#divCheckPassword").css('color', '#21725E'); 1397 } 1398} 1399 1400function isPasswordMatchTwo() { 1401 var password = $("#companyUserPassword").val(); 1402 var confirmPassword = $("#companyUserConfirmPassword").val(); 1403 1404 if (password != confirmPassword) { 1405 $("#divCheckPasswordTwo").html("Passwords do not match!"); 1406 $("#divCheckPasswordTwo").css('color', '#AE0303'); 1407 } 1408 else { 1409 $("#divCheckPasswordTwo").html("Passwords match."); 1410 $("#divCheckPasswordTwo").css('color', '#21725E'); 1411 } 1412} 1413 1414//function isCompanyMatch() { 1415// var personalEmail = $("#companyEmail").val().trim(); 1416 1417// domainName = extract(personalEmail); 1418 1419// //console.log("domain:" + domainName); 1420 1421// $.ajax({
1422// type: "POST", 1423// url: "/Ajax/CheckCompanyByDomain", 1424// dataType: "json", 1425// data: { "domainName": domainName }, 1426// success: function (data) { 1427// //console.log("inside ajax function"); 1428// //console.log(data); 1429 1430// if (data == 'True') { 1431// $(".isCompanyExistMessage").html("The Company Exists.Please switch to yes and select from list."); 1432 1433// isCompanyExits = 1; 1434 1435// $("#companyNameTextBox").prop("disabled", "true"); 1436// $("#countryID").prop("disabled", "true"); 1437// $("#companyEmail").prop("disabled", "true"); 1438// $("#companyContactNo").prop("disabled", "true"); 1439// $("#website").prop("disabled", "true"); 1440// $("#linkedIn").prop("disabled", "true"); 1441// $("#companyInfo").prop("disabled", "true"); 1442// } 1443// }, 1444// error: function (XMLHttpRequest, textStatus, errorThrown) { 1445// console.log("Status: " + textStatus); console.log("Error: " + errorThrown); 1446// } 1447// }) 1448//} 1449 1450function clearForm(myFormElement) { 1451 1452 var elements = myFormElement.elements; 1453 1454 myFormElement.reset(); 1455 1456 for (i = 0; i < elements.length; i++) { 1457 1458 field_type = elements[i].type.toLowerCase(); 1459 1460 switch (field_type) { 1461 1462 case "text": 1463 case "password": 1464 case "textarea": 1465 case "hidden": 1466 1467 elements[i].value = ""; 1468 break; 1469 1470 case "radio": 1471 case "checkbox": 1472 if (elements[i].checked) { 1473 elements[i].checked = false; 1474 } 1475 break; 1476 1477 case "select-one": 1478 case "select-multi": 1479 elements[i].selectedIndex = -1; 1480 break; 1481 1482 default: 1483 break; 1484 } 1485 } 1486} 1487 1488function extract(str) { 1489 const suffix = str.match(/.+@(.+)/); 1490 if (suffix) { 1491 const groups = suffix.pop().split("."); 1492 const lastPart = groups[groups.length - 1]; 1493 //console.log(groups); 1494 //console.log(lastPart); 1495 //console.log(groups[0]); 1496 1497 return groups[0]; 1498 } 1499} 1500 1501function appendFileItem(data, imagePath, dataCount) { 1502 1503 var imageHTML = '<div id="downloadFiles_' + dataCount +'" class="downloadFile col-md-3">' + 1504 '<div class="row">' + 1505 '<div class="col-md-12">' + 1506 '<div class="divFileBoxTwo">' + 1507 '<a href="'+ imagePath + data + '" target="_blank" title="File">' + 1508 '<img src="/css/images/fileImage.svg" alt="FileImage" width="40" />' + 1509 '</a>' + 1510 '<div class="divDeleteFile divDeleteImage">' + 1511 '<span class="fa fa-trash"></span>' + 1512 '</div>' + 1513 '</div>' + 1514 '</div>' + 1515 '</div>' + 1516 '</div>'; 1517 1518 1519 1520 $("#nominationFileUploadContainer_" + dataCount).append(imageHTML); 1521} 1522 1523//const validateEmail = (email) => { 1524// return email.match( 1525// /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ 1526// ); 1527//}; 1528 1529//const validateUrl = (url) => { 1530// return url.match(/^((https?|ftp|smtp):\/\/)(www.)[a-z0-9]+\.[a-z]+(\/[a-zA-Z0-9#]+\/?)*$/); 1531//}; 1532 1533//const validatePasswordStrenth = (password) => { 1534// return password.match( 1535// /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,15}$/ 1536// ); 1537//}; 1538
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.