Projet

Général

Profil

Révision c304a780

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/includes/dropdown.theme.inc
44 44
/**
45 45
 * Create a dropdown menu.
46 46
 *
47
 * @param $title
48
 *   The text to place in the clickable area to activate the dropdown.
49
 * @param $links
50
 *   A list of links to provide within the dropdown, suitable for use
51
 *   in via Drupal's theme('links').
52
 * @param $image
53
 *   If true, the dropdown link is an image and will not get extra decorations
54
 *   that a text dropdown link will.
55
 * @param $class
56
 *   An optional class to add to the dropdown's container div to allow you
57
 *   to style a single dropdown however you like without interfering with
58
 *   other dropdowns.
47
 * @param array $variables
48
 *   An associative array containing:
49
 *   - title: The text to place in the clickable area to activate the dropdown.
50
 *   - links: A list of links to provide within the dropdown, suitable for use
51
 *     in via Drupal's theme('links').
52
 *   - image: If true, the dropdown link is an image and will not get extra
53
 *     decorations that a text dropdown link will.
54
 *   - class: An optional class to add to the dropdown's container div to allow
55
 *     you to style a single dropdown however you like without interfering with
56
 *     other dropdowns.
57
 *
58
 * @return string
59
 *   Returns HTML for a language configuration form.
59 60
 */
60 61
function theme_ctools_dropdown($vars) {
61 62
  // Provide a unique identifier for every dropdown on the page.
......
67 68
  ctools_add_js('dropdown');
68 69
  ctools_add_css('dropdown');
69 70

  
70
  $output = '';
71

  
72
  $output .= '<div class="' . $class . '" id="ctools-dropdown-' . $id . '">';
71
  $output = '<div class="' . $class . '" id="ctools-dropdown-' . $id . '">';
73 72
  $output .= '<div class="ctools-dropdown-link-wrapper">';
74 73
  if ($vars['image']) {
75 74
    $output .= '<a href="#" class="ctools-dropdown-link ctools-dropdown-image-link">' . $vars['title'] . '</a>';
......
77 76
  else {
78 77
    $output .= '<a href="#" class="ctools-dropdown-link ctools-dropdown-text-link">' . check_plain($vars['title']) . '</a>';
79 78
  }
80

  
81
  $output .= '</div>'; // wrapper
79
  $output .= '</div>';
82 80
  $output .= '<div class="ctools-dropdown-container-wrapper">';
83 81
  $output .= '<div class="ctools-dropdown-container">';
84 82
  $output .= theme_links(array('links' => $vars['links'], 'attributes' => array(), 'heading' => ''));
85
  $output .= '</div>'; // container
86
  $output .= '</div>'; // container wrapper
87
  $output .= '</div>'; // dropdown
83
  $output .= '</div>';
84
  $output .= '</div>';
85
  $output .= '</div>';
86

  
88 87
  return $output;
89 88
}
90

  

Formats disponibles : Unified diff