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

View File

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

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @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.