summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/index.html42
-rw-r--r--www/js/jingles.js44
-rw-r--r--www/js/shows.js26
-rw-r--r--www/js/utils.js22
-rw-r--r--www/styles/main-style.css50
-rw-r--r--www/styles/shows.css31
6 files changed, 137 insertions, 78 deletions
diff --git a/www/index.html b/www/index.html
index 5343b90..b549e41 100644
--- a/www/index.html
+++ b/www/index.html
@@ -9,25 +9,11 @@
<link rel="shortcut icon" href="/img/favicon.ico" />
<link href="/javascript/twitter-bootstrap/css/bootstrap.css" rel="stylesheet">
+ <link href="/styles/main-style.css" rel="stylesheet">
<link href="/styles/auth.css" rel="stylesheet">
<link href="/styles/shows.css" rel="stylesheet">
<link href="/styles/jingles.css" rel="stylesheet">
<link href="/styles/musicpools.css" rel="stylesheet">
- <style type="text/css">
- body {
- background-color: #eee;
- padding-top: 60px;
- padding-bottom: 40px;
- }
-
- .btn i[class*='icon-'] {
- vertical-align: middle;
- }
-
- .progress {
- margin-bottom: 0;
- }
- </style>
<link href="/javascript/twitter-bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<script src="/javascript/jquery/jquery.min.js"></script>
<script src="/javascript/twitter-bootstrap/js/bootstrap.min.js"></script>
@@ -103,13 +89,13 @@
<div class="row-fluid">
<div class="span10">
<form class="well form-inline">
- <label class="control-label" for="select-dropbox"><h3>Sendung auswählen</h3></label>&nbsp;&nbsp;
- <select id="show-selector" onchange="shows_showSelected()">
+ <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="span2">
- <div id="shows-clock">
+ <div id="clock">
<span class="current-week"></span>
<span class="clock-date"></span>
<span class="clock-time"></span>
@@ -160,11 +146,21 @@
<div id="app-jingles" class="container-fluid">
<div class="alertbox"></div>
- <div class="span12">
- <h1>Jingles</h1>
- <p>
- coming soon!
- </p>
+ <div class="row-fluid">
+ <div class="span10">
+ <form class="well form-inline">
+ <label class="control-label" for="show-selector"><h3>Jingle Gruppe auswählen</h3></label>&nbsp;&nbsp;
+ <select id="jingle-selector" class="main-selector" onchange="jingle_groups_showSelected()">
+ </select>
+ </form>
+ </div>
+ <div class="span2">
+ <div id="clock">
+ <span class="current-week"></span>
+ <span class="clock-date"></span>
+ <span class="clock-time"></span>
+ </div>
+ </div>
</div>
</div>
diff --git a/www/js/jingles.js b/www/js/jingles.js
index c8a5c60..3314572 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -19,8 +19,52 @@
* along with rhwebimport. If not, see <http://www.gnu.org/licenses/>.
*/
+jingle_groups_list = [];
+
+function jingle_groups_updateList(data, status, req) {
+ jingle_groups_list = [];
+ $('#show-selector').find('option').remove();
+ var dblist = $(data).find("dropboxList");
+ var dbs = dblist.children();
+ dbs.each(function() {
+ type = $(this).find('type').text();
+ if (type == 'jingle') {
+ var jingle_group = {
+ title: $(this).find('jingle-title').text(),
+ group: {
+ name: $(this).find('group').text(),
+ description: $(this).find('group-description').text(),
+ lowcart: $(this).find('group-low-cart').text(),
+ highcart: $(this).find('group-high-cart').text(),
+ },
+ normlevel: $(this).find('normalization-level').text(),
+ trimlevel: $(this).find('autotrim-level').text(),
+ };
+
+ var name = jingle_group.title;
+ $('#jingle-selector').append($('<option>').attr('value', jingle_group.id).text(name));
+
+ jingle_groups_list.push(jingle_group);
+ }
+ });
+ console.log(jingle_groups_list);
+ //$('#jingle-selector').val(jingles_currentid);
+ //shows_showSelected();
+}
+
function jingles_init() {
+ //jingles_currentid = sessionStorage.getItem("jingles_currentid");
+ jingle_groups_list = [];
+ data = { LOGIN_NAME: auth_username, PASSWORD: auth_token };
+ $.post("/rh-bin/listdropboxes.cgi", data, jingle_groups_updateList, "xml");
+ drawClock('Do, 1.1.1970', '00:00:00', 0);
+ clock_add_callback(drawClock);
}
function jingles_cleanup() {
+ sessionStorage.removeItem("jingles_currentid");
+ delete jingles_currentid;
+ jingle_groups_list = [];
+ //jingles_group_carts = {};
+ //jingles_log_carts = [];
}
diff --git a/www/js/shows.js b/www/js/shows.js
index 13bc9be..5fd306c 100644
--- a/www/js/shows.js
+++ b/www/js/shows.js
@@ -321,35 +321,13 @@ function shows_updateList(data, status, req) {
shows_showSelected();
}
-function shows_drawClock(date, time, week) {
- $('#shows-clock span.clock-date').text(date);
- $('#shows-clock span.clock-time').text(time);
- var weekspan = $('#shows-clock span.current-week').removeClass().addClass('current-week').addClass('label');
- switch(week) {
- case 1:
- weekspan.addClass('label-info').text('Woche 1');
- break;
- case 2:
- weekspan.addClass('label-warning').text('Woche 2');
- break;
- case 3:
- weekspan.addClass('label-success').text('Woche 3');
- break;
- case 4:
- weekspan.addClass('label-important').text('Woche 4');
- break;
- default:
- weekspan.addClass('label-inverse').text('Fehler');
- }
-}
-
function shows_init() {
shows_currentid = sessionStorage.getItem("shows_currentid");
shows_list = [];
data = { LOGIN_NAME: auth_username, PASSWORD: auth_token };
$.post("/rh-bin/listdropboxes.cgi", data, shows_updateList, "xml")
- shows_drawClock('Do, 1.1.1970', '00:00:00', 0);
- clock_add_callback(shows_drawClock);
+ drawClock('Do, 1.1.1970', '00:00:00', 0);
+ clock_add_callback(drawClock);
}
function shows_cleanup() {
diff --git a/www/js/utils.js b/www/js/utils.js
index af0b479..e2c494b 100644
--- a/www/js/utils.js
+++ b/www/js/utils.js
@@ -195,3 +195,25 @@ function locationHashValue() {
var hash = window.location.hash.match(/#([a-z]+)\/?.*/);
return hash ? hash[1] : '';
}
+
+function drawClock(date, time, week) {
+ $('#clock span.clock-date').text(date);
+ $('#clock span.clock-time').text(time);
+ var weekspan = $('#clock span.current-week').removeClass().addClass('current-week').addClass('label');
+ switch(week) {
+ case 1:
+ weekspan.addClass('label-info').text('Woche 1');
+ break;
+ case 2:
+ weekspan.addClass('label-warning').text('Woche 2');
+ break;
+ case 3:
+ weekspan.addClass('label-success').text('Woche 3');
+ break;
+ case 4:
+ weekspan.addClass('label-important').text('Woche 4');
+ break;
+ default:
+ weekspan.addClass('label-inverse').text('Fehler');
+ }
+}
diff --git a/www/styles/main-style.css b/www/styles/main-style.css
new file mode 100644
index 0000000..756ea15
--- /dev/null
+++ b/www/styles/main-style.css
@@ -0,0 +1,50 @@
+body {
+ background-color: #eee;
+ padding-top: 60px;
+ padding-bottom: 40px;
+}
+
+.btn i[class*='icon-'] {
+ vertical-align: middle;
+}
+
+.progress {
+ margin-bottom: 0;
+}
+
+.main-selector {
+ height: 2.5em;
+ width: 100%;
+}
+
+#clock {
+ display: block;
+ width: 100%;
+ height: 100%;
+ vertical-align: middle;
+ text-align: center;
+ margin: 0;
+}
+
+#clock span {
+ display:table;
+ margin:0 auto;
+}
+
+#clock span.current-week {
+ margin-top: 1em;
+ padding: 0.3em 2em;
+ font-size: 1.2em;
+}
+
+#clock span.clock-date {
+ padding: 0.2em;
+ font-weight: bold;
+ font-size: 1.4em;
+}
+
+#clock span.clock-time {
+ padding: 0.2em;
+ font-weight: bold;
+ font-size: 1.6em;
+}
diff --git a/www/styles/shows.css b/www/styles/shows.css
index 73bc0e3..15ecbbc 100644
--- a/www/styles/shows.css
+++ b/www/styles/shows.css
@@ -26,10 +26,6 @@
margin-top: 1.5em;
margin-bottom: 1em;
}
-#show-selector {
- height: 2.5em;
- width: 100%;
-}
#current-week {
display: block;
margin: 0.5em;
@@ -58,30 +54,3 @@
#shows-upload div.modal-body form div.dz-preview {
display: none;
}
-#shows-clock {
- display: block;
- width: 100%;
- height: 100%;
- vertical-align: middle;
- text-align: center;
- margin: 0;
-}
-#shows-clock span {
- display:table;
- margin:0 auto;
-}
-#shows-clock span.current-week {
- margin-top: 1em;
- padding: 0.3em 2em;
- font-size: 1.2em;
-}
-#shows-clock span.clock-date {
- padding: 0.2em;
- font-weight: bold;
- font-size: 1.4em;
-}
-#shows-clock span.clock-time {
- padding: 0.2em;
- font-weight: bold;
- font-size: 1.6em;
-}