You are here

function theme_imagefield_crop_preview in Imagefield Crop 7

Same name and namespace in other branches
  1. 7.3 theme/theme.inc \theme_imagefield_crop_preview()
  2. 7.2 imagefield_crop.module \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.theme.inc, line 44
Themeable functions for imagefield_crop module.

Code

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