You are here

function viewscarousel_style_plugin::options_form in Views carousel 6

Same name and namespace in other branches
  1. 6.2 viewscarousel_style_plugin.inc \viewscarousel_style_plugin::options_form()

File

./viewscarousel_style_plugin.inc, line 26
Provide the views carousel plugin object with default options and form.

Class

viewscarousel_style_plugin
Implementation of views_plugin_style().

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['skin'] = array(
    '#type' => 'select',
    '#title' => t('Skin'),
    '#default_value' => $this->options['skin'],
    '#options' => array(
      'ie7' => t('ie7'),
      'tango' => t('tango'),
      'custom' => t('custom'),
    ),
  );
  $form['vertical'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display carousel vertically. Default is horizontal.'),
    '#default_value' => $this->options['vertical'],
  );
  $form['start'] = array(
    '#type' => 'textfield',
    '#title' => t('First item to start on'),
    '#size' => 4,
    '#maxlength' => 4,
    '#default_value' => $this->options['start'],
  );
  $form['scroll'] = array(
    '#type' => 'textfield',
    '#title' => t('The number of items to scroll by'),
    '#size' => 4,
    '#maxlength' => 4,
    '#default_value' => $this->options['scroll'],
  );
  $form['visible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Visibility'),
    '#default_value' => $this->options['visible'],
    '#description' => t('If set, the width/height of the items will be calculated and set depending on the width/height of the clipping, so that exactly that number of items will be visible.'),
  );
  $form['animation'] = array(
    '#type' => 'textfield',
    '#title' => t('Speed of animation'),
    '#size' => 10,
    '#maxlength' => 10,
    '#default_value' => $this->options['animation'],
    '#description' => t('This value can be "fast", "slow", or a time in milliseconds. A value of 0 disables the animation.'),
  );
  $form['easing'] = array(
    '#type' => 'textfield',
    '#title' => t('Name of easing effect'),
    '#size' => 20,
    '#maxlength' => 20,
    '#default_value' => $this->options['easing'],
    '#description' => t('See list of options in the <a href="http://docs.jquery.com/effects/animate">jQuery Documentations</a>'),
  );
  $form['auto'] = array(
    '#type' => 'textfield',
    '#title' => t('Auto scrolling'),
    '#size' => 10,
    '#maxlength' => 10,
    '#default_value' => $this->options['auto'],
    '#description' => t('A value in seconds to specify how often to automatically scroll. Default of 0 disables this feature.'),
  );
  $form['auto_pause'] = array(
    '#type' => 'checkbox',
    '#title' => t('Auto Pause'),
    '#default_value' => $this->options['auto_pause'],
    '#description' => t('When auto scrolling is enabled selecting this will cause the carousel to pause when the user mouses over an item or stop when the user clicks an arrow to manually scroll.'),
  );
  $form['wrap'] = array(
    '#type' => 'select',
    '#title' => t('Wrap content'),
    '#default_value' => $this->options['wrap'],
    '#options' => array(
      0 => t('Disabled'),
      'first' => t('First'),
      'last' => t('Last'),
      'both' => t('Both'),
      'circular' => t('Circular'),
    ),
  );
}