mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 17:13:35 +02:00
Red buttons to unload recordings
This commit is contained in:
parent
8060e98bd5
commit
ce86ce4530
2 changed files with 19 additions and 17 deletions
|
@ -29,7 +29,7 @@ body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 50px 0 186px 0;
|
padding: 51px 0 185px 0;
|
||||||
margin: 0 21px 0 21px;
|
margin: 0 21px 0 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,15 +85,17 @@ body {
|
||||||
border-top: 1px solid #1c1c1c;
|
border-top: 1px solid #1c1c1c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#recordings-list tr td:last-child span {
|
#recordings-list input {
|
||||||
font-family: HiFi-Glyphs;
|
height: 22px;
|
||||||
font-size: 24px;
|
width: 22px;
|
||||||
height: 24px;
|
min-width: 22px;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 0 1px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#recordings tfoot {
|
#recordings tfoot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 161px;
|
bottom: 159px;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -203,7 +205,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
#record-controls #checkbox-container {
|
#record-controls #checkbox-container {
|
||||||
margin-top: 33px;
|
margin-top: 31px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#record-controls div.property {
|
#record-controls div.property {
|
||||||
|
|
|
@ -41,7 +41,7 @@ var isUsingToolbar = false,
|
||||||
FINISH_ON_OPEN_ACTION = "finishOnOpen";
|
FINISH_ON_OPEN_ACTION = "finishOnOpen";
|
||||||
|
|
||||||
function stopPlayingRecording(event) {
|
function stopPlayingRecording(event) {
|
||||||
var playerID = event.target.getElementsByTagName("input")[0].value;
|
var playerID = event.target.getAttribute("playerID");
|
||||||
EventBridge.emitWebEvent(JSON.stringify({
|
EventBridge.emitWebEvent(JSON.stringify({
|
||||||
type: EVENT_BRIDGE_TYPE,
|
type: EVENT_BRIDGE_TYPE,
|
||||||
action: STOP_PLAYING_RECORDING_ACTION,
|
action: STOP_PLAYING_RECORDING_ACTION,
|
||||||
|
@ -61,33 +61,33 @@ function updateRecordings() {
|
||||||
var tbody,
|
var tbody,
|
||||||
tr,
|
tr,
|
||||||
td,
|
td,
|
||||||
span,
|
|
||||||
input,
|
input,
|
||||||
ths,
|
ths,
|
||||||
tds,
|
tds,
|
||||||
length,
|
length,
|
||||||
i,
|
i,
|
||||||
HIFI_GLYPH_CLOSE_SMALL = "C";
|
HIFI_GLYPH_CLOSE = "w";
|
||||||
|
|
||||||
recordingsBeingPlayed.sort(orderRecording);
|
recordingsBeingPlayed.sort(orderRecording);
|
||||||
|
|
||||||
tbody = document.createElement("tbody");
|
tbody = document.createElement("tbody");
|
||||||
tbody.id = "recordings-list";
|
tbody.id = "recordings-list";
|
||||||
|
|
||||||
|
|
||||||
|
// <tr><td>Filename</td><td><input type="button" class="glyph red" value="w" playerID=id /></td></tr>
|
||||||
for (i = 0, length = recordingsBeingPlayed.length; i < length; i += 1) {
|
for (i = 0, length = recordingsBeingPlayed.length; i < length; i += 1) {
|
||||||
tr = document.createElement("tr");
|
tr = document.createElement("tr");
|
||||||
td = document.createElement("td");
|
td = document.createElement("td");
|
||||||
td.innerHTML = recordingsBeingPlayed[i].filename.slice(4);
|
td.innerHTML = recordingsBeingPlayed[i].filename.slice(4);
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
td = document.createElement("td");
|
td = document.createElement("td");
|
||||||
span = document.createElement("span");
|
|
||||||
span.innerHTML = HIFI_GLYPH_CLOSE_SMALL;
|
|
||||||
span.addEventListener("click", stopPlayingRecording);
|
|
||||||
input = document.createElement("input");
|
input = document.createElement("input");
|
||||||
input.setAttribute("type", "hidden");
|
input.setAttribute("type", "button");
|
||||||
input.setAttribute("value", recordingsBeingPlayed[i].playerID);
|
input.setAttribute("class", "glyph red");
|
||||||
span.appendChild(input);
|
input.setAttribute("value", HIFI_GLYPH_CLOSE);
|
||||||
td.appendChild(span);
|
input.setAttribute("playerID", recordingsBeingPlayed[i].playerID);
|
||||||
|
input.addEventListener("click", stopPlayingRecording);
|
||||||
|
td.appendChild(input);
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
tbody.appendChild(tr);
|
tbody.appendChild(tr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue