Merge pull request #351 from willcosgrove/spinny-toggle-buttons

Spinny toggle buttons
This commit is contained in:
Didier Lafforgue 2012-04-13 06:40:07 -07:00
commit 9dc3f778a4
4 changed files with 6 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -78,8 +78,10 @@ class Locomotive.Views.ContentTypes.CustomFieldEntryView extends Backbone.View
form = @$('ol')
if form.is(':hidden')
@$('a.toggle').addClass('open')
form.slideDown()
else
@$('a.toggle').removeClass('open')
form.slideUp()
show_error: (message) ->

View File

@ -157,6 +157,10 @@ form.formtastic {
&:hover {
background-image: image-url("locomotive/list/icons/toggle.png");
}
&.open {
@include rotate(180deg);
}
@include single-transition(transform, 0.5s);
}
&.drag {