Projekt

Allgemein

Profil

GX-Bug #68099 » refs_#68099__Avoid_gallery_check_when_changing_product_quantity.patch

Anis Mashku, 23.12.2020 12:07

Unterschiede anzeigen:

src/themes/Honeygrid/javascripts/source/widgets/cart_handler.js (revision 76e619b4b3c0401294c0058db24717bb6e47d149) → src/themes/Honeygrid/javascripts/source/widgets/cart_handler.js (date 1608719592756)
340 340
                var formdata = jse.libs.form.getData($form, null, true);
341 341
                formdata.target = (e && e.data && e.data.target) ? e.data.target : 'check';
342 342
                formdata.isProductInfo = $form.hasClass('product-info') ? 1 : 0;
343
                formdata.avoidCheckGallery = e.data.avoidCheckGallery;
343 344

  
344 345
                // Abort previous check ajax if
345 346
                // there is one in progress
......
415 416

  
416 417
                    // Check if the gallery images changed
417 418
                    if (formdata.target === 'check' && result.content.imageGallery.trim() !== ''
418
                        && result.content.replaceGallery === true) {
419
                        && result.content.replaceGallery === true && !formdata.avoidCheckGallery) {
419 420
                        const loadingSpinner = jse.libs.loading_spinner.show($('.product-info-stage'), 9999);
420 421
                        
421 422
                        const swipers = [
......
442 443
                            jse.libs.loading_spinner.hide(loadingSpinner);
443 444
                        });
444 445
                    } else if (formdata.target === 'check' && result.content.imageGallery.trim() === ''
445
                        && result.content.replaceGallery === true) {
446
                        && result.content.replaceGallery === true && !formdata.avoidCheckGallery) {
446 447
                        $('#image-collection-container').html(result.content.imageGallery);
447 448
                        $('#product_image_layer').html(result.content.imageModal);
448 449
                    }
......
594 595
                })
595 596
                .on('mouseover', options.productOptions, _setSelectedModifierInfo)
596 597
                .on('mouseout', options.productOptions, _resetSelectedModifierInfo)
597
                .on('blur', options.quantity, {'target': 'check'}, function (e) {
598
                .on('blur', options.quantity, {'target': 'check', 'avoidCheckGallery': true}, function (e) {
598 599
                    _submitHandler(e);
599 600
                })
600
                .on('keyup', options.quantity, {'target': 'check'}, _keyupHandler);
601
                .on('keyup', options.quantity, {'target': 'check', 'avoidCheckGallery': true}, _keyupHandler);
601 602

  
602 603
            // Fallback if the backend renders incorrect data
603 604
            // on initial page call
    (1-1/1)