Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTML5 bug fixes - slideshow: align image attribute fixed, dialog: lin…
…e breaks now show correctly, list: now possible to include swf in panel, modify: changed margin on 1st p tag so consistent with text on other pages

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@555 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
FayCross committed Nov 26, 2012
1 parent 77eeebf commit b8656ac
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
Expand Up @@ -35,7 +35,7 @@
}
}

$("#textHolder").html(x_currentPageXML.getAttribute("text"));
$("#textHolder").html(x_addLineBreaks(x_currentPageXML.getAttribute("text")));

// if language attributes aren't in xml will have to use english fall back
var tryTxt = x_currentPageXML.getAttribute("tryTxt");
Expand Down
25 changes: 20 additions & 5 deletions modules/xerte/parent_templates/Nottingham/models_html5/list.html
Expand Up @@ -47,13 +47,19 @@
var $this = $(this);
if ($this != $(".listItem.highlight")) {
var infoString = "<h3>" + $this.data("name") + "</h3>" + "<p>" + x_addLineBreaks($this.data("text")) + "</p>";
if ($this.data("url") != undefined && $this.data("url") != "") {
infoString += '<div class="panelImg"><img src="' + $this.data("url") + '" ';
if ($this.data("tip") != undefined && $this.data("tip") != "") {
infoString += 'alt="' + $this.data("tip") + '" ';
var url = $this.data("url");
if (url != undefined && url != "") {
if (url.split('.').pop() == "swf") {
infoString += '<div class="centerAlign"><div id="pageSWF' + i + '"><h3></h3><p><a href="http://www.adobe.com/go/getflashplayer"><img class="flashImg" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"/></a></p></div></div>';
} else {
infoString += '<div class="paneImg"><img src="' + url + '" ';
if ($this.data("tip") != undefined && $this.data("tip") != "") {
infoString += 'alt="' + $this.data("tip") + '" ';
}
infoString += ' /></div>';
}
infoString += ' /></div>';
}

$(".listItem.highlight").removeClass("highlight");
$this.addClass("highlight");
var $infoHolder = $("#infoHolder");
Expand All @@ -62,6 +68,15 @@
$infoHolder.fadeIn();
list.sizeChanged();
}

if (url != undefined && url != "" && url.split('.').pop().slice(0, -1) == "swf") {
// ** need to add field into wizard so you can enter swf dimensions rather than use 100% **
// ** need to add functionality for initObject and interactivity optional properties **
swfobject.embedSWF(url, "pageSWF" + i, "300", "300", "9.0.0", x_templateLocation + "common_html5/expressInstall.swf", "", "", "");
$("#pageSWF" + i + " 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"));
$("#pageSWF" + i).attr("title", $this.data("tip"));
}
}
});
});
Expand Down
Expand Up @@ -56,6 +56,10 @@

<style type="text/css">

#pageContents p#instruction {
margin-top: 0px;
}

#pageContents textarea {
display: block;
width: 100%;
Expand Down
Expand Up @@ -66,7 +66,7 @@
$thisPanelPage = $panelPage;
}

var infoString = x_addLineBreaks('<h3>' + this.getAttribute("name") + '</h3><p>' + this.getAttribute("text") + '</p>');
var infoString = '<p>' + x_addLineBreaks(this.getAttribute("text")) + '</p>';
var url = this.getAttribute("url");
if (url != undefined && url != "") {
var newString = "";
Expand All @@ -85,6 +85,7 @@
infoString = newString + infoString;
}
}
infoString = '<h3>' + this.getAttribute("name") + '</h3>' + infoString;

$thisPanelPage
.html(infoString)
Expand Down

0 comments on commit b8656ac

Please sign in to comment.