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 | 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files |
|
2 | 2 | // listed below. |
|
3 | 3 | // |
|
4 | 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, |
|
5 | 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. |
|
6 | 6 | // |
|
7 | 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the |
|
8 | 8 | // the compiled file. |
|
9 | 9 | // |
|
10 | 10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
|
11 | 11 | // GO AFTER THE REQUIRES BELOW. |
|
12 | 12 | // |
|
13 | 13 | //= require jquery |
|
14 | 14 | //= require jquery_ujs |
|
15 | 15 | //= require jquery.ui.all |
|
16 | 16 | //= require bootstrap-sprockets |
|
17 | 17 | //= require moment |
|
18 | 18 | //= require bootstrap-sortable |
|
19 | 19 | //= require select2 |
|
20 | 20 | //= require ace-rails-ap |
|
21 | 21 | //= require ace/mode-c_cpp |
|
22 | + //= require ace/mode-python | |
|
22 | 23 | //= require ace/mode-ruby |
|
23 | 24 | //= require ace/mode-pascal |
|
24 | 25 | //= require ace/mode-javascript |
|
25 | 26 | //= require ace/mode-java |
|
26 | 27 | //= require ace/theme-merbivore |
|
27 | 28 | //= require custom |
|
28 | 29 | //= require jquery.countdown |
|
29 | 30 | //-------------- addition from local_jquery ----------- |
|
30 | 31 | //= require jquery.ui.datepicker |
|
31 | 32 | //= require jquery.ui.slider |
|
32 | 33 | //= require jquery-ui-timepicker-addon |
|
33 | 34 | //= require jquery-tablesorter |
|
34 | 35 | //= require best_in_place |
|
35 | 36 | //= require best_in_place.jquery-ui |
|
36 | 37 | |
|
37 | 38 | // since this is after blank line, it is not downloaded |
|
38 | 39 | //x= require prototype |
|
39 | 40 | //x= require prototype_ujs |
|
40 | 41 | //x= require effects |
|
41 | 42 | //x= require dragdrop |
|
42 | 43 | //x= require controls |
@@ -1,27 +1,27 | |||
|
1 | 1 | %h2 Live submit |
|
2 | 2 | %br |
|
3 | 3 | |
|
4 | 4 | %textarea#text_haha{style: "display:none"}~ @source |
|
5 | 5 | .container |
|
6 | 6 | .row |
|
7 | 7 | .col-md-12 |
|
8 | 8 | .alert.alert-info |
|
9 | 9 | Write your code in the following box, choose language, and click submit button when finished |
|
10 | 10 | .row |
|
11 | 11 | .col-md-7 |
|
12 | 12 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
13 | 13 | .col-md-5 |
|
14 | 14 | = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do |
|
15 | 15 | |
|
16 | 16 | = hidden_field_tag 'editor_text', @source |
|
17 | 17 | = hidden_field_tag 'submission[problem_id]', @problem.id |
|
18 | 18 | .form-group |
|
19 | 19 | = label_tag "Task:" |
|
20 | 20 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
21 | 21 | |
|
22 | 22 | .form-group |
|
23 | 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 | 25 | .form-group |
|
26 | 26 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
27 | 27 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
You need to be logged in to leave comments.
Login now