-
Notifications
You must be signed in to change notification settings - Fork 3
/
NegativeVerbsSamples.html
112 lines (90 loc) · 10.3 KB
/
NegativeVerbsSamples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html>
<head>
<title>
LT Exercise -- Negative Verbs Samples
</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/ToC.css">
<link rel="stylesheet" href="css/pageStructure.css">
<link rel="stylesheet" href="css/tooltip.css">
<script type="text/javascript" src="js/Common.js"> </script>
<script type="text/javascript">
ButtonNext_OnPageLoad();
SetupArrayFunctions();
var samplesAsJson = '[{"InfinitiveLt":"dėkoti","En":"to thank","NegativeForm":"nedėkoti"},{"InfinitiveLt":"dirbti","En":"to work","NegativeForm":"nedirbti"},{"InfinitiveLt":"klausti","En":"to ask","NegativeForm":"neklausti"},{"InfinitiveLt":"galvoti","En":"to think","NegativeForm":"negalvoti"},{"InfinitiveLt":"imti","En":"to take","NegativeForm":"neimti"},{"InfinitiveLt":"aiškinti","En":"to explain","NegativeForm":"neaiškinti"},{"InfinitiveLt":"veikti","En":"to do","NegativeForm":"neveikti"},{"InfinitiveLt":"laukti","En":"to wait","NegativeForm":"nelaukti"},{"InfinitiveLt":"plaukti","En":"to sail","NegativeForm":"neplaukti"},{"InfinitiveLt":"prasidėti","En":"to start","NegativeForm":"neprasidėti"},{"InfinitiveLt":"augti","En":"to grow","NegativeForm":"neaugti"},{"InfinitiveLt":"gyventi","En":"to live","NegativeForm":"negyventi"},{"InfinitiveLt":"kainuoti","En":"to cost","NegativeForm":"nekainuoti"},{"InfinitiveLt":"dovanoti","En":"to make a present","NegativeForm":"nedovanoti"},{"InfinitiveLt":"eiti","En":"to go on foot","NegativeForm":"neiti"},{"InfinitiveLt":"apsirengti","En":"to dress up/to put on","NegativeForm":"neapsirengti"},{"InfinitiveLt":"atlyginti","En":"to pay back","NegativeForm":"neatlyginti"},{"InfinitiveLt":"atostogauti","En":"to holiday","NegativeForm":"neatostogauti"},{"InfinitiveLt":"atsibosti","En":"to get bored","NegativeForm":"neatsibosti"},{"InfinitiveLt":"atvažiuoti","En":"to come (by transports)","NegativeForm":"neatvažiuoti"},{"InfinitiveLt":"bėgti","En":"to run","NegativeForm":"nebėgti"},{"InfinitiveLt":"duoti","En":"to give away","NegativeForm":"neduoti"},{"InfinitiveLt":"gaminti","En":"to cook","NegativeForm":"negaminti"},{"InfinitiveLt":"gauti","En":"to get","NegativeForm":"negauti"},{"InfinitiveLt":"gerti","En":"to drink","NegativeForm":"negerti"},{"InfinitiveLt":"grįžti","En":"to come back","NegativeForm":"negrįžti"},{"InfinitiveLt":"įsivaizduoti","En":"to imagine","NegativeForm":"neįsivaizduoti"},{"InfinitiveLt":"išsinuomoti","En":"to rent","NegativeForm":"neišsinuomoti"},{"InfinitiveLt":"kalbėti","En":"to speak","NegativeForm":"nekalbėti"},{"InfinitiveLt":"keliauti","En":"to travel","NegativeForm":"nekeliauti"},{"InfinitiveLt":"kepti","En":"to bake / to fry","NegativeForm":"nekepti"},{"InfinitiveLt":"lipti","En":"to climb / to go up","NegativeForm":"nelipti"},{"InfinitiveLt":"komunikuoti","En":"to communicate","NegativeForm":"nekomunikuoti"},{"InfinitiveLt":"kopijuoti","En":"to copy","NegativeForm":"nekopijuoti"},{"InfinitiveLt":"kvėpuoti","En":"to breath","NegativeForm":"nekvėpuoti"},{"InfinitiveLt":"kviesti","En":"to invite","NegativeForm":"nekviesti"},{"InfinitiveLt":"leisti","En":"to spend","NegativeForm":"neleisti"},{"InfinitiveLt":"mėgti","En":"to like","NegativeForm":"nemėgti"},{"InfinitiveLt":"miegoti","En":"to sleep","NegativeForm":"nemiegoti"},{"InfinitiveLt":"mokėti","En":"to know","NegativeForm":"nemokėti"},{"InfinitiveLt":"naudoti","En":"to use","NegativeForm":"nenaudoti"},{"InfinitiveLt":"nutikti","En":"to happen","NegativeForm":"nenutikti"},{"InfinitiveLt":"parduoti","En":"to sell","NegativeForm":"neparduoti"},{"InfinitiveLt":"pasiimti","En":"to take","NegativeForm":"nepasiimti"},{"InfinitiveLt":"patikti","En":"to like","NegativeForm":"nepatikti"},{"InfinitiveLt":"pietauti","En":"to have lunch","NegativeForm":"nepietauti"},{"InfinitiveLt":"pirkti","En":"to buy","NegativeForm":"nepirkti"},{"InfinitiveLt":"planuoti","En":"to plan","NegativeForm":"neplanuoti"},{"InfinitiveLt":"pradėti","En":"to begin","NegativeForm":"nepradėti"},{"InfinitiveLt":"praleisti","En":"to spend","NegativeForm":"nepraleisti"},{"InfinitiveLt":"prekiauti","En":"to trade / to sell","NegativeForm":"neprekiauti"},{"InfinitiveLt":"ragauti","En":"to taste / to try","NegativeForm":"neragauti"},{"InfinitiveLt":"rasti","En":"to find","NegativeForm":"nerasti"},{"InfinitiveLt":"rezervuoti","En":"to book","NegativeForm":"nerezervuoti"},{"InfinitiveLt":"sirgti","En":"to be ill","NegativeForm":"nesirgti"},{"InfinitiveLt":"siųsti","En":"to send","NegativeForm":"nesiųsti"},{"InfinitiveLt":"skambinti","En":"to call","NegativeForm":"neskambinti"},{"InfinitiveLt":"skaudėti","En":"to hurt","NegativeForm":"neskaudėti"},{"InfinitiveLt":"skinti","En":"to pass / to move slowly","NegativeForm":"neskinti"},{"InfinitiveLt":"skristi","En":"to fly","NegativeForm":"neskristi"},{"InfinitiveLt":"skubėti","En":"to hurry","NegativeForm":"neskubėti"},{"InfinitiveLt":"sportuoti","En":"to play / do a sport","NegativeForm":"nesportuoti"},{"InfinitiveLt":"studijuoti","En":"to study","NegativeForm":"nestudijuoti"},{"InfinitiveLt":"sugesti","En":"to break down","NegativeForm":"nesugesti"},{"InfinitiveLt":"suprasti","En":"to understand","NegativeForm":"nesuprasti"},{"InfinitiveLt":"susitikti","En":"to meet","NegativeForm":"nesusitikti"},{"InfinitiveLt":"šviesti","En":"to shine","NegativeForm":"nešviesti"},{"InfinitiveLt":"traukti","En":"to pull, to attract","NegativeForm":"netraukti"},{"InfinitiveLt":"trukti","En":"to last","NegativeForm":"netrukti"},{"InfinitiveLt":"važiuoti","En":"to go by vehicle","NegativeForm":"nevažiuoti"},{"InfinitiveLt":"vėluoti","En":"to be late","NegativeForm":"nevėluoti"},{"InfinitiveLt":"virti","En":"to cook","NegativeForm":"nevirti"},{"InfinitiveLt":"vykti","En":"to take place","NegativeForm":"nevykti"},{"InfinitiveLt":"žaisti","En":"to play ( a sport)","NegativeForm":"nežaisti"},{"InfinitiveLt":"avėti","En":"to wear (shoes)","NegativeForm":"neavėti"},{"InfinitiveLt":"dėvėti","En":"to wear (clothes)","NegativeForm":"nedėvėti"},{"InfinitiveLt":"galėti","En":"to be able","NegativeForm":"negalėti"},{"InfinitiveLt":"kosėti","En":"to cough","NegativeForm":"nekosėti"},{"InfinitiveLt":"laimėti","En":"to win","NegativeForm":"nelaimėti"},{"InfinitiveLt":"norėti","En":"to want","NegativeForm":"nenorėti"},{"InfinitiveLt":"pastebėti","En":"to notice","NegativeForm":"nepastebėti"},{"InfinitiveLt":"sėdėti","En":"to sit","NegativeForm":"nesėdėti"},{"InfinitiveLt":"stovėti","En":"to stand","NegativeForm":"nestovėti"},{"InfinitiveLt":"turėti","En":"to have","NegativeForm":"neturėti"},{"InfinitiveLt":"žiūrėti","En":"to watch","NegativeForm":"nežiūrėti"},{"InfinitiveLt":"aplankyti","En":"to visit","NegativeForm":"neaplankyti"},{"InfinitiveLt":"atidaryti","En":"to open","NegativeForm":"neatidaryti"},{"InfinitiveLt":"atrodyti","En":"to look","NegativeForm":"neatrodyti"},{"InfinitiveLt":"bandyti","En":"to try","NegativeForm":"nebandyti"},{"InfinitiveLt":"daryti","En":"to do","NegativeForm":"nedaryti"},{"InfinitiveLt":"ieškoti","En":"to look for","NegativeForm":"neieškoti"},{"InfinitiveLt":"klausti","En":"to listen to","NegativeForm":"neklausti"},{"InfinitiveLt":"klausyti","En":"to listen","NegativeForm":"neklausyti"},{"InfinitiveLt":"laikyti","En":"to hold","NegativeForm":"nelaikyti"},{"InfinitiveLt":"matyti","En":"to see","NegativeForm":"nematyti"},{"InfinitiveLt":"pastatyti","En":"to build","NegativeForm":"nepastatyti"},{"InfinitiveLt":"pristatyti","En":"to deliver","NegativeForm":"nepristatyti"},{"InfinitiveLt":"rašyti","En":"to write","NegativeForm":"nerašyti"},{"InfinitiveLt":"sakyti","En":"to say","NegativeForm":"nesakyti"},{"InfinitiveLt":"skaityti","En":"to read","NegativeForm":"neskaityti"},{"InfinitiveLt":"taupyti","En":"to save money","NegativeForm":"netaupyti"},{"InfinitiveLt":"valgyti","En":"to eat","NegativeForm":"nevalgyti"}]';
// Parse pure json to js object
var samples = JSON.parse(samplesAsJson)
var currentSample = samples.random();
var notification = {};
function onNextActionButtonClick(){
// Check if it's answer request or next sample request
var isAnswerRequest = false;
var button = document.getElementById('NextActionButton');
if(button.innerText == 'Check answer') {isAnswerRequest = true;}
else {isAnswerRequest = false;}
// Call the respective function based on the request type
if(isAnswerRequest){
onAnswerRequest();
}
else { onNextSampleRequest(); }
}
function onAnswerRequest(){
// Show answer
var answerDiv = document.getElementById('Answer');
answerDiv.innerHTML = currentSample.NegativeForm;
// Amend button text
var button = document.getElementById('NextActionButton');
button.innerText = 'Next';
// Amend notification
notification.Answer = answerDiv.innerHTML;
}
function BuildQuestion(sample){
var result = '<div class="tooltip"> ' + sample.InfinitiveLt +' <span class="tooltiptext rightTooltip"> ' + sample.En + ' </span> </div> ';
return result;
}
function onNextSampleRequest(){
// Clean up answer
var answerDiv = document.getElementById('Answer');
answerDiv.innerHTML = '';
// Amend button text
var button = document.getElementById('NextActionButton');
button.innerText = 'Check answer';
// Setup new sample
var randomSample = samples.notRepeatingRandom(currentSample);
currentSample = randomSample;
// Setup question div
var divToAmend = document.getElementById('Question');
divToAmend.innerHTML = BuildQuestion(currentSample);
// Amend notification
notification.Answer = null;
notification.Question = divToAmend.innerHTML;
}
</script>
</head>
<body>
<div id='pageStructure' class="pageStructure">
<div id='ToC' class='ToC'></div>
<script type="text/javascript" src="js/ToC.js"> </script>
<script> uploadToC(); </script>
<div id="exercise" class="exercise">
<div id='table' class='content'>
<div id='Question'> dirbti </div>
<div id='Answer'> nedirbti </div>
<div id='Button'>
<button id='NextActionButton'
onclick="onNextActionButtonClick()">
Next
</button>
</div>
</div>
<div class="issueNotificationDiv">
<button id='notifyButton'
onclick="notify(notification.Question, notification.Answer)">
Tell about an error
</button>
</div>
</div>
</div>
</body>
</html>