Merge branch 'develop' into szzh

This commit is contained in:
sw 2015-09-19 16:36:57 +08:00
commit 6dab5ef34c
4 changed files with 11 additions and 16 deletions

View File

@ -78,11 +78,7 @@
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
<div class="fl">
<% if homework.homework_detail_programing.language.to_i == 1%>
C
<% elsif homework.homework_detail_programing.language.to_i == 2%>
C++
<% end%>
<%= homework.language_name%>
</div>
</div>
<div class="cl"></div>

View File

@ -36,11 +36,7 @@
<% if activity.homework_type == 2%>
<div class="homepagePostDeadline mr15">
语言:
<% if activity.homework_detail_programing.language.to_i == 1%>
C
<% elsif activity.homework_detail_programing.language.to_i == 2%>
C++
<% end%>
<%= activity.language_name%>
</div>
<% end %>

View File

@ -34,11 +34,7 @@
<% if homework_common.homework_type == 2%>
<div class="homepagePostDeadline mr15">
语言:
<% if homework_common.homework_detail_programing.language.to_i == 1%>
C
<% elsif homework_common.homework_detail_programing.language.to_i == 2%>
C++
<% end%>
<%= homework_common.language_name%>
</div>
<% end %>
<div class="homepagePostDeadline">

View File

@ -145,7 +145,14 @@ $(function(){
test_numbers += 1;
});
var language = $('select.language_type').val() == 1 ? 'C语言' : 'C++语言';
var language = '';
if($('select.language_type').val() == 1){
language = 'C';
}else if($('select.language_type').val() == 2){
language = 'C++';
}else if($('select.language_type').val() == 3){
language = 'Python';
}
if (valid) {
$("input[name=homework_type]").val(2);