summaryrefslogtreecommitdiff
path: root/SparkleShare/Common/HTML/event-log.html
blob: 3e6d9f5e736ea9f9974df5016c06d2939fc5fe7f (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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!doctype html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>SparkleShare Event Log</title>
        
        <script type="text/javascript"><!-- $jquery --></script>
        <script type="text/javascript">
          $(document).ready(function () {
              $('dl dd:nth-child(-n+10)').css('display', 'block');
              $('.day-entry-content .event-entry:last-child').css('border', 'none');
            
              $('a').not('.show').click(function (event) {
                  window.external.LinkClicked($(this).attr("href"));
                  event.preventDefault();
              });

              // Update the Today and Yesterday labels after midnight
              var midnight_interval = setInterval (function(){
                var date = new Date();

                if ((date.getTime() / 1000) >= <!-- $midnight -->) {
                  $("#today").html($("#today").attr("name"));
                  $("#yesterday").html($("#yesterday").attr("name"));

                  clearInterval(midnight_interval);
                }
              }, 60 * 1000);

              // Hide the 'Show all' link when there are fewer than 10 events
              $('.show').each (function () {
                var entry_count = $(this).parent ().find ('dl').children ().length;

                if (entry_count > 10)
                  $(this).html ('Show all ' + entry_count);
                else
                  $(this).hide ();
              });

              // When 'Show all' is clicked, show all collapsed events
              $('.show').click(function () {
                 $(this).parent ().find ('dl').children ().show ();
                 $(this).hide ();
              });
          });
        </script>

        <style>
            * {
                box-sizing: border-box;
                -webkit-box-sizing: border-box;
            }

            body {
                background-color: #fefefe;
                color: <!-- $body-color -->;
                font-size: <!-- $body-font-size -->;
                font-family: -apple-system, "<!-- $body-font-family -->";
                margin: 0;
                -webkit-user-select: none;
                overflow-x: hidden;
            }

            a {
                color: <!-- $a-color -->;
                text-decoration: none;
                outline: 0;
            }
            
            a.show {
                font-size: 80%;
            }

            a:hover {
                color: <!-- $a-hover-color -->;
                text-decoration: underline;
                cursor: pointer;
            }
            
            small, small a, small a:hover {
                font-size: <!-- $small-font-size -->;
                color: <!-- $secondary-font-color -->;
            }
            
            dl {
                padding : 6px 0 0 0;
                margin: 6px 0 9px 0;
                table-layout: fixed;
            }
            
            dd {
                display: none;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                width: 90%;
                padding: 0 0 1px 20px;
                margin: 0 0 4px 0;
                background-repeat: no-repeat;
                background-position: center left;
            }

            .day-entry-header {
                color: #aaa;
                margin-left: 32px;
                padding-top: 22px;
                font-weight: bold;
            }
            
            .history-header {
                color: #aaa;
                padding-top: 22px;
                float: left;
                width: 90%;
                margin-left: 32px;
                margin-right: 32px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            
            .event-entry {
                padding: 0 14px 0 64px;
                margin: 28px 32px 28px 32px;
                background-repeat: no-repeat;
                background-position: 36px 24px;
                min-height: 48px;
            }
            
            .event-user-name {
                font-weight: bold;
            }
            
            .event-avatar {
                width: 48px;
                height: 48px;
                border-radius: 4px;
                position: absolute;
                left: 32px;
            }

            .event-folder a {
                color: <!-- $secondary-font-color -->;
                font-size: 80%;
            }

            .separator {
                border-bottom: 1px #ccc solid;
                margin: 24px 0 24px 0;
            }

            dd small {
                display: inline-block;
                width: 36px;
            }

            .added {
                background-image: url('<!-- $document-added-background-image -->');
            }

            .deleted {
                background-image: url('<!-- $document-deleted-background-image -->');
            }

            .edited {
                background-image: url('<!-- $document-edited-background-image -->');
            }

            .moved {
                background-image: url('<!-- $document-moved-background-image -->');
            }
            
            table {
                width: 100%;
            }
            
            .table-wrapper {
                padding: 64px 32px;
            }
            
            td {
              padding: 0;
              margin: 0;
            }
            
            td.name {
                font-weight: bold;
                width: 45%;
            }           
            
            td.time {
                color: <!-- $secondary-font-color -->;
                padding-right: 9px;
                font-size: <!-- $small-font-size -->;
            }
            
            td.date {
                color: <!-- $secondary-font-color -->;
                text-align: right;
                padding-right: 6px;
                font-size: <!-- $small-font-size -->;
            }  
            
            td.restore {
                text-align: right;
                font-size: <!-- $small-font-size -->;
            }
            
            td.avatar {
                width: 32px;
            }
            
            td.avatar img {
                margin-top: 2px;
                border-radius: 3px;
                width: 24px;
                height: 24px;
            }
        </style>
    </head>
    <body oncontextmenu="return false;">
        <!-- $event-log-content -->
    </body>
</html>