PageSourceSearch

https://www.aerobicyfitness.com/modules/ecommmanufacturers//views/js/ecommmanufacturers.js

js aerobicyfitness.com collected 2026-09-29 13:21:52 UTC 4,744 bytes, 137 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 (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-2020 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 * Don't forget to prefix your containers with your own identifier
26 * to avoid any conflicts with others containers.
27 */
28
29$(document).ready(function () {
30    $(".letter").click(function () {
31
32        if (!$(this).hasClass('active')) {
33            $('li.brand').css("display", "none");
34            $letter = $(this).text();
35            $(".letter").not(this).removeClass('active');
36            $(this).toggleClass('active');
37            $brands = $('#brands > li');
38
39            $.each($brands, function (index, value) {
40                var currentletter = $(value).attr('letter');
41                if (currentletter == $letter) {
42                    $(value).css("display", "block");
43                }
44            });
45        } else {
46            $(this).toggleClass('active');
47            $('.brand').show()
48        }
49    });
50
51    /* ECOMM MOD */
52    $(document).on('keyup', '.search-global-container .search-container .input-border .input-search', function () {
53        $(".button-search").click();
54    })
55
56    /* END ECOMM MOD */
57    $(".button-search").click(function () {
58        $exist = false;
59        $('li.brand').css("display", "block");
60        $messageContainer = $('.info-message');
61
62        // searched text
63        $brandSearched = $('.input-search').val();
64        $brandSearchedLower = $brandSearched.toLowerCase();
65
66        // dom elements
67        $brandsElements = $('.brand-name');
68
69
70        // names
71        $.each($brandsElements, function (index, element) {
72            $name = ($(element).text());
73            $nameLower = $name.toLowerCase();
74
75            if (!($nameLower == $brandSearchedLower || $nameLower.includes($brandSearchedLower))) {
76                $messageContainer.css("display", "none");
77                $parents = $(element).closest("li.brand");
78                $.each($parents, function (index, parent) {
79                    $(parent).css("display", "none");
80                });
81            } else {
82                $exist = true;
83            }
84            if (!$exist) {
85                $messageContainer.css("display", "block");
86                $textMessage = $('.info-message p');
87                $textMessage.innerHTML = "No existen marcas para los criterios especificados.";
88            }
89        });
90
91    });
92    $("select").change(function () {
93
94        //show all brands
95        $('li.brand').css("display", "block");
96
97        //get the brand selected
98        // $brandText = $(this).children("option:selected").text();
99        $brandText = $('select[name=metaKeyword]').val()
100
101        //get all meta-keywords (there are simple and composed)
102        $metaElements = $('.meta-keywords');
103
104        //loop over all meta-keywords
105        if ($brandText != '') {
106            $.each($metaElements, function (index, metaElement) {
107
108                //get the text of each meta-keyword element
109                $type = ($(metaElement).text());
110
111                //remove white spaces
112                $typeName = $.trim($type);
113
114                //compare our brand searched with the existent brands
115                if (!($typeName.includes($brandText))) {
116
117                    //hide if there are no coincidences
118                    $parents = $(metaElement).closest("li.brand");
119                    $.each($parents, function (index, parent) {
120                        $(parent).css("display", "none");
121                    });
122                }
123            });
124        } else {
125            $('.brand').show()
126        }
127    })
128
129    if (location.search.substr(1).split("?").length == 1) {
130        param = location.search.substr(1).split("?")[0].split('=');
131
132        if (param[0] == 'letra'){
133            console.log($('.'+param[1].toUpperCase()))
134            $('.'+param[1].toUpperCase()).click();
135        }
136    }
137});

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.