This commit is contained in:
cxt 2015-09-08 11:56:04 +08:00
commit 6f64152ec7
24 changed files with 1959 additions and 1829 deletions

View File

@ -89,6 +89,7 @@ class MessagesController < ApplicationController
# Create a new topic # Create a new topic
def new def new
if User.current.logged?
@message = Message.new @message = Message.new
@message.author = User.current @message.author = User.current
@message.board = @board @message.board = @board
@ -101,28 +102,6 @@ class MessagesController < ApplicationController
ids = params[:asset_id].split(',') ids = params[:asset_id].split(',')
update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE
end end
# # 与我相关动态的记录add start
# if(@board && @board.course) #项目的先不管
# teachers = searchTeacherAndAssistant(@board.course)
# for teacher in teachers
# if(teacher.user_id != User.current.id)
# notify = ActivityNotify.new()
# if(@board.course)
# notify.activity_container_id = @board.course_id
# notify.activity_container_type = 'Course'
# else
# notify.activity_container_id = @board.project_id
# notify.activity_container_type = 'Project'
# end
# notify.activity_id = @message.id
# notify.activity_type = 'Message'
# notify.notify_to = teacher.user_id
# notify.is_read = 0
# notify.save()
# end
# end
# end
# 与我相关动态的记录add end
call_hook(:controller_messages_new_after_save, { :params => params, :message => @message}) call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
render_attachment_warning_if_needed(@message) render_attachment_warning_if_needed(@message)
@ -156,6 +135,9 @@ class MessagesController < ApplicationController
} }
end end
end end
else
redirect_to signin_path
end
end end
# Reply to a topic # Reply to a topic

View File

@ -14,8 +14,8 @@ class StudentWorkController < ApplicationController
def program_test def program_test
is_test = params[:is_test] == 'true' is_test = params[:is_test] == 'true'
resultObj = {status: 0, results: [], error_msg: '', time: Time.now.strftime('%Y-%m-%d %T')} resultObj = {status: 0, results: [], error_msg: '', time: Time.now.strftime('%Y-%m-%d %T')}
unless is_test
student_work = find_or_save_student_work student_work = find_or_save_student_work(is_test)
unless student_work unless student_work
resultObj[:status] = 100 resultObj[:status] = 100
@ -43,24 +43,7 @@ class StudentWorkController < ApplicationController
end end
end end
else
if @homework.homework_type == 2 && @homework.homework_detail_programing
result = test_realtime(student_work, params[:src])
logger.debug result
resultObj[:status] = result["status"]
resultObj[:results] = result["results"]
resultObj[:error_msg] = result["error_msg"]
results = result["results"]
if result["status"].to_i == -2 #编译错误
results = [result["error_msg"]]
end
resultObj[:status] = result["status"].to_i
resultObj[:time] = Time.now.strftime('%Y-%m-%d %T')
resultObj[:index] = 0
end
end
render :json => resultObj render :json => resultObj
@ -640,13 +623,14 @@ class StudentWorkController < ApplicationController
xls_report.string xls_report.string
end end
def find_or_save_student_work def find_or_save_student_work(is_test)
student_work = @homework.student_works.where(user_id: User.current.id).first student_work = @homework.student_works.where(user_id: User.current.id).first
if student_work.nil? if student_work.nil?
@homework.student_works.build( @homework.student_works.build(
name: params[:title], name: params[:title],
description: params[:src], description: params[:src],
user_id: User.current.id user_id: User.current.id,
is_test: is_test
) )
unless @homework.save unless @homework.save
else else

View File

@ -298,7 +298,7 @@ class UsersController < ApplicationController
def user_homeworks def user_homeworks
if User.current == @user if User.current == @user
@page = params[:page] ? params[:page].to_i + 1 : 0 @page = params[:page] ? params[:page].to_i + 1 : 0
user_course_ids = "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")" user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
@homework_commons = HomeworkCommon.where("course_id in #{user_course_ids}").order("created_at desc").limit(10).offset(@page * 10) @homework_commons = HomeworkCommon.where("course_id in #{user_course_ids}").order("created_at desc").limit(10).offset(@page * 10)
respond_to do |format| respond_to do |format|
format.js format.js
@ -401,7 +401,7 @@ class UsersController < ApplicationController
homework_detail_programing = HomeworkDetailPrograming.new homework_detail_programing = HomeworkDetailPrograming.new
homework.homework_detail_programing = homework_detail_programing homework.homework_detail_programing = homework_detail_programing
homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
homework_detail_programing.language = params[:program][:language].to_i homework_detail_programing.language = params[:language_type].to_i
inputs = params[:program][:input] inputs = params[:program][:input]
if Array === inputs if Array === inputs

View File

@ -202,11 +202,15 @@ class WordsController < ApplicationController
#给用户留言 #给用户留言
def leave_user_message def leave_user_message
if User.current.logged?
@user = User.find(params[:id]) @user = User.find(params[:id])
if params[:new_form][:user_message].size>0 && User.current.logged? && @user if params[:new_form][:user_message].size>0 && User.current.logged? && @user
@user.add_jour(User.current, params[:new_form][:user_message]) @user.add_jour(User.current, params[:new_form][:user_message])
end end
redirect_to feedback_path(@user) redirect_to feedback_path(@user)
else
render_403
end
end end
# add by nwb # add by nwb

View File

@ -10,7 +10,7 @@ class HomeworkCommon < ActiveRecord::Base
has_one :homework_detail_manual, :dependent => :destroy has_one :homework_detail_manual, :dependent => :destroy
has_one :homework_detail_programing, :dependent => :destroy has_one :homework_detail_programing, :dependent => :destroy
has_many :homework_tests, :dependent => :destroy has_many :homework_tests, :dependent => :destroy
has_many :student_works, :dependent => :destroy has_many :student_works, :dependent => :destroy, :conditions => "is_test=0"
has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表 has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy #用户活动 has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy #用户活动
# 课程动态 # 课程动态

View File

@ -1,6 +1,6 @@
#学生提交作品表 #学生提交作品表
class StudentWork < ActiveRecord::Base class StudentWork < ActiveRecord::Base
attr_accessible :name, :description, :homework_common_id, :user_id, :final_score, :teacher_score, :student_score, :teaching_asistant_score, :project_id attr_accessible :name, :description, :homework_common_id, :user_id, :final_score, :teacher_score, :student_score, :teaching_asistant_score, :project_id, :is_test
belongs_to :homework_common belongs_to :homework_common
belongs_to :user belongs_to :user

View File

@ -9,7 +9,6 @@
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;} span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;} div.ke-toolbar .ke-outline{border:none;}
.ke-inline-block{display: none;} .ke-inline-block{display: none;}
.ke-container{height: 30px !important;}
</style> </style>
<% user_activities.each do |user_activity| <% user_activities.each do |user_activity|
if user_activities %> if user_activities %>

View File

@ -49,6 +49,10 @@
<!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) --> <!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) -->
<a href="javascript:void(0);" class="AnnexBtn fl mt3" onclick="$('#_file').click();">上传附件</a> <a href="javascript:void(0);" class="AnnexBtn fl mt3" onclick="$('#_file').click();">上传附件</a>
<%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mr15 mt3",:remote => true%> <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mr15 mt3",:remote => true%>
<% if defined?(has_program) && has_program %>
<a href="javascript:void(0);" class="ProBtn fl mt3">编程</a>
<span class="fl C_lgrey mt3 program_detail_info"></span>
<% end %>
</div> </div>
<% content_for :header_tags do %> <% content_for :header_tags do %>

View File

@ -1,5 +1,5 @@
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg'%>
<%= javascript_include_tag 'homework','baiduTemplate' %> <%= javascript_include_tag 'homework','baiduTemplate' %>
<% end %> <% end %>
@ -40,7 +40,7 @@
<div class="cl"></div> <div class="cl"></div>
<div id="homework_attachments"> <div id="homework_attachments">
<%= render :partial => 'users/user_homework_attachment', :locals => {:container => homework} %> <%= render :partial => 'users/user_homework_attachment', :locals => {:container => homework, :has_program=>true} %>
</div> </div>
@ -51,29 +51,6 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="mt10">
<a href="javascript:void(0);" class=" fl DropBtn">编程选项</a>
<div class="DropLine"></div>
<div class="cl"></div>
</div>
<div class="advanced_option" style="display:none;">
<div class="mt10">
<select class="InputBox W120" name="program[language]">
<option value="1" selected>C语言</option>
<option value="2">C++</option>
</select>
</div>
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" name="program[output][]"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<div class="cl"></div>
</div>
</div>
<input type="hidden" name="homework_type" value="1"> <input type="hidden" name="homework_type" value="1">
</div> </div>
@ -82,9 +59,46 @@
<script id="t:test-answer-list" type="text/html"> <script id="t:test-answer-list" type="text/html">
<div class="mt10"> <div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required name="program[output][]"></textarea> <textarea class="InputBox W320 fl mr10" placeholder="测试输入" name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" name="program[output][]"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a> <a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a> <a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</script> </script>
<script type="text/html" id="t:program-input-list">
<div class="program-input">
<input type="hidden" name="language_type" value="<!= language_type !>" />
<! for(var i=0; i< input_groups.length; ++i) { !>
<input name="program[input][]" type="hidden" value="<!= input_groups[i].input !>" />
<input name="program[output][]" type="hidden" value="<!= input_groups[i].output !>" />
<! } !>
</div>
</script>
<div class="BluePopupBox" id="BluePopupBox" style="display:none">
<a href="javascript:void(0);" class="CloseBtn" title="关闭弹框"></a>
<h2 class="BluePopuph2 fl">编程作业的测试集设置</h2>
<div class="cl"></div>
<div class="HomeWorkCon">
<div class="mt15">
<select class="InputBox W120 language_type" >
<option value="1" selected>C语言</option>
<option value="2">C++</option>
</select>
</div>
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出"></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<div class="cl"></div>
</div>
<div class="mt10">
<a href="javascript:void(0);" class="BlueCirBtn fr">确&nbsp;&nbsp;定</a>
<div class="cl"></div>
</div>
</div><!----HomeWorkCon end-->
</div><!----BluePopupBox end-->

View File

@ -21,7 +21,7 @@
</div> </div>
<% if homework_common.homework_type == 2 && is_teacher%> <% if homework_common.homework_type == 2 && is_teacher%>
<div class="homepagePostSubmit"> <div class="homepagePostSubmit">
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue' %> <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
</div> </div>
<% end %> <% end %>
<div class="homepagePostDeadline"> <div class="homepagePostDeadline">

View File

@ -38,11 +38,15 @@
</script> </script>
<!-- 模板1结束 --> <!-- 模板1结束 -->
<div class="homepageRight"> <div class="ProgramHomework">
<div class="HomeWork">
<div class="RightBanner">
<div class="homepageRightBanner mb10">
<div class="NewsBannerName"><%= @is_test ? '模拟答题' : '提交作品' %></div> <div class="NewsBannerName"><%= @is_test ? '模拟答题' : '提交作品' %></div>
</div> </div>
<div class="cl"></div>
<div class="HomeWork">
<div class="HomeWorkBox"> <div class="HomeWorkBox">
<div class=""> <div class="">
<div class="homepagePostTitle fl"><%= @homework.name %></div><span class="fr c_grey">截止时间:<%= @homework.end_time %></span> <div class="homepagePostTitle fl"><%= @homework.name %></div><span class="fr c_grey">截止时间:<%= @homework.end_time %></span>
@ -70,7 +74,7 @@
<%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %> <%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %>
</div> </div>
<div class="mt10"> <div class="mt10">
<%= f.text_area :description, id: 'program-src', class:" W700 H150", placeholder:"请贴入你的代码", rows: 10 %> <%= f.text_area :description, id: 'program-src', class:"InputBox W700 H150", placeholder:"请贴入你的代码", rows: 10 %>
</div> </div>
<div class="mt10"> <div class="mt10">
<a href="javascript:void(0);" class="BlueCirBtn fl" data-homework-id="<%=@homework.id%>" data-student-work-id="<%=@student_work.id%>" id="test-program-btn">测试代码</a> <a href="javascript:void(0);" class="BlueCirBtn fl" data-homework-id="<%=@homework.id%>" data-student-work-id="<%=@student_work.id%>" id="test-program-btn">测试代码</a>

View File

@ -1,13 +1,6 @@
class DeleteAnonymousJour < ActiveRecord::Migration class DeleteAnonymousJour < ActiveRecord::Migration
def up def up
jour_count = Journal.all.count / 30 + 2 Journal.where("user_id = 2").destroy_all
transaction do
for i in 1 ... jour_count do i
Journal.page(i).per(30).each do |jour|
jour.destroy if jour.user_id == 2
end
end
end
end end
def down def down

View File

@ -0,0 +1,8 @@
class DeleteAnonymousFeedback < ActiveRecord::Migration
def up
JournalsForMessage.where("user_id = 2").destroy_all
end
def down
end
end

View File

@ -0,0 +1,8 @@
class DeleteAnonymousMessage < ActiveRecord::Migration
def up
Message.where("author_id = 2").destroy_all
end
def down
end
end

View File

@ -0,0 +1,5 @@
class AddIsTestToStudentWorks < ActiveRecord::Migration
def change
add_column :student_works, :is_test, :boolean, default: false
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150907064547) do ActiveRecord::Schema.define(:version => 20150907152238) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150907064547) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
create_table "discuss_demos", :force => true do |t|
t.string "title"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "documents", :force => true do |t| create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false t.integer "category_id", :default => 0, :null => false
@ -906,7 +913,6 @@ ActiveRecord::Schema.define(:version => 20150907064547) do
t.datetime "created_on" t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false t.integer "comments_count", :default => 0, :null => false
t.integer "course_id" t.integer "course_id"
t.datetime "updated_on"
end end
add_index "news", ["author_id"], :name => "index_news_on_author_id" add_index "news", ["author_id"], :name => "index_news_on_author_id"
@ -1290,9 +1296,9 @@ ActiveRecord::Schema.define(:version => 20150907064547) do
create_table "student_work_tests", :force => true do |t| create_table "student_work_tests", :force => true do |t|
t.integer "student_work_id" t.integer "student_work_id"
t.integer "status"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.integer "status", :default => 9
t.text "results" t.text "results"
t.text "src" t.text "src"
end end
@ -1312,6 +1318,7 @@ ActiveRecord::Schema.define(:version => 20150907064547) do
t.integer "late_penalty", :default => 0 t.integer "late_penalty", :default => 0
t.integer "absence_penalty", :default => 0 t.integer "absence_penalty", :default => 0
t.integer "system_score" t.integer "system_score"
t.boolean "is_test", :default => false
end end
create_table "student_works_evaluation_distributions", :force => true do |t| create_table "student_works_evaluation_distributions", :force => true do |t|
@ -1530,6 +1537,7 @@ ActiveRecord::Schema.define(:version => 20150907064547) do
t.string "identity_url" t.string "identity_url"
t.string "mail_notification", :default => "", :null => false t.string "mail_notification", :default => "", :null => false
t.string "salt", :limit => 64 t.string "salt", :limit => 64
t.integer "gid"
end end
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"

View File

@ -17,7 +17,8 @@ module RailsKindeditor
output_buffer = ActiveSupport::SafeBuffer.new output_buffer = ActiveSupport::SafeBuffer.new
output_buffer << build_text_area_tag(name, method, self, options, input_html) output_buffer << build_text_area_tag(name, method, self, options, input_html)
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true', output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
afterCreate: 'eval(function(){enablePasteImg(self);})'))) :autoHeightMode=>true,
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})')))
end end
def kindeditor_upload_json_path(*args) def kindeditor_upload_json_path(*args)

BIN
public/images/CloseBtn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -95,6 +95,10 @@ $(function(){
//发布作业 //发布作业
$('#program-src').focus(function(){
$(this).css('height', '100px');
});
var isProgramHomework = function(){ var isProgramHomework = function(){
return !$(".advanced_option").is(":hidden"); return !$(".advanced_option").is(":hidden");
} }
@ -128,16 +132,65 @@ $(function(){
}) })
$('a.DropBtn').on('click', function(){ $('a.ProBtn').on('click', function(){
$(".advanced_option").toggle(); $("#BluePopupBox").dialog({
modal: true,
dialogClass: 'BluePopupBox',
minWidth: 753
});
$(".ui-dialog-titlebar").hide();
$("a.CloseBtn").on('click', function(){
$("#BluePopupBox" ).dialog("close");
}); });
$(".HomeWork").on('click', 'a.icon_add', function(){ $("#BluePopupBox a.BlueCirBtn").on('click', function(){
var test_numbers = 0;
var valid = true;
var input = null;
var output = null;
var input_groups = [];
$.each($('#BluePopupBox textarea.InputBox'), function(i, val){
if ($(val).val().length<=0) {
$(val)[0].focus();
valid =false;
return false;
}
if (test_numbers %2==0) {
input = $(val).val();
} else {
output = $(val).val();
input_groups.push({input: input, output: output});
}
test_numbers += 1;
});
var language = $('select.language_type').val() == 1 ? 'C语言' : 'C++语言';
if (valid) {
$("input[name=homework_type]").val(2);
$('span.program_detail_info').text('('+language+''+test_numbers/2+'组测试)');
//保存js值
var data = {
language_type: $('select.language_type').val(),
input_groups: input_groups
};
//构建到form中
$('.program-input').remove();
var html=bt('t:program-input-list',data);
$("input[name=homework_type]").after(html);
$("#BluePopupBox" ).dialog( "close" );
};
});
});
$("#BluePopupBox").on('click', 'a.icon_add', function(){
var html = bt('t:test-answer-list', null); var html = bt('t:test-answer-list', null);
$(this).parent('.mt10').after(html); $(this).parent('.mt10').after(html);
}); });
$(".HomeWork").on('click', 'a.icon_remove', function(){ $("#BluePopupBox").on('click', 'a.icon_remove', function(){
$(this).parent('.mt10').remove(); $(this).parent('.mt10').remove();
}); });
}); });

View File

@ -1,14 +1,31 @@
function init_editor(params){ function init_editor(params){
var minHeight;
var editor = params.kindutil.create(params.textarea, { var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"80px", resizeType : 1,minWidth:"1px",width:"100%",height:"30px",minHeight:"30px",
items:['emoticons'], items:['emoticons'],
afterChange:function(){//按键事件 afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(minHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 30, minHeight));
}, },
afterCreate:function(){ afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form); var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情'); $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar); params.toolbar_container.append(toolbar);
//init
var edit = this.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
//reset height
var edit = this.edit;
var body = edit.doc.body;
minHeight = params.kindutil.removeUnit(this.height);
edit.iframe.height(minHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ 30 , minHeight));
} }
}).loadPlugin('paste'); }).loadPlugin('paste');
return editor; return editor;

View File

@ -864,16 +864,36 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
a.DropBtn{background: url(../images/homepage_icon2.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;} a.DropBtn{background: url(../images/homepage_icon2.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
a:hover.DropBtn{background: url(../images/homepage_icon2.png) -125px -370px no-repeat;} a:hover.DropBtn{background: url(../images/homepage_icon2.png) -125px -370px no-repeat;}
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;} .DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
/*20150820课程作业 LB*/
.HomeWork {width:708px; background-color:#ffffff; padding:20px; border:1px solid #dddddd;}
.RightBanner {font-size:16px; width:733px; color:#4b4b4b; padding:10px 0 0 15px; margin-bottom:10px; background:#fff; border:1px solid #dddddd;height:34px;}
select.InputBox,input.InputBox,textarea.InputBox{ border:1px solid #d9d9d9; color:#888888; height:28px; line-height:28px; padding-left:5px; font-size:14px;}
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtn{ background:#3598db; color:#fff;}
.W440{ width:440px;}
.W120{ width:110px;}
.W700{ width:700px;}
a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;}
a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;}
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;}
a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:35px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.ProBtn{background: url(../images/homepage_icon.png) -86px -426px no-repeat; color:#3598db;}
a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
a:hover.DropBtn{background: url(../images/homepage_icon.png) -125px -370px no-repeat;}
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
/*20150820编程作业 LB*/ /*20150820编程作业 LB*/
.W320{ width:320px; max-width: 320px; min-width: 320px;} .W320{ width:320px;}
.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;} .icon_add{ background:url(../images/course/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;}
a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;} a:hover.icon_add{background:url(../images/course/icons.png) -20px -310px no-repeat;}
.icon_remove{background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;} .icon_remove{background:url(../images/course/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;} a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/ /*20150820提交作业 LB*/
.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;} .HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
.c_grey{ color:#888888;} .c_grey{ color:#888888;}
.c_dark_grey{color:#a9a9a9 !important;}
.HomeWorkP{ width:690px; font-size:14px;} .HomeWorkP{ width:690px; font-size:14px;}
.H150{ height:150px;} .H150{ height:150px;}
.ProResult{width:748px; background-color:#fff; border:1px solid #dddddd;border-bottom:none; } .ProResult{width:748px; background-color:#fff; border:1px solid #dddddd;border-bottom:none; }
@ -883,17 +903,43 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
.W200{ width:200px;} .W200{ width:200px;}
.ProResultTable{ color:#888888;} .ProResultTable{ color:#888888;}
.T_C{ text-align:center;} .T_C{ text-align:center;}
.SearchIcon{background:url(../images/homepage_icon2.png) 676px -393px no-repeat; } .SearchIcon{background:url(../images/homepage_icon.png) 676px -393px no-repeat; }
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; } .SearchIcon:hover{background:url(../images/homepage_icon.png) 676px -419px no-repeat; }
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } a.link_file{ background:url(../images/course/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} a:hover.link_file{ background:url(../images/course/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;} a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;} a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;} .ProResultUl span { display:block; float:left;}
.ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; } .ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; }
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;} .DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersApBtn{border:1px solid #888888; }
/*20150906编程作业设置弹框 LB*/
.C_lgrey{ color:#a5a5a5;}
.C_Blue{ color:#3598db;}
a.C_Blue{ color:#3598db;}
a:hover.C_Blue{ color:#297fb8;}
.BluePopupBox{ border:3px solid #3598db; padding:20px; background:#fff; width:707px;}
/*.BluePopupBox:hover{ border:3px solid #297fb8; }*/
a.CloseBtn{background:url(../images/CloseBtn.png) 0px 0px no-repeat; width:13px; height:13px; display:block; float:right;}
a:hover.CloseBtn{background:url(../images/CloseBtn.png) 0px -24px no-repeat; }
.BluePopuph2{ font-size:16px; font-weight:bold; color:#3598db; }
.ProBoxResult{width:706px; background-color:#fff; border:1px solid #dddddd;border-bottom:none; max-height:300px; overflow:auto; }
.W108{ width:108px;}
.HomeWorkCon{ width:706px;}
/*20150906导入作业弹框 LB*/
.ImportBox{ width:708px; max-height:300px;overflow:auto;}
.ImportBox li{ margin-bottom:10px;}
.WorkTitle{ max-width:660px; font-size:14px; font-weight:bold; color:#484848;}
.W520{ width:680px;}
.ImportSearchIcon{background:url(../images/homepage_icon.png) 656px -393px no-repeat; }
.ImportSearchIcon:hover{background:url(../images/homepage_icon.png) 656px -419px no-repeat; }
/*日历选择图*/ /*日历选择图*/
img.ui-datepicker-trigger { img.ui-datepicker-trigger {
display:block; display:block;