Add file name to reset this file action

This commit is contained in:
Sebastian Serth
2020-01-30 19:27:16 +01:00
parent 1096c1a2f5
commit 75fe6e5b68
3 changed files with 5 additions and 3 deletions

View File

@ -59,7 +59,9 @@ configureEditors: function () {
confirmResetActiveFile: function (event) {
event.preventDefault();
if (confirm($('#start-over-active-file').data('message-confirm'))) {
let message = $('#start-over-active-file').data('message-confirm');
message = message.replace('%{filename}', CodeOceanEditor.active_file.filename.replace(/#$/,''))
if (confirm(message)) {
this.resetCode(true); // delete only active file
}
},

View File

@ -280,7 +280,7 @@ de:
collapse_action_sidebar: Aktions-Leiste Einklappen
collapse_output_sidebar: Ausgabe-Leiste Einklappen
confirm_start_over: Wollen Sie wirklich von vorne anfangen? Ihr kompletter Fortschritt wird entfernt. Diese Aktion kann nicht rückgängig gemacht werden.
confirm_start_over_active_file: Wollen Sie wirklich den Inhalt dieser Datei löschen? Diese Aktion kann nicht rückgängig gemacht werden.
confirm_start_over_active_file: Wollen Sie wirklich den Inhalt der ausgewählten Datei '%{filename}' löschen? Diese Aktion kann nicht rückgängig gemacht werden.
confirm_submit: Wollen Sie Ihren Code wirklich zur Bewertung abgeben?
create_file: Neue Datei
depleted: Alle Ausführungsausgebungen sind momentan in Benutzung. Probiere es später nochmal.

View File

@ -280,7 +280,7 @@ en:
collapse_action_sidebar: Collapse Action Sidebar
collapse_output_sidebar: Collapse Output Sidebar
confirm_start_over: Do you really want to start over? Your complete progress will be reset. You cannot undo this action.
confirm_start_over_active_file: Do you really want to reset this file? You cannot undo this action.
confirm_start_over_active_file: Do you really want to reset the active file '%{filename}'? You cannot undo this action.
confirm_submit: Do you really want to submit your code for grading?
create_file: New File
depleted: All execution environments are busy. Please try again later.