diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index bf2d80e..c660eb9 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -201,7 +201,9 @@ module BoxesHelper # makes the given block draggable so it can be moved away. def block_handle(block) - modifiable?(block) ? block_draggable("block-#{block.id}") : "" + return "" unless modifiable?(block) + block_draggable("block-#{block.id}", + :helper => "function(){$(this).addClass('ui-draggable-dragging'); return '#{display_icon(block.class)}'}") end def block_draggable(element_id, options={}) @@ -212,7 +214,7 @@ module BoxesHelper :revertDuration => 200, :scroll => false, :start => "function() {$('#box-organizer').addClass('shadow')}", - :stop => "function() {$('#box-organizer').removeClass('shadow')}" + :stop => "function() {$('#box-organizer').removeClass('shadow'); $('.ui-draggable-dragging').removeClass('ui-draggable-dragging')}" }.merge(options) draggable_element(element_id, draggable_options) end diff --git a/public/stylesheets/block-store.css b/public/stylesheets/block-store.css index 52bd2c6..753b383 100644 --- a/public/stylesheets/block-store.css +++ b/public/stylesheets/block-store.css @@ -66,7 +66,7 @@ margin-right: auto; margin-left: auto; } -#block-store-draggables .block-type, #block-store-draggables .block { +#block-store-draggables .block-type, #block-store-draggables .block, #block-store-draggables .block-type-icon { display: inline-block; height: auto; z-index: 100; -- libgit2 0.21.2