Skip to content

Commit

Permalink
Fixed 'X' button in corner of forms
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Dec 20, 2011
1 parent 18484d5 commit 523e075
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion app/assets/stylesheets/common.sass
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ $sidebar_width: 210px
margin: 0px
padding: 0px 10px 0px 10px
position: relative
.close
a.close
display: block
background: lightblue
border:
top: 1px gainsboro solid
Expand All @@ -204,6 +205,9 @@ $sidebar_width: 210px
text-align: center
top: 0px
width: 17px
&:hover
background: #1E4262
color: white

.buttonbar
border-top: 1px gray solid
Expand Down
8 changes: 3 additions & 5 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ def link_to_cancel(url, params = {})

#----------------------------------------------------------------------------
def link_to_close(url)
content_tag(:div,
link_to("x", url + "#{url.include?('?') ? '&' : '?'}cancel=true", :remote => true),
link_to("x", url + "#{url.include?('?') ? '&' : '?'}cancel=true",
:remote => true,
:class => "close",
:title => t(:close_form),
:onmouseover => "this.style.background='lightsalmon'",
:onmouseout => "this.style.background='lightblue'"
:title => t(:close_form)
)
end

Expand Down

0 comments on commit 523e075

Please sign in to comment.