Skip to content

Commit

Permalink
Dev: few corrections in AdminTheme comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 10, 2016
1 parent 6573d09 commit 6c2db35
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions application/models/AdminTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function registerStylesAndScripts()

// Then we add the different CSS/JS files to load in arrays
// It will check if it needs or not the RTL files
// and it will add the directory prefix to the file name (css/ o rjs/ )
// and it will add the directory prefix to the file name (css/ or js/ )
// This last step is needed for the package (yii package use a single baseUrl / basePath for css and js files )

// We check if RTL is needed
Expand All @@ -149,7 +149,7 @@ public function registerStylesAndScripts()
// Non-RTL style
foreach($this->config->files->css->filename as $cssfile)
{
$aCssFiles[] = 'css/'.$cssfile; // add the 'css/' prefix to the RTL css files
$aCssFiles[] = 'css/'.$cssfile; // add the 'css/' prefix to the css files
}
}

Expand All @@ -170,8 +170,6 @@ public function registerStylesAndScripts()
}
else
{
// When defining the package with a base url
// the asset manager is not used
$package['baseUrl'] = $this->sTemplateUrl; // add the base url to the package, so it will not use the asset manager
}

Expand All @@ -185,7 +183,7 @@ public function registerStylesAndScripts()


/**
* Register a Css File from the correct directory (publict style, style, upload, etc) using the correct method (with / whithout asset manager)
* Register a JS File from the correct directory (publict style, style, upload, etc) using the correct method (with / whithout asset manager)
* This function is called from the different controllers when they want to register a specific css file.
*
* @var string $sPath 'PUBLIC' for /styles-public/, else templates/styles
Expand Down Expand Up @@ -220,7 +218,7 @@ public function registerScriptFile( $cPATH, $sFile )
if (!$bIsInAdminTheme) // If not, it's or a normal script (like ranking.js) or an admin script
{
$sAdminScriptPath = realpath ( Yii::app()->basePath .'/../scripts/admin/') . '/';
$sScriptPath = realpath ( Yii::app()->basePath .'/../scripts/') . '/';
$sScriptPath = realpath ( Yii::app()->basePath .'/../scripts/') . '/';
$path = ($cPATH == 'ADMIN_SCRIPT_PATH')?$sAdminScriptPath:$sScriptPath; // We get the wanted path
$url = ($cPATH == 'ADMIN_SCRIPT_PATH')?Yii::app()->getConfig('adminscripts'):Yii::app()->getConfig('generalscripts'); // We get the wanted url defined in config
}
Expand Down

0 comments on commit 6c2db35

Please sign in to comment.