Widget arrangement fix from azaozz. fixes #6876 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@7881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-04 02:05:18 +00:00
parent d9fd98601e
commit 7623315990
6 changed files with 23 additions and 29 deletions

View File

@ -38,13 +38,12 @@ li.widget-list-control-item h4.widget-title a, #dragHelper li.widget-list-contro
left:1em;
}
li.widget-list-control-item div.widget-control {
padding:0 0 0 10px;
}
ul.widget-control-list div.widget-control-actions {
margin-right:0;
margin-left:-10px;
}
ul.widget-control-list .widget-title {
ul.widget-control-list h4.widget-title,
#dragHelper h4.widget-title {
text-align: right;
padding: 0.4em 0.8em 0.4em 2.5em;
}

View File

@ -74,7 +74,6 @@ ul#widget-list li.widget-list-item div.widget-description {
font-size: 11px;
}
ul#widget-list li.widget-list-item ul.widget-control-info {
display: none;
}
@ -91,27 +90,26 @@ ul.widget-control-list {
padding: 0 1em;
}
ul.widget-control-list li {
position: relative;
}
div#current-widgets p.submit {
padding: 1em;
}
li.widget-list-control-item {
margin: 0 0 1em;
margin: 1em 0;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4, li.widget-sortable h4 {
li.widget-list-control-item h4,
#dragHelper li.widget-list-control-item h4,
li.widget-sortable h4 {
margin: 0;
padding: 0.4em 2.5em 0.4em 0.8em;
cursor: move;
font-size: 13px;
padding: 0.4em 2.5em 0.4em 0.8em;
position: relative;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
@ -143,16 +141,16 @@ li.widget-list-control-item h4.widget-title a,
}
li.widget-list-control-item h4.widget-title a:hover {
text-decoration: none;
border-bottom: none;
}
li.widget-list-control-item div.widget-control {
display: none;
margin: 1em;
padding: 0 10px 0 7px; /* Correction for padding, margin, border of inputs */
padding: 15px;
font-size: 11px;
position: relative;
background-color: #CFEBF7;
}
li.widget-list-control-item div.widget-control p {
@ -161,15 +159,9 @@ li.widget-list-control-item div.widget-control p {
}
ul.widget-control-list div.widget-control-actions {
margin-right: -10px; /* Correction for padding, margin, border of inputs */
margin-left: -6px;
border-top-width: 1px;
border-top-style: solid;
padding: 0.5em 0 0.8em;
}
ul.widget-control-list .widget-title {
padding: 0.5em 0 0;
}
.widget-control-edit {

View File

@ -227,6 +227,7 @@ function wp_widget_control( $sidebar_args ) {
if ( empty($sidebar_args['_display']) || 'template' != $sidebar_args['_display'] )
echo $sidebar_args['before_widget'];
?>
<div class="widget-top">
<h4 class="widget-title"><?php echo $widget_title ?>
<?php if ( $edit ) : ?>
@ -239,7 +240,7 @@ function wp_widget_control( $sidebar_args ) {
<?php endif; ?>
</h4>
</h4></div>
<div class="widget-control"<?php if ( $edit ) echo ' style="display: block;"'; ?>>

View File

@ -13,12 +13,12 @@ jQuery(function($) {
if ( t.is(':visible') ) {
if ( disableFields ) { t.find( ':input:enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); }
li.css( 'marginLeft', 0 );
t.siblings('h4').children('a').text( widgetsL10n.edit );
t.siblings('div').children('h4').children('a').text( widgetsL10n.edit );
} else {
t.find( ':disabled' ).attr( 'disabled', '' ); // always enable on open
if ( width > 250 )
li.css( 'marginLeft', ( width - 250 ) * -1 );
t.siblings('h4').children('a').text( widgetsL10n.cancel );
t.siblings('div').children('h4').children('a').text( widgetsL10n.cancel );
}
t.toggle();
} : function() {
@ -28,12 +28,12 @@ jQuery(function($) {
if ( disableFields ) { t.find( ':input: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 );
t.siblings('div').children('h4').children('a').text( widgetsL10n.edit );
} else {
t.find( ':disabled' ).attr( 'disabled', '' ); // always enable on open
if ( width > 250 )
li.animate( { marginLeft: ( width - 250 ) * -1 } );
t.siblings('h4').children('a').text( widgetsL10n.cancel );
t.siblings('div').children('h4').children('a').text( widgetsL10n.cancel );
}
t.animate( { height: 'toggle' } );
};

View File

@ -134,7 +134,9 @@ if ( isset($_GET['add']) && $_GET['add'] ) {
<ul class="widget-control-list">
<li class="widget-list-control-item">
<div class="widget-top">
<h4 class="widget-title"><?php echo $control['name']; ?></h4>
</div>
<div class="widget-control" style="display: block;">
<?php
call_user_func_array( $control_callback, $control['params'] );

View File

@ -187,7 +187,7 @@ class WP_Scripts {
'saveText' => attribute_escape(__('Save &raquo;')),
'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' ), '20080407c' );
$this->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20080503' );
$this->localize( 'admin-widgets', 'widgetsL10n', array(
'add' => __('Add'),
'edit' => __('Edit'),