Browse Source

UI optimize

master
Menci 8 years ago
parent
commit
b6e8983f95
  1. 10
      views/problems.ejs
  2. 14
      views/submissions.ejs

10
views/problems.ejs

@ -40,10 +40,10 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
<script>
if (Cookies.get('show_tag') === '1') {
document.write('<input type="checkbox" checked>');
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: visible; }';
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { width: 0; white-space: nowrap; overflow: hidden; }';
} else {
document.write('<input type="checkbox">');
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: hidden; }';
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { white-space: nowrap; overflow: hidden; }';
}
</script>
@ -53,9 +53,9 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
let checked = $('#show_tag').checkbox('is checked');
Cookies.set('show_tag', checked ? '1' : '0');
if (checked) {
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: visible; }';
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { width: 0; white-space: nowrap; overflow: hidden; }';
} else {
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: hidden; }';
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { white-space: nowrap; overflow: hidden; }';
}
});
});
@ -98,7 +98,7 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
<tbody>
<% for (let problem of problems) { %>
<% if (problem.is_public || problem.allowedEdit) { %>
<tr>
<tr style="height: 44px; ">
<% if (user) { %>
<td>
<% if (problem.judge_state) { %>

14
views/submissions.ejs

@ -4,15 +4,15 @@
<div class="padding">
<form action="<%= syzoj.utils.makeUrl(['submissions']) %>" class="ui mini form" method="get" role="form" id="form">
<div class="inline fields" style="margin-bottom: 25px; ">
<label style="font-size: 1.2em; margin-right: 3px; ">题目 ID:</label>
<label style="font-size: 1.2em; margin-right: 1px; ">题目:</label>
<div class="field"><input name="problem_id" style="width: 50px; " type="text" value="<%= form.problem_id %>"></div>
<label style="font-size: 1.2em; margin-right: 3px; ">提交者:</label>
<label style="font-size: 1.2em; margin-right: 1px; ">提交者:</label>
<div class="field"><input name="submitter" style="width: 100px; " type="text" value="<%= form.submitter %>"></div>
<label style="font-size: 1.2em; margin-right: 3px; ">分数:</label>
<div class="field" style="padding-right: 6px; "><input name="min_score" style="width: 45px; " type="text" value="<%= form.min_score || 0 %>"></div>
<label style="font-size: 1.2em; margin-right: 1px; ">分数:</label>
<div class="field" style="padding-right: 6px; "><input name="min_score" style="width: 48px; " type="text" value="<%= form.min_score || 0 %>"></div>
<label style="font-size: 1.2em; margin-right: 7px; ">~</label>
<div class="field"><input name="max_score" style="width: 45px; " type="text" value="<%= form.max_score || 100 %>"></div>
<label style="font-size: 1.2em; margin-right: 3px; ">语言:</label>
<div class="field"><input name="max_score" style="width: 48px; " type="text" value="<%= form.max_score || 100 %>"></div>
<label style="font-size: 1.2em; margin-right: 1px; ">语言:</label>
<div class="field">
<div class="ui fluid selection dropdown" id="select_language" style="width: 110px; ">
<input type="hidden" name="language" value="<%= form.language %>">
@ -26,7 +26,7 @@
</div>
</div>
</div>
<label style="font-size: 1.2em; margin-right: 3px; ">状态:</label>
<label style="font-size: 1.2em; margin-right: 1px; ">状态:</label>
<div class="field">
<div class="ui fluid selection dropdown" id="select_status" style="width: 210px; ">
<input type="hidden" name="status" value="<%= form.status %>">

Loading…
Cancel
Save