Skip to content

Commit

Permalink
Dev: switch not active in question edit
Browse files Browse the repository at this point in the history
Dev: bootstrap.js not loaded for public template
  • Loading branch information
Shnoulle committed Dec 28, 2016
1 parent 505d05f commit 6031f90
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/controllers/survey/index.php
Expand Up @@ -51,7 +51,7 @@ public function run()
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."survey_runtime.js");


if($oTemplate->cssFramework == 'bootstrap')
if($oTemplate->cssFramework->name == 'bootstrap')
{
// We now use the bootstrap package isntead of the Yiistrap TbApi::register() method
// Then instead of using the composer dependency system for templates
Expand Down
Expand Up @@ -154,10 +154,11 @@
<?php endforeach;?>
</div></div></div></div>
<?php
//~ foreach (Yii::app()->clientScript->scripts as $index=>$script)
//~ {
//~ echo CHtml::script(implode("\n",$script));
//~ }
//~ Yii::app()->clientScript->reset();
/* Launch all needed script (here after load) needed for widget */
foreach (Yii::app()->clientScript->scripts as $index=>$script)
{
echo CHtml::script(implode("\n",$script));
}
Yii::app()->clientScript->reset();
?>
<!-- end of Advanced Settings -->
2 changes: 1 addition & 1 deletion application/views/layouts/public.php
Expand Up @@ -31,7 +31,7 @@
<?php
$oTemplate = Template::model()->getInstance($this->sTemplate);
Yii::app()->clientScript->registerPackage('survey-template');
if($oTemplate->cssFramework == 'bootstrap')
if($oTemplate->cssFramework->name == 'bootstrap')
{
/* Why not add it for whole framework ? */
Yii::app()->getClientScript()->registerMetaTag('width=device-width, initial-scale=1.0', 'viewport');
Expand Down

0 comments on commit 6031f90

Please sign in to comment.