Merge pull request #1364 from opf/release/fix/7772_membership_duration_column_disappears_after_extending

[Release][Fix] 7772 membership duration column disappears after extending
pull/1248/merge
cratz 11 years ago
commit cf0e15d70f
  1. 19
      app/controllers/members_controller.rb
  2. 1
      features/step_definitions/role_steps.rb
  3. 1
      features/support/env.rb

@ -38,10 +38,11 @@ class MembersController < ApplicationController
search_for User, :search_in_project
search_options_for User, lambda { |_| {:project => @project} }
TAB_SCRIPTS = <<JS
hideOnLoad();
init_members_cb();
JS
@@scripts = ['hideOnLoad', 'init_members_cb']
def self.add_tab_script(script)
@@scripts << script
end
def create
if params[:member]
@ -60,7 +61,7 @@ JS
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page.insert_html :top, "tab-content-members", render_flash_messages
page << TAB_SCRIPTS
page << MembersController.tab_scripts
}
}
else
@ -94,7 +95,7 @@ JS
else
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
end
page << TAB_SCRIPTS
page << MembersController.tab_scripts
page.visual_effect(:highlight, "member-#{@member.id}") unless Member.find_by_id(@member.id).nil?
}
}
@ -111,7 +112,7 @@ JS
@pagination_url_options = {controller: 'projects', action: 'settings', id: @project}
render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << TAB_SCRIPTS
page << MembersController.tab_scripts
}
}
end
@ -150,6 +151,10 @@ JS
private
def self.tab_scripts
@@scripts.join('(); ') + '();'
end
def new_members_from_params
user_ids = possibly_seperated_ids_for_entity(params[:member], :user)
roles = Role.find_all_by_id(possibly_seperated_ids_for_entity(params[:member], :role))

@ -34,7 +34,6 @@ Given /^the [Uu]ser "([^\"]*)" is a "([^\"]*)" (?:in|of) the [Pp]roject "([^\"]*
as_admin do
Member.new.tap do |m|
m.user = u
m.privacy_unnecessary = true if plugin_loaded?("redmine_dtag_privacy")
m.roles << r
m.project = p
end.save!

@ -34,6 +34,7 @@
# files.
require 'cucumber/rails'
require 'cucumber/rspec/doubles'
require 'capybara-screenshot/cucumber'
# json-spec is used to specifiy our json-apis

Loading…
Cancel
Save