|
|
@ -129,7 +129,7 @@ function regexSubject()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function regexContent()
|
|
|
|
function regexContent()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var content = message_content_editor.html();
|
|
|
|
var content = message_content_editor.html();
|
|
|
|
if(content.length ==0)
|
|
|
|
if(content.length ==0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$("#message_content_span").text("描述不能为空");
|
|
|
|
$("#message_content_span").text("描述不能为空");
|
|
|
@ -146,7 +146,7 @@ function regexContent()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function submitCoursesBoard()
|
|
|
|
function submitCoursesBoard()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
message_content_editor.sync();
|
|
|
|
message_content_editor.sync();
|
|
|
|
if(regexSubject()&®exContent()){$("#message-form").submit();}
|
|
|
|
if(regexSubject()&®exContent()){$("#message-form").submit();}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
@ -178,7 +178,7 @@ function regexTitle()
|
|
|
|
|
|
|
|
|
|
|
|
function regexDescription()
|
|
|
|
function regexDescription()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var name = news_description_editor.html();
|
|
|
|
var name = news_description_editor.html();
|
|
|
|
if(name.length ==0)
|
|
|
|
if(name.length ==0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$("#description_notice_span").text("描述不能为空");
|
|
|
|
$("#description_notice_span").text("描述不能为空");
|
|
|
@ -186,12 +186,12 @@ function regexDescription()
|
|
|
|
$("#description_notice_span").focus();
|
|
|
|
$("#description_notice_span").focus();
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(name.length >=6000){
|
|
|
|
else if(name.length >=6000){
|
|
|
|
$("#description_notice_span").text("描述最多3000个汉字(或6000个英文字符)");
|
|
|
|
$("#description_notice_span").text("描述最多3000个汉字(或6000个英文字符)");
|
|
|
|
$("#description_notice_span").css('color','#ff0000');
|
|
|
|
$("#description_notice_span").css('color','#ff0000');
|
|
|
|
$("#description_notice_span").focus();
|
|
|
|
$("#description_notice_span").focus();
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$("#description_notice_span").text("填写正确");
|
|
|
|
$("#description_notice_span").text("填写正确");
|
|
|
@ -200,12 +200,12 @@ function regexDescription()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function submitNews(is_new)
|
|
|
|
function submitNews(is_new)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
alert(is_new)
|
|
|
|
alert(is_new)
|
|
|
|
if(regexTitle() && regexDescription())
|
|
|
|
if(regexTitle() && regexDescription())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
news_description_editor.sync();
|
|
|
|
news_description_editor.sync();
|
|
|
|
$("#news-form").submit();
|
|
|
|
$("#news-form").submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -214,31 +214,31 @@ function submitFocus(obj)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$(obj).focus();
|
|
|
|
$(obj).focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////课程讨论区
|
|
|
|
/////////////////////////////////////////////////课程讨论区
|
|
|
|
function course_board_submit_message_replay()
|
|
|
|
function course_board_submit_message_replay()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(MessageReplayVevify())
|
|
|
|
if(MessageReplayVevify())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
message_content_editor.sync();//提交内容之前要sync,不然服务器端取不到值
|
|
|
|
message_content_editor.sync();//提交内容之前要sync,不然服务器端取不到值
|
|
|
|
$("#message_form").submit();
|
|
|
|
$("#message_form").submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function MessageReplayVevify() {
|
|
|
|
function MessageReplayVevify() {
|
|
|
|
var content = message_content_editor.html();//$.trim($("#message_content").val());
|
|
|
|
var content = message_content_editor.html();//$.trim($("#message_content").val());
|
|
|
|
if (content.length == 0) {
|
|
|
|
if (content.length == 0) {
|
|
|
|
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
|
|
|
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
|
|
|
$("#message_content_span").css('color', '#ff0000');
|
|
|
|
$("#message_content_span").css('color', '#ff0000');
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
|
|
|
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
|
|
|
$("#message_content_span").css('color', '#008000');
|
|
|
|
$("#message_content_span").css('color', '#008000');
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
//验证搜索时输入名字
|
|
|
|
//验证搜索时输入名字
|
|
|
@ -370,7 +370,7 @@ function submit_new_bid(id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(regex_bid_name()&®ex_evaluation_num())
|
|
|
|
if(regex_bid_name()&®ex_evaluation_num())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bid_description_editor.sync();
|
|
|
|
bid_description_editor.sync();
|
|
|
|
$("#"+id).submit();
|
|
|
|
$("#"+id).submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -404,10 +404,10 @@ $(function(){
|
|
|
|
//将右侧的最小高度设置成左侧高度,美化界面
|
|
|
|
//将右侧的最小高度设置成左侧高度,美化界面
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
$("#RSide").css("min-height",$("#LSide").height()-30);
|
|
|
|
$("#RSide").css("min-height",$("#LSide").height()-30);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 日历选择日期后关闭
|
|
|
|
// 日历选择日期后关闭
|
|
|
|
function regexDeadLine()
|
|
|
|
function regexDeadLine()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
('#ui-datepicker-div').hide;
|
|
|
|
('#ui-datepicker-div').hide;
|
|
|
|
}
|
|
|
|
}
|