修改bug<点击排序后内容类型自动变为全部,但又并未显示全部资源>

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-11-06 14:45:59 +08:00
parent 591fc409b3
commit 0aae731eef
3 changed files with 3 additions and 3 deletions

View File

@ -1359,7 +1359,7 @@ class Issue < ActiveRecord::Base
# Callback on file attachment
def attachment_added(obj)
if @current_journal && !obj.new_record?
if @current_journal && !obj.new_record? && @current_journal.journalized_id == obj.author_id
@current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :value => obj.filename)
end
end

View File

@ -52,7 +52,7 @@
<% if attachmenttypes.any? %>
&nbsp; &nbsp; &nbsp;
<label for="attachment_browse_label"><%= l(:attachment_browse) %></label>
<%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName"),
<%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName",params[:type]),
:onchange => "attachmenttypes_searchex(this.value)" %>
<% end %>
<% if sufixtypes.any? %>

View File

@ -14,7 +14,7 @@
<% if @auth_sources.present? && @auth_sources.any?(&:searchable?) %>
<%= javascript_tag do %>
observeAutocompleteField('user_login', '<%= escape_javascript autocomplete_for_new_user_auth_sources_path %>', {
('user_login', '<%= escape_javascript autocomplete_for_new_user_auth_sources_path %>', {
select: function(event, ui) {
$('input#user_firstname').val(ui.item.firstname);
$('input#user_lastname').val(ui.item.lastname);