Skip to content
Snippets Groups Projects
Select Git revision
  • 2d50722f14cd524f7be73feb7eeb326fd969bfb4
  • 7.x-2.x default
  • 7.x-1.x
  • 6.x-1.x
  • 7.x-1.3
  • 7.x-2.4
  • 7.x-2.3
  • 7.x-2.2
  • 7.x-2.1
  • 7.x-2.0
  • 7.x-1.2
  • 6.x-1.1
  • 6.x-1.x-dev
  • 7.x-1.1
  • 6.x-1.0
  • 7.x-1.0
16 results

jquery_loadinganimation.install

Blame
  • Julian Pustkuchen's avatar
    Issue #1779250 by austintnacious,Anybody: Solved AJAX Forms, Issue #1827016 by...
    Julian Pustkuchen authored
    Issue #1779250 by austintnacious,Anybody: Solved AJAX Forms, Issue #1827016 by Anybody: Solved minor bugs in administration.
    3d6f11f6
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    jquery_loadinganimation.install 997 B
    <?php
    
    /**
     * @file
     * Installation functions for JQuery Loadinganimation.
     */
    
    /**
     * Implements hook_install().
     */
    function jquery_loadinganimation_install() {
      // Set general settings.
      variable_set('jquery_loadinganimation_show_on_ajax', FALSE);
      variable_set('jquery_loadinganimation_show_on_href', TRUE);
      variable_set('jquery_loadinganimation_show_on_form_submit', TRUE);
      variable_set('jquery_loadinganimation_close_on_click', TRUE);
      variable_set('jquery_loadinganimation_close_on_esc', TRUE);
      variable_set('jquery_loadinganimation_subselector', '');
    }
    
    /**
     * Implements hook_uninstall().
     */
    function jquery_loadinganimation_uninstall() {
      // Remove the general settings.
      $result = db_query(
        "SELECT name FROM {variable} WHERE name LIKE 'jquery_loadinganimation_%'");
      
      // Exclude variables here!!
      $exclude = array();
      while ($var_name = $result->fetchAssoc()) {
        if (! in_array($var_name['name'], $exclude)) {
          variable_del($var_name['name']);
        }
      }
    }