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

Jump to content

  • (45 Pages)
  • +
  • « First
  • 29
  • 30
  • 31
  • 32
  • 33
  • 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

#601 User is offline   Müller 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 23-June 12
  • Location:Netherlands

Posted 02 August 2012 - 05:18 PM

Hi Chris,

Here is some simple idea that could be easily added on a comming release.

There idea was to have the same as in this example from bootstrap home:
twitter.github.com/bootstrap/examples/fluid.html

A button, or other sub-menus that don't collapse on the NavBar. So I created a new class that extends from the TbNavBar, add a new property $fixedItem and render them just after the brand link and before the collapse check.

Here is the full class that extends from TbNavBar
<?php
Yii::import('ext.bootstrap.widgets.TbNavbar');

class TbwNavbar extends TbNavbar {
	public $fixedItems = array();

	/**
	 * Runs the widget.
	 */
	public function run() {
		$containerCssClass = $this->fluid ? 'container-fluid' : 'container';

		echo CHtml::openTag('div', $this->htmlOptions);
		echo '<div class="navbar-inner"><div class="' . $containerCssClass . '">';

		if ($this->collapse) {
			echo '<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">';
			echo '<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>';
			echo '</a>';
		}

		if ($this->brand !== false)
			echo CHtml::openTag('a', $this->brandOptions) . $this->brand . '</a>';

		foreach ($this->fixedItems as $item) {
			if (is_string($item))
				echo $item;
			else {
				if (isset($item['class'])) {
					$className = $item['class'];
					unset($item['class']);

					$this->controller->widget($className, $item);
				}
			}
		}

		if ($this->collapse) {
			$this->controller->beginWidget('bootstrap.widgets.TbCollapse', array(
				'toggle'      => false,
				// navbars should be collapsed by default
				'htmlOptions' => array(
					'class' => 'nav-collapse'
				),
			));
		}

		foreach ($this->items as $item) {
			if (is_string($item))
				echo $item;
			else {
				if (isset($item['class'])) {
					$className = $item['class'];
					unset($item['class']);

					$this->controller->widget($className, $item);
				}
			}
		}

		if ($this->collapse)
			$this->controller->endWidget();

		echo '</div></div></div>';
	}
}


And this is config for the TbwNavBar:

$this->widget(
	'bootswatch.widgets.TbwNavbar',
	array(
		'type'       => 'inverse',
		'brand'      => CHtml::tag('div', array(
			'class' => 'navbar-logo'
		), '&nbsp;', true) . Yii::app()->name,
		'brandUrl'   => $this->createUrl('/site/index'),
		'collapse'   => true,
		'items'      => array(
			array(
				'class' => 'bootstrap.widgets.TbMenu',
				'items' => array(
					array(
						'icon'  => 'home white',
						'label' => 'Home',
						'url'   => array(
							'/site/index'
						)
					),
					array(
						'icon'  => 'info-sign white',
						'label' => 'About',
						'url'   => array(
							'/page/view',
							'alias' => 'about'
						)
					),
					array(
						'icon'  => 'bullhorn white',
						'label' => 'Contact',
						'url'   => array(
							'/site/contact'
						)
					),
					array(
						'icon'    => 'cog white',
						'label'   => 'Admin',
						'visible' => (Yii::app()->user->getName() == 'admin'),
						'items'   => array(
							array(
								'label' => 'Dashboard',
								'url'   => array(
									'/admin'
								)
							),
							'<hr>',
							array(
								'label' => 'People',
								'url'   => array(
									'/admin/person'
								)
							),
							array(
								'label' => 'Emails',
								'url'   => array(
									'/admin/email'
								)
							),
							array(
								'label' => 'Subscriptions',
								'url'   => array(
									'/admin/subscription'
								)
							)
						)
					)
				)
			)
		),
		'fixedItems' => array(
			array(
				'class'       => 'bootstrap.widgets.TbButtonGroup',
				'htmlOptions' => array(
					'class' => 'pull-right'
				),
				'buttons'     => array(
					array(
						'class' => 'bootstrap.widgets.TbMenu',
						'icon'  => 'user',
						'label' => Yii::app()->user->name,
						'items' => array(
							array(
								'icon'  => 'list-alt',
								'label' => 'Profile',
								'url'   => array(
									'/user/profile'
								)
							),
							array(
								'icon'  => 'off',
								'label' => 'Logout',
								'url'   => array(
									'/site/logout'
								)
							)
						)
					)
				)
			)

		)
	));


Sure the code is still kind of raw, e.g. the htmlOptions of the fixed button group needs to be set with class 'pull-right' and the property name $fixedItems maybe isn't so good and I'm also duplicating code in the render of $fixedItems, but it works just fine for me.

Looking forward to hear your comments.
0

#602 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 113
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 02 August 2012 - 10:03 PM

View Postallegramente, on 02 August 2012 - 08:32 AM, said:

I would like to ask if I'd be able to put a sort of login-form as one of navbar's dropdown items.


Scenario: Boot/TbNavbar => Boot/TbMenu => li => form.

Try this... (inside the items array of Boot/TbNavbar):

array(
  'class'=>'bootstrap.widgets.TbMenu',
  'htmlOptions'=>array('class'=>'pull-right'),
  'encodeLabel'=>false,
  'items'=>array(				
    array('label'=>'Login', 'url'=>'#', 'items'=>array(

      array('label'=>'<form>
          <input type="text" placeholder="user id" id="userid"/>
          <input type="password" placeholder="password" name="userpassword"/>
        </form>', 
        'url'=>null, 'visible' => Yii::app()->user->isGuest)),

    ),
  ),
),


important:
- 'encodeLabel'=>false ... so the form is not encoded but rendered properly.
- 'url'=>null ... of course you need to add a submit button.

- browser test ... check how it looks like in different browser and OS; please provide feedback for us!

Tested in FF/Safari on Mac OS.


Hope this helps!
-DF
0

#603 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 113
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 02 August 2012 - 10:17 PM

View Postyiistudent, on 02 August 2012 - 01:02 PM, said:

and I got some problem whit this code
echo $form->textFieldRow($model, 'textField', array('class'=>'span3')); 


that code give me error message like this "LoginForm.textField" is not defined"

What I missing whit this error message??


There's nothing missing in the error message, it tells you exactly what's not defined (hence missing in the model class): the attribute name. Make sure you're using an attribute name that is set under rules() in /protected/models/LoginForm.php. Usually you will have something like...

array('username, password', 'required'),
//or
array('email, password', 'required'),


All attributes that require user input need to be added in rules() of the model class.

Cheers,
-DF
0

#604 User is offline   yiistudent 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 15-November 10

Posted 02 August 2012 - 10:39 PM

View PostDon Felipe, on 02 August 2012 - 10:17 PM, said:

There's nothing missing in the error message, it tells you exactly what's not defined (hence missing in the model class): the attribute name. Make sure you're using an attribute name that is set under rules() in /protected/models/LoginForm.php. Usually you will have something like...

array('username, password', 'required'),
//or
array('email, password', 'required'),


All attributes that require user input need to be added in rules() of the model class.

Cheers,
-DF



Thanks..
Don Felipe

i have just define on rule model
but i still have this error message

Quote

Property "TbActiveForm.enableClientValidation" is not defined.

and I try to define whit tis code

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id'=>'verticalForm',
	'enableClientValidation'=>true,
    'htmlOptions'=>array('class'=>'well'),
)); ?>

But there is'nt any changes on that error message,
what this error message means?
Thx
0

#605 User is offline   Chris83 

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

Posted 03 August 2012 - 01:42 AM

@Müller That's an interesting idea, however I probably wouldn't add a fixedItems property but instead allow developers to configure a fixed property per item. What do you think about this solutions? Here's a quick example:

$this->widget('bootstrap.widgets.TbNavbar', array(
	.....
	'items'=>array(
		array(
			'class'=>'bootstrap.widgets.TbMenu',
			.....
			'fixed'=>true, // like so
			'items'=>array(
				array('icon'=>'home white', 'label'=>'Home', 'url'=>array('/site/index'),
				.....
			),
		),
		.....
	),
));

Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#606 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 113
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 03 August 2012 - 01:49 AM

View Postyiistudent, on 02 August 2012 - 10:39 PM, said:

Property "TbActiveForm.enableClientValidation" is not defined.


Client-side validation works fine on my side... the newest alpha and latest 0.x version. Besides, there's no difference on how enableClientValidation is handled in BootActiveForm vs TbActiveForm. Just in case, what Yii and alpha-bootstrap versions do you use?
0

#607 User is offline   Chris83 

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

Posted 03 August 2012 - 02:17 AM

@yiistudent I'd suggest that you don't use an alpha version but instead the stable 0.x version.
Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#608 User is offline   Müller 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 23-June 12
  • Location:Netherlands

Posted 03 August 2012 - 02:22 AM

Hi @Chris83

This was my first idea, the reasons (that I can remember now) why I didn't implement like that was:

- I didn't want to change that much of your code to separate the $items (checking the item fixed property) in 2 arrays before rendering them, one before the TbCollapse and one inside it.

- It could be confuse when you write a code like this:

$this->widget('bootstrap.widgets.TbNavbar', array(
	.....
	'items'=>array(
		array(
			'class'=>'bootstrap.widgets.TbMenu',
			.....
			'fixed'=>false,
			'items'=>array(
				array('icon'=>'home', 'label'=>'Home', 'url'=>array('/site/index'),
				.....
			),
		),
		.....
		array(
			'class'=>'bootstrap.widgets.TbMenu',
			.....
			'fixed'=>true, // This will show on right side of the navbar as by the current idea
			'items'=>array(
				array('icon'=>'magnifier', 'label'=>'Search', 'url'=>array('/site/search'),
				.....
			),
		),
		.....
		array(
			'class'=>'bootstrap.widgets.TbMenu',
			.....
			'fixed'=>false,
			'items'=>array(
				array('icon'=>'bullhorn', 'label'=>'Contact', 'url'=>array('/site/contact'),
				.....
			),
		),
	),
));


Where the middle TbMenu will be displayed last.

But if can come with a neat implementation of the property fixed, I do think it's better.

View PostChris83, on 03 August 2012 - 01:42 AM, said:

@Müller That's an interesting idea, however I probably wouldn't add a fixedItems property but instead allow developers to configure a fixed property per item. What do you think about this solutions? Here's a quick example:

$this->widget('bootstrap.widgets.TbNavbar', array(
	.....
	'items'=>array(
		array(
			'class'=>'bootstrap.widgets.TbMenu',
			.....
			'fixed'=>true, // like so
			'items'=>array(
				array('icon'=>'home white', 'label'=>'Home', 'url'=>array('/site/index'),
				.....
			),
		),
		.....
	),
));


0

#609 User is offline   digitalwingx 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 29-July 12

Posted 03 August 2012 - 05:33 AM

View Postyiistudent, on 02 August 2012 - 01:08 PM, said:

can I see ur code of that example?


Sure only got the code for the screenshot 1 since the #2 code I only changed to it briefly to illustrate my point.

Here is the view bit for #1: (fairly straightforward code really)

<?php $form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array(
    'id' => 'job-form',
    'enableAjaxValidation' => false,
)); ?>

<p class="help-block">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>

<div class="hidden">
    <?php echo $form->uneditableRow($model, 'return_authorisation_id', array('class' => 'span5')); ?>
</div>

<?php echo $form->dropDownListRow(
    $model,
    'job_status_id',
    CHtml::listData(JobStatus::model()->findAll(), 'id', 'title'),
    array(
        'class' => 'span5',
    ));
?>

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

<?php echo $form->textFieldRow($model, 'hours_worked', array('class' => 'span2', 'append' => 'hours')); ?>

<?php echo $form->textAreaRow($model, 'note', array('rows' => 6, 'class' => 'span5')); ?>

<?php echo $this->renderPartial('_parts_used', array('model' => $model)); ?>

<input type="hidden" name="jumper" id="jumper">

<div class="form-actions">
    <?php $this->widget('bootstrap.widgets.BootButton', array(
    'buttonType' => 'submit',
    'type' => 'primary',
    'icon' => 'ok white',
    'label' => $model->isNewRecord ? 'Create' : 'Save',
)); ?>

    <?php $this->widget('bootstrap.widgets.BootButton', array(
    'buttonType' => 'button',
    'type' => 'info',
    'icon' => 'print white',
    'label' => 'Save and Print',
    'htmlOptions' => array(
        'class' => 'save-print'
    ),
)); ?>
</div>

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

0

#610 User is offline   yiistudent 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 15-November 10

Posted 03 August 2012 - 05:51 AM

View PostDon Felipe, on 03 August 2012 - 01:49 AM, said:

Client-side validation works fine on my side... the newest alpha and latest 0.x version. Besides, there's no difference on how enableClientValidation is handled in BootActiveForm vs TbActiveForm. Just in case, what Yii and alpha-bootstrap versions do you use?



View PostChris83, on 03 August 2012 - 02:17 AM, said:

@yiistudent I'd suggest that you don't use an alpha version but instead the stable 0.x version.


Thx All

I got the same, use alpha or current Yii-bootstrap extention and also the same error for prevoius version.
this my yii config script

return array(
	'basePath'=&gt;dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=&gt;'Stater',
	'defaultController' =&gt; 'site/login',
	// preloading 'log' component
	'preload'=&gt;array(
		'log',
		'bootstrap',
		),

	// autoloading model and component classes
	'import'=&gt;array(
		'application.models.*',
		'application.components.*',
		'ext.bootstrap.widgets.*',
		'application.extensions.bootstrap.widgets.*',
		'application.modules.rights.*',
		'application.modules.rights.components.*',
	),

	'modules'=&gt;array(
		// uncomment the following to enable the Gii tool
		
		'gii'=&gt;array(
			'class'=&gt;'system.gii.GiiModule',
			'password'=&gt;'admin',
			'generatorPaths'=&gt;array(
					'bootstrap.gii',
				),
		),
		
	),

	// application components
	'components'=&gt;array(
		'bootstrap'=&gt;array(
    		'class'=&gt;'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
         ),
		
		'user'=&gt;array(
			// enable cookie-based authentication
			'allowAutoLogin'=&gt;true,
			'class'=&gt;'RWebUser',
		),
		//

		
		// uncomment the following to enable URLs in path-format
		'urlManager'=&gt;array(
			'urlFormat'=&gt;'path',
			'showScriptName'=&gt;false,
			'caseSensitive'=&gt;false,
			'rules'=&gt;array(
			),
		
		),
		
		'db'=&gt;array(
			'connectionString' =&gt; 'mysql:host=localhost;dbname=yii_tesis',
			'emulatePrepare' =&gt; true,
			'username' =&gt; 'root',
			'password' =&gt; '',
			'charset' =&gt; 'utf8',
		),
		
		'errorHandler'=&gt;array(
			// use 'site/error' action to display errors
            'errorAction'=&gt;'site/error',
        ),
		'log'=&gt;array(
			'class'=&gt;'CLogRouter',
			'routes'=&gt;array(
				array(
					'class'=&gt;'CFileLogRoute',
					'levels'=&gt;'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=&gt;'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()-&gt;params['paramName']
	'params'=&gt;array(
		// this is used in contact page
		'adminEmail'=&gt;'webmaster@example.com',
	),
);



And I used current version of Yii. Any suggestion?

Quote

SOLVED
Use lastest version of Yii framwork
Thx All



This post has been edited by yiistudent: 03 August 2012 - 10:25 AM

0

#611 User is offline   onek13 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 21
  • Joined: 04-June 09
  • Location:Phillipines Manila

Posted 04 August 2012 - 03:25 AM

Hi All,

Is there a way to remove the auto label in dropDownListRow function?

I tried to search it but i could not find a solution.

See screenshot below for reference.

Attached File  remove_label.jpg (4.8K)
Number of downloads: 29

Thanks in advance.
0

#612 User is offline   Chris83 

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

Posted 05 August 2012 - 03:42 AM

Setting label to false should do the trick.

View Postonek13, on 04 August 2012 - 03:25 AM, said:

Hi All,

Is there a way to remove the auto label in dropDownListRow function?

I tried to search it but i could not find a solution.

See screenshot below for reference.

Attachment remove_label.jpg

Thanks in advance.

Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#613 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 525
  • Joined: 10-October 08
  • Location:European Union

Posted 05 August 2012 - 06:40 AM

View PostChris83, on 30 July 2012 - 05:09 PM, said:

If you wish to see it live you can check out the demo I just set up:
http://www.cniska.ne...-bootstrap-dev/


It still infringes the Glyphicons Free license.
Yii user #37
0

#614 User is offline   Chris83 

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

Posted 05 August 2012 - 10:16 AM

Hey ekerazha,

Thanks for notifying me about this. I'll look into it as soon as possible and make the necessary changes.

View Postekerazha, on 05 August 2012 - 06:40 AM, said:

It still infringes the Glyphicons Free license.

Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#615 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 113
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 05 August 2012 - 09:57 PM

View PostChris83, on 05 August 2012 - 10:16 AM, said:

Hey ekerazha,

Thanks for notifying me about this. I'll look into it as soon as possible and make the necessary changes.


Simply add "Icons from Glyphicons Free, licensed under CC BY 3.0." in the footer on each page where Glyphicons are used. The link to CC is not necessarily needed, I guess.

FontAwesome

Alternatively, one could use FontAwesome icons that are licensed under CC, too, and the author just wants a note in human-readable source code. It's pretty straight forward how to replace the sprites; either via Less or CSS.
0

#616 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 525
  • Joined: 10-October 08
  • Location:European Union

Posted 06 August 2012 - 01:33 AM

View PostDon Felipe, on 05 August 2012 - 09:57 PM, said:

FontAwesome

Alternatively, one could use FontAwesome icons that are licensed under CC, too, and the author just wants a note in human-readable source code. It's pretty straight forward how to replace the sprites; either via Less or CSS.

Font based icons can have issues on some browsers (I found some issues on the Android browser).
Yii user #37
0

#617 User is offline   Chris83 

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

Posted 06 August 2012 - 02:56 AM

The extension will use image icons as long as Bootstrap does. I won't make any changes to Bootstrap itself.

View Postekerazha, on 06 August 2012 - 01:33 AM, said:

Font based icons can have issues on some browsers (I found some issues on the Android browser).

Best regards,
Chris

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

Follow me:
Twitter | GitHub | Bitbucket
0

#618 User is offline   gv0zd 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 06-April 12

Posted 06 August 2012 - 08:01 AM

Hi. I have a problem with modal and BootButtonGroup

This is code from examples.
<?php $this->beginWidget('bootstrap.widgets.BootModal', array('id'=>'myModal')); ?>
 
<div class="modal-header">
    <a class="close" data-dismiss="modal">&times;</a>
    <h3>Modal header</h3>
</div>
 
<div class="modal-body">
    <p>One fine body...</p>
</div>
 
<div class="modal-footer">
    <?php $this->widget('bootstrap.widgets.BootButton', array(
        'type'=>'primary',
        'label'=>'Save changes',
        'url'=>'#',
        'htmlOptions'=>array('data-dismiss'=>'modal'),
    )); ?>
    <?php $this->widget('bootstrap.widgets.BootButton', array(
        'label'=>'Close',
        'url'=>'#',
        'htmlOptions'=>array('data-dismiss'=>'modal'),
    )); ?>
</div>
 
<?php $this->endWidget(); ?>
<?php $this->widget('bootstrap.widgets.BootButton', array(
    'label'=>'Open modal',
    'url'=>'#myModal',
    'type'=>'primary',
    'htmlOptions'=>array('data-toggle'=>'modal'),
)); ?>

<div class="btn-toolbar">
    <?php $this->widget('bootstrap.widgets.BootButtonGroup', array(
        'type'=>'primary',
        'buttons'=>array(
            array('label'=>'Action', 'items'=>array(
                array('label'=>'Open modal', 'url'=>'#myModal', 'htmlOptions'=>array('data-toggle'=>'modal'),),
                '---',
                array('label'=>'Test', 'url'=>'#'),
            )),
        ),
    )); ?>
</div>


I have changed only one thing in <div class="btn-toolbar">
array('label'=>'Open modal', 'url'=>'#myModal', 'htmlOptions'=>array('data-toggle'=>'modal'),),


When i click on button modal appears.
But when i click on "Open modal" item in ButtonGroup, nothing happens
Html generated by Yii bootstrap
<div class="btn-group">
    <a href="#" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></a>
    <ul class="dropdown-menu">
        <li class=""><a href="#myModal">Open modal</a></li>
        <li class="divider"></li>
        <li class=""><a href="#">Test</a></li>
    </ul>
</div>

If I edit html via Firebug modal works fine
<li class=""><a href="#myModal"  data-toggle="modal">Open modal</a></li>


What i make wrong?
0

#619 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 113
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 06 August 2012 - 08:37 AM

View Postgv0zd, on 06 August 2012 - 08:01 AM, said:

Hi. I have a problem with modal and BootButtonGroup

[...]

What i make wrong?


Not much wrong - just one common mistake:

Use 'linkOptions' instead of 'htmlOptions' and it should work fine.
0

#620 User is offline   gv0zd 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 06-April 12

Posted 06 August 2012 - 08:50 AM

View PostDon Felipe, on 06 August 2012 - 08:37 AM, said:

Not much wrong - just one common mistake:

Use 'linkOptions' instead of 'htmlOptions' and it should work fine.

Thank you!!!
0

Share this topic:


  • (45 Pages)
  • +
  • « First
  • 29
  • 30
  • 31
  • 32
  • 33
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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