Widgets RTL CSS, and a few little widget bugfixes. Props Sewar. fixes #4185

git-svn-id: https://develop.svn.wordpress.org/trunk@5324 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-04-27 00:51:19 +00:00
parent d8062bbc62
commit 9b3becf6ea
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,6 @@ body {
} }
#sbadmin #zones { #sbadmin #zones {
width: <?php echo constant( 'WP_WIDGETS_WIDTH' ); ?>px;
-moz-user-select: none; -moz-user-select: none;
-khtml-user-select: none; -khtml-user-select: none;
user-select: none; user-select: none;
@ -30,7 +29,6 @@ body {
.dropzone ul { .dropzone ul {
list-style-type: none; list-style-type: none;
width: 240px; width: 240px;
height: <?php echo constant( 'WP_WIDGETS_HEIGHT' ); ?>px;
float: left; float: left;
margin: 0; margin: 0;
padding: 0; padding: 0;

View File

@ -14,10 +14,15 @@ function wp_widgets_admin_head() {
define( 'WP_WIDGETS_WIDTH', 1 + 262 * ( count( $wp_registered_sidebars ) ) ); define( 'WP_WIDGETS_WIDTH', 1 + 262 * ( count( $wp_registered_sidebars ) ) );
define( 'WP_WIDGETS_HEIGHT', 35 * ( count( $wp_registered_widgets ) ) ); define( 'WP_WIDGETS_HEIGHT', 35 * ( count( $wp_registered_widgets ) ) );
?> ?>
<link rel="stylesheet" href="widgets.css?version=<?php bloginfo('version'); ?>" type="text/css" />
<style type="text/css"> <style type="text/css">
<?php include dirname( __FILE__ ) . '/widgets.css'; ?> .dropzone ul { height: <?php echo constant( 'WP_WIDGETS_HEIGHT' ); ?>px; }
#sbadmin #zones { width: <?php echo constant( 'WP_WIDGETS_WIDTH' ); ?>px; }
</style> </style>
<?php if ( ('rtl' == get_bloginfo('text_direction')) ) : ?>
<link rel="stylesheet" href="widgets-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
<?php <?php
endif;
} }
add_action( 'admin_head', 'wp_widgets_admin_head' ); add_action( 'admin_head', 'wp_widgets_admin_head' );
@ -219,7 +224,7 @@ if ( isset( $_POST['action'] ) ) {
<div id="controls"> <div id="controls">
<?php foreach ( $wp_registered_widget_controls as $name => $widget ) { ?> <?php foreach ( $wp_registered_widget_controls as $name => $widget ) { ?>
<div class="hidden" id="<?php echo $widget['id']; ?>control"> <div class="hidden" id="<?php echo $widget['id']; ?>control">
<span class="controlhandle"><?php echo $name; ?></span> <span class="controlhandle"><?php echo $widget['name']; ?></span>
<span id="<?php echo $widget['id']; ?>closer" class="controlcloser">&#215;</span> <span id="<?php echo $widget['id']; ?>closer" class="controlcloser">&#215;</span>
<div class="controlform"> <div class="controlform">
<?php call_user_func_array( $widget['callback'], $widget['params'] ); ?> <?php call_user_func_array( $widget['callback'], $widget['params'] ); ?>