From 95dfe14528663923ca2a88ec928f1d8d9df2402b Mon Sep 17 00:00:00 2001 From: bai Date: Fri, 29 Mar 2019 02:14:43 +0000 Subject: Init --- static/js/manage.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 static/js/manage.js (limited to 'static/js/manage.js') diff --git a/static/js/manage.js b/static/js/manage.js new file mode 100644 index 0000000..10898d0 --- /dev/null +++ b/static/js/manage.js @@ -0,0 +1,22 @@ +function addtime(e) { + e.preventDefault(); + document.getElementById("seconds").value = this.dataset.secs; +} + +function pvw(e) { + prev = document.getElementById("prev_desc"); + prev.innerHTML = desc.value; + prev.style.display = "block"; + prev.addEventListener("input", function() { desc.value = prev.innerHTML; }); +} + +document.addEventListener("DOMContentLoaded", function(e) { + var list = document.getElementById("timelist"); + if (list) { + var secs = document.getElementById("timelist").getElementsByTagName("a"); + for(var i=0;i