You are here

function jquerymobile_js_alter in jQuery Mobile module 7

Implementation of hook_js_alter() @todo some of these (user.js) in particular might want to be included user.js is dis-included because of unresolved issues between Drupal.settings and jQM

File

./jquerymobile.module, line 89
Provides the jQuery Mobile library to modules and themes that request it.

Code

function jquerymobile_js_alter(&$javascript) {
  if (jquerymobile_is_added()) {
    $suppress = array(
      'misc/autocomplete.js',
      'misc/textarea.js',
      'modules/filter/filter.js',
      'misc/collapse.js',
      'modules/user/user.js',
    );
    foreach ($javascript as $idx => $val) {
      if (in_array($idx, $suppress)) {
        unset($javascript[$idx]);
      }
    }
  }
}