Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/welle-cli/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 7pt;
font-size: 12pt;
border-radius: 4px;
}
canvas {
Expand All @@ -64,7 +64,7 @@
height: 100%;
overflow: auto;
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.9);
background-color: rgba(0,0,0,0.1);
}
.slide-modal-content {
margin: auto;
Expand All @@ -79,7 +79,8 @@
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
height: 15px;
background-color: rgba(0,0,0,0.4);
}
.slideclose {
position: absolute;
Expand Down
16 changes: 14 additions & 2 deletions src/welle-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var png_chevron_right = "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQ

var png_chevron_down = "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB0SURBVEiJ7Y87CoAwEAVHD2khqIUgCF5HUPBzUL9NgiGoSKKN7MAW4cEMAUEQnlAAycUWA6WPPAcWdZm1RcAErEDlGmiATd3M8ZNYvfXWuQYCoLUijSXvgdA1oCO1ITRv8JXfRV6Tn0XGt+VmJP1KLgh/ZQd6AiOdJgUioQAAAABJRU5ErkJggg=="

var show=0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give a more meaningful name to that variable


window.onload = function() {
var chevron_right = '<img width=24 height=24 src="data:image/png;base64,' +
png_chevron_right + '" />';
Expand Down Expand Up @@ -210,7 +212,7 @@ function playerLoad() {
}

function setPlayerSource(sid) {
document.getElementById("player").src = "/stream/" + sid;
document.getElementById("player").src = "/mp3/" + sid;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erm, is that correct?

playerLoad();
}

Expand All @@ -228,13 +230,18 @@ function showSlide(sid, last_update_time) {
var last_update = new Date(last_update_time * 1000);
slidecaption.innerHTML = last_update;
slide_modal.style.display = "block";
show=last_update_time;
console.log(slideimg.src)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the console.log

}

var slideclose = document.getElementsByClassName("slideclose")[0];
slideclose.onclick = function() {
slide_modal.style.display = "none";
show=0;
}



function parseTemplate(template, data) {
return template.replace(/\$\{(\w+)\}/gi, function(match, parensMatch) {
if (data[parensMatch] !== undefined) {
Expand Down Expand Up @@ -359,6 +366,12 @@ function populateEnsembleinfo() {

s["dls"] = "";

global_service_mot_time=service.mot.time;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this global_service_mot_time?

if (service.mot.time>show && show ) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent the code with four spaces, not tabs

var tempo = service.mot.time;
showSlide(parseInt(service.sid), service.mot.time);
}

if (service.mot && service.mot.time > 0) {
s["dls"] += '<button type=button onclick="showSlide(';
s["dls"] += service.sid + ', ' + service.mot.time;
Expand Down Expand Up @@ -580,4 +593,3 @@ function populateConstellation() {
r.send(null);
}