diff options
author | Tony Anderson <tony@traveler.(none)> | 2011-01-17 05:08:13 (GMT) |
---|---|---|
committer | Tony Anderson <tony@traveler.(none)> | 2011-01-17 05:08:13 (GMT) |
commit | bce06148b2f8728db3a3029982b2c49d8d1af298 (patch) | |
tree | 5e2be01d8db9f862e9b39144449c47b726689582 | |
parent | ce456177de023ab72151a62f5e090e5545169666 (diff) |
version 11.6
-rwxr-xr-x | activity/activity.info | 2 | ||||
-rwxr-xr-x | content/English/index.html | 2 | ||||
-rwxr-xr-x | content/English/p4.html | 2 | ||||
-rwxr-xr-x | content/English/p5.html | 2 | ||||
-rwxr-xr-x | content/English/p6.html | 2 | ||||
-rwxr-xr-x | content/Mathematics/index.html | 2 | ||||
-rwxr-xr-x | content/Mathematics/p4.html | 2 | ||||
-rwxr-xr-x | content/Mathematics/p5.html | 2 | ||||
-rwxr-xr-x | content/Mathematics/p6.html | 2 | ||||
-rwxr-xr-x | content/js/global.js | 43 | ||||
-rwxr-xr-x | content/js/learner_lesson.js | 7 | ||||
-rwxr-xr-x | content/js/learner_subject.js | 2 | ||||
-rwxr-xr-x | content/js/navigation.js | 11 | ||||
-rwxr-xr-x | content/js/subject.js | 10 |
14 files changed, 48 insertions, 43 deletions
diff --git a/activity/activity.info b/activity/activity.info index 1b25c4f..4d7496f 100755 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,5 +1,5 @@ [Activity] -#version = 11.5 +#version = 11.6 name = Learn service_name = org.olerwanda.Learn icon = activity-learn diff --git a/content/English/index.html b/content/English/index.html index 28ff111..167eb24 100755 --- a/content/English/index.html +++ b/content/English/index.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/English/p4.html b/content/English/p4.html index 7a0990e..ef7dfbb 100755 --- a/content/English/p4.html +++ b/content/English/p4.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/English/p5.html b/content/English/p5.html index 9708735..a397e25 100755 --- a/content/English/p5.html +++ b/content/English/p5.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/English/p6.html b/content/English/p6.html index 0406d84..1dfe1d5 100755 --- a/content/English/p6.html +++ b/content/English/p6.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/Mathematics/index.html b/content/Mathematics/index.html index 838ea1f..5380ad1 100755 --- a/content/Mathematics/index.html +++ b/content/Mathematics/index.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/Mathematics/p4.html b/content/Mathematics/p4.html index 7a0990e..ef7dfbb 100755 --- a/content/Mathematics/p4.html +++ b/content/Mathematics/p4.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/Mathematics/p5.html b/content/Mathematics/p5.html index 9708735..a397e25 100755 --- a/content/Mathematics/p5.html +++ b/content/Mathematics/p5.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/Mathematics/p6.html b/content/Mathematics/p6.html index 0406d84..1dfe1d5 100755 --- a/content/Mathematics/p6.html +++ b/content/Mathematics/p6.html @@ -16,7 +16,7 @@ </head> <body> <div id="header"> - <div id="topbtn_left"><div title="home" id="linkBack" class="linkHome" /> + <div id="topbtn_left"><div title="home" id="linkHome" class="linkHome" /> </div></div> <div id="lesson_title"> <img src="../assets/image/title_block_lt.png" width="33" height="75" align = "absmiddle" /> diff --git a/content/js/global.js b/content/js/global.js index 8dcd7a5..81b6e16 100755 --- a/content/js/global.js +++ b/content/js/global.js @@ -15,37 +15,34 @@ function editreturn(){ window.location = responseTxt
});
}
-function goback(){
+function linkEnglish(){
url = window.location+"";
- levels = url.split('/');
- last = levels.pop();
- levels.pop()
- levels.push(last);
- newurl = levels.join('/');
- alert(newurl);
- window.location = newurl
-}
-function gobackOne(){
+ pos = url.find('?F');
+ if (pos<0){
+ window.location = 'content/English/index.html'
+ }else{
+ last = url.charAt(url.length-1);
+ window.location = 'content/English/p'+last+'.html'
+ }
+};
+function linkMathematics(){
url = window.location+"";
- levels = url.split('/');
- last = levels.pop();
- levels.pop()
- levels.pop()
- levels.push(last);
- newurl = levels.join('/');
- alert(newurl);
- window.location = newurl;
-}
-function gobackTwo(){
+ pos = url.find('?F');
+ if (pos<0){
+ window.location = 'content/Mathematics/index.html'
+ }else{
+ last = url.charAt(url.length-1);
+ window.location = 'content/Mathematics/p'+last+'.html'
+ }
+};
+function goback(){
url = window.location+"";
levels = url.split('/');
last = levels.pop();
levels.pop()
- levels.pop()
- levels.pop()
levels.push(last);
newurl = levels.join('/');
- window.location = newurl;
+ window.location = newurl
}
function apply(){
items = (window.location+"").split('/');
diff --git a/content/js/learner_lesson.js b/content/js/learner_lesson.js index 6a7c23d..223e450 100755 --- a/content/js/learner_lesson.js +++ b/content/js/learner_lesson.js @@ -55,11 +55,8 @@ $(document).ready( if (xy[3] == "EPaath"){ pth = "../../../src/FrameWork.html#" + xy[4]; }else if (xy[3] == "Karma"){ - if(xy[5]=='red'){ - pth = xy[4] + '/index.html'; - }else{ - pth = xy[4] + '/index.html?F'+xy[0].substring(3); - }; + last = xy[0].charAt(xy[0].length-1); + pth = xy[4] + '/index.html?F'+last; }else if (xy[3] == 'NKarma'){ pth = xy[4] + '/index.html'; }else if (xy[3] == "Siyavula"){ diff --git a/content/js/learner_subject.js b/content/js/learner_subject.js index fe52553..a4ff737 100755 --- a/content/js/learner_subject.js +++ b/content/js/learner_subject.js @@ -1,6 +1,6 @@ $(document).ready( function(){ - var k = Karma(assetList); + var k = Karma(); k.ready(function() { diff --git a/content/js/navigation.js b/content/js/navigation.js index f624199..60bbd01 100755 --- a/content/js/navigation.js +++ b/content/js/navigation.js @@ -1,5 +1,14 @@ $(document).ready(function(){ - + + $('#linkHome').click(function(){ + window.location = 'content/index.html'; + }); + $('#linkEnglish').click(function(){ + linkEnglish(); + }); + $('#linkMathematics').click(function(){ + linkMathematics(); + }); $('#linkBack').click(function(){ goback(); }); diff --git a/content/js/subject.js b/content/js/subject.js index 259a7a3..cc3917f 100755 --- a/content/js/subject.js +++ b/content/js/subject.js @@ -53,19 +53,21 @@ $(document).ready( // here we need to download or go to activity if ( (x > xy[1]) && (x < xy[1] + cellsize) && (y < xy[2]) && (y > xy[2] - cellsize) ) { + save = xy[4]; if (xy[5].indexOf('cyan')>-1) { //download - grade = xy[0].substring(3) $('<div id="temp" />').load( 'http://localhost:8008/cgi-bin/fetch_milestone.py', {'code':xy[0],'milestone':xy[4]}, function(responseText, status, xhr) { //refresh when done - window.onunload=function(){return true;}; - window.location.xy[4]+'index.html?F'+xy[0].substring(3); + pth = save+'/index.html' + last = xy[0].charAt(xy[0].length-1); + window.location = pth+'?F'+last; }); }else{ //go to activity pth = xy[4]+'/index.html'; - window.location = pth+'?F'+xy[0].substring(3); + last = xy[0].charAt(xy[0].length-1); + window.location = pth+'?F'+last; }; }; }); |