1// ------------register-steps--------------// 2$(document).ready(function () { 3 4 5 $('.nav-tabs > li a[title]').tooltip(); 6 //Wizard 7 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 8 var $target = $(e.target); 9 if ($target.hasClass('disabled')) { 10 return false; 11 } 12 13 // handle with prgressbar 14 var step = $(e.target).data('step'); 15 var become_a_practitioner_url = diverseekData.root_url + '/practitioners/'; 16 var job_form_url = diverseekData.root_url + '/post-a-dei-job/'; 17 var current_url = location.protocol + '//' + location.host + location.pathname; 18 console.log('become_a_practitioner_url', become_a_practitioner_url); 19 console.log('current_url', current_url); 20 if (become_a_practitioner_url == current_url) { 21 var percent = (parseInt(step) / 4) * 100; 22 $('.progress-bar').css({ width: percent + '%' }); 23 $('.progress-bar').text('Step ' + step + ' of 4'); 24 } 25 if (job_form_url == current_url) { 26 var percent = (parseInt(step) / 3) * 100; 27 $('.progress-bar').css({ width: percent + '%' }); 28 $('.progress-bar').text('Step ' + step + ' of 3'); 29 } 30 31 }); 32 33 $('a[data-toggle="tab"]').on('show.bs.tab', function (e) { 34 var $target = $(e.target); 35 $target.parent().addClass('active'); 36 }); 37 38 $('a[data-toggle="tab"]').on('hide.bs.tab', function (e) { 39 var $target = $(e.target); 40 $target.parent().removeClass('active'); 41 }); 42 43 44 $(".next-step").on('click', function (e) { 45 var step_number = $('.wizard .nav-tabs li a.active span').text(); 46 if(contact_form_validation(step_number)==true) 47 { 48 var $active = $('.wizard .nav-tabs li a.active'); 49 $active.parent().next().children().removeClass('disabled'); 50 $active.parent().addClass('done'); 51 nextTab($active); 52 } 53 else{ 54 console.log('failed'); 55 } 56 }); 57 58 59 $(".next-step-job-form").on('click', function (e) { 60 var step_number = $('.wizard .nav-tabs li a.active span').text(); 61 if(job_form_validation(step_number)==true) 62 { 63 var $active = $('.wizard .nav-tabs li a.active'); 64 $active.parent().next().children().removeClass('disabled'); 65 $active.parent().addClass('done'); 66 nextTab($active); 67 } 68 else{ 69 e.preventDefault(); 70 } 71 }); 72 73 $(".prev-step").on('click' , function (e) { 74 var $active = $('.wizard .nav-tabs li a.active'); 75 prevTab($active); 76 }); 77 78 // job-filter-search-active-unactive-js 79 $(".user-active-btn").click(function () { 80 $(".user-active-btn").find('.active-user-section').removeClass("active-user-section"); 81 $(this).find('.user-section').addClass("active-user-section"); 82 }); 83 // show responsive job details section js 84 // $(".user-active-responsive-btn").click(function(){ 85 // $(".responsive-job-details-section").toggle(); 86 // }); 87 // hide responsive job details section js 88 $(".hide-responsive-cancel-job-details-section").click(function(){ 89 $(".responsive-job-details-section").removeClass('job-details-section-popup-add-class'); 90 }); 91 92}); 93 94function nextTab(elem) { 95 $(elem).parent().next().find('a[data-toggle="tab"]').trigger('click'); 96} 97function prevTab(elem) { 98 $(elem).parent().prev().find('a[data-toggle="tab"]').trigger('click'); 99} 100 101$(document).ready(function(e) { 102 103 // owl carousel slider 104 var owl = $('.user-button-slider'); 105 owl.owlCarousel({ 106 margin:15, 107 108 navText: ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"], 109 110 111 // autoplay:true, 112 autoPlaySpeed:1200, 113 autoplayTimeout:3700, 114 // smartSpeed:3000, 115 116 responsive: { 117 0: { 118 items: 2, 119 dots:false, 120 nav:false, 121 center:true, 122 loop:true, 123 }, 124 600: { 125 items:3, 126 dots:false, 127 nav:false, 128 center:true, 129 loop:true, 130 }, 131 1000: { 132 items:5, 133 dots:false, 134 nav:true, 135 loop:false, 136 } 137 } 138 }); 139 140 // details page accordian js 141 const acc = document.getElementsByClassName("details-accordion"); 142 let i; 143 144 for (i = 0; i < acc.length; i++) { 145 acc[i].addEventListener("click", function() { 146 const panel = this.nextElementSibling; 147 if (panel.style.maxHeight) { 148 panel.style.maxHeight = null; 149 panel.classList.remove("open"); 150 this.setAttribute('aria-expanded',"false") 151 } else { 152 let active = document.querySelectorAll(".details-accordion.active"); 153 // for(let j = 0; j < active.length; j++){ 154 // active[j].classList.remove("active"); 155 // active[j].setAttribute('aria-expanded',"false") 156 // active[j].nextElementSibling.style.maxHeight = null; 157 // active[j].nextElementSibling.classList.remove("open"); 158 // } 159 panel.style.maxHeight = panel.scrollHeight + "px"; 160 panel.classList.add("open"); 161 this.setAttribute('aria-expanded',"true") 162 } 163 this.classList.toggle("active"); 164 165 }); 166 } 167 168}); 169 170function contact_form_validation(step_number){
171 var valid = true; 172 if(step_number == 1) 173 { 174 var name_of_the_business = $('#main_form').find('#name_of_the_business').val(); 175 var contact_name = $('#main_form').find('#contact_name').val(); 176 //var title = $('#main_form').find('#title').val(); 177 if(name_of_the_business == ""){ 178 $('#main_form').find('#name_of_the_business').css('border-color', 'red'); 179 valid=false; 180 }else{ 181 $('#main_form').find('#name_of_the_business').css('border-color', ''); 182 } 183 if(contact_name == ""){ 184 $('#main_form').find('#contact_name').css('border-color', 'red'); 185 valid=false; 186 }else{ 187 $('#main_form').find('#contact_name').css('border-color', ''); 188 } 189 // if(title == ""){ 190 // $('#main_form').find('#title').css('border-color', 'red'); 191 // valid=false; 192 // }else{ 193 // $('#main_form').find('#title').css('border-color', ''); 194 // } 195 return valid; 196 197 } 198 if(step_number == 2) 199 { 200 var address_line_1 = $('#main_form').find('#address_line_1').val(); 201 var address_line_2 = $('#main_form').find('#address_line_2').val(); 202 var email = $('#main_form').find('#email').val(); 203 //var mobno = $('#main_form').find('#mobno').val(); 204 var filter = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i; 205 var phone_number_filter = /^\d*(?:\.\d{1,2})?$/; 206 if(address_line_1 == ""){ 207 $('#main_form').find('#address_line_1').css('border-color', 'red'); 208 valid=false; 209 }else{ 210 $('#main_form').find('#address_line_1').css('border-color', ''); 211 } 212 // if(address_line_2 == ""){ 213 // $('#main_form').find('#address_line_2').css('border-color', 'red'); 214 // valid=false; 215 // }else{ 216 // $('#main_form').find('#address_line_2').css('border-color', ''); 217 // } 218 if(email == ""){ 219 $('#main_form').find('#email').css('border-color', 'red'); 220 valid=false; 221 }else if(!filter.test(email)){ 222 $('#main_form').find('#email').css('border-color', 'red'); 223 valid=false; 224 } 225 else{ 226 $('#main_form').find('#email').css('border-color', ''); 227 } 228 // if(mobno == ""){ 229 // $('#main_form').find('#mobno').css('border-color', 'red'); 230 // valid=false; 231 // }else if(!phone_number_filter.test(mobno)){ 232 // $('#main_form').find('#mobno').css('border-color', 'red'); 233 // valid=false; 234 // } 235 // else{ 236 // $('#main_form').find('#mobno').css('border-color', ''); 237 // } 238 return valid; 239 240 } 241 if(step_number == 3) 242 { 243 return valid; 244 245 } 246 if(step_number == 4) 247 { 248 var business_description = $('#main_form').find('#business_description').val();
249 var mini_description = $('#main_form').find('#mini_description').val(); 250 if(business_description == ""){ 251 $('#main_form').find('#business_description').css('border-color', 'red'); 252 valid=false; 253 }else{ 254 $('#main_form').find('#business_description').css('border-color', ''); 255 } 256 if(mini_description == ""){ 257 $('#main_form').find('#mini_description').css('border-color', 'red'); 258 valid=false; 259 }else{ 260 $('#main_form').find('#mini_description').css('border-color', ''); 261 } 262 return valid; 263 264 } 265 if(step_number == 5) 266 { 267 return valid; 268 269 } 270} 271 272function job_form_validation(step_number){ 273 var valid = true; 274 var filter = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i; 275 var phone_number_filter = /^\d*(?:\.\d{1,2})?$/; 276 var full_name = $('#job_form').find('#full_name').val(); 277 if(full_name == ""){ 278 $('#job_form').find('#full_name').css('border-color', 'red'); 279 valid=false; 280 }else{ 281 $('#job_form').find('#full_name').css('border-color', ''); 282 } 283 var email = $('#job_form').find('#email').val(); 284 if(email == ""){ 285 $('#job_form').find('#email').css('border-color', 'red'); 286 valid=false; 287 }else if(!filter.test(email)){ 288 $('#job_form').find('#email').css('border-color', 'red'); 289 valid=false; 290 } 291 else{ 292 $('#job_form').find('#email').css('border-color', ''); 293 } 294 var mobno = $('#job_form').find('#mobno').val(); 295 if(mobno == ""){ 296 $('#job_form').find('#mobno').css('border-color', 'red'); 297 valid=false; 298 } 299 else{ 300 $('#job_form').find('#mobno').css('border-color', ''); 301 } 302 303 304 var company_name = $('#job_form').find('#company_name').val(); 305 if(company_name == ""){ 306 $('#job_form').find('#company_name').css('border-color', 'red'); 307 valid=false; 308 }else{ 309 $('#job_form').find('#company_name').css('border-color', ''); 310 } 311 var company_website = $('#job_form').find('#company_website').val(); 312 if(company_website == ""){ 313 $('#job_form').find('#company_website').css('border-color', 'red'); 314 valid=false; 315 }else{ 316 $('#job_form').find('#company_website').css('border-color', ''); 317 } 318 319 320 var job_title = $('#job_form').find('#job_title').val(); 321 if(job_title == ""){ 322 $('#job_form').find('#job_title').css('border-color', 'red'); 323 valid=false; 324 }else{ 325 $('#job_form').find('#job_title').css('border-color', ''); 326 } 327 var job_type = $('#job_form').find('#job_type').find(":selected").val(); 328 if(job_type == ""){ 329 $('#job_form').find('#job_type').css('border-color', 'red'); 330 valid=false; 331 }else{ 332 $('#job_form').find('#job_type').css('border-color', ''); 333 } 334 var country = $('#job_form').find('#country').find(":selected").val(); 335 if(country == ""){ 336 $('#job_form').find('#country').css('border-color', 'red'); 337 valid=false; 338 }else{ 339 $('#job_form').find('#country').css('border-color', ''); 340 } 341 var job_mode = $('._job_mode:checkbox:checked').length; 342 if(job_mode < 1){ 343 $('#job_form').find('#job_mode').show(); 344 valid=false; 345 }else{ 346 $('#job_form').find('#job_mode').hide(); 347 } 348 var job_mode = $('#job_form').find('#job_mode').val(); 349 var hybrid_details = $('#job_form').find('#hybrid_details').val(); 350 if(job_mode == "Hybrid"){ 351 if (hybrid_details == "") { 352 $('#job_form').find('#hybrid_details').css('border-color', 'red'); 353 valid=false; 354 }else{ 355 $('#job_form').find('#hybrid_details').css('border-color', ''); 356 } 357 } 358 // var div_job_description = tinymce.activeEditor.getContent(); 359 // if(div_job_description == ""){ 360 // $('#job_form').find('.tox-tinymce').css('border-color', 'red'); 361 // valid=false; 362 // }else{ 363 // $('#job_form').find('.tox-tinymce').css('border-color', ''); 364 // } 365 var applicant_email = $('#job_form').find('#applicant_email').val(); 366 var job_description = $('#job_form').find('#job_description').val(); 367 if(job_description == ""){ 368 $('#job_form').find('#job_description').css('border-color', 'red'); 369 valid=false; 370 }else{ 371 $('#job_form').find('#job_description').css('border-color', ''); 372 } 373 return valid; 374 375 376} 377 378$("#copy_practitioner_details").click(function(){ 379 $('#copy-btn-Modal').modal('show'); 380}); 381 382$(document).ready(function(){ 383 $("div.directorist-checkbox input[type='checkbox']").attr('checked','checked'); 384 $("div.directorist-checkbox input[type='checkbox']").on('click', function(e) { 385 e.preventDefault(); 386 return false;
387 }); 388})
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.