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

Jump to content

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

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

#41 User is offline   Chris83 

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

Posted 29 November 2011 - 04:38 PM

View PostDaniel, on 11 November 2011 - 04:47 AM, said:

Hi Chris,

Disregard last post since I re-think and it would be unwise to display error message summary as BootAlert. The reason is that the BootAlert will be hidden/closed after some times. Instead, I just set the error message text as "Failed on ......" as the information and let the error for each attribute shown next to the textfield

Next question,

In my situation, I put the BootAlert on the layout/main.php. Hence, global position for error message. And below is my view admin.php code which contains afterDelete on the CGridView

As your instruction on the previous message I can display the error message upon ajax call. BootAlert is displayed as expected. However, one thing that is annoy me a little bit. The BootAlert is not closed automatically. I need to press on "X" to close the error message. If not closed, it will stack to each other.

Any help on this?

Cheers,

Daniel


Hey Daniel,

This is a know issues which was fixed in version 0.9.4. Please upgrade to fix this issue.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#42 User is offline   almix 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 23-September 11

Posted 30 November 2011 - 06:53 AM

Chris!
I try to make my cmenu with dropdown, use menu as in bootstrap examples with that classes, but javascript doesn't work. Did you use "bootstrap-dropdown.js" in this extension?

it works if i put bootstrap-dropdown.js for example in scripts directory and call <script src="/scripts/bootstrap-dropdown.js"/> in my layout. But think it's not properly way...
0

#43 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 30 November 2011 - 07:04 AM

View PostBruno Piaui, on 27 November 2011 - 12:10 PM, said:

Good afternoon gentlemen,

I am using the bootstrap extension and I can not make the button to open a modal screen work. How to close the screen.

The following code:

<a id="linkContatos" class="btn" data-controls-modal="dialogoContato" data-backdrop="true" data-keyboard="true" >Inserir novo contato</a>
                    </div>

                    <?php
                            $this->beginWidget('ext.bootstrap.widgets.BootModal',array(
                                    'id'=>'dialogoContato',
                                    'options'=>array(
                                            'title'=>'Inserir um novo contato',
                                            'backdropClose'=>false,
                                            'escapeClose'=>false,
                                            'open'=>true,
                                            //'closeTime'=>350,
                                            //'openTime'=>1000,
                                            'buttons'=>array(
                                                    array(
                                                            'label'=>'Salvar Contato',
                                                            'class'=>'btn primary',
                                                            'click'=>'js:salvarContato',
                                                    ),
                                                    array(
                                                            'label'=>'Cancelar',
                                                            'class'=>'btn primary',
                                                            'click'=>'js:function(){ $(this).modal("hide");}',
                                                    ),
                                            ),     
                                    ),
                            ));
                    ?>       
                    <div>
                            <?php echo $this->renderPartial('../contatos/_form_clientes', array('model'=>new Contatos)); ?>
                    </div>
                    <?php $this->endWidget(); ?>


I know qa modal screen is working since I left open automatically. The only problem is the buttons to open and close work right.

Thanks,
Bruno Piaui

ps: I'm sorry "English". I am Brazilian and I'm using google translation ;D



anyone know?
0

#44 User is offline   Chris83 

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

Posted 30 November 2011 - 01:56 PM

View PostBruno Piaui, on 30 November 2011 - 07:04 AM, said:

anyone know?


Here are some samples for opening and closing the modal.

<a href="#" onclick="$('#modal').bootModal('open'); return false;">Open</a>

js:function() {
	$('#modal').bootModal('close');
	return false;
}

Assuming that 'modal' is your modal's id.

I hope this helps.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#45 User is offline   Chris83 

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

Posted 30 November 2011 - 01:59 PM

View Postalmix, on 30 November 2011 - 06:53 AM, said:

Chris!
I try to make my cmenu with dropdown, use menu as in bootstrap examples with that classes, but javascript doesn't work. Did you use "bootstrap-dropdown.js" in this extension?

it works if i put bootstrap-dropdown.js for example in scripts directory and call <script src="/scripts/bootstrap-dropdown.js"/> in my layout. But think it's not properly way...


Hey almix,

The menu widget is actually next on my TODO.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#46 User is offline   Chris83 

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

Posted 30 November 2011 - 04:57 PM

Version 0.9.5 is now live!
http://www.yiiframew...strap-0.9.5.zip

What's new?
  • Added support for input lists
  • Combined BootTabs and BootPills to BootMenu
  • Moved all widgets under the same folder
  • Removed BootHtml
  • Renamed BootInputBlock to BootInput
  • Renamed the block methods in BootActiveForm to row

Please note that from 0.9.5 forward BootInputBlock is called BootInput and all the "block" methods in BootActiveForm have been replaced with "row" methods, e.g. textFieldBlock is now called textFieldRow.

BootGridView has been moved into the widgets folder and BootTabs and BootPills have been combined into BootMenu. In addition to this BootHtml has been removed.


What's next?
  • jQuery UI widget for BootMenu
  • BootTopbar

Where's the LESS support?
I'm planning to release my LESS-extension soon which can be used together with Bootstrap to allow you to use all the mixins etc. Bootstrap provides.

Enjoy!
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#47 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 01 December 2011 - 10:19 AM

View PostChris83, on 30 November 2011 - 01:56 PM, said:

Here are some samples for opening and closing the modal.

<a href="#" onclick="$('#modal').bootModal('open'); return false;">Open</a>

js:function() {
	$('#modal').bootModal('close');
	return false;
}

Assuming that 'modal' is your modal's id.

I hope this helps.



Chris83,
thank you!
now able to open and close the modal window.
one question, how do I get the fields and labels with the original formatting?
when I open the form with the fields are up and when the labels are displayed by the modal window the labels are beside the fields and the fields glued one after another.
0

#48 User is offline   Chris83 

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

Posted 01 December 2011 - 03:05 PM

View PostBruno Piaui, on 01 December 2011 - 10:19 AM, said:

Chris83,
thank you!
now able to open and close the modal window.
one question, how do I get the fields and labels with the original formatting?
when I open the form with the fields are up and when the labels are displayed by the modal window the labels are beside the fields and the fields glued one after another.


Please provide me with a screenshot and I might be able to help.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#49 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 01 December 2011 - 03:42 PM

View PostChris83, on 01 December 2011 - 03:05 PM, said:

Please provide me with a screenshot and I might be able to help.


Attached File  Sem título.png (16.33K)
Number of downloads: 135
0

#50 User is offline   lightglitch 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 05-January 10

Posted 01 December 2011 - 03:51 PM

View PostChris83, on 30 November 2011 - 04:57 PM, said:

Version 0.9.5 is now live!


Very nice update, thx.
0

#51 User is offline   yiiesss 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 10-August 11

Posted 01 December 2011 - 04:02 PM

hi ,

thanx for this great job , it's a very useful extention.

My problem is that i have editet the less files and want to regenerate them but i can't fo it with your extention. Can you please tel me how to do it ?

thank you very much
0

#52 User is offline   Chris83 

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

Posted 01 December 2011 - 04:52 PM

View PostBruno Piaui, on 01 December 2011 - 03:42 PM, said:



Hey,

Use the "row" methods to output the form fields, e.g.:

<?php $form->textFieldRow($model,'name',array('class'=>'span4')) ?>

Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#53 User is offline   Chris83 

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

Posted 01 December 2011 - 04:54 PM

View Postyiiesss, on 01 December 2011 - 04:02 PM, said:

hi ,

thanx for this great job , it's a very useful extention.

My problem is that i have editet the less files and want to regenerate them but i can't fo it with your extention. Can you please tel me how to do it ?

thank you very much


Hey yiiesss,

You can do this using my LESS extension I released today:
http://www.yiiframew...extension/less/
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#54 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 01 December 2011 - 05:22 PM

View PostChris83, on 01 December 2011 - 04:52 PM, said:

Hey,

Use the "row" methods to output the form fields, e.g.:

<?php $form->textFieldRow($model,'name',array('class'=>'span4')) ?>



Chris83,
the code with the fields of modal window is already so ...

<?php $form=$this->beginWidget('ext.bootstrap.widgets.BootActiveForm',array(
	'id'=>'contatos-form',
        'stacked'=>true,
	'enableAjaxValidation'=>false,
)); ?>
<div class="hidden">
        <?php echo $form->textFieldRow($model,'id',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'data_cri',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'data_alt',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'criado_por',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'alterado_por',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'id_cliente',array('class'=>'span5')); ?>
</div>

	<?php echo $form->dropDownListRow($model,'tipo',array('Residencial'=>'Residencial', 'Comercial'=>'Comercial', 'Celular'=>'Celular', 'Rádio'=>'Rádio'),array('class'=>'span5','maxlength'=>30)); ?>

	<?php echo $form->textFieldRow($model,'ddd',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'numero',array('class'=>'span5')); ?>

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

0

#55 User is offline   yiiesss 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 10-August 11

Posted 01 December 2011 - 05:35 PM

View PostChris83, on 01 December 2011 - 04:54 PM, said:

Hey yiiesss,

You can do this using my LESS extension I released today:
http://www.yiiframew...extension/less/



seems greeat , tanks ;)
0

#56 User is offline   Chris83 

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

Posted 01 December 2011 - 07:22 PM

View PostBruno Piaui, on 01 December 2011 - 05:22 PM, said:

Chris83,
the code with the fields of modal window is already so ...

<?php $form=$this->beginWidget('ext.bootstrap.widgets.BootActiveForm',array(
	'id'=>'contatos-form',
        'stacked'=>true,
	'enableAjaxValidation'=>false,
)); ?>
<div class="hidden">
        <?php echo $form->textFieldRow($model,'id',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'data_cri',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'data_alt',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'criado_por',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'alterado_por',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'id_cliente',array('class'=>'span5')); ?>
</div>

	<?php echo $form->dropDownListRow($model,'tipo',array('Residencial'=>'Residencial', 'Comercial'=>'Comercial', 'Celular'=>'Celular', 'Rádio'=>'Rádio'),array('class'=>'span5','maxlength'=>30)); ?>

	<?php echo $form->textFieldRow($model,'ddd',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'numero',array('class'=>'span5')); ?>

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



That's weird because the form in your screenshot is not a stacked form. I can't think of anything else right now but please let know what the problem was if you happen to solve this issue.

EDIT: I just thought of something, try adding a fieldset around your visible form rows and see if that helps.

This post has been edited by Chris83: 01 December 2011 - 07:23 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

#57 User is offline   almix 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 23-September 11

Posted 07 December 2011 - 06:52 AM

Hey guys, please help me if you know

I try use CKkceditor for textArea, so i place such code:

<div class="row">
            <?php echo $form->labelEx($model,'content'); ?> 
            <?php //echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50));
                    $this->widget('application.extensions.editor.CKkceditor',array(
                                "model"=>$model,                # Data-Model
                                "attribute"=>'content',         # Attribute in the Data-Model
                                "height"=>'400px',
                                "width"=>'100%',
                                "filespath"=>(!$model->isNewRecord)?Yii::app()->basePath."/../media/paquetes/".$model->idpaquete."/":"",
                                "filesurl"=>(!$model->isNewRecord)?Yii::app()->baseUrl."/media/paquetes/".$model->idpaquete."/":"",
                                )
                            ); 
                ?>
            <?php echo $form->error($model,'content'); ?>
      </div> 


and need not to use textArea therefore, and lose label for 'content' and become out of bootstrap cool design...

are there any salvation to use textArea with CKkceditor extension inside?

may be something like this:
<?php echo $form->textAreaRow($model, 'content'=>array(
            'type'=>'application.extensions.editor.CKkceditor',
            
        ));
        ?>


Thank you!
0

#58 User is offline   Chris83 

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

Posted 07 December 2011 - 10:08 AM

View Postalmix, on 07 December 2011 - 06:52 AM, said:

Hey guys, please help me if you know

I try use CKkceditor for textArea, so i place such code:

<div class="row">
            <?php echo $form->labelEx($model,'content'); ?> 
            <?php //echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50));
                    $this->widget('application.extensions.editor.CKkceditor',array(
                                "model"=>$model,                # Data-Model
                                "attribute"=>'content',         # Attribute in the Data-Model
                                "height"=>'400px',
                                "width"=>'100%',
                                "filespath"=>(!$model->isNewRecord)?Yii::app()->basePath."/../media/paquetes/".$model->idpaquete."/":"",
                                "filesurl"=>(!$model->isNewRecord)?Yii::app()->baseUrl."/media/paquetes/".$model->idpaquete."/":"",
                                )
                            ); 
                ?>
            <?php echo $form->error($model,'content'); ?>
      </div> 


and need not to use textArea therefore, and lose label for 'content' and become out of bootstrap cool design...

are there any salvation to use textArea with CKkceditor extension inside?

may be something like this:
<?php echo $form->textAreaRow($model, 'content'=>array(
            'type'=>'application.extensions.editor.CKkceditor',
            
        ));
        ?>


Thank you!


Hey almix,

You cannot use textAreaRow in your case, please use CActiveForm::textArea instead and see the Bootstrap documentation about the formatting so that you can get the layout correct.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#59 User is offline   joedwy 

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

  Posted 17 December 2011 - 03:25 PM

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

#60 User is offline   Chris83 

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

Posted 19 December 2011 - 06:18 AM

@joedwy: Thank you for the positive feedback. :) It always makes me smile when I hear that I have helped a fellow Yii developer. I agree that the atmosphere in the Yii community is better than most of the framework communities and I hope that we can improve it even further in the future.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

Share this topic:


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

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