mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
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
This commit is contained in:
parent
3092ae5e3c
commit
26eff23f34
@ -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 );
|
||||
|
@ -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'),
|
||||
|
@ -638,7 +638,7 @@ function wp_widget_text_control($widget_args) {
|
||||
<p>
|
||||
<input class="widefat" id="text-title-<?php echo $number; ?>" name="widget-text[<?php echo $number; ?>][title]" type="text" value="<?php echo $title; ?>" />
|
||||
<textarea class="widefat" rows="16" cols="20" id="text-text-<?php echo $number; ?>" name="widget-text[<?php echo $number; ?>][text]"><?php echo $text; ?></textarea>
|
||||
<input type="hidden" id="text-submit-<?php echo $number; ?>" name="text-submit-<?php echo $number; ?>" value="1" />
|
||||
<input type="hidden" name="widget-text[<?php echo $number; ?>][submit]" value="1" />
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
@ -798,7 +798,7 @@ function wp_widget_categories_control( $widget_args ) {
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<input type="hidden" id="categories-submit-<?php echo $number; ?>" name="categories-submit-<?php echo $number; ?>" value="1" />
|
||||
<input type="hidden" name="widget-categories[<?php echo $number; ?>][submit]" value="1" />
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -1254,7 +1254,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
|
||||
<?php _e('Display item date?'); ?>
|
||||
</label>
|
||||
</p>
|
||||
<input type="hidden" id="rss-submit-<?php echo $number; ?>" name="rss-submit-<?php echo $number; ?>" value="1" />
|
||||
<input type="hidden" name="widget-rss[<?php echo $number; ?>][submit]" value="1" />
|
||||
<?php
|
||||
endif;
|
||||
foreach ( array_keys($default_inputs) as $input ) :
|
||||
@ -1483,7 +1483,7 @@ function widget_many_control( $widget_args = 1 ) {
|
||||
?>
|
||||
<p>
|
||||
<input class="widefat" id="widget-many-something-<?php echo $number; ?>" name="widget-many[<?php echo $number; ?>][something]" type="text" value="<?php echo $data; ?>" />
|
||||
<input type="hidden" id="widget-many-submit-<?php echo $number; ?>" name="widget-many-<?php echo $number; ?>" value="1" />
|
||||
<input type="hidden" id="widget-many-submit-<?php echo $number; ?>" name="widget-many[<?php echo $number; ?>][submit]" value="1" />
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user