dev_forum
SylorHuang 6 years ago
parent ee04d36e97
commit 8a88b57a32

@ -734,6 +734,6 @@ module ExercisesHelper
#实训题学生代码的行数
def content_line(content)
content.split(/\r?\n/).length
content.split(/\r?\n/).length + 1
end
end

@ -315,7 +315,6 @@ table td{
/*}*/
textarea{
width:100%;
height:100%;
resize:none;
border:none;
background-color:#eee;

@ -322,6 +322,7 @@
<% else %>
<% latest_code = game.try(:lastest_code) %>
<% end %>
<% con_rows = content_line(latest_code) %>
<div class="mbt20">
<p class="bgc" >
<span class="pd10" style="display:inherit;">
@ -330,7 +331,7 @@
</span>
</p>
<div class="bg-e pd10">
<textarea class="" id="content_show_<%= game.id %>" name="content"><%= latest_code %></textarea>
<textarea class="" id="content_show_<%= game.id %>" name="content" rows="<%= con_rows %>">><%= latest_code %></textarea>
</div>
</div>
</div>

Loading…
Cancel
Save