You are here

function jquery_ajax_load_admin in jQuery AJAX Load 7

Callback function for admin setting.

1 string reference to 'jquery_ajax_load_admin'
jquery_ajax_load_menu in ./jquery_ajax_load.module
Implementation of hook_menu().

File

./jquery_ajax_load.module, line 66
Basic Module file.

Code

function jquery_ajax_load_admin() {

  // This module will not work if used in overlay paths such as
  // admin/* , node/add etc if user has overlay access.
  if (user_access('access overlay')) {
    $message = t("Overlay module is not compatible with jQuery Ajax Load links API module.");
    drupal_set_message($message, 'warning', FALSE);
  }
  $form['jquery_ajax_load_trigger'] = array(
    '#type' => 'textarea',
    '#title' => t('Valid jQuery Classes/IDs to trigger TB Modal via Ajax (One per line)'),
    '#default_value' => variable_get('jquery_ajax_load_trigger', '.jquery_ajax_load' . "\n"),
    '#description' => t('Specify the class/ID of links to convert that link to AJAX, one per line. For example by providing ".jquery_ajax_load" will convert any link with class="jquery_ajax_load"'),
  );
  $form['jquery_ajax_load_target'] = array(
    '#type' => 'textfield',
    '#title' => t('A valid jQuery ID where AJAX callback will be rendered'),
    '#default_value' => variable_get('jquery_ajax_load_target', '#jquery_ajax_load_target'),
    '#size' => 60,
    '#maxlength' => 128,
  );
  $form['jquery_ajax_load_toggle'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check if you want link to act as toggle buttom'),
    '#default_value' => variable_get('jquery_ajax_load_toggle', TRUE),
    '#description' => t('If toggle is activated, content on target will desappear when link is clicked twice.'),
  );
  $form['jquery_ajax_load_animation'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check if you want link to use jQuery show and hide effects'),
    '#default_value' => variable_get('jquery_ajax_load_animation', TRUE),
    '#description' => t('If animation is activated, content on target will show and desappear using jQuery show and hide standard effects.'),
  );
  $form['jquery_ajax_load_css'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check if you want to load css files'),
    '#default_value' => variable_get('jquery_ajax_load_css', FALSE),
    '#description' => t('If CSS loading is enabled AJAX will call CSS files and loaded with content. This affects performance.'),
  );
  $form['jquery_ajax_load_js'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check if you want to load js files'),
    '#default_value' => variable_get('jquery_ajax_load_js', FALSE),
    '#description' => t('If JS loading is enabled AJAX will call JS files and loaded with content. This affects performance.'),
  );
  return system_settings_form($form);
}