You are here

function shurly_css_js in ShURLy 7

Load CSS and JS files needed by the module @params both, css, js

3 calls to shurly_css_js()
shurly_block_content_bookmarklet in ./shurly.module
Generate Shurly bookmarklet for respective block
shurly_block_content_form in ./shurly.module
Generate Shurly creation form for respective block
shurly_init in ./shurly.module
Implements hook_init().

File

./shurly.module, line 19
description http://www.youtube.com/watch?v=Qo7qoonzTCE

Code

function shurly_css_js($which = 'both') {
  $path = drupal_get_path('module', 'shurly');
  if ($which == 'css' || $which == 'both') {
    drupal_add_css($path . '/shurly.css', array(
      'group' => CSS_DEFAULT,
      'every_page' => TRUE,
    ));
  }
  if ($which == 'js' || $which == 'both') {
    drupal_add_js($path . '/zeroclipboard/ZeroClipboard.js');
    drupal_add_js($path . '/shurly.js');
    drupal_add_js("ZeroClipboard.setMoviePath( '" . base_path() . $path . '/zeroclipboard/ZeroClipboard.swf' . "' );", 'inline');
  }
}