From fcd2146c11aa94d6418cafa137937ffc41001649 Mon Sep 17 00:00:00 2001 From: did Date: Fri, 25 Nov 2011 12:31:18 +0100 Subject: [PATCH] foldable fieldsets fixed on firefox --- .../views/shared/form_view.js.coffee | 1 - .../locomotive/formtastic_changes.scss | 23 +++++++------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee b/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee index c9ae65ed..fdef3adb 100644 --- a/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +++ b/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee @@ -34,7 +34,6 @@ class Locomotive.Views.Shared.FormView extends Backbone.View make_inputs_foldable: -> self = @ - @$('.formtastic fieldset.foldable legend span').append ' ' @$('.formtastic fieldset.foldable.folded ol').hide() @$('.formtastic fieldset.foldable legend').click -> parent = $(@).parent() diff --git a/app/assets/stylesheets/locomotive/formtastic_changes.scss b/app/assets/stylesheets/locomotive/formtastic_changes.scss index bfeddb52..bd3f68fe 100644 --- a/app/assets/stylesheets/locomotive/formtastic_changes.scss +++ b/app/assets/stylesheets/locomotive/formtastic_changes.scss @@ -28,25 +28,21 @@ form.formtastic { span { padding-left: 20px; + line-height: 20px; + font-size: 13px; font-weight: bold; @include single-text-shadow(#fff, 1px, 1px, 1px); } - - em { - display: inline-block; - width: 9px; - height: 6px; - position: relative; - top: 0px; - left: 10px; - background: transparent image-url("locomotive/form/folded-arrow-on.png") no-repeat 0 0px; - } } // legend &.foldable { - span { + legend span { cursor: pointer; + + padding-right: 15px; + + background: transparent image-url("locomotive/form/folded-arrow-on.png") no-repeat right center; } &.folded legend { @@ -54,10 +50,7 @@ form.formtastic { @include box-shadow(rgba(0, 0, 0, 0.4) 0px 1px 0px 0px); border-bottom-width: 1px; - span em { - width: 6px; - height: 9px; - top: 0px; + span { background-image: image-url("locomotive/form/folded-arrow-off.png"); } }