var demos =
/*
[
"
Après avoir emprunté le/un pont enjambant le torrent qui nous éclabousse au passage d´une fine poussière humide, nous prenons la direction du col. Dans le lointain, une barrière de montagnes se dégage à peine des vapeurs encore toutes fraîches de la nuit.
",
"- Le tribunal s´est montré clément enversavecà l´égard de ce jeune délinquant. – Cette femme doit avoir dans les cinquante ans.
- L´adolescent, en retard, se hâtait sur le lieu de rendez-vous.
- DèsAprès son arrivée à Londres, ma nièce se mettra en quête d’un emploi.
",
"Moje oblíbené město je: PrahaBrnoOstravaOlomouc."
]
*/
{
gap_input: [
{title: "", task: "", content: "- Le tribunal s´est montré clément enversavecà l´égard de ce jeune délinquant. – Cette femme doit avoir dans les cinquante ans.
- L´adolescent, en retard, se hâtait sur le lieu de rendez-vous.
- DèsAprès son arrivée à Londres, ma nièce se mettra en quête d’un emploi.
",
},
{title: "", task: "2. Completa con el verbo en el tiempo más adecuado (imperfecto o indefinido).", content: "- El domingo yo (conocer) conocí a una chica que (ser) era de un país centroamericano.
- Cuando él (tener) tenía 27 años, (vivir) vivía todavía en casa de sus padres.
- Luisa (irse) se fue de casa porque su padre (ser) era muy autoritario.
- La película que (ver, yo) vi el viernes me (gustar) gustó mucho.
- Como no (haber) había entradas, no (poder, nosotros) pudimos ir al concierto.
",
},
],
gap_select: [
{title: "INDEFINIDO × IMPERFECTO ", task: "1. Elige y escribe los verbos correctos.", content: "- Mi abuela *cantaba / cantó ópera.
- Ayer los vecinos *tuvieron / tenían la radio puesta hasta las tres de la madrugada.
- En verano por las noches siempre *tomábamos / tomamos cocteles.
- El lunes, cuando recibía / *recibí tus mensajes, me *puse / ponía muy contento.
"}
],
gap_dad: [
{title: "", task: "Match the list of words describing things you might find in particular kinds of books with an appropriate type of book from the list.", content: "1 | section on 'troubleshooting' [problem-solving] | manual |
2 | concise information about a subject | compendium |
3 | record of a recent examination or test of a lorry | logbook |
4 | day-to-day record of life during a war in 1776 | journal |
"},
{title: "", task: "Complete the sentences with one of the verbs from the clue.", content: " -
Do you really hope you will ever get the money you have lent him?
-
The conference will be held in our faculty.
-
She slid on the icy sidewalk.
-
The dam burst and flooded the whole valley.
-
The sculpture was cast in bronze.
-
Tourists flocked to the shrine where the statue was said to have shed tears.
-
The label was stuck to the box.
-
We have run out of petrol.
-
The sun rose at 5:30 a.m.
-
They raised enough money to build a new center for research.
"}
],
desc_input: [
{title: "", task: "", background: { img: "examples/cell/plantcell_11_blank.jpg", x: 0, y:0 },
descs: [
{title: "cytoplasm", x: 452, y: 41},
{title: "cell wall", x: 36, y: 52},
{title: "vacuole", x: 466, y: 127},
{title: "centrosome", x: 467, y: 158},
{title: "mitochondrion", x: 28, y: 147},
{title: "ribosomes", x: 458, y: 339},
{title: "Golgi body", x: 417, y: 380}
]
}
],
desc_dad: [
{title: "", task: "", background: { img: "examples/cell/plantcell_11_blank.jpg", x: 0, y:0 },
descs: [
{title: "cytoplasm", x: 452, y: 41},
{title: "cell wall", x: 36, y: 52},
{title: "vacuole", x: 466, y: 127},
{title: "centrosome", x: 467, y: 158},
{title: "mitochondrion", x: 28, y: 147},
{title: "ribosomes", x: 458, y: 339},
{title: "Golgi body", x: 417, y: 380}
]
}
],
pic_dad: [
{title: "", task: "Do mapky vyznač místa, kde se těží následující nerostné suroviny.", background: { img: "examples/nerosty/australie_slepa500.png", x: 0, y:0 },
dragitems: [
{id: "drag_1", src:"examples/nerosty/Fe.png", width:11, height: 20},
{id: "drag_2", src:"examples/nerosty/ropa_plyn.png", width:23, height: 20},
{id: "drag_3", src:"examples/nerosty/uhli.png", width:20, height: 20}
],
dropareas: [
{id: "drag_2", x: 425, y: 362, width: 23, height: 25 },
{id: "drag_2", x: 37, y: 76, width: 23, height: 25 },
{id: "drag_2", x: 353, y: 188, width: 23, height: 25 },
{id: "drag_1", x: 157, y: 71, width: 23, height: 25 },
{id: "drag_1", x: 53, y: 157, width: 23, height: 25 },
{id: "drag_1", x: 96, y: 235, width: 23, height: 25 },
{id: "drag_1", x: 266, y: 249, width: 23, height: 25 },
{id: "drag_3", x: 388, y: 145, width: 23, height: 25 },
{id: "drag_3", x: 430, y: 247, width: 23, height: 25 },
{id: "drag_3", x: 400, y: 288, width: 23, height: 25 },
{id: "drag_3", x: 54, y: 270, width: 23, height: 25 }
]
}
]
}
function showDemo(evt) {
// Get the editor instance that we want to interact with.
resetAll()
var index = parseInt(evt.currentTarget.getAttribute("data-index"))
var editor = CKEDITOR.instances.editor1;
var demo = demos[mainMode][index];
document.getElementById("edit_title").innerHTML = demo.title;
document.getElementById("edit_task").innerHTML = demo.task;
if (mainMode == "gap_input" || mainMode == "gap_select" || mainMode == "gap_dad" ) {
editor.setData( demo.content );
// Check the active editing mode.
if ( editor.mode == 'wysiwyg' )
{
// Insert HTML code.
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
editor.setData( demo.content );
}
else
alert( 'Editor musí být v modu WYSIWYG!' );
}
if (mainMode == "desc_input") {
loadImage(demo.background.img);
for (var i = 0; i < demo.descs.length; i++) {
var desc = demo.descs[i]
addDraggableText(desc.title, desc.x, desc.y)
}
}
if (mainMode == "desc_dad") {
loadImage(demo.background.img);
for (var i = 0; i < demo.descs.length; i++) {
var desc = demo.descs[i]
addDraggableText(desc.title, desc.x, desc.y)
}
}
if (mainMode == "pic_dad") {
loadImage(demo.background.img);
for (var i = 0; i < demo.dragitems.length; i++) {
var di = demo.dragitems[i]
addDraggable(di.src, di.width, di.height)
}
for (var i = 0; i < demo.dropareas.length; i++) {
var da = demo.dropareas[i]
addInstanceOf($("#dragbase [data-id='" + da.id + "']")[0], da.x, da.y)
//addDraggable(di.src, di.width, di.height)
}
}
getInputMaxLength()
}