? .DS_Store
? .git
? auto_local_installation.patch
? classes/.DS_Store
? css/.DS_Store
? themes/FancyTheme
Index: timeline.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/timeline/timeline.admin.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 timeline.admin.inc
--- timeline.admin.inc	25 Jul 2009 01:36:49 -0000	1.1.2.2
+++ timeline.admin.inc	28 Jul 2009 21:17:34 -0000
@@ -78,6 +78,32 @@ function timeline_admin_settings() {
     '#maxlength'     => 6,
     '#description'   => t('Never enable on a live site! The debug mode prints out an array of the data given to the timeline library when navigating to a views.'),
   );
-  
+  $form['#submit'][] = 'timeline_admin_settings_submit';
   return system_settings_form($form);
 }
+
+/** 
+ * Form submit function.
+ * Create a file with the variables of the local position of the SIMILE Ajax library.
+ * To be able to include them in drupal 6 before the timeline is getting included.
+ * This functions shouldn't be necessary for drupal 7.
+ */
+function timeline_admin_settings_submit(&$form, $form_state) {
+  if(variable_get('timeline_library_source', 'hosted') == 'local') {
+
+    $timeline_lib_path = base_path() . libraries_get_path('simile_timeline');
+   
+    // Create the js/ within the files folder.
+    $jspath = file_create_path('timeline');
+    file_check_directory($jspath, FILE_CREATE_DIRECTORY);
+
+    // Build aggregate JS file.
+    $contents = "var Timeline_ajax_url = '". $timeline_lib_path ."/timeline_ajax/simile-ajax-api.js'; ";
+    $contents .= "var Timeline_urlPrefix= '". $timeline_lib_path ."/timeline_js/';";
+
+    // Create the JS file.
+    file_save_data($contents, $jspath .'/local_variables.js', FILE_EXISTS_REPLACE);
+    return TRUE;
+  }
+  return FALSE;
+}
\ No newline at end of file
Index: timeline.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/timeline/timeline.theme.inc,v
retrieving revision 1.13.2.1.2.5
diff -u -p -r1.13.2.1.2.5 timeline.theme.inc
--- timeline.theme.inc	25 Jul 2009 01:36:49 -0000	1.13.2.1.2.5
+++ timeline.theme.inc	28 Jul 2009 21:17:34 -0000
@@ -43,14 +43,14 @@ function _timeline_include($timeline_the
   }
   elseif (variable_get('timeline_library_source', 'hosted') == 'local' && $message = timeline_validate_library()) {
     $timeline_lib_path = libraries_get_path('simile_timeline');
-    drupal_add_js($timeline_mod_path . '/js/local.js');
+    drupal_add_js(file_directory_path().'/timeline/local_variables.js');
     drupal_add_js($timeline_lib_path . '/timeline_js/timeline-api.js');
   }
   else {
     drupal_set_message(t('Simile Timeline Libraries not found'), 'error');
     return FALSE;
   }
-  
+
   drupal_add_css($timeline_mod_path . '/css/timeline.css');
 
   // include custom theme files (if activated)
