WordPress.org

Make WordPress Core

Changeset 7267


Ignore:
Timestamp:
03/12/08 19:56:08 (6 years ago)
Author:
ryan
Message:

Don't double insert widget. Props mdawaffe. fixes #6191

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/widgets.js

    r7176 r7267  
    105105            var w = $(this).parents('li:first').find('input[@name^="widget-id"]').val(); 
    106106            $(this).parents('li:first').remove(); 
    107             var t = $('#widget-list ul#widget-control-info-' + w + ' textarea'); 
    108             t.parent().html( t.text() ).parents('li.widget-list-item:first').children( 'h4' ).children('a.widget-action') 
     107            var t = $('#widget-list ul#widget-control-info-' + w + ' textarea'); // will be empty for multi-widgets 
     108            t.parents('.widget-control-info:first').html( t.text() ).parents('li.widget-list-item:first').children( 'h4' ).children('a.widget-action') 
    109109                .show().text( widgetsL10n.add ).unbind().click( addClick ); 
    110110            var n = parseInt( $('#widget-count').text(), 10 ) - 1; 
Note: See TracChangeset for help on using the changeset viewer.