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 - - 5 files changed: 5 inserted, 116 deleted
@@ -85,16 +85,16 | |||
|
85 | 85 | prepare_list_information |
|
86 | 86 | render :action => 'list' and return |
|
87 | 87 | end |
|
88 | 88 | |
|
89 | 89 | if @submission.valid? |
|
90 | 90 | if @submission.save == false |
|
91 |
- |
|
|
91 | + flash[:notice] = 'Error saving your submission' | |
|
92 | 92 | elsif Task.create(:submission_id => @submission.id, |
|
93 | 93 | :status => Task::STATUS_INQUEUE) == false |
|
94 |
- |
|
|
94 | + flash[:notice] = 'Error adding your submission to task queue' | |
|
95 | 95 | end |
|
96 | 96 | else |
|
97 | 97 | prepare_list_information |
|
98 | 98 | render :action => 'list' and return |
|
99 | 99 | end |
|
100 | 100 | redirect_to :action => 'list' |
@@ -103,13 +103,13 | |||
|
103 | 103 | def source |
|
104 | 104 | submission = Submission.find(params[:id]) |
|
105 | 105 | if ((submission.user_id == session[:user_id]) and |
|
106 | 106 | (submission.problem != nil) and |
|
107 | 107 | (submission.problem.available)) |
|
108 | 108 | send_data(submission.source, |
|
109 |
- |
|
|
109 | + {:filename => submission.download_filename, | |
|
110 | 110 | :type => 'text/plain'}) |
|
111 | 111 | else |
|
112 | 112 | flash[:notice] = 'Error viewing source' |
|
113 | 113 | redirect_to :action => 'list' |
|
114 | 114 | end |
|
115 | 115 | end |
@@ -1,10 +1,10 | |||
|
1 | 1 | %h2 Live submit |
|
2 | 2 | %br |
|
3 | 3 | |
|
4 |
- %textarea#text_ |
|
|
4 | + %textarea#text_sourcecode{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 |
@@ -38,13 +38,13 | |||
|
38 | 38 | %h2 Console |
|
39 | 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 | 41 | :javascript |
|
42 | 42 | $(document).ready(function() { |
|
43 | 43 | e = ace.edit("editor") |
|
44 |
- e.setValue($("#text_ |
|
|
44 | + e.setValue($("#text_sourcecode").val()); | |
|
45 | 45 | e.gotoLine(1); |
|
46 | 46 | $("#language_id").trigger('change'); |
|
47 | 47 | brython(); |
|
48 | 48 | }); |
|
49 | 49 | |
|
50 | 50 |
deleted file |
deleted file |
deleted file |
You need to be logged in to leave comments.
Login now