/
xerteModel.html
35 lines (24 loc) · 1010 Bytes
/
xerteModel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<script type="text/javascript">
// pageChanged & sizeChanged functions are needed in every model file
// other functions for model should also be in here to avoid conflicts
var xerteModel = new function() {
// function called every time the page is viewed after it has initially loaded
this.pageChanged = function() {
}
// function called every time the size of the LO is changed
this.sizeChanged = function() {
}
}
console.log(eval(x_currentPageXML.getAttribute("modelFile")));
if (x_currentPageXML.getAttribute("modelFile").toLowerCase().indexOf(".html") >= 0) {
$("#pageContents").load(eval(x_currentPageXML.getAttribute("modelFile")));
} else {
$("#x_pageDiv div").html("You can not view this type of content in the HTML5 viewer"); // ** need translated error message for if trying to load xerte model
}
// call this function in every model once everything's loaded
x_pageLoaded();
</script>
<style type="text/css">
</style>
<div id="pageContents">
</div>