1$(document).ready( 2 function() { 3 4 // Configurator on category pages 5 $('#productConfiguration1').appendTo('.c-configurator-wrap').css( 6 'display', 'block'); 7 // Sizingtool on category pages 8 $('#productSizing1').appendTo('.c-sizing-wrap').css( 9 'display', 'block'); 10 11 // remove empty p-tags in .item__list 12 $('.item__list').find('p:empty').remove(); 13 14 // Accordion 15 $('.accordion-template').click(function() { 16 $(this).toggleClass('active'); 17 $(this).find('.accordion-body').slideToggle(function() { 18 }); 19 }); 20 21 // Carousel indicators show interval 22 setTimeout(function() { 23 $('.carousel-indicators').show(); 24 }, 100); 25 26 // Extra features on table 27 $('.js-btn-extra').click(function() { 28 $(this).toggleClass('icon-minus').toggleClass('icon-plus'); 29 }); 30 31 $(document).click(function(e) { 32 if (!$(e.target).is('#extra_features-popup *')) { 33 $('#extra_features-popup').collapse('hide'); 34 35 } 36 }); 37 38 // Text fading Page(Education) 39 if ($('.c-media__left').height() >= '759') { 40 $('.c-media__left').addClass('c-fade-bottom'); 41 $('.u-full_text').removeClass('hidden'); 42 } 43 44 // Table header hover 45 $("#productTable th, #document-table th, .c-table-sort th, #fairsTable th, #careerTable th").click(function() { 46 $(this).parent().children().removeClass("selected"); 47 $(this).parent().children('th:first-child').css('color','#333333'); 48 $(this).addClass("selected"); 49 }); 50 51 //Header text in one column, special case 52 $header = $(".category-teaser__description"); 53 if($header.html() && $header.html().length <= 250 ) { 54 $header.css({'height':'70px','column-fill':'auto'}); 55 } 56 57 // Change numbers to decimal numbers in a table 58 $('#document-table > tbody > tr').each(function() { 59 $(this).children('td.data-size').each(function(){ 60 var data = $(this).html(); 61 62 if(data.includes("KB")){ 63 data = parseInt(data); 64 data = (data/1024).toFixed(2); 65 $(this).html(data + " MB"); 66 } 67 }) 68 }); 69 70 //Reset Sortings 71 setInterval(function(){ 72 var sortableElements = $("#productTable ").clone(true); 73 $("#productTable thead th:first-child").click(function() { 74 $("#productTable").replaceWith(sortableElements); 75 // initShadow(); 76 }); 77 }, 1000); 78 79 80 //Decimal numbers in Product table 81 $('#productTable > tbody > tr, #productDetailsTable > tbody > tr').each(function() { 82 $(this).children('td.product_value').each(function(){ 83 var data = $(this).html(); 84 data = parseInt(data); 85 if(data > 999) { 86 data = (data/1000).toFixed(3); 87 $(this).html(data); 88 } 89 }) 90 }); 91 92 //get screen height for facets height 93 var height = $(window).height()-115; 94 $('.sticky_facets, .c-table-wrapper-product').css('max-height',height+'px'); 95 96 $(window).resize(function(){ 97 var height = $(window).height()-115; 98 $('.sticky_facets, .c-table-wrapper-product').css('max-height',height+'px'); 99 }); 100 101 102 $('#newPassword_').on("change paste keyup", function (event) { 103 checkAndRemovePasswordError(); 104 checkPaswordsMatch(); 105 var pwd = this.value; 106 if(pwd != ""){ 107 const forbiddenChars = ["ä","ö","ü","§"]; 108 109 var hasUppercase = (/[A-Z]/.test(pwd)); 110 var hasLowercase = (/[a-z]/.test(pwd)); 111 var hasSpecialChars = ( /[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(pwd)); 112 var hasNumber = pwd.match(/\d+/g); 113 var isAtLeast8 = pwd.length >= 8; 114 var containsForbiddenChar = forbiddenChars.some(v => pwd.includes(v)); 115 116 var result = ""; 117 118 if(!hasUppercase){ 119 result += document.getElementById('pwdValidationCapital').value; 120 } 121 if(!hasLowercase){ 122 result += document.getElementById('pwdValidationSmall').value; 123 } 124 if(!hasSpecialChars){ 125 result += document.getElementById('pwdValidationSpecial').value; 126 } 127 if(!hasNumber){ 128 result += document.getElementById('pwdValidationNumber').value; 129 } 130 if(!isAtLeast8){ 131 result += document.getElementById('pwdValidationLength').value; 132 } 133 if(containsForbiddenChar){ 134 result += document.getElementById('pwdValidationForbidden').value; 135 } 136 137 if(result!=""){ 138 result = document.getElementById('pwdValidationMinRequirements').value + result; 139 } 140 141 document.getElementById('pwdValidation').innerHTML = result; 142 document.getElementById('pwdValidation').classList.add('pwd_validation_label'); 143 } 144 else{ 145 document.getElementById('pwdValidation').innerHTML = ""; 146 document.getElementById('pwdValidation').classList.remove('pwd_validation_label'); 147 } 148 149 if(isAtLeast8 && result == ""){ 150 $.ajax({ 151 url: "validatePwd/" + pwd, 152 type: 'POST', 153 success: function (data, textStatus, jqXHR) { 154 if(data != ""){ 155 result = document.getElementById('pwdValidationMinRequirements').value + " " + document.getElementById('pwdValidationPast').value; 156 document.getElementById('pwdValidation').innerHTML = result; 157 document.getElementById('pwdValidation').classList.add('pwd_validation_label'); 158 } 159 }, 160 error: function (jqXHR, textStatus, errorThrown) { 161 } 162 }); 163 } 164 165 if(result == ""){ 166 var formGroupDiv = this.closest(".form-group"); 167 formGroupDiv.classList.remove("has-error"); 168 document.getElementById('changePwdSubmit').disabled = false;
169 } 170 else{ 171 var formGroupDiv = this.closest(".form-group"); 172 formGroupDiv.classList.add("has-error"); 173 document.getElementById('changePwdSubmit').disabled = true; 174 } 175 }); 176 177 $('#newPassword_').on("focusout", function (event) { 178 if(document.getElementById('pwdValidation').innerHTML != ""){ 179 var formGroupDiv = this.closest(".form-group"); 180 formGroupDiv.classList.add("has-error"); 181 document.getElementById('changePwdSubmit').disabled = true; 182 } 183 else{ 184 var formGroupDiv = this.closest(".form-group"); 185 formGroupDiv.classList.remove("has-error"); 186 document.getElementById('changePwdSubmit').disabled = false; 187 document.getElementById('pwdValidation').classList.remove('pwd_validation_label'); 188 } 189 }); 190 191 $('#checkNewPassword').on("change paste keyup", function (event) { 192 checkPaswordsMatch(); 193 }); 194 195 function checkPaswordsMatch(){ 196 var pwdRepeat = document.getElementById('checkNewPassword').value; 197 var pwd = document.getElementById('newPassword_').value; 198 199 if(pwdRepeat != ""){ 200 if(pwd == pwdRepeat){ 201 var formGroupDiv = document.getElementById('checkNewPassword').closest(".form-group"); 202 formGroupDiv.classList.remove("has-error"); 203 document.getElementById('changePwdSubmit').disabled = false; 204 document.getElementById('pwdRepeatValidation').innerHTML = document.getElementById('repeatPwdValidationMatch').value; 205 document.getElementById('pwdRepeatValidation').classList.add("password-match"); 206 document.getElementById('pwdRepeatValidation').classList.remove("password-not-match"); 207 } 208 else{ 209 var formGroupDiv = document.getElementById('checkNewPassword').closest(".form-group"); 210 formGroupDiv.classList.add("has-error"); 211 document.getElementById('changePwdSubmit').disabled = true; 212 document.getElementById('pwdRepeatValidation').innerHTML = document.getElementById('repeatPwdValidationNotMatch').value; 213 document.getElementById('pwdRepeatValidation').classList.add("password-not-match"); 214 document.getElementById('pwdRepeatValidation').classList.remove("password-match"); 215 } 216 } 217 else{ 218 var formGroupDiv = document.getElementById('checkNewPassword').closest(".form-group"); 219 formGroupDiv.classList.remove("has-error"); 220 document.getElementById('pwdRepeatValidation').innerHTML = ""; 221 } 222 } 223 224 function checkAndRemovePasswordError() { 225 let $helpBlock = $('.help-block'); 226 const $errorElement = $helpBlock.find('span'); 227 228 if ($errorElement.length) { 229 const originalHeight = $helpBlock.height; 230 $helpBlock.css('height', originalHeight + 'px'); 231 232 $errorElement.fadeOut("slow", function () { 233 $errorElement.remove(); 234 }); 235 $errorElement.parent().delay(600).animate({height: '0px'}, 300, function () { 236 $(this).css('height', ''); 237 }); 238 } 239 } 240 241 // Change numbers to decimal numbers in a table 242 /* 243 $('.item__price, .item__total, .cart-totals-right, .price, .subtotal, .totals, .details, .shipping, #delivery_method, .text-right').each(function() { 244 $value = $(this).html(); 245 $(this).html($value.replace(',','.')); 246 }); 247 248 $('.item__total_price').each(function() { 249 $value = $(this).html(); 250 $(this).html($value.replace(',','.')); 251 }); 252 */ 253 254 // set style if tiles container has 4 grids 255 $('.cms-tile-container').each(function() { 256 if($('.cms-tile-container li').hasClass('col-lg-3')) { 257 $('.cms-tile-container .c-img_w').css({'height':'170px','width':'auto','margin':'auto'}) 258 console.log('yes'); 259 } 260 }) 261 262 // style 1st column 263 $('#productTable > tbody > tr').hover(function() { 264 $(this).children('.c-header-product-fixed').css('background','rgb(241, 247, 232)'); 265 }, function(){ 266 $(this).children('.c-header-product-fixed').css('background','inherit'); 267 }); 268 269 270 if($("#productTable").length ){ 271 $('[data-toggle="categoryToolTip"]').tooltip({html:true}); 272 } 273 274 275 var emptyRecordsMessage = ""; 276 if (document.getElementById('emptyRecordsMessage') != null){ 277 emptyRecordsMessage = document.getElementById('emptyRecordsMessage').value; 278 } 279 280 // DataTables Search Panes 281 $('#careerTable').DataTable( { 282 searchPanes:{ 283 hideCount: true, 284 columns:[3,1], 285 controls: false, 286 layout: 'columns-4', 287 threshold: 1, 288 289 }, 290 dom: 'Pfrtip', 291 paging: false, 292 "language": { 293 "zeroRecords": emptyRecordsMessage 294 }, 295 "order":[], 296 columnDefs: [ 297 { 298 searchPanes: { 299 className: 'customSearchPane' 300 }, 301 targets: [3,1] 302 } 303 ] 304 305 }); 306 307 $(".dtsp-panesContainer").appendTo("#filterPane"); 308 309 310 });
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.