Skip to content

Commit

Permalink
Update file input themes
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jul 6, 2016
1 parent 3b8f681 commit b0fb41e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions FileInputThemeAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ class FileInputThemeAsset extends AssetBundle
*/
public function addTheme($theme)
{
if ($this->checkExists("themes/{$theme}/{$theme}.js")) {
$this->js[] = "themes/{$theme}/{$theme}.js";
$file = YII_DEBUG ? "theme.js" : "theme.min.js";
if ($this->checkExists("themes/{$theme}/{$file}")) {
$this->js[] = "themes/{$theme}/{$file}";
}
if ($this->checkExists("themes/{$theme}/{$theme}.css")) {
$this->css[] = "themes/{$theme}/{$theme}.css";
$file = YII_DEBUG ? "theme.css" : "theme.min.css";
if ($this->checkExists("themes/{$theme}/{$file}")) {
$this->css[] = "themes/{$theme}/{$file}";
}
return $this;
}
Expand Down

0 comments on commit b0fb41e

Please sign in to comment.