You are here

function webfm_inline_js in Web File Manager 5

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

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

3 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
webfm_nodeapi in ./webfm.module
Implementation of hook_nodeapi().

File

./webfm.module, line 1908

Code

function webfm_inline_js($base_url, $clean_url, $uid) {
  $js = '<script type="text/javascript">function getBaseUrl(){return ' . drupal_to_js($base_url) . ';} function getWebfmIconDir(){return ' . drupal_to_js($base_url . "/" . variable_get('webfm_icon_dir', '')) . ';} function getWebfmCleanUrl(){return ' . drupal_to_js($clean_url) . '; }function getWebfmIETreeOffset(){return ' . drupal_to_js(variable_get('webfm_ie_dd_tree_offset', '')) . ';}function getWebfmIEListOffset(){return ' . drupal_to_js(variable_get('webfm_ie_dd_list_offset', '')) . ';} function getWebfmUid(){return ' . drupal_to_js($uid) . ';} function getWebfmDateFormat(){return ' . drupal_to_js(variable_get('webfm_date_format', WEBFM_DATE_FORMAT_DAY)) . ';} function getWebfmMetaName(){return ' . drupal_to_js(variable_get('webfm_display_title', '')) . ';}</script>';
  drupal_set_html_head($js);
  return $js;
}