You are here

function bueditor_js_library in BUEditor 5

Same name and namespace in other branches
  1. 6 bueditor.module \bueditor_js_library()

Include external javascript files from "library" directory

1 call to bueditor_js_library()
bueditor_settle in ./bueditor.module
Include necessary js and css files for editor settlement.

File

./bueditor.module, line 542

Code

function bueditor_js_library($dir) {
  if ($handle = @opendir($dir)) {
    while (($file = readdir($handle)) !== FALSE) {
      if (substr($file, -3) == '.js') {
        drupal_add_js($dir . '/' . $file);
      }
    }
    closedir($handle);
  }
}