Project

General

Profile

« Previous | Next » 

Revision 5ea8b301

Added by Andreas Kohlbecker over 10 years ago

implementing a java-script development mode

View differences:

7.x/modules/cdm_dataportal/cdm_api/cdm_api.module
2148 2148
 */
2149 2149
function _add_js_ws_debug() {
2150 2150

  
2151
  drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/DataTables-1.9.4/media/js/jquery.dataTables.min.js',
2151
  $data_tables_js = '/js/DataTables-1.9.4/media/js/jquery.dataTables.min.js';
2152
  $colorbox_js = '/js/colorbox/jquery.colorbox-min.js';
2153
  if (variable_get('cdm_js_devel_mode', FALSE)) {
2154
    // use the developer versions of js libs
2155
    $data_tables_js = '/js/DataTables-1.9.4/media/js/jquery.dataTables.js';
2156
    $colorbox_js = '/js/colorbox/jquery.colorbox.js';
2157
  }
2158
  drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . $data_tables_js,
2152 2159
    array(
2153 2160
      'type' => 'file',
2154 2161
      'weight' => JS_LIBRARY,
2155 2162
      'cache' => TRUE)
2156 2163
    );
2157 2164

  
2158
  drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/colorbox/jquery.colorbox-min.js',
2165
  drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . $colorbox_js,
2159 2166
    array(
2160 2167
      'type' => 'file',
2161 2168
      'weight' => JS_LIBRARY,

Also available in: Unified diff