diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-04-19 19:20:59 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-04-19 19:20:59 (GMT) |
commit | 0c0c66adf29b6e3830b67b03a21b77dfb1cbfabf (patch) | |
tree | 2a03727d81f0b5b9720af7033410fa7255e6aca6 | |
parent | 7eed6d7aa3bb7b0ee22fa3cf310976cfbeaf46b8 (diff) | |
parent | f66535fef191f9183fde73a6eeb01e8678593c7e (diff) |
Merge branch 'master' of ssh://git@git.helsinki.at:2342/rhwebimport.git into websocket
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | www/index.html | 5 | ||||
-rw-r--r-- | www/js/shows.js | 15 |
3 files changed, 21 insertions, 4 deletions
@@ -71,8 +71,9 @@ add the following to the virtualhost config: </Files> </Directory> - ProxyPass "/ntp" "ws://localhost:3000/ntp" - ProxyPass "/rhimportd" "ws://localhost:4080/public/socket" + ProxyPass "/ntp" "ws://localhost:3000/ntp" + ProxyPass "/rhimportd" "ws://localhost:4080/public/socket" + ProxyPass "/upload" "http://localhost:4080/public/upload" DocumentRoot /var/www/rhwebimport/www/ <Directory /var/www/rhwebimport/> diff --git a/www/index.html b/www/index.html index eb8e3d2..68b2d36 100644 --- a/www/index.html +++ b/www/index.html @@ -160,7 +160,10 @@ <strong>Tag:</strong> <span id="show-dow"></span> </div> <div class="col-md-2"> - <strong>Rythmus:</strong> <span id="show-rhythm"></span> + <strong>Rythmus:</strong> <span id="show-rhythm-w1" class="label label-default">1</span> + <span id="show-rhythm-w2" class="label label-default">2</span> + <span id="show-rhythm-w3" class="label label-default">3</span> + <span id="show-rhythm-w4" class="label label-default">4</span> </div> <div class="col-md-2"> <strong>Startzeit:</strong> <span id="show-starttime"></span> diff --git a/www/js/shows.js b/www/js/shows.js index 8fcba8b..1086620 100644 --- a/www/js/shows.js +++ b/www/js/shows.js @@ -189,10 +189,23 @@ Rdxport.ShowView = function(model) { Rdxport.ShowView.prototype.render = function() { $('#show-title').text(this.model.title); $('#show-dow').text(weekday[this.model.dayofweek]); - $('#show-rhythm').text(this.model.rhythm); $('#show-starttime').text(this.model.starttime); $('#show-length').text(this.model.length + ' Min.'); + for(var w = 0; w < 4; w++) { + if(this.model.rhythm.charAt(w) == '1') { + var s = $('#show-rhythm-w' + (w+1)).attr('class', 'label') + switch(w+1) { + case 1: s.addClass('label-info'); break; + case 2: s.addClass('label-warning'); break; + case 3: s.addClass('label-success'); break; + case 4: s.addClass('label-danger'); break; + } + } else { + $('#show-rhythm-w' + (w+1)).attr('class', 'label label-default') + } + } + var $tableBody = $('#app-shows table tbody'); $('tr', $tableBody).remove(); |