Description:
set default language to python for Ace Editor
add ace/mode/python to asset pipeline
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r579:13a9e07f98ca - - 2 files changed: 2 inserted, 1 deleted
@@ -1,42 +1,43 | |||||
|
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files |
|
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files |
|
2 | // listed below. |
|
2 | // listed below. |
|
3 | // |
|
3 | // |
|
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, |
|
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, |
|
5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. |
|
5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. |
|
6 | // |
|
6 | // |
|
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the |
|
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the |
|
8 | // the compiled file. |
|
8 | // the compiled file. |
|
9 | // |
|
9 | // |
|
10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
|
10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
|
11 | // GO AFTER THE REQUIRES BELOW. |
|
11 | // GO AFTER THE REQUIRES BELOW. |
|
12 | // |
|
12 | // |
|
13 | //= require jquery |
|
13 | //= require jquery |
|
14 | //= require jquery_ujs |
|
14 | //= require jquery_ujs |
|
15 | //= require jquery.ui.all |
|
15 | //= require jquery.ui.all |
|
16 | //= require bootstrap-sprockets |
|
16 | //= require bootstrap-sprockets |
|
17 | //= require moment |
|
17 | //= require moment |
|
18 | //= require bootstrap-sortable |
|
18 | //= require bootstrap-sortable |
|
19 | //= require select2 |
|
19 | //= require select2 |
|
20 | //= require ace-rails-ap |
|
20 | //= require ace-rails-ap |
|
21 | //= require ace/mode-c_cpp |
|
21 | //= require ace/mode-c_cpp |
|
|
22 | + //= require ace/mode-python | ||
|
22 | //= require ace/mode-ruby |
|
23 | //= require ace/mode-ruby |
|
23 | //= require ace/mode-pascal |
|
24 | //= require ace/mode-pascal |
|
24 | //= require ace/mode-javascript |
|
25 | //= require ace/mode-javascript |
|
25 | //= require ace/mode-java |
|
26 | //= require ace/mode-java |
|
26 | //= require ace/theme-merbivore |
|
27 | //= require ace/theme-merbivore |
|
27 | //= require custom |
|
28 | //= require custom |
|
28 | //= require jquery.countdown |
|
29 | //= require jquery.countdown |
|
29 | //-------------- addition from local_jquery ----------- |
|
30 | //-------------- addition from local_jquery ----------- |
|
30 | //= require jquery.ui.datepicker |
|
31 | //= require jquery.ui.datepicker |
|
31 | //= require jquery.ui.slider |
|
32 | //= require jquery.ui.slider |
|
32 | //= require jquery-ui-timepicker-addon |
|
33 | //= require jquery-ui-timepicker-addon |
|
33 | //= require jquery-tablesorter |
|
34 | //= require jquery-tablesorter |
|
34 | //= require best_in_place |
|
35 | //= require best_in_place |
|
35 | //= require best_in_place.jquery-ui |
|
36 | //= require best_in_place.jquery-ui |
|
36 |
|
37 | ||
|
37 | // since this is after blank line, it is not downloaded |
|
38 | // since this is after blank line, it is not downloaded |
|
38 | //x= require prototype |
|
39 | //x= require prototype |
|
39 | //x= require prototype_ujs |
|
40 | //x= require prototype_ujs |
|
40 | //x= require effects |
|
41 | //x= require effects |
|
41 | //x= require dragdrop |
|
42 | //x= require dragdrop |
|
42 | //x= require controls |
|
43 | //x= require controls |
@@ -1,27 +1,27 | |||||
|
1 | %h2 Live submit |
|
1 | %h2 Live submit |
|
2 | %br |
|
2 | %br |
|
3 |
|
3 | ||
|
4 | %textarea#text_haha{style: "display:none"}~ @source |
|
4 | %textarea#text_haha{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-7 |
|
11 | .col-md-7 |
|
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-5 |
|
13 | .col-md-5 |
|
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 |
|
17 | = hidden_field_tag 'submission[problem_id]', @problem.id |
|
17 | = hidden_field_tag 'submission[problem_id]', @problem.id |
|
18 | .form-group |
|
18 | .form-group |
|
19 | = label_tag "Task:" |
|
19 | = label_tag "Task:" |
|
20 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
20 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
21 |
|
21 | ||
|
22 | .form-group |
|
22 | .form-group |
|
23 | = label_tag 'Language' |
|
23 | = label_tag 'Language' |
|
24 | - = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || Language.first.id), class: 'form-control select', style: "width: 100px" |
|
24 | + = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || Language.find_by_pretty_name("Python").id || Language.first.id), class: 'form-control select', style: "width: 100px" |
|
25 | .form-group |
|
25 | .form-group |
|
26 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
26 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
27 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
27 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
You need to be logged in to leave comments.
Login now