Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/kiran-p/Quiz-on-AngularJS
Browse files Browse the repository at this point in the history
resolved conflicts:
	app/index.html
	app/js/views/templates/helpView.html
	app/js/views/templates/quizView.html
  • Loading branch information
Shiti committed Dec 14, 2012
2 parents ab146c3 + 8dedaa9 commit 477067c
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 28 deletions.
14 changes: 7 additions & 7 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!doctype html>
<html data-ng-app="quizApp" ng-controller="AppCtrl">
<head>
<title>Quiz</title>
<title>{{locale['Quiz']}}</title>
</head>
<body class='quiz-body' ng-init="loadLang()">
<div id="floating-toolbar">
<select id="language-select" data-ng-change="selectAction()"data-ng-model="selected" data-ng-options="l.id as l.label for l in languages"></select>
<div ng-controller="ThemeCtrl" class="theme-bar">
<link rel="stylesheet" href="css/themes/{{theme}}/theme.css">
<div class='dark' data-ng-click="changeTheme('dark')"></div><div class='funky' data-ng-click="changeTheme('funky')"></div>
</div>
<div id="floating-toolbar">
<select id="language-select" data-ng-change="selectAction()"data-ng-model="selected" data-ng-options="l.id as l.label for l in languages"></select>
<div ng-controller="ThemeCtrl" class="theme-bar">
<link rel="stylesheet" href="css/themes/{{theme}}/theme.css">
<div class='dark' data-ng-click="changeTheme('dark')"></div><div class='funky' data-ng-click="changeTheme('funky')"></div>
</div>
</div>

<div data-ng-view></div>
<script src="js/thirdparty/jquery-1.8.3.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions app/js/controllers/quizCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ quizApp.controller('QuizCtrl', function QuizCtrl($rootScope, $scope, $resource,
$rootScope.userName="";
$location.path('/');
};
$scope.back=function(){
$location.path('/');
};
});
12 changes: 9 additions & 3 deletions app/js/i18n/de.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"locale-id": "de",
"appTitle": "Quiz Anwendung",
"home-title": "Quiz",
"home-text": "geben Sie Ihren Namen",
"Quiz": "Quiz",
"enter-your-name": "Geben Sie Ihren Namen",
"start-quiz": "Quiz starten",
"help": "helfen",
"results":"Ergebnisse",
"congrats":"Herzlichen Glückwunsch!",
"score-msg":"Ihr Ergebnis ist ",
"play-again":"spiele wieder",
"new-game":"neues Spiel"
"new-game":"neues Spiel",
"next":"neben",
"pass":"gehen",
"question":"Frage",
"weight":"Gewicht",
"quit":"verlassen",
"back":"zurück"
}
12 changes: 9 additions & 3 deletions app/js/i18n/en.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"locale-id": "en",
"appTitle": "Quiz Application",
"home-title": "Quiz",
"home-text": "Enter your name",
"Quiz": "Quiz",
"enter-your-name": "Enter your name",
"start-quiz": "Start Quiz",
"help": "Help",
"results":"Results",
"congrats":"Congratulations!",
"score-msg":"Your score is",
"play-again":"Play Again",
"new-game":"New Game"
"new-game":"New Game",
"next":"Next",
"pass":"Pass",
"question":"Question",
"weight":"Weight",
"quit":"Quit" ,
"back":"Back"
}
18 changes: 9 additions & 9 deletions app/js/views/templates/helpView.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<section class='help-view' data-ng-controller="HelpCtrl">
<ul>
<li>The score obtained at the end of the Quiz is sum of weights of the questions answered correctly</li>
<li>All the questions do not have the same weight</li>
<li>If you do not answer the question in the time limit the question is passed</li>
<li>There are {{quiz.questionnaire.length}} questions</li>
<li>Each question has time limit of {{quiz.duration}} seconds </li>
</ul>
<button data-ng-click="back()">Back</button>
<section class='help-view' data-ng-controller="QuizCtrl">
<div>
<p>The score obtained at the end of the Quiz is the sum of weights of the questions answered correctly.</p>
<p>There are {{quiz.questionnaire.length}} questions</p>
<p>All the questions do not have the same weight.</p>
<p>Each question has time limit of {{quiz.duration}} seconds </p>
<p>If you do not answer the question in the time limit the question is passed</p>
<button data-ng-click="back()">{{locale['back']}}</button>
</div>
</section>
2 changes: 1 addition & 1 deletion app/js/views/templates/homeView.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section class='home-view' data-ng-controller="HomeCtrl">
<div class='logo'></div>
<label class='name-label'>
<span>Enter your name</span>
<span>{{locale['enter-your-name']}}</span>
<input type='text' data-ng-model='userName'/>
</label>
<div class='button-bar'>
Expand Down
10 changes: 5 additions & 5 deletions app/js/views/templates/quizView.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<section class="quiz-view" data-ng-controller="QuizCtrl">
<header class='header'>
<span class='question-number'>Question {{currentPosition+1}}/{{quiz.questionnaire.length}}</span>
<span class='question-number'>{{locale['question']}} {{currentPosition+1}}/{{quiz.questionnaire.length}}</span>
<timer duration='{{quiz.duration}}' autostart='true'></timer>
<span class='weight'>Weight {{currentQuestion.weightage}}</span>
<span class='weight'>{{locale['weight']}} {{currentQuestion.weightage}}</span>
</header>
<section class='content'>
<div class='question'>{{currentQuestion.statement}}</div>
Expand All @@ -21,8 +21,8 @@
</div>
</section>
<footer class='footer'>
<a class='quit' data-ng-click="quit()"><span>&lt;</span> Quit</a>
<button data-ng-disabled="!isAnswered()" data-ng-click="submitAns(currentQuestion.id)">Next</button>
<a class='pass' data-ng-click="next()">Pass <span>&gt;</span></a>
<a class='quit' data-ng-click="quit()"><span>&lt;</span> {{locale['quit']}}</a>
<button data-ng-disabled="!isAnswered()" data-ng-click="submitAns(currentQuestion.id)">{{locale['next']}}</button>
<a class='pass' data-ng-click="next()">{{locale['pass']}}<span>&gt;</span></a>
</footer>
</section>

0 comments on commit 477067c

Please sign in to comment.