You are here

function ajax_links_api_admin in Ajaxify Drupal with JQuery Ajax 6

Same name and namespace in other branches
  1. 7 ajax_links_api.module \ajax_links_api_admin()

Callback function for admin setting.

1 string reference to 'ajax_links_api_admin'
ajax_links_api_menu in ./ajax_links_api.module
Implements hook_menu().

File

./ajax_links_api.module, line 54
Make any links or create new links to load content to particular DIV via jQuery Ajax.

Code

function ajax_links_api_admin() {
  $form['ajax_links_api_trigger'] = array(
    '#type' => 'textarea',
    '#title' => t('Classes/IDs to trigger ajax (One per line)'),
    '#default_value' => variable_get('ajax_links_api_trigger', '.ajax-link' . "\n"),
    '#description' => t('Specify the class/ID of links to ajaxify that link, one per line. For example by providing ".ajax-link" will ajaxify any link with class="ajax-link"'),
  );
  $form['ajax_links_api_selector'] = array(
    '#type' => 'textfield',
    '#title' => t('Default Target DIV'),
    '#default_value' => variable_get('ajax_links_api_selector', '#content'),
    '#description' => t('This can be override for indivdual link by providing rel. Check Demo.'),
  );
  $form['ajax_links_api_html5'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable URL and Title change (for HTML5 Only)'),
    '#default_value' => variable_get('ajax_links_api_html5', 1),
    '#description' => t('Change URL and Title according to ajax content. This will work only for HTML5 supported browsers. Tested on latest Chrome,Firefox.'),
  );
  $form['ajax_links_api_vpager'] = array(
    '#type' => 'checkbox',
    '#title' => t('Remove ?ajax=1 from Views pager'),
    '#default_value' => variable_get('ajax_links_api_vpager', 1),
    '#description' => t('Remove ?ajax=1 from Views pager. Check check http://drupal.org/node/1907376 for details.'),
  );
  return system_settings_form($form);
}