Browse Source

Fixed bug in auto loading of fields

Stephen Ficklin 8 years ago
parent
commit
258c262bb9
3 changed files with 3 additions and 3 deletions
  1. 1 1
      tripal/includes/tripal.entity.inc
  2. 1 1
      tripal/theme/js/tripal.js
  3. 1 1
      tripal/tripal.module

+ 1 - 1
tripal/includes/tripal.entity.inc

@@ -272,7 +272,7 @@ function tripal_form_tripal_entity_form_alter(&$form, &$form_state, $form_id) {
  * Implements hook_entity_view.
  *
  * Here we want to overwite unattached fields with a div box that will be
- * recognized by JavaScript that will the use AJAX to load the field.
+ * recognized by JavaScript that will then use AJAX to load the field.
  *
  * The tripal_ajax_attach_field() function is called by an AJAX call to
  * retrieve the field.

+ 1 - 1
tripal/theme/js/tripal.js

@@ -4,7 +4,7 @@
   Drupal.behaviors.myModuleSecureLink = {
     attach: function (context, settings) {
 
-      $(".tripal-entity-unattached .field-items").replaceWith('Loading... <img src="/' + tripal_path + '/theme/images/ajax-loader.gif">');
+      $(".tripal-entity-unattached .field-items").replaceWith('Loading... <img src="' + tripal_path + '/theme/images/ajax-loader.gif">');
       $(".tripal-entity-unattached").each(function() {
         id = $(this).attr('id');
         $.ajax({

+ 1 - 1
tripal/tripal.module

@@ -56,7 +56,7 @@ function tripal_init() {
 
   // add some variables for all javasript to use for building URLs
   $clean_urls = variable_get('clean_url', 0);
-  $tripal_path = drupal_get_path('module', 'tripal');
+  $tripal_path = url(drupal_get_path('module', 'tripal'));
   drupal_add_js("
     var baseurl  = '$base_url';
     var isClean  =  $clean_urls;