Add events for pair programming study

This commit is contained in:
kiragrammel
2023-09-04 23:57:30 +02:00
committed by Sebastian Serth
parent d1d5b0df6f
commit 79422225a8
15 changed files with 224 additions and 15 deletions

View File

@ -382,6 +382,20 @@ var CodeOceanEditor = {
$(document).on('click', '#results a', this.showOutput.bind(this));
$(document).on('keydown', this.handleKeyPress.bind(this));
$(document).on('theme:change:ace', this.handleAceThemeChangeEvent.bind(this));
$('#start_chat').on('click', function(event) {
this.createEventHandler('pp_start_chat', null)(event)
// Allow to open the new tab even in Safari.
// See: https://stackoverflow.com/a/70463940
setTimeout(() => {
var pop_up_window = window.open($('#start_chat').data('url'), '_blank');
if (pop_up_window) {
pop_up_window.onerror = function (message) {
$.flash.danger({text: message});
this.sendError(message, null);
};
}
})
}.bind(this));
this.initializeFileTreeButtons();
this.initializeWorkspaceButtons();
this.initializeRequestForComments()