From 02a9f08fe606a2b5d4b6a8b53af7f3711430fb27 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 16 Dec 2015 10:19:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=95=BF=E5=BA=A6=E5=AF=B9?= =?UTF-8?q?=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 2 +- app/views/issues/_form.html.erb | 4 +-- app/views/issues/new.html.erb | 52 ++++++++++++++++------------ app/views/issues/update.js.erb | 2 +- public/stylesheets/public.css | 3 +- 5 files changed, 36 insertions(+), 27 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 9bb602178..1eb39fb32 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -254,7 +254,7 @@ class IssuesController < ApplicationController if reply_id > 0 JournalReply.add_reply(@issue.current_journal.id, reply_id, User.current.id) end - flash[:notice] = l(:notice_successful_update) unless @issue.current_journal.new_record? + #flash[:notice] = l(:notice_successful_update) unless @issue.current_journal.new_record? 去掉这个notice,因为现在更新都是ajax操作 respond_to do |format| format.js format.html { redirect_to issue_url(@issue.id) } diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 886ac805a..b96b700d5 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -28,7 +28,7 @@
  • <% if @issue.safe_attribute? 'subject' %> - <%= f.text_field :subject, :class => "w576", :maxlength => 255, :style => "font-size:small", :no_label => true %> + <%= f.text_field :subject, :class => "w606", :maxlength => 255, :style => "font-size:small", :no_label => true %> <%= javascript_tag do %> observeAutocompleteField('issue_subject', @@ -49,7 +49,7 @@ <%= 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", :width=>'87%', :resizeType => 0, :no_label => true %> + <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :resizeType => 0, :no_label => true %> <%# end %> <%#= wikitoolbar_for 'issue_description' %> <% end %> diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 9c6ad647c..0e068929d 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -1,27 +1,35 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> <% end %> + +
    +
    +
    新建问题
    +
    +
    + <%= call_hook(:view_issues_new_top, {:issue => @issue}) %> + <%= labelled_form_for @issue, :url => project_issues_path(@project), + :html => {:id => 'issue-form', :multipart => true} do |f| %> + <%= error_messages_for 'issue' %> + <%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %> +
    + <%= render :partial => 'issues/form', :locals => {:f => f} %> +
    + + + <%= l(:button_create) %> + + <%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %> + <% end %> +
    - -
    -

    <%= l(:label_issue_new) %>

    -
    -<%= call_hook(:view_issues_new_top, {:issue => @issue}) %> -<%= labelled_form_for @issue, :url => project_issues_path(@project), - :html => {:id => 'issue-form', :multipart => true} do |f| %> - <%= error_messages_for 'issue' %> - <%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %> -
    - <%= render :partial => 'issues/form', :locals => {:f => f} %> + <% content_for :header_tags do %> + <%= robot_exclusion_tag %> + <% end %>
    - - - <%= l(:button_create) %> - - <%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %> -<% end %> -
    - -<% content_for :header_tags do %> - <%= robot_exclusion_tag %> -<% end %> +
    \ No newline at end of file diff --git a/app/views/issues/update.js.erb b/app/views/issues/update.js.erb index d5f213455..8ff6e5245 100644 --- a/app/views/issues/update.js.erb +++ b/app/views/issues/update.js.erb @@ -6,7 +6,7 @@ $("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => $(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)') //edit里的编辑器貌似显示不出来,所以手动js生成。 issue_desc_editor = KindEditor.create('#issue_description', - {"width":"87%", + {"width":"85%", "resizeType":0, "no_label":true, "autoHeightMode":true, diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 6c8b71785..003cf90df 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -146,7 +146,8 @@ h4{ font-size:14px; color:#3b3b3b;} .w583{ width:583px;} .w350{ width:350px;} .w610{ width:610px;} -.w600{ width:600px !important;} +.w60{ width:600px !important;} +.w606{ width:606px } .h20{height: 20px;} .h22{ height:22px;} .h26{ height:26px;}