Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
alan 2016-03-29 16:43:52 +08:00
commit e4fc9f39e0
14 changed files with 79 additions and 49 deletions

View File

@ -103,11 +103,10 @@ class StudentWorkController < ApplicationController
if result["status"].to_i != -2
#result["results"].first['output'] = result["results"].first['output'].gsub(" ","□")
#result["results"].first['result'] = result["results"].first['result'].gsub(" ","□")
space_replace_1(result["results"].first['output'])
space_replace_1(result["results"].first['result'])
end
space_replace_1(result["results"].first['output'])
space_replace_1(result["results"].first['result'])
logger.debug result
#-1 默认值 0全部正确并结束 2 超时 -2 编译错误

View File

@ -16,6 +16,7 @@
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->

View File

@ -15,6 +15,7 @@
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->

View File

@ -15,6 +15,7 @@
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->

View File

@ -15,6 +15,7 @@
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->

View File

@ -1,25 +1,27 @@
<%= form_tag share_message_to_project_user_path(user), :remote => true, :id=>'projects_list_form' %>
<%= form_tag share_message_to_project_user_path(user), :remote => true, :id => 'projects_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<div class="courseReferContainer">
<% if !projects.empty? %>
<% if !projects.empty? %>
<% projects.each do |project| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="project_ids[]" type="checkbox" value="<%= project.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= project.name%></li>
<li class="sendCourseName"><%= project.name %></li>
</ul>
<% end %>
</div>
</div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
</div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>

View File

@ -15,6 +15,7 @@
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->

View File

@ -1,4 +1,4 @@
<div class="boxContainer">
<div class="boxContainer" style="height: auto;">
<div>
<div class="sendText fl mr10" style="width: auto">发送到</div>
<div class="cl"></div>
@ -8,33 +8,9 @@
<!--<input type="text" name="search" placeholder="输入课程ID或者名称搜索" class="subjectSearch fr" />-->
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入课程ID或者名称搜索" class="mt10 mb10 course-search" />
</div>
<%= form_tag send_homework_to_course_user_path(user),:remote=>true,:id=>'choose_course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+current_time_and_term(course) + ']'%></li>
</ul>
<% end %>
</div>
<div id="send_homework_to_course_form">
<%= render :partial => "users/send_homework_to_course_form", :locals => {:user => user, :courses => courses, :send_id => send_id} %>
</div>
<div class="cl"></div>
<span id="choose_courses_notice" class="c_red"></span>
<div>
<div class="courseSendSubmit">
<a href="javascript:void(0);" onfocus='this.blur();' onclick="send_submit();" class="sendSourceText">确定</a>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a>
</div>
</div>
<div class="cl"></div>
<% end %>
</div>
<script type="text/javascript">
function send_submit() {
@ -58,6 +34,7 @@
$.ajax({
url: '<%= url_for(:controller => 'users', :action => 'choose_user_course') %>'+'?search='+ e.target.value+'&send_id=<%=send_id %>',
type:'get',
data: {is_observe:true},
success: function(data){ },
beforeSend: function(){ $(this).addClass('ajax-loading'); },
complete: function(){ $(this).removeClass('ajax-loading'); }

View File

@ -0,0 +1,27 @@
<%= form_tag send_homework_to_course_user_path(user), :remote => true, :id => 'choose_course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<div class="courseReferContainer">
<% if !courses.empty? %>
<% courses.each do |course| %>
<ul class="courseSend">
<li class="" style="display:inline-block">
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
</li>
<li class="sendCourseName"><%= truncate(course.name, :lendght => 25) + '['+current_time_and_term(course) + ']' %></li>
</ul>
<% end %>
<% end %>
</div>
</div>
<div class="cl"></div>
<span id="choose_courses_notice" class="c_red"></span>
<div>
<div class="courseSendSubmit">
<a href="javascript:void(0);" onfocus='this.blur();' onclick="send_submit();" class="sendSourceText">确定</a>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a>
</div>
</div>
<div class="cl"></div>

View File

@ -1,3 +1,4 @@
<% if params[:is_observe].nil? %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>');
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
@ -5,3 +6,6 @@ $('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' sty
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
<% else %>
$("#send_homework_to_course_form").html("<%= escape_javascript(render :partial => 'users/send_homework_to_course_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>");
<% end %>

View File

@ -133,7 +133,6 @@
<% else %>
<div class="ProResultTable " >
<ul class="ProResultUl " >
<% logger.error("################################################{test.results}") %>
<% test.results.reverse.each_with_index do |x, i| %>
<% unless x.nil? %>
<li ><span class="w60 T_C">测试<%=test.results.size-i%></span>

View File

@ -1221,3 +1221,20 @@ function clear_data(k,mdu){
$("#e_tip").html("");
}
}
function expand_reply(container,btnid){
var target = $(container);
var btn = $(btnid);
if(btn.data('init')=='0'){
btn.data('init',1);
btn.html('收起回复');
target.show();
}else{
btn.data('init',0);
btn.html('展开更多');
target.hide();
target.eq(0).show();
target.eq(1).show();
target.eq(2).show();
}
}

View File

@ -497,7 +497,7 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
.resourceSharePopup {width:300px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;}
.sendText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; width:110px; display:inline-block; font-weight: bold;}
.resourcesSendTo {float:left; height:20px; margin-top:15px;}
.boxContainer {height:33px; line-height:33px; position:relative}
.boxContainer {height:auto; line-height:33px; position:relative}
.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;}
.resourcePopupClose {width:20px; height:20px; display:inline-block; float:right;}
.resourceClose {background:url(images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000;}

View File

@ -450,7 +450,7 @@ a:hover.search_btn{ background: #0fa9bb;}
.resourceSharePopup {width:300px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;}
.sendText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; width:110px; display:inline-block; font-weight: bold;}
.resourcesSendTo {float:left; height:20px; margin-top:15px;}
.boxContainer {height:33px; line-height:33px; position:relative}
.boxContainer {height:auto; line-height:33px; position:relative}
.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;}
.resourcePopupClose {width:20px; height:20px; display:inline-block; float:right;}
.resourceClose {background:url(images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000;}