diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index a5823ede3..2643c93e7 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -1,6 +1,6 @@ <%#= watcher_link_issue(@issue, User.current) %> -<%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %> +<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'talk_edit fr' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> <%= link_to l(:button_edit), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %> <%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %> diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 27ac07d64..41fca87eb 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -53,13 +53,13 @@ <%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> <%#= content_tag 'span', :id => "issue_description_and_toolbar" do %> - <%= f.kindeditor :description,:editor_id => "issue_desc_editor", - # :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), - # :accesskey => accesskey(:edit), - # :class => "w583", - :width=>'87%', - :resizeType => 0, - :no_label => true %> + <%= f.kindeditor :description,:editor_id => "issue_desc_editor", + # :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), + # :accesskey => accesskey(:edit), + # :class => "w583", + :width=>'87%', + :resizeType => 0, + :no_label => true %> <%# end %> <%#= wikitoolbar_for 'issue_description' %> <% end %> diff --git a/app/views/news/_project_form.html.erb b/app/views/news/_project_form.html.erb index 37f11d3f0..33613e5a7 100644 --- a/app/views/news/_project_form.html.erb +++ b/app/views/news/_project_form.html.erb @@ -1,26 +1,35 @@ -
  • +<%= javascript_include_tag "/assets/kindeditor/kindeditor" %> +
  • - +

  • -
  • - - -

    +
  • + <% if is_new %> + <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> + + <%= f.kindeditor :description,:width=>'91%',:editor_id=>'project_news_description_editor' %> +

    + <% else %> + + <%= f.kindeditor :description,:width=>'91%', :editor_id=>'project_news_description_editor', :owner_id => @news.id, :owner_type => OwnerTypeHelper::NEWS %> +

    + <% end %> +
  • -
  • - +
  • + <%= render :partial => 'attachments/new_form', :locals => {:container => @news} %>
  • -
  • +
  • <% if is_new %> - <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %> + <%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %> <%= link_to l(:button_cancel), project_news_index_path(@project), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %> <% else %> - <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %> - <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'blue_btn grey_btn fl c_white' %> + <%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %> + <%= link_to l(:button_cancel), news_path(@news), :class => 'blue_btn grey_btn fl c_white' %> <% end %>
  • diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 75b51ab6c..7b6a16e38 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -29,7 +29,7 @@ <%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= l(:label_add_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
    -

    <%= news.description %>

    +

    <%=textAreailizable news.description %>

    <%= l(:label_create_time) %> :<%= format_time(news.created_on) %> diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index 9d598f0b5..f95192d64 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -82,8 +82,9 @@ :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %> <%= delete_link news_path(@news),:class => 'talk_edit fr' if User.current.allowed_to?(:manage_news, @project) %>
    -
    <%= textAreailizable(@news, :description) %>
    <%= l(:label_create_time) %> : <%= format_time(@news.created_on) %>
    - <%= link_to_attachments_course @news %> +
    <%= textAreailizable(@news, :description) %>
    + <%= link_to_attachments_course @news %>
    + <%= l(:label_create_time) %> : <%= format_time(@news.created_on) %>
    diff --git a/public/javascripts/project.js b/public/javascripts/project.js index f9f88703d..e30c08b43 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -212,6 +212,7 @@ function regexTitle() { } function regexDescription() { + project_news_description_editor.sync(); var name = $("#news_description").val(); if (name.length == 0) { $("#description_notice_span").text("描述不能为空"); diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index d6bef6524..5a6d98fbe 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -330,6 +330,7 @@ a:hover.st_add{ color:#ff8e15;} .hwork_new{ color:#4c4c4c;} .c_red{ color:#F00;} .hwork_input{ border:1px solid #64bdd9; height:22px; width:555px; background:#fff; margin-bottom:10px; padding:5px;} +.hwork_input_news{ border:1px solid #64bdd9; height:22px; width:594px; background:#fff; margin-bottom:10px; padding:5px;} .hwork_input02{ border:1px solid #64bdd9; height:15px; width:120px; background:#fff; margin-bottom:10px; padding:5px;} .hwork_text{ border:1px solid #64bdd9; height:100px;width:555px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} .hwork_new ul li{ }