From bdfcb1865585cab442a5a545e6519a29f6d30628 Mon Sep 17 00:00:00 2001 From: Fay Cross Date: Wed, 6 Mar 2013 15:03:53 +0000 Subject: [PATCH] Fixed bug where old projects without a navigation property were defaulting to Menu with Controls instead of Linear and no menu page was being created git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@712 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 042da466d2..fa63fd1c9a 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; } //change page title size for all pages if optional property set if (templateData.learningObject[0].allpagestitlesize != undefined){ STYLES.pageTitleSize = templateData.learningObject[0].allpagestitlesize; } //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 + '); 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; } //change page title size for all pages if optional property set if (templateData.learningObject[0].allpagestitlesize != undefined){ STYLES.pageTitleSize = templateData.learningObject[0].allpagestitlesize; } //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