Yii Framework Forum: [Extension] Yiistrap - Yii Framework Forum

Jump to content

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

[Extension] Yiistrap The brand new version of the Yii-Bootstrap extension Rate Topic: -----

#1 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 14 June 2013 - 04:35 PM

Hey All,

Yiistrap, the new version of the popular Yii-Bootstrap extension is finally here.

If you liked Yii-Bootstrap you will love Yiistrap.

You can download it from extensions or clone it from GitHub:


Feel free to leave your thoughts below.
Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
4

#2 User is offline   Moncef 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 04-January 13
  • Location:Algeria

Posted 14 June 2013 - 06:09 PM

Great! Thank you very much Chris.
0

#3 User is offline   onikandish 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 23-December 12

Posted 17 June 2013 - 02:27 AM

nice, thanks.
but when i want to use it as an extension on my app and set config file(alias and components) yii cant realize the extension and send this error:
include(TbHtml.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

any suggestion?
0

#4 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 17 June 2013 - 02:30 AM

View Postonikandish, on 17 June 2013 - 02:27 AM, said:

nice, thanks.
but when i want to use it as an extension on my app and set config file(alias and components) yii cant realize the extension and send this error:
include(TbHtml.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

any suggestion?

Hey onikandish,

You have to import bootstrap.helpers.TbHtml in your application configuration.

EDIT: I added this to the docs because it seems that we forgot it. Thanks for pointing this out.

This post has been edited by Chris83: 17 June 2013 - 02:46 AM

Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#5 User is offline   onikandish 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 23-December 12

Posted 17 June 2013 - 04:02 AM

View PostChris83, on 17 June 2013 - 02:30 AM, said:

Hey onikandish,

You have to import bootstrap.helpers.TbHtml in your application configuration.

EDIT: I added this to the docs because it seems that we forgot it. Thanks for pointing this out.


OK thanks i will try it.
0

#6 User is offline   onikandish 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 23-December 12

Posted 17 June 2013 - 04:37 AM

just one more question:
should i add the bootstrap files(css,js) to my layout manually?
because html code works well but these files not included.
thank you again for your response.
0

#7 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 17 June 2013 - 05:11 AM

View Postonikandish, on 17 June 2013 - 04:37 AM, said:

just one more question:
should i add the bootstrap files(css,js) to my layout manually?
because html code works well but these files not included.
thank you again for your response.

Hey again onikandish,

The easiest way to register the client scripts is to call the following method in your main layout:

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

That method will register all necessary CSS and JavaScript -files for you.

EDIT: I've added this to the docs now as well.

This post has been edited by Chris83: 17 June 2013 - 05:35 AM

Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#8 User is offline   deez 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 04-January 12

Posted 17 June 2013 - 02:28 PM

Hi Chris,

I am a big fan of all of your work, and I was using bootstrap with LESS the other day, and realized that maybe it would be a good thing to maybe have the call to register() be configurable to either call only js or only css, as since I was using LESS I didn't need to re-register the css.

Just a thought.

Thanks tons for your very generous work!
0

#9 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 17 June 2013 - 04:24 PM

View Postdeez, on 17 June 2013 - 02:28 PM, said:

Hi Chris,

I am a big fan of all of your work, and I was using bootstrap with LESS the other day, and realized that maybe it would be a good thing to maybe have the call to register() be configurable to either call only js or only css, as since I was using LESS I didn't need to re-register the css.

Just a thought.

Thanks tons for your very generous work!

Hey deez,

register is not the only method available, there is also registerCoreCss, registerResponsiveCss, registerAllCss, registerCoreScripts, registerTooltipAndPopover and registerAllScripts. Take your pick (I usually only call registerAllScripts).
Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#10 User is offline   rei 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 318
  • Joined: 10-November 10

Posted 18 June 2013 - 03:23 AM

Chris,

First of all, thank you so much for providing the new version of Yii-Bootstrap, which looks very nice IMHO. B)

I have been replacing old Bootstrap components in my application with Yiistrap, but there are some questions that I would like to ask:

1. When using textFieldControlGroup for required field, I didn't see '*' mark (asterisk) beside textfield label. How do you add that '*' mark? I tried to use normal textFieldRow, but got an error: 'TbActiveForm and its behaviors do not have a method or closure named "textFieldRow".'

2. I couldn't find TbDetailView and Captcha textfield in Yiistrap. Have they been available now? Or do you intend to remove them in this new version?

3. In TbGridView sample page, the type for TbGridView with Hover style is TbHtml::GRID_HOVER. I guess that should be TbHtml::GRID_TYPE_HOVER?

4. After replacing old TbGridView, I found the new grid looked a bit strange (please see the attached picture). Sort arrows (which should only be displayed in one column header) appear in every column. Also, the summary text is displayed below grid. The code I use:

$this->widget('bootstrap.widgets.TbGridView', array(
   'id'=>'user-grid',
   'dataProvider'=>$model->search(),
   'filter'=>$model,
   'columns'=>array(
	'first_name',
        'username',
        array(       
          'name'=>'level',
          'filter'=>$model->getLevelOptions()
        ),
        array(
          'name'=>'status',
          'filter'=>$model->getStatusOptions()      
        ),
	array(
	  'class'=>'bootstrap.widgets.TbButtonColumn',
        ),
   ),
));


Am I doing anything wrong here?

Attached File(s)


0

#11 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 18 June 2013 - 03:34 AM

View Postrei, on 18 June 2013 - 03:23 AM, said:

Chris,

First of all, thank you so much for providing the new version of Yii-Bootstrap, which looks very nice IMHO. B)

I have been replacing old Bootstrap components in my application with Yiistrap, but there are some questions that I would like to ask:

1. When using textFieldControlGroup for required field, I didn't see '*' mark (asterisk) beside textfield label. How do you add that '*' mark? I tried to use normal textFieldRow, but got an error: 'TbActiveForm and its behaviors do not have a method or closure named "textFieldRow".'

2. I couldn't find TbDetailView and Captcha textfield in Yiistrap. Have they been available now? Or do you intend to remove them in this new version?

3. In TbGridView sample page, the type for TbGridView with Hover style is TbHtml::GRID_HOVER. I guess that should be TbHtml::GRID_TYPE_HOVER?

4. After replacing old TbGridView, I found the new grid looked a bit strange (please see the attached picture). Sort arrows (which should only be displayed in one column header) appear in every column. Also, the summary text is displayed below grid. The code I use:

Am I doing anything wrong here?

Hey rei,

1. In Yiistrap we use activeLabel instead of activeLabelEx at least for now because Bootstrap itself includes no styles for the required asterix. I guess we could make this configurable if there is a big demand for it.

2. Neither of those are a part of Yiistrap, TbDetailView is included in Yiiwheels but it's still under development. As for the captcha, you can wrap it yourself, take a look at TbHtml::customControlGroup and TbHtml::customActiveControlGroup.

3. That's a typo.

4. I cannot seem to find this image.
Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
1

#12 User is offline   rei 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 318
  • Joined: 10-November 10

Posted 18 June 2013 - 03:48 AM

View PostChris83, on 18 June 2013 - 03:34 AM, said:

1. In Yiistrap we use activeLabel instead of activeLabelEx at least for now because Bootstrap itself includes no styles for the required asterix. I guess we could make this configurable if there is a big demand for it.

2. Neither of those are a part of Yiistrap, TbDetailView is included in Yiiwheels but it's still under development. As for the captcha, you can wrap it yourself, take a look at TbHtml::customControlGroup and TbHtml::customActiveControlGroup.

3. That's a typo.

4. I cannot seem to find this image.


Thanks for your super fast reply. :) Here I attach the image again. Can you see it? Attached File  Yiistrap grid.png (10.19K)
Number of downloads: 70
0

#13 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 18 June 2013 - 03:07 PM

View Postrei, on 18 June 2013 - 03:48 AM, said:

Thanks for your super fast reply. :) Here I attach the image again. Can you see it? Attachment Yiistrap grid.png

Hey again rei,

I see the issue. I didn't think we needed the additional css for yii but now I'm starting to change my mind. I'll see what I can do to fix this.
Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#14 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 18 June 2013 - 05:21 PM

View PostChris83, on 18 June 2013 - 03:07 PM, said:

Hey again rei,

I see the issue. I didn't think we needed the additional css for yii but now I'm starting to change my mind. I'll see what I can do to fix this.

This has now been fixed, please update to the latest version.
Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
1

#15 User is offline   rei 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 318
  • Joined: 10-November 10

Posted 19 June 2013 - 01:58 AM

View PostChris83, on 18 June 2013 - 05:21 PM, said:

This has now been fixed, please update to the latest version.


Hi Chris,

Great! Appreciate your quick fix. The grid's sort arrow only appears in 1 column now, but I saw 2 possible issues there:

1. When column is sorted in ascending order, the arrow image (caret) that appears is reverse triangle, whereas normal CGridView uses triangle for ascending sort (please see the attached picture). I remember similar issue in Yii-Bootstrap.

2. Summary text of TbGridView ('Displaying ... of ... results' text) always appears on the bottom (not exactly on the right side of grid, but near the center). I tried to set template property:

$this->widget('bootstrap.widgets.TbGridView',array(
   ...
   'template'=>'{summary} {items} {pager}',
))


but that made the summary text didn't use the same styles as the other text in grid (I need to apply additional CSS class).

Are those the expected behaviour of TbGridView? If we want to place summary text on the top of grid, should we set 'template' property every time we use TbGridView?

By the way, when trying Bootstrap Generator (via Gii) today, I got this error:

BootstrapCode and its behaviors do not have a method or closure named "generateActiveRow". (/.../protected/extensions/bootstrap/gii/bootstrap/templates/default/_search.php(26))


Is the generator still in development process?

Attached File(s)

  • Attached File  Grids.png (37.8K)
    Number of downloads: 104

0

#16 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 19 June 2013 - 07:36 AM

View Postrei, on 19 June 2013 - 01:58 AM, said:

Hi Chris,

Great! Appreciate your quick fix. The grid's sort arrow only appears in 1 column now, but I saw 2 possible issues there:

1. When column is sorted in ascending order, the arrow image (caret) that appears is reverse triangle, whereas normal CGridView uses triangle for ascending sort (please see the attached picture). I remember similar issue in Yii-Bootstrap.

2. Summary text of TbGridView ('Displaying ... of ... results' text) always appears on the bottom (not exactly on the right side of grid, but near the center). I tried to set template property:

$this->widget('bootstrap.widgets.TbGridView',array(
   ...
   'template'=>'{summary} {items} {pager}',
))


but that made the summary text didn't use the same styles as the other text in grid (I need to apply additional CSS class).

Are those the expected behaviour of TbGridView? If we want to place summary text on the top of grid, should we set 'template' property every time we use TbGridView?

By the way, when trying Bootstrap Generator (via Gii) today, I got this error:

BootstrapCode and its behaviors do not have a method or closure named "generateActiveRow". (/.../protected/extensions/bootstrap/gii/bootstrap/templates/default/_search.php(26))


Is the generator still in development process?

Hey rei,

I've fixed the typo in the gii template and I'll take a look at styling the sort, summary, etc. later.

EDIT: The grid view styles are now also fixed.

This post has been edited by Chris83: 20 June 2013 - 02:37 PM

Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#17 User is offline   rei 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 318
  • Joined: 10-November 10

Posted 20 June 2013 - 09:37 PM

View PostChris83, on 19 June 2013 - 07:36 AM, said:

I've fixed the typo in the gii template and I'll take a look at styling the sort, summary, etc. later.


Bootstrap generator doesn't raise error anymore, but there are file parsing errors in the generated view files. I guess that's caused by additional PHP tag at the beginning of files:

<?php
/* @var $this CategoryController */
/* @var $model Category */


Also, as you mentioned that TbDetailView was not a part of Yiistrap, why does bootstrap generator still use it when generating 'view' file?

$this->widget('bootstrap.widgets.TbDetailView',array(
    'data'=>$model,
    'attributes'=>array(
        ...
    ),
));


View PostChris83, on 19 June 2013 - 07:36 AM, said:

EDIT: The grid view styles are now also fixed.


The sort arrow looks nice now. :) However, the summary text is still displayed at the bottom of grid (as shown in the attached picture). Did you really intend to set it as the default setting of TbGridView?

Attached File(s)


This post has been edited by rei: 20 June 2013 - 10:02 PM

0

#18 User is offline   yujin1st 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 13-November 12

Posted 21 June 2013 - 07:13 AM

Hello Chris!
I'm trying to swich a project from yii-bootstrap, and have some troubles\questions.
1. TbNav (type is set to tabs) raise a warning if dropdown item has an url property.
<?php $this->widget('bootstrap.widgets.TbNav', array(
      'type' => 'tabs',
      'items' => array(
        array('label' => 'tab1', 'url' => array('my/action1')),
        array('label' => 'tab2', 'url' => array('my/action2')),
        array('label' => 'dropdown', 'url' => array('my/showSubActions'), 'items' => $items),
?>

If I remove url from last item it works fine. In old yii-bootstap all works fine.
Error:

Quote

htmlspecialchars() expects parameter 1 to be string, array given
W:\domains\framework\web\helpers\CHtml.php(98)


2. TbDetailView.
I use it everywhere in project and temporary I've got it entirely from YiiWheel as you mentioned before. Will it be changed completely, and how soon can we expect it?
2.1. Some styles are wrong - titles and fields are not aligned each to other (see "old" and "new" screenshots), although i've added .detail-view styles to yiistrap.css.
2.2. I see, in wheels' widget elements count have moved down the list. But it layouts on separate lines (see screenshot). Wouldn't it be nice to place it on the same line?

3. Suggestion to switch off a responsive desing by adding a couple parameters: https://github.com/C...strap/issues/46

4. checkBoxListControlGroup uncheckValue - option for hidden element: 'null' - doesn't work.
https://github.com/C...strap/issues/47

Attached File(s)


0

#19 User is offline   pappfer 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 04-January 11

Posted 26 June 2013 - 01:48 AM

Hi,
I'm developing a new Yii application and I decided to use Yiistrap + Yiiwheels. In the past I used both Yii Bootstrap and YiiBooster and I was satisfied with them.

To be honest I preferred the way those were working (simpler API for me, the method names were better IMO) but if I understand it correctly Yiistrap is going to be faster and more lightweight.

As Yiiwheels doesn't have a topic here let me ask you whether you know any release date of it? I want to use the fileupload widget included there but it has many errors at the moment.

About Yiistrap, do I understand it correctly that when Bootstrap 3 will be released you're going to release a new extension for it? So if I start using Yiistrap now and if Bootstrap 3 is released next week then will I have to rewrite my code to use that?

PS: thank you for your great work!
0

#20 User is offline   Stefano Mtangoo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 127
  • Joined: 02-January 12
  • Location:Dar es Salaam, Tanzania

Posted 29 June 2013 - 01:26 PM

Hi Cris,
Any documented difference between this and YiiBooster?
Does it include gallery widget?
And God said, Let there be science...and it was so!
Training Manager Written in Yii here
0

Share this topic:


  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • 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