You are here

public function FrxSkin::addJS in Forena Reports 7.4

Same name and namespace in other branches
  1. 7.3 FrxSkin.inc \FrxSkin::addJS()

Parameters

unknown_type $script:

2 calls to FrxSkin::addJS()
FrxSkin::load in ./FrxSkin.inc
Load the skin based on the name.
FrxSkin::loadSkinFiles in ./FrxSkin.inc
Adds on report specific skin files to

File

./FrxSkin.inc, line 51
FrxSkin.inc Skinning

Class

FrxSkin
@file FrxSkin.inc Skinning

Code

public function addJS($script) {
  if (strpos($script, 'http:') === 0 || strpos($script, 'https:') === 0) {
    $this->scripts[] = $script;
  }
  elseif (Frx::File()
    ->exists($script)) {
    $this->scripts[] = Frx::File()
      ->path($script);
  }
  elseif (file_exists('sites/all/libraries/' . $script)) {
    $this->scripts[] = 'sites/all/libraries/' . $script;
  }
  elseif (file_exists($script)) {
    $this->scripts[] = $script;
  }
}