Skip to content

Commit

Permalink
Merge pull request #352 from blackav/350-finish-the-contest-dialog-lo…
Browse files Browse the repository at this point in the history
…oks-bad

350 finish the contest dialog looks bad
  • Loading branch information
blackav authored Sep 1, 2024
2 parents e0e5532 + f0477cd commit 38094d7
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 14 deletions.
1 change: 1 addition & 0 deletions csp/contests/unpriv_header.csp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html><head>
<meta http-equiv="Content-type" content="text/html; charset=<s:config name="charset" />"/>
<link rel="stylesheet" href="<s:config name="style-prefix" />jquery-ui.min.css">
<link rel="stylesheet" type="text/css" media="screen" href='<s:config name="style-prefix" />jquery-ui.icon-font.css' />
<script src="<s:config name="style-prefix" />jquery.min.js"></script>
<script src="<s:config name="style-prefix" />jquery-ui.min.js"></script>
<script type="text/javascript" src="<s:config name="style-prefix" />unpriv.js"></script>
Expand Down
29 changes: 20 additions & 9 deletions csp/contests/unpriv_main_info.csp
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,17 @@ $(function() {
</script>

<div id="virtual-stop-confirm" title="<s:_>Stop virtual contest?</s:_>">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span>Are you sure you want to stop your virtual contest?</p>
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0px 10px 0px 0px; font-size: 20px;"></span><s:_>Are you sure you want to stop your virtual contest?</s:_></p>
</div>

<% if (global->is_virtual <= 0 && start_time > 0 && stop_time <= 0) { %>
<div id="real-stop-confirm" title="<s:_>Finish contest?</s:_>">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span><s:_>Are you sure you want to finish your contest?</s:_></p>
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0px 10px 0px 0px; font-size: 20px;"></span><s:_>Are you sure you want to finish your contest?</s:_></p>
</div>

<div style="display: none;">
<span id="FinishDialogOk"><s:_>Finish the contest</s:_></span>
<span id="FinishDialogCancel"><s:_>Cancel</s:_></span>
</div>

<script>
Expand All @@ -205,15 +210,21 @@ $(function() {
modal: true,
open: function() {
},
buttons: {
"Finish the contest": function() {
$(this).dialog("close");
$("#real-stop-form").submit();
buttons: [
{
text: $("#FinishDialogOk").text(),
click: function() {
$(this).dialog("close");
$("#real-stop-form").submit();
}
},
Cancel: function() {
$(this).dialog("close");
{
text: $("#FinishDialogCancel").text(),
click: function() {
$(this).dialog("close");
}
}
}
]
});
$("#real-stop-button").on("click", function(event) {
$("#real-stop-confirm").dialog("open");
Expand Down
17 changes: 16 additions & 1 deletion csp/super-server/cnts_edit_cur_languages_page.csp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function newLanguageEnableImport()
if (!cs_lang) continue;
if (!phr->ss->cs_lang_names[i]) continue;
if (!*phr->ss->cs_lang_names[i]) continue;
const struct section_language_data *lang = 0;
struct section_language_data *lang = 0;
if (phr->ss->cs_loc_map[i] > 0) lang = phr->ss->langs[phr->ss->cs_loc_map[i]];
const unsigned char *td_attr = "";
td_attr = "";
Expand Down Expand Up @@ -517,6 +517,21 @@ function newLanguageEnableImport()
int compile_id = lang->compile_id;
row = 1;
snprintf(onclickstr_buf, sizeof(onclickstr_buf), "popupMainDialog(%d)", compile_id);

if (lang->disabled < 0) lang->disabled = 0;
if (lang->binary < 0) lang->binary = 0;
if (lang->insecure < 0) lang->insecure = 0;
if (lang->disable_security < 0) lang->disable_security = 0;
if (lang->enable_suid_run < 0) lang->enable_suid_run = 0;
if (lang->is_dos < 0) lang->is_dos = 0;
if (lang->disable_auto_testing < 0) lang->disable_auto_testing = 0;
if (lang->disable_testing < 0) lang->disable_testing = 0;
if (lang->enable_custom < 0) lang->enable_custom = 0;
if (lang->enable_ejudge_env < 0) lang->enable_ejudge_env = 0;
if (lang->preserve_line_numbers < 0) lang->preserve_line_numbers = 0;
if (lang->default_disabled < 0) lang->default_disabled = 0;
if (lang->enabled < 0) lang->enabled = 0;
if (lang->disable_auto_update < 0) lang->disable_auto_update = 0;
%>

<s:tr id="orig-lang_id-div" idSuffix="idsuffix" attr="form_row_attrs[row ^= 1]" onclickExpr="onclickstr_buf">
Expand Down
8 changes: 7 additions & 1 deletion l10n/ejudge.kk_KZ.UTF-8.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 3.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-06 02:06+0300\n"
"POT-Creation-Date: 2024-09-01 16:22+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Kazakh <[email protected]>\n"
Expand Down Expand Up @@ -482,6 +482,9 @@ msgstr ""
msgid "Are you sure you want to finish your contest?"
msgstr ""

msgid "Are you sure you want to stop your virtual contest?"
msgstr ""

msgid "Area"
msgstr ""

Expand Down Expand Up @@ -1493,6 +1496,9 @@ msgstr ""
msgid "Finish session"
msgstr ""

msgid "Finish the contest"
msgstr ""

msgid "Finish the exam"
msgstr ""

Expand Down
8 changes: 7 additions & 1 deletion l10n/ejudge.ru_RU.UTF-8.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ejudge 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-06 02:06+0300\n"
"POT-Creation-Date: 2024-09-01 16:22+0300\n"
"PO-Revision-Date: 2024-03-17 14:09+0300\n"
"Last-Translator: Alexander Chernov <[email protected]>\n"
"Language-Team: Russian <[email protected]>\n"
Expand Down Expand Up @@ -532,6 +532,9 @@ msgstr "При создании архива программой tar произ
msgid "Are you sure you want to finish your contest?"
msgstr "Вы уверены, что хотите завершить турнир?"

msgid "Are you sure you want to stop your virtual contest?"
msgstr "Вы уверены, что хотите завершить виртуальный турнир?"

msgid "Area"
msgstr "Район"

Expand Down Expand Up @@ -1548,6 +1551,9 @@ msgstr "Завершить экзамен"
msgid "Finish session"
msgstr "Завершить сеанс работы"

msgid "Finish the contest"
msgstr "Завершить турнир"

msgid "Finish the exam"
msgstr "Завершить экзамен"

Expand Down
8 changes: 7 additions & 1 deletion l10n/ejudge.uk_UA.UTF-8.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 3.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-06 02:06+0300\n"
"POT-Creation-Date: 2024-09-01 16:22+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Ukrainian <[email protected]>\n"
Expand Down Expand Up @@ -482,6 +482,9 @@ msgstr ""
msgid "Are you sure you want to finish your contest?"
msgstr ""

msgid "Are you sure you want to stop your virtual contest?"
msgstr ""

msgid "Area"
msgstr ""

Expand Down Expand Up @@ -1493,6 +1496,9 @@ msgstr ""
msgid "Finish session"
msgstr ""

msgid "Finish the contest"
msgstr ""

msgid "Finish the exam"
msgstr ""

Expand Down
3 changes: 2 additions & 1 deletion style/jquery-ui.icon-font.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ html .ui-datepicker .ui-datepicker-next .ui-icon {
/* close button positioning on dialogs titlebar */
html .ui-dialog .ui-dialog-titlebar-close {
height: 1.8em;
margin: -0.9em 0 0 0;
margin: 0 0 0 0;
right: 0.3em;
width: 1.8em;
float: right;
}
/* resizable on dialog */
html .ui-dialog .ui-resizable-se {
Expand Down

0 comments on commit 38094d7

Please sign in to comment.