PageSourceSearch

https://www.pinglighting.com/modules/ps_emailalerts/js/mailalerts.js

js pinglighting.com collected 2026-10-06 18:27:34 UTC 2,464 bytes, 77 lines download raw bytes

1/**
2 * 2007-2020 PrestaShop.
3 *
4 * NOTICE OF LICENSE
5 *
6 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
7 * that is bundled with this package in the file LICENSE.txt.
8 * It is also available through the world-wide-web at this URL:
9 * https://opensource.org/licenses/AFL-3.0
10 * If you did not receive a copy of the license and are unable to
11 * obtain it through the world-wide-web, please send an email
12 * to [email protected] so we can send you a copy immediately.
13 *
14 * DISCLAIMER
15 *
16 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
17 * versions in the future. If you wish to customize PrestaShop for your
18 * needs please refer to http://www.prestashop.com for more information.
19 *
20 * @author    PrestaShop SA <[email protected]>
21 * @copyright 2007-2020 PrestaShop SA
22 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
23 * International Registered Trademark & Property of PrestaShop SA
24 */
25
26function  addNotification() {
27  var ids = $('div.js-mailalert > input[type=hidden]');
28
29  $.ajax({
30    type: 'POST',
31    url: $('div.js-mailalert').data('url'),
32    data: 'id_product='+ids[0].value+'&id_product_attribute='+ids[1].value+'&customer_email='+$('div.js-mailalert > input[type=email]').val(),
33    success: function (resp) {
34      resp = JSON.parse(resp);
35
36      $('div.js-mailalert > span').html('<article class="alert alert-info" role="alert" data-alert="success">'+resp.message+'</article>').show();
37      if (!resp.error) {
38        $('div.js-mailalert > button').hide();
39        $('div.js-mailalert > input[type=email]').hide();
40        $('div.js-mailalert > #gdpr_consent').hide();
41      }
42    }
43  });
44  return false;
45}
46
47$('document').ready(function()
48{
49  $('.js-remove-email-alert').click(function()
50  {
51    var self = $(this);
52    var ids = self.attr('rel').replace('js-id-emailalerts-', '');
53    ids = ids.split('-');
54    var id_product_mail_alert = ids[0];
55    var id_product_attribute_mail_alert = ids[1];
56    var parent = self.closest('li');
57
58    $.ajax({
59      url: self.data('url'),
60      type: "POST",
61      data: {
62        'id_product': id_product_mail_alert,
63        'id_product_attribute': id_product_attribute_mail_alert
64      },
65      success: function(result)
66      {
67        if (result == '0')
68        {
69          parent.fadeOut("normal", function()
70          {
71            parent.remove();
72          });
73        }
74      }
75    });
76  });
77});

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.