Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
sw 2015-04-17 14:22:19 +08:00
commit 3a8bfbf880
8 changed files with 24 additions and 8 deletions

View File

@ -116,7 +116,8 @@ class VersionsController < ApplicationController
end end
else else
respond_to do |format| respond_to do |format|
format.html { render :action => 'new' } format.html { flash[:error] = @version.errors.full_messages.to_s
redirect_to settings_project_url(@project, :tab => 'versions') }
format.js { render :action => 'new' } format.js { render :action => 'new' }
format.api { render_validation_errors(@version) } format.api { render_validation_errors(@version) }
end end

View File

@ -59,12 +59,14 @@
<% end %> <% end %>
</p> </p>
<% end %> <% end %>
<div class="thumbnails">
<% if defined?(thumbnails) && thumbnails %> <% if defined?(thumbnails) && thumbnails %>
<% images = attachments.select(&:thumbnailable?) %> <% images = attachments.select(&:thumbnailable?) %>
<% if images.any? %> <% if images.any? %>
<% images.each do |attachment| %> <% images.each do |attachment| %>
<div class="pro_pic fl " width="100" height="73"><%= thumbnail_issue_tag(attachment) %></div> <div class="pro_pic fl "><%= thumbnail_issue_tag(attachment) %></div>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
</div>

View File

@ -9,7 +9,8 @@
<%= f.select :status_id, <%= f.select :status_id,
(@allowed_statuses.collect { |p| [p.name, p.id] }), (@allowed_statuses.collect { |p| [p.name, p.id] }),
{:no_label => true}, {:no_label => true},
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", # ajax 刷新
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
:class => "w150" %> :class => "w150" %>
<% else %> <% else %>
<%= h(@issue.status.name) %> <%= h(@issue.status.name) %>

View File

@ -1,5 +1,5 @@
$('#all_attributes').html('<%= escape_javascript(render :partial => 'form') %>'); $('#all_attributes').html('<%= escape_javascript(render :partial => 'form') %>');
$(.splitcontent).style("display", "block") //$(.splitcontent).style("display", "block")
<% if User.current.allowed_to?(:log_time, @issue.project) %> <% if User.current.allowed_to?(:log_time, @issue.project) %>
$('#log_time').show(); $('#log_time').show();
<% else %> <% else %>

View File

@ -5,8 +5,10 @@
project_setting(2); project_setting(2);
<% elsif @select_tab == "versions"%> <% elsif @select_tab == "versions"%>
project_setting(4); project_setting(4);
$("#pro_st_edit_ban").toggle();
<% elsif @select_tab == "repositories" %> <% elsif @select_tab == "repositories" %>
project_setting(6); project_setting(6);
$("#pro_st_edit_ku").toggle();
<%else%> <%else%>
<% end%> <% end%>

View File

@ -11,10 +11,10 @@
<tr class="pro_table_tit"> <tr class="pro_table_tit">
<td class="w90"><%= l(:label_version) %></td> <td class="w90"><%= l(:label_version) %></td>
<td> <%= l(:field_effective_date) %></td> <td> <%= l(:field_effective_date) %></td>
<td class="w90"><%= l(:field_description) %> </td> <td class="w150"><%= l(:field_description) %> </td>
<td class=""><%= l(:field_status) %></td> <td class=""><%= l(:field_status) %></td>
<td class=""><%= l(:field_sharing) %></td> <td class=""><%= l(:field_sharing) %></td>
<td class=""><%= l(:label_wiki_page) %></td> <td class="w150"><%= l(:label_wiki_page) %></td>
<td class=""></td> <td class=""></td>
</tr> </tr>
<% for version in @project.shared_versions.sort %> <% for version in @project.shared_versions.sort %>
@ -58,7 +58,7 @@
<ul> <ul>
<li > <li >
<label class="label02"><span class="c_red">*</span><%=l(:field_name)%></label> <label class="label02"><span class="c_red">*</span><%=l(:field_name)%></label>
<%= f.text_field :name, :maxlength => 60, :required => true %> <%= f.text_field :name, :maxlength => 60 %>
</li> </li>
<li > <li >
<label class="label02"><%=l(:label_version_description)%></label> <label class="label02"><%=l(:label_version_description)%></label>

View File

@ -25,7 +25,7 @@
<% <%
# @rev is revsion or Git and Mercurial branch or tag. # @rev is revsion or Git and Mercurial branch or tag.
# For Mercurial *tip*, @rev and @changeset are nil. # For Mercurial *tip*, @rev and @changeset are nil.
rev_text = @changeset.nil? ? "master" : format_revision(@changeset) rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
%> %>
<p class="fl f14 fb c_grey02"><%= "@ #{h rev_text}" unless rev_text.blank? %></p> <p class="fl f14 fb c_grey02"><%= "@ #{h rev_text}" unless rev_text.blank? %></p>

View File

@ -534,3 +534,13 @@ p.other-formats { text-align: right; font-size:0.9em; color: #666; }
/*pre标签换行*/ /*pre标签换行*/
.break_word{word-break: break-all;word-wrap: break-word;} .break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap;word-break: break-all;} .break_word_firefox{white-space: pre-wrap;word-break: break-all;}
/*问题跟踪attachment显示*/
div.attachments { margin-top: 12px; }
div.attachments p { margin:4px 0 2px 0; }
div.attachments img { vertical-align: middle; }
div.attachments span.author { font-size: 0.9em; color: #888; }
div.thumbnails {margin-top:0.6em;}
div.thumbnails div {background:#fff;display:inline-block;margin-right:2px;}