You are here

jscrollpane.module in JScrollPane 6.2

Same filename and directory in other branches
  1. 5 jscrollpane.module
  2. 7 jscrollpane.module

JavaScript based scrollable containers

File

jscrollpane.module
View source
<?php

/**
 * @file
 * JavaScript based scrollable containers
 */

/**
 * Implementation of hook_menu().
 */
function jscrollpane_menu() {
  $items['admin/settings/jscrollpane'] = array(
    'title' => 'jScrollPane',
    'description' => 'Administration settings for the jScollPane module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'jscrollpane_settings_form',
    ),
    'access arguments' => array(
      'administer jscrollpane',
    ),
    'file' => 'includes/jscrollpane.admin.inc',
  );
  return $items;
}

/**
 * Implementation of hook_perm().
 */
function jscrollpane_perm() {
  return array(
    'administer jscrollpane',
  );
}

/**
 * Implementation of hook_init().
 */
function jscrollpane_init() {
  static $include;
  if (!$include) {
    global $base_url;
    $path = $base_url . '/' . drupal_get_path('module', 'jscrollpane');
    drupal_add_js(array(
      'jScrollPane' => array(
        'class' => variable_get('jscrollpane_class', '.scroll-pane'),
      ),
    ), 'setting');
    drupal_add_css($path . '/css/jquery.jscrollpane.css');
    drupal_add_js($path . '/js/jquery.jscrollpane.min.js');
    drupal_add_js($path . '/js/jquery.mousewheel.js');
    drupal_add_js($path . '/js/script.js');
  }
}

Functions

Namesort descending Description
jscrollpane_init Implementation of hook_init().
jscrollpane_menu Implementation of hook_menu().
jscrollpane_perm Implementation of hook_perm().