You are here

jquery_ui_multiselect_widget.install in jQuery UI MultiSelect Widget 7

Installation functions for jQuery UI MultiSelect Widget.

File

jquery_ui_multiselect_widget.install
View source
<?php

/**
 * @file
 * Installation functions for jQuery UI MultiSelect Widget.
 */

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

  // Set general settings.
  variable_set('jquery_ui_multiselect_widget_multiple', FALSE);
  variable_set('jquery_ui_multiselect_widget_filter', FALSE);
  variable_set('jquery_ui_multiselect_widget_subselector', '');
  variable_set('jquery_ui_multiselect_widget_selectedlist', 4);
  variable_set('jquery_ui_multiselect_widget_multiple', TRUE);
  variable_set('jquery_ui_multiselect_widget_autoOpen', FALSE);
  variable_set('jquery_ui_multiselect_widget_header', TRUE);
  variable_set('jquery_ui_multiselect_widget_height', 175);
  variable_set('jquery_ui_multiselect_widget_classes', '');
  variable_set('jquery_ui_multiselect_widget_filter_width', 100);
  variable_set('jquery_ui_multiselect_widget_filter_auto_reset', FALSE);
  variable_set('jquery_ui_multiselect_widget_path_match_exclude', "admin/*\nmedia/*\nfile/*\nsystem/ajax");
}

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

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

  // Exclude variables here!!
  $exclude = array();
  while ($var_name = $result
    ->fetchAssoc()) {
    if (!in_array($var_name['name'], $exclude)) {
      variable_del($var_name['name']);
    }
  }
}
function jquery_ui_multiselect_widget_update_7017() {
  drupal_set_message("jQuery Ui Multiselect Widget Library has been decoupled from the module! Please see the README.txt + Status information page and extract the 'jquery-ui-multiselect-widget' library folder to 'sites/all/libraries/jquery-ui-multiselect-widget'.", 'warning');
}