You are here

function views_quicksand_style_plugin::options_form in Views Quicksand 7

Provide a form to edit options for this plugin.

Overrides views_plugin_style::options_form

File

./views_quicksand_style_plugin.inc, line 38
Provide an accordion style plugin for Views. This file is autoloaded by views.

Class

views_quicksand_style_plugin
Implementation of views_plugin_style().

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $heightOptions = array(
    'auto' => t('Auto'),
    'dynamic' => t('Dynamic'),
    'false' => t('False'),
  );
  $form['adjustHeight'] = array(
    '#type' => 'select',
    '#title' => t('Adjust height'),
    '#default_value' => $this->options['adjustHeight'],
    '#description' => t("Adjusts the height of container to fit all the " . "items, 'auto' for automatically adjusting before or after " . "the animation (determined automatically), 'dynamic' for " . "height adjustment animation, false for keeping the height " . "constant."),
    '#options' => $heightOptions,
  );
  $form['element'] = array(
    '#type' => 'textfield',
    '#title' => t('ID Element'),
    '#default_value' => $this->options['element'],
    '#description' => t('Specify which element contains the attribute that identifies your ' . 'distinct elements. This is any valid jquery selector whose search ' . 'will be scoped inside your view.'),
  );
  $form['attribute'] = array(
    '#type' => 'textfield',
    '#title' => t('ID attribute'),
    '#default_value' => $this->options['attribute'],
    '#description' => t('Attribute used to match items in collections. ' . 'This can be the id or class attribute or even a custom ' . 'attribute like data-id, which you would have to integrate ' . 'manually into your view results.'),
  );
  $form['duration'] = array(
    '#type' => 'textfield',
    '#title' => t('Duration'),
    '#default_value' => $this->options['duration'],
    '#description' => t('How long the animation will take. In milliseconds..'),
  );
  $form['easing'] = array(
    '#type' => 'hidden',
    '#default_value' => $this->options['easing'],
  );
  $form['easing_select'] = array(
    '#type' => 'select',
    '#title' => t('Easing animation'),
    '#description' => t("Select the animation to use for transitions.") . t("For examples how these easings will behave, have a look at !link", array(
      '!link' => l('jQuery UI easing', 'http://jqueryui.com/demos/effect/#easing'),
    )),
    '#attached' => array(
      'js' => array(
        drupal_get_path('module', 'views_quicksand') . '/views_quicksand_settings.js',
      ),
    ),
  );
  $form['css'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use default css'),
    '#default_value' => $this->options['css'],
    '#description' => t("By default Views Quicksand defines a few styles to" . " make your view results look like a grid. You can disable " . "this behaviour here."),
  );
}