function _smileys_add_files in Smileys 6
1 call to _smileys_add_files()
- smileys_form_alter in ./
smileys.module - Implementation of hook_form_alter().
File
- ./
smileys.module, line 118
Code
function _smileys_add_files() {
static $files_added = FALSE;
if (!$files_added) {
// Add the JS and CSS
$path = drupal_get_path('module', 'smileys');
$dialog = variable_get('smileys_enable_dialog', TRUE);
$draggable = variable_get('smileys_dialog_draggable', FALSE);
$resizable = variable_get('smileys_dialog_resizable', FALSE);
$width = variable_get('smileys_dialog_width', 400);
$height = variable_get('smileys_dialog_height', 0);
$jquery_ui = module_exists('jquery_ui');
drupal_add_css($path . '/scripts/smileys.css');
drupal_add_js(array(
'smileys' => array(
'enable_dialog' => $dialog,
'draggable' => $draggable,
'resizable' => $resizable,
'dialog_width' => $width,
'dialog_height' => $height,
),
), 'setting');
drupal_add_js($path . '/scripts/smileys.js');
drupal_add_js($path . '/scripts/ui.core.dialog.js');
if ($draggable) {
$jquery_ui ? jquery_ui_add('ui.draggable') : drupal_add_js($path . '/scripts/ui.draggable.js');
}
if ($resizable) {
$jquery_ui ? jquery_ui_add('ui.resizable') : drupal_add_js($path . '/scripts/ui.resizable.js');
}
}
}