Skip to content

Commit

Permalink
fixing wrong class name bug, refactoring ids to classes where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
steffen.jurrack committed Sep 14, 2012
1 parent 2e4a8c1 commit 2be63d4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/views/banner/_after_top_menu.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= render :partial=>'banner/body_bottom'
:javascript
document.observe("dom:loaded", function() {
new Insertion.After($('top-menu'), $('banner_area'));
new Insertion.After($('header'), $('.banner_area'));
});
2 changes: 1 addition & 1 deletion app/views/banner/_before_main_menu.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= render :partial=>'banner/project_body_bottom'
:javascript
document.observe("dom:loaded", function() {
new Insertion.Before($('main-menu'), $('project_banner_area'));
new Insertion.Before($('main-menu'), $('.project_banner_area'));
});
6 changes: 3 additions & 3 deletions app/views/banner/_body_bottom.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#banner_area.banner_area
#banner_content{:class=>"banner.banner_#{Setting.plugin_redmine_banner['type']}"}
.banner_area
.banner_content{:class=>"banner banner_#{Setting.plugin_redmine_banner['type']}"}
= textilizable Setting.plugin_redmine_banner['banner_description']
-if User.current.admin? && (params[:controller] != 'settings' && params[:action] != 'settings' && params[:id] != 'redmine_banner')
#banner_edit
.banner_edit
= link_to l(:button_edit), {:controller => 'settings', :action => 'plugin', :id => 'redmine_banner'},
{:class => 'icon banner-icon-edit', :title => l(:button_edit)}
%a.icon.banner-icon-off{:href=>"#", :onclick=>"", :title=>"#{l(:banner_off)}"}= l(:button_off)
Expand Down
6 changes: 3 additions & 3 deletions app/views/banner/_project_body_bottom.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
-display_part = banner.display_part
-return '' unless BannerHelper.is_action_to_display?(@_controller, display_part)

#project_banner_area.banner_area
#banner_content{:class=>"banner banner_#{banner.style}"}
.project_banner_area.banner_area
.banner_content{:class=>"banner banner_#{banner.style}"}
=textilizable banner.banner_description

-if authorize_for(:banner, :edit)
#banner_edit
.banner_edit
= link_to(l(:button_edit),
{:controller => 'projects', :action => "settings", :id => @project, :tab => 'banner'},
{:class => 'icon banner-icon-edit', :title => l(:button_edit)})
Expand Down
2 changes: 1 addition & 1 deletion app/views/banner/_show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-@banner = Banner.find_or_create(@project.id)
= labelled_form_for :settings, @banner, :url => {:controller => 'banner', :action => 'edit', :project_id => @project, :tab => 'banner', :setting_id => @banner.id}, :html => {:id => 'banner' } do |f|
= error_messages_for 'banner'
#box
.box
%p= f.check_box :enabled, :label => l(:button_activate)
%p
= content_tag(:label, l(:label_message_type))
Expand Down
12 changes: 6 additions & 6 deletions assets/stylesheets/banner.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ span.use_timer {
padding-right: 20px;
}

div#banner_area {
div.banner_area {
position:relative;
}

div#project_banner_area {
div.project_banner_area {
position:relative;
}

div#banner_area div#banner_edit {
div.banner_area div.banner_edit {
display:block;
position:absolute;
bottom:5px;
Expand All @@ -109,7 +109,7 @@ div#banner_area div#banner_edit {
opacity: 0.3;
}

div#banner_area div#banner_edit:hover {
div.banner_area div.banner_edit:hover {
filter: alpha(opacity=80);
-moz-opacity: 0.8;
opacity: 0.8;
Expand All @@ -122,7 +122,7 @@ div#banner_area div#banner_edit:hover {
background-image: url(../images/edit.png);
}

div#project_banner_area div#banner_edit {
div.project_banner_area div.banner_edit {
display:block;
position:absolute;
bottom:5px;
Expand All @@ -135,7 +135,7 @@ div#project_banner_area div#banner_edit {
opacity: 0.3;
}

div#project_banner_area div#banner_edit:hover {
div.project_banner_area div.banner_edit:hover {
filter: alpha(opacity=80);
-moz-opacity: 0.8;
opacity: 0.8;
Expand Down

0 comments on commit 2be63d4

Please sign in to comment.