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: 3 inserted, 9 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 | - |
|
@@ -5,15 +5,15 | |||||
|
5 | Select Problems |
|
5 | Select Problems |
|
6 | .panel-body |
|
6 | .panel-body |
|
7 | .form-inline |
|
7 | .form-inline |
|
8 | = select 'submission', |
|
8 | = select 'submission', |
|
9 | 'problem_id', |
|
9 | 'problem_id', |
|
10 | @problems.collect {|p| ["[#{p.name}] #{p.full_name}", main_submission_url(p.id)]}, |
|
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 |
- { class: 'select2 form-control' |
|
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 | - if @problem!=nil |
|
15 | - if @problem!=nil |
|
16 | %h2= "Task: #{@problem.full_name} (#{@problem.name})" |
|
16 | %h2= "Task: #{@problem.full_name} (#{@problem.name})" |
|
17 |
|
17 | ||
|
18 | - if @submissions!=nil |
|
18 | - if @submissions!=nil |
|
19 | - if @submissions.length>0 |
|
19 | - if @submissions.length>0 |
You need to be logged in to leave comments.
Login now