Skip to content

Commit

Permalink
Fix widget admin layout for IE7. Props Denis-de-Bernardy. fixes #4264…
Browse files Browse the repository at this point in the history
… for 2.2

git-svn-id: https://develop.svn.wordpress.org/branches/2.2@5493 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ryanboren committed May 19, 2007
1 parent 0ac6c1e commit 344b0a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions wp-admin/widgets.css
Expand Up @@ -84,11 +84,11 @@ body {
}

.placematt {
position: absolute;
cursor: default;
margin: 10px 0 0;
padding: 0;
width: 238px;
float:left;
background-color: #ffe;
}

Expand All @@ -106,10 +106,11 @@ body {
text-align: justify;
}


#palettediv {
border: 1px solid #bbb;
background-color: #f0f8ff;
height: 180px;
height:auto;
margin-top: 10px;
}

Expand Down
12 changes: 9 additions & 3 deletions wp-admin/widgets.php
Expand Up @@ -15,6 +15,11 @@ function wp_widgets_admin_head() {
define( 'WP_WIDGETS_HEIGHT', 35 * ( count( $wp_registered_widgets ) ) );
?>
<link rel="stylesheet" href="widgets.css?version=<?php bloginfo('version'); ?>" type="text/css" />
<!--[if IE 7]>
<style type="text/css">
#palette {float:left;}
</style>
<![endif]-->
<style type="text/css">
.dropzone ul { height: <?php echo constant( 'WP_WIDGETS_HEIGHT' ); ?>px; }
#sbadmin #zones { width: <?php echo constant( 'WP_WIDGETS_WIDTH' ); ?>px; }
Expand Down Expand Up @@ -61,7 +66,8 @@ function initWidgets() {
new Effect.Opacity('shadow', {to:0.0});
widgets.map(function(o) {o='widgetprefix-'+o; Position.absolutize(o); Position.relativize(o);} );
$A(Draggables.drags).map(function(o) {o.startDrag(null); o.finishDrag(null);});
for ( var n in Draggables.drags ) {
//for ( var n in Draggables.drags ) {
for ( n=0; n<=Draggables.drags.length; n++ ) {
if ( Draggables.drags[n].element.id == 'lastmodule' ) {
Draggables.drags[n].destroy();
break;
Expand Down Expand Up @@ -145,7 +151,7 @@ function updateAll() {
var pm = $(o+'placematt');
if ( $(o).childNodes.length == 0 ) {
pm.style.display = 'block';
Position.absolutize(o+'placematt');
//Position.absolutize(o+'placematt');
} else {
pm.style.display = 'none';
}
Expand Down Expand Up @@ -302,7 +308,7 @@ function wp_widget_draggable( $name ) {
<div class="dropzone">
<h3><?php echo $sidebar['name']; ?></h3>

<div id="<?php echo $index; ?>placematt" class="module placematt">
<div id="<?php echo $index; ?>placematt" class="module placemat">
<span class="handle">
<h4><?php _e( 'Default Sidebar' ); ?></h4>
<?php _e( 'Your theme will display its usual sidebar when this box is empty. Dragging widgets into this box will replace the usual sidebar with your customized sidebar.' ); ?>
Expand Down

0 comments on commit 344b0a4

Please sign in to comment.