Skip to content

Commit

Permalink
Remove Display Text child element, simplified navigation options on C…
Browse files Browse the repository at this point in the history
…onnector pages. Colour options added to menu connector. Fixed a number of bugs. Added counts to lists in Scenario Page. Youtube pages added new pageWizard test and support for pageIndexing (for desktop usage). Note changes to Connector pages may compromise existing connector pages in the demo site. Removed indexChanger as it is for use in desktop Xerte only. JK

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@346 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
Johnathan Kemp committed May 4, 2012
1 parent 81e8dc5 commit 2c24274
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 305 deletions.
451 changes: 158 additions & 293 deletions modules/xerte/parent_templates/Nottingham/data.xwd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/xerte/parent_templates/Nottingham/models/cMcq.rlm

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/xerte/parent_templates/Nottingham/models/quiz.rlm

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1 +1 @@
<PG title="Enter page title" name="newWindow"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();if (extXML == undefined){ // Page Wizard pageIcon.templateData = pageIcon.extXML.toObject(); pageIcon.templateData = pageIcon.templateData.pageWizard[0];} else { // Toolkits myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]); pageIcon.templateData = myXML.toObject(); rootIcon.setTitleText(templateData.learningObject[0].name);}]]></SCR> <SCR name="setup"><![CDATA[xml = new XML(pageIcon.templateData.youtube[0]);embedObj = xml.toObject();//new iframe code...if (pageIcon.templateData.youtube[0].indexOf('iframe') != -1){ //find the ID str = pageIcon.templateData.youtube[0].split("rel=0").join(''); s = str.indexOf('src') + 5; f = str.indexOf('"', s); src = str.substr(s, f-s); vidID = src.substr(src.lastIndexOf('/') + 1); //any params being passed in? vidID = vidID.split('?')[0]; } else { //two types of object embed code... if (embedObj.object[0].embed[0].src.split('/')[4].indexOf('?') != -1){ vidID = embedObj.object[0].embed[0].src.split('/')[4].split('?')[0]; } else { vidID = embedObj.object[0].embed[0].src.split('/')[4].split('&')[0]; }}align = pageIcon.templateData.youtube[0].align;previewURL = 'http://img.youtube.com/vi/' + vidID + '/0.jpg';params = new Object();params.url = embedObj.iframe[0].src;params.width = 420;params.height = 315;if (pageIcon.templateData.newWindow[0].narration != undefined){ narration = pageIcon.templateData.newWindow[0].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR isFunc="1" name="launchNewWindow"><![CDATA[if (pageIcon.templateData.newWindow[0].htm != undefined){ callJS('createWindow', params);} else { callJS('openWindow', params);}]]></SCR> <DIS tabIndex="-1" id="panel" name="panel" x="-300" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <INT name="loadPanel" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="panel" erase="1" exit="1"> <SCR name="exit"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <DIS toolTip="Launch Video" scrolling="auto" id="graphic" name="graphic" x="coded" y="30" type="ext" url="previewURL"><![CDATA[Launch Video]]></DIS> <INT name="loadImage" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="calculate"><![CDATA[graphic.constrain(465,465);//resize the panel to the graphicpanel._width = graphic._width + 20;panel._height = graphic._height + 20;panel._x = stageWidth - panel._width - 20;graphic._x = panel._x + 10;textX = 20;textY = 20;textWidth = stageWidth - 80 - graphic._width;graphic.useHandCursor = true;]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="textX" y="textY" w="textWidth" type="text"><![CDATA[{pageIcon.templateData.youtube[0].text + '<br><br><a href="asfunction:_level0.engine.launchNewWindow">Launch Video</a>'}]]></DIS> <INT name="launch" perpetual="0"> <RES name="onRelease" type="event" eventName="onRelease" icon="graphic" erase="1" exit="0"> <SCR name="calculate"><![CDATA[launchNewWindow();]]></SCR> </RES> </INT> </PG>
<PG title="Enter page title" name="youtube"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();if (rootIcon.projMode == "dev"){ // Page Wizard pageIcon.templateData = pageIcon.extXML.toObject(); pageIcon.templateData = pageIcon.templateData.pageWizard[0];} else { // Toolkits myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]); pageIcon.templateData = myXML.toObject();} rootIcon.setTitleText(templateData.learningObject[0].name);// handle multiple page data definitions in a project if (rootIcon.projectPageIndex == undefined){ rootIcon.projectPageIndex = 0;}// check if this page has a definition for the current project index and default to 0 if notif (pageIcon.templateData.youtube[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } ]]></SCR> <SCR name="setup"><![CDATA[xml = new XML(pageIcon.templateData.youtube[projPI]);embedObj = xml.toObject();//new iframe code...if (pageIcon.templateData.youtube[projPI].indexOf('iframe') != -1){ //find the ID str = pageIcon.templateData.youtube[projPI].split("rel=0").join(''); s = str.indexOf('src') + 5; f = str.indexOf('"', s); src = str.substr(s, f-s); vidID = src.substr(src.lastIndexOf('/') + 1); //any params being passed in? vidID = vidID.split('?')[0]; } else { //two types of object embed code... if (embedObj.object[0].embed[0].src.split('/')[4].indexOf('?') != -1){ vidID = embedObj.object[0].embed[0].src.split('/')[4].split('?')[0]; } else { vidID = embedObj.object[0].embed[0].src.split('/')[4].split('&')[0]; }}align = pageIcon.templateData.youtube[projPI].align;previewURL = 'http://img.youtube.com/vi/' + vidID + '/0.jpg';params = new Object();params.url = embedObj.iframe[0].src;params.width = 420;params.height = 315;if (pageIcon.templateData.newWindow[0].narration != undefined){ narration = pageIcon.templateData.newWindow[0].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR isFunc="1" name="launchNewWindow"><![CDATA[if (pageIcon.templateData.newWindow[0].htm != undefined){ callJS('createWindow', params);} else { callJS('openWindow', params);}]]></SCR> <DIS tabIndex="-1" id="panel" name="panel" x="-300" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <INT name="loadPanel" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="panel" erase="1" exit="1"> <SCR name="exit"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <DIS toolTip="Launch Video" scrolling="auto" id="graphic" name="graphic" x="coded" y="30" type="ext" url="previewURL"><![CDATA[Launch Video]]></DIS> <INT name="loadImage" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="calculate"><![CDATA[graphic.constrain(465,465);//resize the panel to the graphicpanel._width = graphic._width + 20;panel._height = graphic._height + 20;panel._x = stageWidth - panel._width - 20;graphic._x = panel._x + 10;textX = 20;textY = 20;textWidth = stageWidth - 80 - graphic._width;graphic.useHandCursor = true;]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="textX" y="textY" w="textWidth" type="text"><![CDATA[{pageIcon.templateData.youtube[projPI].text + '<br><br><a href="asfunction:_level0.engine.launchNewWindow">Launch Video</a>'}]]></DIS> <INT name="launch" perpetual="0"> <RES name="onRelease" type="event" eventName="onRelease" icon="graphic" erase="1" exit="0"> <SCR name="calculate"><![CDATA[launchNewWindow();]]></SCR> </RES> </INT> </PG>
Expand Down
@@ -1 +1 @@
<PG title="enter page title" name="youtuberss"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();if (extXML == undefined){ // Page Wizard pageIcon.templateData = pageIcon.extXML.toObject(); pageIcon.templateData = pageIcon.templateData.pageWizard[0];} else { // Toolkits myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]); pageIcon.templateData = myXML.toObject(); rootIcon.setTitleText(templateData.learningObject[0].name);}align = pageIcon.templateData.rss[0].align;if (pageIcon.templateData.youtuberss[0].narration != undefined){ narration = pageIcon.templateData.youtuberss[0].narration; rootIcon.broadcast('showAudio');}]]></SCR> <DIS tabIndex="-1" id="panel" h="474" w="380" name="panel" x="400" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <SCR name="getFeed"><![CDATA[baseURL = "http://gdata.youtube.com/feeds/api/videos?q=" + pageIcon.templateData.youtuberss[0].url + "&orderby=relevance&start-index=1&max-results=" + pageIcon.templateData.youtuberss[0].results + "&v=2&alt=rss&format=5";feedURL = baseURL;req = new XML('<req/'>);panel.sendAndLoad(req, feedURL);]]></SCR> <INT name="loadFeed" perpetual="0"> <RES name="onSendAndLoad" type="event" eventName="onSendAndLoad" icon="panel" erase="1" exit="1"> <SCR name="parseFeed"><![CDATA[arr = panel.serverXML.findNodesByName('item');t = "";for (i = 0; i < arr.length; i++){ tempItem = arr[i].toObject(); t += '<p><a href="asfunction:_root.engine.hotText,' + tempItem.guid[0].split(':')[3] + '"><img src="' + tempItem["media:group"][0]["media:thumbnail"][0].url + '" width="60" height="45"/></a>'; t += '<font size="10" color="#0000FF"><b><a href="asfunction:_root.engine.hotText,' + tempItem.guid[0].split(':')[3] + '">' + tempItem.title + '</a></b></font><br><br><br><br>'; //t += '<font size="10" color="#333333">' + tempItem["media:group"][0]["media:description"][0] + '...</font><br></p>'; t+= '</a>';}debug(panel.serverXML);]]></SCR> </RES> </INT> <DIS scrolling="auto" textColour="#333333" name="instruction" x="20" y="20" w="320" h="164" type="text"><![CDATA[{pageIcon.templateData.youtuberss[0].text}]]></DIS> <DIS scrolling="auto" name="feedText" x="400" y="20" w="380" h="474" type="text"><![CDATA[{'<br>' + t}]]></DIS> <INT name="controls" perpetual="0"> <RES name="onHotText" type="event" eventName="onHotText" icon="rootIcon" erase="1" exit="0"> <SCR name="loadandPlay"><![CDATA[params = new Object();params.url = 'http://www.youtube.com/embed/' + rootIcon.hotTextClicked;params.width = 420;params.height = 315;callJS('openWindow', params);]]></SCR> </RES> </INT> </PG>
<PG title="enter page title" name="youtuberss"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();if (rootIcon.projMode == "dev"){ // Page Wizard pageIcon.templateData = pageIcon.extXML.toObject(); pageIcon.templateData = pageIcon.templateData.pageWizard[0];} else { // Toolkits myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]); pageIcon.templateData = myXML.toObject(); rootIcon.setTitleText(templateData.learningObject[0].name);}rootIcon.setTitleText(templateData.learningObject[0].name);// handle multiple page data definitions in a project if (rootIcon.projectPageIndex == undefined){ rootIcon.projectPageIndex = 0;}// check if this page has a definition for the current project index and default to 0 if notif (pageIcon.templateData.youtuberss[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } align = pageIcon.templateData.youtuberss[projPI].align;if (pageIcon.templateData.youtuberss[projPI].narration != undefined){ narration = pageIcon.templateData.youtuberss[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <DIS tabIndex="-1" id="panel" h="474" w="380" name="panel" x="400" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <SCR name="getFeed"><![CDATA[baseURL = "http://gdata.youtube.com/feeds/api/videos?q=" + pageIcon.templateData.youtuberss[projPI].url + "&orderby=relevance&start-index=1&max-results=" + pageIcon.templateData.youtuberss[projPI].results + "&v=2&alt=rss&format=5";feedURL = baseURL;req = new XML('<req/'>);panel.sendAndLoad(req, feedURL);d = new Date();ytID = 'yt' + d.getTime();icon.parentNode.getChildByName('youtube').attributes.id = ytID;]]></SCR> <INT name="loadFeed" perpetual="0"> <RES name="onSendAndLoad" type="event" eventName="onSendAndLoad" icon="panel" erase="1" exit="1"> <SCR name="parseFeed"><![CDATA[arr = panel.serverXML.findNodesByName('item');t = "";for (i = 0; i < arr.length; i++){ tempItem = arr[i].toObject(); t += '<p><img src="' + tempItem["media:group"][0]["media:thumbnail"][0].url + '" width="60" height="45"/>'; t += '<font size="10" color="#0000FF"><b><a href="asfunction:_root.engine.hotText,' + tempItem.guid[0].split(':')[3] + '">' + tempItem.title + '</a></b></font><br><br><br><br>'; //t += '<font size="10" color="#333333">' + tempItem["media:group"][0]["media:description"][0] + '...</font><br></p>'; t+= '</a>';}debug(panel.serverXML);]]></SCR> </RES> </INT> <DIS scrolling="auto" textColour="#333333" name="instruction" x="20" y="20" w="320" h="164" type="text"><![CDATA[{pageIcon.templateData.youtuberss[projPI].text}]]></DIS> <DIS scrolling="auto" name="feedText" x="400" y="20" w="380" h="474" type="text"><![CDATA[{'<br>' + t}]]></DIS> <SCR name="setup"><![CDATA[status.txt.selectable = false;status.lineStyle(0,0x999999,100);status.drawRect(0,0,240,18);//rootIcon.enableControls(false, 80);]]></SCR> <INT name="controls" perpetual="0"> <RES name="onHotText" type="event" eventName="onHotText" icon="rootIcon" erase="1" exit="0"> <SCR name="loadandPlay"><![CDATA[//engine[ytID].loadVideoById(rootIcon.hotTextClicked);params = new Object();params.url = 'http://www.youtube.com/embed/' + rootIcon.hotTextClicked;params.width = 420;params.height = 315;callJS('openWindow', params);]]></SCR> </RES> </INT> </PG>
Expand Down

0 comments on commit 2c24274

Please sign in to comment.