Files
MI-38/s1000d/Converter_Source/BlankXML/singleScormIndex.html
2023-06-14 18:08:32 +03:00

103 lines
4.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE HTML>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<html xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="app/dinamika/singlescorm.css">
<script>
var curChapter=-1;
function objectHTMLLoaded() {
var iframe = document.getElementById('view-obj');
iframe.style.height = (parseInt(window.sessionStorage.getItem('contentsHeight'),10)+50)+'px';
var viewdoc = document.getElementById('view-doc');
viewdoc.style.height = iframe.style.height;
if(sessionStorage.getItem('scrollY') != "undefined")
window.scrollTo({ top: sessionStorage.getItem('scrollY'), behavior: 'auto' });
}
function updateDocHeight() { objectHTMLLoaded(); }
function setContent(fileName, idNum) {
document.getElementById('view-obj').setAttribute('data', fileName);
window.scrollTo({ top: 0, behavior: 'smooth' });
setArrowInCurChapter(curChapter, idNum);
curChapter = idNum;
}
function onLoad() {
let category_code = "";
if (opener) {
var navbar = opener.window.document.getElementById('page-navbar');
if(navbar) {
var liList = navbar.getElementsByTagName('li');
if(liList) {
var li = liList[liList.length-1];
if(li) category_code = li.innerText.split('_').slice(-1)[0];
}
}
}
setCategory(category_code, "");
if(category_code == "") document.getElementsByClassName('dropdown')[0].style.display = 'inline-block';
}
function onDropBtnClick() {
var cat = document.getElementsByClassName('dropdown-content')[0];
if(cat.style.display != 'block') {
cat.style.display = 'block'; document.getElementById("arrowChar").innerHTML = "&#9650;";
} else {
cat.style.display = 'none'; document.getElementById("arrowChar").innerHTML = "&#9660;";
}
}
function setCategory(code, name) {
if(code == '') name = "Все категории";
document.getElementById('dropText').innerHTML = name;
var tab = document.getElementById('tocTree');
var liList = tab.getElementsByTagName('*');
for (var i = 0; i < liList.length; i++) {
if(!liList[i].hasAttribute("roles")) continue;
roles = liList[i].getAttribute("roles").split(',');
if(code == "") { liList[i].style.display = 'block'; continue; };
if(roles.includes(code))
liList[i].style.display = 'block';
else
liList[i].style.display = 'none';
}
}
function setArrowInCurChapter(_curCh, _newCh) {
var bStr = '<b style="margin-left: -1.3em;">';
var arrStr = "&#10148;&#32;<u>";
if(_curCh != -1) {
if(typeof document.getElementById('tocItemTitle'+_curCh) !== "undefined") {
var t = document.getElementById('tocItemTitle'+_curCh).innerHTML;
if(t.substring(0, bStr.length) == bStr)
document.getElementById('tocItemTitle'+_curCh).innerHTML = t.substring(bStr.length+5, t.length-8);
}
}
var newTitle = bStr+arrStr+document.getElementById('tocItemTitle'+_newCh).innerHTML+"</b></u>";
document.getElementById('tocItemTitle'+_newCh).innerHTML = newTitle;
}
</script>
</head>
<body bgcolor="#FFFFFF" onload="onLoad();">
<div id="view-toc" class="view-toc" >
<div id="view-toc-container" class="view-toc-container">
<div class="dropdown">
<button class="dropbtn" onclick="onDropBtnClick();"><span id="arrowChar">&#9660;</span> <span id="dropText">Все категории</span></button>
<div class="dropdown-content">
</div>
</div>
<ul class="tree" id="tocTree" style="padding-inline-start: 0px;margin-block-start: 0; margin-block-end: 0;">
</ul>
</div>
</div>
<div id="view-doc" class="view-doc">
<object id="view-obj" data=""
type="text/html" style="width:100%;">
Ошибка загрузки содержимого.
</object>
</div>
<div id="btnToTop" class="btnToTop" onclick="window.scrollTo({ top: 0, behavior: 'smooth' });" style="display: box;">
<i></i>
</div>
</body>
</html>