课程讨论区添加真实姓名

编辑器图片更新
szzh
huang 10 years ago
parent 7b6e40f4c3
commit fc61edf1fa

@ -39,9 +39,9 @@
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
<div class="talkmain_txt fl mt5 f14"> <div class="talkmain_txt fl mt5 f14">
<% author = topic.author.to_s %> <% author = topic.author.to_s %>
<div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;"> <div style="max-width:120px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, <%= link_to "#{topic.author.show_name}(#{topic.author.login})", user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author,
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> :style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
</div> </div>
<p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</p> <p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</p>
@ -51,14 +51,11 @@
margin-right: 10px;"><%= l(:button_edit) %></a> margin-right: 10px;"><%= l(:button_edit) %></a>
<% end %> <% end %>
<%= link_to( <%= link_to(l(:button_delete), {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
l(:button_delete), :method => :post,
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, :data => {:confirm => l(:text_are_you_sure)},
:method => :post, :class => 'talk_edit fr',
:data => {:confirm => l(:text_are_you_sure)}, :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %>
:class => 'talk_edit fr',
:style => ' margin-right: 10px;'
) if topic.destroyable_by?(User.current) %>
<% if topic.sticky? %> <% if topic.sticky? %>
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a> <a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
@ -165,7 +162,7 @@
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>" id="topic<%=message.id%>"> <li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>" id="topic<%=message.id%>">
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
<div class="Msg_txt"> <div class="Msg_txt">
<%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %> <%= link_to_user_header message.author.show_name,false,:class => 'fl c_orange f14 ' %>
<br/> <br/>
<div class="fl break_word f14"> <div class="fl break_word f14">
<%= textAreailizable message,:content,:attachments => message.attachments %> <%= textAreailizable message,:content,:attachments => message.attachments %>

@ -13,10 +13,10 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% if !User.current.logged? %> <% if !User.current.logged? %>
<div class="c_grey f14"> <div class="c_grey f14">
<%= l(:label_user_login_project_board) %> <%= l(:label_user_login_project_board) %>
<%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %> <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
</div> </div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<div class=" talklist_box" > <div class=" talklist_box" >
@ -30,60 +30,57 @@
<div class=" talklist_box" > <div class=" talklist_box" >
<p class="c_dark mb5 f14">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p> <p class="c_dark mb5 f14">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
<% if @topics.any? %> <% if @topics.any? %>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<div class="talkmain_box" id="topic<%= topic.id %>" nhname="container_board" mhname="container_board_reply" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;"> <div class="talkmain_box" id="topic<%= topic.id %>" nhname="container_board" mhname="container_board_reply" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
<div class="talkmain_txt fl mt5 f14"> <div class="talkmain_txt fl mt5 f14">
<% author = topic.author.to_s %> <% author = topic.author.to_s %>
<div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;"> <div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author,
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
</div> </div>
<p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</p> <p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</p>
<p class="talkmain_tit fl fb break_word f14" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:415px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">&nbsp;&nbsp;<%= h(topic.subject) %></p> <p class="talkmain_tit fl fb break_word f14" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:415px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">&nbsp;&nbsp;<%= h(topic.subject) %></p>
<div style="float:right;max-width:110px;"> <div style="float:right;max-width:110px;">
<% if topic.editable_by?(User.current) %> <% if topic.editable_by?(User.current) %>
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;margin-right: 10px;"><%= l(:button_edit) %></a> <a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;margin-right: 10px;"><%= l(:button_edit) %></a>
<% end %> <% end %>
<%= link_to( <%= link_to(l(:button_delete), {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
l(:button_delete), :method => :post,
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, :data => {:confirm => l(:text_are_you_sure)},
:method => :post, :class => 'talk_edit fr',
:data => {:confirm => l(:text_are_you_sure)}, :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %>
:class => 'talk_edit fr', <% if topic.sticky? %>
:style => ' margin-right: 10px;' <a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
) if topic.destroyable_by?(User.current) %> <% end %>
<% if topic.sticky? %> <script>
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a> //$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}});
<% end %> //解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
<script> $(function(){
//$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}}); function nh_show_btn(){
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug if($("#project_show_<%= topic.id%>").is(':hidden')){
$(function(){ if($("#contentmessage<%=topic.id %>").height()>182){
function nh_show_btn(){ $("#project_show_<%= topic.id%>").show();
if($("#project_show_<%= topic.id%>").is(':hidden')){ }
if($("#contentmessage<%=topic.id %>").height()>182){ }
$("#project_show_<%= topic.id%>").show(); }
} var div = $("#contentmessage<%=topic.id %>");
} var imgs = $('img',div);
} var lens = imgs.length;
var div = $("#contentmessage<%=topic.id %>"); function nh_load_img_end(){
var imgs = $('img',div); nh_show_btn();
var lens = imgs.length;
function nh_load_img_end(){
nh_show_btn();
// lens--; // lens--;
// if(lens <= 0){ // if(lens <= 0){
// nh_show_btn(); // nh_show_btn();
// } // }
} }
if(lens > 0){ if(lens > 0){
$('img',div).load(function(){ $('img',div).load(function(){
nh_load_img_end(); nh_load_img_end();
}); });
} }
nh_show_btn(); nh_show_btn();
// if(lens <= 0){ // if(lens <= 0){
// nh_show_btn(); // nh_show_btn();
// }else{ // }else{
@ -91,107 +88,100 @@
// nh_load_img_end(); // nh_load_img_end();
// }); // });
// } // }
}); });
</script> </script>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="project_board_content break_word f14" id="content_<%=topic.id%>"> <div class="project_board_content break_word f14" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img"> <div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %> <%= topic.content.html_safe %>
<!-- --> <!-- -->
</div>
</div>
<p style="display: none;" id="project_show_<%= topic.id%>">
<a id="expend_more_information<%= topic.id%>" style="color: #0781b4;" href="javascript:void(0)" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</a>
<span class="g-arr-down">
<img id="arrow<%=topic.id%>" src="/images/jiantou.jpg" width="12" height="6" />
</span>
</p>
<%= link_to_attachments_course topic, :author => false %>
<%= l(:label_activity_time)%>&nbsp;&nbsp;<%= format_time topic.created_on %>
</div> </div>
</div> <% if User.current.logged? %>
<p style="display: none;" id="project_show_<%= topic.id%>"> <a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr f14" style="margin-right:10px;"><%= l(:button_reply) %></a>
<a id="expend_more_information<%= topic.id%>" style="color: #0781b4;" href="javascript:void(0)" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</a> <% end %>
<span class="g-arr-down">
<img id="arrow<%=topic.id%>" src="/images/jiantou.jpg" width="12" height="6" />
</span>
</p>
<%= link_to_attachments_course topic, :author => false %>
<%= l(:label_activity_time)%>&nbsp;&nbsp;<%= format_time topic.created_on %>
</div>
<% if User.current.logged? %>
<a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr f14" style="margin-right:10px;"><%= l(:button_reply) %></a>
<% end %>
<div class="cl"></div>
<div class="talk_new ml15 mb10" nhname='about_talk' id="about_newtalk<%=topic.id%>" style="display: none;border-top: 1px dashed #d9d9d9;padding-top:5px;margin-left:0px;padding-left:15px;">
<ul>
<%= render :partial => 'edit',locals: {:topic => topic} %>
</ul>
</div>
<div class="cl"></div>
<div class="talkWrapBox">
<% reply = Message.new(:subject => "RE: #{topic.subject}")%>
<% if !topic.locked? && authorize_for('messages', 'reply') %>
<div class="talkWrapMsg" nhname="about_talk_reply" style="display: none;">
<em class="talkWrapArrow"></em>
<div class="cl"></div> <div class="cl"></div>
<div class="talkConIpt ml15 mb10" style="margin-left:30px;" id="reply<%= topic.id %>"> <div class="talk_new ml15 mb10" nhname='about_talk' id="about_newtalk<%=topic.id%>" style="display: none;border-top: 1px dashed #d9d9d9;padding-top:5px;margin-left:0px;padding-left:15px;">
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, <ul>
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %> <%= render :partial => 'edit',locals: {:topic => topic} %>
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %> </ul>
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<div style="padding-top:5px;" class="fr">
<a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
<a href="javascript:void(0)" nhname="submitbtn" class="blue_btn fr " style=""><%= l(:button_submit)%></a>
</div>
<% end %>
<div class="cl"></div>
</div> </div>
</div> <div class="cl"></div>
<% end %> <div class="talkWrapBox">
<div class="cl"></div> <% reply = Message.new(:subject => "RE: #{topic.subject}")%>
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}). <% if !topic.locked? && authorize_for('messages', 'reply') %>
reorder("#{Message.table_name}.id desc").all %> <div class="talkWrapMsg" nhname="about_talk_reply" style="display: none;">
<% unless replies_all.empty? %> <em class="talkWrapArrow"></em>
<div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>"> <div class="cl"></div>
<ul> <div class="talkConIpt ml15 mb10" style="margin-left:30px;" id="reply<%= topic.id %>">
<% replies_all_i = 0 %> <%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'},
<% replies_all.each do |message| %> :html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
<% replies_all_i=replies_all_i+1 %> <%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>"> <div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> <div style="padding-top:5px;" class="fr">
<div class="Msg_txt"> <a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
<%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %> <a href="javascript:void(0)" nhname="submitbtn" class="blue_btn fr " style=""><%= l(:button_submit)%></a>
<br/> </div>
<div class="fl break_word f14"> <% end %>
<%= textAreailizable message,:content,:attachments => message.attachments %> <div class="cl"></div>
<!-- -->
</div> </div>
<input nhname="nh_content_val" type="hidden" value="<%= message.content %>"/>
<br/><div class="cl"></div>
<span class=" c_grey fl f14"><%= format_time(message.created_on) %></span>
<%= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => ' c_dblue fr f14'
) if message.course_destroyable_by?(User.current) %>
<%= link_to(
l(:button_reply),
'javascript:;',
:nhname =>'showbtn_child_reply',
:class => ' c_dblue fr f14',
:style => 'margin-right: 10px;',
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
</div> </div>
<div class="cl"></div>
</li>
<% end %> <% end %>
</ul> <div class="cl"></div>
</div> <% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).reorder("#{Message.table_name}.id desc").all %>
<%if topic.replies_count>2 %> <% unless replies_all.empty? %>
<div class="talkWrapMsg"> <div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>">
<a nhname="reply_ex_btn" data-count="<%= topic.replies_count %>" data-init="0" href="javascript:void(0)" class="ml258 c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a> <ul>
<% replies_all_i = 0 %>
<% replies_all.each do |message| %>
<% replies_all_i=replies_all_i+1 %>
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>">
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
<div class="Msg_txt">
<%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %>
<br/>
<div class="fl break_word f14">
<%= textAreailizable message,:content,:attachments => message.attachments %>
<!-- -->
</div>
<input nhname="nh_content_val" type="hidden" value="<%= message.content %>"/>
<br/><div class="cl"></div>
<span class=" c_grey fl f14"><%= format_time(message.created_on) %></span>
<%= link_to(l(:button_delete),{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => ' c_dblue fr f14') if message.course_destroyable_by?(User.current) %>
<%= link_to(l(:button_reply), 'javascript:;',
:nhname =>'showbtn_child_reply',
:class => ' c_dblue fr f14',
:style => 'margin-right: 10px;',
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
</div>
<div class="cl"></div>
</li>
<% end %>
</ul>
</div>
<%if topic.replies_count>2 %>
<div class="talkWrapMsg">
<a nhname="reply_ex_btn" data-count="<%= topic.replies_count %>" data-init="0" href="javascript:void(0)" class="ml258 c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a>
</div>
<% end %>
<% end %>
</div> </div>
<% end %> </div>
<% end %> <% end %>
</div>
</div>
<% end %>
<% else %> <% else %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% end %> <% end %>
@ -211,78 +201,78 @@
<div style="display:none;"><a href="#" id="nhjump"></a></div> <div style="display:none;"><a href="#" id="nhjump"></a></div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$(".talkmain_box").each(function(){ $(".talkmain_box").each(function(){
var target = $("li[nhname='reply_rec']",$(this)); var target = $("li[nhname='reply_rec']",$(this));
var btn = $("a[nhname='reply_ex_btn']",$(this)); var btn = $("a[nhname='reply_ex_btn']",$(this));
var jumpobj = $("div[nhname='nh_reply_div']",$(this)); var jumpobj = $("div[nhname='nh_reply_div']",$(this));
btn.click(function(){ btn.click(function(){
if($(this).data('init')=='0'){ if($(this).data('init')=='0'){
$(this).data('init',1); $(this).data('init',1);
$(this).html('收起回复('+$(this).data('count')+')'); $(this).html('收起回复('+$(this).data('count')+')');
target.show(); target.show();
}else{ }else{
$(this).data('init',0); $(this).data('init',0);
$(this).html('展开回复('+$(this).data('count')+')'); $(this).html('展开回复('+$(this).data('count')+')');
target.hide(); target.hide();
target.eq(0).show(); target.eq(0).show();
target.eq(1).show(); target.eq(1).show();
$("#nhjump").attr('href','#'+jumpobj.attr('id')); $("#nhjump").attr('href','#'+jumpobj.attr('id'));
$("#nhjump")[0].click(); $("#nhjump")[0].click();
} }
}); });
}); });
KindEditor.ready(function(K){ KindEditor.ready(function(K){
$("div[nhname='container_board']").each(function(){ $("div[nhname='container_board']").each(function(){
var container = $(this); var container = $(this);
var about_talk = $("div[nhname='about_talk']",container); var about_talk = $("div[nhname='about_talk']",container);
var params = ({ var params = ({
kindutil:K, kindutil:K,
showbtn:$("a[nhname='showbtn']",container), showbtn:$("a[nhname='showbtn']",container),
about_talk:about_talk, about_talk:about_talk,
inputsubject:$("input[nhname='inputsubject']",about_talk), inputsubject:$("input[nhname='inputsubject']",about_talk),
subjectmsg:$("p[nhname='subjectmsg']",about_talk), subjectmsg:$("p[nhname='subjectmsg']",about_talk),
textarea:$("textarea[nhname='textarea']",about_talk), textarea:$("textarea[nhname='textarea']",about_talk),
contentmsg:$("p[nhname='contentmsg']",about_talk), contentmsg:$("p[nhname='contentmsg']",about_talk),
submitbtn:$("a[nhname='submitbtn']",about_talk), submitbtn:$("a[nhname='submitbtn']",about_talk),
cancelbtn:$("a[nhname='cancelbtn']",about_talk), cancelbtn:$("a[nhname='cancelbtn']",about_talk),
form:$("form[nhname='form']",about_talk), form:$("form[nhname='form']",about_talk),
toolbar_container:$("div[nhname='toolbar_container']",about_talk), toolbar_container:$("div[nhname='toolbar_container']",about_talk),
init_content_val:$("input[nhname='init_content_val']",about_talk) init_content_val:$("input[nhname='init_content_val']",about_talk)
}); });
nh_init_board(params); nh_init_board(params);
}); });
$("div[mhname='container_board_reply']").each(function(){ $("div[mhname='container_board_reply']").each(function(){
var container = $(this); var container = $(this);
var about_talk = $("div[nhname='about_talk_reply']",container); var about_talk = $("div[nhname='about_talk_reply']",container);
var params = { var params = {
type:'reply', type:'reply',
kindutil:K, kindutil:K,
showbtn:$("a[nhname='showbtn_reply']",container), showbtn:$("a[nhname='showbtn_reply']",container),
showbtn_child:$("a[nhname='showbtn_child_reply']",container), showbtn_child:$("a[nhname='showbtn_child_reply']",container),
about_talk:about_talk, about_talk:about_talk,
inputsubject:$("input[nhname='inputsubject']",about_talk), inputsubject:$("input[nhname='inputsubject']",about_talk),
subjectmsg:$("p[nhname='subjectmsg']",about_talk), subjectmsg:$("p[nhname='subjectmsg']",about_talk),
textarea:$("textarea[nhname='textarea']",about_talk), textarea:$("textarea[nhname='textarea']",about_talk),
contentmsg:$("p[nhname='contentmsg']",about_talk), contentmsg:$("p[nhname='contentmsg']",about_talk),
submitbtn:$("a[nhname='submitbtn']",about_talk), submitbtn:$("a[nhname='submitbtn']",about_talk),
cancelbtn:$("a[nhname='cancelbtn']",about_talk), cancelbtn:$("a[nhname='cancelbtn']",about_talk),
form:$("form[nhname='form']",about_talk), form:$("form[nhname='form']",about_talk),
quote_show:$("div[nhname='quote_show']",about_talk), quote_show:$("div[nhname='quote_show']",about_talk),
quote_input:$("textarea[nhname='quote_input']",about_talk), quote_input:$("textarea[nhname='quote_input']",about_talk),
toolbar_container:$("div[nhname='toolbar_container']",about_talk), toolbar_container:$("div[nhname='toolbar_container']",about_talk),
jumphref:$("#nhjump") jumphref:$("#nhjump")
}; };
params.get_ref_str_call=function(btn){ params.get_ref_str_call=function(btn){
var div = btn.parent('div'); var div = btn.parent('div');
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'<div class="cl"></div></blockquote>'; var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'<div class="cl"></div></blockquote>';
return str; return str;
} }
nh_init_board(params); nh_init_board(params);
}); });
<% if(!@flag.nil? && @flag=='true') %> <% if(!@flag.nil? && @flag=='true') %>
if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click(); if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click();
<% end %> <% end %>
}); });
}); });
</script> </script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Loading…
Cancel
Save