You are here

function theme_asset_wizard_textarea_link in Asset 6

Same name and namespace in other branches
  1. 5.2 asset_wizard.module \theme_asset_wizard_textarea_link()

Theme the textarea link

3 theme calls to theme_asset_wizard_textarea_link()
asset_wizard_textarea in ./asset_wizard.module
The #process callback function for the textareas
theme_assetfield in ./asset_wizard.module
Format an assetfield.
theme_asset_wizard_textfield_preview in ./asset_wizard.module

File

./asset_wizard.module, line 259
Wizard-style interface for Asset.

Code

function theme_asset_wizard_textarea_link($element, $text = NULL) {
  $path = drupal_get_path('module', 'asset_wizard');

  // add thickbox stuff
  drupal_add_js($path . '/js/thickbox/jquery.thickbox.js');
  drupal_add_css($path . '/js/thickbox/thickbox.css');

  // provide an accurate loadingAnimation path
  drupal_add_js('tb_pathToImage = "' . base_path() . $path . '/js/thickbox/loadingAnimation.gif";', 'inline', 'footer');

  // jquery form plugin
  drupal_add_js($path . '/js/form/jquery.form.js');

  // asset wizard stuff
  drupal_add_css($path . '/asset_wizard.css');
  drupal_add_js($path . '/js/asset_wizard.js');
  asset_wizard_js_settings();
  if ($element['#asset_return_type']) {
    $params = 'return=' . $element['#asset_return_type'];
    $params .= '&config=' . ($element['#asset_config'] ? $element['#asset_config'] : 'macro');
  }
  $text = $text ? $text : t('Asset Wizard');
  $link = tbl($text, 'asset/wizard', array(
    'id' => 'asset-wizard-' . $element['#id'],
    'class' => 'asset-wizard-start',
    'title' => 'Asset Wizard',
  ), $params, NULL, FALSE, TRUE);
  return $link;
}