PageSourceSearch

https://kukucinka.sk/app/pics/jsw/views/elearning/ImageBrowserView.js

js kukucinka.sk collected 2026-10-06 16:53:23 UTC 2,831 bytes, 60 lines download raw bytes

1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ImageBrowserView = void 0;
4var tslib_1 = require("tslib");
5var React = require("react");
6var AppReactUtils_1 = require("../../utils/AppReactUtils");
7var EdupageApp_1 = require("../../EdupageApp");
8var ViewLoadingContainer_1 = require("../../components/ViewLoadingContainer");
9importCss('/elearning/pics/css/etest.css');
10importCss('/egov/pics/css/egov.css');
11importCss('/elearning/pics/css/etestEditor.css');
12importCss('/elearning/pics/css/imageSearch.css');
13importCss('/elearning/pics/css/elearning.css');
14importCss('/elearning/pics/css/ecourse.css');
15importCss('/global/pics/css/material-icons.css');
16importLegacyJsLib('/elearning/pics/js/etest/utilsETest.js');
17importLegacyJsLib('/elearning/pics/js/etest/etestImageBrowser.js');
18importLegacyJsLib('/global/pics/js/jquery/jquery.iframe-transport.js');
19importLegacyJsLib('/global/pics/js/jquery/jquery.fileupload.js');
20importLegacyJsLib('/photos/pics/js/utilsPhotos.js');
21function ImageBrowserView(props) {
22    var _this = this;
23    var mainElemRef = React.useRef(null);
24    var editorWidget = React.useRef(null);
25    var _a = AppReactUtils_1.AppReactUtils.useOnlineData('/elearning/?cmd=ImageBrowser&akcia=getData', { svgOnly: props.svgOnly ? '1' : '' }, props, function (res) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
26        var x;
27        return tslib_1.__generator(this, function (_a) {
28            if (props.opts) {
29                for (x in props.opts) {
30                    res[x] = props.opts[x];
31                }
32            }
33            return [2, res];
34        });
35    }); }), data = _a[0], reload = _a[1], md = _a[2];
36    React.useEffect(function () {
37        EdupageApp_1.EdupageApp.inst.setViewTitle(' ', props.viewid);
38        if (!md)
39            return;
40        var elem = $(mainElemRef.current).find('.app-imagebrowserewidget');
41        if (elem.length == 0)
42            return;
43        elem.html('');
44        var opts = {
45            formurl: '/elearning/?cmd=ImageBrowser',
46            svgOnly: props.svgOnly ? true : false,
47            recent: md.recent || [],
48        };
49        elem.data('returnFunc', function (img) {
50            props.returnFunc(img);
51            EdupageApp_1.EdupageApp.popView();
52        });
53        editorWidget.current = elem.etestImageBrowser(opts).data('publicActions');
54    }, [data, data.status, md]);
55    var loadingContent = '<div class="app-view-loading"></div>';
56    return (React.createElement("div", { ref: mainElemRef },
57        React.createElement(ViewLoadingContainer_1.OnlineDataStatusContainer, { data: data },
58            React.createElement("div", { className: 'app-imagebrowserewidget barReturnElem', dangerouslySetInnerHTML: { __html: loadingContent } }))));
59}
60exports.ImageBrowserView = ImageBrowserView;

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.