From 26eff23f342245164878909c64f5e239db55d1be Mon Sep 17 00:00:00 2001 From: markjaquith Date: Thu, 20 Mar 2008 04:39:23 +0000 Subject: [PATCH] Multi-widgets should never be removed if you click cancel. props mdawaffe. fixes #6291 git-svn-id: http://svn.automattic.com/wordpress/trunk@7411 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/widgets.js | 4 ++-- wp-includes/script-loader.php | 2 +- wp-includes/widgets.php | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-admin/js/widgets.js b/wp-admin/js/widgets.js index 6bf7f2c899..2802f9b15e 100644 --- a/wp-admin/js/widgets.js +++ b/wp-admin/js/widgets.js @@ -11,7 +11,7 @@ jQuery(function($) { var widgetAnim = $.browser.msie ? function() { var t = $(this); if ( t.is(':visible') ) { - if ( disableFields ) { t.find( ':enabled' ).not( '[name="widget-id[]"]' ).attr( 'disabled', 'disabled' ); } + if ( disableFields ) { t.find( ':enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); } li.css( 'marginLeft', 0 ); t.siblings('h4').children('a').text( widgetsL10n.edit ); } else { @@ -25,7 +25,7 @@ jQuery(function($) { var t = $(this); if ( t.is(':visible') ) { - if ( disableFields ) { t.find( ':enabled' ).not( '[name="widget-id[]"]' ).attr( 'disabled', 'disabled' ); } + if ( disableFields ) { t.find( ':enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); } if ( width > 250 ) li.animate( { marginLeft: 0 } ); t.siblings('h4').children('a').text( widgetsL10n.edit ); diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index b34a4f5707..5f9a2af2cf 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -183,7 +183,7 @@ class WP_Scripts { 'saveText' => attribute_escape(__('Save »')), 'confirmText' => __("Are you sure you want to delete the file '%title%'?\nClick ok to delete or cancel to go back.") ) ); - $this->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20080313' ); + $this->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20080319' ); $this->localize( 'admin-widgets', 'widgetsL10n', array( 'add' => __('Add'), 'edit' => __('Edit'), diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 92c048b205..ed50c31739 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -638,7 +638,7 @@ function wp_widget_text_control($widget_args) {

- +

- +

- +

- +