表单长度对齐

This commit is contained in:
lizanle 2015-12-16 10:19:48 +08:00
parent 47a9be132a
commit 02a9f08fe6
5 changed files with 36 additions and 27 deletions

View File

@ -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) }

View File

@ -28,7 +28,7 @@
<li>
<% if @issue.safe_attribute? 'subject' %>
<label class="label"><span class="c_red f12">*</span>&nbsp;主题&nbsp;&nbsp;:&nbsp;</label>
<%= 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 %>
<!--Added by young-->
<%= 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 %>

View File

@ -1,27 +1,35 @@
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
<script type="text/javascript">
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
});
</script>
<div class="homepageRight mt0 ml10" >
<div class="homepageRightBanner">
<div class="NewsBannerName">新建问题</div>
</div>
<div class="resources mt10" style="min-height:619px;">
<%= 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] %>
<div>
<%= render :partial => 'issues/form', :locals => {:f => f} %>
</div>
<!--<%= javascript_tag "$('#issue_subject').focus();" %>-->
<a href="#" class="blue_btn fl ml80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
<%= l(:button_create) %>
</a>
<%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %>
<% end %>
<div id="preview" class="wiki"></div>
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
<h2 class="project_h2"><%= l(:label_issue_new) %></h2>
</div>
<%= 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] %>
<div>
<%= render :partial => 'issues/form', :locals => {:f => f} %>
<% content_for :header_tags do %>
<%= robot_exclusion_tag %>
<% end %>
</div>
<!--<%= javascript_tag "$('#issue_subject').focus();" %>-->
<a href="#" class="blue_btn fl ml80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
<%= l(:button_create) %>
</a>
<%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %>
<% end %>
<div id="preview" class="wiki"></div>
<% content_for :header_tags do %>
<%= robot_exclusion_tag %>
<% end %>
</div>

View File

@ -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,

View File

@ -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;}