修改《编辑器还原》《提示信息的添加》

Signed-off-by: alan <547533434@qq.com>
memcached_alan
alan 10 years ago
parent c18d1d9585
commit 1c9b9dff79

@ -3,7 +3,7 @@
<%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %>
<li>
<a href="javascript:void(0)" onclick="show_newtalk();" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
<a href="javascript:;" name="submitbtn" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
<a href="javascript:(0);" name="submitbtn" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
<div class="cl"></div>
</li>
<% end %>

File diff suppressed because it is too large Load Diff

@ -5,17 +5,17 @@
<li style="display: none">
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %>
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585", :aa=>"subject" }.merge(extra_option) %>
<p id="subject_span<%= topic.id%>" class="ml55"></p>
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
</li>
<% else %>
<li>
<li >
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585", :aa=>"subject" }.merge(extra_option) %>
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
</li>

@ -18,7 +18,7 @@
<li style="display: none">
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585" }.merge(extra_option) %>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585", :aa=>'subject' }.merge(extra_option) %>
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
@ -28,7 +28,7 @@
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585", :aa=>'subject' }.merge(extra_option) %>
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
</li>

@ -4,7 +4,7 @@
<li>
<a href="javascript:void(0)" onclick="show_newtalk();" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
<a href="javascript:;" name="submitbtn" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
<a href="javascript:void(0)" name="submitbtn" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
<div class="cl"></div>
</li>
<% end %>

@ -8,7 +8,7 @@
</h2>
<% if User.current.logged? %>
<a href="javascript:void" class="green_btn fr newtalk " onclick="show_newtalk();"><%= l(:label_message_new) %></a>
<a href="javascript:void(0)" class="green_btn fr newtalk " onclick="show_newtalk();"><%= l(:label_message_new) %></a>
<% end %>
<div class="cl"></div>
</div>
@ -174,7 +174,7 @@
<br/>
<p class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
<br/>
<br/>
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
<%= link_to(
@ -246,28 +246,32 @@
KindEditor.ready(function(K){
$("div[name='container_board']").each(function(){
var container=$(this);
var form =$("form", container);
var messege = $("p[aa='message_show']",container);
var textarea= $("textarea[aa='content']",container);
var editor = K.create(textarea, {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
width:"89%",
items : ['emoticons']
items : []
});
$("a[name='submitbtn']",container).click(function(){
textarea[0].value = editor.html();
var id = textarea[0].id.toString().substr(15);
if(regexContent(id) && regexSubject(id)) {
if (this.parentNode.name.toString() == 'message-form') {
this.parentNode.submit();
}
else {
this.parentNode.parentNode.submit();
}
if (editor.html() == "") {
messege.html("回复内容不能为空") ;
messege.css('color', '#ff0000');
messege.show();
}
else {
messege.html("填写正确");
messege.css('color', '#008000');
messege.show();
form.submit();
}
});

@ -77,7 +77,24 @@ function show_more_reply(contentid, id2, id3) {
information.attr("style", "color:#0781b4;");
}
}
function show_more_reply1(contentid, id2, id3) {
$(contentid).toggleClass("course_description_none");
var information = $(id2);
var arrow = $(id3);
var val = information.attr("value");
if (val == "show_more") {
$(id2).text("[收起]");
information.attr("value", "hide_more");
information.attr("style", "color:#3ca5c6");
arrow.attr("src", "/images/jiantouup.jpg")
}
else {
$(id2).text("[展开]");
information.attr("value", "show_more");
arrow.attr("src", "/images/jiantou.jpg")
information.attr("style", "color:#0781b4;");
}
}
//项目版本库git帮助文档显示
function showhelpAndScrollTo(id) {
$('#' + id).toggle();

@ -46,6 +46,7 @@ a:hover.subnav_green{ background:#14ad5a;}
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;}
.project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}

@ -50,6 +50,7 @@ a:hover.subnav_green{ background:#14ad5a;}
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;}
.project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}

Loading…
Cancel
Save