summaryrefslogtreecommitdiff
path: root/www/index.html
blob: aa780d99a42442a1ba79a14e0fd58b763688257c (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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<!DOCTYPE HTML>
<html>
 <head>
  <title>Radio Helsinki - Automation Import</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="Importtool for Radio Helsinki">
  <meta name="author" content="Christian Pointner <equinox@helsinki.at>, Peter Grassberger <petertheone@gmail.com>">

  <link rel="shortcut icon" href="/img/favicon.ico" />
  <link href="/javascript/bootstrap/css/bootstrap.css" rel="stylesheet">
  <link href="/styles/rhwebimport.css" rel="stylesheet">
  <script src="/javascript/jquery/jquery.min.js"></script>
  <script src="/javascript/bootstrap/js/bootstrap.min.js"></script>
  <script src="/js/rhwebimport.js"></script>
 </head>
 <body>

  <div class="container">

    <div id="loginbox">

      <form id="loginform" class="form-auth" role="form">
        <img src="/img/helsinki.png" alt="radio helsinki logo" />
        <h1 class="form-auth-heading">Radio Helsinki - Import</h1>
        <input id="username" type="text" class="form-control" placeholder="Benutzername" required autofocus>
        <input id="password" type="password" class="form-control" placeholder="Passwort" required>
        <div class="alertbox"></div>
        <button class="btn btn-primary btn-lg" type="submit"><i class="icon-user icon-white"></i> Anmelden</button>
      </form>

    </div>

    <div id="mainwindow">

      <nav class="navbar navbar-inverse navbar-default navbar-fixed-top">
        <div class="container-fluid">
          <div class="navbar-header">
            <!--<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </a>-->
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <span class="navbar-brand">Radio Helsinki - Import</span>

            <!--<div class="nav-collapse">
              <ul class="nav">
                <li id="nav-btn-shows"><a href="/shows/" onclick="event.preventDefault(); apps_select('shows')">Sendungen</a></li>
                <li id="nav-btn-jingles"><a href="/jingles/" onclick="event.preventDefault(); apps_select('jingles')">Jingles</a></li>
                <li id="nav-btn-musicpools"><a href="/musicpools/" onclick="event.preventDefault(); apps_select('musicpools')">Musikpools</a></li>
                <li id="nav-btn-musicgrid"><a href="/musicgrid/" onclick="event.preventDefault(); apps_select('musicgrid')">Musikgrid</a></li>
              </ul>
              <form id="logoutform" class="navbar-form pull-right">
                <span class="navbar-text">angemeldet als <strong id="username-field">UNKNOWN</strong></span>&nbsp;&nbsp;
                <button style="margin-top: 0;" type="button" class="btn btn-danger btn-sm" onclick="auth_logout()">
                  <i class="icon-off icon-white"></i> Abmelden
                </button>
              </form>
            </div>-->

            <div class="collapse navbar-collapse navbar-right" id="navbar-collapse-1">
              <ul class="nav navbar-nav">
                <li id="nav-btn-shows"><a href="/shows/" onclick="event.preventDefault(); apps_select('shows')">Sendungen</a></li>
                <li id="nav-btn-jingles"><a href="/jingles/" onclick="event.preventDefault(); apps_select('jingles')">Jingles</a></li>
                <li id="nav-btn-musicpools"><a href="/musicpools/" onclick="event.preventDefault(); apps_select('musicpools')">Musikpools</a></li>
                <li id="nav-btn-musicgrid"><a href="/musicgrid/" onclick="event.preventDefault(); apps_select('musicgrid')">Musikgrid</a></li>
              </ul>

              <form id="logoutform" class="navbar-form pull-right">
                <p class="navbar-text">angemeldet als <strong id="username-field">UNKNOWN</strong></p>
                <button type="button" class="btn btn-danger btn-sm" onclick="auth_logout()">
                  <span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> Abmelden
                </button>
              </form>
            </div>

          </div>
        </div>
      </nav>

      <div class="modal hide fade" id="uploadModal">
        <div class="modal-header">
          <a class="close" data-dismiss="modal">&times;</a>
          <h3>Datei auswählen...</h3>
        </div>
        <div class="modal-body">
        </div>
        <div class="modal-footer">
          <button class="btn" data-dismiss="modal">Abbrechen</button>
          <button class="btn btn-primary" id="uploadModal-confirm" disabled="disabled">Importieren</button>
        </div>
      </div>

      <div class="modal hide fade" id="musicpoolModal">
        <div class="modal-header">
          <a class="close" data-dismiss="modal">&times;</a>
          <h3>Musikpool auswählen</h3>
        </div>
        <div class="modal-body">
          <table class="table table-striped">
            <thead>
            <tr>
              <th>Clock</th>
              <th>Title</th>
              <th>Ausgewählt</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
          </table>
        </div>
        <div class="modal-footer">
          <button class="btn btn-default" data-dismiss="modal">Abbrechen</button>
        </div>
      </div>

      <div id="app-shows" class="container-fluid">
        <div class="alertbox"></div>
        <div class="row">
          <div class="col-md-10">
            <form class="well form-inline">
              <!-- todo: fix html error: h3 is not allowed in label -->
              <label class="control-label" for="show-selector">
                <h3>Sendung auswählen</h3>
              </label>&nbsp;&nbsp;
              <select id="show-selector" class="main-selector" onchange="shows_showSelected()">
              </select>
            </form>
          </div>
          <div class="col-md-2">
            <div id="clock">
              <span class="current-week"></span>
              <span class="clock-date"></span>
              <span class="clock-time"></span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <h2 id="show-title"></h2>
          </div>
        </div>
        <div class="row" id="show-details">
          <div class="col-md-2">&nbsp;</div>
          <div class="col-md-2">
            <strong>Tag:</strong> <span id="show-dow"></span>
          </div>
          <div class="col-md-2">
            <strong>Rythmus:</strong> <span id="show-rhythm"></span>
          </div>
          <div class="col-md-2">
            <strong>Startzeit:</strong> <span id="show-starttime"></span>
          </div>
          <div class="col-md-2">
            <strong>Dauer:</strong> <span id="show-length"></span>
          </div>
          <div class="col-md-2">&nbsp;</div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <table class="table table-striped" id="show-carts">
              <thead>
                <tr>
                  <th>Cart #</th>
                  <th>Titel</th>
                  <th>Länge</th>
                  <th>importiert</th>
                  <th># gespielt</th>
                  <th>zuletzt gespielt</th>
                  <th>Aktionen</th>
                </tr>
              </thead>
              <tbody>
              </tbody>
            </table>
          </div>
        </div>
      </div>

      <div id="app-jingles" class="container-fluid">
        <div class="alertbox"></div>

        <div class="groups">

        </div>

      </div>

      <div id="app-musicpools" class="container-fluid">
        <div class="alertbox"></div>
        <div class="row">
          <form class="well form-inline">
            <!-- todo: fix html error: h3 is not allowed in label -->
            <label class="control-label" for="musicpool-selector">
              <h3>Musikpool auswählen</h3>
            </label>&nbsp;&nbsp;
            <select id="musicpool-selector" class="main-selector">
            </select>
          </form>
        </div>
        <div class="musicpoolContainer">

        </div>
      </div>

      <div id="app-musicgrid" class="container-fluid">
        <div class="alertbox"></div>
        <h1>Musikgrid</h1>
        <table class="table table-striped">
          <thead>
          <tr>
            <th></th>
            <th>00:00</th><th>01:00</th><th>02:00</th><th>03:00</th>
            <th>04:00</th><th>05:00</th><th>06:00</th><th>07:00</th>
            <th>08:00</th><th>09:00</th><th>10:00</th><th>11:00</th>
            <th>12:00</th><th>13:00</th><th>14:00</th><th>15:00</th>
            <th>16:00</th><th>17:00</th><th>18:00</th><th>19:00</th>
            <th>20:00</th><th>21:00</th><th>22:00</th><th>23:00</th>
          </tr>
          </thead>
          <tbody>
          <tr data-dow="1">
            <th>Montag</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          <tr data-dow="2">
            <th>Dienstag</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          <tr data-dow="3">
            <th>Mittwoch</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          <tr data-dow="4">
            <th>Donnerstag</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          <tr data-dow="5">
            <th>Freitag</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          <tr data-dow="6">
            <th>Samstag</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          <tr data-dow="0">
            <th>Sonntag</th>
            <td data-hour="0"></td><td data-hour="1"></td><td data-hour="2"></td><td data-hour="3"></td>
            <td data-hour="4"></td><td data-hour="5"></td><td data-hour="6"></td><td data-hour="7"></td>
            <td data-hour="8"></td><td data-hour="9"></td><td data-hour="10"></td><td data-hour="11"></td>
            <td data-hour="12"></td><td data-hour="13"></td><td data-hour="14"></td><td data-hour="15"></td>
            <td data-hour="16"></td><td data-hour="17"></td><td data-hour="18"></td><td data-hour="19"></td>
            <td data-hour="20"></td><td data-hour="21"></td><td data-hour="22"></td><td data-hour="23"></td>
          </tr>
          </tbody>
        </table>
      </div>

    </div>

    <div id="hiddenTemplates" class="hidden">

      <div class="row group jingleGroupTemplate">
        <div class="col-md-12">
          <h2></h2>
          <table class="table table-striped">
            <thead>
            <tr>
              <th>Cut #</th>
              <th>Titel</th>
              <th>Aktionen</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
            <tfoot>
            </tfoot>
          </table>
          <button class="uploadButton btn btn-success"><i class="glyphicon glyphicon-upload glyphicon-white"></i> Importieren</button>
        </div>
      </div>

      <div class="row musicpool musicpoolTemplate">
        <div class="col-md-12">
          <h2></h2>
          <table class="table table-striped">
            <thead>
            <tr>
              <th>Cart #</th>
              <th>Titel</th>
              <th>Länge</th>
              <th>importiert</th>
              <th># gespielt</th>
              <th>zuletzt gespielt</th>
              <th>Aktionen</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
            <tfoot>
            </tfoot>
          </table>
          <button class="uploadButton btn btn-success"><i class="glyphicon glyphicon-upload glyphicon-white"></i> Importieren</button>
        </div>
      </div>

      <table>
        <tr class="progressBar progressBarTemplate jingles">
          <td class="file-bytes">
            beginne...
          </td>
          <td>
            <div class="progress"><div class="bar" style="width: 0%;"></div></div>
          </td>
          <td>
            <button class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-remove glyphicon-white"></i> Abbrechen</button>
          </td>
        </tr>
      </table>

      <table>
        <tr class="progressBar progressBarTemplate musicpools">
          <td class="cart-number">
            ...
          </td>
          <td class="file-name">
            ...
          </td>
          <td class="file-bytes">
            beginne...
          </td>
          <td colspan="3">
            <div class="progress"><div class="bar" style="width: 0%;"></div></div>
          </td>
          <td>
            <button class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-remove glyphicon-white"></i> Abbrechen</button>
          </td>
        </tr>
      </table>

    </div>

  </div>

  <script type="text/javascript">
    auth_init();
    apps_init();
    clock_init();
  </script>

 </body>
</html>