Description:
- bootstrapize problem/edit
- bootstrapize announcement/edit
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r650:72b80e42fb9b - - 4 files changed: 2 inserted, 113 deleted
@@ -1,16 +1,16 | |||||
|
1 | %h2 Live submit |
|
1 | %h2 Live submit |
|
2 | %br |
|
2 | %br |
|
3 |
|
3 | ||
|
4 |
- %textarea#text_ |
|
4 | + %textarea#text_sourcecode{style: "display:none"}~ @source |
|
5 | .container |
|
5 | .container |
|
6 | .row |
|
6 | .row |
|
7 | .col-md-12 |
|
7 | .col-md-12 |
|
8 | .alert.alert-info |
|
8 | .alert.alert-info |
|
9 | Write your code in the following box, choose language, and click submit button when finished |
|
9 | Write your code in the following box, choose language, and click submit button when finished |
|
10 | .row |
|
10 | .row |
|
11 | .col-md-8 |
|
11 | .col-md-8 |
|
12 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
12 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
13 | .col-md-4 |
|
13 | .col-md-4 |
|
14 | = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do |
|
14 | = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do |
|
15 |
|
15 | ||
|
16 | = hidden_field_tag 'editor_text', @source |
|
16 | = hidden_field_tag 'editor_text', @source |
@@ -32,25 +32,25 | |||||
|
32 | .panel-body |
|
32 | .panel-body |
|
33 | - if @submission |
|
33 | - if @submission |
|
34 | = render :partial => 'submission_short', |
|
34 | = render :partial => 'submission_short', |
|
35 | :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
35 | :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
36 | .row |
|
36 | .row |
|
37 | .col-md-12 |
|
37 | .col-md-12 |
|
38 | %h2 Console |
|
38 | %h2 Console |
|
39 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
39 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
40 |
|
40 | ||
|
41 | :javascript |
|
41 | :javascript |
|
42 | $(document).ready(function() { |
|
42 | $(document).ready(function() { |
|
43 | e = ace.edit("editor") |
|
43 | e = ace.edit("editor") |
|
44 |
- e.setValue($("#text_ |
|
44 | + e.setValue($("#text_sourcecode").val()); |
|
45 | e.gotoLine(1); |
|
45 | e.gotoLine(1); |
|
46 | $("#language_id").trigger('change'); |
|
46 | $("#language_id").trigger('change'); |
|
47 | brython(); |
|
47 | brython(); |
|
48 | }); |
|
48 | }); |
|
49 |
|
49 | ||
|
50 |
|
50 | ||
|
51 | %script#__main__{type:'text/python3'} |
|
51 | %script#__main__{type:'text/python3'} |
|
52 | :plain |
|
52 | :plain |
|
53 | import sys |
|
53 | import sys |
|
54 | import traceback |
|
54 | import traceback |
|
55 |
|
55 | ||
|
56 | from browser import document as doc |
|
56 | from browser import document as doc |
deleted file |
deleted file |
deleted file |
You need to be logged in to leave comments.
Login now