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

Jump to content

  • (45 Pages)
  • +
  • « First
  • 41
  • 42
  • 43
  • 44
  • 45
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Bootstrap Bringing together Yii and Twitter Bootstrap Rate Topic: ***** 23 Votes

#841 User is offline   st4nny 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 323
  • Joined: 10-April 12

Posted 08 February 2013 - 05:04 AM

hi, how to fix in bootstrap-responsive.css this:
<div class="nav-collapse in collapse" id="collapse_0" style="height: 136px;">

in this way the dropdown not show, while if I set style="height: auto;" all it's ok. thanks.
0

#842 User is offline   Manee 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 103
  • Joined: 23-September 12

Posted 10 February 2013 - 11:49 AM

hi all. i'm sorry this lines:
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');   return array(     'theme'=>'bootstrap', // requires you to copy the theme under your themes directory     'modules'=>array(         'gii'=>array(             'generatorPaths'=>array(                 'bootstrap.gii',             ),         ),     ),     'components'=>array(         'bootstrap'=>array(             'class'=>'bootstrap.components.Bootstrap',         ),     ), ); 

http://www.cniska.ne...trap/setup.html
must be append which file? append line to controller or config?

This post has been edited by Manee: 10 February 2013 - 11:53 AM

0

#843 User is offline   bit0123 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 01-February 12
  • Location:Bangladesh

Posted 10 February 2013 - 01:06 PM

Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');   return array(     'theme'=>'bootstrap', // requires you to copy the theme under your themes directory     'modules'=>array(         'gii'=>array(             'generatorPaths'=>array(                 'bootstrap.gii',             ),         ),     ),     'components'=>array(         'bootstrap'=>array(             'class'=>'bootstrap.components.Bootstrap',         ),     ), ); 

http://www.cniska.ne...trap/setup.html
must be append in which file? append line to controller or config?
[/quote]

Answer: config file.
0

#844 User is offline   Ashish Kulkarni 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-August 09

Posted 13 February 2013 - 10:35 AM

Hi Chris,

First of all, thanks for your efforts.

I have a couple of questions.

1. While Bootstrap does a fantastic job out of the box, for certain aspects, I would need to either customise it or perhaps, buy a professional theme. How easy is it to use a custom theme with Yii-bootstrap?

2. I am working on a new project where I am hoping to use Yii-bootstrap. Are there any set of steps that I need to take?

3. Is there anything I need to be aware of?

And a few off-topic things:

1. How well does Yii-bootstrap work with jQuery Datatables?

2. How can I plug in jQuery Form Validator with Yii-bootstrap?

Best Regards,

Ashish.
0

#845 User is offline   cappadochian 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 147
  • Joined: 02-January 11

Posted 19 February 2013 - 06:40 AM

Hi Guys,

awesome extension!
can you please help me with this:
http://www.cniska.ne...strap/#tbNavbar Content section is too close to the navbar. The "Welcome to..." title is a little bit merged into (or rather slipped under) the navbar. How can I adjust this?

and how can I make 'active' property appear properly? I mean, it's now hardcoded in the example, right? how can I make it dynamic, to be active depending on what page is actually loaded?

thanks a lot!
BR
c
0

#846 User is offline   shreyas d 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 16-July 12

Posted 20 February 2013 - 07:46 AM

how can i use bootstrap.widgets.TbModal to open a module/view/id in link.
my code is something like this

$columns = array(
array( // display 'create_time' using an expression
'name'=>'ons_id',
'type'=>'raw',
'value'=>'CHtml::link($data->ons_id,"",array("href"=>\'index.php/onsLog/view/\'.$data->ons_id.\'\', "data-toggle"=>"modal" ))',
),

where on click of link the popup should get open and view should be displayed in popup.

thanks in advance
0

#847 User is offline   Ehsan Bahrami 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 01-January 13

Posted 24 February 2013 - 03:40 PM

i want to use menu bar of bootstrap in dynamic way,for example:
how can i use a loop for example foreach in an array like:
array(foreach(...),).....
i know that it isn't correct to use foreach in array but i want to help me to know a way to do somthing like that
i want to create an array for items property of TbMenu widget.
0

#848 User is offline   Daniel 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 214
  • Joined: 26-September 09

Posted 04 March 2013 - 10:17 PM

Hi All,

I used TbModal to create a new record. One of the field is date. I used bootstrap-datepicker for the date. My problem is that the format is not applied when the field is didplayed using TbModal. However, it works ok when we use normal page.

Below is my javascript to display modal and add datepicker capability:
function createPaymentForm() {
        $.getJSON("<?php echo Yii::app()->createUrl('/salesPayment/load', array('id' => 0, 'salesFk' => $model->id)); ?>",
                function(data) {
                    $('#modalHeader').html('Tambah pembayaran');
                    $('#modalContent').html(data.formModal);
                    $('#sales-payment-form').attr('action', data.url);
                    $('#mySubmitButton').html('Tambah');
                    $('#mySubmitButton').attr('onClick', '{submitPaymentForm(); return false;}');
                    $('#modal').modal('show');
                    $('#SalesPayment_date').datepicker({format: 'dd-mm-yyyy', autoclose: true});
                });
    }


Can anyone help?

Kind regards,

Daniel
0

#849 User is offline   jmccormick00 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 06-March 13

Posted 07 March 2013 - 12:22 PM

View PostDaniel, on 04 March 2013 - 10:17 PM, said:

Hi All,

I used TbModal to create a new record. One of the field is date. I used bootstrap-datepicker for the date. My problem is that the format is not applied when the field is didplayed using TbModal. However, it works ok when we use normal page.

Below is my javascript to display modal and add datepicker capability:
function createPaymentForm() {
        $.getJSON("<?php echo Yii::app()->createUrl('/salesPayment/load', array('id' => 0, 'salesFk' => $model->id)); ?>",
                function(data) {
                    $('#modalHeader').html('Tambah pembayaran');
                    $('#modalContent').html(data.formModal);
                    $('#sales-payment-form').attr('action', data.url);
                    $('#mySubmitButton').html('Tambah');
                    $('#mySubmitButton').attr('onClick', '{submitPaymentForm(); return false;}');
                    $('#modal').modal('show');
                    $('#SalesPayment_date').datepicker({format: 'dd-mm-yyyy', autoclose: true});
                });
    }


Can anyone help?

Kind regards,

Daniel


Daniel,
I am trying to achieve the same thing however, I can not get it to work. I am new to Yii and there just doesnt seem to be any tutorials for tbModal. Could you post how you created a model with the tbModal widget?
0

#850 User is offline   semprul 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 10-January 12

Posted 09 March 2013 - 03:46 AM

hi..
i have some problem when using CLEditor with bootstrap installed.
the CLEditor became a default textarea.
Are there any setting i've miss?
Thanks anyway
0

#851 User is offline   Boula7ya El Fertass 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 27-January 11
  • Location:Algiers, Algeria

Posted 04 April 2013 - 05:58 PM

View Postjoedwy, on 17 December 2011 - 03:25 PM, said:

Hey @Chris83 --- just wanted to drop by to say how much I appreciate your Bootstrap extension. Great stuff... it has saved me a bunch of time. Awesome! I'd have posted it to the extension page, but I'm too new. :-)

And now I see that you've made a LESS extension... thanks again! For anyone else out there using the Bootstrap extension, you might want to check out the LESS extension as well: http://www.yiiframew...extension/less/

Really liking the vibe here in the Yii community. Seems to be an unusual combination of talented, friendly, and helpful people. Some other frameworks I've used had a very different feel.


Thanks to the talented, friendly, and helpful people
0

#852 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 10 April 2013 - 06:56 AM

Hey Chris,

Thanks for the nice extension.:)

Could you please help my out to configure Gii module with your extension.since i am unable to configure it with your mention configuration in document for this extension.

Looking forward to hear from you.

Thanks in Advance.

Thanks and Regards,
CodeSutra
0

#853 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 10 April 2013 - 07:02 AM

Ok,

So i have resolved that error. :) Looking forward to dig into in it more.

Thanks again for awesome extension.
CodeSutra
0

#854 User is offline   rooney10 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 29-August 12

Posted 12 April 2013 - 04:47 PM

Today I updated to the Version 2.1.0 and I had the problem that bootstrap didn't load as expected. When googling the problem I found out, that more people had this problem. A solution that worked for me can be found here:
http://stackoverflow...15128829/720508

So also my question: Why is that not mentioned in the installation guide, or am I doing something wrong?
Can someone clarify that for me?

Thx!


Edit: Seems like that with the procedure you can include bootstrap only where you need it. Still without clarifying it, it is a bit confusing ;)

This post has been edited by rooney10: 12 April 2013 - 04:54 PM

0

#855 User is offline   migueArgentina 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 09-March 11

Posted 02 May 2013 - 02:49 PM

Hello everyone!

I'm using this AWESOME extension and I was wondering: how can I get a footer like the one in the Bootstrap oficial page??

Thanks in advance.
0

#856 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 02 May 2013 - 02:52 PM

<footer class="footer">
  	<div class="container">
    	<p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
    	<p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
    	<p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
    	<ul class="footer-links">
      	<li><a href="http://blog.getbootstrap.com">Blog</a></li>
      	<li class="muted">·</li>
      	<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Issues</a></li>
      	<li class="muted">·</li>
      	<li><a href="https://github.com/twitter/bootstrap/blob/master/CHANGELOG.md">Changelog</a></li>
    	</ul>
  	</div>
	</footer>


footer {
	text-align: center;
	padding: 30px 0px;
	margin-top: 70px;
	border-top: 1px solid rgb(229, 229, 229);
	background-color: rgb(245, 245, 245);
}

"Less noise - more signal"
0

#857 User is offline   migueArgentina 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 09-March 11

Posted 03 May 2013 - 06:51 PM

Thanks, Jacmoe!
0

#858 User is offline   migueArgentina 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 09-March 11

Posted 09 May 2013 - 07:19 PM

Suppose we have:
- 'updatePassword.php' <-- a form with password, newPassword and newPasswordRepeat fields
- 'updateEmail.php' <----- a form with password and email fields
- 'update.php' <---------- view with a TbTabs widget with the following code:

<?php $this->widget('bootstrap.widgets.TbTabs', array(
    'tabs'=>array(
        array(
            'id'=>'tab1',
            'active'=>true,
            'label'=>'Actualizar Dirección Email',
            'content'=>$this->renderPartial('/site/index', array('model'=>$model),true)
        ),
        array(
            'id'=>'tab2',
            'active'=>false,
            'label'=>'Actualizar Clave',
            'content'=>$this->renderPartial('updatePassword', array('model'=>$model),true)
        ),
    ),
)); ?>


The code in updatePassword (updateEmail is similar) is:

<div class="form">
    <?php /** @var BootActiveForm $form */
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'id'=>'horizontalForm',
        'type'=>'horizontal',
        'enableClientValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true,
        ),
    )); ?>
    <p class="note">Los campos marcados con <span class="required">*</span> son obligatorios.</p>
    <br/>
    <fieldset>
        <?php echo $form->passwordFieldRow($model, 'password', array('class'=>'span3', 'value'=>'','labelOptions'=>array('label'=>'Clave Anterior'))); ?>
        <?php echo $form->passwordFieldRow($model, 'passwordNew', array('class'=>'span3', 'value'=>'','labelOptions'=>array('label'=>'Clave Nueva'))); ?>
        <?php echo $form->passwordFieldRow($model, 'passwordNewRepeat', array('class'=>'span3', 'value'=>'','labelOptions'=>array('label'=>'Repita la Clave Nueva'))); ?>
    </fieldset>

    <div class="form-actions">
        <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'type'=>'primary', 'label'=>'Guardar')); ?>
        <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'reset', 'label'=>'Borrar')); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->


Also we have the corresponding actions in UserController, actionUpdatePassword and actionUpdateEmail.

My problem is that I don't know how to call the right action inside actionUpdate after the user clicked on 'Submit'.

How can I get this to work? Am I clear enough?

Thanks in advance.
0

#859 User is offline   Devendra411 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 151
  • Joined: 09-April 13
  • Location:Bangalore

Posted 09 May 2013 - 11:08 PM

Can i know how to reduce width and how to change background color in boot strap extension. i'm using this awesome extension.
0

#860 User is offline   cappadochian 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 147
  • Joined: 02-January 11

Posted 12 May 2013 - 02:52 AM

View PostmigueArgentina, on 09 May 2013 - 07:19 PM, said:

Suppose we have:
- 'updatePassword.php' <-- a form with password, newPassword and newPasswordRepeat fields
- 'updateEmail.php' <----- a form with password and email fields
- 'update.php' <---------- view with a TbTabs widget with the following code:

<?php $this->widget('bootstrap.widgets.TbTabs', array(
    'tabs'=>array(
        array(
            'id'=>'tab1',
            'active'=>true,
            'label'=>'Actualizar Dirección Email',
            'content'=>$this->renderPartial('/site/index', array('model'=>$model),true)
        ),
        array(
            'id'=>'tab2',
            'active'=>false,
            'label'=>'Actualizar Clave',
            'content'=>$this->renderPartial('updatePassword', array('model'=>$model),true)
        ),
    ),
)); ?>


The code in updatePassword (updateEmail is similar) is:

<div class="form">
    <?php /** @var BootActiveForm $form */
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'id'=>'horizontalForm',
        'type'=>'horizontal',
        'enableClientValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true,
        ),
    )); ?>
    <p class="note">Los campos marcados con <span class="required">*</span> son obligatorios.</p>
    <br/>
    <fieldset>
        <?php echo $form->passwordFieldRow($model, 'password', array('class'=>'span3', 'value'=>'','labelOptions'=>array('label'=>'Clave Anterior'))); ?>
        <?php echo $form->passwordFieldRow($model, 'passwordNew', array('class'=>'span3', 'value'=>'','labelOptions'=>array('label'=>'Clave Nueva'))); ?>
        <?php echo $form->passwordFieldRow($model, 'passwordNewRepeat', array('class'=>'span3', 'value'=>'','labelOptions'=>array('label'=>'Repita la Clave Nueva'))); ?>
    </fieldset>

    <div class="form-actions">
        <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'type'=>'primary', 'label'=>'Guardar')); ?>
        <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'reset', 'label'=>'Borrar')); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->


Also we have the corresponding actions in UserController, actionUpdatePassword and actionUpdateEmail.

My problem is that I don't know how to call the right action inside actionUpdate after the user clicked on 'Submit'.

How can I get this to work? Am I clear enough?

Thanks in advance.

I suppose:
if (isset($_POST['horizontalForm'])) {
            $model->setAttributes($_POST['horizontalForm']);

            if ($model->save()) {
                if (Yii::app()->getRequest()->getIsAjaxRequest())
                    Yii::app()->end();
                else
                    $this->redirect(array('admin'));
            }
        }

0

Share this topic:


  • (45 Pages)
  • +
  • « First
  • 41
  • 42
  • 43
  • 44
  • 45
  • 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