diff --git a/wp-admin/image-uploading.php b/wp-admin/image-uploading.php index 47c79ad21..4c8e30dee 100644 --- a/wp-admin/image-uploading.php +++ b/wp-admin/image-uploading.php @@ -5,7 +5,7 @@ require_once('admin.php'); if (!current_user_can('edit_posts')) die('You do not have permission to edit posts.'); -$wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr'); +$wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'object'); for ($i=0; $i 0 ) { $back = false; } +$i = 0; $uwidth_sum = 0; $images_html = ''; +$images_style = ''; if ( count($images) > 0 ) { $images = array_slice( $images, 0, $num ); foreach ( $images as $key => $image ) { $image = array_merge($image, get_post_meta($image['ID'], 'imagedata', true) ); list($image['uwidth'], $image['uheight']) = get_udims($image['width'], $image['height']); - $uwidth_sum += $image['uwidth']; - $images_html .= "
{$image[
\n"; + $uwidth_sum += 128; //$image['uwidth']; + $xpadding = (128 - $image['uwidth']) / 2; + $ypadding = (96 - $image['uheight']) / 2; + $object = $image['ID']; + $images_style .= "#target$i img { padding: {$ypadding}px {$xpadding}px; }\n"; + $images_html .= << + + + {$image[ + + +HERE; + $i++; } } -$images_width = $uwidth_sum + ( count($images) * 5 ) + 15; +$images_width = $uwidth_sum + ( count($images) * 5 ) + 30; break; @@ -221,6 +246,18 @@ o.method = 'GET'; o.action.value = 'view'; o.submit(); } +function imagePopup(i) { +if ( popup ) +popup.style.display = 'none'; +target = document.getElementById('target'+i); +popup = document.getElementById('popup'+i); +//popup.style.top = (target.offsetTop + 3) + 'px'; +popup.style.left = (target.offsetLeft) + 'px'; +popup.style.display = 'block'; +} +function init() { +popup = false; +} - +