|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
<%= javascript_include_tag 'new_user' %>
|
|
|
|
|
<%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor' %>
|
|
|
|
|
<script>
|
|
|
|
|
function add_class(id){
|
|
|
|
|
if($("#"+id).hasClass("sortArrowActiveD")){
|
|
|
|
@ -58,11 +58,15 @@
|
|
|
|
|
if(!check_memo_name()){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() != "" ){
|
|
|
|
|
if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().trim() != "" ){
|
|
|
|
|
memo_content.sync();
|
|
|
|
|
$("#new_memo").submit();
|
|
|
|
|
}else if($("textarea[name='memo[subject]']").val().trim() == "" && $("textarea[name='memo[content]']").val().trim() != "" ){
|
|
|
|
|
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() == ""){
|
|
|
|
|
$("#error").html("主题和内容不能为空").show();
|
|
|
|
|
}
|
|
|
|
|
else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() != "" ){
|
|
|
|
|
$("#error").html("主题不能为空").show();
|
|
|
|
|
}else if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() == ""){
|
|
|
|
|
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().val().trim() == ""){
|
|
|
|
|
$("#error").html("内容不能为空").show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -72,7 +76,7 @@
|
|
|
|
|
$("#error").html("主题 过长(最长为 50 个字符)").show();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if($("#memo_content").val().trim().length > 5000){
|
|
|
|
|
if(memo_content.html().trim().length > 5000){
|
|
|
|
|
$("#error").html("内容 过长(最长为 5000 个字符)").show();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -83,7 +87,7 @@
|
|
|
|
|
$('#create_memo_div').slideToggle();
|
|
|
|
|
$('#create_memo_btn').slideToggle();
|
|
|
|
|
$('#memo_subject').val('');
|
|
|
|
|
$('#memo_content').val('')
|
|
|
|
|
memo_content.html('')
|
|
|
|
|
$('#error').html('').hide();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
@ -99,11 +103,7 @@
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mt15">
|
|
|
|
|
<textarea type="text" name="memo[content]" id="memo_content" maxlength="5000" onfocus="$('#error').hide();" onmouseover="this.style.borderColor='#d9d9d9'" class="postDetailInput" placeholder="输入帖子内容" /></textarea>
|
|
|
|
|
<script>
|
|
|
|
|
var textarea = document.getElementById('memo_content');
|
|
|
|
|
autoTextarea(textarea);
|
|
|
|
|
</script>
|
|
|
|
|
<%= kindeditor_tag 'memo[content]','',:height=>300,:editor_id=>'memo_content'%>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mt10">
|
|
|
|
|
<!--<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>-->
|
|
|
|
|