summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/codeq.css2
-rw-r--r--index.html9
-rw-r--r--js/codeq/language.js10
-rw-r--r--js/codeq/navigation.js6
-rw-r--r--js/codeq/problem_list.js (renamed from js/codeq/problem.js)10
-rw-r--r--js/codeq/prolog.js6
-rw-r--r--js/codeq/python.js6
-rw-r--r--js/codeq/robot.js6
-rw-r--r--res/en.json4
-rw-r--r--res/sl.json4
10 files changed, 25 insertions, 38 deletions
diff --git a/css/codeq.css b/css/codeq.css
index e66ecd4..1e5919b 100644
--- a/css/codeq.css
+++ b/css/codeq.css
@@ -376,6 +376,6 @@ ul.dropdown-menu a {
}
/* problem index screen */
-#screen_problem .language-problems a {
+#screen_problem_list .language-problems a {
cursor: pointer;
}
diff --git a/index.html b/index.html
index e3a6f36..5752cb6 100644
--- a/index.html
+++ b/index.html
@@ -28,15 +28,14 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="#" title="Intelligent tutor system">CodeQ</a>
+ <a id="navigation-home" class="navbar-brand" href="#" title="Intelligent tutor system">CodeQ</a>
<!--a class="navbar-brand" id="title"></a-->
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
- <li style="display: none;" id="navigation-language"><a href="" data-tkey="language">Language</a></li>
- <li style="display: none;" id="navigation-problem"><a href="" data-tkey="problem">Problem</a></li>
+ <li style="display: none;" id="navigation-problem_list"><a href="" data-tkey="problem_list">Problems</a></li>
<li style="display: none;" id="navigation-python"><a href="" data-tkey="python">Python</a></li>
<li style="display: none;" id="navigation-prolog"><a href="" data-tkey="prolog">Prolog</a></li>
<li style="display: none;" id="navigation-robot"><a href="" data-tkey="robot">Robot</a></li>
@@ -148,7 +147,7 @@
</div>
<!-- problem selection screen for a specific language: groups of problems, with descriptions -->
- <div class="container" id="screen_problem" style="display: none;"></div>
+ <div class="container" id="screen_problem_list" style="display: none;"></div>
<!-- problem screen: prolog -->
<div class="container-fluid quadrants block1" id="screen_prolog" style="display: none;">
@@ -436,7 +435,7 @@
<script src="js/codeq/login.js"></script>
<script src="js/codeq/profile.js"></script>
<script src="js/codeq/language.js"></script>
- <script src="js/codeq/problem.js"></script>
+ <script src="js/codeq/problem_list.js"></script>
<script src="js/codeq/settings.js"></script>
</body>
</html>
diff --git a/js/codeq/language.js b/js/codeq/language.js
index 0893e33..b861560 100644
--- a/js/codeq/language.js
+++ b/js/codeq/language.js
@@ -7,14 +7,12 @@
jqProlog = $('#choose-prolog'),
jqPython = $('#choose-python'),
jqRobot = $('#choose-robot'),
- chooseProlog = function () {codeq.globalStateMachine.transition('problem', 'prolog');},
- choosePython = function () {codeq.globalStateMachine.transition('problem', 'python');},
- chooseRobot = function () {codeq.globalStateMachine.transition('problem', 'robot');};
+ chooseProlog = function () {codeq.globalStateMachine.transition('problem_list', 'prolog');},
+ choosePython = function () {codeq.globalStateMachine.transition('problem_list', 'python');},
+ chooseRobot = function () {codeq.globalStateMachine.transition('problem_list', 'robot');};
codeq.globalStateMachine.register('language',{
'enter': function(){
- $("#navigation-language").addClass("active").css('display', '');
-
jqScreen.css('display', '');
jqProlog.on('click', chooseProlog);
jqPython.on('click', choosePython);
@@ -25,8 +23,6 @@
jqPython.off();
jqRobot.off();
jqScreen.css('display', 'none');
-
- $('#navigation-language').css('display', 'none').removeClass("active");
}
});
})();
diff --git a/js/codeq/navigation.js b/js/codeq/navigation.js
index a1b8f3d..eafa5cc 100644
--- a/js/codeq/navigation.js
+++ b/js/codeq/navigation.js
@@ -81,12 +81,12 @@
//setup all the buttons in the banner
- $('#navigation-language').on('click', function(e){
+ $('#navigation-home').on('click', function(e){
codeq.globalStateMachine.transition('language');
e.preventDefault();
});
- $('#navigation-problem').on('click', function(e){
- codeq.globalStateMachine.transition('problem');
+ $('#navigation-problem_list').on('click', function(e){
+ codeq.globalStateMachine.transition('problem_list');
e.preventDefault();
});
$('#navigation-python').on('click', function(e){
diff --git a/js/codeq/problem.js b/js/codeq/problem_list.js
index 4387344..1b20fe2 100644
--- a/js/codeq/problem.js
+++ b/js/codeq/problem_list.js
@@ -1,5 +1,5 @@
(function(){
- var jqScreen = $('#screen_problem'),
+ var jqScreen = $('#screen_problem_list'),
languageCache = {}, // keyed by language identifier: processed data about languages
translationCache = [], // keys are autogenerated in ta(), a value is a dictionary of translations of a translation key for every language
problemCache = {}, // problem data cache, 3-level, keyed by: language, problem group, and problem identifier
@@ -349,12 +349,11 @@
// Register with the state machine
// ================================================================================
- codeq.globalStateMachine.register('problem', {
+ codeq.globalStateMachine.register('problem_list', {
'enter': function(language){
var data = null; // language data
- $('#navigation-language').css('display', '');
- $("#navigation-problem").addClass("active").css('display', '');
+ $("#navigation-problem_list").addClass("active").css('display', '');
if (!language) language = currentLanguage; // This happens when we hit this with the back button
@@ -378,8 +377,7 @@
},
'exit' : function(){
jqScreen.css('display', 'none');
- $('#navigation-language').css('display', 'none');
- $('#navigation-problem').css('display', 'none').removeClass("active");
+ $('#navigation-problem_list').css('display', 'none').removeClass("active");
}
});
})();
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index ce1865a..b73d037 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -67,8 +67,7 @@
var prologHandler; //created when we enter the prolog state and destroyed once we leave it
codeq.globalStateMachine.register('prolog', {
'enter': function (problemDef, commonDef, currentSolution) {
- $('#navigation-language').css('display', '');
- $('#navigation-problem').css('display', '');
+ $('#navigation-problem_list').css('display', '');
$("#navigation-prolog").addClass("active");
$('#navigation-prolog').css('display', '');
@@ -98,8 +97,7 @@
subScreens = null;
jqScreen.addClass('block1');
- $('#navigation-language').css('display', 'none');
- $('#navigation-problem').css('display', 'none');
+ $('#navigation-problem_list').css('display', 'none');
$("#navigation-prolog").removeClass("active");
$('#navigation-prolog').css('display', 'none');
}
diff --git a/js/codeq/python.js b/js/codeq/python.js
index c3a76b9..35c4be8 100644
--- a/js/codeq/python.js
+++ b/js/codeq/python.js
@@ -72,8 +72,7 @@
var pythonHandler; //created when we enter the python state and destroyed once we leave it
codeq.globalStateMachine.register('python', {
'enter': function (problemDef, commonDef, currentSolution) {
- $('#navigation-language').css('display', '');
- $('#navigation-problem').css('display', '');
+ $('#navigation-problem_list').css('display', '');
$("#navigation-python").addClass("active");
$('#navigation-python').css('display', '');
@@ -108,8 +107,7 @@
subScreens = null;
jqScreen.addClass('block1');
- $('#navigation-language').css('display', 'none');
- $('#navigation-problem').css('display', 'none');
+ $('#navigation-problem_list').css('display', 'none');
$("#navigation-python").removeClass("active");
$('#navigation-python').css('display', 'none');
}
diff --git a/js/codeq/robot.js b/js/codeq/robot.js
index 5d86559..1188c7f 100644
--- a/js/codeq/robot.js
+++ b/js/codeq/robot.js
@@ -67,8 +67,7 @@
var robotHandler; //created when we enter the robot state and destroyed once we leave it
codeq.globalStateMachine.register('robot', {
'enter': function (problemDef, commonDef, currentSolution) {
- $('#navigation-language').css('display', '');
- $('#navigation-problem').css('display', '');
+ $('#navigation-problem_list').css('display', '');
$("#navigation-robot").addClass("active");
$('#navigation-robot').css('display', '');
@@ -103,8 +102,7 @@
subScreens = null;
jqScreen.addClass('block1');
- $('#navigation-language').css('display', 'none');
- $('#navigation-problem').css('display', 'none');
+ $('#navigation-problem_list').css('display', 'none');
$("#navigation-robot").removeClass("active");
$('#navigation-robot').css('display', 'none');
}
diff --git a/res/en.json b/res/en.json
index 3fb2d7a..4cae11b 100644
--- a/res/en.json
+++ b/res/en.json
@@ -1,6 +1,6 @@
{
"language": "Language",
- "problem": "Problem",
+ "problem_list": "Problems",
"python": "Python",
"prolog": "Prolog",
"robot": "Robot",
@@ -13,4 +13,4 @@
"btn_run": "Run",
"btn_stop": "Stop",
"btn_more": "More..."
-} \ No newline at end of file
+}
diff --git a/res/sl.json b/res/sl.json
index 7f5cf7f..26d33ec 100644
--- a/res/sl.json
+++ b/res/sl.json
@@ -1,6 +1,6 @@
{
"language": "Jezik",
- "problem": "Problem",
+ "problem_list": "Naloge",
"python": "Python",
"prolog": "Prolog",
"robot": "Robot",
@@ -13,4 +13,4 @@
"btn_run": "Zaženi",
"btn_stop": "Ustavi",
"btn_more": "Več..."
-} \ No newline at end of file
+}