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

Jump to content

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

#21 User is offline   AussieNeil 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 25-January 13

Posted 02 July 2013 - 07:44 AM

Hi,
I don't know if this is the right area to write this in but I will anyway.

I want to do nested Grid's and I was going to use Yii-Booster and actually started to but then saw that this is the new and improved version thereof. So I hop over to try and notice that there are bits and pieces.

So can I
1. use Yiistrap to do this and if so how,
2. do I need to use Yiiwheels? But for Yiiwheels there is only a github with very little info
3. or should I go back to Yii-booster?

Thanks,

Neil
0

#22 User is offline   onikandish 

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

Posted 19 July 2013 - 07:37 PM

does anybody know how i can include a css file after register() function (to override it)
because yiistrap's css files include at the end of everything.
thanks
0

#23 User is offline   X-Loading 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 31-October 11

Posted 20 July 2013 - 06:33 AM

Hi Chris,

Thanks a lot for all the great work you're doing!

I have a couple of questions regarding TbModal widget which is currently present in both Yiistrap and Yiiwheels:

1) Which one I should use? What is the difference between them?

2) How I can place another widget in the body of modal using Yiistrap or Yiiwheels? Previously I've used YiiBooster and it allowed to place anything in between of beginWidget and endWidget but in these new widgets I'm supposed to fill in 'header', 'content' and 'footer' attributes instead so it is not clear to me how I can place my custom php code (e.g. widgets, renderpartial etc.) in there?

Thank you in advance!
0

#24 User is offline   wannabe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-July 13

Posted 22 July 2013 - 12:08 PM

View PostChris83, on 17 June 2013 - 04:24 PM, said:

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).


Hi,

When I try to use datepicker I get an error. I have in my VIEW:

    <div class="input-append">
    <?php $this->widget('yiiwheels.widgets.datepicker.WhDatePicker', array(
    'name' => 'datepickertest',
    'pluginOptions' => array(
    'format' => 'mm/dd/yyyy'
    )
    ));
    ?>
    <span class="add-on"><icon class="icon-calendar"></icon></span>
    </div>


and in the start of my ../layouts/main.php
<?php /* @var $this Controller */ ?>
<?php Yii::app()->bootstrap->registerAllScripts(); ?>
...
..
.


The error I get is:

Fatal error: Call to a member function getApi() on a non-object in C:\wamp\www\test\protected\extensions\yiiwheels\behaviors\WhPlugin.php on line 43

Anyone has any idea what I am doing wrong?
0

#25 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 643
  • Joined: 29-November 08
  • Location:Paris, France

Posted 22 July 2013 - 03:40 PM

Hi wannabe,
I think this is a YiiWheels issue, and not YiiStrap. I had the same problem and after I declared the component yiiwheels in the maon configuration file, everything worked fine.

'yiiwheels' => array( 	
  	'class' => 'yiiwheels.YiiWheels', 
),

Hope this helps
ciao
B)
0

#26 User is offline   wannabe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-July 13

Posted 22 July 2013 - 04:01 PM

View PostRaoul, on 22 July 2013 - 03:40 PM, said:

Hi wannabe,
I think this is a YiiWheels issue, and not YiiStrap. I had the same problem and after I declared the component yiiwheels in the maon configuration file, everything worked fine.

'yiiwheels' => array( 	
  	'class' => 'yiiwheels.YiiWheels', 
),

Hope this helps
ciao
B)


Yup that did it :-)
I thought so already something in these lines. But I wasn't quite sure what to do.

Another 'thingy' I have is that the input boxes are too narrow. Should I declare the CSS somewhere as well to make it right?

Oh and also
<?php Yii::app()->bootstrap->registerAllScripts(); ?>


Throws off the CSS completely. I use instead:
<?php Yii::app()->bootstrap->register(); ?>


I thought that RegisterAllScripts will register everything and therefor everything should work as it should .. Perhaps the documentation can be more clear on these matters.
0

#27 User is offline   X-Loading 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 31-October 11

Posted 22 July 2013 - 05:33 PM

View PostRaoul, on 22 July 2013 - 03:40 PM, said:

Hi wannabe,
I think this is a YiiWheels issue, and not YiiStrap. I had the same problem and after I declared the component yiiwheels in the maon configuration file, everything worked fine.

'yiiwheels' => array( 	
  	'class' => 'yiiwheels.YiiWheels', 
),

Hope this helps
ciao
B)

Yep, had exactly the same issue and created one on Github but Antonio didn't seem to understand my explanation :rolleyes:
https://github.com/2...heels/issues/31
0

#28 User is offline   yogeshbansal 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 22-July 13

Posted 22 July 2013 - 07:20 PM

how to use bootswatch themes with yiistrap extension in yii
0

#29 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 643
  • Joined: 29-November 08
  • Location:Paris, France

Posted 23 July 2013 - 02:37 AM

Hi Yogeshbansal,
here is what I did. I don't think that's good practise because it modifies the yiistrap extension folder (which is not good).

Anyway assuming yiistrap is installed in extensions/bootstrap :

  • duplicate the folder extensions/bootstrap/assets/css and rename it css.original (or backup)
  • download bootstrap.css and bootstrap.min.css from bootswatch and copy them into extensions/bootstrap/assets/css
  • remove all files from webapp/assets
  • refresh page



hope it helps

ciao

B)
0

#30 User is offline   wannabe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-July 13

Posted 23 July 2013 - 03:51 PM

I am lost with CSS issues when using YiiStrap & Wheels, btw I had exactly the same problem with Yii-Booster.

The main problem is that the textields are too narrow and some widgets are not displayed properly. I read on stackexchange that Yii CSS is overriding Yiistrap CSS. So I removed the CSS references in layout/main.php and things got a bit better. However still the textfields are too narrow in width and height (see picture, one from Mozilla and the other from IE). If I check the same page on IE9, the textfields are soo narrow that you cannot read the text any longer.

My layout/main.php starts as follows:

<?php /* @var $this Controller */ ?>


<?php Yii::app()->bootstrap->registerYiistrapCss(); ?>
<?php  Yii::app()->bootstrap->register(); ?>
<?php Yii::app()->bootstrap->registerAllScripts();   ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
...
...


I also tried only using ->register() and other variations, however nothing seems to resolve my issue.

How can I fix these problems? Its very annoying.

Attached File(s)


0

#31 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 643
  • Joined: 29-November 08
  • Location:Paris, France

Posted 24 July 2013 - 03:23 AM

try to call only :

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


I'm using the latest version downloaded from http://www.getyiistrap.com and it works fine.
0

#32 User is offline   wannabe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-July 13

Posted 24 July 2013 - 04:38 AM

View PostRaoul, on 24 July 2013 - 03:23 AM, said:

try to call only :

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


I'm using the latest version downloaded from http://www.getyiistrap.com and it works fine.



I tried that, but no luck.

What I basically do is a clean install of Yii, create a webapp and then install Yiistrap & Wheels.

The only two things I change is config/main.php to add Yiistrap & Wheels

And I change layout/main.php , in this document I remove all CSS references and add a Yii Navbar.

I then create a new controller and a view, and in my view I put the Yiistrap widgets.

I cleaned out the folder 'Assets' and reload the page. And presto the above mentioned problems are there.

Do I perhaps miss something ? Do I need to add a <div> or load CSS somewhere?

Perhaps someone can share their layout/main.php file with me? Or even better, share their controller & view with a working version of timepicker?

EDIT: After reinstalling everything it works like a charm. No idea why.
0

#33 User is offline   leo4all 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 01-April 13
  • Location:Alajuela, Costa Rica

Posted 24 July 2013 - 05:08 PM

Does anyone guide me how to replace Yiibooster with YiiStrap and YiiWheels On YiiBoilerplate.

Best Regards.
0

#34 User is offline   wannabe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-July 13

Posted 25 July 2013 - 03:02 PM

Hi,

Can someone be as kind to explain to me on how to use the code below in Yiistrap format?

echo $form->label($model,'product'); 
echo $form->textField($model,'product',array(
  'style'=>'width:250px;') );


I have been fiddling with

echo TbHtml::textField('text', '', array('placeholder' => 'Type something...'));

thanks in advance :)
0

#35 User is offline   rei 

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

Posted 26 July 2013 - 09:45 AM

View Postwannabe, on 25 July 2013 - 03:02 PM, said:

Can someone be as kind to explain to me on how to use the code below in Yiistrap format?

echo $form->label($model,'product'); 
echo $form->textField($model,'product',array(
  'style'=>'width:250px;') );




I think you can use textFieldControlGroup:

echo $form->textFieldControlGroup($model, 'product', array('class'=>'span3'));

Fipick - Find and pick recommendations
0

#36 User is offline   wannabe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-July 13

Posted 26 July 2013 - 12:19 PM

View Postrei, on 26 July 2013 - 09:45 AM, said:

I think you can use textFieldControlGroup:

echo $form->textFieldControlGroup($model, 'product', array('class'=>'span3'));



yeah works perfectly. thanks a lot !

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL,));

echo $form->textFieldControlGroup($model, 'product',
array('help' => 'In addition to freeform text, any HTML5 text-based input appears like so.'));

$this->endWidget();

0

#37 User is offline   supernugy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 26-July 13

Posted 26 July 2013 - 12:44 PM

Extension looks good, I will try it out soon.
0

#38 User is offline   X-Loading 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 31-October 11

Posted 31 July 2013 - 01:17 AM

View PostX-Loading, on 20 July 2013 - 06:33 AM, said:

Hi Chris,

Thanks a lot for all the great work you're doing!

I have a couple of questions regarding TbModal widget which is currently present in both Yiistrap and Yiiwheels:

1) Which one I should use? What is the difference between them?

2) How I can place another widget in the body of modal using Yiistrap or Yiiwheels? Previously I've used YiiBooster and it allowed to place anything in between of beginWidget and endWidget but in these new widgets I'm supposed to fill in 'header', 'content' and 'footer' attributes instead so it is not clear to me how I can place my custom php code (e.g. widgets, renderpartial etc.) in there?

Thank you in advance!

Is there anyone able to answer this? I still have no idea how to put widget inside new TbModal :(
0

#39 User is offline   bonnie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 08-February 11

Posted 01 August 2013 - 09:58 PM

Am trying to create a link button as per the following code but the link is not working. In yiibooster it used to work. Any idea how to fix it.
<?php
echo TbHtml::button('Forgot Password',
array(
'color' => TbHtml::BUTTON_COLOR_PRIMARY,
'url'   => Yii::app()->createUrl('user/forgotpassword'),
));
?>

0

#40 User is offline   bonnie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 08-February 11

Posted 01 August 2013 - 10:03 PM

View PostX-Loading, on 31 July 2013 - 01:17 AM, said:

Is there anyone able to answer this? I still have no idea how to put widget inside new TbModal :(

This is how I did for my login form widget.

<?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'id'=>'login-form',
'enableClientValidation' => true,
 )); ?> 
<fieldset>
<?php echo $form->textFieldControlGroup($model, 'username',  array('label' => 'Username', 'placeholder' => 'Username')); ?>
<?php echo $form->passwordFieldControlGroup($model, 'password',  array('label' => 'Password', 'placeholder' => 'Password')); ?>
<?php echo $form->checkBoxControlGroup($model, 'rememberMe'); ?>
</fieldset>
<?php echo TbHtml::formActions(array(
TbHtml::submitButton('Login', array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'id' => 'loginBtn', 'class'=>'btn btn-info')),
)); ?>
<?php $this->endWidget(); ?>

0

Share this topic:


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

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

  1. kAIOSHIN