PageSourceSearch

https://ebom.blazowa.com.pl/js/dxdashboard.js?v=20260318

js blazowa.com.pl collected 2026-10-02 21:27:02 UTC 3,957 bytes, 108 lines download raw bytes

1
2    window._pendingDashboardParams = null;
3    let _paramsAppliedOnce = false;
4
5    function getParamsApi() {
6        try {
7            const ext = dashboardControl?.findExtension?.('dashboardParameterDialog');
8            if (!ext) return null;
9            return ext.getParameters?.() || null;
10        } catch {
11            return null;
12        }
13    }
14
15
16    window.registerDashboardDotNet = function (dotNetRef) {
17        window._dashboardDotNet = dotNetRef;
18    };
19
20    window.unregisterDashboardDotNet = function () {
21        window._dashboardDotNet = null;
22    };
23
24    function notifyDotNetSafe(method) {
25        try {
26            if (window._dashboardDotNet) {
27                window._dashboardDotNet.invokeMethodAsync(method);
28            }
29        } catch (e) {
30            console.warn("notifyDotNetSafe failed", e);
31        }
32    }
33
34    function applyParamsOnce() {
35        try {
36            if (_paramsAppliedOnce) return;
37
38            const p = window._pendingDashboardParams;
39            if (!p) return;
40
41            const parameters = getParamsApi();
42            if (!parameters) return;
43
44            _paramsAppliedOnce = true;
45
46            parameters.getParameterByName("OfficeId")?.setValue(p.officeId ?? null);
47            parameters.getParameterByName("DateFrom")?.setValue(p.dateFrom ? new Date(p.dateFrom) : null);
48            parameters.getParameterByName("DateTo")?.setValue(p.dateTo ? new Date(p.dateTo) : null);
49        } catch (e) {
50            console.error("applyParamsOnce failed", e);
51        }
52    }
53
54    window.setPendingDashboardParams = function (officeId, dateFrom, dateTo) {
55        window._pendingDashboardParams = { officeId, dateFrom, dateTo };
56        _paramsAppliedOnce = false;
57    }
58
59    window.getcurrdashboardid = function () {
60        if (dashboardControl?.dashboardContainer)
61            return dashboardControl.dashboardContainer().id;
62        else
63            return "";
64    }
65
66    window.dashboardEvents = {
67        onBeforeRender: (args) => {
68            dashboardControl = args.component;
69            DevExpress.Dashboard.ResourceManager.setLocalizationMessages({ "DashboardStringId.ActionExportTo": "Eksportuj do pliku" });
70            DevExpress.Dashboard.ResourceManager.setLocalizationMessages({ "DashboardStringId.MessageLoading": "Pobieranie..." });
71            DevExpress.Dashboard.ResourceManager.setLocalizationMessages({ "DashboardStringId.ActionMaximizeDashboardItem": "Maksymalizuj" });
72            DevExpress.Dashboard.ResourceManager.setLocalizationMessages({ "DashboardStringId.MessageGridHasNoData": "Brak danych" });
73
74            applyParamsOnce();
75        },
76
77        onDashboardInitialized: (args) => {
78            dashboardControl = args.component;
79            if (dashboardControl && dashboardControl.on) {
80                dashboardControl.on('dashboardBeginUpdate', function () {
81                    notifyDotNetSafe('DashboardBeginAsync');
82                });
83
84                dashboardControl.on('dashboardEndUpdate', function () {
85                    notifyDotNetSafe('DashboardEndAsync');
86                });
87            }
88        }
89    }
90
91    window.saveDashboard = function () {
92        try {
93            if (!dashboardControl) {
94                alert('Brak kontrolki dashboard (designer nie jest zainicjalizowany).');
95                return;
96            }
97            var id = getcurrdashboardid();
98            // Jeśli jesteś w trybie projektowania, saveDashboard wyśle definicję do serwera
99            if (dashboardControl.saveDashboard) 
100                dashboardControl.saveDashboard();
101            else if (dashboardControl.commandManager) 
102                dashboardControl.commandManager.execute('save-dashboard'); // fallback
103        }
104        catch (e) {
105            console.error(e);
106            alert('Błąd podczas zapisu pulpitu.');
107        }
108    }

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.