Overview
Comment:Modif pour pouvoir utiliser la galerie en dehors de l'admin
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 85814d38766a890b182c80305e1329bd83fb1fcc
User & Date: bohwaz on 2015-04-14 16:26:03
Other Links: manifest | tags
Context
2015-04-14
16:50
Correction suppression fichier + lien vers des fichiers dans le wiki-texte check-in: 38e88e8e43 user: bohwaz tags: trunk
16:26
Modif pour pouvoir utiliser la galerie en dehors de l'admin check-in: 85814d3876 user: bohwaz tags: trunk
15:33
Liste des pages par date de création + amélioration import syntaxe skriv et html check-in: f9b744bba2 user: bohwaz tags: trunk
Changes

Modified src/www/admin/static/scripts/wiki_gallery.js from [ad323652ad] to [295d9c1bd1].

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
(function () {
    g.onload(function () {
        var gallery = document.getElementsByClassName('gallery');

        if (gallery.length == 1 && document.querySelector)
        {
            var items = gallery[0].getElementsByTagName('li');

            for (var i = 0; i < items.length; i++)
            {
                var a = items[i].querySelector('figure > a');
                a.pos = i;
                a.onclick= function (e) {
                    e.preventDefault();
                    openImageBrowser(items, this.pos);
                    return false;
                };
            }
        }
    });






    function openImageBrowser(items, pos)
    {
        var div = document.createElement('div');
        div.className = 'imageBrowser';

        var img = document.createElement('img');

|

















|
>
>
>
>
>







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
(function () {
    var enableGallery = function () {
        var gallery = document.getElementsByClassName('gallery');

        if (gallery.length == 1 && document.querySelector)
        {
            var items = gallery[0].getElementsByTagName('li');

            for (var i = 0; i < items.length; i++)
            {
                var a = items[i].querySelector('figure > a');
                a.pos = i;
                a.onclick= function (e) {
                    e.preventDefault();
                    openImageBrowser(items, this.pos);
                    return false;
                };
            }
        }
    };

    if (document.addEventListener)
        document.addEventListener('DOMContentLoaded', enableGallery, false);
    else
        document.attachEvent('onDOMContentLoaded', callback);

    function openImageBrowser(items, pos)
    {
        var div = document.createElement('div');
        div.className = 'imageBrowser';

        var img = document.createElement('img');

Modified src/www/admin/static/wiki.css from [515065cfdc] to [bda497e43c].

56
57
58
59
60
61
62

63
64
65
66
67
68

69
70
71
72
73



































    margin: 0 auto 8pt auto;
}

.wikiContent figure.image.gauche {
    max-width: 200px;
    float: left;
    margin: 0 8pt 4pt 0;

}

.wikiContent figure.image.droite {
    max-width: 200px;
    float: right;
    margin: 0 0 4pt 8pt;

}

.wikiContent figure.image.gauche figcaption, .wikiContent figure.image.droite figcaption {
    font-size: .8em;
}










































>






>





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    margin: 0 auto 8pt auto;
}

.wikiContent figure.image.gauche {
    max-width: 200px;
    float: left;
    margin: 0 8pt 4pt 0;
    clear: left;
}

.wikiContent figure.image.droite {
    max-width: 200px;
    float: right;
    margin: 0 0 4pt 8pt;
    clear: right;
}

.wikiContent figure.image.gauche figcaption, .wikiContent figure.image.droite figcaption {
    font-size: .8em;
}


.imageBrowser {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.75);
    text-align: center;
}

.imageBrowser figure {
    margin: 5%;
    width: 90%;
    height: 90%;
}

.imageBrowser figure img {
    top: 50%;
    transform: translateY(-50%);
    position: relative;
    max-width: 100%;
    width: auto;
    height: auto;
    background: #fff;
    padding: 2%;
    max-height: 90%;
    max-width: 90%;
    border-radius: .5em;
    cursor: pointer;
    transition: all .5s;
}