- <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %>
+ <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => "about_newtalk#{topic.id}",:class => ' c_dblue fr' %>
@@ -98,12 +99,12 @@
<% if !topic.locked? && authorize_for('messages', 'reply') %>
- <%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s} do |f| %>
+
+ <%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
-
<%= l(:label_memo_create)%>
+
<%= l(:label_memo_create)%>
<% end %>
@@ -142,6 +143,16 @@
:title => l(:button_delete),
:class => ' c_dblue fr'
) if message.course_destroyable_by?(User.current) %>
+ <%= link_to(
+ l(:button_quote),
+ {:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
+ :class => ' c_dblue fr',
+ :style => 'margin-right: 10px;',
+ :remote => true,
+ :method => 'get',
+ :onclick => "$('#reply#{topic.id}').slideToggle(); return false;",
+ :focus => "about_newtalk#{topic.id}",
+ :title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %>
@@ -169,8 +180,18 @@
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
+
:class => ' c_dblue fr'
) if message.course_destroyable_by?(User.current) %>
+ <%= link_to(
+ l(:button_quote),
+ {:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
+ :remote => true,
+ :method => 'get',
+ :focus => "about_newtalk#{topic.id}",
+ :class => ' c_dblue fr',
+ :style => 'margin-right: 10px;',
+ :title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %>
@@ -216,4 +237,34 @@
}
}
+
+
+
\ No newline at end of file
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index c111aeaf0..16f2998ce 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -51,11 +51,17 @@ var getParam = function(name){
function show_newtalk()
{
$("#about_newtalk").toggle();
+
+
+
}
function show_newtalk1(id)
{
$(id).toggle();
+
+
+
}
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index 5a5d625ed..481755410 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -161,10 +161,15 @@ function regexSubject(id) {
}
return false;
}
-function regexContent(id) {
- editor[id].sync();
+function regexContent(){
+}
+function regexContentxx(id) {
+
var contentid = "#message_content" + id;
var message = "#message_content_span"+ id;
+ var ps=document.getElementById('message_content' + id).previousElementSibling.children[1].children[0];
+ alert(ps);
+ document.getElementById('message_content' + id).value = ps.value;
var content = $.trim($(contentid).val());
alert(content);
if (content.length == 0) {
@@ -188,7 +193,7 @@ function submitProjectsBoard(id) {
if (regexSubject(id) && regexContent(id)) {
- $(formid).submit();
+ $(formid).submit();
}
}
// 提交新闻