Add waiting room to create programming groups (#1919)
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
This commit is contained in:
@ -20,6 +20,10 @@ var ProgrammingGroups = {
|
||||
is_other_session: function (other_session_id) {
|
||||
return this.session_id !== other_session_id;
|
||||
},
|
||||
|
||||
contains_own_user: function (users) {
|
||||
return users.find(e => ProgrammingGroups.is_other_user(e) === false) !== undefined
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on('turbolinks:load', function () {
|
||||
@ -35,4 +39,12 @@ $(document).on('turbolinks:load', function () {
|
||||
new bootstrap.Modal(modal).show();
|
||||
}
|
||||
}
|
||||
|
||||
const join_pair_button = $('.join_programming_pair');
|
||||
if (join_pair_button.isPresent()) {
|
||||
join_pair_button.on('click', function() {
|
||||
App.pg_matching?.waiting_for_match();
|
||||
CodeOceanEditor.showSpinner(join_pair_button);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user