Skip to content

Commit

Permalink
make sure stylesheets are included before js
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Jul 4, 2010
1 parent c68508f commit 9300dbb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/sfLESS.class.php
Expand Up @@ -288,9 +288,16 @@ static public function findAndFixContentLinks(sfWebResponse $response, $useJs)

if ($hasLess)
{
$response->addJavascript(
sfConfig::get('app_sf_less_plugin_js_lib', '/sfLESSPlugin/js/less-1.0.30.min.js')
);
if (sfConfig::get('symfony.asset.javascripts_included', false))
{
throw new LogicException("The stylesheets must be included before the javascript in your layout");
}
else
{
$response->addJavascript(
sfConfig::get('app_sf_less_plugin_js_lib', '/sfLESSPlugin/js/less-1.0.30.min.js')
);
}
}
}

Expand Down

0 comments on commit 9300dbb

Please sign in to comment.