Ver Fonte

Fixing bug javascript for determininig Drupal path

spficklin há 12 anos atrás
pai
commit
5e017e52c0
2 ficheiros alterados com 6 adições e 3 exclusões
  1. 5 2
      tripal_core/tripal_core.module
  2. 1 1
      tripal_views/tripal_views.views.inc

+ 5 - 2
tripal_core/tripal_core.module

@@ -23,7 +23,8 @@ require_once "api/tripal_core.api.inc";
  * @ingroup tripal_core
  */
 function tripal_core_init() {
-
+  global $base_url;
+  
   // the two lines below are necessary to ensure that the search_path
   // variable is always set.  In the case where a view needs to query the
   // chado schema when it is local to the Drupal database.  Otherwise the
@@ -33,7 +34,9 @@ function tripal_core_init() {
 //  $previous = tripal_db_set_active('chado');
 //  tripal_db_set_active($previous);
   tripal_db_set_chado_search_path('chado');
-
+  
+  // add the base url as a javascript variable
+  drupal_add_js("drupal_base_url = '$base_url';", 'inline', 'header');
 
   // create the 'tripal' controlled volcabulary in chado but only if it doesn't already exist, and
   // only if the chado database is present.

+ 1 - 1
tripal_views/tripal_views.views.inc

@@ -216,7 +216,7 @@ function tripal_views_views_pre_render(&$view) {
  */
 
 function tripal_views_views_data() {
-
+dpm("Hi");
   // Make sure all chado tables are integrated
   tripal_views_integrate_all_chado_tables();