[EXTENSION] Bootstrap

Hi Chris,

thank you for your great work - I love your extension!

The layout of BootGridView (version 0.96b) with bordered-table shows the search input fields on the right side. within <thead>.

I have changed the bootstrap-min.css in row 186 to


table th, table td {

padding: 5px 15px 9px 5px; 

Glad you like it. :)

As a side note, you should override the stylesheet rule instead of directly modifying the bootstrap css.

Version 0.9.7 is now live!

What’s new?

  • BootNav (Topbar navigation)

  • Support for dropdown menus in BootMenu (and BootNav)

  • Fixed import paths

Please note that you must preload the bootstrap application component.

To preload the component add the following to your main config:




'preload'=>array(

	.....

	'bootstrap',

),



When preloaded the component registers and own path alias for bootstrap which is used internally (and can naturally be used also externally). This change was done to allow bootstrap to be placed in any directory.

Merry Christmas!

get error after update to last version and add BootNav:

include(BootWidget.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

thougth add bootstrap in preload()

Hey almix,

Thanks for noticing this. An import was missing from that file. I’ve fixed this, please redownload Bootstrap 0.9.7 and it should fix the problem. Sorry for the inconvenience.

Hi,

I am very interested in the way to achieve form submission (as partially explained earlier in this discussion - with the screenshot) through BootModal.

I can display and close it, but I don’t know how to submit the form to the controller with the dialog button (and not through a input button within the form…

Can someone explain me the code to put in the ‘click’ option (BootModal’s buttons)?

Many thanks

EDIT : It worked until now with an ajaxsubmitbutton within the form and a CJuiDialog

This should work:




jQuery('#yourFormId').submit();



Great! How simple…

Hi Chris , great work and I would love to get this extension in my Yii installation but the problem is I’m a newbie and I could not find any Install instructions , so dont know where to put various folders in the extension zip archive , is there any link / installation guide that I’m missing ?

Hey Vivek,

The installation instructions are on the extension page in the section titled "Setup".

hello :rolleyes:

i want to redirect bootModal when close event fired, how to achieve that with bootModal?

i already try this, and didn’t work:




$this->beginWidget('ext.bootstrap.widgets.BootModal', array(

			'id' => 'dialogBiodata',

			'options' => array(

				'title' => 'add your Bio',

				'backdropClose' => false,

				'escapeClose' => true,

				'open' => true,

				'width' => 550,

		                'height' => 470,

                                'close' => 'js:function(event, ui) { location.href = "biodata/create" }'



So lame of me , It was late night and I must have not noticed it in hurry , Thanks for taking out time to answer this !

@reptildarat: BootModal doesn’t support a close event, at least yet.

ohh, i see…thanks.

i have one more question…in the bootstrap page there’s some animation, such as “.fade” how apply that in your bootstrap extension?

can i use the effect from jquery-ui?? how?

First, of great extension!

I was wondering though why the BootTab isn’t implemented as an extension of CTabView in Yii?

THe behavior you want of CTabView does not look to be supported in a BootTab (which has been rolled into BootMenu).

For example, for tabs you actually want to display a content view within the tab and be able to dynamically jump between tabs without page reload. This is not what CMenu does. I am confused as why it isn’t extending the behavior of CTabView ?

@dreamynsx: BootTabs is kind of a work in progress. I will take a look at CTabView and see what I can do for the next release. Thank you for suggesting this improvement.

Effects are not yet supported either because I haven’t had the time to implement it properly.

oh i see…thanks for the answer…

you’re the best… ;D ;D

Hi all, rookie Yii user here

I am trying to follow the setup instructions, but am having trouble with the part that says




'components'=>array(

    .....

    'bootstrap'=>array(

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

    ),

),



I’ve tried various iterations of this, but keep on getting an error message




Alias "./components/Bootstrap" is invalid. Make sure it points to an existing directory or file.



Does someone have an example of what’s that section is supposed to look like?

Thanks in advance

Hi, if you put the extension in your extension folder you have to use this:




'bootstrap'=>array(

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

),