BTW, this is the best news ![]()
Is it possible to help you with your project? For example, how to create password input and submit one?
BTW, this is the best news ![]()
Is it possible to help you with your project? For example, how to create password input and submit one?
Hi, guys,
Asgaroth, thank you very much for the extension.
Has anybody implemented the password field yet?
![]()
Thanks
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;
And the code
/**
* Registers the Foundation CSS.
*/
public function registerCss() {
Yii::app() -> clientScript -> registerCssFile($this -> getAssetsUrl() . '/stylesheets/foundation.css');
if($this->appCss):
if(is_bool($this->appCss))
Yii::app() -> clientScript -> registerCssFile($this -> getAssetsUrl() . '/stylesheets/app.css');
else
Yii::app() -> clientScript -> registerCssFile($this->appCss);
endif;
}
/**
* Registers the core JavaScript plugins.
* @since 0.9.8
*/
public function registerJs() {
Yii::app() -> clientScript -> registerCoreScript('jquery');
Yii::app() -> clientScript -> registerScriptFile($this -> getAssetsUrl() . '/javascripts/modernizr.foundation.js', CClientScript::POS_END);
Yii::app() -> clientScript -> registerScriptFile($this -> getAssetsUrl() . '/javascripts/foundation.js', CClientScript::POS_END);
Yii::app() -> clientScript -> registerScriptFile($this -> getAssetsUrl() . '/javascripts/app.js', CClientScript::POS_END);
}
I’m pretty sure somebody has a good approach to do this or even better idea. This is only my two cents trying o improve this excellent extension!
![]()
Best regards!
@Junior - df9
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.
Thanks for your feedback!
@Asgroth
You’re right about app.css.
Thank you very much for applying the changes, I’ve already downloaded the new version. ![]()
Best regards!
Can I style my GridViews with Foundation?
(I am new in Yii and also in using CSS frameworks).
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.
Hi, thanks for the very cool extension. It rocks!
However, I am hitting a problem when using Ajax Buttons.
I realised that once I comment the foundation .js registering method (component’s registerJs()), then my Ajax Buttons come back to life.
I did a bit of debugging, and noticed that the presence of jQuery(document).ready() is what makes Ajax stop working.
Can you please confirm that it is indeed the case and perhaps suggest a way to get around that?
I’ve also tested with the version 3 of the extension but it does not work either.
Many thanks for your help
Cass
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.
Thanks for your feedback!
Hi Asgaroth,
Thanks for the quick reply.
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.
At one point I commented out my code and used the stuff at http://www.yiiframework.com/wiki/49/update-content-in-ajax-with-partialrender/ to ensure I was not forgetting anything. That did not work either until I commented out the foundation .js.
I hope that is enough info, but if you could have a look during the weekend, that would most definitely suffice.
Cheers
Cass
Thanks,
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.
Hey, guys,just a tip/suggestion
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' );
}
The files contain itselves the code for plugins.
All things working fine now.
![]()
Regards!
One more thing to consider
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.
Hope this can be useful
Regards!
![]()
Cool extension, I like but it seems to conflicts with other extension like quickdlgs, srbac
Solved!
Thanks a lot!
Hi Asgaroth,
first of all, thank you for developing this project.
you implementation has a good approach, but i would like to suggest something.
Your documentation of YiiFoundation3 isn’t good. On your website it looks like a copy of Zurb’s Foundation Dokumentation, but is out of date. Foundation 3.1 is already released. I would limit the online dokumentation to your part of code without the foundation doku. just make a link to zurb’s foundation website.
Furthermore many of your published widgets aren’t documented online.
Inline documentation is missing or uncompleted, too.
I would like to use your project much more but at the moment it is easier to code my own widgets than to read your code, because i have to consider the Zurb’s docu anyway.
Not all JS files are required while preloading the component. Just the foundation.min.js, I think. All other files should be imported on demand.
On ajax request, there is no included way to avoid importing. I’ve added a workaround in foundation.php->registerJS()
if(Yii::app()->request->isAjaxRequest)
return;
because the files are anyway preloaded with the app.
Regards
Nayo
Thank you very much for your comments, I will be taking them into account for an upcoming release.
I have a queston - I have added EGMap to my webpage, but it doesn’t show “Zoom in and out buttons”.
See Here - Link
I am using foundation framework.
Could it be that it makes zoom in and out buttons so ugly?
Yep, foundation is affecting parts of your map, normally this things go into an iframe, so that they are not affected by page styles.