diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml index ee7237162..54ae7adcd 100644 --- a/app/views/photos/_new_photo.haml +++ b/app/views/photos/_new_photo.haml @@ -52,17 +52,18 @@ "" ); $('#publisher').find("input[type='submit']").removeAttr('disabled'); - $('.circle').live('click', function(){ + $('.x').live('mousedown', function(){ var photo = $(this).closest('li'); - + photo.addClass("dim"); $.ajax({url: "photos/" + photo.children('img').attr('data-id'), type: 'DELETE', success: function() { photo.fadeOut(400, function(){ - photo.remove() + photo.remove(); }); + alert( $('#photodropzone').children().index('img') ); if ( $('#photodropzone').children().index('li') == -1){ - alert("last one") + alert("last one"); $("#publisher textarea").removeClass("with_attachments"); } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 3ccfea713..b9a48e753 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -908,13 +908,14 @@ label :z-index 3 :position absolute :bottom 0 + :left 5px li .circle :display none :z-index 1 :position absolute :right -7px - :top -46px + :top -47px :background :color #333 @@ -937,10 +938,10 @@ label :display none :z-index 2 :position absolute - :top -48px - :right -5px + :top -45px + :right -1px :font - :size xx-small + :size small :weight bold &:hover