Only in /Applications/MAMP/htdocs/lappnas/sites/all/modules/mobile_theme: mobile_theme.js
diff -crB mobile_theme/mobile_theme.module /Applications/MAMP/htdocs/lappnas/sites/all/modules/mobile_theme/mobile_theme.module
*** mobile_theme/mobile_theme.module	2011-07-16 22:20:58.000000000 +0200
--- /Applications/MAMP/htdocs/lappnas/sites/all/modules/mobile_theme/mobile_theme.module	2011-07-22 13:24:20.000000000 +0200
***************
*** 148,154 ****
  function mobile_theme_detect_mobiledevicedetect() {
    // Include mobile_device_detect.php so that we can use it.
    if (module_load_include('php', 'mobile_theme', 'mobile_device_detect') != FALSE) {
!     return mobile_device_detect();
    }
    else {
      // Display a warning if the detection method was not found.
--- 148,164 ----
  function mobile_theme_detect_mobiledevicedetect() {
    // Include mobile_device_detect.php so that we can use it.
    if (module_load_include('php', 'mobile_theme', 'mobile_device_detect') != FALSE) {
!     return mobile_device_detect(
!       (bool) variable_get('mobile_theme_iphone_mobiledevicedetect', 1), 
!       (bool) variable_get('mobile_theme_ipad_mobiledevicedetect', 1), 
!       (bool) variable_get('mobile_theme_android_mobiledevicedetect', 1), 
!       (bool) variable_get('mobile_theme_operamini_mobiledevicedetect', 1), 
!       (bool) variable_get('mobile_theme_blackberry_mobiledevicedetect', 1), 
!       (bool) variable_get('mobile_theme_palm_mobiledevicedetect', 1), 
!       (bool) variable_get('mobile_theme_windows_mobiledevicedetect', 1), 
!       false,
!       false
!     );
    }
    else {
      // Display a warning if the detection method was not found.
***************
*** 184,189 ****
--- 194,254 ----
        '#options' => module_invoke_all('mobile_theme_detection'),
        '#default_value' => variable_get('mobile_theme_detection', 'mobile_theme_detect_php'),
      );
+ 
+     // Add javascript file with jQuery that hide and show the settings-mobiledevicedetect div.
+     drupal_add_js('sites/all/modules/mobile_theme/mobile_theme.js');
+     // Create the fieldset for the Mobile Device Detect settings.
+     $form['mobile_theme']['mobiledevicedetect'] = array(
+       '#type' => 'fieldset',
+       '#prefix' => '<div id="settings-mobiledevicedetect">',
+       '#suffix' => '</div>',
+       '#title' => t('Settings for Mobile Device Detect'),
+       '#description' => t('Settings for Mobile Device Detect'),
+       //'#weight' => -4,
+     );
+     // iPhone/iPod Touch/iPad
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_iphone_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('iPhone/iPod Touch/iPad'),
+     '#default_value' => variable_get('mobile_theme_iphone_mobiledevicedetect', 1),
+     );
+     // iPad
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_ipad_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('iPad'),
+     '#default_value' => variable_get('mobile_theme_ipad_mobiledevicedetect', 1),
+     );
+     // Android
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_android_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('Android'),
+     '#default_value' => variable_get('mobile_theme_android_mobiledevicedetect', 1),
+     );
+     // Opera Mini
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_operamini_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('Opera Mini'),
+     '#default_value' => variable_get('mobile_theme_operamini_mobiledevicedetect', 1),
+     );
+     // Blackberry
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_blackberry_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('Blackberry'),
+     '#default_value' => variable_get('mobile_theme_blackberry_mobiledevicedetect', 1),
+     );
+     // Palm
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_palm_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('Palm'),
+     '#default_value' => variable_get('mobile_theme_palm_mobiledevicedetect', 1),
+     );
+     // Windows Mobile
+     $form['mobile_theme']['mobiledevicedetect']['mobile_theme_windows_mobiledevicedetect'] = array(
+     '#type' => 'checkbox',
+     '#title' => t('Windows Mobile'),
+     '#default_value' => variable_get('mobile_theme_windows_mobiledevicedetect', 1),
+     );
+ 
      // Select box for the theme to be used for mobile devices.
      $themes = array('default' => t('Default'));
      $options = list_themes();
***************
*** 214,217 ****
--- 279,304 ----
    if (isset($form_state['values']['mobile_theme_detection'])) {
      variable_set('mobile_theme_detection', $form_state['values']['mobile_theme_detection']);
    }
+ 
+   if (isset($form_state['values']['mobile_theme_iphone_mobiledevicedetect'])) {
+     variable_set('mobile_theme_iphone_mobiledevicedetect', $form_state['values']['mobile_theme_iphone_mobiledevicedetect']);
+   }
+   if (isset($form_state['values']['mobile_theme_ipad_mobiledevicedetect'])) {
+     variable_set('mobile_theme_ipad_mobiledevicedetect', $form_state['values']['mobile_theme_ipad_mobiledevicedetect']);
+   }
+   if (isset($form_state['values']['mobile_theme_android_mobiledevicedetect'])) {
+     variable_set('mobile_theme_android_mobiledevicedetect', $form_state['values']['mobile_theme_android_mobiledevicedetect']);
+   }
+   if (isset($form_state['values']['mobile_theme_operamini_mobiledevicedetect'])) {
+     variable_set('mobile_theme_operamini_mobiledevicedetect', $form_state['values']['mobile_theme_operamini_mobiledevicedetect']);
+   }
+   if (isset($form_state['values']['mobile_theme_blackberry_mobiledevicedetect'])) {
+     variable_set('mobile_theme_blackberry_mobiledevicedetect', $form_state['values']['mobile_theme_blackberry_mobiledevicedetect']);
+   }
+   if (isset($form_state['values']['mobile_theme_palm_mobiledevicedetect'])) {
+     variable_set('mobile_theme_palm_mobiledevicedetect', $form_state['values']['mobile_theme_palm_mobiledevicedetect']);
+   }
+   if (isset($form_state['values']['mobile_theme_windows_mobiledevicedetect'])) {
+     variable_set('mobile_theme_windows_mobiledevicedetect', $form_state['values']['mobile_theme_windows_mobiledevicedetect']);
+   }
  }
