You are here

function theme_imagefield_crop_preview in Imagefield Crop 7.2

Same name and namespace in other branches
  1. 7.3 theme/theme.inc \theme_imagefield_crop_preview()
  2. 7 imagefield_crop.theme.inc \theme_imagefield_crop_preview()
1 theme call to theme_imagefield_crop_preview()
imagefield_crop_widget_process in ./imagefield_crop.module
An element #process callback for the imagefield_crop field type.

File

./imagefield_crop.module, line 902
Functionality and Drupal hook implementations for the Imagefield Crop module.

Code

function theme_imagefield_crop_preview($variables) {
  $info = $variables['element']['#imagefield_crop'];
  $output = '<div class="jcrop-preview-wrapper" style="width:' . $info['#width'] . 'px;height:' . $info['#height'] . 'px;overflow:hidden;">';
  $output .= $variables['element']['#markup'];
  $output .= theme('image', array(
    'path' => $info['#path'],
    'alt' => 'jcrop-preview',
    'attributes' => array(
      'class' => 'jcrop-preview',
      'style' => 'display:none',
    ),
  ));
  $output .= '</div>';
  return $output;
}