Skip to content

Commit

Permalink
Dev: removed the manual registration of package dependencies (done au…
Browse files Browse the repository at this point in the history
…tomatically by Yii)
  • Loading branch information
LouisGac committed Jan 11, 2017
1 parent 9fcd6d2 commit cdac3ae
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions application/controllers/survey/index.php
Expand Up @@ -42,12 +42,7 @@ public function run()
$oTemplate = Template::model()->getInstance('', $surveyid);
$this->oTemplate = $oTemplate;
App()->clientScript->registerScript('sLSJavascriptVar',$sLSJavascriptVar,CClientScript::POS_HEAD);
App()->clientScript->registerScript('setJsVar',"setJsVar();",CClientScript::POS_BEGIN);// Ensure all js var is set before rendering the page (User can click before $.ready)

foreach($oTemplate->depends as $package)
{
App()->getClientScript()->registerPackage((string) $package);
}
App()->clientScript->registerScript('setJsVar',"setJsVar();",CClientScript::POS_BEGIN);// Ensure all js var is set before rendering the page (User can click before $.ready)
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."survey_runtime.js");

useFirebug();
Expand Down

0 comments on commit cdac3ae

Please sign in to comment.