PageSourceSearch

https://www.editorialgeu.com/themes/warehouse/modules/ps_emailalerts/js/mailalerts.js

js editorialgeu.com collected 2026-09-26 12:01:45 UTC 2,412 bytes, 76 lines download raw bytes

1/**
2 * 2007-2015 PrestaShop
3 *
4 * NOTICE OF LICENSE
5 *
6 * This source file is subject to the Academic Free License (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 * http://opensource.org/licenses/afl-3.0.php
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-2015 PrestaShop SA
22 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (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.js-mailalert-response').html(resp.message).show();
37      if (!resp.error) {
38        $('div.js-mailalert  a').hide();
39        $('div.js-mailalert  input[type=email]').hide();
40      }
41    }
42  });
43  return false;
44}
45
46$('document').ready(function()
47{
48  $('.js-remove-email-alert').click(function()
49  {
50    var self = $(this);
51    var ids = self.attr('rel').replace('js-id-emailalerts-', '');
52    ids = ids.split('-');
53    var id_product_mail_alert = ids[0];
54    var id_product_attribute_mail_alert = ids[1];
55    var parent = self.closest('li');
56
57    $.ajax({
58      url: self.data('url'),
59      type: "POST",
60      data: {
61        'id_product': id_product_mail_alert,
62        'id_product_attribute': id_product_attribute_mail_alert
63      },
64      success: function(result)
65      {
66        if (result == '0')
67        {
68          parent.fadeOut("normal", function()
69          {
70            parent.remove();
71          });
72        }
73      }
74    });
75  });
76});

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.