Processing math: 10%
Benützer: Keine Benutzer angemeldet.


Unterricht

Storyboard

>Modell

ID:(1957, 0)


// cnt_storyboard function show_div(num) { for (i = 0; i < num; i++) { $("#fld_" + i.toString()).show(); } } function one_div(idx, num) { for (i = 0; i < num; i++) { if (idx == i) { $("#fld_" + i.toString()).show(); } else { $("#fld_" + i.toString()).hide(); } } } function sound(txt) { const synth = window.speechSynthesis; slang = "de"; slang = slang + "-" + slang.toUpperCase(); sentences = txt.replace(/$/g, '').replace(/<[^>]*>?/gm, '').split(/[\\.!?]/); for (i = 0; i < sentences.length; i++) { var utterThis = new SpeechSynthesisUtterance(sentences[i]); utterThis.lang = slang; synth.speak(utterThis); } } // adapt function content_adapt() { // getWorkStoryboard - content_adapt var language = ['','en','es','de','pt','fr']; // keys var code = getCookie('druyd1'); if(code == '' || code == '[]'){ code = '{}'; setCookie('druyd1',code,365); } var obj = JSON.parse(code); // base var cookie = getCookie('druyd0'); if(cookie != '' && cookie.length > 0){ url_structure = window.location.href.split('/'); structure_arr = url_structure[url_structure.length-2].split('-'); slang = url_structure[url_structure.length-1]; nlang = language.indexOf(slang.substring(0,2)); if(nlang == undefined){ nlang = 1; } var code = getCookie('druyd1'); var obj = JSON.parse(code); student = obj.student; if(student == ''){ student = user_data[0]; } if(structure_arr.length == 2){ ref = url_structure[url_structure.length-2].split('-')[1]; ('body').css('cursor', 'progress'); .ajax({ type:'POST', url: '/getCourse', data: JSON.stringify([ref, nlang]), contentType:'application/json', dataType: 'json', success: function(data){ cnt = 1; $('#name').html("

" + data[0][1] + ":" + data[0][2] + "


"); txt = ""; for(var i = 0;i < data[1].length;i++){ txt = txt + "

" + data[1][i][1] + "

"; for(var j = 0;j < data[2].length;j++){ if(data[2][j][6] == data[1][i][0]){ // lecture (id, name, description, code, conduct, hour, 0, url_invitation) txt = txt + "
"; txt = txt + ""; txt = txt + "
"; txt = txt + "
"; if(data[2][j][2].length > 0){ txt = txt + "" + data[2][j][2] + "

"; } if(data[2][j][7] == ''){ txt = txt + "ZOOM Einladung:Nicht programmiert.

"; } else { txt = txt + "ZOOM Einladung:" + data[2][j][7] + "

"; } txt = txt + "Inhalt
"; // list storyboard txt = txt + ""; for(var k = 0;k < data[3].length;k++){ if(data[2][j][0] == data[3][k][3]){ if(data[3][k][5] == ''){ txt = txt + ""; } else { if(data[3][k][2] == 0){ txt = txt + ""; } else { txt = txt + ""; } } } } txt = txt + "
 • "+data[3][k][1]+"
 • "+data[3][k][1]+"
 • "+data[3][k][1]+"
"; txt = txt + "
"; txt = txt + "
"; txt = txt + "
"; cnt++; } } } ('#strct').html(txt); } }); ('body').css('cursor', 'default'); } } } // actions $(document).ready(function () { content_adapt() // content_action in cnt_storyboard // getWorkStoryboard - content_action var idx = 0; var num = "1"; ("#lr").hide() ("#content").css({ 'height': (window.innerHeight - ('#head').height() - 16) + 'px' }); ('#select input[type=radio]').change(function () { ("#content").css({ 'height': (window.innerHeight - $('#head').height() - 16) + 'px' }); if ((this).val() == 2) { ("#lr").show(num); cnt = idx + 1 ('#cnt').text(cnt.toString() + ' of ' + num.toString()); one_div(idx, num); ("#fld_video").hide(); } else { $("#lr").hide(); if ($(this).val() == 3) { one_div(-1, num); $("#fld_video").show(); } else { show_div(num); $("#fld_video").hide(); } } }); ('#select input[type=label]').click(function () { }); ("#left").click(function () { idx--; if (idx < 0) { idx = num - 1; } cnt = idx + 1 $('#cnt').text(cnt.toString() + ' of ' + num.toString()); one_div(idx, num); }); ("#right").click(function () { idx++; if (idx > num - 1) { idx = 0; } cnt = idx + 1 ('#cnt').text(cnt.toString() + ' of ' + num.toString()); one_div(idx, num); }); ("#ctrl").click(function () { if (("#index-panel").is(":visible") == true) { $("#index-panel").hide(); $('#mainSplitter').jqxSplitter({ panels: [{ size: '0%' }, { size: '100%' }] }); $("#arrow").attr("src", "/static/icons/chevronright32b.png"); } else { $("#index-panel").show(); $('#mainSplitter').jqxSplitter({ panels: [{ size: '25%' }, { size: '75%' }] }); $("#arrow").attr("src", "/static/icons/chevronleft32b.png"); } }); // radiobuttons of Model ('#networkEquation').on("click", function () { setNetworkEquation(vgraph_network); }); $('#networkNumber').on("click", function () { setNetworkNumber(vgraph_network); }); });