Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
fe339e6a8f
|
@ -176,12 +176,6 @@ class FilesController < ApplicationController
|
|||
|
||||
def index
|
||||
@flag = params[:flag] || false
|
||||
#sort_init 'filename', 'asc'
|
||||
# sort_init 'created_on', 'desc'
|
||||
# sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
||||
# 'filename' => "#{Attachment.table_name}.filename",
|
||||
# 'size' => "#{Attachment.table_name}.filesize",
|
||||
# 'downloads' => "#{Attachment.table_name}.downloads"
|
||||
sort = ""
|
||||
@sort = ""
|
||||
@order = ""
|
||||
|
|
|
@ -89,7 +89,7 @@ class Mailer < ActionMailer::Base
|
|||
recipients ||= []
|
||||
# 只给该课程的老师发送邮件提醒
|
||||
course.members.each do |member|
|
||||
if m.user.allowed_to?(:as_teacher,course)
|
||||
if member.user.allowed_to?(:as_teacher,course)
|
||||
user = User.find(member.user_id)
|
||||
#@subject = "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<a href="javascript:void(0)" class="upimg fl">
|
||||
<%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%>
|
||||
</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"><%= l(:button_upload_photo) %></a>
|
||||
<a href="javascript:void(0)" class="upbtn fl" onclick="$('#upload_img').click();"><%= l(:button_upload_photo) %></a>
|
||||
<%= file_field_tag 'avatar[image]',
|
||||
:id => nil,
|
||||
:class => 'upload_file',
|
||||
:id => "upload_img",
|
||||
:class => 'undis',
|
||||
:size => "1",
|
||||
:multiple => true,
|
||||
:data => {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
|
||||
</head>
|
||||
<body class="<%=h body_css_classes %>">
|
||||
<body class="<%=h body_css_classes %>" onload="prettyPrint();">
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer mb10">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
|
|
|
@ -130,10 +130,10 @@
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="<%= h body_css_classes %>">
|
||||
<body class="<%= h body_css_classes %>" onload="prettyPrint();">
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer mb10">
|
||||
<div class="navContainer">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<% else%>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body onload=" ">
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div id="Container">
|
||||
<%= render :partial => 'layouts/base_header_new'%>
|
||||
<div id="TopBar">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'base','header','new_user' ,:media => 'all'%>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -58,11 +58,11 @@
|
|||
</ul>
|
||||
</div>
|
||||
<%end%>
|
||||
<div class="postDetailTitle">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;">主题: <%= @memo.subject%></a>
|
||||
<div class="postDetailTitle fl">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @memo.subject%></a>
|
||||
</div>
|
||||
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%></div>
|
||||
|
|
|
@ -23,15 +23,15 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||||
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p><strong>标题:</strong><%= ma.course_message.commented.title %></p>
|
||||
<p><strong>评论对象:</strong><%= ma.course_message.commented.title %></p>
|
||||
<% unless ma.course_message.comments.nil? %>
|
||||
<div class="fl"><strong>内容:</strong></div>
|
||||
<div class="ml36"><%= ma.course_message.comments.html_safe %></div>
|
||||
<div class="fl"><strong>评论内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.comments.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
|
||||
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
|
||||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
|
||||
</p>
|
||||
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
||||
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
||||
|
@ -164,7 +164,7 @@
|
|||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
|
||||
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
|
||||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>关闭了匿评,作业详情如下:
|
||||
</p>
|
||||
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
||||
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
||||
|
|
|
@ -4,7 +4,7 @@ class AlterActivities < ActiveRecord::Migration
|
|||
if activity.act_type == 'JournalsForMessage'
|
||||
if activity.act
|
||||
unless activity.act.m_parent_id.nil?
|
||||
parent_act = UserActivity.where("act_id = #{activity.act.parent.id} and act_type='JournalsForMessage' and container_type='Course'").first
|
||||
parent_act = UserActivity.where("act_id = #{activity.act.m_parent_id} and act_type='JournalsForMessage' and container_type='Course'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
|
@ -21,7 +21,7 @@ class AlterActivities < ActiveRecord::Migration
|
|||
if activity.course_act_type == 'JournalsForMessage'
|
||||
if activity.course_act
|
||||
unless activity.course_act.m_parent_id.nil?
|
||||
parent_act = CourseActivity.where("course_act_id = #{activity.course_act.parent.id} and course_act_type='JournalsForMessage'").first
|
||||
parent_act = CourseActivity.where("course_act_id = #{activity.course_act.m_parent_id} and course_act_type='JournalsForMessage'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.course_act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
|
@ -34,7 +34,7 @@ class AlterActivities < ActiveRecord::Migration
|
|||
elsif activity.course_act_type == 'Message'
|
||||
if activity.course_act
|
||||
unless activity.course_act.parent_id.nil?
|
||||
parent_act = CourseActivity.where("course_act_id = #{activity.course_act.parent.id} and course_act_type='Message'").first
|
||||
parent_act = CourseActivity.where("course_act_id = #{activity.course_act.parent_id} and course_act_type='Message'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.course_act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
|
|
|
@ -264,7 +264,7 @@ K.options = {
|
|||
minHeight : 100,
|
||||
minChangeSize : 50,
|
||||
zIndex : 811213,
|
||||
items : ['emoticons','fontname',
|
||||
items : ['code','emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||
'|','imagedirectupload','table', 'media', 'preview',"more"
|
||||
|
@ -4986,7 +4986,7 @@ KEditor.prototype = {
|
|||
htmlList.unshift('<div style="display:block" id="define"/>')
|
||||
htmlList.push('</div>')
|
||||
var htmlListFull = [];
|
||||
var fullItems = ['emoticons','fontname',
|
||||
var fullItems = ['code','emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold','|', 'justifyleft', 'justifycenter', 'insertorderedlist', 'insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|', 'indent', 'outdent',
|
||||
'|','imagedirectupload','table', 'media', 'preview', "less",
|
||||
|
@ -5068,7 +5068,7 @@ KEditor.prototype = {
|
|||
}
|
||||
self.updateState();
|
||||
self.addBookmark();
|
||||
prettyPrint("",self.edit.doc.body);
|
||||
//prettyPrint("",self.edit.doc.body);
|
||||
if (self.options.afterChange) {
|
||||
self.options.afterChange.call(self);
|
||||
}
|
||||
|
|
|
@ -1,79 +1,47 @@
|
|||
/* Pretty printing styles. Used with prettify.js. */
|
||||
|
||||
/* SPAN elements with the classes below are added by prettyprint. */
|
||||
.pln { color: #000 } /* plain text */
|
||||
|
||||
@media screen {
|
||||
.str { color: #080 } /* string content */
|
||||
.kwd { color: #008 } /* a keyword */
|
||||
.com { color: #800 } /* a comment */
|
||||
.typ { color: #606 } /* a type name */
|
||||
.lit { color: #066 } /* a literal value */
|
||||
/* punctuation, lisp open bracket, lisp close bracket */
|
||||
.pun, .opn, .clo { color: #660 }
|
||||
.tag { color: #008 } /* a markup tag name */
|
||||
.atn { color: #606 } /* a markup attribute name */
|
||||
.atv { color: #080 } /* a markup attribute value */
|
||||
.dec, .var { color: #606 } /* a declaration; a variable name */
|
||||
.fun { color: red } /* a function name */
|
||||
.ke-content {
|
||||
font-size: 10pt;
|
||||
}
|
||||
.ke-content pre {
|
||||
font-size:9pt;
|
||||
font-family:Courier New,Arial;
|
||||
border:1px solid #ddd;
|
||||
border-left:5px solid #6CE26C;
|
||||
background:#f6f6f6;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
/* Use higher contrast and text-weight for printable form. */
|
||||
@media print, projection {
|
||||
.str { color: #060 }
|
||||
.kwd { color: #006; font-weight: bold }
|
||||
.com { color: #600; font-style: italic }
|
||||
.typ { color: #404; font-weight: bold }
|
||||
.lit { color: #044 }
|
||||
.pun, .opn, .clo { color: #440 }
|
||||
.tag { color: #006; font-weight: bold }
|
||||
.atn { color: #404 }
|
||||
.atv { color: #060 }
|
||||
.ke-content code {
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #DDD;
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* Put a border around prettyprinted code snippets. */
|
||||
pre.prettyprint { padding: 2px;
|
||||
border-left:1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc,
|
||||
border-top: 1px solid #ccc }
|
||||
|
||||
pre li,ol li {
|
||||
list-style-type: decimal;
|
||||
.ke-content pre>code {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
ul li{
|
||||
list-style-type: disc;
|
||||
}
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8 { list-style-type: decimal }
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 { background: #eee }
|
||||
|
||||
.prettyprint *{font-family:'courier new',monospace;}
|
||||
/*.prettyprint .com { color: #93a1a1; }*/
|
||||
/*.prettyprint .lit { color: #AE81FF; }*/
|
||||
/*.prettyprint .pun,*/
|
||||
/*.prettyprint .opn,*/
|
||||
/*.prettyprint .clo { color: #F8F8F2; }*/
|
||||
/*.prettyprint .fun { color: #dc322f; }*/
|
||||
/*.prettyprint .str,*/
|
||||
/*.prettyprint .atv { color: #E6DB74; }*/
|
||||
/*.prettyprint .kwd,*/
|
||||
/*.prettyprint .tag { color: #F92659; }*/
|
||||
/*.prettyprint .typ,*/
|
||||
/*.prettyprint .atn,*/
|
||||
/*.prettyprint .dec,*/
|
||||
/*.prettyprint .var { color: #A6E22E; }*/
|
||||
/*.prettyprint .pln { color: #66D9EF; }*/
|
||||
.ke-content pre code {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ke-content p {
|
||||
margin: 0 0 15px 0;
|
||||
margin-bottom:15pt;
|
||||
line-height:1.5;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
|
||||
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
|
||||
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
||||
|
||||
|
||||
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
|
|
@ -446,63 +446,45 @@ function check_late_penalty(id)
|
|||
}
|
||||
|
||||
//验证匿评数量
|
||||
function regex_evaluation_num()
|
||||
{
|
||||
if($("#evaluation_num").length == 0){ return true;}
|
||||
var evaluation_num = $.trim($("#evaluation_num").val());
|
||||
var regex = /^\d+$/;
|
||||
if(evaluation_num=="")
|
||||
{
|
||||
$("#evaluation_num_notice").html("匿评分配数量不能为空");
|
||||
$("#evaluation_num_notice").removeClass("c_red").addClass("c_red");
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num))
|
||||
{
|
||||
if(evaluation_num > 0)
|
||||
{
|
||||
$("#evaluation_num_notice").html("每个学生将收到<span class='c_red'> "+ parseInt(evaluation_num) + " </span>份待匿评作品");
|
||||
$("#evaluation_num_notice").removeClass("c_red");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_num_notice").html("匿评分配数量必须为大于0");
|
||||
$("#evaluation_num_notice").removeClass("c_red").addClass("c_red");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_num_notice").html("匿评分配数量只能为数字");
|
||||
$("#evaluation_num_notice").removeClass("c_red").addClass("c_red");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//function regex_evaluation_num()
|
||||
//{
|
||||
// if($("#evaluation_num").length == 0){ return true;}
|
||||
// var evaluation_num = $.trim($("#evaluation_num").val());
|
||||
// var regex = /^\d+$/;
|
||||
// if(evaluation_num=="")
|
||||
// {
|
||||
// $("#evaluation_num_notice").html("匿评分配数量不能为空");
|
||||
// $("#evaluation_num_notice").removeClass("c_red").addClass("c_red");
|
||||
// return false;
|
||||
// }
|
||||
// else if(regex.test(evaluation_num))
|
||||
// {
|
||||
// if(evaluation_num > 0)
|
||||
// {
|
||||
// $("#evaluation_num_notice").html("每个学生将收到<span class='c_red'> "+ parseInt(evaluation_num) + " </span>份待匿评作品");
|
||||
// $("#evaluation_num_notice").removeClass("c_red");
|
||||
// return true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $("#evaluation_num_notice").html("匿评分配数量必须为大于0");
|
||||
// $("#evaluation_num_notice").removeClass("c_red").addClass("c_red");
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $("#evaluation_num_notice").html("匿评分配数量只能为数字");
|
||||
// $("#evaluation_num_notice").removeClass("c_red").addClass("c_red");
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
|
||||
//点击是否开启匿评单选框效果
|
||||
$(function(){
|
||||
//$("#homework_common_homework_type").click(function(){
|
||||
// if($("#homework_common_homework_type").attr("checked") == "checked")
|
||||
// {
|
||||
// $("#evaluation_setting").slideDown();
|
||||
// $("#ta_proportion").removeAttr("disabled");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $("#evaluation_setting").slideUp();
|
||||
// $("#ta_proportion").attr("disabled","disabled");
|
||||
// }
|
||||
//});
|
||||
|
||||
$("#absence_penalty").change(function(){
|
||||
$("#absence_penalty_notice").html(" "+ $("#absence_penalty").val() +" ");
|
||||
});
|
||||
|
||||
//$("#ta_proportion").change(function(){
|
||||
// var ta_proportion = $("#ta_proportion").val();
|
||||
// $("#student_proportion").val((100 - parseInt(ta_proportion * 100)) + "%");
|
||||
//});
|
||||
});
|
||||
|
||||
//生成select
|
||||
|
@ -519,40 +501,100 @@ function build_selector(max_num){
|
|||
return html;
|
||||
}
|
||||
|
||||
//第一次加载时,如果未开启匿评作业,隐藏显示匿评配置信息
|
||||
//$(function(){
|
||||
// if($("#homework_common_homework_type").attr("id") != null && $("#homework_common_homework_type").val() != 2)
|
||||
//提交匿评参数设置
|
||||
function submit_set_evaluation_attr(end_time){
|
||||
if(!regex_evaluation_start(end_time)){
|
||||
$("#evaluation_start_time").focus();
|
||||
}
|
||||
else if(!regex_evaluation_end()){
|
||||
$("#evaluation_end_time").focus();
|
||||
}
|
||||
else if(!regex_evaluation_num()){
|
||||
$("#evaluation_num").focus();
|
||||
}
|
||||
else{
|
||||
$('#popbox02 form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
//验证匿评开启时间:大于截止时间,或者为空
|
||||
function regex_evaluation_start(end_time){
|
||||
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
||||
if(evaluation_start == ""){
|
||||
$("#homework_evaluation_start_time").text("开启匿评日期不能为空");
|
||||
return false;
|
||||
}
|
||||
var end_time = new Date(end_time);
|
||||
var evaluation_start_time = new Date(evaluation_start);
|
||||
if(evaluation_start_time > end_time){
|
||||
$("#homework_evaluation_start_time").text("");
|
||||
return true;
|
||||
}else{
|
||||
$("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//验证匿评结束时间:大于匿评开启时间,或者为空。当匿评开启时间为空时,匿评结束时间必须为空
|
||||
function regex_evaluation_end(){
|
||||
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
||||
var evaluation_end = $.trim($("#evaluation_end_time").val());
|
||||
if(evaluation_end == ""){
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期不能为空");
|
||||
return true;
|
||||
}
|
||||
var evaluation_start_time = new Date(evaluation_start);
|
||||
var evaluation_end_time = new Date(evaluation_end);
|
||||
if(evaluation_end_time > evaluation_start_time){
|
||||
$("#homework_evaluation_end_time").text("");
|
||||
return true;
|
||||
}else{
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//验证匿评数量
|
||||
function regex_evaluation_num(){
|
||||
var evaluation_num = $.trim($("#evaluation_num").val());
|
||||
var regex = /^\d+$/;
|
||||
if(evaluation_num==""){
|
||||
$("#evaluation_num_notice").text("匿评人数不能为空");
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num)){
|
||||
if(evaluation_num > 0){
|
||||
$("#evaluation_num_notice").html("");
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$("#evaluation_num_notice").text("匿评人数必须为大于0");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$("#evaluation_num_notice").text("匿评人数只能为数字");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//老师提交 新建/修改 作业
|
||||
//function submit_homework(id)
|
||||
//{
|
||||
// if(!regex_homework_name())
|
||||
// {
|
||||
// if($("#homework_common_homework_type").attr("checked") == "checked")
|
||||
// $("#homework_name").focus();
|
||||
// }
|
||||
// else if(!regex_evaluation_num())
|
||||
// {
|
||||
// $("#evaluation_setting").show();
|
||||
// $("#ta_proportion").removeAttr("disabled");
|
||||
// $("#evaluation_num").focus();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $("#evaluation_setting").hide();
|
||||
// $("#ta_proportion").attr("disabled","disabled");
|
||||
// homework_description_editor.sync();
|
||||
// $("#"+id).submit();
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
//老师提交 新建/修改 作业
|
||||
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 regexHomeworkCommonName()
|
||||
{
|
||||
|
@ -661,7 +703,7 @@ $(document).ready(function () {
|
|||
// 日历选择日期后关闭
|
||||
function regexDeadLine()
|
||||
{
|
||||
('#ui-datepicker-div').hide;
|
||||
('#ui-datepicker-div').hide();
|
||||
}
|
||||
|
||||
//新建、修改课程明码显示
|
||||
|
|
|
@ -163,7 +163,7 @@ a.f_grey:hover {color:#000000;}
|
|||
.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}
|
||||
.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; width:150px;}
|
||||
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}*/
|
||||
.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;}
|
||||
.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;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
|
@ -511,7 +511,7 @@ a:hover.st_add{ color:#ff8e15;}
|
|||
.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{border:1px solid #64bdd9; color:#64bdd9;cursor: pointer;}
|
||||
.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;}
|
||||
|
|
|
@ -663,7 +663,7 @@ a.postReplyCancel:hover {color:#ffffff;}
|
|||
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
|
||||
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
||||
.homepagePostReplyPortrait {float:left; width:33px;}
|
||||
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
|
||||
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
|
||||
|
@ -796,7 +796,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
|
|||
.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
|
||||
.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}
|
||||
.postDetailWrap {width:580px; float:left;}
|
||||
.postDetailTitle {width:650px; max-width:650px; margin-bottom:5px;}
|
||||
.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;}
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
|
|
@ -43,7 +43,7 @@ pre li,ul,ol {
|
|||
}
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 3px } /* IE indents via margin-left */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px } /* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
|
|
Loading…
Reference in New Issue