- Fix dragging to the bottom of the screen.
- Fix hiding of the dragged widget when dragging over a closed sidebar.
- Fix the admin menu position and scrolling when all widget containers are folded.
Fixes #32094 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32480


git-svn-id: http://core.svn.wordpress.org/trunk@32450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-05-10 00:32:31 +00:00
parent 59fe6b2368
commit 999ae33a2e
9 changed files with 32 additions and 12 deletions

View File

@ -350,6 +350,10 @@ div#widgets-right .closed .widgets-sortables {
display: none; display: none;
} }
.js .widgets-holder-wrap.closed .widget.ui-sortable-helper {
display: block;
}
/* Hide Widget Settings by Default */ /* Hide Widget Settings by Default */
.widget-inside, .widget-inside,
.widget-description { .widget-description {
@ -506,6 +510,10 @@ div#widgets-right .widget-top:hover,
cursor: pointer; cursor: pointer;
} }
#available-widgets .widget.ui-draggable-dragging .widget-top {
cursor: move;
}
/* =Media Queries /* =Media Queries
-------------------------------------------------------------- */ -------------------------------------------------------------- */

View File

@ -350,6 +350,10 @@ div#widgets-right .closed .widgets-sortables {
display: none; display: none;
} }
.js .widgets-holder-wrap.closed .widget.ui-sortable-helper {
display: block;
}
/* Hide Widget Settings by Default */ /* Hide Widget Settings by Default */
.widget-inside, .widget-inside,
.widget-description { .widget-description {
@ -506,6 +510,10 @@ div#widgets-right .widget-top:hover,
cursor: pointer; cursor: pointer;
} }
#available-widgets .widget.ui-draggable-dragging .widget-top {
cursor: move;
}
/* =Media Queries /* =Media Queries
-------------------------------------------------------------- */ -------------------------------------------------------------- */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -860,7 +860,7 @@ $(document).ready( function() {
window.wpResponsive.init(); window.wpResponsive.init();
setPinMenu(); setPinMenu();
$document.on( 'wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu ); $document.on( 'wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu );
}); });
// Fire a custom jQuery event at the end of window resize // Fire a custom jQuery event at the end of window resize

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
/*global ajaxurl, isRtl */ /*global ajaxurl, isRtl */
var wpWidgets; var wpWidgets;
(function($) { (function($) {
var $document = $( document );
wpWidgets = { wpWidgets = {
@ -22,10 +23,13 @@ wpWidgets = {
} else { } else {
$wrap.addClass('closed'); $wrap.addClass('closed');
} }
$document.triggerHandler( 'wp-pin-menu' );
}); });
$('#widgets-left .sidebar-name').click( function() { $('#widgets-left .sidebar-name').click( function() {
$(this).closest('.widgets-holder-wrap').toggleClass('closed'); $(this).closest('.widgets-holder-wrap').toggleClass('closed');
$document.triggerHandler( 'wp-pin-menu' );
}); });
$(document.body).bind('click.widgets-toggle', function(e) { $(document.body).bind('click.widgets-toggle', function(e) {
@ -89,7 +93,7 @@ wpWidgets = {
distance: 2, distance: 2,
helper: 'clone', helper: 'clone',
zIndex: 100, zIndex: 100,
containment: 'document', containment: '#wpwrap',
start: function( event, ui ) { start: function( event, ui ) {
var chooser = $(this).find('.widgets-chooser'); var chooser = $(this).find('.widgets-chooser');
@ -119,7 +123,7 @@ wpWidgets = {
handle: '> .widget-top > .widget-title', handle: '> .widget-top > .widget-title',
cursor: 'move', cursor: 'move',
distance: 2, distance: 2,
containment: 'document', containment: '#wpwrap',
start: function( event, ui ) { start: function( event, ui ) {
var height, $this = $(this), var height, $this = $(this),
$wrap = $this.parent(), $wrap = $this.parent(),
@ -174,7 +178,7 @@ wpWidgets = {
wpWidgets.save( $widget, 0, 0, 1 ); wpWidgets.save( $widget, 0, 0, 1 );
$widget.find('input.add_new').val(''); $widget.find('input.add_new').val('');
$( document ).trigger( 'widget-added', [ $widget ] ); $document.trigger( 'widget-added', [ $widget ] );
} }
$sidebar = $widget.parent(); $sidebar = $widget.parent();
@ -381,7 +385,7 @@ wpWidgets = {
if ( r && r.length > 2 ) { if ( r && r.length > 2 ) {
$( 'div.widget-content', widget ).html( r ); $( 'div.widget-content', widget ).html( r );
wpWidgets.appendTitle( widget ); wpWidgets.appendTitle( widget );
$( document ).trigger( 'widget-updated', [ widget ] ); $document.trigger( 'widget-updated', [ widget ] );
} }
} }
if ( order ) { if ( order ) {
@ -446,7 +450,7 @@ wpWidgets = {
// No longer "new" widget // No longer "new" widget
widget.find( 'input.add_new' ).val(''); widget.find( 'input.add_new' ).val('');
$( document ).trigger( 'widget-added', [ widget ] ); $document.trigger( 'widget-added', [ widget ] );
/* /*
* Check if any part of the sidebar is visible in the viewport. If it is, don't scroll. * Check if any part of the sidebar is visible in the viewport. If it is, don't scroll.
@ -489,6 +493,6 @@ wpWidgets = {
} }
}; };
$(document).ready( function(){ wpWidgets.init(); } ); $document.ready( function(){ wpWidgets.init(); } );
})(jQuery); })(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-alpha-32479'; $wp_version = '4.3-alpha-32480';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.