You are here

function webfm_inline_js in Web File Manager 5.2

Same name and namespace in other branches
  1. 5 webfm.module \webfm_inline_js()

Inline javascript Function to pass base_url, icon directory, debug and cleanurl flags

2 calls to webfm_inline_js()
webfm_form_alter in ./webfm.module
Implementation of hook_form_alter().
webfm_main in ./webfm.module
Main file manager function

File

./webfm.module, line 1437

Code

function webfm_inline_js($base_url, $clean_url, $uid) {
  $js = '<script type="text/javascript">function getBaseUrl(){return ' . drupal_to_js($base_url) . ';} function getIconDir(){return ' . drupal_to_js($base_url . "/" . variable_get('webfm_icon_dir', '')) . ';} function getCleanUrl(){return ' . drupal_to_js($clean_url) . '; }function getIETreeOffset(){return ' . drupal_to_js(variable_get('webfm_ie_dd_tree_offset', '')) . ';}function getIEListOffset(){return ' . drupal_to_js(variable_get('webfm_ie_dd_list_offset', '')) . ';} function getUid(){return ' . drupal_to_js($uid) . ';}</script>';
  drupal_set_html_head($js);
  return $js;
}