You are here

function responsive_menus_simple_style_settings in Responsive Menus 7

Form callback from hook_responsive_menus_style_info().

Return value

array Drupal FAPI formatted array.

1 string reference to 'responsive_menus_simple_style_settings'
responsive_menus_responsive_menus_style_info in ./responsive_menus.module
Implements hook_responsive_menus_style_info().

File

./responsive_menus.module, line 484
Responsify menus in Drupal.

Code

function responsive_menus_simple_style_settings() {
  $form['responsive_menus_simple_absolute'] = array(
    '#type' => 'checkboxes',
    '#options' => array(
      1 => t('Use absolute positioning?'),
    ),
    '#default_value' => variable_get('responsive_menus_simple_absolute', array(
      1 => 1,
    )),
    '#description' => t('Using absolute, the menu will open over the page rather than pushing it down.'),
  );
  $form['responsive_menus_disable_mouse_events'] = array(
    '#type' => 'checkboxes',
    '#options' => array(
      1 => t('Disable other mouse events?'),
    ),
    '#default_value' => variable_get('responsive_menus_disable_mouse_events', array(
      1 => 0,
    )),
    '#description' => t('Disable things like drop-down menus on hover.'),
  );
  $form['responsive_menus_remove_attributes'] = array(
    '#type' => 'checkboxes',
    '#options' => array(
      1 => t('Remove other classes & IDs when responded?'),
    ),
    '#default_value' => variable_get('responsive_menus_remove_attributes', array(
      1 => 1,
    )),
    '#description' => t('Helps to ensure styling of menu.'),
  );
  $form['responsive_menus_css_selectors'] = array(
    '#type' => 'textarea',
    '#title' => t('Selectors for which menus to responsify'),
    '#default_value' => variable_get('responsive_menus_css_selectors', '#main-menu'),
    '#description' => t('Enter CSS/jQuery selectors of menus to responsify.  Comma separated or 1 per line'),
  );
  $form['responsive_menus_simple_text'] = array(
    '#type' => 'textarea',
    '#title' => t('Text or HTML for the menu toggle button'),
    '#default_value' => variable_get('responsive_menus_simple_text', '☰ Menu'),
  );
  $form['responsive_menus_media_size'] = array(
    '#type' => 'textfield',
    '#title' => t('Screen width to respond to'),
    '#size' => 5,
    '#default_value' => variable_get('responsive_menus_media_size', 768),
    '#description' => t('Width when we swap out responsive menu e.g. 768'),
  );
  $form['responsive_menus_media_unit'] = array(
    '#type' => 'select',
    '#title' => t('Width unit'),
    '#default_value' => variable_get('responsive_menus_media_unit', 'px'),
    '#options' => array(
      'px' => 'px',
      'em' => 'em',
    ),
    '#description' => t('Unit for the width above'),
  );
  return $form;
}