PageSourceSearch

https://www.segelschule-fuerst.de/out/segelschule/src/js/widgets/oxequalizer.js

js segelschule-fuerst.de collected 2026-10-08 11:13:41 UTC 2,858 bytes, 89 lines download raw bytes

1/**
2 *    This file is part of OXID eShop Community Edition.
3 *
4 *    OXID eShop Community Edition is free software: you can redistribute it and/or modify
5 *    it under the terms of the GNU General Public License as published by
6 *    the Free Software Foundation, either version 3 of the License, or
7 *    (at your option) any later version.
8 *
9 *    OXID eShop Community Edition is distributed in the hope that it will be useful,
10 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 *    GNU General Public License for more details.
13 *
14 *    You should have received a copy of the GNU General Public License
15 *    along with OXID eShop Community Edition.  If not, see <http://www.gnu.org/licenses/>.
16 *
17 * @link      http://www.oxid-esales.com
18 * @package   out
19 * @copyright (C) OXID eSales AG 2003-2012
20 * @version OXID eShop CE
21 * @version   SVN: $Id: oxequalizer.js 35529 2011-05-23 07:31:20Z vilma $
22 */
23( function ( $ ) {
24
25    /**
26     * Equalize columns
27     */
28    oxEqualizer = {
29
30        /**
31         * Gets tallest element value
32         *
33         * @return integer
34         */
35        equalHeight: function(group, target)
36        {
37            var self    = this,
38                newh    = 0,
39                tallest = 0;
40
41            if ( target ) {
42                if (group.height() < target.height()){
43                    tallest = target.height() - (group.innerHeight() - group.height());
44                }
45            } else {
46                tallest = self.getTallest( group );
47            }
48
49            if( tallest ) {
50                group.each(function(){
51                    if($(this).hasClass('oxEqualized')) {
52                        $(this).css('height','');
53                        $(this).removeClass('oxEqualized');
54                    }
55                    newh = tallest;
56                    if ($(this).height() < newh && $(this).hasClass('catPicOnly')) {
57                        newh += 20;
58                    }
59                    if ($(this).height() < newh) {
60                        $(this).height(newh).addClass('oxEqualized');
61                    }
62                });
63            }
64        },
65
66        /**
67         * Gets tallest element value
68         *
69         * @return integer
70         */
71        getTallest: function(el)
72        {
73            var tallest = 0;
74            el.each(function(){
75                var thisHeight = $(this).height();
76                if (!$(this).hasClass('oxEqualized') && thisHeight > tallest) {
77                    tallest = thisHeight;
78                }
79            });
80            return tallest;
81        }
82    };
83
84    /**
85     * Equalizer widget
86     */
87    $.widget("ui.oxEqualizer", oxEqualizer );
88
89})( jQuery );

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.