function addInclude($file, $ext = '.js')
{
if (strpos($file, 'http') === 0) {
parent::addOnReady('$.atk4.includeJS("' . $file . '")');
return $this;
}
$url = $this->api->locateURL('js', $file . $ext);
if (!$this->atk4_initialised) {
return parent::addInclude($file, $ext);
}
parent::addOnReady('$.atk4.includeJS("' . $url . '")');
return $this;
}