parent
a95a68caec
commit
dacad26010
|
@ -2,11 +2,11 @@
|
||||||
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
||||||
function regexName()
|
function regexName()
|
||||||
{
|
{
|
||||||
var name = $("#homework_attach_name").val();
|
var name = $.trim($("#homework_attach_name").val());
|
||||||
|
|
||||||
if(name=="")
|
if(name=="")
|
||||||
{
|
{
|
||||||
$("#homework_attach_name_span").text("名称不能为空");
|
$("#homework_attach_name_span").text("作品名称不能为空");
|
||||||
$("#homework_attach_name_span").css('color','#ff0000');
|
$("#homework_attach_name_span").css('color','#ff0000');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,25 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function regexDescription()
|
||||||
|
{
|
||||||
|
var name = $.trim($("#homework_attach_description").val());
|
||||||
|
|
||||||
function submit_homework_form(){if(regexName()){$('#new_homework_attach').submit();}}
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#homework_attach_description_span").text("作品描述不能为空");
|
||||||
|
$("#homework_attach_description_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#homework_attach_description_span").text("填写正确");
|
||||||
|
$("#homework_attach_description_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function submit_homework_form(){if(regexName()&®exDescription()){$('#new_homework_attach').submit();}}
|
||||||
</script>
|
</script>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="Newwork">
|
<div class="Newwork">
|
||||||
|
@ -55,13 +72,14 @@
|
||||||
<span id="homework_attach_name_span"></span>
|
<span id="homework_attach_name_span"></span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label style="float:left;padding-left:10px;">
|
<label style="float:left;padding-right: 3px;">
|
||||||
<span class="c_red">
|
<span class="c_red">
|
||||||
|
*
|
||||||
</span>
|
</span>
|
||||||
作业描述 :
|
作品描述 :
|
||||||
</label>
|
</label>
|
||||||
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字"%>
|
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onblur => "regexDescription();"%>
|
||||||
|
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -128,7 +128,7 @@ a:hover.ping_sub{ background:#14a8b9;}
|
||||||
|
|
||||||
.w430{ width:430px;}
|
.w430{ width:430px;}
|
||||||
.w350{ width:350px;}
|
.w350{ width:350px;}
|
||||||
.w620{ width:580px; height:160px; border:1px solid #CCC;}
|
.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;}
|
||||||
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
|
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
|
||||||
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
|
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
|
||||||
a:hover.tijiao{ background:#0f99a9 !important;}
|
a:hover.tijiao{ background:#0f99a9 !important;}
|
||||||
|
|
Loading…
Reference in New Issue