PageSourceSearch

https://ceramiczona.ru/catalog/view/javascript/sobfeedback.js

js ceramiczona.ru collected 2026-10-08 14:22:47 UTC 2,112 bytes, 62 lines download raw bytes

1/**
2 * Created by sob on 06.11.2016.
3 */
4$(document).ready(function () {
5   $('.form-sobfeedback').each(function (count, item) {
6        var formId = $(item).data('form-id');
7       sendMessage(item, formId);
8       $('#form-sobfeedback' + formId).prepend($('#loader' + formId));
9   });
10});
11
12
13function sendMessage(thisForm, formId) {
14    $(thisForm).validator().on('submit', function(e) {
15        if (!e.isDefaultPrevented()){
16            e.preventDefault();
17            var that = $(e.target);
18            $.ajax({
19                url: 'index.php?route=module/sobfeedback/send',
20                type: 'post',
21                data: $(thisForm).serialize(),
22                dataType:'json',
23                beforeSend: function () {
24                    $('#loader' + formId).show();
25                },
26                success: function(data) {
27                    if (data.error) {
28                        alertForm({form: that, msg: data.error, style: 'alert-danger'}, formId);
29                    } else {
30                        alertForm({form: that, msg: data['success'], style: 'alert-success'}, formId);
31                        that.find('input[type=\'text\']').val('');
32                        that.find('input[type=\'email\']').val('');
33                        that.find('textarea').val('');
34                        ym(89931423,'reachGoal','leadjs');
35                        document.location.href = "https://ceramiczona.ru/index.php?route=checkout/success";
36                    }
37                }
38            });
39        }
40
41    });
42}
43
44function alertForm(alert, formId) {
45    var thisAlertModal = $('#sobFeedbackAlert' + formId);
46    var thisAlert = $('.modal-body .alert', thisAlertModal);
47    thisAlert.addClass(alert.style);
48    thisAlert.text(alert.msg);
49    thisAlertModal.modal().show();
50    $('#loader' + formId).hide();
51    setTimeout(function () {
52        thisAlertModal.modal('hide');
53        thisAlert.removeClass('alert-danger');
54        thisAlert.removeClass('alert-success');
55    }, 2000);
56
57
58    setTimeout(function () {
59        alert.form.closest('.modal').modal('hide');
60    }, 4000);
61
62}

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.