<?php
$this -> widget("foundation.widgets.FounNavBar", array('items' => array(
array('label' => 'Nav Item 1'),
array('label' => 'Nav Item 2', 'flyout' => array('small', '<h5>Small Example (200px)</h5>
<p>
This is example text. This is example text. This is example text. This is example text. This is example text. This is example text. This is example text. This is example text.
</p>')),
array('label' => 'Nav Item 3', 'flyout' => 'content...'),
array('label' => 'Nav Item 4', 'flyout' => array(
'large right',
'content...', true
)),
)));
?>
Yaps…my Friends… i dont realize that http://foundation.oakwebdev.com/ is the Foundation Yii-Extension Demo site. Very similiar with it’s original website. I really surprise, that it’s already there… shame on me…but thanks anyway…
Ooops, answer my own question, password field is implemented on git. - thanks
I would like to suggest the following to improve the extension, I’ve made these changes to fit my needs and thought it could be useful to others:
option to register app.css file or even a custom app.css file (see code below)
make registerJs() method public (why? - because sometimes I just want to force registering js files and sometimes in specific places)
register Js files with POS::END option
change the text in comments Registers the Foundation CSS instead of Registers the Bootstrap CSS
Foundation.php
/**
* @var boolean whether to register the Foundation app CSS (app.css) or another file
* Defaults to true, but only registers if coreCss is also true
*/
public $appCss = true;
I just uploaded a new version added most of the recommendations except for the app.css which is not something that belongs to the application and not the extension, it is there only because it belongs to foundation it self, I might remove it latter (I should have now but I forgot to xD).
You are not supposed to edit any extension files, instead create an app.css in your CSS folder and include it manually.
You can use the cssFile property of CGridView, set it to false and you’ll get default styles for tables from foundation, you can also create a specific css file for grid views and set that css instead.
Yii Foundation It does not (yet) have a gridview widget like bootstrap, if people request it enough (or contribute it) it could be added. it just doesn’t seem necessary for now.
I wont have time to take a look until this weekend.
For now please show me the Javascript generated code, I cannot see why a "jQuery(document).ready()" would generate such an issue, maybe I can understand a little more if I see some code.
No problem, I am mainly using the layout elements of foundation, so for now I’ve commented the registration of the scripts out and I can survive with that until we get the client to approve things.
Still I would like to see the generated javascript which is generating errors with your code. otherwise I’ll have to recreate the scenario and see if it gets broken for me too.
I was facing a problem with Orbit using Foundation3 extension, FF 10.0.2 and Linux. Slider seemed to not respect pauses between images, it was totally crazy.
The issue was solved when I did the following:
1 - downloaded foundation.min.css and foundation.min.js from Zurb’s website
2 - included only these two files in the functions registerCss and registerJS of the Foundation component as follows:
/**
* Registers the Foundation CSS.
*/
public function registerCss( ) {
Yii::app( )->clientScript->registerCssFile( $this->getAssetsUrl( ).'/stylesheets/foundation.min.css' );
}
/**
* Registers the core JavaScript plugins.
* @since 0.9.8
*/
public function registerJs( ) {
Yii::app( )->clientScript->registerCoreScript( 'jquery' );
//$this->registerScriptFile( 'jquery.reveal.js' );
//$this->registerScriptFile( 'jquery.orbit.js' );
//$this->registerScriptFile( 'jquery.customforms.js' );
//$this->registerScriptFile( 'jquery.placeholder.min.js' );
//$this->registerScriptFile( 'modernizr.foundation.js' );
//$this->registerScriptFile( 'jquery.tooltips.js' );
//$this->registerScriptFile( 'app.js' );
$this->registerScriptFile( 'foundation.min.js' );
}
If you use the solution I posted before, beware of removing the included jQuery code from foundation.js, otherwise, you’ll be including jQuery twice and causing trouble with any jQuery plugins you try to use, even CMaskedTextField won’t work.