From c26ed7164b4e10101b661745de61c6a7a4243e63 Mon Sep 17 00:00:00 2001 From: user Date: Mon, 1 Apr 2013 21:58:32 +0200 Subject: [PATCH] update --- css/style.css | 19 +++++++++++++ index.html | 15 ++++++++-- js/eList.json | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ js/mlib.js | 23 +++++++++++++-- 4 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 js/eList.json diff --git a/css/style.css b/css/style.css index bfcf2e6..4feea20 100644 --- a/css/style.css +++ b/css/style.css @@ -9,6 +9,7 @@ height: 100%; color: black; text-decoration: none; + z-index: 0; } html body{ @@ -175,4 +176,22 @@ footer{ height: 30px; width: 100px; margin-left: 50px; +} + +footer{ + height: 25%; + vertical-align: middle; + text-align: center; + margin-top: 1%; + +} +footer h3{ +height: auto; +} +#epiList{ + overflow: auto; +} + +#epiList li{ + height: auto; } \ No newline at end of file diff --git a/index.html b/index.html index e73d264..014e518 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,9 @@
mlib5
- +
@@ -34,10 +36,17 @@
- + - + + + diff --git a/js/eList.json b/js/eList.json new file mode 100644 index 0000000..3e8f4a7 --- /dev/null +++ b/js/eList.json @@ -0,0 +1,77 @@ +{ + "name": "user", + "episodes": [ + { + "order": "1", + "title": "test2", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + }, + { + "order": "2", + "title": "test3", + "href": "../index.html" + } + + + ] +} diff --git a/js/mlib.js b/js/mlib.js index ee5429d..c686469 100644 --- a/js/mlib.js +++ b/js/mlib.js @@ -3,7 +3,7 @@ * and open the template in the editor. */ function pageLoad() { - bread = document.getElementById('breadcrumb'); + breadTitle = document.getElementById('breadcrumbTitle'); player = document.getElementById('player'); mediaSource = document.getElementById('playersource'); episodeInfo = document.getElementById('episodeInfo'); @@ -12,10 +12,18 @@ function pageLoad() { player.addEventListener('timeupdate', timeUpdate); player.addEventListener('ended', trackEnded); + var episodeHTML = document.getElementById('episode'); var episodeJson = episodeHTML.contentDocument.body.firstChild.innerHTML; episodeObj = jsonParse(episodeJson); episodeHTML.style.display="none"; + + var eListHTML = document.getElementById('eList'); + var eListJson = eListHTML.contentDocument.body.firstChild.innerHTML; + eListObj = jsonParse(eListJson); + eListHTML.style.display="none"; + createEList(); + actTitle = episodeObj.title; actTrack = 0; actChapter = 0; @@ -93,7 +101,7 @@ function trackChapChanged(trackId, chapterId) { select = document.getElementById('list' + actTrack + '.' + actChapter); select.setAttribute("class", "select"); - bread.innerHTML = actNewTitle; + breadTitle.innerHTML = actNewTitle; } function calcChapterId(trackId, time) { var trackObj = episodeObj.tracks[trackId]; @@ -112,4 +120,15 @@ function calcChapterId(trackId, time) { function trackEnded() { jumpById(actTrack+1, 0); +} + +function createEList() { + var epiList = document.getElementById('epiList'); + var entryNumber = 1; + var listEntries = ""; + for (var item in eListObj.episodes) { + var itemObj = eListObj.episodes[item]; + listEntries = listEntries + "
  • " + entryNumber++ + ": " + itemObj.title + "
  • "; + } + epiList.innerHTML = listEntries; } \ No newline at end of file