Make WordPress Core

Ticket #25952: 25952.patch

File 25952.patch, 860 bytes (added by shaunandrews, 10 years ago)
  • src/wp-admin/js/widgets.js

     
    178178                        }
    179179                });
    180180
     181                // Open the sidebar (the sortable container) when dragging a widget over its title
     182                $('#widgets-right .widgets-holder-wrap .sidebar-name').droppable({
     183                        accept: '.widget',
     184                        tolerance: 'touch',
     185                        over: function() {
     186                                var $this = $(this), parent = $this.parent();
     187
     188                                if ( parent.hasClass('closed') ) {
     189                                        parent.removeClass('closed');
     190                                        $this.siblings('.widgets-sortables').sortable('refresh');
     191                                }
     192                        },
     193                        drop: function() {
     194                                return false;
     195                        }
     196                });
     197
    181198                // Area Chooser
    182199                $( '#widgets-right .widgets-holder-wrap' ).each( function( index, element ) {
    183200                        var $element = $( element ),