Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
option for introducing an image to quiz main textHolder (the same way…
… that a video can be added)

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@1056 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
nmiran committed Jul 18, 2013
1 parent 568761f commit 31b8993
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Expand Up @@ -270,6 +270,15 @@
quiz.loadVideo();
}

var imgSize = '';
if (x_currentPageXML.getAttribute("imgSize").indexOf(',')>-1) {
var size_tmp = x_currentPageXML.getAttribute("imgSize").split(',');
imgSize = ' width="'+size_tmp[0]+'px" height="'+size_tmp[1]+'px"';
}
if (panelWidth != "Full" && x_currentPageXML.getAttribute("img") != undefined && x_currentPageXML.getAttribute("img") != "") {
$textHolder.append('<img src="' + eval(x_currentPageXML.getAttribute("img")) + '"' + imgSize +'>');
}

// submitBtnWidth/nextBtnWidth/restartBtnWidth attributes not used as buttons will be sized automatically, submitBtnTip/nextBtnTip/restartBtnTip attributes also not used
// if language attributes aren't in xml will have to use english fall back
var submitBtnText = x_currentPageXML.getAttribute("submitBtnText");
Expand Down Expand Up @@ -417,7 +426,6 @@
}
}
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);

});

$("#nextBtn")
Expand Down
Expand Up @@ -1182,8 +1182,10 @@
<restartBtnTip label="Restart Button Tip" type="textInput" language="true"/>
<restartBtnWidth label="Restart Button Width" type="NumericStepper" min="100" max="250" step="10" width="100" defaultValue="100" language="true"/>

<img label="Image" type="media" optional="true"/>
<imgSize label="Image Size" type="textInput" defaultValue="320,240" optional="true"/>
<video label="Video" type="media" optional="true"/>
<movieSize label="Video Size" type="textInput" defaultValue="320,240" optional="true"/>
<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 31b8993

Please sign in to comment.