|
|
|
@ -79,10 +79,6 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var KE = {
|
|
|
|
|
MDU: "1234455",//当前文章标识符
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function nh_check_field(params){
|
|
|
|
|
var result=true;
|
|
|
|
|
if(!regexStudentWorkName()) {
|
|
|
|
@ -90,14 +86,14 @@
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if(params.content!=undefined){
|
|
|
|
|
if(params.content.isEmpty()){
|
|
|
|
|
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\uFE30-\uFFA0][\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.content.html())){
|
|
|
|
|
result=false;
|
|
|
|
|
}
|
|
|
|
|
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
|
|
|
|
params.textarea.html(params.content.html());
|
|
|
|
|
params.content.sync();
|
|
|
|
|
|
|
|
|
|
if(params.content.isEmpty()){
|
|
|
|
|
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\uFE30-\uFFA0][\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.content.html())){
|
|
|
|
|
params.contentmsg.html('作品描述不能为空');
|
|
|
|
|
}else{
|
|
|
|
|
params.contentmsg.html('');
|
|
|
|
@ -150,6 +146,17 @@
|
|
|
|
|
edit.iframe.height(150);
|
|
|
|
|
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 33, 150));
|
|
|
|
|
},
|
|
|
|
|
afterBlur:function(){
|
|
|
|
|
if(this.isEmpty()) {
|
|
|
|
|
this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>请在此输入作品描述,您可以直接在这里粘贴作业图片</span>");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
afterFocus: function(){
|
|
|
|
|
var edit = this.edit;
|
|
|
|
|
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\uFE30-\uFFA0][\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
|
|
|
|
|
edit.html('');
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
afterCreate:function(){
|
|
|
|
|
//init
|
|
|
|
|
var edit = this.edit;
|
|
|
|
@ -159,7 +166,7 @@
|
|
|
|
|
//reset height
|
|
|
|
|
var edit = this.edit;
|
|
|
|
|
var body = edit.doc.body;
|
|
|
|
|
edit.html(params.textarea.innerHTML);
|
|
|
|
|
edit.html("<span id='hint' style='color: #999999; font-size: 12px'>请在此输入作品描述,您可以直接在这里粘贴作业图片</span>");
|
|
|
|
|
//paramsHeight = params.kindutil.removeUnit(this.height);
|
|
|
|
|
edit.iframe.height(150);
|
|
|
|
|
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) , 150));
|
|
|
|
@ -242,7 +249,7 @@
|
|
|
|
|
<%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>User.current.id %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div>
|
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请输入作品名称",:value=>"#{@homework.name}的作品提交", :onkeyup => "regexStudentWorkName();" %>
|
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请输入作品名称",:value=>"#{@homework.name}的作品提交(可修改)", :onkeyup => "regexStudentWorkName();" %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<p id="student_work_name_span" class="c_red mb10"></p>
|
|
|
|
|
</div>
|
|
|
|
|