You are here

function theme_manualcrop_croptool_overlay in Manual Crop 7

Returns HTML for the overlay crop area of an image.

Parameters

$variables: An associative array containing:

  • "attributes": An array of attributes.
  • "image": An array of variables for the image theming function.

Return value

HTML for the overlay crop tool.

File

./manualcrop.module, line 604

Code

function theme_manualcrop_croptool_overlay($variables) {
  $output = '<div ' . drupal_attributes($variables['attributes']) . '>';
  $output .= '<div class="manualcrop-overlay-bg"></div>';
  $output .= '<div class="manualcrop-image-holder">';
  $output .= theme('image', $variables["image"]);
  $output .= '</div>';
  if ($variables['crop_info']) {
    $output .= '<div class="manualcrop-selection-info hidden">';
    $output .= '<div class="manualcrop-selection-label manualcrop-selection-xy">';
    $output .= '<div class="manualcrop-selection-label-content">';
    $output .= '<span class="manualcrop-selection-x">-</span> x <span class="manualcrop-selection-y">-</span>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '<div class="manualcrop-selection-label manualcrop-selection-width">';
    $output .= '<div class="manualcrop-selection-label-content">-</div>';
    $output .= '</div>';
    $output .= '<div class="manualcrop-selection-label manualcrop-selection-height">';
    $output .= '<div class="manualcrop-selection-label-content">-</div>';
    $output .= '</div>';
    $output .= '</div>';
  }
  if ($variables['instant_preview']) {
    $output .= '<div class="manualcrop-instantpreview"></div>';
  }
  $output .= '<div class="manualcrop-style-info">';
  $output .= t('Image style') . ': <span class="manualcrop-style-name">&nbsp;</span>';
  $output .= '</div>';
  $output .= '<div class="manualcrop-buttons">';
  $output .= '<a class="manualcrop-button manualcrop-cancel" href="javascript:void(0);" onmousedown="ManualCrop.closeCroptool(true);">' . t('Cancel') . '</a>';
  $output .= '<a class="manualcrop-button manualcrop-maximize" href="javascript:void(0);" onmousedown="ManualCrop.maximizeSelection();">' . t('Maximize selection') . '</a>';
  $output .= '<a class="manualcrop-button manualcrop-clear" href="javascript:void(0);" onmousedown="ManualCrop.clearSelection();">' . t('Remove selection') . '</a>';
  $output .= '<a class="manualcrop-button manualcrop-reset" href="javascript:void(0);" onmousedown="ManualCrop.resetSelection();">' . t('Revert selection') . '</a>';
  $output .= '<a class="manualcrop-button manualcrop-close" href="javascript:void(0);" onmousedown="ManualCrop.closeCroptool();">' . t('Save') . '</a>';
  $output .= '</div>';
  $output .= '</div>';
  return $output;
}