Description:
* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission* refactor go-botton for problem selection in main/submission
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r561:7995fc49e1d7 - - 2 files changed: 2 inserted, 8 deleted
@@ -1,6 +0,0 | |||
|
1 | - $ -> | |
|
2 | - $("#submission_problem_go").on 'click', (event) -> | |
|
3 | - url = $("#submission_problem_id").val() | |
|
4 | - if (url) | |
|
5 | - window.location = url | |
|
6 | - |
@@ -1,25 +1,25 | |||
|
1 | 1 | = user_title_bar(@user) |
|
2 | 2 | |
|
3 | 3 | .panel.panel-info |
|
4 | 4 | .panel-heading |
|
5 | 5 | Select Problems |
|
6 | 6 | .panel-body |
|
7 | 7 | .form-inline |
|
8 | 8 | = select 'submission', |
|
9 | 9 | 'problem_id', |
|
10 | 10 | @problems.collect {|p| ["[#{p.name}] #{p.full_name}", main_submission_url(p.id)]}, |
|
11 | - {:selected => '-1'}, | |
|
11 | + { selected: (@problem ? main_submission_url(@problem) : -1) }, | |
|
12 | 12 |
{ class: 'select2 form-control' |
|
13 |
- %button.btn.btn-primary.btn-sm#submission_problem_ |
|
|
13 | + %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: '#submission_problem_id'}} Go | |
|
14 | 14 | |
|
15 | 15 | - if @problem!=nil |
|
16 | 16 | %h2= "Task: #{@problem.full_name} (#{@problem.name})" |
|
17 | 17 | |
|
18 | 18 | - if @submissions!=nil |
|
19 | 19 | - if @submissions.length>0 |
|
20 | 20 | %table.info |
|
21 | 21 | %tr.info-head |
|
22 | 22 | %th.info No. |
|
23 | 23 | %th.info # |
|
24 | 24 | %th.info At |
|
25 | 25 | %th.info Source |
You need to be logged in to leave comments.
Login now