Hi
I have a data grid code (using ExtJs + php) that working fine outside drupal.
I want to integrate this code into drupal using custom module so I'll be able to use this data grid inside drupal.
I created the info, module and the install files, and put all the necessary files (js,css, php) for the grid inside the module folder.
The module is working fine with no errors but it not displays the data grid.
What I did wrong??
For crating the data grid I'm calling pages.inc file with this function:

<?php
function delagrid_user_page() {

  global
$base_url;
 
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ext/adapter/ext/ext-base.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ext/ext-all.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/paging/pPageSize.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/menu/EditableItem.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ext/ext-all-debug.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/RowExpander.js');
 
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/menu/RangeMenu.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/GridFilters.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/filter/Filter.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/filter/StringFilter.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/filter/DateFilter.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/filter/ListFilter.js');
 
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/filter/NumericFilter.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ux/grid/filter/BooleanFilter.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/grid-editor-mysql-php.js');
 
drupal_add_js(drupal_get_path('module', 'delagrid').'/ext/examples/examples.js');

   
$result .= '<h1>DelaGrid:</h1>';
   
$result .= '<link rel="stylesheet" type="text/css" href="http://localhost/mysite/sites/all/modules/delagrid/ext/resources/css/ext-all.css" />';
   
//<!-- GC -->
    //<!-- LIBS -->
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ext/adapter/ext/ext-base.js"></script>';
   
//<!-- ENDLIBS -->
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ext/ext-all-debug.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/RowExpander.js"></script>';
   
//<!-- Extensions - Paging Toolbar -->
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/paging/pPageSize.js"></script>';
   
//<!-- Extensions - Filtering -->
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/menu/EditableItem.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/menu/RangeMenu.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/GridFilters.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/filter/Filter.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/filter/StringFilter.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/filter/DateFilter.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/filter/ListFilter.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/filter/NumericFilter.js"></script>';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ux/grid/filter/BooleanFilter.js"></script>';
   
//<!-- Page Specific -->
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/grid-editor-mysql-php.js"></script>';
   
$result .= '<link rel="stylesheet" type="text/css" href="http://localhost/mysite/sites/all/modules/delagrid/grid-examples.css" />';
   
//<!-- Common Styles for the examples -->
   
$result .= '<link rel="stylesheet" type="text/css" href="http://localhost/mysite/sites/all/modules/delagrid/ext/examples/shared/examples.css" />';
   
$result .= '<link rel="stylesheet" type="text/css" href="http://localhost/mysite/sites/all/modules/delagrid/style.css" />';
   
$result .= '<script type="text/javascript" src="http://localhost/mysite/sites/all/modules/delagrid/ext/examples/examples.js"></script>';
   
//<!-- you must define the select box here, as the custom editor for the 'Light' column will require it -->
   
$result .= '<select name="riskName" id="riskID" style="display: none;">';
   
$result .= '<option value="low">Low</option>';
   
$result .= '<option value="medium">Medium</option>';
   
$result .= '<option value="high">High</option></select>';
   
//<!--when right clicking, the properties get rendered in here-->
   
$result .= '<div id="property-win" class="x-hidden"></div>';
   
//<!--the grid gets rendered in here-->
   
$result .= '<div id="grid-company"></div>';

      return
$result;
}
?>

Thanks

Comments

Is there anyone who

Is there anyone who successfully integrate any JS code within drupal?

Hi! I am looking help for an

Hi! I am looking help for an error I a receiving :

warning: file_get_contents(sites/all/libraries/extjs/adapter/adapter/ext/ext-base.js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/cyberfan/htdocs/includes/common.inc on line 2412.
warning: file_get_contents(sites/all/libraries/extjs/adapter/ext-all.js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/cyberfan/htdocs/includes/common.inc on line 2412.
warning: file_get_contents(sites/all/libraries/extjs/adapter/adapter/ext/ext-base.js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/cyberfan/htdocs/includes/common.inc on line 2412.
warning: file_get_contents(sites/all/libraries/extjs/adapter/ext-all.js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/cyberfan/htdocs/includes/common.inc on line 2412

the problem is I dont know what module is causing this or what uses ext-base.js

I was wondering if you had any idea? Thanks!

same problem. have you fix

same problem.
have you fix it?