Yii Framework Forum: [EXTENSION] Foundation - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Foundation An easy to use, powerful, and flexible framework for building prototyp Rate Topic: ****- 4 Votes

#21 User is offline   renathy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 82
  • Joined: 05-July 11

Posted 28 May 2012 - 05:33 AM

Can I style my GridViews with Foundation?
(I am new in Yii and also in using CSS frameworks).
0

#22 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 28 May 2012 - 10:05 AM

View Postrenathy, on 28 May 2012 - 05:33 AM, said:

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.
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

#23 User is offline   cass 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 59
  • Joined: 01-February 09
  • Location:London, UK

Posted 09 July 2012 - 06:08 PM

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
0

#24 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 09 July 2012 - 06:38 PM

View Postcass, on 09 July 2012 - 06:08 PM, said:

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!
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

#25 User is offline   cass 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 59
  • Joined: 01-February 09
  • Location:London, UK

Posted 09 July 2012 - 07:10 PM

View PostAsgaroth, on 09 July 2012 - 06:38 PM, said:

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.yiiframew...-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
0

#26 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 10 July 2012 - 02:10 PM

View Postcass, on 09 July 2012 - 07:10 PM, said:

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.yiiframew...-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.
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

#27 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 21 August 2012 - 09:03 PM

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!
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
1

#28 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 23 August 2012 - 07:04 PM

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!

:)
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
1

#29 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 30 September 2012 - 12:14 AM

Cool extension, I like but it seems to conflicts with other extension like quickdlgs, srbac

Solved!
0

#30 User is offline   Deepak Pradhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 209
  • Joined: 01-May 09
  • Location:Charlotte, NC

Posted 14 October 2012 - 07:09 AM

View PostJunior - df9, on 21 August 2012 - 09:03 PM, said:

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!


Thanks a lot!



0

#31 User is offline   Matthias Mahler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 30-January 12
  • Location:Germany

Posted 24 October 2012 - 03:52 AM

Hi Asgaroth,

first of all, thank you for developing this project.
you implementation has a good approach, but i would like to suggest something.
  • Documentation
    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.
  • Script import
    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
0

#32 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 24 October 2012 - 08:33 AM

Thank you very much for your comments, I will be taking them into account for an upcoming release.
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

#33 User is offline   renathy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 82
  • Joined: 05-July 11

Posted 24 October 2012 - 08:55 AM

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?
0

#34 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 24 October 2012 - 09:22 AM

View Postrenathy, on 24 October 2012 - 08:55 AM, said:

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.
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

#35 User is offline   renathy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 82
  • Joined: 05-July 11

Posted 01 November 2012 - 07:03 AM

View PostAsgaroth, on 24 October 2012 - 09:22 AM, said:

Yep, foundation is affecting parts of your map, normally this things go into an iframe, so that they are not affected by page styles.


Can you give me a hint how to use iframe in this case?
For example
- I create new action MAP in my SiteController
- I add iframe src=www.mypage.com/site/map
- map action renders map view with layout = "nolyaout" (fyc, I cannot user renderPartial as seems that EGMap extension doesn't work with it)
- foundation.css will be added in this case, but I do not want to have it in iframe.

So, it seems that the question actually is - are there any way not to add foundation.css to one particular layout?

Thank you.
0

#36 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 01 November 2012 - 07:22 AM

View Postrenathy, on 01 November 2012 - 07:03 AM, said:

Can you give me a hint how to use iframe in this case?
For example
- I create new action MAP in my SiteController
- I add iframe src=www.mypage.com/site/map
- map action renders map view with layout = "nolyaout" (fyc, I cannot user renderPartial as seems that EGMap extension doesn't work with it)
- foundation.css will be added in this case, but I do not want to have it in iframe.

So, it seems that the question actually is - are there any way not to add foundation.css to one particular layout?

Thank you.



Yes, there is an option to disable registration of assets

'components'=>array(
    .....
     // assuming you extracted foundation under extensions
     'foundation' => array("class" => "ext.foundation.components.Foundation",
     'coreCss' => false
     'enableJS' => false
),
 
),



After that, just place in your Layout (the layout you need foundation.css registered) the following:
Yii::app()->foundation->registerCss();
Yii::app()->foundation->registerJs();



Hope this helps

:)

Regards
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
1

#37 User is offline   renathy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 82
  • Joined: 05-July 11

Posted 13 November 2012 - 09:36 AM

Can I renderpartial view with FounTab into one of the tabs?

Thx.
0

#38 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 13 November 2012 - 10:26 AM

View Postrenathy, on 13 November 2012 - 09:36 AM, said:

Can I renderpartial view with FounTab into one of the tabs?

Thx.


Yes, why not, what issues are you having?
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

#39 User is offline   Asynth 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 19-November 12

Posted 19 November 2012 - 05:23 PM

Hello Asgaroth,

Thank you for this plugin. While trying to create a vertical navigation menu below code in FounNavBar > normalizeItems drew my attention :

if( isset( $item['encodeLabel'] ) && $item['encodeLabel'] )
$items[$i]['label'] = CHtml::encode( $item['label'] );

if( ($this->encodeLabel && !isset( $item['encodeLabel'] )) || (isset( $item['encodeLabel'] ) && $item['encodeLabel'] !== false) )
$items[$i]['label'] = CHtml::encode( $item['label'] );


Would it be possible to remove just the first condition? Or I do not understand the thing.

Regards,
0

#40 User is offline   Asgaroth 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 371
  • Joined: 17-July 09
  • Location:Bogota, Colombia

Posted 19 November 2012 - 05:46 PM

View PostAsynth, on 19 November 2012 - 05:23 PM, said:

Hello Asgaroth,

Thank you for this plugin. While trying to create a vertical navigation menu below code in FounNavBar > normalizeItems drew my attention :

if( isset( $item['encodeLabel'] ) && $item['encodeLabel'] )
$items[$i]['label'] = CHtml::encode( $item['label'] );

if( ($this->encodeLabel && !isset( $item['encodeLabel'] )) || (isset( $item['encodeLabel'] ) && $item['encodeLabel'] !== false) )
$items[$i]['label'] = CHtml::encode( $item['label'] );


Would it be possible to remove just the first condition? Or I do not understand the thing.

Regards,



hum,... you are right, the second check includes the first one, there is no need for it. please create a pull request if you want this anytime soon.
- Extension: Dynamic DataProvider Behavior
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.



- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users