summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/index.html12
-rw-r--r--www/js/apps.js19
-rw-r--r--www/js/musicgrid.js35
-rw-r--r--www/js/musicpools.js2
-rw-r--r--www/js/rivendell.rh.js26
5 files changed, 94 insertions, 0 deletions
diff --git a/www/index.html b/www/index.html
index 7939b4a..fda9f7f 100644
--- a/www/index.html
+++ b/www/index.html
@@ -29,6 +29,7 @@
<script src="/js/shows.js"></script>
<script src="/js/jingles.js"></script>
<script src="/js/musicpools.js"></script>
+ <script src="/js/musicgrid.js"></script>
</head>
<body>
@@ -63,6 +64,7 @@
<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">angmeldet als <strong id="username-field">UNKNOWN</strong></span>&nbsp;&nbsp;
@@ -167,6 +169,16 @@
</div>
</div>
+ <div id="app-musicgrid" class="container-fluid">
+ <div class="alertbox"></div>
+ <div class="span12">
+ <h1>Musikgrid</h1>
+ <p>
+ coming soon!
+ </p>
+ </div>
+ </div>
+
</div>
<div id="hiddenTemplates" class="hidden">
diff --git a/www/js/apps.js b/www/js/apps.js
index 32b5966..2b74edf 100644
--- a/www/js/apps.js
+++ b/www/js/apps.js
@@ -24,11 +24,27 @@ var apps_current;
function apps_select(app) {
switch(app) {
+ case "musicgrid":
+ $('#app-shows').hide();
+ $('#nav-btn-shows').removeClass('active');
+ $('#app-jingles').hide();
+ $('#nav-btn-jingles').removeClass('active');
+ $('#app-musicpools').hide();
+ $('#nav-btn-musicpools').removeClass('active');
+
+ $('#app-musicgrid').show();
+ $('#nav-btn-musicgrid').addClass('active');
+
+ apps_current = app;
+ musicgrid_init();
+ break;
case "musicpools":
$('#app-shows').hide();
$('#nav-btn-shows').removeClass('active');
$('#app-jingles').hide();
$('#nav-btn-jingles').removeClass('active');
+ $('#app-musicgrid').hide();
+ $('#nav-btn-musicgrid').removeClass('active');
$('#app-musicpools').show();
$('#nav-btn-musicpools').addClass('active');
@@ -41,6 +57,8 @@ function apps_select(app) {
$('#nav-btn-shows').removeClass('active');
$('#app-musicpools').hide();
$('#nav-btn-musicpools').removeClass('active');
+ $('#app-musicgrid').hide();
+ $('#nav-btn-musicgrid').removeClass('active');
$('#app-jingles').show();
$('#nav-btn-jingles').addClass('active');
@@ -83,6 +101,7 @@ function apps_cleanup() {
shows_cleanup();
jingles_cleanup();
musicpools_cleanup();
+ musicgrid_cleanup();
$(window).off('popstate');
diff --git a/www/js/musicgrid.js b/www/js/musicgrid.js
new file mode 100644
index 0000000..eca1de0
--- /dev/null
+++ b/www/js/musicgrid.js
@@ -0,0 +1,35 @@
+/*
+ * rhwebimport
+ *
+ * Copyright (C) 2014-2015 Christian Pointner <equinox@helsinki.at>
+ * Copyright (C) 2015 Peter Grassberger <petertheone@gmail.com>
+ *
+ * This file is part of rhwebimport.
+ *
+ * rhwebimport is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * rhwebimport is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with rhwebimport. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+'use strict';
+
+var rivendell = null;
+
+function musicgrid_init() {
+ rivendell = new Rivendell.Rivendell(auth_username, auth_token, '/rd-bin/rdxport.cgi');
+ rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
+ //rivendell.getMusicgrid();
+}
+
+function musicgrid_cleanup() {
+ rivendell = null;
+}
diff --git a/www/js/musicpools.js b/www/js/musicpools.js
index a3d9c65..1c968f9 100644
--- a/www/js/musicpools.js
+++ b/www/js/musicpools.js
@@ -20,6 +20,8 @@
* along with rhwebimport. If not, see <http://www.gnu.org/licenses/>.
*/
+'use strict';
+
function musicpools_init() {
}
diff --git a/www/js/rivendell.rh.js b/www/js/rivendell.rh.js
index 136440c..abec2d7 100644
--- a/www/js/rivendell.rh.js
+++ b/www/js/rivendell.rh.js
@@ -25,6 +25,9 @@
Rivendell.Rivendell.prototype.setListDropboxesEndpoint = function(listDropboxesEndpoint) {
this.listDropboxesEndpoint = listDropboxesEndpoint;
};
+Rivendell.Rivendell.prototype.setMusicgridEndpoint = function(musicgridEndpoint) {
+ this.musicgridEndpoint = musicgridEndpoint;
+};
Rivendell.Rivendell.prototype.listDropboxes = function(success) {
var command = {
@@ -44,3 +47,26 @@ Rivendell.Rivendell.prototype.addAndEditCut = function(cartNumber, options, succ
};
// todo: addAndEditCart
+
+// todo: get grid. musicgrid.cgi, username, pw, cmg(get,set), dow, hour, name
+/*Rivendell.Rivendell.prototype.getMusicgrid = function(success) {
+ var command = {
+ COMMAND: 'get',
+ LOGIN_NAME: this.username,
+ PASSWORD: this.token
+ };
+ return $.post(this.musicgridEndpoint, command, success, "xml");
+};*/
+
+// todo: set grid pool
+/*Rivendell.Rivendell.prototype.setMusicgrid = function(dow, hour, name, success) {
+ var command = {
+ COMMAND: 'set',
+ LOGIN_NAME: this.username,
+ PASSWORD: this.token,
+ DOW: dow,
+ HOUR: hour,
+ NAME: name
+ };
+ return $.post(this.musicgridEndpoint, command, success, "xml");
+};*/