1//@prepros-prepend vendor/jquery-ui.min.js 2//@prepros-prepend vendor/bootstrap-progressbar.min.js 3//@prepros-prepend vendor/bootstrap.min.js 4//@prepros-prepend vendor/circles.min.js 5//@prepros-prepend vendor/jquery.cycle2.min.js 6//@prepros-prepend vendor/jquery.cycle2.swipe.min.js 7//@prepros-prepend vendor/jquery.sticky-kit.min.js 8//@prepros-prepend vendor/jquery.validate.min.js 9 10(function (window, document, $) { 11 'use strict'; 12 13 var colors = [ 14 ['#EEEEEE', '#3AABDB'], 15 ['#7fcfe4', '#ffffff'], 16 ['#e2f5fd', '#3aabdb'] 17 ], circles = []; 18 19 $(document).ready(function() { 20 21 //mobile menu collapse 22 $('.toogle-menu').click(function(e){ 23 e.preventDefault(); 24 $('#page-holder').toggleClass('open'); 25 $('.menu-mobile').css('min-height',$('body').height()+'px'); 26 }); 27 $('#user-info-mobile .top').click(function(){ 28 $('#user-info-mobile .user-info-sub').toggleClass('display'); 29 }); 30 31 //responsive table 32 $('.des table').each(function(){ 33 $(this).addClass('table').wrap('<div class="table-responsive"></div>'); 34 }); 35 36 single_step_ajax_checker(); 37 single_step_ajax_checker_demo(); 38 39 //progress circles 40 $('#mep-content .item .circle').each(function(){ 41 var thiss = $(this); 42 circles.push(Circles.create({ 43 id: thiss.attr('id'), 44 value: thiss.attr('data-percentage'), 45 radius: 40, 46 width: 12, 47 text: thiss.attr('data-text'), 48 colors: colors[thiss.attr('data-curr')], 49 duration: 700 50 })); 51 }); 52 53 $('#action-item-page .progress-cycle .circle').each(function(){ 54 var thiss = $(this); 55 circles.push(Circles.create({ 56 id: thiss.attr('id'), 57 value: thiss.attr('data-percentage'), 58 radius: 30, 59 width: 8, 60 text: thiss.attr('data-text'), 61 colors: colors[thiss.attr('data-curr')], 62 duration: 700 63 })); 64 }); 65 66 //gravity forms placeholder 67 $('#gform_1 ul li span').each(function(){ 68 $(this).find('input').attr('placeholder', $(this).find('label').text() ); 69 }); 70 $('#gform_4 #input_4_7_container span').each(function(){ 71 $(this).find('input').attr('placeholder', $(this).find('label').text() ); 72 }); 73 $('#gform_4 #input_4_6').attr('type', 'password'); 74 if($('#profile-pic').val()){ 75 $('#gform_4 #field_4_10 label').addClass('has-profile-pic').html('<img src="'+$('#profile-pic').val()+'" />'); 76 } 77 78 if($('#input_3_2, #input_3_3').length > 0){ 79 $('#input_3_2, #input_3_3').chosen(); 80 } 81 82 //open modal popup 83 if($('.modal.openmodal').length > 0){ 84 $('.modal.openmodal').modal('show'); 85 } 86 87 //login form placeholder attr 88 if($('#loginform').length > 0){ 89 $('#user_login').attr( 'placeholder', 'Email address' ); 90 $('#user_pass').attr( 'placeholder', 'Password' ); 91 } 92 93 //login form validate 94 $('#loginform').validate({ 95 rules: { 96 log: { 97 required: true, 98 minlength: 2 99 }, 100 pwd: { 101 required: true, 102 minlength: 2 103 }, 104 }, 105 errorElement: "div", 106 errorPlacement: function(error, element) { 107 element.after(error); 108 } 109 }); 110 111 //search form validate 112 $('#search-form').validate({ 113 rules: { 114 s: { 115 required: true, 116 minlength: 3 117 } 118 } 119 }); 120 $('#search-form-mobile').validate({ 121 rules: { 122 s: { 123 required: true, 124 minlength: 3 125 } 126 } 127 }); 128 $('#search-form-sidear').validate({ 129 rules: { 130 s: { 131 required: true, 132 minlength: 3 133 } 134 } 135 }); 136 137 //non account resources - fixed register bar 138 if(($('.banner-non-account-resources').length) > 0){ 139 var resourcesSidebar = $('.banner-non-account-resources'); 140 var scrollBottom = $(document).height() - $(window).height() - $(window).scrollTop(); 141 var footer_height = $('footer').height(); 142 var set_non_account_banner_resources = function() { 143 if(viewport().width > 991){ 144 resourcesSidebar.removeClass('bnar-mobile'); 145 var footer_height = $('footer').height(); 146 $(window).scroll(function() { 147 var scrollBottom = $(document).height() - $(window).height() - $(window).scrollTop(); 148 if(footer_height > scrollBottom ){ 149 resourcesSidebar.css('bottom',(footer_height-scrollBottom)+'px'); 150 } else { 151 resourcesSidebar.css('bottom','0px'); 152 } 153 }); 154 } else { 155 resourcesSidebar.addClass('bnar-mobile'); 156 } 157 } 158 set_non_account_banner_resources(); 159 $(window).resize(set_non_account_banner_resources); 160 } 161 162 //non account single blog - create account line 163 if(($('#single-non-account').length) > 0){ 164 var singleNonAccount = $('#single-non-account'); 165 var menuH = 60; 166 var open = false;
167 $(window).scroll(function() { 168 if( $(window).scrollTop() >= menuH && !open) { 169 singleNonAccount.slideToggle(150); 170 open = true; 171 } 172 if( $(window).scrollTop() <= menuH-20 && open) { 173 singleNonAccount.slideToggle(100); 174 open = false; 175 } 176 }); 177 } 178 179 180 data_vault_actions(); 181 182 183 //free user questionnaire pager 184 var current_page_temp = 2; 185 $(document).bind('gform_page_loaded', function(event, form_id, current_page){ 186 if(current_page_temp != current_page){ 187 $('#gform_page_16_'+current_page+' .gfield_label').addClass('minus'); 188 } 189 current_page_temp++; 190 191 //show cancel button 192 if(form_id==16 && current_page > 1){ 193 $('.questionnaire-cancel').show(); 194 } 195 196 var questionnaireSlider = $('.questionnaire-faq-slider'); 197 questionnaireSlider.hide(); 198 if(form_id==16 && current_page==1 ){ 199 questionnaireSlider.show(); 200 } 201 202 var questionnaireAutocomplete = $('.autocomplete-holder'); 203 questionnaireAutocomplete.hide(); 204 if(form_id==16 && current_page==3 ){ 205 questionnaireAutocomplete.show(); 206 } 207 208 }); 209 210 // Questionnaire confirmation - NOW HANDLED IN questionnaire.php template 211 // with the new "Building Your Plan" animation overlay 212 // Legacy code removed to prevent redirect conflicts 213 214 //registration confirmation page 215 if(($('body.page-template-registered').length) > 0){ 216 setTimeout(function(){ 217 window.location = siteUrl+'plan'; 218 }, 3000); 219 } 220 221 222 // Plan page - Wistia video 223 if(($('#plan-video-top').length) > 0){ 224 window._wq = window._wq || []; 225 _wq.push({ "plan-video": function(video) { 226 video.ready(function() { 227 var videoWidthSize = 446; 228 if((viewport().width-30) < videoWidthSize) { 229 videoWidthSize = viewport().width-30; 230 } 231 video.videoWidth(videoWidthSize, { constrain: true }); 232 if( (($('#demo-user-email').length) == 0) && (($('#must-pay-subscription').length) == 0) ){ 233 setTimeout(function(){ 234 $.ajax({ 235 type : 'POST', 236 url : ajaxurl, 237 data : { action: 'get_plan_video_play' }, 238 success: function(result) { 239 if(result !== '1'){ 240 video.play(); 241 $.ajax({ 242 type : 'POST', 243 url : ajaxurl, 244 data : { action: 'set_plan_video_play', nonce: (typeof executorCookieNonce !== 'undefined' ? executorCookieNonce.nonce : '') } 245 }); 246 } 247 } 248 }); 249 }, 1300); 250 } 251 $('#demo-user-email').on('hidden.bs.modal', function () { 252 setTimeout(function(){ 253 $.ajax({ 254 type : 'POST', 255 url : ajaxurl, 256 data : { action: 'get_plan_video_play' }, 257 success: function(result) { 258 if(result !== '1'){ 259 video.play(); 260 $.ajax({ 261 type : 'POST', 262 url : ajaxurl, 263 data : { action: 'set_plan_video_play', nonce: (typeof executorCookieNonce !== 'undefined' ? executorCookieNonce.nonce : '') } 264 }); 265 } 266 } 267 }); 268 }, 100); 269 }); 270 }); 271 }}); 272 } 273 274 init_wistia_video(); 275 276 277 // Plan page open/close video 278 if(($('#plan-video-top').length) > 0){ 279 280 $.ajax({ 281 type : 'POST', 282 url : ajaxurl, 283 data : { action: 'get_plan_video_hide' }, 284 success: function(result) { 285 if(result == '1'){ 286 $('#plan-video-top .with-video').slideDown(function(){ 287 setTimeout(function(){ 288 $('#plan-video-top .with-video').addClass('open'); 289 }, 300); 290 }); 291 $('#plan-video-top .text-only').slideUp('medium'); 292 } 293 } 294 }); 295 296 297 // Hide video 298 $('#plan-video-top .with-video .cta-bottom button').click(function(){
299 $('#plan-video-top .with-video').slideUp('fast'); 300 $('#plan-video-top .text-only').slideDown('fast'); 301 $.ajax({ 302 type : 'POST', 303 url : ajaxurl, 304 data : { action: 'set_plan_video_hide', status: 0, nonce: (typeof executorCookieNonce !== 'undefined' ? executorCookieNonce.nonce : '') } 305 }); 306 }); 307 308 // Show video 309 $('#plan-video-top .text-only .cta-bottom button').click(function(){ 310 $('#plan-video-top .with-video').slideDown('fast',function(){ 311 setTimeout(function(){ 312 $('#plan-video-top .with-video').addClass('open'); 313 }, 300); 314 }); 315 $('#plan-video-top .text-only').slideUp('fast'); 316 $.ajax({ 317 type : 'POST', 318 url : ajaxurl, 319 data : { action: 'set_plan_video_hide', status: 1, nonce: (typeof executorCookieNonce !== 'undefined' ? executorCookieNonce.nonce : '') } 320 }); 321 }); 322 } 323 324 325 // Data vault popup for non logged users 326 if( $('.dv-content-inner.not-logged').length > 0){ 327 $('.data-vault-form button').click(function(){ 328 $('#need-register-dvf').modal('show'); 329 return false; 330 }); 331 $('.data-vault-form input[type="text"]').keyup(function() { 332 if($(this).val().length > 3){ 333 $('#need-register-dvf').modal('show'); 334 } 335 }); 336 $('.data-vault-form').submit(function(e){ 337 $('#need-register-dvf').modal('show'); 338 return false; 339 }); 340 } 341 342 343 // CTA banner slide down 344 if( $('.single-plan .cta-banner-holder, .single-data-vault .cta-banner-holder').length > 0){ 345 setTimeout(function(){ 346 $('.cta-banner-holder').slideDown(); 347 }, 5000); 348 } 349 350 // plan page CTA banner show 351 if( $('.page-template-my-executor-plan .cta-banner-holder').length > 0){ 352 var cta_show = false; 353 $(window).scroll(function() { 354 if(!cta_show){ 355 if( $(window).scrollTop() > 400 ) { 356 $('.cta-banner-holder').fadeIn(); 357 cta_show = true; 358 } 359 } 360 }); 361 362 $('.cta-banner-holder .close-cta').click(function(e){ 363 e.preventDefault(); 364 $('.cta-banner-holder').fadeOut(function(){ 365 $(this).remove(); 366 }); 367 }); 368 } 369 370 // Action item Document integration 371 if($('.document-integration').length > 0){ 372 $('.document-integration select').on('change', function() { 373 $('.document-integration .line-inner').removeClass('active'); 374 $('.document-integration .line-'+$(this).val()).addClass('active'); 375 }); 376 } 377 378 // Disable all tracking 379 if(has_tracking=='no'){ 380 $('a').each(function(){ 381 var href = $(this).attr('href'); 382 $(this).attr('href',href+'?tracking=no'); 383 }); 384 } 385 386 387 //go to element animation 388 if($('.go-to-button').length > 0){ 389 $('.go-to-button').click(function(e){ 390 e.preventDefault(); 391 var position = $($(this).attr('href')).offset(); 392 if(position){ 393 $("html,body").animate({ scrollTop: (position.top) },800); 394 } 395 }); 396 } 397 398 399 // Fade in front page image overlay 400 //$('#home-v5-section1 .overlay').fadeIn(2000); 401 402 403 // Show all blog categpries 404 $('#more-blog-categories').click(function(){ 405 $(this).parent().addClass('full-height'); 406 }); 407 408 409 // Auto show banner - action item page - fourth view demo user 410 if(($('.non-account-non-step-1').length) > 0){ 411 var questionnaireID; 412 $.ajax({ 413 type : 'POST', 414 url : ajaxurl, 415 data : { action: 'get_questionnaire_ID' }, 416 success: function(result) { 417 console.log(result); 418 if(result > 0){ 419 questionnaireID = result; 420 $.ajax({ 421 type : 'POST', 422 url : ajaxurl, 423 data : { action: 'get_questionnaire_id_action_item', questionnaire_ID : questionnaireID, }, 424 success: function(result) { 425 if(result < 2){ 426 $('.non-account-non-step-1').remove(); 427 } 428 console.log(result); 429 if(($('.cta-banner-holder-pages-remaining').length) > 0){ 430 if(!result){ 431 $('.cta-banner-holder-pages-remaining .item-1').slideDown(); 432 } 433 if(result == 1){ 434 $('.cta-banner-holder-pages-remaining .item-2').slideDown(); 435 } 436 if(result > 1){ 437 $('.cta-banner-holder-pages-remaining .item-3').slideDown(); 438 } 439 } 440 } 441 }); 442 $.ajax({ 443 type : 'POST', 444 url : ajaxurl, 445 data : { action: 'set_questionnaire_id_action_item', questionnaire_ID : questionnaireID, } 446 }); 447 } 448 } 449 }); 450 } 451 452 }); 453 454 455 // Wistia video shortcode 456 function init_wistia_video(){ 457 if(($('.wistia-embed-holder').length) > 0){ 458 window._wq = window._wq || [];
459 _wq.push({ "wistia-des-video": function(video) { 460 video.ready(function() { 461 var videoWidthSize = video.videoWidth(); 462 if((viewport().width-30) < videoWidthSize) { 463 videoWidthSize = viewport().width-30; 464 } 465 video.videoWidth(videoWidthSize, { constrain: true }); 466 }); 467 }}); 468 } 469 } 470 471 472 $(document).bind('gform_post_render', function(){ 473 //wrap credit card Expired Date 474 if(($('#gform_wrapper_13').length) > 0){ 475 $('#input_13_1_2_month, #input_13_1_2_year').wrap('<div class="styled-select"></div>'); 476 } 477 if(($('#gform_wrapper_12').length) > 0){ 478 $('#input_12_4_2_month').wrap('<div class="styled-select styled-left"></div>'); 479 $('#input_12_4_2_year').wrap('<div class="styled-select styled-right"></div>'); 480 } 481 }); 482 483 484 //single step ajax checker 485 function single_step_ajax_checker(){ 486 $('.action-item-list ul li a .icon').click(function(e){ 487 e.preventDefault(); 488 if($(this).attr('data-registration')){ 489 window.location.href = $(this).attr('data-registration'); 490 } 491 }); 492 //logged in 493 $('.logged-in .action-item-list ul li a .icon, .logged-in .action-item-content .step-status .icon').click(function(e){ 494 e.preventDefault(); 495 var post_id = $(this).attr('data-post-id'); 496 var html_block = $('.logged-in .action-item-list ul #aih-'+post_id); 497 var stepStatus = $('.step-status-content #step-status-'+post_id); 498 var spanWidth = 0; 499 $.ajax({ 500 type : 'POST', 501 dataType : 'html', 502 url : ajaxurl, 503 data : { action: 'set_plan_status', post_id : post_id, spanWidth : spanWidth}, 504 success: function(result) { 505 html_block.toggleClass('completed'); 506 stepStatus.toggleClass('status-completed'); 507 $('.step-progress-bar').html(result); 508 509 var done_steps = $('.step-progress-bar span').length; 510 var all_steps = $('#action-items-count').text(); 511 512 $('.action-item-status .progress-num').text(done_steps); 513 514 $('#action-item-page .progress-cycle .circle').each(function(){ 515 var thiss = $(this); 516 circles.push(Circles.create({ 517 id: thiss.attr('id'), 518 value: (done_steps/all_steps)*100, 519 radius: 30, 520 width: 8, 521 text: done_steps+'/'+all_steps, 522 colors: colors[thiss.attr('data-curr')], 523 duration: 700 524 })); 525 }); 526 } 527 }); 528 }); 529 //not logged - animation 530 $('.non-logged-anim .action-item-list ul li a .icon, .non-logged-anim .action-item-content .step-status .icon').click(function(e){ 531 e.preventDefault(); 532 var post_id = $(this).attr('data-post-id'); 533 var html_block = $('.non-logged-anim .action-item-list ul #aih-'+post_id);; 534 var stepStatus = $('.step-status-content #step-status-'+post_id); 535 var spanWidth = 0; 536 537 stepStatus.toggleClass('status-completed'); 538 539 html_block.toggleClass('completed'); 540 if(html_block.hasClass('completed')){ 541 $('.step-progress-bar').prepend('<span style="width: '+spanWidth+'%;"></span>'); 542 } else { 543 $('.step-progress-bar').find('span:first').remove(); 544 } 545 546 var done_steps = $('.step-progress-bar span').length; 547 var all_steps = $('#action-items-count').text(); 548 549 $('.action-item-status .progress-num').text(done_steps); 550 551 $('#action-item-page .progress-cycle .circle').each(function(){ 552 var thiss = $(this); 553 circles.push(Circles.create({ 554 id: thiss.attr('id'), 555 value: (done_steps/all_steps)*100, 556 radius: 30, 557 width: 8, 558 text: done_steps+'/'+all_steps, 559 colors: colors[thiss.attr('data-curr')], 560 duration: 700 561 })); 562 }); 563 564 }); 565 } 566 567 //single step ajax checker DEMO 568 function single_step_ajax_checker_demo(){ 569 if(($('.demo-user .action-item-list ul').length) > 0){ 570 $('.demo-user .action-item-list ul li a .icon').click(function(e){ 571 e.preventDefault(); 572 if($(this).attr('data-registration')){ 573 window.location.href = $(this).attr('data-registration'); 574 } 575 }); 576 $('.demo-user .action-item-list ul li a .icon, .demo-user .action-item-content .step-status .icon').click(function(e){ 577 e.preventDefault(); 578 var post_id = $(this).attr('data-post-id'); 579 var html_block = $('.demo-user .action-item-list ul #aih-'+post_id); 580 var stepStatus = $('.step-status-content #step-status-'+post_id); 581 var spanWidth = 0; 582 $.ajax({ 583 type : 'POST', 584 dataType : 'html', 585 url : ajaxurl, 586 data : { action: 'set_plan_status_demo', post_id : post_id, spanWidth : spanWidth}, 587 success: function(result) { 588 html_block.toggleClass('completed'); 589 stepStatus.toggleClass('status-completed'); 590 $('.step-progress-bar').html(result); 591 592 var done_steps = $('.step-progress-bar span').length; 593 var all_steps = $('#action-items-count').text(); 594 595 $('.action-item-status .progress-num').text(done_steps); 596 597 $('#action-item-page .progress-cycle .circle').each(function(){ 598 var thiss = $(this); 599 circles.push(Circles.create({ 600 id: thiss.attr('id'), 601 value: (done_steps/all_steps)*100, 602 radius: 30, 603 width: 8, 604 text: done_steps+'/'+all_steps, 605 colors: colors[thiss.attr('data-curr')], 606 duration: 700 607 })); 608 }); 609 } 610 }); 611 }); 612 } 613 } 614 615 616 //window width 617 function viewport() { 618 var e = window, a = 'inner'; 619 if (!('innerWidth' in window )) { 620 a = 'client'; 621 e = document.documentElement || document.body; 622 } 623 return { width : e[ a+'Width' ] , height : e[ a+'Height' ] }; 624 } 625 626 627 //data vault 628 function data_vault_actions(){ 629 //data vault - expenses - funeral expenses 630 if(($('.fields-list-efe .add-line a.add').length) > 0){ 631 $('.fields-list-efe .add-line a.add').click(function(){ 632 $(this).hide().parent().prev().show(); 633 }); 634 $('.fields-list-efe .field-line .icon-remove').click(function(){ 635 $(this).parents('form').find('.save-form').attr('name','save-form'); 636 $(this).parents('.field-line').fadeOut(300, function(){ 637 $(this).find('input').val('-1').parents('form').submit(); 638 }); 639 }); 640 } 641 642 //data vault - contacts 643 if(($('#fields-list-c .add-line a.add').length) > 0){ 644 $('#fields-list-c .add-line a.add').click(function(){ 645 $(this).hide(); 646 $(this).parents('#fields-list-c').find('.add-new').show(); 647 //$('#fields-list-c .add-new').show(); 648 }); 649 } 650 651 //data vault - expenses - home related expenses 652 if(($('.fields-list-ehre').length) > 0){ 653 var fieldsListEhre = $('#fields-list-ehre'); 654 655 $('.fields-list-ehre').each(function(){ 656 var fieldsListEhre = $(this); 657 658 //add new 659 fieldsListEhre.find('.add-line a.add').click(function(){ 660 $(this).hide(); 661 $(this).parents('.fields-list-ehre').find('.add-new').show(); 662 //$('#fields-list-ehre .add-new').show(); 663 }); 664 665 //prev next 666 var month_list_length = fieldsListEhre.find('.header-line.top .month-list-holder .single-month').length; 667 var activeIndex; 668 var step = 4; 669 fieldsListEhre.find('.month-list-holder .move-next').click(function(){ 670 activeIndex = fieldsListEhre.find('.header-line.top .month-list-holder .single-month.active').index(); 671 if(month_list_length > activeIndex+1){ 672 fieldsListEhre.find('.month-list-holder').each(function(){ 673 $(this).find('.single-month.active').nextAll().slice(0,step).addClass('active'); 674 $(this).find('.single-month.active').first().removeClass('active'); 675 }); 676 } 677 }); 678 fieldsListEhre.find('.month-list-holder .move-prev').click(function(){ 679 activeIndex = fieldsListEhre.find('.header-line.top .month-list-holder .single-month.active').index(); 680 if(activeIndex > step-1){ 681 fieldsListEhre.find('.month-list-holder').each(function(){ 682 $(this).find('.single-month.active').prevAll().slice(0,step).addClass('active'); 683 $(this).find('.single-month.active').last().removeClass('active'); 684 }); 685 } 686 }); 687 688 var set_active_num_blocks = function(){ 689 step = 4; 690 if(viewport().width < 768){ 691 step = 1; 692 } 693 activeIndex = fieldsListEhre.find('.header-line.top .month-list-holder .single-month.active').index(); 694 if(!activeIndex){ 695 activeIndex = 0; 696 } else{ 697 activeIndex = activeIndex - step + 1; 698 } 699 fieldsListEhre.find('.month-list-holder').each(function(){ 700 $(this).find('.single-month').removeClass('active'); 701 $(this).find('.single-month').nextAll().andSelf().slice(activeIndex,(activeIndex+step)).addClass('active'); 702 }); 703 } 704 set_active_num_blocks(); 705 if(viewport().width > 767){ 706 $(window).resize(set_active_num_blocks); 707 } 708 709 //remove field 710 fieldsListEhre.find('.remove-line .icon-remove').click(function(){ 711 $(this).parents('form').find('.save-form').attr('name','save-form'); 712 $(this).parents('.content-line').fadeOut(300, function(){ 713 $(this).find('input').val('-1').parents('form').submit(); 714 }); 715 }); 716 }); 717 718 } 719 720 //data vault navigation 721 if(($('.dv-sidebar .sub-menu').length) > 0){ 722 $('.dv-sidebar .sub-menu').prepend('<li id="dv-toggle"></li>'); 723 $('.dv-sidebar .sub-menu .current-menu-item').each(function(){ 724 $(this).parent().find('#dv-toggle').text($(this).children('a').text()); 725 }); 726 $('.dv-sidebar .sub-menu #dv-toggle').click(function(){ 727 $(this).parent().children('li').not('#dv-toggle').toggle(); 728 }); 729 } 730 731 //data vault - timelog 732 if(($('.fields-list-timelog').length) > 0){ 733 $('.fields-list-timelog .add-line a.add').click(function(){ 734 $(this).parents('.fields-list-timelog').find('.add-new') 735 .clone() 736 .appendTo($('.fields-list-timelog .content-list')) 737 .show() 738 .removeClass('add-new') 739 .find('input').each(function(){ 740 $(this).attr('name',$(this).attr('name').replace('key',$('.fields-list-timelog .content-list .content-line').length-2)); 741 if($(this).hasClass('add-it-date')){ 742 $(this).datepicker(); 743 } 744 }); 745 }); 746 //remove field 747 $('.fields-list-timelog').find('.remove-line .icon-remove').click(function(){ 748 $(this).parents('form').find('.save-form').attr('name','save-form'); 749 $(this).parents('.content-line').fadeOut(300, function(){ 750 $(this).find('input').val('-1').parents('form').submit(); 751 }); 752 }); 753 } 754 755 //datepicker init 756 $('.it-date, .it-date-updated, .it-date-of-valuation').datepicker(); 757 758 759 //data vault - assents financial 760 if(($('#fields-financial').length) > 0){ 761 $('.fields-list-financial .add-line a.add').click(function(){ 762 $(this).hide(); 763 $(this).next().show(); 764 $(this).parent().prev('.add-new').show(); 765 }); 766 767 //remove field 768 $('#fields-financial').find('.remove-line .icon-remove').click(function(){ 769 $(this).parents('form').find('.save-form').attr('name','save-form'); 770 $(this).parents('.field-val').fadeOut(300, function(){ 771 $(this).find('input').val('-1').parents('form').submit(); 772 }); 773 }); 774 } 775 776 //data vault - assents non financial 777 if(($('#fields-non-financial').length) > 0){ 778 $('.fields-list-non-financial .add-line a.add').click(function(){ 779 $(this).hide(); 780 $(this).next().show(); 781 $(this).parent().prev('.add-new').show(); 782 }); 783 //remove field 784 $('#fields-non-financial').find('.remove-line .icon-remove').click(function(){ 785 $(this).parents('form').find('.save-form').attr('name','save-form'); 786 $(this).parents('.field-val').fadeOut(300, function(){ 787 $(this).find('input').val('-1').parents('form').submit(); 788 }); 789 }); 790 } 791 } 792}(window, document, jQuery));
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.