This commit is contained in:
whimlex 2015-10-08 13:31:04 +08:00
commit 2775947ce2
36 changed files with 250 additions and 146 deletions

View File

@ -175,19 +175,19 @@ class NewsController < ApplicationController
update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS
end
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add start
teachers = searchTeacherAndAssistant(@course)
for teacher in teachers
if(teacher.user_id != User.current.id)
notify = ActivityNotify.new()
notify.activity_container_id = @course.id
notify.activity_container_type = 'Course'
notify.activity_id = @news.id
notify.activity_type = 'News'
notify.notify_to = teacher.user_id
notify.is_read = 0
notify.save()
end
end
# teachers = searchTeacherAndAssistant(@course)
# for teacher in teachers
# if(teacher.user_id != User.current.id)
# notify = ActivityNotify.new()
# notify.activity_container_id = @course.id
# notify.activity_container_type = 'Course'
# notify.activity_id = @news.id
# notify.activity_type = 'News'
# notify.notify_to = teacher.user_id
# notify.is_read = 0
# notify.save()
# end
# end
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
render_attachment_warning_if_needed(@news)
flash[:notice] = l(:notice_successful_create)

View File

@ -271,6 +271,7 @@ class StudentWorkController < ApplicationController
end
@is_new = false
else
@is_last_a = @work.student_works_scores.empty?
@score = StudentWorksScore.new
@score.score = params[:score] if params[:score]
@score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""

View File

@ -358,6 +358,7 @@ class UsersController < ApplicationController
#导入作业
def user_import_homeworks
@select_course = params[:select_course] ? 1 : 0
@user_homeworks = HomeworkCommon.where(:user_id => @user.id).order("created_at desc")
respond_to do |format|
format.js
@ -377,6 +378,7 @@ class UsersController < ApplicationController
homework = HomeworkCommon.find_by_id params[:checkMenu]
homework_detail_programing = homework.homework_detail_programing
@homework = HomeworkCommon.new
@select_course = params[:select_course] || 0
if homework
@homework.name = homework.name
@homework.description = homework.description

View File

@ -59,7 +59,6 @@ class Mailer < ActionMailer::Base
@anonymous_comment_close_name = homework_common.name
@author = homework_common.user
#收件人邮箱
recipients << user.mail
end
mail :to => recipients,
@ -98,10 +97,6 @@ class Mailer < ActionMailer::Base
@anonymous_comment_fail_name = homework_common.name
@author = homework_common.user
#收件人邮箱
puts "######################"
puts homework_common.id
puts recipients
puts "######################"
recipients << user.mail
end
end

View File

@ -79,7 +79,7 @@ class Memo < ActiveRecord::Base
receivers << self.forum.creator
end
# 添加发帖人
if self.author_id != self.parent.author_id
if self.author_id != self.parent.author_id && self.parent.author_id != self.forum.creator_id
receivers << self.parent.author
end
end

View File

@ -1,10 +1,11 @@
<a href="javascript:void(0)" class="upimg fl">
<%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%>
</a>
<a href="javascript:void(0)" class="upbtn fl" onclick="$('#upload_img').click();"><%= l(:button_upload_photo) %></a>
<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "upbtn fl" %>
<a href="javascript:void(0)" class="upbtn fl" onclick="$('#upload_course_logo').click();"><%= l(:button_upload_photo) %></a>
<%= file_field_tag 'avatar[image]',
:id => "upload_img",
:class => 'undis',
:id => 'upload_course_logo',
:class => 'undis upload_file',
:size => "1",
:multiple => true,
:data => {

View File

@ -17,9 +17,9 @@
<li><%= link_to "全部动态", {:controller => "courses", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%></li>
<li><%= link_to "作业动态", {:controller => "courses", :action => "show", :type => "homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%></li>
<li><%= link_to "通知动态", {:controller => "courses", :action => "show", :type => "news"}, :class => "homepagePostTypeNotice postTypeGrey"%></li>
<li><%= link_to "资源库动态", {:controller => "courses", :action => "show", :type => "attachment"}, :class => "resourcesTypeAtt resourcesGrey"%></li>
<li><%= link_to "资源库动态", {:controller => "courses", :action => "show", :type => "attachment"}, :class => "homepagePostTypeResource resourcesGrey"%></li>
<li><%= link_to "论坛动态", {:controller => "courses", :action => "show", :type => "message"}, :class => "homepagePostTypeForum postTypeGrey"%></li>
<li><%= link_to "留言动态", {:controller => "courses", :action => "show", :type => "journalsForMessage"}, :class => "homepagePostTypeQuiz postTypeGrey"%></li>
<li><%= link_to "留言动态", {:controller => "courses", :action => "show", :type => "journalsForMessage"}, :class => "homepagePostTypeMessage postTypeGrey"%></li>
<li><%= link_to "问卷动态", {:controller => "courses", :action => "show", :type => "poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%></li>
</ul>
</li>

View File

@ -1,9 +1,12 @@
<% unless tag_list.nil?%>
<% tag_list.each do |k,v|%>
<% if tag_name && tag_name == k%>
<a href="javascript:void(0);" class="files_tag_select"><%= k%>×<%= v%></a>
<span > <a href="javascript:void(0);" class="files_tag_select" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
<% else%>
<span class="files_tag_icon"> <a ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
<span class="files_tag_icon" >
<a title="单击为过滤含有该标签的文件,双击为修改该标签的名字"
onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(course)%>','<%= k%>','<%= @q%>','<%= course.id%>');"
ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>×<%= v%></a></span>
<% end%>
<% end%>
<% end%>

View File

@ -234,6 +234,8 @@
//第二种是改变某个tag名称。其他所有的资源如果拥有这个tag。那么对应的tag名也要改掉。
//目前这两种依据 的来源就是 是否 传了参数 id。如果有id。就指定了资源id就是第一种情况。如果没有id。就是第二种情况
function rename_tag(domEle,name,id,type){
isdb = true; //这是双击
//clearTimeout(clickFunction);
if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动
return;
}
@ -250,6 +252,7 @@
}
//监听所有的单击事件
$(document.body).click(function(e){
isdb = false; //这是单击
node = document.elementFromPoint(e.clientX, e.clientY);
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
return;
@ -260,15 +263,15 @@
ele.parent().html(tagNameHtml);
}else{ //否则就要更新tag名称了
if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){
// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问
$.post(
'<%= update_tag_name_path %>',
{"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>}
)
}else{
ele.parent().css("border","");
ele.parent().html(tagNameHtml);
}
// }else{
// ele.parent().css("border","");
// ele.parent().html(tagNameHtml);
// }
}
}
});

View File

@ -28,7 +28,7 @@
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
<div class="cl"></div>
<% if @issue.description? || @issue.attachments.any? -%>
<div class="talk_info mb10" style="word-break:break-all;">
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
<% if @issue.description? %>
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>

View File

@ -94,11 +94,13 @@
</li>
</ul>
</div>
<div class="navHomepageNews">
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon" %>
<% if User.current.count_new_message >0 %>
<div ><%= link_to "" , user_message_path(User.current), :class => "newsActive" %></div>
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive" %></div>
<% end %>
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
</div>
</div>

View File

@ -123,7 +123,7 @@
}
});
function del_confirm(){
function del_forum_confirm(){
if(confirm('您确定要删除么?')){
$("#del_link").click();
}
@ -158,11 +158,11 @@
</div>
<div class="cl"></div>
<div class="fontGrey2 mt10"><span id="forum_desc_span" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;"><%= @forum.description.html_safe%></span>
<%#if @forum.creator.id == User.current.id%>
<!--<a href="javascript:void(0);" onclick="edit_desc();">-->
<%#= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
<!--</a>-->
<%#end%>
<%if @forum.creator.id == User.current.id%>
<a href="javascript:void(0);" onclick="edit_desc();">
<%= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
</a>
<%end%>
</div>
<div class="mt15">
<div id="forum_tag_list">
@ -180,7 +180,7 @@
<span class="postEdit">
</span>
<a href="<%= edit_forum_path(@forum) %>" class="linkGrey3">编辑贴吧</a>
<a href="javascript:void(0);" data-method="delete" onclick="del_confirm();" class="fr linkGrey3">删除贴吧</a>
<a href="javascript:void(0);" data-method="delete" onclick="del_forum_confirm();" class="fr linkGrey3">删除贴吧</a>
<a href="<%= forum_path(@forum)%>" data-method="delete" id="del_link" type="hidden"></a>
<span class="postDelete"></span>
<% end %>

View File

@ -7,7 +7,7 @@
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %>
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
<a href="javascript:void(0);" class="<%= @obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
<a href="javascript:void(0);" class="<%= obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% end %>
<% else %>
<% if user_id == obj.author_id %>

View File

@ -1,17 +1,19 @@
<h3><%=l(:label_confirmation)%></h3>
<div class="warning">
<p><strong><%=h @project_to_destroy %></strong><br />
<%=l(:text_project_destroy_confirmation)%>
<% if @project_to_destroy.descendants.any? %>
<br /><%= l(:text_subprojects_destroy_warning,
content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
<% end %>
</p>
<p>
<%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete) %>
<% end %>
</p>
<div class="project_r_h">
<h2 class="project_h2"><%=l(:label_confirmation)%></h2>
</div>
<div class="warning">
<p><strong><h3><%=h @project_to_destroy %></h3></strong>
<%=l(:text_project_destroy_confirmation)%>
<% if @project_to_destroy.descendants.any? %>
<br /><%= l(:text_subprojects_destroy_warning,
content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
<% end %>
</p>
<p>
<%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
<label><%= check_box_tag 'confirm', 1, checked = true %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete) %>
<% end %>
</p>
</div>

View File

@ -26,9 +26,11 @@
</ul>
</li>
<li class="hworkList130 c_grey" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">[迟交]</span>
<% if student_work.created_at && @homework.end_time%>
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">[迟交]</span>
<% end %>
<% end %>
</li>
<li class="hworkList50 <%= score_color student_work.teacher_score%>">

View File

@ -2,8 +2,7 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti
$('#score_<%= @work.id%>').peSlider({range: 'min'});
<% if @is_new%>
$("#score_list_<%= @work.id%>").find("div:last").find("ul").addClass("ping_line");
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => true}) %></div>");
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last_a}) %></div>");
<% else %>
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last}) %>");
<% end%>

View File

@ -14,10 +14,10 @@
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
</div>
<div class="homepagePostTitle break_word list_style upload_img">
<% if activity.m_parent_id.nil? %>
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
<% if activity.parent %>
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
<% else %>
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
<% end %>
</div>
<div class="homepagePostDate">

View File

@ -10,6 +10,7 @@
<% end%>
</div>
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
<input type="hidden" name="select_course" value="<%= @select_course%>">
<div class="homeworkListForm mb10 " id="homework_list_form_show">
<%= render :partial => 'users/show_user_homework_form', :locals => {:user_homeworks => @user_homeworks}%>
</div>

View File

@ -16,7 +16,7 @@
<div class="cl"></div>
<div class=" mt10">
<%= link_to("导入作业", user_import_homeworks_user_path(User.current.id),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%>
<%= link_to("导入作业", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%>
<div class="calendar_div fl">
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>

View File

@ -105,7 +105,10 @@
<% @student_work.student_work_tests.each_with_index do |test, index| %>
<div class="ProResultTop">
<p class="c_blue fl">第<%= @student_work.student_work_tests.count - index%>次测试</p><span class="fr c_grey"><%= test.created_at.to_s(:db) %></span>
<p class="c_blue fl">
第<%= @student_work.student_work_tests.count - index%>次测试
</p>
<span class="fr c_grey"><%= format_time(test.created_at).to_s%></span>
<div class="cl"></div>
</div>
<% if test.status.to_i == -2 %>

View File

@ -2,7 +2,9 @@
hideModal('#coursesChoosePopup');
$("#homework_name").val("<%= @homework.name%>");
$("#homework_end_time").val("<%= @homework.end_time%>");
$("#course_id").val("<%= @homework.course_id%>");
<% if @select_course == "0"%>
$("#course_id").val("<%= @homework.course_id%>");
<% end%>
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework,:has_program => true })%>");
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
$("#BluePopupBox").html("<%=escape_javascript( render :partial => 'users/user_programing_attr', :locals => {:edit_mode => true, :homework => @homework})%>");

View File

@ -0,0 +1,18 @@
class AlterUserActivitiesNews < ActiveRecord::Migration
def up
UserActivity.all.each do |activity|
if activity.act_type == 'News'
if activity.act
activity.created_at = activity.act.created_on
activity.updated_at = activity.act.respond_to?("updated_on") ? activity.act.updated_on : activity.act.created_on
activity.save
else
activity.destroy
end
end
end
end
def down
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150928090128) do
ActiveRecord::Schema.define(:version => 20150917022239) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -575,8 +575,6 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
t.integer "viewed"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "secret_key"
t.integer "status"
end
create_table "forums", :force => true do |t|
@ -785,6 +783,16 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_details_copy", :force => true do |t|
t.integer "journal_id", :default => 0, :null => false
t.string "property", :limit => 30, :default => "", :null => false
t.string "prop_key", :limit => 30, :default => "", :null => false
t.text "old_value"
t.text "value"
end
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id"
t.integer "user_id"
@ -903,7 +911,6 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
t.datetime "updated_on", :null => false
t.boolean "locked", :default => false
t.integer "sticky", :default => 0
t.integer "reply_id"
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
@ -1369,7 +1376,6 @@ ActiveRecord::Schema.define(:version => 20150928090128) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "description"
t.string "subject"
end
create_table "taggings", :force => true do |t|

View File

@ -5031,7 +5031,7 @@ KEditor.prototype = {
height : editHeight > 0 && _removeUnit(height) > self.minHeight ? editHeight : self.minHeight,
src : editDiv,
srcElement : self.srcElement,
designMode : self.designMode,
designMode : true,
themesPath : self.themesPath,
bodyClass : self.bodyClass,
cssPath : self.cssPath,
@ -5063,9 +5063,9 @@ KEditor.prototype = {
_bindTabEvent.call(self);
_bindFocusEvent.call(self);
edit.afterChange(function(e) {
if (!edit.designMode) {
return;
}
// if (!edit.designMode) {
// return;
// }
self.updateState();
self.addBookmark();
//prettyPrint("",self.edit.doc.body);

View File

@ -33,8 +33,8 @@
}
.ke-content p {
margin: 0 0 15px 0;
margin-bottom:15pt;
/*margin: 0 0 15px 0;*/
/*margin-bottom:15pt;*/
line-height:1.5;
letter-spacing: 1px;
}

View File

@ -13,7 +13,7 @@ KindEditor.plugin('emoticons', function(K) {
allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons,
currentPageNum = 1;
self.clickToolbar(name, function() {
this.edit.focus();//如果没有这句 火狐下取不到焦点 导致_getSel()为空 报错
this.edit.focus();//<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>_getSel()Ϊ<><CEAA> <20><><EFBFBD><EFBFBD>
var rows = 5, cols = 9, total = 135, startNum = 0,
cells = rows * cols, pages = Math.ceil(total / cells),
colsHalf = Math.floor(cols / 2),
@ -55,6 +55,9 @@ KindEditor.plugin('emoticons', function(K) {
K(this).removeClass('ke-on');
});
cell.click(function(e) {
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
self.edit.html('');
}
self.insertHtml('<img src="' + path + num + '.gif" border="0" alt="" />').hideMenu().focus();
e.stop();
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -410,22 +410,6 @@ function show_bid_dead_line(year,month,day,divname)
+ "<p class='fr'>作品提交还剩:</p>");
}
//验证新建作业的名字
function regex_homework_name()
{
var name = $.trim($("#homework_name").val());
if(name=="")
{
$("#homework_name_span").text("名称不能为空");
return false;
}
else
{
$("#homework_name_span").text("");
return true;
}
}
//处理迟交、缺评扣分
function check_late_penalty(id)
@ -579,22 +563,68 @@ function regex_evaluation_num(){
}
//老师提交 新建/修改 作业
//function submit_homework(id)
//{
// if(!regex_homework_name())
// {
// $("#homework_name").focus();
// }
// else if(!regex_evaluation_num())
// {
// $("#evaluation_num").focus();
// }
// else
// {
// homework_description_editor.sync();
// $("#"+id).submit();
// }
//}
function submit_homework(id){
if(!regex_homework_name()){
$("#homework_name").focus();
}
else if(!regex_homework_end_time()){
$("#homework_end_time").focus();
}
else if(!regex_course_id()){
$("#course_id").focus();
}
else{
homework_description_editor.sync();
$("#"+id).submit();
}
}
//验证新建作业的名字
function regex_homework_name()
{
var name = $.trim($("#homework_name").val());
if(name=="")
{
$("#homework_name_span").text("名称不能为空");
return false;
}
else
{
$("#homework_name_span").text("");
return true;
}
}
//验证截止时间
function regex_homework_end_time()
{
var name = $.trim($("#homework_end_time").val());
if(name=="")
{
$("#homework_end_time_span").text("截止时间不能为空");
return false;
}
else
{
$("#homework_end_time_span").text("");
return true;
}
}
//验证发送到课程
function regex_course_id(){
var course_id = $("#course_id").val();
if(course_id == -1)
{
$("#homework_course_id_span").text("发布课程不能为空");
return false;
}
else
{
$("#homework_course_id_span").text("");
return true;
}
}
function regexHomeworkCommonName()
{
@ -714,20 +744,30 @@ $(function(){
});
//查找TAG资源
var clickFunction = null; //单击事件函数
var isdb = false; //是否双击
function search_tag_attachment(url,tag_name,q,course_id,sort)
{
//alert("111");
$.get(
url,
{
tag_name: tag_name,
q: q,
course_id:course_id
},
function (data) {
//clearTimeout(clickFunction);
clickFunction = setTimeout(function() {
search_func()
}, 200);
function search_func(){
if(isdb!= false ) return;
$.get(
url,
{
tag_name: tag_name,
q: q,
course_id:course_id
},
function (data) {
}
);
}
}
);
}
// 课程讨论区

View File

@ -63,17 +63,10 @@ function submit_homework(id){
else if(!regex_homework_end_time()){
$("#homework_end_time").focus();
}
//else if(!regex_evaluation_start()){
// $("#evaluation_start_time").focus()
//}
//else if(!regex_evaluation_end()){
// $("#evaluation_end_time").focus()
//}
else if(!regex_course_id()){
$("#course_id").focus();
}
else{
homework_description_editor.sync();
$("#"+id).submit();
}

View File

@ -96,6 +96,8 @@ a.homepagePostTypeAssignment {background:url(../images/homepage_icon.png) -93px
a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280px no-repeat; padding-left:23px;}
a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;}
a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;}
a.homepagePostTypeMessage {background:url(images/homepage_icon.png) -3px -518px no-repeat; padding-left:23px;}
a.homepagePostTypeResource {background:url(images/homepage_icon.png) -86px -517px no-repeat; padding-left:23px;}
a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;}
a.homepagePostTypeMine {background:url(../images/homepage_icon.png) -187px -277px no-repeat; padding-left:23px;}
a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -189px -308px no-repeat; padding-left:23px;}
@ -312,7 +314,7 @@ a.un_work_edit{color: white; display:block; padding:1px 5px; background-color: d
.normaltab a { color:#64bdd9 ; }
.hovertab a{color:#fff; background-color:#64bdd9; text-decoration:none;}
.dis{display:block; }
.undis{display:none;}
.c_red{ color:#de030d;}
input.c_red {padding:0px; text-align:center; border:0;}
.f_12{ font-size:12px;}
@ -510,9 +512,7 @@ a:hover.st_add{ color:#ff8e15;}
.courses_text{ border:1px solid #64bdd9; height:100px;width:532px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
.upimg{ border:1px solid #eaeaea; display:block; width:60px; height:60px; padding:1px;}
.upimg:hover{ border:1px solid #64bdd9; }
.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
.upbtn:hover{color:#64bdd9;cursor: pointer;}
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
/* 功能倒计时*/
.w_img{ float:left; margin:10px 10px 15px 0px;}
.w_p{ float:left; color:#15bccf; font-size:16px; font-weight:bold; margin-top:70px; }
@ -723,7 +723,7 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px
/*padding:1px 10px 修改原因padding会导致内部输入框和外边框有边距*/
a.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;}
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 1px; float:left; margin-right:10px;margin-bottom:10px;}/* padding:1px 10px;*/
/* 20150423作业评分*/
.ml14{ margin-left:14px;}
@ -873,7 +873,7 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 5px;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
/* 与我相关 */

View File

@ -14,7 +14,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -528,7 +528,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.portraitRadius {border-radius: 3px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
@ -741,9 +741,9 @@ ul.list_watch{
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -270px no-repeat; display:inline-block; float:left;}
.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -180px -311px no-repeat;}
.referenceResourceType {font-size:14px; width:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
.referenceSearchIcon:hover {background:url(../images/homepage_icon2.png) -180px -311px no-repeat;}
.referenceResourceType {font-size:14px; width:460px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;}
a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
@ -798,6 +798,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailWrap {width:580px; float:left;}
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}
.postDetailReply { margin-top:28px; color:#888888; float:right;}

View File

@ -43,7 +43,14 @@ pre li,ul,ol {
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px } /* IE indents via margin-left */
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px !important; } /* IE indents via margin-left */
.list_style ol li {
list-style-type: decimal;
margin-left: 10px !important;
}
.linenums li {
margin-left: 0px !important;
}
li.L0,
li.L1,
li.L2,

View File

@ -221,6 +221,7 @@ a:hover.talk_btn{ background:#2a9dc1;}
/****讨论区内页***/
.mt0{ margin-top:0px;}
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
.issue_desc li{list-style-type: decimal;margin-left: 20px;}
.talk_info img {max-width:100%;}
a.talk_edit{ color:#426e9a; margin-right:5px;}
a:hover.talk_edit{ color:#ff5722;}
@ -881,3 +882,19 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.wiki {width: 510px;}
.wiki img {max-width:100%;}
#content_ .tabs_enterprise ul li a.selected:hover {background-color: #E2F4FF;}
/*end*/
/*end*/
/***** Diff *****/
.diff_out { background: #fcc; }
.diff_out span { background: #faa; }
.diff_in { background: #cfc; }
.diff_in span { background: #afa; }
.text-diff {
padding: 1em;
background-color:#f6f6f6;
color:#505050;
border: 1px solid #e4e4e4;
}

View File

@ -269,7 +269,10 @@ a:hover.bgreen_n_btn{background:#08a384;}
.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; }*/
.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
.upbtn:hover{color:#64bdd9;cursor: pointer;}
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
.undis{display:none;}
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
@ -448,7 +451,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
.newsActive {width:8px; height:8px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;}
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
@ -624,9 +627,9 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -270px no-repeat; display:inline-block; float:left;}
.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -180px -311px no-repeat;}
.referenceResourceType {font-size:14px; width:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
.referenceSearchIcon:hover {background:url(../images/homepage_icon2.png) -180px -311px no-repeat;}
.referenceResourceType {font-size:14px; width:460px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;}
a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}