{{description}} {{#pix}}e/cancel, core, Stundenplan schließen{{/pix}}
{{#saturday}}{{/saturday}} {{#periods}} {{#days}} {{/days}} {{/periods}}
{{date}}
MoDiMiDoFrSa
{{number}}
{{starttime}}-{{endtime}}
{{#lessons}} {{/lessons}}

{{#pix}}i/show, core, Details anzeigen{{/pix}}Details anzeigen
{{# js }} require([ 'jquery','core/ajax','core/templates', 'core/notification' ] , function($, ajax, templates, notification) { function load_timetable(type, name, week, id) { //alert($("#"+id)); //alert("type: "+type); //alert("Week: "+week); var promises = ajax.call([ { methodname: 'mod_timetable_get', args: { type: type, name: name, week: week } }, ]); promises[0].done(function(response) { console.log('mod_timetable/get is' + response); templates.render('mod_timetable/timetable',response).done(function(html, js) { $("#"+id).replaceWith(html); templates.runTemplateJS(js); }).fail(notification.exception); }).fail(function(ex) { // do something with the exception }); } function select_type(type) { $(".subject").hide(); $(".class").hide(); $(".teacher").hide(); $(".room").hide(); $("."+type).show(); block_timetable_type = type; } $('[data-toggle="popover"]').popover(); //alert("Hi, this is a test"); $(".nextweek").click(function() { load_timetable($(event.target).data('type'), $(event.target).data('name'), $(event.target).data('week'), $(event.target).data('id')); //.parentNode.parentNode.parentNode.parentNode); }); $(".prevweek").click(function() { load_timetable($(event.target).data('type'), $(event.target).data('name'), $(event.target).data('week'), $(event.target).data('id')); //.parentNode.parentNode.parentNode); }); $(".block_timetable_select").click(function() { select_type($(event.target).data('type')); }); $(".block_timetable_detail_show").click(function(event) { //$(".lesson_detail").show(); var id = event.currentTarget.id; $("#"+id+".lesson_details").css({"display":"inline"}); $("#"+id+".time").css({"display":"block"}); //$("#"+id+".lesson_details").show(); $("#"+id+".block_timetable_detail_show").hide(); $("#"+id+".block_timetable_detail_hide").show(); }); $(".block_timetable_detail_hide").click(function(event) { //$(".lesson_detail").hide(); var id = event.currentTarget.id; $("#"+id+".lesson_details").css({"display":"none"}); $("#"+id+".time").css({"display":"none"}); //$("#"+id+".lesson_details").hide(); $("#"+id+".block_timetable_detail_show").show(); $("#"+id+".block_timetable_detail_hide").hide(); }); if (typeof block_timetable_type !== 'undefined') { console.log("block_timetable_type found:"+block_timetable_type); select_type(block_timetable_type); } else { select_type('subject'); } }); {{/ js }}