Don't double insert widget. Props mdawaffe. fixes #6191
git-svn-id: http://svn.automattic.com/wordpress/trunk@7267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0070e011a2
commit
4acb6b2a63
|
@ -104,8 +104,8 @@ jQuery(function($) {
|
|||
$('a.widget-control-remove', context).click( function() {
|
||||
var w = $(this).parents('li:first').find('input[@name^="widget-id"]').val();
|
||||
$(this).parents('li:first').remove();
|
||||
var t = $('#widget-list ul#widget-control-info-' + w + ' textarea');
|
||||
t.parent().html( t.text() ).parents('li.widget-list-item:first').children( 'h4' ).children('a.widget-action')
|
||||
var t = $('#widget-list ul#widget-control-info-' + w + ' textarea'); // will be empty for multi-widgets
|
||||
t.parents('.widget-control-info:first').html( t.text() ).parents('li.widget-list-item:first').children( 'h4' ).children('a.widget-action')
|
||||
.show().text( widgetsL10n.add ).unbind().click( addClick );
|
||||
var n = parseInt( $('#widget-count').text(), 10 ) - 1;
|
||||
$('#widget-count').text( n.toString() )
|
||||
|
|
Loading…
Reference in New Issue