PageSourceSearch

https://spasstower.ru/local/js/controllers/partial/schedule-block.js

js spasstower.ru collected 2026-10-02 04:45:20 UTC 1,053 bytes, 44 lines download raw bytes

1(function($, APP) {
2    'use strict';
3
4    /**
5     *
6     **/
7    APP.Controls.Partial.ScheduleBlock = can.Control.extend({
8        defaults: {
9            table: ".js-table-wrap",
10            toggle: ".js-toggle-table",
11            count: 7,
12        }
13    }, {
14
15        init: function() {
16            this.$table = this.element.find(this.options.table);
17            this.hMax = this.$table.height();
18            this.hMin = 0;
19
20            this.element.find("tr").each(function (i, el) {
21                if (i > this.options.count) {
22                    return false
23                }
24                this.hMin += el.offsetHeight;
25            }.bind(this));
26
27            this.$table.height(this.hMin);
28        },
29
30        '{toggle} click': function ($el) {
31
32            if ($el.hasClass("open")) {
33                $el.removeClass("open");
34                this.$table.height(this.hMin);
35            } else  {
36                $el.addClass("open");
37                this.$table.height(this.hMax);
38            }
39
40        }
41
42    });
43
44})(jQuery, window.APP);

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.