修改作品描述框和名称框的提示文字

cxt_course
cxt 10 years ago
parent 24318e3d6b
commit b1f3395bd1

@ -79,10 +79,6 @@
} }
} }
var KE = {
MDU: "1234455",//当前文章标识符
};
function nh_check_field(params){ function nh_check_field(params){
var result=true; var result=true;
if(!regexStudentWorkName()) { if(!regexStudentWorkName()) {
@ -90,14 +86,14 @@
return result; return result;
} }
if(params.content!=undefined){ 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; result=false;
} }
if(params.content.html()!=params.textarea.html() || params.issubmit==true){ if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html()); params.textarea.html(params.content.html());
params.content.sync(); 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('作品描述不能为空'); params.contentmsg.html('作品描述不能为空');
}else{ }else{
params.contentmsg.html(''); params.contentmsg.html('');
@ -150,6 +146,17 @@
edit.iframe.height(150); edit.iframe.height(150);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 33, 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(){ afterCreate:function(){
//init //init
var edit = this.edit; var edit = this.edit;
@ -159,7 +166,7 @@
//reset height //reset height
var edit = this.edit; var edit = this.edit;
var body = edit.doc.body; 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); //paramsHeight = params.kindutil.removeUnit(this.height);
edit.iframe.height(150); edit.iframe.height(150);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) , 150)); this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) , 150));

@ -58,7 +58,7 @@
</ul> </ul>
<div class="cl"></div> <div class="cl"></div>
<div id="homework_search_input" class="mt10 fl"> <div id="homework_search_input" class="mt10 fl">
<%=render :partial=>'homework_repository_search', :locals=>{:type => @type,:is_import => 0,:property => @property} %> <%=render :partial=>'homework_repository_search', :locals=>{:type => @type,:is_import => 0,:property => nil} %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="w683 fl mr10 mt10" id="homework_repository_list"> <div class="w683 fl mr10 mt10" id="homework_repository_list">

Loading…
Cancel
Save