You are here

jquery_wrt.install in jQuery webks Responsive Table 7

Installation functions for jQuery webks responsive tables.

File

jquery_wrt.install
View source
<?php

/**
 * @file
 * Installation functions for jQuery webks responsive tables.
 */

/**
 * Implements hook_install().
 */
function jquery_wrt_install() {

  // Set general settings.
  variable_set('jquery_wrt_preserve_classes', TRUE);
  variable_set('jquery_wrt_dynamic', TRUE);
  variable_set('jquery_wrt_showswitch', TRUE);
  variable_set('jquery_wrt_subselector', ':not(.sticky-header):not(.field-multiple-table):not(:has(tr.draggable))');
  variable_set('jquery_wrt_header_selector', 'thead td, thead th');
  variable_set('jquery_wrt_row_selector', 'tbody tr');
  variable_set('jquery_wrt_responsive_row_element', '<dl></dl>');
  variable_set('jquery_wrt_row_responsive_column_title_element', '<dt></dt>');
  variable_set('jquery_wrt_row_responsive_column_value_element', '<dd></dd>');
  variable_set('jquery_wrt_update_on_resize', FALSE);
  variable_set('jquery_wrt_path_match_exclude', 'admin/*');
}

/**
 * Implements hook_uninstall().
 */
function jquery_wrt_uninstall() {

  // Remove the general settings.
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'jquery_wrt_%'");

  // Exclude variables here!!
  $exclude = array();
  while ($var_name = $result
    ->fetchAssoc()) {
    if (!in_array($var_name['name'], $exclude)) {
      variable_del($var_name['name']);
    }
  }
}

Functions

Namesort descending Description
jquery_wrt_install Implements hook_install().
jquery_wrt_uninstall Implements hook_uninstall().