1$.fn.init_smart = function(optionen) 2{ 3 $(document.body).on('click','#gewaehrOpener',function() { 4 $("#gewaehrModal").show(); 5 }); 6 7 $(document.body).on('click','.customerStateGuest',function() { 8 if ($(this).val() == 1) { 9 $("#customerLogin").hide(); 10 } else { 11 $("#customerLogin").show(); 12 } 13 }); 14 $(document.body).on('change','#customerType',function() { 15 if ($(this).val() != 'firma') { 16 $(".business_input").hide(); 17 } else { 18 if ($("#action").val() == "saveBaseData") 19 $(".business_input").css('display', 'flex'); 20 else 21 $(".business_input").show(); 22 } 23 }); 24 $(document.body).on('click','#delivery-address-is-billing-address',function() { 25 if ($(this).is(':checked')) { 26 $("#deliveryAddress").hide(); 27 } else { 28 $("#deliveryAddress").show(); 29 } 30 }); 31 $(document.body).on('click','#ccParallel',function() { 32 if ($(this).is(':checked')) { 33 $("#cc_parallel_info").show(); 34 if ($("#combiCardParallelPortingPossible").val() == 1) 35 $("#init_porting_selection").show(); 36 else 37 $("#init_porting_selection").hide(); 38 } else { 39 $("#cc_parallel_info").hide(); 40 $("#init_porting_selection").show(); 41 } 42 }); 43 44 $(document.body).on('change','#idType',function() { 45 $type = $(this).val(); 46 $(".persoimage").hide(); 47 $(".persoimage-"+$type).show(); 48 }); 49 $(document.body).on('change','#nationalityInput',function() { 50 $selection = $('#idType option:selected').val(); 51 if ($(this).val() == 'DE') { 52 $("#idType option[value=sonst]").hide(); 53 $("#idType option[value=neu]").show(); 54 $("#idType option[value=alt]").show(); 55 $("#idType option[value=pass]").show(); 56 if ($selection == "sonst") 57 $("#idType").val(""); 58 } else { 59 $("#idType option[value=sonst]").show(); 60 $("#idType option[value=neu]").hide(); 61 $("#idType option[value=alt]").hide(); 62 $("#idType option[value=pass]").hide(); 63 if ($selection != "sonst") 64 $("#idType").val(""); 65 } 66 }); 67 68 69 $reloadContractDetail = function ($productId,$magenta1,$contractType) { 70 var $param="case=detail_contract&productId="+$productId+"&magenta1="+$magenta1+"&contractType="+$contractType; 71 $.ajax({ 72 type:"POST", 73 url:'/ajax_frontend.php', 74 data:$param, 75 dataType:"json", 76 async:true, 77 success:function(msg){ 78 $("#detail").html(msg.html); 79 }, 80 complete:function(transport){}, 81 error:function(){}}); 82 } 83 $(document.body).on('click','.trigger_contract_detailpage',function() { 84 $productId = $("#productId").val(); 85 $contractType = $("#contractType").val(); 86 $magenta1 = $('#magenta1').is(':checked'); 87 $reloadContractDetail($productId,$magenta1,$contractType); 88 }); 89 90 $(document.body).on('click','#dsl-type-new',function() { 91 if ($(this).is(':checked')) 92 $("#dslExisting").hide(); 93 }); 94 $(document.body).on('click','#dsl-type-existing',function() { 95 if ($(this).is(':checked')) 96 $('#dslExisting').show(); 97 }); 98 99 100 $reloadHardwareDetail = function ($productId,$techId,$colorId,$withoutContract,$useYoung,$usePrivate,$asVVL,$asNV,$magenta1,$withoutPrice,$contractId,$contractType) { 101 var $param="case=detail_hardware&productId="+$productId+"&withoutContract="+$withoutContract+"&techId="+$techId+"&colorId="+$colorId+"&useYoung="+$useYoung+"&usePrivate="+$usePrivate+"&asVVL="+$asVVL+"&asNV="+$asNV+"&magenta1="+$magenta1+"&useContractId="+$contractId+"&contractType="+$contractType; 102 $.ajax({ 103 type:"POST", 104 url:'/ajax_frontend.php', 105 data:$param, 106 dataType:"json", 107 async:true, 108 success:function(msg){ 109 $("#detail").html(msg.html); 110 }, 111 complete:function(transport){}, 112 error:function(){}}); 113 } 114 115 $(document.body).on('click','.adressvorschlag',function() { 116 $vorschlag_id = $(this).val(); 117 var $param="case=adressvorschlag&vorschlag_id="+$vorschlag_id; 118 $.ajax({ 119 type:"POST", 120 url:'/ajax_frontend.php', 121 data:$param, 122 dataType:"json", 123 async:true, 124 success:function(msg){ 125 $("#customer_zip").val(msg.zip); 126 $("#customer_city").val(msg.city); 127 $("#customer_street").val(msg.street); 128 $("#customer_number").val(msg.houseNumber); 129 }, 130 complete:function(transport){}, 131 error:function(){}}); 132 }); 133 134 $(document.body).on('click','.trigger_hardware_detailpage',function() { 135 $productId = $("#productId").val(); 136 $contractId = $("#contractId").val(); 137 $contractType = $("#contractType").val(); 138 $withoutContract = $('input[name=without-contract]:checked').val(); 139 $useYoungActive = $("#use_young").is(':checked'); 140 if ($useYoungActive) 141 $useYoung = $("#use_young").val(); 142 else 143 $useYoung = 0; 144 $usePrivateActive = $("#use_privat").is(':checked'); 145 if ($usePrivateActive) 146 $usePrivate = $("#use_privat").val(); 147 else 148 $usePrivate = 0; 149 $asVVLAvtive = $("#vvl").is(':checked'); 150 if ($asVVLAvtive) 151 $asVVL = 1; 152 else 153 $asVVL = 0; 154 $asNVAvtive = $("#nv").is(':checked'); 155 if ($asNVAvtive) 156 $asNV = 1; 157 else 158 $asNV = 0; 159 $magenta1 = $('#magenta1').is(':checked'); 160 $techId = $('input[name=capacity]:checked', '#detailcontent').val(); 161 $colorId = $('input[name=color]:checked', '#detailcontent').val(); 162 $reloadHardwareDetail($productId,$techId,$colorId,$withoutContract,$useYoung,$usePrivate,$asVVL,$asNV,$magenta1,0,$contractId,$contractType); 163 }); 164 165 166 $reloadHardwareItem = function ($productId,$techId,$colorId,$withoutContract,$withoutPrice,$contractId,$contractType,$finder) { 167 var $param="case=list_item_hardware&productId="+$productId+"&withoutContract="+$withoutContract+"&withoutPrice="+$withoutPrice+"&techId="+$techId+"&c
167olorId="+$colorId+"&contractId="+$contractId+"&contractType="+$contractType+"&finder="+$finder; 168 $.ajax({ 169 type:"POST", 170 url:'/ajax_frontend.php', 171 data:$param, 172 dataType:"json", 173 async:true, 174 success:function(msg){ 175 $("#container-listitem-"+$productId).html(msg.html); 176 }, 177 complete:function(transport){}, 178 error:function(){}}); 179 } 180 181 $(document.body).on('click','.trigger_hardware_capacity',function() { 182 $activeForm = $(this).closest('form'); 183 $productId = $activeForm.attr('name'); 184 $activeFormId = $activeForm.attr("id"); 185 $withoutContract = $('input[name=no-tarif]:checked').val(); 186 $colorId = $('input[name=color]:checked', '#'+$activeFormId).val(); 187 $techId = $(this).val(); 188 $contractId = $("#contractId").val(); 189 $contractType = $("#contractType").val(); 190 $finder = $("#finder").val(); 191 192 $reloadHardwareItem($productId,$techId,$colorId,$withoutContract,0,$contractId,$contractType,$finder); 193 }); 194 195 $(document.body).on('click','.trigger_hardware_color',function() { 196 $activeForm = $(this).closest('form'); 197 $productId = $activeForm.attr('name'); 198 $activeFormId = $activeForm.attr("id"); 199 $withoutContract = $('input[name=no-tarif]:checked').val(); 200 $techId = $('input[name=capacity]:checked', '#'+$activeFormId).val(); 201 $colorId = $(this).val(); 202 $contractId = $("#contractId").val(); 203 $contractType = $("#contractType").val(); 204 $finder = $("#finder").val(); 205 206 $reloadHardwareItem($productId,$techId,$colorId,$withoutContract,0,$contractId,$contractType,$finder); 207 }); 208 209 $(document.body).on('click','.trigger_hardware_color_noprice',function() { 210 $activeForm = $(this).closest('form'); 211 $productId = $activeForm.attr('name'); 212 $activeFormId = $activeForm.attr("id"); 213 $techId = $('input[name=capacity]:checked', '#'+$activeFormId).val(); 214 $colorId = $(this).val(); 215 $contractId = $("#contractId").val(); 216 $contractType = $("#contractType").val(); 217 $finder = $("#finder").val(); 218 219 $reloadHardwareItem($productId,$techId,$colorId,1,1,$contractId,$contractType,$finder); 220 }); 221 222 $setFilterHardware = function ($categoryId,$manufacturer,$displayMin,$displayMax,$memoryMin,$memoryMax,$contractId,$reset,$subcategory,$contractType) { 223 $withoutContract = $('input[name=no-tarif]:checked').val(); 224 var $param="case=set_filter_hardware&categoryId="+$categoryId+"&manufacturer="+$manufacturer+"&subcategory="+$subcategory+"&displayMin="+$displayMin+"&displayMax="+$displayMax+"&memoryMin="+$memoryMin+"&memoryMax="+$memoryMax+"&contractId="+$contractId+"&reset="+$reset+"&withoutContract="+$withoutContract+"&contractType="+$contractType; 225 $.ajax({ 226 type:"POST", 227 url:'/ajax_frontend.php', 228 data:$param, 229 dataType:"json", 230 async:true, 231 success:function(msg){ 232 $('#productListContainer').html(msg.html); 233 document.getElementById('hardware_filter_button').click(); 234 }, 235 complete:function(transport){}, 236 error:function(){}}); 237 } 238 239 $(document.body).on('click','.update_hardwarefilter',function() { 240 $activeForm = $(this).closest('form'); 241 $categoryId = $('#category_id').val(); 242 $contractId = $('#contractId').val(); 243 $contractType = $('#contractType').val(); 244 $manufacturer = []; 245 $("input[name='manufacturer[]']:checked").each(function () { 246 $manufacturer.push(parseInt($(this).val())); 247 }); 248 $subcategory = []; 249 $("input[name='category[]']:checked").each(function () { 250 $subcategory.push(parseInt($(this).val())); 251 }); 252 $displayMin = $('#range-manufacturer-label-min').val(); 253 $displayMax = $('#range-manufacturer-label-max').val(); 254 $memoryMin = $('#range-storage-label-min').val(); 255 $memoryMax = $('#range-storage-label-max').val(); 256 $setFilterHardware($categoryId,$manufacturer,$displayMin,$displayMax,$memoryMin,$memoryMax,$contractId,0,$subcategory,$contractType); 257 }); 258 $(document.body).on('click','.reset_hardwarefilter',function() { 259 $activeForm = $(this).closest('form'); 260 $categoryId = $('#category_id').val(); 261 $contractId = $('#contractId').val(); 262 $contractType = $('#contractType').val(); 263 264 $("input[name='manufacturer[]']").prop('checked', false); 265 $setFilterHardware($categoryId,[],0,0,0,0,$contractId,1,[],$contractType); 266 }); 267 $(document.body).on('change','#no-tarif',function() { 268 $categoryId = $('#category_id').val(); 269 $withoutContract = $('input[name=no-tarif]:checked').val(); 270 $contractId = $('#contractId').val(); 271 var $param="case=set_filter_hardware&categoryId="+$categoryId+"&switchContract=1&withoutContract="+$withoutContract+"&contractId="+$contractId; 272 $.ajax({ 273 type:"POST", 274 url:'/ajax_frontend.php', 275 data:$param, 276 dataType:"json", 277 async:true, 278 success:function(msg){ 279 $('#productListContainer').html(msg.html); 280 },
281 complete:function(transport){}, 282 error:function(){}}); 283 }); 284 $(document.body).on('change','#no-device',function() { 285 $categoryId = $('#category_id').val(); 286 $showPayout = $('input[name=no-device]:checked').val(); 287 $contractId = $('#contractId').val(); 288 var $param="case=set_filter_hardware&categoryId="+$categoryId+"&switchContract=1&showPayout="+$showPayout+"&contractId="+$contractId; 289 $.ajax({ 290 type:"POST", 291 url:'/ajax_frontend.php', 292 data:$param, 293 dataType:"json", 294 async:true, 295 success:function(msg){ 296 $('#productListContainer').html(msg.html); 297 if ($showPayout == 1) { 298 $('#bookContractSinge').show(); 299 $('#filter-box').hide(); 300 } 301 else{ 302 $('#bookContractSinge').hide(); 303 $('#filter-box').show(); 304 } 305 }, 306 complete:function(transport){}, 307 error:function(){}}); 308 }); 309 $setSortHardware = function ($categoryId,$sort,$contractId,$contractType) { 310 $withoutContract = $('input[name=no-tarif]:checked').val(); 311 var $param="case=set_filter_hardware&categoryId="+$categoryId+"&sort="+$sort+"&withoutContract="+$withoutContract+"&contractId="+$contractId+"&contractType="+$contractType; 312 $.ajax({ 313 type:"POST", 314 url:'/ajax_frontend.php', 315 data:$param, 316 dataType:"json", 317 async:true, 318 success:function(msg){ 319 $('#productListContainer').html(msg.html); 320 document.getElementById('hardware_sort_button').click(); 321 }, 322 complete:function(transport){}, 323 error:function(){}}); 324 } 325 $(document.body).on('click','.update_hardwaresort',function() { 326 $activeForm = $(this).closest('form'); 327 $activeFormId = $activeForm.attr("id"); 328 $categoryId = $('#category_id').val(); 329 $sort = $('input[name=sort]:checked').val(); 330 $contractId = $("#contractId").val(); 331 $contractType = $("#contractType").val(); 332 $setSortHardware($categoryId,$sort,$contractId,$contractType); 333 }); 334 335 $setFilterContract = function ($categoryId,$type) { 336 $(".combiCard-infotext").hide(); 337 $string = "&type="+$type+"&provider="+$("input[name='"+$type+"[provider]']:checked").val(); 338 if ($("#"+$type+"-vvl").is(':checked')) 339 $string += "&vvl=1"; 340 if ($("#"+$type+"-vvl80").is(':checked')) 341 $string += "&vvl80=1"; 342 if ($("#"+$type+"-magenta1").is(':checked')) 343 $string += "&magenta1=1"; 344 if ($("#"+$type+"-young").is(':checked')) 345 $string += "&young=1"; 346 if ($("#"+$type+"-pre2post").is(':checked')) 347 $string += "&pre2post=1"; 348 if ($("#"+$type+"-combiCard").is(':checked')) { 349 $string += "&combiCard=1"; 350 if ($("#"+$type+"-combiCard2nd").not(':checked').length) { 351 $("#text-combiCard").show(); 352 } 353 } 354 if ($("#"+$type+"-combiCard2nd").is(':checked')) { 355 $string += "&combiCard2nd=1"; 356 if ($("#"+$type+"-combiCard").not(':checked')) { 357 $("#text-combiCard2nd").show(); 358 } 359 } 360 if ($("#"+$type+"-showPayout").is(':checked')) 361 $string += "&showPayout=1"; 362 if ($("#finderDeviceId").val()) 363 $string += "&deviceId="+$("#finderDeviceId").val(); 364 if ($("#finderVariantId").val()) 365 $string += "&variantId="+$("#finderVariantId").val(); 366 var $param="case=set_filter_contract&categoryId="+$categoryId+$string; 367 $.ajax({ 368 type:"POST", 369 url:'/ajax_frontend.php', 370 data:$param, 371 dataType:"json", 372 async:true, 373 success:function(msg){ 374 $('#productListContainer').html(msg.html); 375 376 }, 377 complete:function(transport){}, 378 error:function(){}}); 379 } 380 381 $(document.body).on('click','.contract_filter_triggerarea',function() { 382 $categoryId = $('#category_id').val(); 383 $selfId = $(this).attr("id"); 384 $arr = $selfId.split('-'); 385 $type = $arr[0]; 386 $setFilterContract($categoryId,$type); 387 }); 388 $(document.body).on('change','.contract_filter_provider_trigger',function() { 389 $categoryId = $('#category_id').val(); 390 $selfId = $(this).attr("id"); 391 $arr = $selfId.split('-'); 392 $type = $arr[0]; 393 $provider = $("input[name='"+$type+"[provider]']:checked").val(); 394 if ($provider == 80) { 395 $("."+$type+"-provideroption-6").hide(); 396 $("."+$type+"-provideroption-80").show(); 397 } else { 398 $("."+$type+"-provideroption-6").show(); 399 $("."+$type+"-provideroption-80").hide(); 400 } 401 $setFilterContract($categoryId,$type); 402 }); 403 $(document.body).on('change','.contract_filter_trigger',function() { 404 $categoryId = $('#category_id').val(); 405 $selfId = $(this).attr("id"); 406 $arr = $selfId.split('-'); 407 $type = $arr[0]; 408 $setFilterContract($categoryId,$type); 409 }); 410 $(document.body).on('click','.magenta1_checkbox',function() { 411 $value = $(this).is(':checked'); 412 var $param="case=set_magenta1&magenta1="+$value; 413 $.ajax({ 414 type:"POST", 415 url:'/ajax_frontend.php', 416 data:$param, 417 dataType:"json", 418 async:true, 419 success:function(msg){}, 420 complete:function(transport){}, 421 error:function(){}}); 422 }); 423 424 $(document.body).on('click','.porting_contract_type',function() { 425 $value = $(this).val(); 426 if ($value == "prepaid") { 427 $(".porting_runtime").hide(); 428 $(".porting_prepaid").show(); 429 } else { 430 $(".porting_runtime").show(); 431 $(".porting_prepaid").hide(); 432 } 433 }); 434 435 $(document.body).on('click','#diff-customer',function() { 436 if ($(this).is(':checked')) { 437 $(".porting_differentCustomer").show(); 438 } else { 439 $(".porting_differentCustomer").hide(); 440 } 441 }); 442 443 $(document.body).on('click','#keep_number',function() { 444 if ($(this).is(':checked')) { 445 $("#keep_number_input_div").show(); 446 } else { 447 $("#keep_number_input_div").hide(); 448 } 449 }); 450 451 452 $(document.body).on('click','.porting_timeframe',function() { 453 $value = $(this).val(); 454 if ($value == "next") { 455 $(".porting_timeframe_date").hide(); 456 } else { 457 $(".porting_timeframe_date").show(); 458 } 459 }); 460 461 $(document.body).on('click','.xsell-add',function() { 462 $id = $(this).attr("data-id"); 463 $("#xsell-"+$id).val($id); 464 $("#xsell-add-"+$id).hide(); 465 $("#xsell-remove-"+$id).show(); 466 }); 467 468 $(document.body).on('click','.xsell-remove',function() { 469 $id = $(this).attr("data-id"); 470 $("#xsell-"+$id).val(''); 471 $("#xsell-remove-"+$id).hide(); 472 $("#xsell-add-"+$id).show(); 473 }); 474 475 $(document.body).on('click','.identCheckbox',function() { 476 $identificationValue = $('input[name=identification]:checked', '#checkoutForm').val(); 477 var $param="case=identification&identificationValue="+$identificationValue; 478 $.ajax({ 479 type:"POST", 480 url:'/ajax_frontend.php', 481 data:$param, 482 dataType:"json", 483 async:true, 484 success:function(msg){ 485 if (msg.notRequired) { 486 $(".additionalContractInput").hide(); 487 } else { 488 $(".additionalContractInput").show(); 489 } 490 },
491 complete:function(transport){}, 492 error:function(){} 493 }); 494 }); 495 496 497 498 $(document.body).on('keyup','#searchTerm',function() { 499 $string = $("#searchTerm").val(); 500 if ($string.length > 3) { 501 var $param="case=search&searchTerm="+$string; 502 $.ajax({ 503 type:"POST", 504 url:'/ajax_frontend.php', 505 data:$param, 506 dataType:"json", 507 async:true, 508 success:function(msg){ 509 $("#searchResults").html(msg.html); 510 $("#searchResults").show(); 511 }, 512 complete:function(transport){}, 513 error:function(){}}); 514 } 515 516 }); 517 518 $(document.body).on('click','#searchClose',function() { 519 $(".m-search").removeClass("m-active"); 520 }); 521} 522 523$(document).ready(function(){ 524 /* *** Initialisieren *** */ 525 $.fn.init_smart(); 526});
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.