You are here

function _gallery_assist_lb_includes in Gallery Assist 6

Include gallery_assist .js files if not loaded.

File

./gallery_assist.module, line 5439
Drupal content type with gallery functionality.

Code

function _gallery_assist_lb_includes() {

  // Set the jQuery.extend Drupal.settings only once in teaser lists.
  $lightbox_conf = drupal_get_js();
  if (!preg_match("/lightbox_conf/", $lightbox_conf)) {
    $data = variable_get('gallery_assist_lightbox_data', FALSE);

    //$data['the_path'] = 'node/'. $node->nid .'/'.  $data['the_path'];
    $js_settings = array(
      'lightbox_conf' => array(
        variable_get('gallery_assist_lightbox', 'none') => $data,
      ),
    );
    drupal_add_js($js_settings, 'setting');
  }
}