Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTML5 - Added movieSize optional attribute to jing page
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@611 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
FayCross committed Jan 2, 2013
1 parent 5cf064f commit 9a1449c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
2 changes: 2 additions & 0 deletions modules/xerte/parent_templates/Nottingham/data.xwd
Expand Up @@ -779,6 +779,8 @@
<name label="Page Title" type="TextInput"/>
<url label="Jing SWF File" type="media"/>

<movieSize label="Video Size" type="textInput" defaultValue="320,240" optional="true"/>

<narrationNavigate label="Navigate on narration" type="CheckBox" defaultValue="false" optional="true"/>
<playNarration label="Auto-play narration" type="CheckBox" defaultValue="false" optional="true"/>
<narration label="Narration" type="media" optional="true"/>
Expand Down
Expand Up @@ -14,7 +14,7 @@
}

this.init = function() {
var version = x_currentPageXML.getAttribute("version"); // Pro | Free ** not sure what relevance this option has
// version attribute isn't being used - not sure what it's supposed to do

var swfHeight = $x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3;
if (x_currentPage == 0) {
Expand Down
29 changes: 21 additions & 8 deletions modules/xerte/parent_templates/Nottingham/models_html5/jing.html
Expand Up @@ -10,15 +10,26 @@

// function called every time the size of the LO is changed
this.sizeChanged = function() {
$("#pageSWF").height($x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3);
if ($("#pageContents").data("resize") == true) {
$("#pageSWF").height($x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3);
}
}

this.init = function() {
var swfHeight = $x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3;
if (x_currentPage == 0) {
swfHeight = 500;
var size = ["100%", $x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3];
var $pageContents = $("#pageContents");
$pageContents.data("resize", true);
if (x_currentPageXML.getAttribute("movieSize") != "" && x_currentPageXML.getAttribute("movieSize") != undefined) {
var dimensions = x_currentPageXML.getAttribute("movieSize").split(",");
if (Number(dimensions[0]) != 0 && Number(dimensions[1]) != 0) {
size = [Number(dimensions[0]), Number(dimensions[1])];
}
$pageContents.data("resize", false);
} else if (x_currentPage == 0) {
size = ["100%", 500];
}
swfobject.embedSWF(eval(x_currentPageXML.getAttribute("url")), "pageSWF", "100%", swfHeight, "9.0.0", x_templateLocation + "common_html5/expressInstall.swf");

swfobject.embedSWF(eval(x_currentPageXML.getAttribute("url")), "pageSWF", size[0], size[1], "9.0.0", x_templateLocation + "common_html5/expressInstall.swf");

$("#pageSWF h3").html(x_getLangInfo(x_languageData.find("errorFlash")[0], "label", "You need to install the Flash Player to view this content."));
$("#flashImg").attr("alt", x_getLangInfo(x_languageData.find("errorFlash")[0], "description", "Get the Flash Player"));
Expand All @@ -32,7 +43,9 @@

</script>

<div id="pageSWF">
<h3></h3>
<p><a href="http://www.adobe.com/go/getflashplayer"><img id="flashImg" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"/></a></p>
<div id="pageContents" class="centerAlign">
<div id="pageSWF">
<h3></h3>
<p><a href="http://www.adobe.com/go/getflashplayer"><img id="flashImg" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"/></a></p>
</div>
</div>
Expand Up @@ -779,6 +779,8 @@
<name label="Page Title" type="TextInput"/>
<url label="Jing SWF File" type="media"/>

<movieSize label="Video Size" type="textInput" defaultValue="320,240" optional="true"/>

<narrationNavigate label="Navigate on narration" type="CheckBox" defaultValue="false" optional="true"/>
<playNarration label="Auto-play narration" type="CheckBox" defaultValue="false" optional="true"/>
<narration label="Narration" type="media" optional="true"/>
Expand Down

0 comments on commit 9a1449c

Please sign in to comment.