1jQuery(document).ready(function($) { 2 $('.column-match').matchHeight({ 3 byRow: true, 4 property: 'height', 5 target: $('.match-target'), 6 remove: false 7 }); 8 9 $('.column-match-la').matchHeight({ 10 byRow: true, 11 property: 'height', 12 target: $('.match-target-la'), 13 remove: false 14 }); 15 16 $('.column-match-ny').matchHeight({ 17 byRow: true, 18 property: 'height', 19 target: $('.match-target-ny'), 20 remove: false 21 }); 22 23 $('.column-match-sw').matchHeight({ 24 byRow: true, 25 property: 'height', 26 target: $('.match-target-sw'), 27 remove: false 28 }); 29 30 /*$('.app-block').matchHeight({ 31 byRow: true, 32 property: 'height', 33 target: null, 34 remove: false 35 });*/ 36 37 $('.woocommerce-LoopProduct-link > p').matchHeight({ 38 byRow: true, 39 property: 'height', 40 target: null, 41 remove: false 42 }); 43 44 45 if(jQuery('.nf-form-cont').length) { 46 47 // Limit Lease checkbox for max 5 selected items 48 var myListController = Marionette.Object.extend({ 49 50 initialize: function() { 51 52 // Listen to the value change for Checkbox List fields. 53 this.listenTo( Backbone.Radio.channel( 'listcheckbox' ), 'change:modelValue', this.onChangeModelValue ); 54 }, 55 56 onChangeModelValue: function( fieldModel ) { 57 58 // Use the field key to check for a specific field. 59 // The field key can be set/checked in the field's settings (under the Administration section). 60 if( 'select_robot_model_s_for_demo_quote_1749830900195' == fieldModel.get( 'key' ) ) { 61 // Set the limit of options to select. 62 var limit = 3; 63 64 var value = fieldModel.get( 'value' ); 65 66 _.each( fieldModel.get( 'options' ), function( option ){ 67 68 // If the option is not selected and the limit has been reached... 69 if( ! value.includes( option.value ) && Array.isArray( value ) && limit <= value.length ){ 70 71 // Disable the unselected option. 72 jQuery( '#nf-field-' + fieldModel.get( 'id' ) + '-' + option.index ).attr( 'disabled', 'disabled' ); 73 } else { 74 75 // Enable the option, selected or not. 76 jQuery( '#nf-field-' + fieldModel.get( 'id' ) + '-' + option.index ).attr( 'disabled', false ); 77 } 78 }); 79 } 80 if( 'select_lease_item_s_-_up_to_5_1531429761096' !== fieldModel.get( 'key' ) ) return; 81 82 // Set the limit of options to select. 83 var limit = 5; 84 85 var value = fieldModel.get( 'value' ); 86 87 _.each( fieldModel.get( 'options' ), function( option ){ 88 89 // If the option is not selected and the limit has been reached... 90 if( ! value.includes( option.value ) && Array.isArray( value ) && limit <= value.length ){ 91 92 // Disable the unselected option. 93 jQuery( '#nf-field-' + fieldModel.get( 'id' ) + '-' + option.index ).attr( 'disabled', 'disabled' ); 94 } else { 95 96 // Enable the option, selected or not. 97 jQuery( '#nf-field-' + fieldModel.get( 'id' ) + '-' + option.index ).attr( 'disabled', false ); 98 } 99 }); 100 } 101 102 }); 103 104 new myListController(); 105 106 var initCounter = 0; 107 108 // Adding images to Lease checkboxes 109 var leaseImages = Marionette.Object.extend({ 110 initialize: function() { 111 // init listener 112 this.listenTo( Backbone.Radio.channel( 'form' ), 'render:view', this.initAction ); 113 114 }, 115 116 // init action 117 initAction: function() { 118 if (initCounter == 0) { 119 jQuery.getJSON( "/wp-content/themes/autec/lease-images-callback.json", function( data ) { 120 var counter = 0; 121 console.log(data); 122 123 jQuery('.lease-items ul li').each(function () { 124 var element = jQuery(this); 125 126 jQuery("<img/>").attr("src", data[counter].link).prependTo(element); 127 jQuery(element).find('img').wrap('<div class="lease-img"></div>'); 128 129 counter++; 130 }) 131 });
132 initCounter++; 133 } 134 } 135 136 }); 137 138 new leaseImages(); 139 140 // Adding images to Lease checkboxes 141 var initHartCounter = 0; 142 143 var hartImages = Marionette.Object.extend({ 144 initialize: function() { 145 // init listener 146 this.listenTo( Backbone.Radio.channel( 'form' ), 'render:view', this.initHartAction ); 147 148 }, 149 150 // init action 151 initHartAction: function() { 152 if (initHartCounter == 0) { 153 jQuery.getJSON( "/wp-content/themes/autec/hart-images-callback.json", function( data ) { 154 var counter = 0; 155 console.log(data); 156 157 jQuery('.hart-items ul li').each(function () { 158 var element = jQuery(this); 159 160 jQuery("<img/>").attr("src", data[counter].link).prependTo(element); 161 jQuery(element).find('img').wrap('<div class="lease-img"></div>'); 162 163 counter++; 164 }) 165 }); 166 initHartCounter++; 167 } 168 } 169 170 }); 171 172 new hartImages(); 173 174 175 } 176 177});
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.