bootstrap-ext create customize dropdown in tabnav bootstrap ext by criss83

  1. Requirements
  2. Usage

create customize dropdown in tabnav bootstrap ext by criss83

Requirements

Bootstrap

Usage

  1. downloald and install bootsrap extension by chris83
  2. download and extract file bootstrap-ext to extension path
  3. create tabnav in your layout
//layouts/main.php

Yii::setPathOfAlias('_partials', dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'_partials');

$this->widget('bootstrap.widgets.TbNavbar',array(
        'brand'=>'<small><i class="icon-leaf"></i>Admin</small>',
        'htmlOptions'=>array('class'=>'navbar-inverse'),
        'fluid'=>true,
        'items'=>array(
                array(
                        'class'=>'ext.bootstrap-ext.widgets.TbMenuExt',
                        'htmlOptions'=>array('class'=>'pull-right'),
                        'items'=>array(
                                array(
                                        'icon'=>'icon-tasks',
                                        'label'=>'<span class="badge badge-grey">4</span>',
                                        'url'=>'javascript:void(0)',
                                        'linkOptions'=>array('class'=>'dropdown-toggle','data-toggle'=>'dropdown'),
                                        'itemOptions'=>array('class'=>'grey'),
                                        'class'=>'ext.bootstrap-ext.widgets.TbDropdownExt',
                                        'view'=>'_partials._usermenu_loginform',
                                        'submenuOptions'=>array('class' => 'fixed-panel pull-right dropdown-navbar dropdown-caret dropdown-closer'),
                                ),
                        ),
                )); 

simple fixed login panel bootstrap dropdown examample : placed in /themes/yourtheme/views/_partials called by : _partials._usermenu_loginform

or

/protected/views/_partials called by : ext.views._partials._usermenu_loginform

//_usermenu_loginform.php
<li class="login">
    <form>
        <input type="text" name="username" placeholder="Username" value=""/>
        <input type="text" name="password" placeholder="Password" value=""/>
        <button class="login">Login</button>
    </form>
</li>
 
<?php
$cs = Yii::app()->clientScript;
$cs->registerScript('fixed_dropdown','
    jQuery("ul.fixed-panel.dropdown-menu").click(function(){
            return false;
    });
 
    jQuery("ul.dropdown-menu li button.login").click(function(){
 
        //handler your form here
 
        jQuery("li.open").removeClass("open");
    });
',CClientScript::POS_READY);
?>
2 0
3 followers
358 downloads
Yii Version: Unknown
License: BSD-2-Clause
Category: User Interface
Developed by: Sheillendra
Created on: Jul 10, 2013
Last updated: 6 years ago

Downloads

show all