From 27eb9b9fac8f795886f115fb02ed94a3db3ba642 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 2 Nov 2017 21:26:13 +0100 Subject: [PATCH] Add a quick reference HTML page for quick lower thirds. --- quickhelp.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ quickhelp.js | 26 +++++++++++++++++++++++ quickl3.js | 1 + 3 files changed, 83 insertions(+) create mode 100644 quickhelp.html create mode 100644 quickhelp.js diff --git a/quickhelp.html b/quickhelp.html new file mode 100644 index 0000000..e0da790 --- /dev/null +++ b/quickhelp.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + +

Team 1

+

+ +

+ + +

Team 2

+

+ +

+ + +

Calls

+ + + + diff --git a/quickhelp.js b/quickhelp.js new file mode 100644 index 0000000..12ecef5 --- /dev/null +++ b/quickhelp.js @@ -0,0 +1,26 @@ + +function make_ul_help(response, group_name, id) { + var h1 = document.getElementById(id + "heading"); + h1.innerHTML = group_name; + + var ul = document.getElementById(id); + ul.innerHTML = ""; + for (var p in response) { + if (response.hasOwnProperty(p)) { + var li = document.createElement('li'); + li.innerHTML = "" + p + ": " + response[p].raw_text; + ul.appendChild(li); + } + } +} + +function updatequickhelp(id, prefix) { + var e = document.getElementById(id + 'select'); + var code = e.options[e.selectedIndex].text; + load_l3(code, prefix, function(response, group_name) { make_ul_help(response, group_name, id); }); +} + +updatequickhelp('team1', 'A'); +updatequickhelp('team2', 'B'); +load_l3('Calls', 'C', function(response, group_name) { make_ul_help(response, group_name, 'calls'); }); + diff --git a/quickl3.js b/quickl3.js index 79cc7bf..6b38a69 100644 --- a/quickl3.js +++ b/quickl3.js @@ -29,6 +29,7 @@ var load_l3 = function(sheet, prefix, cb) } l3s[prefix + number] = { + "raw_text": response.values[i][2], "text": text, "subtext": subtext }; -- 2.39.2