diff --git modules/image/image.admin.css modules/image/image.admin.css index f5aa597..7875840 100644 --- modules/image/image.admin.css +++ modules/image/image.admin.css @@ -49,13 +49,52 @@ div.image-style-preview div.preview-image div.height span { /** * Image anchor element. */ -table.image-anchor { +.image-anchor table { width: auto; } -table.image-anchor tr.even, -table.image-anchor tr.odd { +.image-anchor table tr.even, +.image-anchor table tr.odd { background: none; } -table.image-anchor td { - border: 1px solid #CCC; +.image-anchor table tr, +.image-anchor table td { + border: 1px solid #ccc; +} +.image-crop-widget table { + height: 90px; + width: 90px; +} +.image-crop-widget td { + cursor: pointer; +} +.image-crop-widget input { + display: none; + visibility: hidden; +} +.image-crop-widget td.arrow-selected { + background: #ccc; +} +.image-crop-widget td.arrow-n { + background: url(images/cropping-arrows.png) no-repeat -60px 0; +} +.image-crop-widget td.arrow-ne { + background: url(images/cropping-arrows.png) no-repeat -90px 0; +} +.image-crop-widget td.arrow-e { + background: url(images/cropping-arrows.png) no-repeat -120px 0; +} +.image-crop-widget td.arrow-se { + background: url(images/cropping-arrows.png) no-repeat -150px 0; +} +.image-crop-widget td.arrow-s { + background: url(images/cropping-arrows.png) no-repeat -180px 0; +} +.image-crop-widget td.arrow-sw { + background: url(images/cropping-arrows.png) no-repeat -210px 0; +} +.image-crop-widget td.arrow-w { + background: url(images/cropping-arrows.png) no-repeat 0 0; +} +.image-crop-widget td.arrow-nw { + background: url(images/cropping-arrows.png) no-repeat -30px 0; } diff --git modules/image/image.admin.inc modules/image/image.admin.inc index 64b17d7..4d5f557 100644 --- modules/image/image.admin.inc +++ modules/image/image.admin.inc @@ -492,6 +492,8 @@ function image_scale_form($data) { * The current configuration for this crop effect. */ function image_crop_form($data) { + drupal_add_js(drupal_get_path('module', 'image') . '/image.js'); + $data += array( 'width' => '', 'height' => '', @@ -735,14 +737,14 @@ function theme_image_anchor($element) { foreach (element_children($element) as $n => $key) { $element[$key]['#attributes']['title'] = $element[$key]['#title']; unset($element[$key]['#title']); - $row[] = drupal_render($element[$key]); + $row[] = array('data' => drupal_render($element[$key]), 'class' => $key); if ($n % 3 == 3 - 1) { $rows[] = $row; $row = array(); } } - return theme('table', array(), $rows, array('class' => 'image-anchor')); + return '