diff --git a/app/views/boards/_edit.html.erb b/app/views/boards/_edit.html.erb index 0bb15b167..98008d33e 100644 --- a/app/views/boards/_edit.html.erb +++ b/app/views/boards/_edit.html.erb @@ -2,17 +2,17 @@ <% if topic.project %> <%#= board_breadcrumb(@message) %> -
+
diff --git a/app/views/boards/_form_project.html.erb b/app/views/boards/_form_project.html.erb index 4d38ca275..b219c466d 100644 --- a/app/views/boards/_form_project.html.erb +++ b/app/views/boards/_form_project.html.erb @@ -48,24 +48,10 @@
  • - <% unless replying %> <% end %> - <%= text_area :quote,:quote,:style => 'display:none' %> + <%= f.text_area :quote,:quote,:style => 'display:none' %>
    <% if replying%> diff --git a/app/views/boards/_project_new_topic.html.erb b/app/views/boards/_project_new_topic.html.erb index cab1bbb7b..611a58738 100644 --- a/app/views/boards/_project_new_topic.html.erb +++ b/app/views/boards/_project_new_topic.html.erb @@ -1,10 +1,10 @@ -<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> +<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form', :name=>'message-form'} do |f| %> <%= render :partial => 'form_project', :locals => {:f => f, :topic => @message} %>
  • <%= l(:button_cancel) %> - <%= l(:button_submit)%> + <%= l(:button_submit)%>
  • <% end %> \ No newline at end of file diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index db66b1a7e..9a10d123d 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -22,7 +22,7 @@
    -
    +
      <%= render :partial => 'project_new_topic' %>
    @@ -41,6 +41,7 @@

      <%= h(topic.subject) %>

    <% if topic.editable_by?(User.current) %> + <%= l(:button_edit) %> <% end %> @@ -81,7 +82,7 @@ <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %>
    - <%= 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') %>
    -
    @@ -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(); } } // 提交新闻