Welcome to mirror list, hosted at ThFree Co, Russian Federation.

browser.twig « templates « assets - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7754ae38332f21b2abb0bc6e7a6343dc77532d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html xml:lang="{{lang.applocale}}" lang="{{lang.applocale}}" dir="{{lang.applangdir}}">

    <head data-headertemplate="{{headertemplate}}">
        <link rel="stylesheet" href="{{subfolder}}/assets/vendor/jstree/themes/phppgadmin/style.css" /> {% include 'components/common_head.twig' %}

        <script src="{{subfolder}}/assets/vendor/jstree/jstree.min.js"></script>
        <style type="text/css">
        .refreshTree {
            position: absolute;
            right: 0;
            z-index: 1000;
        }
        </style>
    </head>

    <body class="browser">

        <div dir="{{lang.applangdir}}">

            <div class="logo">
                <a href="{{subfolder}}/" target="_parent">{{appName}}</a>
            </div>
            <div class="refreshTree">
                <a href="{{subfolder}}/src/views/browser" target="browser">
                        <img src="{{icon.Refresh}}" alt="{{lang.strrefresh}}" title="{{lang.strrefresh}}" />
                    </a>
            </div>

            <div id="lazy" class="demo"></div>

        </div>

        <script>
        window.jsTree = $('#lazy').jstree({
            "state": {
                "key": "jstree"
            },
            "plugins": ["state"],
            'core': {
                'data': {
                    "url": function (node) {
                        if (node.id === '#') {
                            return '{{subfolder}}/src/views/browser?action=tree';
                        } else {
                            return node.original.url;
                        }
                    }
                }
            }
        });
        if(parent.frames && parent.frames.detail) {
             parent.frames.detail.jsTree=window.jsTree;
        }

        $('#lazy').on("activate_node.jstree", function (e, data) {
            if (window.parent.frames.detail) {
                window.parent.frames.detail.location.replace(data.node.a_attr.href);
            }
        });
        $('#lazy').on("loaded.jstree", function (e, data) {
            $('#lazy').data('jstree').show_dots();
        });
        $('#lazy').on('click','.jstree-anchor',function(){
            console.log(this);
        });
        </script>

    </body>

</html>