[25094] Do not use css scoped attribute since its been removed

pull/6827/head
Oliver Günther 8 years ago
parent 8ab096225f
commit e1549e6643
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 26
      app/views/hooks/login/_providers.html.erb
  2. 3
      spec/views/hooks/login/_providers.html.erb_spec.rb

@ -40,19 +40,21 @@ See doc/COPYRIGHT.rdoc for more details.
end
%>
<a href="<%= url_for opts %>" class="auth-provider auth-provider-<%= pro[:name] %> button">
<style type="text/css" scoped="scoped">
<% if pro[:icon] %>
#content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>');
}
#top-menu #nav-login-content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>') ;
}
.modal-wrapper .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>') ;
}
<% if pro[:icon] %>
<%= content_for :header_tags do %>
<style type="text/css">
#content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>');
}
#top-menu #nav-login-content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>') ;
}
.modal-wrapper .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>') ;
}
</style>
<% end %>
</style>
<% end -%>
<span class="auth-provider-name"><%= pro[:display_name] || pro[:name] %></span>
</a>
<% end %>

@ -37,6 +37,7 @@ describe 'rendering the login buttons for all providers' do
]
end
before do
allow(OpenProject::Plugins::AuthPlugin).to receive(:providers).and_return(providers)
@ -52,6 +53,6 @@ describe 'rendering the login buttons for all providers' do
end
it 'should render a custom icon if defined' do
expect(rendered).to match /#{providers[2][:icon]}/
expect(view.content_for(:header_tags)).to match /#{providers[2][:icon]}/
end
end

Loading…
Cancel
Save