PageSourceSearch

https://mrsupplement.hu/modules/hdproductnotification/views/js/front.js

js mrsupplement.hu collected 2026-10-08 02:28:23 UTC 1,690 bytes, 49 lines download raw bytes

1let notiModal, notiModalTitle, notiModalForm, sendButton;
2
3$(document).ready(function() {
4    notiModal = $('#hdproductnotification_modal');
5    notiModalTitle = $('#hdproductnotification_modal .modal_title');
6    notiModalForm = $('#hdproductnotification_form');
7    sendButton = $('#hdproductnotification_modal .btn-primary');
8
9    notiModal.on('click', '.close_btn', function() {
10        notiModal.modal('hide');
11    }).on('submit', '#hdproductnotification_form', function(e) {
12        e.preventDefault();
13        var data = $(this).serializeArray();
14       // notiModal.modal('hide');
15
16        notySubscribeToProduct(data);
17    }).on('hidden.bs.modal', function() {
18        $('#hdproductnotification_email_input').val('');
19    })
20
21    $('.hdproductnotification_notify_button').on('click', function() {
22        $('#hdproductnotification_attribute_id_input').val($(this).data('attribute_id'))
23        sendButton.prop('disabled', false);
24        notiModalForm.show();
25        notiModalTitle.html('Amennyiben az áru készleten lesz, a megadott e-mail címen tájékoztatunk!');
26        notiModal.modal("show");
27    })
28});
29
30function notySubscribeToProduct(formData) {
31    let baseDir = prestashop.urls.base_url;
32
33    sendButton.prop('disabled', true);
34    $.ajax({
35        type: 'POST',
36        async: true,
37        url: baseDir + 'modules/hdproductnotification/subscribe.php',
38        headers: { "cache-control": "no-cache" },
39        data: formData,
40        cache: false
41    }).done(function() {
42        notiModalForm.hide();
43        notiModalTitle.html('Érdeklődését rögzítettük!');
44
45        setTimeout(function(){
46            notiModal.modal('hide');
47        }, 2000);
48    });
49}

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.