Cants See A Popup

I downloaded the bootstrap extension and jss files from www.getbootstrap.com

Then, I placed the extracted files in the extension/bootstrap directory

Below you find the sample code of the config file:

Yii::setPathOfAlias(‘bootstrap’, dirname(FILE).’/../extensions/bootstrap’);

‘components’=>array(

	'user'=>array(


		// enable cookie-based authentication


		'allowAutoLogin'=>true,


	),


	'bootstrap'=>array(


        'class'=>'bootstrap.components.Bootstrap',


    ),

[b]

I am using the Abound theme , and I changed the main.php in the layout as below and registered the CSS Files

[/b]

<?php

  &#036;baseUrl = Yii::app()-&gt;theme-&gt;baseUrl; 


  &#036;cs = Yii::app()-&gt;getClientScript();


Yii::app()-&gt;clientScript-&gt;registerCoreScript('jquery');


?&gt;


&#60;&#33;-- Fav and Touch and touch icons --&#62;


&lt;link rel=&quot;shortcut icon&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/img/icons/favicon.ico&quot;&gt;


&lt;link rel=&quot;apple-touch-icon-precomposed&quot; sizes=&quot;144x144&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/img/icons/apple-touch-icon-144-precomposed.png&quot;&gt;


&lt;link rel=&quot;apple-touch-icon-precomposed&quot; sizes=&quot;72x72&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/img/icons/apple-touch-icon-72-precomposed.png&quot;&gt;


&lt;link rel=&quot;apple-touch-icon-precomposed&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/img/icons/apple-touch-icon-57-precomposed.png&quot;&gt;


&lt;?php

$cs->registerCssFile($baseUrl.’/css/bootstrap-responsive.css’);

  &#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/bootstrap.min.css');


  &#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/bootstrap-responsive.min.css');


  &#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/abound.css');





 Yii::app()-&gt;bootstrap-&gt;registerAllCss();


  //&#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/style-blue.css');


  ?&gt;


  &#60;&#33;-- styles for style switcher --&#62;


  	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/css/style-blue.css&quot; /&gt;





&lt;?php


&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/bootbox.js');


 &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/bootstrap.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/bootstrap.min.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.sparkline.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.flot.min.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.flot.pie.min.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/charts.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.knob.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.masonry.min.js');


  &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/styleswitcher.js');

// Yii::app()->bootstrap->register();

?&gt;

Now, if I use the following code :

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">

Popover on left

</button>

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">

Popover on top

</button>

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus

sagittis lacus vel augue laoreet rutrum faucibus.">

Popover on bottom

</button>

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">

Popover on right

</button>

[b]it doesnot show me any popovers!!!

Whats that I am missing?[/b]

Anyone can please help me out? I know it might be a simple solution. but I am really stuck on it :(

If you’re using any bootstrap extension make sure it was updated to BS 3.1. Syntax of BS was changed slightly.

Also make sure there are no js errors.

Thanks Orey.

I already downloaded :/v3.1.0/bootstrap-3.1.0-dist.zip

Copied them to \protected\extensions\bootstrap directory.

[b]And again I checked if I got any Jscript error.

[/b]

I didnt get any Jscript error, but I got this warning below.

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

The popover is very well demonstrated here :getbootstrap.com/javascript/#popovers

[b]but I want it to be working in my code as well!

When I click on the button, nothing happens![/b]

Take a look here:


$cs->registerScriptFile($baseUrl.'/js/bootstrap.js');

and here:


$cs->registerScriptFile($baseUrl.'/js/bootstrap.min.js');

and I’m pretty sure another one is registered by


'bootstrap'=>array(

'class'=>'bootstrap.components.Bootstrap',

),



and what’s this btw:


$cs->registerScriptFile($baseUrl.'/js/bootbox.js');

So please, get rid of unneeded code and start with a clean template.

Thanks Again ORey! I made the following changes :

<?php

//$cs->registerCssFile($baseUrl.’/css/bootstrap-responsive.css’);

 // &#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/bootstrap.min.css');


 // &#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/bootstrap-responsive.min.css');


  &#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/abound.css');





 Yii::app()-&gt;bootstrap-&gt;registerAllCss();


  //&#036;cs-&gt;registerCssFile(&#036;baseUrl.'/css/style-blue.css');


  ?&gt;


  &#60;&#33;-- styles for style switcher --&#62;


  	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/css/style-blue.css&quot; /&gt;





&lt;?php


&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/bootbox.js');


 &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/bootstrap.js');


 // &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/bootstrap.min.js');


 // &#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.sparkline.js');


  //&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.flot.min.js');


  //&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.flot.pie.min.js');


  //&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/charts.js');


  //&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.knob.js');


  //&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/plugins/jquery.masonry.min.js');


  //&#036;cs-&gt;registerScriptFile(&#036;baseUrl.'/js/styleswitcher.js');

// Yii::app()->bootstrap->register();

?&gt;

[b]This time, I saw that the modal dialog works !!! But still the popover doesnot work .’

Bootbox.js was downloaded from bootboxjs.com

But I am still not sure , if I got what I did to make it work…

Thanks!

Sachy[/b]