added search intervention. search opens new tab with search in the java course (at least in chrome)

send only 3 interventions per exercise at maximum
This commit is contained in:
Thomas Hille
2017-03-01 11:49:54 +01:00
parent 17d09accb7
commit 695b8946f6
10 changed files with 109 additions and 4 deletions

View File

@@ -618,7 +618,7 @@ configureEditors: function () {
}, timeUntilBreak);
setTimeout(function() {
$('#intervention-text').text(`Willst du eine Frage stellen?`);
$('#intervention-text').html("Möchtest du eine Frage stellen?");
$('#intervention-modal').modal('show');
$.ajax({
data: {
@@ -632,6 +632,13 @@ configureEditors: function () {
});
},
initializeSearchButton: function(){
$('.btn-search').button().click(function(){
var search = $('#search_search').val();
window.open(`https://open.hpi.de/courses/javaeinstieg2017/pinboard?query=${search}`, '_blank', 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes');
})
},
initializeEverything: function() {
this.initializeRegexes();
@@ -648,6 +655,7 @@ configureEditors: function () {
this.initializeTooltips();
if ($('#editor').data('show-interventions') == true){
this.initializeInterventionTimer();
this.initializeSearchButton();
}
this.initPrompt();
this.renderScore();