Widgets: on clicking Add, don't move the chooser out of the widget early as that makes is visible at the bottom of the screen. Remove the cloned copy of it instead. Part-props jeremyfelt, fixes #26417.
Built from https://develop.svn.wordpress.org/trunk@26651 git-svn-id: http://core.svn.wordpress.org/trunk@26541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e59ee5e974
commit
b0a9fb217a
|
@ -407,14 +407,14 @@ wpWidgets = {
|
|||
sidebarId = chooser.find( '.widgets-chooser-selected' ).data('sidebarId'),
|
||||
sidebar = $( '#' + sidebarId );
|
||||
|
||||
// Move the chooser out of the widget
|
||||
$('#wpbody-content').append( chooser );
|
||||
|
||||
widget = $('#available-widgets').find('.widget-in-question').clone();
|
||||
widgetId = widget.attr('id');
|
||||
add = widget.find( 'input.add_new' ).val();
|
||||
n = widget.find( 'input.multi_number' ).val();
|
||||
|
||||
// Remove the cloned chooser from the widget
|
||||
widget.find('.widgets-chooser').remove();
|
||||
|
||||
if ( 'multi' === add ) {
|
||||
widget.html(
|
||||
widget.html().replace( /<[^<>]+>/g, function(m) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue