tweaks to new component animations

This commit is contained in:
Tom Giannattasio
2012-10-10 15:45:04 -04:00
parent 564c138bf5
commit edc32e9db5
2 changed files with 9 additions and 4 deletions

View File

@@ -65,24 +65,26 @@ class CMS.Views.UnitEdit extends Backbone.View
showNewComponentForm: (event) =>
event.preventDefault()
@$newComponentItem.addClass('adding')
$(event.target).slideUp(150)
$(event.target).fadeOut(150)
@$newComponentItem.css('height', @$newComponentTypePicker.outerHeight())
@$newComponentTypePicker.slideDown(250)
showComponentTemplates: (event) =>
event.preventDefault()
type = $(event.currentTarget).data('type')
@$newComponentTypePicker.slideUp(250)
@$(".new-component-#{type}").slideDown(250)
@$newComponentTypePicker.fadeOut(250)
@$(".new-component-#{type}").fadeIn(250)
closeNewComponent: (event) =>
event.preventDefault()
@$newComponentTypePicker.slideUp(250)
@$newComponentTemplatePickers.slideUp(250)
@$newComponentButton.slideDown(250)
@$newComponentButton.fadeIn(250)
@$newComponentItem.removeClass('adding')
@$newComponentItem.find('.rendered-component').remove()
@$newComponentItem.css('height', @$newComponentButton.outerHeight())
saveNewComponent: (event) =>
event.preventDefault()

View File

@@ -209,7 +209,10 @@
.new-component,
.new-component-templates {
display: none;
position: absolute;
width: 100%;
padding: 20px;
@include clearfix;
.cancel-button {
@include blue-button;