Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Anderson <tony@traveler.(none)>2011-01-17 11:13:38 (GMT)
committer Tony Anderson <tony@traveler.(none)>2011-01-17 11:13:38 (GMT)
commit70dd9f1a3889db557fe7a16abe17885e2d1644fa (patch)
tree225173d1af81c77f82ba8c626fea9678dc400d6a
parentbce06148b2f8728db3a3029982b2c49d8d1af298 (diff)
version 11.7
-rwxr-xr-xactivity/activity.info2
-rwxr-xr-xcontent/js/global.js27
-rwxr-xr-xcontent/js/navigation.js2
3 files changed, 19 insertions, 12 deletions
diff --git a/activity/activity.info b/activity/activity.info
index 4d7496f..46c61a4 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,5 +1,5 @@
[Activity]
-#version = 11.6
+#version = 11.7
name = Learn
service_name = org.olerwanda.Learn
icon = activity-learn
diff --git a/content/js/global.js b/content/js/global.js
index 81b6e16..489f6ab 100755
--- a/content/js/global.js
+++ b/content/js/global.js
@@ -4,10 +4,11 @@
*/
var flag_start = 0,i,j,flag;
-var back = '../index.html'; // return to activity ladder
-var backOne = '../../index.html' // return to subject menu
-var backTwo = '../../../index.html' // return to main menu
+function linkHome(){
+ pth = 'http://localhost:8008/content/index.html';
+ window.location = pth;
+};
function editreturn(){
$('<div id="temp"/>')
.load('http://localhost:8008/cgi-bin/return.py',
@@ -17,22 +18,28 @@ function editreturn(){
}
function linkEnglish(){
url = window.location+"";
- pos = url.find('?F');
+ grade = url.charAt(url.length-1);
+ last = url.charAt(url.length-3)+url.charAt(url.length-2)+grade;
+ pth = 'http://localhost:8008/content/English';
+ pos = url.indexOf('?F');
if (pos<0){
- window.location = 'content/English/index.html'
+ window.location = pth + '/index.html';
}else{
- last = url.charAt(url.length-1);
- window.location = 'content/English/p'+last+'.html'
+ tpth = pth + '/p'+grade+'.html'+last;
+ window.location = tpth;
}
};
function linkMathematics(){
url = window.location+"";
- pos = url.find('?F');
+ grade = url.charAt(url.length-1);
+ last = url.charAt(url.length-3)+url.charAt(url.length-2)+grade;
+ pth = 'http://localhost:8008/content/Mathematics';
+ pos = url.indexOf('?F');
if (pos<0){
window.location = 'content/Mathematics/index.html'
}else{
- last = url.charAt(url.length-1);
- window.location = 'content/Mathematics/p'+last+'.html'
+ tpth = pth + '/p'+grade+'.html'+last;
+ window.location = tpth;
}
};
function goback(){
diff --git a/content/js/navigation.js b/content/js/navigation.js
index 60bbd01..b4be939 100755
--- a/content/js/navigation.js
+++ b/content/js/navigation.js
@@ -1,7 +1,7 @@
$(document).ready(function(){
$('#linkHome').click(function(){
- window.location = 'content/index.html';
+ linkHome();
});
$('#linkEnglish').click(function(){
linkEnglish();