PageSourceSearch

https://minnano-rakuraku.com/wp/wp-content/plugins/eqn5-theme-system/forms/mail/js/form.js?ver=1.0

js minnano-rakuraku.com collected 2026-10-05 03:17:12 UTC 3,796 bytes, 126 lines download raw bytes

1/////////////////////////////////////////////////////////////
2// JavaScript Document Ver2.2 EQn5_Mailer_Customize
3/////////////////////////////////////////////////////////////
4
5// プレフィックス:fgd_
6
7var inherits = function (childCtor, parentCtor) {
8    Object.setPrototypeOf(childCtor.prototype, parentCtor.prototype);
9};
10
11// 継承クラス
12var EQn5_Mailer_Customize = function () {    
13    this.validateComplete();
14    this.event();
15    this.eventCustom();
16    this.kanaEvent();
17    this.first_action = {};
18};
19
20inherits(EQn5_Mailer_Customize, EQn5_Mailer_JS);
21
22// 追加イベント
23EQn5_Mailer_Customize.prototype.eventCustom = function () {
24    var self = this;
25    
26    // 遷移ボタン:確認
27    $('.fgd_confirm_send').click(function (e) {
28        var resutl = self.confirmEvent(e);
29        if (true == resutl) {
30            //$('#fgd_form').submit();
31            self.sendAjax();
32        }
33    });
34    
35    // メルマガ送信
36    $('#fgd_cta_send').click(function (e) {
37        $('#email_complete').css('display', 'none');
38        var val = $('#fgd_form_cta .fgd_mail');
39        if (true == self.mail(val, false, true)) {
40            $('#email_complete p').html('送信中...');
41            $('#email_complete').css('display', 'block');
42            self.magazineAjax();
43        } else {
44            $('#email_complete p').html('メールアドレスを入力してください');
45            $('#email_complete').css('display', 'block');
46            self.magazineMessage();
47        }
48    });
49};
50
51// send Ajax
52EQn5_Mailer_Customize.prototype.sendAjax = function () {
53    var self = this;
54    //var EQn5_Mailer_Send_Ajax_Uri = './mail/app/ajax/ajax.php';
55    var params = $('#fgd_form').serialize();
56    $.ajax({
57        url: EQn5_Mailer_Send_Ajax_Uri,
58        type: 'post',
59        data: params,
60        dataType: 'json'
61    })
62    .done(function (json) {
63        $('#fgd_complete_view').html(json.html);
64        if (true == json.result) {
65            self.completeEvent();
66        } else {
67            var complete = $('[data-remodal-id=complete]').remodal();
68            complete.open();
69        }
70    })
71    .fail(function (jqXHR, textStatus, errorThrown) {
72        //console.log(jqXHR, textStatus, errorThrown);
73        alert('予期せぬエラーが発生しました。');
74    })
75    .always(function () {
76        //console.log('finish');
77    });
78};
79
80EQn5_Mailer_Customize.prototype.completeEvent = function () {
81    // 二重送信防止。フォームを空にする
82    var input = $('.fgd_input,.fgd_mail,.fgd_digits');
83    if (input.length > 0) {
84        $.each(input, function () {
85            $(this).val('');
86            //$(this).blur();
87        });
88    }
89    $('.fgd_agree_parent input[value="同意しない"]').prop('checked', true).change();
90    $('.fgd_confirm_wait').show();
91    $('.fgd_confirm').hide();
92    
93    var complete = $('[data-remodal-id=complete]').remodal();
94    complete.open();
95};
96
97EQn5_Mailer_Customize.prototype.magazineMessage = function () {
98    setTimeout(function() {
99        $('#email_complete').fadeOut('fast');
100    }, 3000);
101};
102
103// ふりがな
104EQn5_Mailer_Customize.prototype.kanaEvent = function () {
105    if (0 < $('#guest_name').length) {
106        $.fn.autoKana('#guest_name', '#guest_kana', { katakana: false });
107    }
108    if (0 < $('#family_name').length) {
109        $.fn.autoKana('#family_name', '#family_kana', { katakana: false });
110    }
111    if (0 < $('#personal_name').length) {
112        $.fn.autoKana('#personal_name', '#personal_kana', { katakana: false });
113    }
114};
115
116jQuery(function () {
117    // フォーム
118    new EQn5_Mailer_Customize();
119    
120    $('.fgd_time_show').slideDown('fast', function(){
121        var that = $(this);
122        setTimeout(function(){
123            that.slideUp();
124        }, 8000);
125    });
126});

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.