PageSourceSearch

https://della.com.ua/script/SignUpCongratulationsMWnd.js

js della.com.ua collected 2026-10-02 13:43:42 UTC 2,870 bytes, 87 lines download raw bytes

1SignUpCongratulationsMWnd = function (id, addParams) {
2    DellaModalWindow.apply(this, arguments);
3
4    this.type = addParams.type || 0;
5};
6
7SignUpCongratulationsMWnd.prototype = inherit(DellaModalWindow.prototype);
8SignUpCongratulationsMWnd.prototype.constructor = SignUpCongratulationsMWnd;
9
10SignUpCongratulationsMWnd.prototype.initFunc = function ($container) {
11    var self = this;
12
13    var $btnAddFreight = $container.find('#add_freight'),
14        $btnFindFreight = $container.find('#find_freight'),
15        $btnAddTransport = $container.find('#add_transport'),
16        $btnFindTransport = $container.find('#find_transport');
17
18    switch (self.type) {
19        case 0:
20            self.eventListeners.addFreight($btnAddFreight);
21            self.eventListeners.findTransport($btnFindTransport);
22            break;
23        case 1:
24            self.eventListeners.addTransport($btnAddTransport);
25            self.eventListeners.findFreight($btnFindFreight);
26            break;
27        case 2:
28            self.eventListeners.addFreight($btnAddFreight);
29            self.eventListeners.findFreight($btnFindFreight);
30            break;
31        case 3:
32            self.eventListeners.findFreight($btnFindFreight);
33            self.eventListeners.findTransport($btnFindTransport);
34            break;
35        default:
36            self.eventListeners.addFreight($btnAddFreight);
37            self.eventListeners.findFreight($btnFindFreight);
38            break;
39    }
40};
41
42SignUpCongratulationsMWnd.prototype.setEventListeners = function () {
43    var self = this;
44
45    return {
46        addFreight: function ($button) {
47            $button
48                .off()
49                .on('click', function (event) {
50                    event.stopPropagation();
51                    event.preventDefault();
52
53                    window.location.href = ADD_PATH + '/placecargo';
54                });
55        },
56        findTransport: function ($button) {
57            $button
58                .off()
59                .on('click', function (event) {
60                    event.stopPropagation();
61                    event.preventDefault();
62
63                    window.location.href = ADD_PATH + '/search';
64                });
65        },
66        addTransport: function ($button) {
67            $button
68                .off()
69                .on('click', function (event) {
70                    event.stopPropagation();
71                    event.preventDefault();
72
73                    window.location.href = ADD_PATH + '/placetransport';
74                });
75        },
76        findFreight: function ($button) {
77            $button
78                .off()
79                .on('click', function (event) {
80                    event.stopPropagation();
81                    event.preventDefault();
82
83                    window.location.href = ADD_PATH + '/search';
84                });
85        }
86    }
87};

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.