Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -110,7 +110,7 @@ GEM
|
||||
excon (>= 0.38.0)
|
||||
json
|
||||
erubis (2.7.0)
|
||||
excon (0.44.4)
|
||||
excon (0.45.0)
|
||||
execjs (2.4.0)
|
||||
factory_girl (4.5.0)
|
||||
activesupport (>= 3.0.0)
|
||||
|
@ -569,10 +569,17 @@ $(function() {
|
||||
$('#results ul').first().html('');
|
||||
$('.test-count .number').html(response.length);
|
||||
clearOutput();
|
||||
|
||||
_.each(response, function(result, index) {
|
||||
printOutput(result, false, index);
|
||||
printScoringResult(result, index);
|
||||
});
|
||||
|
||||
if (_.some(response, function(result) {
|
||||
return result.status === 'timeout';
|
||||
})) {
|
||||
showTimeoutMessage();
|
||||
}
|
||||
};
|
||||
|
||||
var renderCode = function(event) {
|
||||
@ -734,10 +741,7 @@ $(function() {
|
||||
|
||||
var showStatus = function(output) {
|
||||
if (output.status === 'timeout') {
|
||||
$.flash.danger({
|
||||
icon: ['fa', 'fa-clock-o'],
|
||||
text: $('#editor').data('message-timeout')
|
||||
});
|
||||
showTimeoutMessage();
|
||||
} else if (output.stderr) {
|
||||
$.flash.danger({
|
||||
icon: ['fa', 'fa-bug'],
|
||||
@ -755,6 +759,13 @@ $(function() {
|
||||
$('a[data-toggle="tab"]').eq(index || 0).tab('show');
|
||||
};
|
||||
|
||||
var showTimeoutMessage = function() {
|
||||
$.flash.danger({
|
||||
icon: ['fa', 'fa-clock-o'],
|
||||
text: $('#editor').data('message-timeout')
|
||||
});
|
||||
};
|
||||
|
||||
var showWorkspaceTab = function(event) {
|
||||
event.preventDefault();
|
||||
showTab(1);
|
||||
|
@ -180,7 +180,7 @@ de:
|
||||
stop: Stoppen
|
||||
submit: Code zur Bewertung abgeben
|
||||
test: Testen
|
||||
timeout: 'Ihr Code benötigte länger als die erlaubten %{permitted_execution_time} Sekunden, um zu terminieren.'
|
||||
timeout: 'Ihr Code hat die erlaubte Ausführungszeit von %{permitted_execution_time} Sekunden überschritten.'
|
||||
tooltips:
|
||||
save: Ihr Code wird automatisch gespeichert, wann immer Sie eine Datei herunterladen, ausführen oder testen. Explizites Speichern ist also selten notwendig.
|
||||
editor_file_tree:
|
||||
|
@ -180,7 +180,7 @@ en:
|
||||
stop: Stop
|
||||
submit: Submit Code For Assessment
|
||||
test: Test
|
||||
timeout: 'Your code took longer than the permitted %{permitted_execution_time} seconds to run.'
|
||||
timeout: 'Your code exceeded the permitted execution time of %{permitted_execution_time} seconds.'
|
||||
tooltips:
|
||||
save: Your code is automatically saved whenever you download, run, or test it. Therefore, explicitly saving is rarely necessary.
|
||||
editor_file_tree:
|
||||
|
@ -5,11 +5,7 @@
|
||||
var buildFlash = function(options) {
|
||||
if (options.text) {
|
||||
var container = options.container;
|
||||
var html = '';
|
||||
if (options.icon) {
|
||||
html += '<i class="' + options.icon.join(' ') + '"> ';
|
||||
}
|
||||
html += options.text;
|
||||
var html = (options.icon ? '<i class="' + options.icon.join(' ') + '"></i>' : '') + options.text;
|
||||
container.html(html);
|
||||
showFlashes();
|
||||
}
|
||||
|
Reference in New Issue
Block a user