From 5e647856b2caee5a984d45b5d744f540ddca75bf Mon Sep 17 00:00:00 2001 From: ronm123 Date: Mon, 12 Nov 2012 12:13:43 +0000 Subject: [PATCH] oninitComplete added for deeplinking - currently works fine from XOT with all browsers apart from IE. Works fine with IE via an uploaded LO too so seems to be a conflict with play.php or something linked in play.php Requires a new function in rloObject.js comitted separately git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@478 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- modules/xerte/parent_templates/Nottingham/Nottingham.rlt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/xerte/parent_templates/Nottingham/Nottingham.rlt b/modules/xerte/parent_templates/Nottingham/Nottingham.rlt index 3354edd441..a0d59de97d 100644 --- a/modules/xerte/parent_templates/Nottingham/Nottingham.rlt +++ b/modules/xerte/parent_templates/Nottingham/Nottingham.rlt @@ -1 +1 @@ - '); newChild = newXML.firstChild; newChild.attributes.title = 'Main Menu'; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; ifc.appendChild(newChild); } else { pgOffset = 1; } //custom interface if (templateData.learningObject[0].controller != undefined){ icon.nextSibling.attributes.swf = templateData.learningObject[0].controller; icon.nextSibling.attributes.visuals = 0; } //help file if (templateData.learningObject[0].nfo != undefined){ icon.nextSibling.attributes.helpfile = templateData.learningObject[0].nfo; } //default text size if (templateData.learningObject[0].textSize != undefined){ STYLES.defaultSize = templateData.learningObject[0].textSize; STYLES.inputSize = templateData.learningObject[0].textSize; } //media/transcript files if (templateData.learningObject[0].media != undefined){ icon.nextSibling.attributes.mediafile = templateData.learningObject[0].media; if (templateData.learningObject[0].mediaImage != undefined){ icon.nextSibling.attributes.mediaImage = templateData.learningObject[0].mediaImage; } if (templateData.learningObject[0].mediaTranscript != undefined){ icon.nextSibling.attributes.mediaTranscript = templateData.learningObject[0].mediaTranscript; } } for (i = 0; i < extXML.firstChild.childNodes.length; i++){ //build this file dynamically modName = extXML.firstChild.childNodes[i].nodeName; if (modName == 'xerteModel'){ newXML = new XML(''); //is there an initObject...? if (extXML.firstChild.childNodes[i].attributes.initObject != undefined){ newXML.firstChild.attributes.initObject = extXML.firstChild.childNodes[i].attributes.initObject; } } else { newXML = new XML(''); } newChild = newXML.firstChild; newChild.attributes.title = extXML.firstChild.childNodes[i].attributes.name; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; if (extXML.firstChild.childNodes[i].attributes.linkID == _level0.linkID && extXML.firstChild.childNodes[i].attributes.linkID != undefined){ linkIndex = i; } ifc.appendChild(newChild); } //glossary if (templateData.learningObject[0].glossary != undefined){ Glossary.enabled = true; items = templateData.learningObject[0].glossary.split('||'); for (i = 0; i < items.length; i++){ Glossary.addTerm(items[i].split('|')[0], items[i].split('|')[1]); } } ]]> Colour Changes ]]> \ No newline at end of file + '); newChild = newXML.firstChild; newChild.attributes.title = 'Main Menu'; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; ifc.appendChild(newChild); } else { pgOffset = 1; } //custom interface if (templateData.learningObject[0].controller != undefined){ icon.nextSibling.attributes.swf = templateData.learningObject[0].controller; icon.nextSibling.attributes.visuals = 0; } //help file if (templateData.learningObject[0].nfo != undefined){ icon.nextSibling.attributes.helpfile = templateData.learningObject[0].nfo; } //default text size if (templateData.learningObject[0].textSize != undefined){ STYLES.defaultSize = templateData.learningObject[0].textSize; STYLES.inputSize = templateData.learningObject[0].textSize; } //media/transcript files if (templateData.learningObject[0].media != undefined){ icon.nextSibling.attributes.mediafile = templateData.learningObject[0].media; if (templateData.learningObject[0].mediaImage != undefined){ icon.nextSibling.attributes.mediaImage = templateData.learningObject[0].mediaImage; } if (templateData.learningObject[0].mediaTranscript != undefined){ icon.nextSibling.attributes.mediaTranscript = templateData.learningObject[0].mediaTranscript; } } for (i = 0; i < extXML.firstChild.childNodes.length; i++){ //build this file dynamically modName = extXML.firstChild.childNodes[i].nodeName; if (modName == 'xerteModel'){ newXML = new XML(''); //is there an initObject...? if (extXML.firstChild.childNodes[i].attributes.initObject != undefined){ newXML.firstChild.attributes.initObject = extXML.firstChild.childNodes[i].attributes.initObject; } } else { newXML = new XML(''); } newChild = newXML.firstChild; newChild.attributes.title = extXML.firstChild.childNodes[i].attributes.name; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; if (extXML.firstChild.childNodes[i].attributes.linkID == _level0.linkID && extXML.firstChild.childNodes[i].attributes.linkID != undefined){ linkIndex = i; } ifc.appendChild(newChild); } //glossary if (templateData.learningObject[0].glossary != undefined){ Glossary.enabled = true; items = templateData.learningObject[0].glossary.split('||'); for (i = 0; i < items.length; i++){ Glossary.addTerm(items[i].split('|')[0], items[i].split('|')[1]); } } ]]> 1){ // we have a fully populated page list //reduce number found in url by 1 to match array destinationPage = destinationPage-1; // flag redirect as done then go to destination page rootIcon.urlRedirectDone = 1; rootIcon.gotoPage(destinationPage); break; } } } } //code for linkID=x if (rootIcon.urlRedirectDone == undefined){ // only check if not in preview mode if (_level0jumpData.fileType == undefined){ destinationLinkID = callJS("getUrlParam","linkID"); // check for linkID if (destinationLinkID != "null" && destinationLinkID !=undefined){ // we have a linkID if (rootIcon.pages.length > 1){ // we have a fully populated page list so find and go to page. // navigate to destination page destinationLinkID = destinationLinkID.toString(); for (i = 0; i < rootIcon.pages.length; i++){ if (extXML.firstChild.childNodes[i].attributes.linkID == destinationLinkID){ pageFound = "true"; destinationIndex = i; // go to destination page rootIcon.urlRedirectDone = 1; rootIcon.gotoPage(destinationIndex); break; } } } } } //code for pageID=x for existing LO's with connectors etc before change to linkID if (rootIcon.urlRedirectDone == undefined){ // only check if not in preview mode if (_level0jumpData.fileType == undefined){ destinationPageID = callJS("getUrlParam","pageID"); //check for pageID if (destinationPageID != "null" && destinationPageID !=undefined){ // we have a pageID if (rootIcon.pages.length > 1){ // we have a fully populated page list so find and go to page. // navigate to destination page destinationPageID = destinationPageID.toString(); for (i = 0; i < rootIcon.pages.length; i++){ if (extXML.firstChild.childNodes[i].attributes.pageID == destinationPageID){ pageFound = "true"; destinationIndex = i; // go to destination page rootIcon.urlRedirectDone = 1; rootIcon.gotoPage(destinationIndex); break; } } } } }]]> Colour Changes ]]> \ No newline at end of file