|
|
|
@ -139,17 +139,17 @@ class AssetBundle extends Object
|
|
|
|
|
public function registerAssets($view) |
|
|
|
|
{ |
|
|
|
|
foreach ($this->js as $js) { |
|
|
|
|
if ($js[0] === '/') { |
|
|
|
|
$view->registerJsFile($this->baseUrl . $js, $this->jsOptions); |
|
|
|
|
} else { |
|
|
|
|
if (strpos($js, '/') !== 0 && strpos($js, '://') === false) { |
|
|
|
|
$view->registerJsFile($this->baseUrl . '/' . $js, $this->jsOptions); |
|
|
|
|
} else { |
|
|
|
|
$view->registerJsFile($js, $this->jsOptions); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
foreach ($this->css as $css) { |
|
|
|
|
if ($css[0] === '/') { |
|
|
|
|
$view->registerCssFile($this->baseUrl . $css, $this->cssOptions); |
|
|
|
|
} else { |
|
|
|
|
if (strpos($css, '/') !== 0 && strpos($css, '://') === false) { |
|
|
|
|
$view->registerCssFile($this->baseUrl . '/' . $css, $this->cssOptions); |
|
|
|
|
} else { |
|
|
|
|
$view->registerCssFile($css, $this->cssOptions); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|