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:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

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 = user_title_bar(@user)
1 = user_title_bar(@user)
2
2
3 .panel.panel-info
3 .panel.panel-info
4 .panel-heading
4 .panel-heading
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_go Go
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
20 %table.info
20 %table.info
21 %tr.info-head
21 %tr.info-head
22 %th.info No.
22 %th.info No.
23 %th.info #
23 %th.info #
24 %th.info At
24 %th.info At
25 %th.info Source
25 %th.info Source
You need to be logged in to leave comments. Login now