function collapsiblock_load in Javascript Tools 5
Load needed files.
1 call to collapsiblock_load()
- collapsiblock_menu in collapsiblock/
collapsiblock.module - Implementation of hook_menu().
File
- collapsiblock/
collapsiblock.module, line 46 - Make blocks collapsible.
Code
function collapsiblock_load() {
static $loaded = FALSE;
if (!$loaded) {
$path = drupal_get_path('module', 'collapsiblock');
jstools_add_js($path . '/collapsiblock.js');
drupal_add_js(drupal_get_path('module', 'jstools') . '/jquery.cookie.js');
drupal_add_js(array(
'collapsiblock' => array(
'blocks' => variable_get('collapsiblock_settings', array()),
'default_state' => variable_get('collapsiblock_default_state', 1),
),
), 'setting');
drupal_add_css($path . '/collapsiblock.css');
$loaded = TRUE;
}
}