Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
More tweaking of SMIL:
Browse files Browse the repository at this point in the history
 - repeat slideshow more times
 - added function to launch in new window with controlled size. 
 - added footer text with current time to generated page
  • Loading branch information
AnnaGerber committed Mar 25, 2009
1 parent 70ecb1e commit 6980ebe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion oaiorebuilder/content/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function init(){
propertytabs.activate("remgrid");
loreInfo("Welcome to LORE");
updateSourceLists(window.top.getBrowser().selectedBrowser.contentWindow.location.href);
welcometab.body.update("<p>LORE: Literature Object Re-use and Exchange</p>");
welcometab.body.update("<h1>LORE: Literature Object Re-use and Exchange</h1><p>This page will provide basic getting started information</p>");

}

Expand Down
2 changes: 1 addition & 1 deletion oaiorebuilder/content/stylesheets/ORE2SMIL.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</head>
<body>
<seq dur="indefinite">
<par id="slideshow" repeatCount="10">
<par id="slideshow" repeatCount="50">
<seq>
<xsl:apply-templates select="//rdf:Description[@rdf:about='#aggregation']/ore:aggregates"/>
</seq>
Expand Down
16 changes: 12 additions & 4 deletions oaiorebuilder/content/uifunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ function showCompoundObjectSummary() {
newsummary += "</ul></div>";
summarytab.body.update(newsummary);
}
function launchWindow(url) {
newwindow=window.open(url,'name','height=650,width=800,top=200,left=250,resizable');
if (window.focus) {newwindow.focus()}
}
function showSMIL(){
var allfigures = oreGraph.getDocument().getFigures();
var numfigs = allfigures.getSize();
Expand All @@ -58,7 +62,8 @@ function showSMIL(){
var smilpath = createSMIL(); // generate the new smil file into oresmil.xsl
//var smilcontents = "<p>SMIL:</p><embed height='500' width='500' "+
// "src='chrome://oaiorebuilder/content/kellypics.smil' type='application/x-ambulant-smil'/><script type='text/javascript'>//document.embeds[0].startPlayer();</script>";
smilcontents += "<p>A SMIL slideshow has been generated from the contents of the current compound object.</p><p><a target='_blank' href='file://" + smilpath + "'>Click here to launch the slideshow in a new window</a>";
smilcontents += "<p>A SMIL slideshow has been generated from the contents of the current compound object.</p><p>" +
"<a onclick='launchWindow(this.href);return(false);' target='_blank' href='file://" + smilpath + "'>Click here to launch the slideshow in a new window</a>";



Expand Down Expand Up @@ -690,6 +695,7 @@ function _updateCompoundObjectsSourceList(contextURL) {
var xmldoc = req.responseXML;
var result = {};
if (xmldoc) {
_clearTree(remstreeroot);
result = xmldoc.getElementsByTagNameNS(
"http://www.w3.org/2005/sparql-results#",
"uri");
Expand Down Expand Up @@ -824,9 +830,11 @@ function createSMIL(){
var serializer = new XMLSerializer();
writeFile(serializer.serializeToString(resultDoc), "oresmil.smil");
var htmlwrapper = "<HTML><HEAD><TITLE>SMIL Slideshow</TITLE></HEAD>" +
"<BODY BGCOLOR=\"#000000\"><CENTER>" +
"<embed height=\"100%\" width=\"100%\" src=\"oresmil.smil\" type=\"application/x-ambulant-smil\"/>" +
"</CENTER></BODY></HTML>";
"<BODY BGCOLOR=\"#003366\"><CENTER>" +
"<embed style='border:none' height=\"95%\" width=\"95%\" src=\"oresmil.smil\" type=\"application/x-ambulant-smil\"/>" +
"</CENTER><p style='font-size:smalller;color:#ffffff; padding:5px'>SMIL presentation generated by LORE on " +
"<script type='text/javascript'>document.write(new Date().toString())</script>" +
"</p></BODY></HTML>";
return writeFile(htmlwrapper, "playsmil.html");

} catch (e){
Expand Down

0 comments on commit 6980ebe

Please sign in to comment.